提交 2c733d04 编写于 作者: ibizdev's avatar ibizdev

xignzi006 发布系统代码

上级 2743c1b6
...@@ -58,4 +58,27 @@ public class res_countryFallback implements res_countryFeignClient{ ...@@ -58,4 +58,27 @@ public class res_countryFallback implements res_countryFeignClient{
return null; return null;
} }
public Res_country getDraft(){
return null;
}
public Boolean checkKey(Res_country res_country){
return false;
}
public Boolean save(Res_country res_country){
return false;
}
public Boolean saveBatch(List<Res_country> res_countries){
return false;
}
public Page<Res_country> searchDefault(Res_countrySearchContext context){
return null;
}
} }
...@@ -56,4 +56,24 @@ public interface res_countryFeignClient { ...@@ -56,4 +56,24 @@ public interface res_countryFeignClient {
Page<Res_country> select(); Page<Res_country> select();
@RequestMapping(method = RequestMethod.GET, value = "/res_countries/getdraft")
Res_country getDraft();
@RequestMapping(method = RequestMethod.POST, value = "/res_countries/checkkey")
Boolean checkKey(@RequestBody Res_country res_country);
@RequestMapping(method = RequestMethod.POST, value = "/res_countries/save")
Boolean save(@RequestBody Res_country res_country);
@RequestMapping(method = RequestMethod.POST, value = "/res_countries/savebatch")
Boolean saveBatch(@RequestBody List<Res_country> res_countries);
@RequestMapping(method = RequestMethod.POST, value = "/res_countries/searchdefault")
Page<Res_country> searchDefault(@RequestBody Res_countrySearchContext context);
} }
...@@ -58,4 +58,27 @@ public class res_country_groupFallback implements res_country_groupFeignClient{ ...@@ -58,4 +58,27 @@ public class res_country_groupFallback implements res_country_groupFeignClient{
return null; return null;
} }
public Res_country_group getDraft(){
return null;
}
public Boolean checkKey(Res_country_group res_country_group){
return false;
}
public Boolean save(Res_country_group res_country_group){
return false;
}
public Boolean saveBatch(List<Res_country_group> res_country_groups){
return false;
}
public Page<Res_country_group> searchDefault(Res_country_groupSearchContext context){
return null;
}
} }
...@@ -56,4 +56,24 @@ public interface res_country_groupFeignClient { ...@@ -56,4 +56,24 @@ public interface res_country_groupFeignClient {
Page<Res_country_group> select(); Page<Res_country_group> select();
@RequestMapping(method = RequestMethod.GET, value = "/res_country_groups/getdraft")
Res_country_group getDraft();
@RequestMapping(method = RequestMethod.POST, value = "/res_country_groups/checkkey")
Boolean checkKey(@RequestBody Res_country_group res_country_group);
@RequestMapping(method = RequestMethod.POST, value = "/res_country_groups/save")
Boolean save(@RequestBody Res_country_group res_country_group);
@RequestMapping(method = RequestMethod.POST, value = "/res_country_groups/savebatch")
Boolean saveBatch(@RequestBody List<Res_country_group> res_country_groups);
@RequestMapping(method = RequestMethod.POST, value = "/res_country_groups/searchdefault")
Page<Res_country_group> searchDefault(@RequestBody Res_country_groupSearchContext context);
} }
...@@ -58,4 +58,27 @@ public class res_country_stateFallback implements res_country_stateFeignClient{ ...@@ -58,4 +58,27 @@ public class res_country_stateFallback implements res_country_stateFeignClient{
return null; return null;
} }
public Res_country_state getDraft(){
return null;
}
public Boolean checkKey(Res_country_state res_country_state){
return false;
}
public Boolean save(Res_country_state res_country_state){
return false;
}
public Boolean saveBatch(List<Res_country_state> res_country_states){
return false;
}
public Page<Res_country_state> searchDefault(Res_country_stateSearchContext context){
return null;
}
} }
...@@ -56,4 +56,24 @@ public interface res_country_stateFeignClient { ...@@ -56,4 +56,24 @@ public interface res_country_stateFeignClient {
Page<Res_country_state> select(); Page<Res_country_state> select();
@RequestMapping(method = RequestMethod.GET, value = "/res_country_states/getdraft")
Res_country_state getDraft();
@RequestMapping(method = RequestMethod.POST, value = "/res_country_states/checkkey")
Boolean checkKey(@RequestBody Res_country_state res_country_state);
@RequestMapping(method = RequestMethod.POST, value = "/res_country_states/save")
Boolean save(@RequestBody Res_country_state res_country_state);
@RequestMapping(method = RequestMethod.POST, value = "/res_country_states/savebatch")
Boolean saveBatch(@RequestBody List<Res_country_state> res_country_states);
@RequestMapping(method = RequestMethod.POST, value = "/res_country_states/searchdefault")
Page<Res_country_state> searchDefault(@RequestBody Res_country_stateSearchContext context);
} }
...@@ -58,4 +58,27 @@ public class res_partner_titleFallback implements res_partner_titleFeignClient{ ...@@ -58,4 +58,27 @@ public class res_partner_titleFallback implements res_partner_titleFeignClient{
return null; return null;
} }
public Res_partner_title getDraft(){
return null;
}
public Boolean checkKey(Res_partner_title res_partner_title){
return false;
}
public Boolean save(Res_partner_title res_partner_title){
return false;
}
public Boolean saveBatch(List<Res_partner_title> res_partner_titles){
return false;
}
public Page<Res_partner_title> searchDefault(Res_partner_titleSearchContext context){
return null;
}
} }
...@@ -56,4 +56,24 @@ public interface res_partner_titleFeignClient { ...@@ -56,4 +56,24 @@ public interface res_partner_titleFeignClient {
Page<Res_partner_title> select(); Page<Res_partner_title> select();
@RequestMapping(method = RequestMethod.GET, value = "/res_partner_titles/getdraft")
Res_partner_title getDraft();
@RequestMapping(method = RequestMethod.POST, value = "/res_partner_titles/checkkey")
Boolean checkKey(@RequestBody Res_partner_title res_partner_title);
@RequestMapping(method = RequestMethod.POST, value = "/res_partner_titles/save")
Boolean save(@RequestBody Res_partner_title res_partner_title);
@RequestMapping(method = RequestMethod.POST, value = "/res_partner_titles/savebatch")
Boolean saveBatch(@RequestBody List<Res_partner_title> res_partner_titles);
@RequestMapping(method = RequestMethod.POST, value = "/res_partner_titles/searchdefault")
Page<Res_partner_title> searchDefault(@RequestBody Res_partner_titleSearchContext context);
} }
...@@ -27,6 +27,83 @@ import cn.ibizlab.businesscentral.core.odoo_base.domain.Res_country; ...@@ -27,6 +27,83 @@ import cn.ibizlab.businesscentral.core.odoo_base.domain.Res_country;
@Data @Data
public class Res_countrySearchContext extends QueryWrapperContext<Res_country> { public class Res_countrySearchContext extends QueryWrapperContext<Res_country> {
private String n_name_position_eq;//[客户姓名位置]
public void setN_name_position_eq(String n_name_position_eq) {
this.n_name_position_eq = n_name_position_eq;
if(!ObjectUtils.isEmpty(this.n_name_position_eq)){
this.getSearchCond().eq("name_position", n_name_position_eq);
}
}
private String n_name_like;//[国家/地区名称]
public void setN_name_like(String n_name_like) {
this.n_name_like = n_name_like;
if(!ObjectUtils.isEmpty(this.n_name_like)){
this.getSearchCond().like("name", n_name_like);
}
}
private String n_create_uid_text_eq;//[创建人]
public void setN_create_uid_text_eq(String n_create_uid_text_eq) {
this.n_create_uid_text_eq = n_create_uid_text_eq;
if(!ObjectUtils.isEmpty(this.n_create_uid_text_eq)){
this.getSearchCond().eq("create_uid_text", n_create_uid_text_eq);
}
}
private String n_create_uid_text_like;//[创建人]
public void setN_create_uid_text_like(String n_create_uid_text_like) {
this.n_create_uid_text_like = n_create_uid_text_like;
if(!ObjectUtils.isEmpty(this.n_create_uid_text_like)){
this.getSearchCond().like("create_uid_text", n_create_uid_text_like);
}
}
private String n_write_uid_text_eq;//[最后更新者]
public void setN_write_uid_text_eq(String n_write_uid_text_eq) {
this.n_write_uid_text_eq = n_write_uid_text_eq;
if(!ObjectUtils.isEmpty(this.n_write_uid_text_eq)){
this.getSearchCond().eq("write_uid_text", n_write_uid_text_eq);
}
}
private String n_write_uid_text_like;//[最后更新者]
public void setN_write_uid_text_like(String n_write_uid_text_like) {
this.n_write_uid_text_like = n_write_uid_text_like;
if(!ObjectUtils.isEmpty(this.n_write_uid_text_like)){
this.getSearchCond().like("write_uid_text", n_write_uid_text_like);
}
}
private String n_currency_id_text_eq;//[币种]
public void setN_currency_id_text_eq(String n_currency_id_text_eq) {
this.n_currency_id_text_eq = n_currency_id_text_eq;
if(!ObjectUtils.isEmpty(this.n_currency_id_text_eq)){
this.getSearchCond().eq("currency_id_text", n_currency_id_text_eq);
}
}
private String n_currency_id_text_like;//[币种]
public void setN_currency_id_text_like(String n_currency_id_text_like) {
this.n_currency_id_text_like = n_currency_id_text_like;
if(!ObjectUtils.isEmpty(this.n_currency_id_text_like)){
this.getSearchCond().like("currency_id_text", n_currency_id_text_like);
}
}
private Long n_write_uid_eq;//[最后更新者]
public void setN_write_uid_eq(Long n_write_uid_eq) {
this.n_write_uid_eq = n_write_uid_eq;
if(!ObjectUtils.isEmpty(this.n_write_uid_eq)){
this.getSearchCond().eq("write_uid", n_write_uid_eq);
}
}
private Long n_create_uid_eq;//[创建人]
public void setN_create_uid_eq(Long n_create_uid_eq) {
this.n_create_uid_eq = n_create_uid_eq;
if(!ObjectUtils.isEmpty(this.n_create_uid_eq)){
this.getSearchCond().eq("create_uid", n_create_uid_eq);
}
}
private Long n_currency_id_eq;//[币种]
public void setN_currency_id_eq(Long n_currency_id_eq) {
this.n_currency_id_eq = n_currency_id_eq;
if(!ObjectUtils.isEmpty(this.n_currency_id_eq)){
this.getSearchCond().eq("currency_id", n_currency_id_eq);
}
}
/** /**
* 启用快速搜索 * 启用快速搜索
......
...@@ -27,6 +27,55 @@ import cn.ibizlab.businesscentral.core.odoo_base.domain.Res_country_group; ...@@ -27,6 +27,55 @@ import cn.ibizlab.businesscentral.core.odoo_base.domain.Res_country_group;
@Data @Data
public class Res_country_groupSearchContext extends QueryWrapperContext<Res_country_group> { public class Res_country_groupSearchContext extends QueryWrapperContext<Res_country_group> {
private String n_name_like;//[名称]
public void setN_name_like(String n_name_like) {
this.n_name_like = n_name_like;
if(!ObjectUtils.isEmpty(this.n_name_like)){
this.getSearchCond().like("name", n_name_like);
}
}
private String n_create_uid_text_eq;//[创建人]
public void setN_create_uid_text_eq(String n_create_uid_text_eq) {
this.n_create_uid_text_eq = n_create_uid_text_eq;
if(!ObjectUtils.isEmpty(this.n_create_uid_text_eq)){
this.getSearchCond().eq("create_uid_text", n_create_uid_text_eq);
}
}
private String n_create_uid_text_like;//[创建人]
public void setN_create_uid_text_like(String n_create_uid_text_like) {
this.n_create_uid_text_like = n_create_uid_text_like;
if(!ObjectUtils.isEmpty(this.n_create_uid_text_like)){
this.getSearchCond().like("create_uid_text", n_create_uid_text_like);
}
}
private String n_write_uid_text_eq;//[最后更新者]
public void setN_write_uid_text_eq(String n_write_uid_text_eq) {
this.n_write_uid_text_eq = n_write_uid_text_eq;
if(!ObjectUtils.isEmpty(this.n_write_uid_text_eq)){
this.getSearchCond().eq("write_uid_text", n_write_uid_text_eq);
}
}
private String n_write_uid_text_like;//[最后更新者]
public void setN_write_uid_text_like(String n_write_uid_text_like) {
this.n_write_uid_text_like = n_write_uid_text_like;
if(!ObjectUtils.isEmpty(this.n_write_uid_text_like)){
this.getSearchCond().like("write_uid_text", n_write_uid_text_like);
}
}
private Long n_write_uid_eq;//[最后更新者]
public void setN_write_uid_eq(Long n_write_uid_eq) {
this.n_write_uid_eq = n_write_uid_eq;
if(!ObjectUtils.isEmpty(this.n_write_uid_eq)){
this.getSearchCond().eq("write_uid", n_write_uid_eq);
}
}
private Long n_create_uid_eq;//[创建人]
public void setN_create_uid_eq(Long n_create_uid_eq) {
this.n_create_uid_eq = n_create_uid_eq;
if(!ObjectUtils.isEmpty(this.n_create_uid_eq)){
this.getSearchCond().eq("create_uid", n_create_uid_eq);
}
}
/** /**
* 启用快速搜索 * 启用快速搜索
......
...@@ -27,6 +27,76 @@ import cn.ibizlab.businesscentral.core.odoo_base.domain.Res_country_state; ...@@ -27,6 +27,76 @@ import cn.ibizlab.businesscentral.core.odoo_base.domain.Res_country_state;
@Data @Data
public class Res_country_stateSearchContext extends QueryWrapperContext<Res_country_state> { public class Res_country_stateSearchContext extends QueryWrapperContext<Res_country_state> {
private String n_name_like;//[州/省名称]
public void setN_name_like(String n_name_like) {
this.n_name_like = n_name_like;
if(!ObjectUtils.isEmpty(this.n_name_like)){
this.getSearchCond().like("name", n_name_like);
}
}
private String n_country_id_text_eq;//[国家/地区]
public void setN_country_id_text_eq(String n_country_id_text_eq) {
this.n_country_id_text_eq = n_country_id_text_eq;
if(!ObjectUtils.isEmpty(this.n_country_id_text_eq)){
this.getSearchCond().eq("country_id_text", n_country_id_text_eq);
}
}
private String n_country_id_text_like;//[国家/地区]
public void setN_country_id_text_like(String n_country_id_text_like) {
this.n_country_id_text_like = n_country_id_text_like;
if(!ObjectUtils.isEmpty(this.n_country_id_text_like)){
this.getSearchCond().like("country_id_text", n_country_id_text_like);
}
}
private String n_create_uid_text_eq;//[创建人]
public void setN_create_uid_text_eq(String n_create_uid_text_eq) {
this.n_create_uid_text_eq = n_create_uid_text_eq;
if(!ObjectUtils.isEmpty(this.n_create_uid_text_eq)){
this.getSearchCond().eq("create_uid_text", n_create_uid_text_eq);
}
}
private String n_create_uid_text_like;//[创建人]
public void setN_create_uid_text_like(String n_create_uid_text_like) {
this.n_create_uid_text_like = n_create_uid_text_like;
if(!ObjectUtils.isEmpty(this.n_create_uid_text_like)){
this.getSearchCond().like("create_uid_text", n_create_uid_text_like);
}
}
private String n_write_uid_text_eq;//[最后更新者]
public void setN_write_uid_text_eq(String n_write_uid_text_eq) {
this.n_write_uid_text_eq = n_write_uid_text_eq;
if(!ObjectUtils.isEmpty(this.n_write_uid_text_eq)){
this.getSearchCond().eq("write_uid_text", n_write_uid_text_eq);
}
}
private String n_write_uid_text_like;//[最后更新者]
public void setN_write_uid_text_like(String n_write_uid_text_like) {
this.n_write_uid_text_like = n_write_uid_text_like;
if(!ObjectUtils.isEmpty(this.n_write_uid_text_like)){
this.getSearchCond().like("write_uid_text", n_write_uid_text_like);
}
}
private Long n_write_uid_eq;//[最后更新者]
public void setN_write_uid_eq(Long n_write_uid_eq) {
this.n_write_uid_eq = n_write_uid_eq;
if(!ObjectUtils.isEmpty(this.n_write_uid_eq)){
this.getSearchCond().eq("write_uid", n_write_uid_eq);
}
}
private Long n_create_uid_eq;//[创建人]
public void setN_create_uid_eq(Long n_create_uid_eq) {
this.n_create_uid_eq = n_create_uid_eq;
if(!ObjectUtils.isEmpty(this.n_create_uid_eq)){
this.getSearchCond().eq("create_uid", n_create_uid_eq);
}
}
private Long n_country_id_eq;//[国家/地区]
public void setN_country_id_eq(Long n_country_id_eq) {
this.n_country_id_eq = n_country_id_eq;
if(!ObjectUtils.isEmpty(this.n_country_id_eq)){
this.getSearchCond().eq("country_id", n_country_id_eq);
}
}
/** /**
* 启用快速搜索 * 启用快速搜索
......
...@@ -27,6 +27,55 @@ import cn.ibizlab.businesscentral.core.odoo_base.domain.Res_partner_title; ...@@ -27,6 +27,55 @@ import cn.ibizlab.businesscentral.core.odoo_base.domain.Res_partner_title;
@Data @Data
public class Res_partner_titleSearchContext extends QueryWrapperContext<Res_partner_title> { public class Res_partner_titleSearchContext extends QueryWrapperContext<Res_partner_title> {
private String n_name_like;//[称谓]
public void setN_name_like(String n_name_like) {
this.n_name_like = n_name_like;
if(!ObjectUtils.isEmpty(this.n_name_like)){
this.getSearchCond().like("name", n_name_like);
}
}
private String n_create_uid_text_eq;//[创建人]
public void setN_create_uid_text_eq(String n_create_uid_text_eq) {
this.n_create_uid_text_eq = n_create_uid_text_eq;
if(!ObjectUtils.isEmpty(this.n_create_uid_text_eq)){
this.getSearchCond().eq("create_uid_text", n_create_uid_text_eq);
}
}
private String n_create_uid_text_like;//[创建人]
public void setN_create_uid_text_like(String n_create_uid_text_like) {
this.n_create_uid_text_like = n_create_uid_text_like;
if(!ObjectUtils.isEmpty(this.n_create_uid_text_like)){
this.getSearchCond().like("create_uid_text", n_create_uid_text_like);
}
}
private String n_write_uid_text_eq;//[最后更新者]
public void setN_write_uid_text_eq(String n_write_uid_text_eq) {
this.n_write_uid_text_eq = n_write_uid_text_eq;
if(!ObjectUtils.isEmpty(this.n_write_uid_text_eq)){
this.getSearchCond().eq("write_uid_text", n_write_uid_text_eq);
}
}
private String n_write_uid_text_like;//[最后更新者]
public void setN_write_uid_text_like(String n_write_uid_text_like) {
this.n_write_uid_text_like = n_write_uid_text_like;
if(!ObjectUtils.isEmpty(this.n_write_uid_text_like)){
this.getSearchCond().like("write_uid_text", n_write_uid_text_like);
}
}
private Long n_create_uid_eq;//[创建人]
public void setN_create_uid_eq(Long n_create_uid_eq) {
this.n_create_uid_eq = n_create_uid_eq;
if(!ObjectUtils.isEmpty(this.n_create_uid_eq)){
this.getSearchCond().eq("create_uid", n_create_uid_eq);
}
}
private Long n_write_uid_eq;//[最后更新者]
public void setN_write_uid_eq(Long n_write_uid_eq) {
this.n_write_uid_eq = n_write_uid_eq;
if(!ObjectUtils.isEmpty(this.n_write_uid_eq)){
this.getSearchCond().eq("write_uid", n_write_uid_eq);
}
}
/** /**
* 启用快速搜索 * 启用快速搜索
......
...@@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONObject;
public interface Res_countryMapper extends BaseMapper<Res_country>{ public interface Res_countryMapper extends BaseMapper<Res_country>{
Page<Res_country> searchDefault(IPage page, @Param("srf") Res_countrySearchContext context, @Param("ew") Wrapper<Res_country> wrapper) ;
@Override @Override
Res_country selectById(Serializable id); Res_country selectById(Serializable id);
@Override @Override
...@@ -61,4 +62,10 @@ public interface Res_countryMapper extends BaseMapper<Res_country>{ ...@@ -61,4 +62,10 @@ public interface Res_countryMapper extends BaseMapper<Res_country>{
@Delete("${sql}") @Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param); boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<Res_country> selectByCurrencyId(@Param("id") Serializable id) ;
List<Res_country> selectByCreateUid(@Param("id") Serializable id) ;
List<Res_country> selectByWriteUid(@Param("id") Serializable id) ;
} }
...@@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONObject;
public interface Res_country_groupMapper extends BaseMapper<Res_country_group>{ public interface Res_country_groupMapper extends BaseMapper<Res_country_group>{
Page<Res_country_group> searchDefault(IPage page, @Param("srf") Res_country_groupSearchContext context, @Param("ew") Wrapper<Res_country_group> wrapper) ;
@Override @Override
Res_country_group selectById(Serializable id); Res_country_group selectById(Serializable id);
@Override @Override
...@@ -61,4 +62,8 @@ public interface Res_country_groupMapper extends BaseMapper<Res_country_group>{ ...@@ -61,4 +62,8 @@ public interface Res_country_groupMapper extends BaseMapper<Res_country_group>{
@Delete("${sql}") @Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param); boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<Res_country_group> selectByCreateUid(@Param("id") Serializable id) ;
List<Res_country_group> selectByWriteUid(@Param("id") Serializable id) ;
} }
...@@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONObject;
public interface Res_country_stateMapper extends BaseMapper<Res_country_state>{ public interface Res_country_stateMapper extends BaseMapper<Res_country_state>{
Page<Res_country_state> searchDefault(IPage page, @Param("srf") Res_country_stateSearchContext context, @Param("ew") Wrapper<Res_country_state> wrapper) ;
@Override @Override
Res_country_state selectById(Serializable id); Res_country_state selectById(Serializable id);
@Override @Override
...@@ -61,4 +62,10 @@ public interface Res_country_stateMapper extends BaseMapper<Res_country_state>{ ...@@ -61,4 +62,10 @@ public interface Res_country_stateMapper extends BaseMapper<Res_country_state>{
@Delete("${sql}") @Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param); boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<Res_country_state> selectByCountryId(@Param("id") Serializable id) ;
List<Res_country_state> selectByCreateUid(@Param("id") Serializable id) ;
List<Res_country_state> selectByWriteUid(@Param("id") Serializable id) ;
} }
...@@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONObject;
public interface Res_partner_titleMapper extends BaseMapper<Res_partner_title>{ public interface Res_partner_titleMapper extends BaseMapper<Res_partner_title>{
Page<Res_partner_title> searchDefault(IPage page, @Param("srf") Res_partner_titleSearchContext context, @Param("ew") Wrapper<Res_partner_title> wrapper) ;
@Override @Override
Res_partner_title selectById(Serializable id); Res_partner_title selectById(Serializable id);
@Override @Override
...@@ -61,4 +62,8 @@ public interface Res_partner_titleMapper extends BaseMapper<Res_partner_title>{ ...@@ -61,4 +62,8 @@ public interface Res_partner_titleMapper extends BaseMapper<Res_partner_title>{
@Delete("${sql}") @Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param); boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<Res_partner_title> selectByCreateUid(@Param("id") Serializable id) ;
List<Res_partner_title> selectByWriteUid(@Param("id") Serializable id) ;
} }
...@@ -33,6 +33,17 @@ public interface IRes_countryService extends IService<Res_country>{ ...@@ -33,6 +33,17 @@ public interface IRes_countryService extends IService<Res_country>{
boolean remove(Long key) ; boolean remove(Long key) ;
void removeBatch(Collection<Long> idList) ; void removeBatch(Collection<Long> idList) ;
Res_country get(Long key) ; Res_country get(Long key) ;
Res_country getDraft(Res_country et) ;
boolean checkKey(Res_country et) ;
boolean save(Res_country et) ;
void saveBatch(List<Res_country> list) ;
Page<Res_country> searchDefault(Res_countrySearchContext context) ;
List<Res_country> selectByCurrencyId(Long id) ;
void removeByCurrencyId(Long id) ;
List<Res_country> selectByCreateUid(Long id) ;
void removeByCreateUid(Long id) ;
List<Res_country> selectByWriteUid(Long id) ;
void removeByWriteUid(Long id) ;
/** /**
*自定义查询SQL *自定义查询SQL
* @param sql select * from table where id =#{et.param} * @param sql select * from table where id =#{et.param}
......
...@@ -33,6 +33,15 @@ public interface IRes_country_groupService extends IService<Res_country_group>{ ...@@ -33,6 +33,15 @@ public interface IRes_country_groupService extends IService<Res_country_group>{
boolean remove(Long key) ; boolean remove(Long key) ;
void removeBatch(Collection<Long> idList) ; void removeBatch(Collection<Long> idList) ;
Res_country_group get(Long key) ; Res_country_group get(Long key) ;
Res_country_group getDraft(Res_country_group et) ;
boolean checkKey(Res_country_group et) ;
boolean save(Res_country_group et) ;
void saveBatch(List<Res_country_group> list) ;
Page<Res_country_group> searchDefault(Res_country_groupSearchContext context) ;
List<Res_country_group> selectByCreateUid(Long id) ;
void removeByCreateUid(Long id) ;
List<Res_country_group> selectByWriteUid(Long id) ;
void removeByWriteUid(Long id) ;
/** /**
*自定义查询SQL *自定义查询SQL
* @param sql select * from table where id =#{et.param} * @param sql select * from table where id =#{et.param}
......
...@@ -33,6 +33,17 @@ public interface IRes_country_stateService extends IService<Res_country_state>{ ...@@ -33,6 +33,17 @@ public interface IRes_country_stateService extends IService<Res_country_state>{
boolean remove(Long key) ; boolean remove(Long key) ;
void removeBatch(Collection<Long> idList) ; void removeBatch(Collection<Long> idList) ;
Res_country_state get(Long key) ; Res_country_state get(Long key) ;
Res_country_state getDraft(Res_country_state et) ;
boolean checkKey(Res_country_state et) ;
boolean save(Res_country_state et) ;
void saveBatch(List<Res_country_state> list) ;
Page<Res_country_state> searchDefault(Res_country_stateSearchContext context) ;
List<Res_country_state> selectByCountryId(Long id) ;
void removeByCountryId(Long id) ;
List<Res_country_state> selectByCreateUid(Long id) ;
void removeByCreateUid(Long id) ;
List<Res_country_state> selectByWriteUid(Long id) ;
void removeByWriteUid(Long id) ;
/** /**
*自定义查询SQL *自定义查询SQL
* @param sql select * from table where id =#{et.param} * @param sql select * from table where id =#{et.param}
......
...@@ -33,6 +33,15 @@ public interface IRes_partner_titleService extends IService<Res_partner_title>{ ...@@ -33,6 +33,15 @@ public interface IRes_partner_titleService extends IService<Res_partner_title>{
boolean remove(Long key) ; boolean remove(Long key) ;
void removeBatch(Collection<Long> idList) ; void removeBatch(Collection<Long> idList) ;
Res_partner_title get(Long key) ; Res_partner_title get(Long key) ;
Res_partner_title getDraft(Res_partner_title et) ;
boolean checkKey(Res_partner_title et) ;
boolean save(Res_partner_title et) ;
void saveBatch(List<Res_partner_title> list) ;
Page<Res_partner_title> searchDefault(Res_partner_titleSearchContext context) ;
List<Res_partner_title> selectByCreateUid(Long id) ;
void removeByCreateUid(Long id) ;
List<Res_partner_title> selectByWriteUid(Long id) ;
void removeByWriteUid(Long id) ;
/** /**
*自定义查询SQL *自定义查询SQL
* @param sql select * from table where id =#{et.param} * @param sql select * from table where id =#{et.param}
......
...@@ -159,7 +159,89 @@ public class Res_countryServiceImpl extends ServiceImpl<Res_countryMapper, Res_c ...@@ -159,7 +159,89 @@ public class Res_countryServiceImpl extends ServiceImpl<Res_countryMapper, Res_c
return et; return et;
} }
@Override
public Res_country getDraft(Res_country et) {
fillParentData(et);
return et;
}
@Override
public boolean checkKey(Res_country et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId())));
}
@Override
@Transactional
public boolean save(Res_country et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional
public boolean saveOrUpdate(Res_country et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
@Transactional
public boolean saveBatch(Collection<Res_country> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
@Transactional
public void saveBatch(List<Res_country> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
}
@Override
public List<Res_country> selectByCurrencyId(Long id) {
return baseMapper.selectByCurrencyId(id);
}
@Override
public void removeByCurrencyId(Long id) {
this.remove(new QueryWrapper<Res_country>().eq("currency_id",id));
}
@Override
public List<Res_country> selectByCreateUid(Long id) {
return baseMapper.selectByCreateUid(id);
}
@Override
public void removeByCreateUid(Long id) {
this.remove(new QueryWrapper<Res_country>().eq("create_uid",id));
}
@Override
public List<Res_country> selectByWriteUid(Long id) {
return baseMapper.selectByWriteUid(id);
}
@Override
public void removeByWriteUid(Long id) {
this.remove(new QueryWrapper<Res_country>().eq("write_uid",id));
}
/**
* 查询集合 数据集
*/
@Override
public Page<Res_country> searchDefault(Res_countrySearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Res_country> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<Res_country>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
......
...@@ -120,7 +120,79 @@ public class Res_country_groupServiceImpl extends ServiceImpl<Res_country_groupM ...@@ -120,7 +120,79 @@ public class Res_country_groupServiceImpl extends ServiceImpl<Res_country_groupM
return et; return et;
} }
@Override
public Res_country_group getDraft(Res_country_group et) {
fillParentData(et);
return et;
}
@Override
public boolean checkKey(Res_country_group et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId())));
}
@Override
@Transactional
public boolean save(Res_country_group et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional
public boolean saveOrUpdate(Res_country_group et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
@Transactional
public boolean saveBatch(Collection<Res_country_group> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
@Transactional
public void saveBatch(List<Res_country_group> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
}
@Override
public List<Res_country_group> selectByCreateUid(Long id) {
return baseMapper.selectByCreateUid(id);
}
@Override
public void removeByCreateUid(Long id) {
this.remove(new QueryWrapper<Res_country_group>().eq("create_uid",id));
}
@Override
public List<Res_country_group> selectByWriteUid(Long id) {
return baseMapper.selectByWriteUid(id);
}
@Override
public void removeByWriteUid(Long id) {
this.remove(new QueryWrapper<Res_country_group>().eq("write_uid",id));
}
/**
* 查询集合 数据集
*/
@Override
public Page<Res_country_group> searchDefault(Res_country_groupSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Res_country_group> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<Res_country_group>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
......
...@@ -126,7 +126,89 @@ public class Res_country_stateServiceImpl extends ServiceImpl<Res_country_stateM ...@@ -126,7 +126,89 @@ public class Res_country_stateServiceImpl extends ServiceImpl<Res_country_stateM
return et; return et;
} }
@Override
public Res_country_state getDraft(Res_country_state et) {
fillParentData(et);
return et;
}
@Override
public boolean checkKey(Res_country_state et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId())));
}
@Override
@Transactional
public boolean save(Res_country_state et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional
public boolean saveOrUpdate(Res_country_state et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
@Transactional
public boolean saveBatch(Collection<Res_country_state> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
@Transactional
public void saveBatch(List<Res_country_state> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
}
@Override
public List<Res_country_state> selectByCountryId(Long id) {
return baseMapper.selectByCountryId(id);
}
@Override
public void removeByCountryId(Long id) {
this.remove(new QueryWrapper<Res_country_state>().eq("country_id",id));
}
@Override
public List<Res_country_state> selectByCreateUid(Long id) {
return baseMapper.selectByCreateUid(id);
}
@Override
public void removeByCreateUid(Long id) {
this.remove(new QueryWrapper<Res_country_state>().eq("create_uid",id));
}
@Override
public List<Res_country_state> selectByWriteUid(Long id) {
return baseMapper.selectByWriteUid(id);
}
@Override
public void removeByWriteUid(Long id) {
this.remove(new QueryWrapper<Res_country_state>().eq("write_uid",id));
}
/**
* 查询集合 数据集
*/
@Override
public Page<Res_country_state> searchDefault(Res_country_stateSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Res_country_state> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<Res_country_state>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
......
...@@ -123,7 +123,79 @@ public class Res_partner_titleServiceImpl extends ServiceImpl<Res_partner_titleM ...@@ -123,7 +123,79 @@ public class Res_partner_titleServiceImpl extends ServiceImpl<Res_partner_titleM
return et; return et;
} }
@Override
public Res_partner_title getDraft(Res_partner_title et) {
fillParentData(et);
return et;
}
@Override
public boolean checkKey(Res_partner_title et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId())));
}
@Override
@Transactional
public boolean save(Res_partner_title et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional
public boolean saveOrUpdate(Res_partner_title et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
@Transactional
public boolean saveBatch(Collection<Res_partner_title> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
@Transactional
public void saveBatch(List<Res_partner_title> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
}
@Override
public List<Res_partner_title> selectByCreateUid(Long id) {
return baseMapper.selectByCreateUid(id);
}
@Override
public void removeByCreateUid(Long id) {
this.remove(new QueryWrapper<Res_partner_title>().eq("create_uid",id));
}
@Override
public List<Res_partner_title> selectByWriteUid(Long id) {
return baseMapper.selectByWriteUid(id);
}
@Override
public void removeByWriteUid(Long id) {
this.remove(new QueryWrapper<Res_partner_title>().eq("write_uid",id));
}
/**
* 查询集合 数据集
*/
@Override
public Page<Res_partner_title> searchDefault(Res_partner_titleSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Res_partner_title> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<Res_partner_title>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
......
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
<mapper namespace="cn.ibizlab.businesscentral.core.odoo_base.mapper.Res_countryMapper"> <mapper namespace="cn.ibizlab.businesscentral.core.odoo_base.mapper.Res_countryMapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性--> <!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="Res_countryResultMap" databaseId="postgresql">
<![CDATA[select t1.* from (SELECT t1.ADDRESS_FORMAT, t1.ADDRESS_VIEW_ID, t1.CODE, t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.CURRENCY_ID, t51.NAME AS CURRENCY_ID_TEXT, t1.ID, t1.NAME, t1.NAME_POSITION, t1.PHONE_CODE, t1.VAT_LABEL, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM RES_COUNTRY t1 LEFT JOIN RES_USERS t11 ON t1.CREATE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.WRITE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID LEFT JOIN RES_CURRENCY t51 ON t1.CURRENCY_ID = t51.ID ) t1 where id=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 --> <!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="Res_countryResultMap" type="cn.ibizlab.businesscentral.core.odoo_base.domain.Res_country" autoMapping="true"> <resultMap id="Res_countryResultMap" type="cn.ibizlab.businesscentral.core.odoo_base.domain.Res_country" autoMapping="true">
...@@ -36,8 +39,45 @@ ...@@ -36,8 +39,45 @@
</resultMap> </resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_COUNTRY__RES_CURRENCY__CURRENCY_ID] --> <!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_COUNTRY__RES_CURRENCY__CURRENCY_ID] -->
<select id="selectByCurrencyId" resultMap="Res_countryResultMap">
select t1.* from (
<include refid="Default" />
) t1
where currency_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_COUNTRY__RES_USERS__CREATE_UID] --> <!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_COUNTRY__RES_USERS__CREATE_UID] -->
<select id="selectByCreateUid" resultMap="Res_countryResultMap">
select t1.* from (
<include refid="Default" />
) t1
where create_uid=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_COUNTRY__RES_USERS__WRITE_UID] --> <!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_COUNTRY__RES_USERS__WRITE_UID] -->
<select id="selectByWriteUid" resultMap="Res_countryResultMap">
select t1.* from (
<include refid="Default" />
) t1
where write_uid=#{id}
</select>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.businesscentral.core.odoo_base.filter.Res_countrySearchContext" resultMap="Res_countryResultMap">
select t1.* from (
<include refid="Default" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]-->
<sql id="Default" databaseId="postgresql">
<![CDATA[ SELECT t1.ADDRESS_VIEW_ID, t1.CODE, t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.CURRENCY_ID, t51.NAME AS CURRENCY_ID_TEXT, t1.ID, t1.NAME, t1.NAME_POSITION, t1.PHONE_CODE, t1.VAT_LABEL, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM RES_COUNTRY t1 LEFT JOIN RES_USERS t11 ON t1.CREATE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.WRITE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID LEFT JOIN RES_CURRENCY t51 ON t1.CURRENCY_ID = t51.ID
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="postgresql">
<![CDATA[ SELECT t1.ADDRESS_FORMAT, t1.ADDRESS_VIEW_ID, t1.CODE, t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.CURRENCY_ID, t51.NAME AS CURRENCY_ID_TEXT, t1.ID, t1.NAME, t1.NAME_POSITION, t1.PHONE_CODE, t1.VAT_LABEL, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM RES_COUNTRY t1 LEFT JOIN RES_USERS t11 ON t1.CREATE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.WRITE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID LEFT JOIN RES_CURRENCY t51 ON t1.CURRENCY_ID = t51.ID
]]>
</sql>
</mapper> </mapper>
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
<mapper namespace="cn.ibizlab.businesscentral.core.odoo_base.mapper.Res_country_groupMapper"> <mapper namespace="cn.ibizlab.businesscentral.core.odoo_base.mapper.Res_country_groupMapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性--> <!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="Res_country_groupResultMap" databaseId="postgresql">
<![CDATA[select t1.* from (SELECT t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.ID, t1.NAME, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM RES_COUNTRY_GROUP t1 LEFT JOIN RES_USERS t11 ON t1.CREATE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.WRITE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID ) t1 where id=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 --> <!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="Res_country_groupResultMap" type="cn.ibizlab.businesscentral.core.odoo_base.domain.Res_country_group" autoMapping="true"> <resultMap id="Res_country_groupResultMap" type="cn.ibizlab.businesscentral.core.odoo_base.domain.Res_country_group" autoMapping="true">
...@@ -27,7 +30,38 @@ ...@@ -27,7 +30,38 @@
</resultMap> </resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_COUNTRY_GROUP__RES_USERS__CREATE_UID] --> <!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_COUNTRY_GROUP__RES_USERS__CREATE_UID] -->
<select id="selectByCreateUid" resultMap="Res_country_groupResultMap">
select t1.* from (
<include refid="Default" />
) t1
where create_uid=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_COUNTRY_GROUP__RES_USERS__WRITE_UID] --> <!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_COUNTRY_GROUP__RES_USERS__WRITE_UID] -->
<select id="selectByWriteUid" resultMap="Res_country_groupResultMap">
select t1.* from (
<include refid="Default" />
) t1
where write_uid=#{id}
</select>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.businesscentral.core.odoo_base.filter.Res_country_groupSearchContext" resultMap="Res_country_groupResultMap">
select t1.* from (
<include refid="Default" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]-->
<sql id="Default" databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.ID, t1.NAME, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM RES_COUNTRY_GROUP t1 LEFT JOIN RES_USERS t11 ON t1.CREATE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.WRITE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.ID, t1.NAME, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM RES_COUNTRY_GROUP t1 LEFT JOIN RES_USERS t11 ON t1.CREATE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.WRITE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID
]]>
</sql>
</mapper> </mapper>
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
<mapper namespace="cn.ibizlab.businesscentral.core.odoo_base.mapper.Res_country_stateMapper"> <mapper namespace="cn.ibizlab.businesscentral.core.odoo_base.mapper.Res_country_stateMapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性--> <!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="Res_country_stateResultMap" databaseId="postgresql">
<![CDATA[select t1.* from (SELECT t1.CODE, t1.COUNTRY_ID, t11.NAME AS COUNTRY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t31.NAME AS CREATE_UID_TEXT, t1.ID, t1.NAME, t1.WRITE_DATE, t1.WRITE_UID, t51.NAME AS WRITE_UID_TEXT FROM RES_COUNTRY_STATE t1 LEFT JOIN RES_COUNTRY t11 ON t1.COUNTRY_ID = t11.ID LEFT JOIN RES_USERS t21 ON t1.CREATE_UID = t21.ID LEFT JOIN RES_PARTNER t31 ON t21.PARTNER_ID = t31.ID LEFT JOIN RES_USERS t41 ON t1.WRITE_UID = t41.ID LEFT JOIN RES_PARTNER t51 ON t41.PARTNER_ID = t51.ID ) t1 where id=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 --> <!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="Res_country_stateResultMap" type="cn.ibizlab.businesscentral.core.odoo_base.domain.Res_country_state" autoMapping="true"> <resultMap id="Res_country_stateResultMap" type="cn.ibizlab.businesscentral.core.odoo_base.domain.Res_country_state" autoMapping="true">
...@@ -29,8 +32,45 @@ ...@@ -29,8 +32,45 @@
</resultMap> </resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_COUNTRY_STATE__RES_COUNTRY__COUNTRY_ID] --> <!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_COUNTRY_STATE__RES_COUNTRY__COUNTRY_ID] -->
<select id="selectByCountryId" resultMap="Res_country_stateResultMap">
select t1.* from (
<include refid="Default" />
) t1
where country_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_COUNTRY_STATE__RES_USERS__CREATE_UID] --> <!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_COUNTRY_STATE__RES_USERS__CREATE_UID] -->
<select id="selectByCreateUid" resultMap="Res_country_stateResultMap">
select t1.* from (
<include refid="Default" />
) t1
where create_uid=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_COUNTRY_STATE__RES_USERS__WRITE_UID] --> <!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_COUNTRY_STATE__RES_USERS__WRITE_UID] -->
<select id="selectByWriteUid" resultMap="Res_country_stateResultMap">
select t1.* from (
<include refid="Default" />
) t1
where write_uid=#{id}
</select>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.businesscentral.core.odoo_base.filter.Res_country_stateSearchContext" resultMap="Res_country_stateResultMap">
select t1.* from (
<include refid="Default" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]-->
<sql id="Default" databaseId="postgresql">
<![CDATA[ SELECT t1.CODE, t1.COUNTRY_ID, t11.NAME AS COUNTRY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t31.NAME AS CREATE_UID_TEXT, t1.ID, t1.NAME, t1.WRITE_DATE, t1.WRITE_UID, t51.NAME AS WRITE_UID_TEXT FROM RES_COUNTRY_STATE t1 LEFT JOIN RES_COUNTRY t11 ON t1.COUNTRY_ID = t11.ID LEFT JOIN RES_USERS t21 ON t1.CREATE_UID = t21.ID LEFT JOIN RES_PARTNER t31 ON t21.PARTNER_ID = t31.ID LEFT JOIN RES_USERS t41 ON t1.WRITE_UID = t41.ID LEFT JOIN RES_PARTNER t51 ON t41.PARTNER_ID = t51.ID
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="postgresql">
<![CDATA[ SELECT t1.CODE, t1.COUNTRY_ID, t11.NAME AS COUNTRY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t31.NAME AS CREATE_UID_TEXT, t1.ID, t1.NAME, t1.WRITE_DATE, t1.WRITE_UID, t51.NAME AS WRITE_UID_TEXT FROM RES_COUNTRY_STATE t1 LEFT JOIN RES_COUNTRY t11 ON t1.COUNTRY_ID = t11.ID LEFT JOIN RES_USERS t21 ON t1.CREATE_UID = t21.ID LEFT JOIN RES_PARTNER t31 ON t21.PARTNER_ID = t31.ID LEFT JOIN RES_USERS t41 ON t1.WRITE_UID = t41.ID LEFT JOIN RES_PARTNER t51 ON t41.PARTNER_ID = t51.ID
]]>
</sql>
</mapper> </mapper>
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
<mapper namespace="cn.ibizlab.businesscentral.core.odoo_base.mapper.Res_partner_titleMapper"> <mapper namespace="cn.ibizlab.businesscentral.core.odoo_base.mapper.Res_partner_titleMapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性--> <!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="Res_partner_titleResultMap" databaseId="postgresql">
<![CDATA[select t1.* from (SELECT t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.ID, t1.NAME, t1.SHORTCUT, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM RES_PARTNER_TITLE t1 LEFT JOIN RES_USERS t11 ON t1.CREATE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.WRITE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID ) t1 where id=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 --> <!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="Res_partner_titleResultMap" type="cn.ibizlab.businesscentral.core.odoo_base.domain.Res_partner_title" autoMapping="true"> <resultMap id="Res_partner_titleResultMap" type="cn.ibizlab.businesscentral.core.odoo_base.domain.Res_partner_title" autoMapping="true">
...@@ -25,7 +28,38 @@ ...@@ -25,7 +28,38 @@
</resultMap> </resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_PARTNER_TITLE__RES_USERS__CREATE_UID] --> <!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_PARTNER_TITLE__RES_USERS__CREATE_UID] -->
<select id="selectByCreateUid" resultMap="Res_partner_titleResultMap">
select t1.* from (
<include refid="Default" />
) t1
where create_uid=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_PARTNER_TITLE__RES_USERS__WRITE_UID] --> <!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_PARTNER_TITLE__RES_USERS__WRITE_UID] -->
<select id="selectByWriteUid" resultMap="Res_partner_titleResultMap">
select t1.* from (
<include refid="Default" />
) t1
where write_uid=#{id}
</select>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.businesscentral.core.odoo_base.filter.Res_partner_titleSearchContext" resultMap="Res_partner_titleResultMap">
select t1.* from (
<include refid="Default" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]-->
<sql id="Default" databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.ID, t1.NAME, t1.SHORTCUT, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM RES_PARTNER_TITLE t1 LEFT JOIN RES_USERS t11 ON t1.CREATE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.WRITE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.ID, t1.NAME, t1.SHORTCUT, t1.WRITE_DATE, t1.WRITE_UID, t41.NAME AS WRITE_UID_TEXT FROM RES_PARTNER_TITLE t1 LEFT JOIN RES_USERS t11 ON t1.CREATE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.WRITE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID
]]>
</sql>
</mapper> </mapper>
...@@ -109,6 +109,55 @@ public class Res_countryResource { ...@@ -109,6 +109,55 @@ public class Res_countryResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@ApiOperation(value = "获取国家/地区草稿", tags = {"国家/地区" }, notes = "获取国家/地区草稿")
@RequestMapping(method = RequestMethod.GET, value = "/res_countries/getdraft")
public ResponseEntity<Res_countryDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(res_countryMapping.toDto(res_countryService.getDraft(new Res_country())));
}
@ApiOperation(value = "检查国家/地区", tags = {"国家/地区" }, notes = "检查国家/地区")
@RequestMapping(method = RequestMethod.POST, value = "/res_countries/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody Res_countryDTO res_countrydto) {
return ResponseEntity.status(HttpStatus.OK).body(res_countryService.checkKey(res_countryMapping.toDomain(res_countrydto)));
}
@PreAuthorize("hasPermission(this.res_countryMapping.toDomain(#res_countrydto),'iBizBusinessCentral-Res_country-Save')")
@ApiOperation(value = "保存国家/地区", tags = {"国家/地区" }, notes = "保存国家/地区")
@RequestMapping(method = RequestMethod.POST, value = "/res_countries/save")
public ResponseEntity<Boolean> save(@RequestBody Res_countryDTO res_countrydto) {
return ResponseEntity.status(HttpStatus.OK).body(res_countryService.save(res_countryMapping.toDomain(res_countrydto)));
}
@PreAuthorize("hasPermission(this.res_countryMapping.toDomain(#res_countrydtos),'iBizBusinessCentral-Res_country-Save')")
@ApiOperation(value = "批量保存国家/地区", tags = {"国家/地区" }, notes = "批量保存国家/地区")
@RequestMapping(method = RequestMethod.POST, value = "/res_countries/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<Res_countryDTO> res_countrydtos) {
res_countryService.saveBatch(res_countryMapping.toDomain(res_countrydtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Res_country-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Res_country-Get')")
@ApiOperation(value = "获取数据集", tags = {"国家/地区" } ,notes = "获取数据集")
@RequestMapping(method= RequestMethod.GET , value="/res_countries/fetchdefault")
public ResponseEntity<List<Res_countryDTO>> fetchDefault(Res_countrySearchContext context) {
Page<Res_country> domains = res_countryService.searchDefault(context) ;
List<Res_countryDTO> list = res_countryMapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
.header("x-page", String.valueOf(context.getPageable().getPageNumber()))
.header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
.header("x-total", String.valueOf(domains.getTotalElements()))
.body(list);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Res_country-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Res_country-Get')")
@ApiOperation(value = "查询数据集", tags = {"国家/地区" } ,notes = "查询数据集")
@RequestMapping(method= RequestMethod.POST , value="/res_countries/searchdefault")
public ResponseEntity<Page<Res_countryDTO>> searchDefault(@RequestBody Res_countrySearchContext context) {
Page<Res_country> domains = res_countryService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(res_countryMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
} }
...@@ -109,6 +109,55 @@ public class Res_country_groupResource { ...@@ -109,6 +109,55 @@ public class Res_country_groupResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@ApiOperation(value = "获取国家/地区群组草稿", tags = {"国家/地区群组" }, notes = "获取国家/地区群组草稿")
@RequestMapping(method = RequestMethod.GET, value = "/res_country_groups/getdraft")
public ResponseEntity<Res_country_groupDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(res_country_groupMapping.toDto(res_country_groupService.getDraft(new Res_country_group())));
}
@ApiOperation(value = "检查国家/地区群组", tags = {"国家/地区群组" }, notes = "检查国家/地区群组")
@RequestMapping(method = RequestMethod.POST, value = "/res_country_groups/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody Res_country_groupDTO res_country_groupdto) {
return ResponseEntity.status(HttpStatus.OK).body(res_country_groupService.checkKey(res_country_groupMapping.toDomain(res_country_groupdto)));
}
@PreAuthorize("hasPermission(this.res_country_groupMapping.toDomain(#res_country_groupdto),'iBizBusinessCentral-Res_country_group-Save')")
@ApiOperation(value = "保存国家/地区群组", tags = {"国家/地区群组" }, notes = "保存国家/地区群组")
@RequestMapping(method = RequestMethod.POST, value = "/res_country_groups/save")
public ResponseEntity<Boolean> save(@RequestBody Res_country_groupDTO res_country_groupdto) {
return ResponseEntity.status(HttpStatus.OK).body(res_country_groupService.save(res_country_groupMapping.toDomain(res_country_groupdto)));
}
@PreAuthorize("hasPermission(this.res_country_groupMapping.toDomain(#res_country_groupdtos),'iBizBusinessCentral-Res_country_group-Save')")
@ApiOperation(value = "批量保存国家/地区群组", tags = {"国家/地区群组" }, notes = "批量保存国家/地区群组")
@RequestMapping(method = RequestMethod.POST, value = "/res_country_groups/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<Res_country_groupDTO> res_country_groupdtos) {
res_country_groupService.saveBatch(res_country_groupMapping.toDomain(res_country_groupdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Res_country_group-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Res_country_group-Get')")
@ApiOperation(value = "获取数据集", tags = {"国家/地区群组" } ,notes = "获取数据集")
@RequestMapping(method= RequestMethod.GET , value="/res_country_groups/fetchdefault")
public ResponseEntity<List<Res_country_groupDTO>> fetchDefault(Res_country_groupSearchContext context) {
Page<Res_country_group> domains = res_country_groupService.searchDefault(context) ;
List<Res_country_groupDTO> list = res_country_groupMapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
.header("x-page", String.valueOf(context.getPageable().getPageNumber()))
.header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
.header("x-total", String.valueOf(domains.getTotalElements()))
.body(list);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Res_country_group-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Res_country_group-Get')")
@ApiOperation(value = "查询数据集", tags = {"国家/地区群组" } ,notes = "查询数据集")
@RequestMapping(method= RequestMethod.POST , value="/res_country_groups/searchdefault")
public ResponseEntity<Page<Res_country_groupDTO>> searchDefault(@RequestBody Res_country_groupSearchContext context) {
Page<Res_country_group> domains = res_country_groupService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(res_country_groupMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
} }
...@@ -109,6 +109,55 @@ public class Res_country_stateResource { ...@@ -109,6 +109,55 @@ public class Res_country_stateResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@ApiOperation(value = "获取国家/地区州/省草稿", tags = {"国家/地区州/省" }, notes = "获取国家/地区州/省草稿")
@RequestMapping(method = RequestMethod.GET, value = "/res_country_states/getdraft")
public ResponseEntity<Res_country_stateDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(res_country_stateMapping.toDto(res_country_stateService.getDraft(new Res_country_state())));
}
@ApiOperation(value = "检查国家/地区州/省", tags = {"国家/地区州/省" }, notes = "检查国家/地区州/省")
@RequestMapping(method = RequestMethod.POST, value = "/res_country_states/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody Res_country_stateDTO res_country_statedto) {
return ResponseEntity.status(HttpStatus.OK).body(res_country_stateService.checkKey(res_country_stateMapping.toDomain(res_country_statedto)));
}
@PreAuthorize("hasPermission(this.res_country_stateMapping.toDomain(#res_country_statedto),'iBizBusinessCentral-Res_country_state-Save')")
@ApiOperation(value = "保存国家/地区州/省", tags = {"国家/地区州/省" }, notes = "保存国家/地区州/省")
@RequestMapping(method = RequestMethod.POST, value = "/res_country_states/save")
public ResponseEntity<Boolean> save(@RequestBody Res_country_stateDTO res_country_statedto) {
return ResponseEntity.status(HttpStatus.OK).body(res_country_stateService.save(res_country_stateMapping.toDomain(res_country_statedto)));
}
@PreAuthorize("hasPermission(this.res_country_stateMapping.toDomain(#res_country_statedtos),'iBizBusinessCentral-Res_country_state-Save')")
@ApiOperation(value = "批量保存国家/地区州/省", tags = {"国家/地区州/省" }, notes = "批量保存国家/地区州/省")
@RequestMapping(method = RequestMethod.POST, value = "/res_country_states/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<Res_country_stateDTO> res_country_statedtos) {
res_country_stateService.saveBatch(res_country_stateMapping.toDomain(res_country_statedtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Res_country_state-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Res_country_state-Get')")
@ApiOperation(value = "获取数据集", tags = {"国家/地区州/省" } ,notes = "获取数据集")
@RequestMapping(method= RequestMethod.GET , value="/res_country_states/fetchdefault")
public ResponseEntity<List<Res_country_stateDTO>> fetchDefault(Res_country_stateSearchContext context) {
Page<Res_country_state> domains = res_country_stateService.searchDefault(context) ;
List<Res_country_stateDTO> list = res_country_stateMapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
.header("x-page", String.valueOf(context.getPageable().getPageNumber()))
.header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
.header("x-total", String.valueOf(domains.getTotalElements()))
.body(list);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Res_country_state-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Res_country_state-Get')")
@ApiOperation(value = "查询数据集", tags = {"国家/地区州/省" } ,notes = "查询数据集")
@RequestMapping(method= RequestMethod.POST , value="/res_country_states/searchdefault")
public ResponseEntity<Page<Res_country_stateDTO>> searchDefault(@RequestBody Res_country_stateSearchContext context) {
Page<Res_country_state> domains = res_country_stateService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(res_country_stateMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
} }
...@@ -109,6 +109,55 @@ public class Res_partner_titleResource { ...@@ -109,6 +109,55 @@ public class Res_partner_titleResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@ApiOperation(value = "获取业务伙伴称谓草稿", tags = {"业务伙伴称谓" }, notes = "获取业务伙伴称谓草稿")
@RequestMapping(method = RequestMethod.GET, value = "/res_partner_titles/getdraft")
public ResponseEntity<Res_partner_titleDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(res_partner_titleMapping.toDto(res_partner_titleService.getDraft(new Res_partner_title())));
}
@ApiOperation(value = "检查业务伙伴称谓", tags = {"业务伙伴称谓" }, notes = "检查业务伙伴称谓")
@RequestMapping(method = RequestMethod.POST, value = "/res_partner_titles/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody Res_partner_titleDTO res_partner_titledto) {
return ResponseEntity.status(HttpStatus.OK).body(res_partner_titleService.checkKey(res_partner_titleMapping.toDomain(res_partner_titledto)));
}
@PreAuthorize("hasPermission(this.res_partner_titleMapping.toDomain(#res_partner_titledto),'iBizBusinessCentral-Res_partner_title-Save')")
@ApiOperation(value = "保存业务伙伴称谓", tags = {"业务伙伴称谓" }, notes = "保存业务伙伴称谓")
@RequestMapping(method = RequestMethod.POST, value = "/res_partner_titles/save")
public ResponseEntity<Boolean> save(@RequestBody Res_partner_titleDTO res_partner_titledto) {
return ResponseEntity.status(HttpStatus.OK).body(res_partner_titleService.save(res_partner_titleMapping.toDomain(res_partner_titledto)));
}
@PreAuthorize("hasPermission(this.res_partner_titleMapping.toDomain(#res_partner_titledtos),'iBizBusinessCentral-Res_partner_title-Save')")
@ApiOperation(value = "批量保存业务伙伴称谓", tags = {"业务伙伴称谓" }, notes = "批量保存业务伙伴称谓")
@RequestMapping(method = RequestMethod.POST, value = "/res_partner_titles/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<Res_partner_titleDTO> res_partner_titledtos) {
res_partner_titleService.saveBatch(res_partner_titleMapping.toDomain(res_partner_titledtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Res_partner_title-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Res_partner_title-Get')")
@ApiOperation(value = "获取数据集", tags = {"业务伙伴称谓" } ,notes = "获取数据集")
@RequestMapping(method= RequestMethod.GET , value="/res_partner_titles/fetchdefault")
public ResponseEntity<List<Res_partner_titleDTO>> fetchDefault(Res_partner_titleSearchContext context) {
Page<Res_partner_title> domains = res_partner_titleService.searchDefault(context) ;
List<Res_partner_titleDTO> list = res_partner_titleMapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
.header("x-page", String.valueOf(context.getPageable().getPageNumber()))
.header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
.header("x-total", String.valueOf(domains.getTotalElements()))
.body(list);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Res_partner_title-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Res_partner_title-Get')")
@ApiOperation(value = "查询数据集", tags = {"业务伙伴称谓" } ,notes = "查询数据集")
@RequestMapping(method= RequestMethod.POST , value="/res_partner_titles/searchdefault")
public ResponseEntity<Page<Res_partner_titleDTO>> searchDefault(@RequestBody Res_partner_titleSearchContext context) {
Page<Res_partner_title> domains = res_partner_titleService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(res_partner_titleMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
} }
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册