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

xignzi006 发布系统代码

上级 83a18610
......@@ -58,4 +58,9 @@ public class res_currencyFallback implements res_currencyFeignClient{
return null;
}
public Page<Res_currency> searchDEFAULT(Res_currencySearchContext context){
return null;
}
}
......@@ -56,4 +56,9 @@ public interface res_currencyFeignClient {
Page<Res_currency> select();
@RequestMapping(method = RequestMethod.POST, value = "/res_currencies/searchdefault")
Page<Res_currency> searchDEFAULT(@RequestBody Res_currencySearchContext context);
}
......@@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONObject;
public interface Res_currencyMapper extends BaseMapper<Res_currency>{
Page<Res_currency> searchDEFAULT(IPage page, @Param("srf") Res_currencySearchContext context, @Param("ew") Wrapper<Res_currency> wrapper) ;
@Override
Res_currency selectById(Serializable id);
@Override
......
......@@ -33,6 +33,7 @@ public interface IRes_currencyService extends IService<Res_currency>{
boolean remove(Long key) ;
void removeBatch(Collection<Long> idList) ;
Res_currency get(Long key) ;
Page<Res_currency> searchDEFAULT(Res_currencySearchContext context) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
......
......@@ -258,6 +258,15 @@ public class Res_currencyServiceImpl extends EBSServiceImpl<Res_currencyMapper,
/**
* 查询集合 数据查询
*/
@Override
public Page<Res_currency> searchDEFAULT(Res_currencySearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Res_currency> pages=baseMapper.searchDEFAULT(context.getPages(),context,context.getSelectCond());
return new PageImpl<Res_currency>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
......
......@@ -58,4 +58,27 @@ public class mail_activityFallback implements mail_activityFeignClient{
return null;
}
public Mail_activity getDraft(){
return null;
}
public Boolean checkKey(Mail_activity mail_activity){
return false;
}
public Boolean save(Mail_activity mail_activity){
return false;
}
public Boolean saveBatch(List<Mail_activity> mail_activities){
return false;
}
public Page<Mail_activity> searchDefault(Mail_activitySearchContext context){
return null;
}
}
......@@ -56,4 +56,24 @@ public interface mail_activityFeignClient {
Page<Mail_activity> select();
@RequestMapping(method = RequestMethod.GET, value = "/mail_activities/getdraft")
Mail_activity getDraft();
@RequestMapping(method = RequestMethod.POST, value = "/mail_activities/checkkey")
Boolean checkKey(@RequestBody Mail_activity mail_activity);
@RequestMapping(method = RequestMethod.POST, value = "/mail_activities/save")
Boolean save(@RequestBody Mail_activity mail_activity);
@RequestMapping(method = RequestMethod.POST, value = "/mail_activities/savebatch")
Boolean saveBatch(@RequestBody List<Mail_activity> mail_activities);
@RequestMapping(method = RequestMethod.POST, value = "/mail_activities/searchdefault")
Page<Mail_activity> searchDefault(@RequestBody Mail_activitySearchContext context);
}
......@@ -58,4 +58,27 @@ public class mail_activity_typeFallback implements mail_activity_typeFeignClient
return null;
}
public Mail_activity_type getDraft(){
return null;
}
public Boolean checkKey(Mail_activity_type mail_activity_type){
return false;
}
public Boolean save(Mail_activity_type mail_activity_type){
return false;
}
public Boolean saveBatch(List<Mail_activity_type> mail_activity_types){
return false;
}
public Page<Mail_activity_type> searchDefault(Mail_activity_typeSearchContext context){
return null;
}
}
......@@ -56,4 +56,24 @@ public interface mail_activity_typeFeignClient {
Page<Mail_activity_type> select();
@RequestMapping(method = RequestMethod.GET, value = "/mail_activity_types/getdraft")
Mail_activity_type getDraft();
@RequestMapping(method = RequestMethod.POST, value = "/mail_activity_types/checkkey")
Boolean checkKey(@RequestBody Mail_activity_type mail_activity_type);
@RequestMapping(method = RequestMethod.POST, value = "/mail_activity_types/save")
Boolean save(@RequestBody Mail_activity_type mail_activity_type);
@RequestMapping(method = RequestMethod.POST, value = "/mail_activity_types/savebatch")
Boolean saveBatch(@RequestBody List<Mail_activity_type> mail_activity_types);
@RequestMapping(method = RequestMethod.POST, value = "/mail_activity_types/searchdefault")
Page<Mail_activity_type> searchDefault(@RequestBody Mail_activity_typeSearchContext context);
}
......@@ -27,6 +27,104 @@ import cn.ibizlab.businesscentral.core.odoo_mail.domain.Mail_activity_type;
@Data
public class Mail_activity_typeSearchContext extends QueryWrapperContext<Mail_activity_type> {
private String n_category_eq;//[类别]
public void setN_category_eq(String n_category_eq) {
this.n_category_eq = n_category_eq;
if(!ObjectUtils.isEmpty(this.n_category_eq)){
this.getSearchCond().eq("category", n_category_eq);
}
}
private String n_delay_from_eq;//[延迟类型]
public void setN_delay_from_eq(String n_delay_from_eq) {
this.n_delay_from_eq = n_delay_from_eq;
if(!ObjectUtils.isEmpty(this.n_delay_from_eq)){
this.getSearchCond().eq("delay_from", n_delay_from_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_decoration_type_eq;//[排版类型]
public void setN_decoration_type_eq(String n_decoration_type_eq) {
this.n_decoration_type_eq = n_decoration_type_eq;
if(!ObjectUtils.isEmpty(this.n_decoration_type_eq)){
this.getSearchCond().eq("decoration_type", n_decoration_type_eq);
}
}
private String n_delay_unit_eq;//[延迟单位]
public void setN_delay_unit_eq(String n_delay_unit_eq) {
this.n_delay_unit_eq = n_delay_unit_eq;
if(!ObjectUtils.isEmpty(this.n_delay_unit_eq)){
this.getSearchCond().eq("delay_unit", n_delay_unit_eq);
}
}
private String n_default_next_type_id_text_eq;//[设置默认下一个活动]
public void setN_default_next_type_id_text_eq(String n_default_next_type_id_text_eq) {
this.n_default_next_type_id_text_eq = n_default_next_type_id_text_eq;
if(!ObjectUtils.isEmpty(this.n_default_next_type_id_text_eq)){
this.getSearchCond().eq("default_next_type_id_text", n_default_next_type_id_text_eq);
}
}
private String n_default_next_type_id_text_like;//[设置默认下一个活动]
public void setN_default_next_type_id_text_like(String n_default_next_type_id_text_like) {
this.n_default_next_type_id_text_like = n_default_next_type_id_text_like;
if(!ObjectUtils.isEmpty(this.n_default_next_type_id_text_like)){
this.getSearchCond().like("default_next_type_id_text", n_default_next_type_id_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_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 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);
}
}
private Long n_default_next_type_id_eq;//[设置默认下一个活动]
public void setN_default_next_type_id_eq(Long n_default_next_type_id_eq) {
this.n_default_next_type_id_eq = n_default_next_type_id_eq;
if(!ObjectUtils.isEmpty(this.n_default_next_type_id_eq)){
this.getSearchCond().eq("default_next_type_id", n_default_next_type_id_eq);
}
}
/**
* 启用快速搜索
......
......@@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONObject;
public interface Mail_activityMapper extends BaseMapper<Mail_activity>{
Page<Mail_activity> searchDefault(IPage page, @Param("srf") Mail_activitySearchContext context, @Param("ew") Wrapper<Mail_activity> wrapper) ;
@Override
Mail_activity selectById(Serializable id);
@Override
......@@ -61,4 +62,22 @@ public interface Mail_activityMapper extends BaseMapper<Mail_activity>{
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<Mail_activity> selectByCalendarEventId(@Param("id") Serializable id) ;
List<Mail_activity> selectByActivityTypeId(@Param("id") Serializable id) ;
List<Mail_activity> selectByPreviousActivityTypeId(@Param("id") Serializable id) ;
List<Mail_activity> selectByRecommendedActivityTypeId(@Param("id") Serializable id) ;
List<Mail_activity> selectByNoteId(@Param("id") Serializable id) ;
List<Mail_activity> selectByCreateUid(@Param("id") Serializable id) ;
List<Mail_activity> selectByCreateUserId(@Param("id") Serializable id) ;
List<Mail_activity> selectByUserId(@Param("id") Serializable id) ;
List<Mail_activity> selectByWriteUid(@Param("id") Serializable id) ;
}
......@@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONObject;
public interface Mail_activity_typeMapper extends BaseMapper<Mail_activity_type>{
Page<Mail_activity_type> searchDefault(IPage page, @Param("srf") Mail_activity_typeSearchContext context, @Param("ew") Wrapper<Mail_activity_type> wrapper) ;
@Override
Mail_activity_type selectById(Serializable id);
@Override
......@@ -61,4 +62,10 @@ public interface Mail_activity_typeMapper extends BaseMapper<Mail_activity_type>
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<Mail_activity_type> selectByDefaultNextTypeId(@Param("id") Serializable id) ;
List<Mail_activity_type> selectByCreateUid(@Param("id") Serializable id) ;
List<Mail_activity_type> selectByWriteUid(@Param("id") Serializable id) ;
}
......@@ -33,6 +33,29 @@ public interface IMail_activityService extends IService<Mail_activity>{
boolean remove(Long key) ;
void removeBatch(Collection<Long> idList) ;
Mail_activity get(Long key) ;
Mail_activity getDraft(Mail_activity et) ;
boolean checkKey(Mail_activity et) ;
boolean save(Mail_activity et) ;
void saveBatch(List<Mail_activity> list) ;
Page<Mail_activity> searchDefault(Mail_activitySearchContext context) ;
List<Mail_activity> selectByCalendarEventId(Long id) ;
void removeByCalendarEventId(Long id) ;
List<Mail_activity> selectByActivityTypeId(Long id) ;
void removeByActivityTypeId(Long id) ;
List<Mail_activity> selectByPreviousActivityTypeId(Long id) ;
void removeByPreviousActivityTypeId(Long id) ;
List<Mail_activity> selectByRecommendedActivityTypeId(Long id) ;
void removeByRecommendedActivityTypeId(Long id) ;
List<Mail_activity> selectByNoteId(Long id) ;
void removeByNoteId(Long id) ;
List<Mail_activity> selectByCreateUid(Long id) ;
void removeByCreateUid(Long id) ;
List<Mail_activity> selectByCreateUserId(Long id) ;
void removeByCreateUserId(Long id) ;
List<Mail_activity> selectByUserId(Long id) ;
void removeByUserId(Long id) ;
List<Mail_activity> selectByWriteUid(Long id) ;
void removeByWriteUid(Long id) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
......
......@@ -33,6 +33,17 @@ public interface IMail_activity_typeService extends IService<Mail_activity_type>
boolean remove(Long key) ;
void removeBatch(Collection<Long> idList) ;
Mail_activity_type get(Long key) ;
Mail_activity_type getDraft(Mail_activity_type et) ;
boolean checkKey(Mail_activity_type et) ;
boolean save(Mail_activity_type et) ;
void saveBatch(List<Mail_activity_type> list) ;
Page<Mail_activity_type> searchDefault(Mail_activity_typeSearchContext context) ;
List<Mail_activity_type> selectByDefaultNextTypeId(Long id) ;
void removeByDefaultNextTypeId(Long id) ;
List<Mail_activity_type> selectByCreateUid(Long id) ;
void removeByCreateUid(Long id) ;
List<Mail_activity_type> selectByWriteUid(Long id) ;
void removeByWriteUid(Long id) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
......
......@@ -157,7 +157,149 @@ public class Mail_activityServiceImpl extends EBSServiceImpl<Mail_activityMapper
return et;
}
@Override
public Mail_activity getDraft(Mail_activity et) {
fillParentData(et);
return et;
}
@Override
public boolean checkKey(Mail_activity et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId())));
}
@Override
@Transactional
public boolean save(Mail_activity et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional
public boolean saveOrUpdate(Mail_activity et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
@Transactional
public boolean saveBatch(Collection<Mail_activity> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
@Transactional
public void saveBatch(List<Mail_activity> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
}
@Override
public List<Mail_activity> selectByCalendarEventId(Long id) {
return baseMapper.selectByCalendarEventId(id);
}
@Override
public void removeByCalendarEventId(Long id) {
this.remove(new QueryWrapper<Mail_activity>().eq("calendar_event_id",id));
}
@Override
public List<Mail_activity> selectByActivityTypeId(Long id) {
return baseMapper.selectByActivityTypeId(id);
}
@Override
public void removeByActivityTypeId(Long id) {
this.remove(new QueryWrapper<Mail_activity>().eq("activity_type_id",id));
}
@Override
public List<Mail_activity> selectByPreviousActivityTypeId(Long id) {
return baseMapper.selectByPreviousActivityTypeId(id);
}
@Override
public void removeByPreviousActivityTypeId(Long id) {
this.remove(new QueryWrapper<Mail_activity>().eq("previous_activity_type_id",id));
}
@Override
public List<Mail_activity> selectByRecommendedActivityTypeId(Long id) {
return baseMapper.selectByRecommendedActivityTypeId(id);
}
@Override
public void removeByRecommendedActivityTypeId(Long id) {
this.remove(new QueryWrapper<Mail_activity>().eq("recommended_activity_type_id",id));
}
@Override
public List<Mail_activity> selectByNoteId(Long id) {
return baseMapper.selectByNoteId(id);
}
@Override
public void removeByNoteId(Long id) {
this.remove(new QueryWrapper<Mail_activity>().eq("note_id",id));
}
@Override
public List<Mail_activity> selectByCreateUid(Long id) {
return baseMapper.selectByCreateUid(id);
}
@Override
public void removeByCreateUid(Long id) {
this.remove(new QueryWrapper<Mail_activity>().eq("create_uid",id));
}
@Override
public List<Mail_activity> selectByCreateUserId(Long id) {
return baseMapper.selectByCreateUserId(id);
}
@Override
public void removeByCreateUserId(Long id) {
this.remove(new QueryWrapper<Mail_activity>().eq("create_user_id",id));
}
@Override
public List<Mail_activity> selectByUserId(Long id) {
return baseMapper.selectByUserId(id);
}
@Override
public void removeByUserId(Long id) {
this.remove(new QueryWrapper<Mail_activity>().eq("user_id",id));
}
@Override
public List<Mail_activity> selectByWriteUid(Long id) {
return baseMapper.selectByWriteUid(id);
}
@Override
public void removeByWriteUid(Long id) {
this.remove(new QueryWrapper<Mail_activity>().eq("write_uid",id));
}
/**
* 查询集合 数据集
*/
@Override
public Page<Mail_activity> searchDefault(Mail_activitySearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Mail_activity> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<Mail_activity>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
......
......@@ -165,7 +165,89 @@ public class Mail_activity_typeServiceImpl extends EBSServiceImpl<Mail_activity_
return et;
}
@Override
public Mail_activity_type getDraft(Mail_activity_type et) {
fillParentData(et);
return et;
}
@Override
public boolean checkKey(Mail_activity_type et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId())));
}
@Override
@Transactional
public boolean save(Mail_activity_type et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional
public boolean saveOrUpdate(Mail_activity_type et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
@Transactional
public boolean saveBatch(Collection<Mail_activity_type> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
@Transactional
public void saveBatch(List<Mail_activity_type> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
}
@Override
public List<Mail_activity_type> selectByDefaultNextTypeId(Long id) {
return baseMapper.selectByDefaultNextTypeId(id);
}
@Override
public void removeByDefaultNextTypeId(Long id) {
this.remove(new QueryWrapper<Mail_activity_type>().eq("default_next_type_id",id));
}
@Override
public List<Mail_activity_type> selectByCreateUid(Long id) {
return baseMapper.selectByCreateUid(id);
}
@Override
public void removeByCreateUid(Long id) {
this.remove(new QueryWrapper<Mail_activity_type>().eq("create_uid",id));
}
@Override
public List<Mail_activity_type> selectByWriteUid(Long id) {
return baseMapper.selectByWriteUid(id);
}
@Override
public void removeByWriteUid(Long id) {
this.remove(new QueryWrapper<Mail_activity_type>().eq("write_uid",id));
}
/**
* 查询集合 数据集
*/
@Override
public Page<Mail_activity_type> searchDefault(Mail_activity_typeSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Mail_activity_type> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<Mail_activity_type>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
......
......@@ -31,5 +31,19 @@
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_CURRENCY__RES_USERS__CREATE_UID] -->
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_CURRENCY__RES_USERS__WRITE_UID] -->
<!--数据集合[DEFAULT]-->
<select id="searchDEFAULT" parameterType="cn.ibizlab.businesscentral.core.odoo_base.filter.Res_currencySearchContext" resultMap="Res_currencyResultMap">
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.ACTIVE, t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.CURRENCY_SUBUNIT_LABEL, t1.CURRENCY_UNIT_LABEL, t1.DECIMAL_PLACES, t1.ID, t1.NAME, t1.POSITION, t1.ROUNDING, t1.SYMBOL, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM RES_CURRENCY t1 LEFT JOIN RES_USERS t11 ON t1.WRITE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.CREATE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID
]]>
</sql>
</mapper>
......@@ -4,6 +4,9 @@
<mapper namespace="cn.ibizlab.businesscentral.core.odoo_mail.mapper.Mail_activityMapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="Mail_activityResultMap" databaseId="postgresql">
<![CDATA[select t1.* from (SELECT t31.CATEGORY AS ACTIVITY_CATEGORY, t31.DECORATION_TYPE AS ACTIVITY_DECORATION, t1.ACTIVITY_TYPE_ID, t31.NAME AS ACTIVITY_TYPE_ID_TEXT, t1.AUTOMATED, t1.CALENDAR_EVENT_ID, t131.NAME AS CALENDAR_EVENT_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t91.NAME AS CREATE_UID_TEXT, t1.CREATE_USER_ID, t71.NAME AS CREATE_USER_ID_TEXT, t1.DATE_DEADLINE, t1.FEEDBACK, t31.FORCE_NEXT, t31.ICON, t1.ID, t1.NOTE, t1.NOTE_ID, t51.NAME AS NOTE_ID_TEXT, t1.PREVIOUS_ACTIVITY_TYPE_ID, t41.NAME AS PREVIOUS_ACTIVITY_TYPE_ID_TEXT, t1.RECOMMENDED_ACTIVITY_TYPE_ID, t121.NAME AS RECOMMENDED_ACTIVITY_TYPE_ID_TEXT, t1.RES_ID, t1.RES_MODEL, t1.RES_MODEL_ID, t1.RES_NAME, t1.SUMMARY, t1.USER_ID, t21.NAME AS USER_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t111.NAME AS WRITE_UID_TEXT FROM MAIL_ACTIVITY t1 LEFT JOIN RES_USERS t11 ON t1.USER_ID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN MAIL_ACTIVITY_TYPE t31 ON t1.ACTIVITY_TYPE_ID = t31.ID LEFT JOIN MAIL_ACTIVITY_TYPE t41 ON t1.PREVIOUS_ACTIVITY_TYPE_ID = t41.ID LEFT JOIN NOTE_NOTE t51 ON t1.NOTE_ID = t51.ID LEFT JOIN RES_USERS t61 ON t1.CREATE_USER_ID = t61.ID LEFT JOIN RES_PARTNER t71 ON t61.PARTNER_ID = t71.ID LEFT JOIN RES_USERS t81 ON t1.CREATE_UID = t81.ID LEFT JOIN RES_PARTNER t91 ON t81.PARTNER_ID = t91.ID LEFT JOIN RES_USERS t101 ON t1.WRITE_UID = t101.ID LEFT JOIN RES_PARTNER t111 ON t101.PARTNER_ID = t111.ID LEFT JOIN MAIL_ACTIVITY_TYPE t121 ON t1.RECOMMENDED_ACTIVITY_TYPE_ID = t121.ID LEFT JOIN CALENDAR_EVENT t131 ON t1.CALENDAR_EVENT_ID = t131.ID ) t1 where id=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="Mail_activityResultMap" type="cn.ibizlab.businesscentral.core.odoo_mail.domain.Mail_activity" autoMapping="true">
......@@ -63,14 +66,87 @@
</resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_MAIL_ACTIVITY__CALENDAR_EVENT__CALENDAR_EVENT_ID] -->
<select id="selectByCalendarEventId" resultMap="Mail_activityResultMap">
select t1.* from (
<include refid="Default" />
) t1
where calendar_event_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_MAIL_ACTIVITY__MAIL_ACTIVITY_TYPE__ACTIVITY_TYPE_ID] -->
<select id="selectByActivityTypeId" resultMap="Mail_activityResultMap">
select t1.* from (
<include refid="Default" />
) t1
where activity_type_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_MAIL_ACTIVITY__MAIL_ACTIVITY_TYPE__PREVIOUS_ACTIVITY_TYPE_ID] -->
<select id="selectByPreviousActivityTypeId" resultMap="Mail_activityResultMap">
select t1.* from (
<include refid="Default" />
) t1
where previous_activity_type_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_MAIL_ACTIVITY__MAIL_ACTIVITY_TYPE__RECOMMENDED_ACTIVITY_TYPE_ID] -->
<select id="selectByRecommendedActivityTypeId" resultMap="Mail_activityResultMap">
select t1.* from (
<include refid="Default" />
) t1
where recommended_activity_type_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_MAIL_ACTIVITY__NOTE_NOTE__NOTE_ID] -->
<select id="selectByNoteId" resultMap="Mail_activityResultMap">
select t1.* from (
<include refid="Default" />
) t1
where note_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_MAIL_ACTIVITY__RES_USERS__CREATE_UID] -->
<select id="selectByCreateUid" resultMap="Mail_activityResultMap">
select t1.* from (
<include refid="Default" />
) t1
where create_uid=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_MAIL_ACTIVITY__RES_USERS__CREATE_USER_ID] -->
<select id="selectByCreateUserId" resultMap="Mail_activityResultMap">
select t1.* from (
<include refid="Default" />
) t1
where create_user_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_MAIL_ACTIVITY__RES_USERS__USER_ID] -->
<select id="selectByUserId" resultMap="Mail_activityResultMap">
select t1.* from (
<include refid="Default" />
) t1
where user_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_MAIL_ACTIVITY__RES_USERS__WRITE_UID] -->
<select id="selectByWriteUid" resultMap="Mail_activityResultMap">
select t1.* from (
<include refid="Default" />
) t1
where write_uid=#{id}
</select>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.businesscentral.core.odoo_mail.filter.Mail_activitySearchContext" resultMap="Mail_activityResultMap">
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 t31.CATEGORY AS ACTIVITY_CATEGORY, t31.DECORATION_TYPE AS ACTIVITY_DECORATION, t1.ACTIVITY_TYPE_ID, t31.NAME AS ACTIVITY_TYPE_ID_TEXT, t1.AUTOMATED, t1.CALENDAR_EVENT_ID, t121.NAME AS CALENDAR_EVENT_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t81.NAME AS CREATE_UID_TEXT, t1.CREATE_USER_ID, t61.NAME AS CREATE_USER_ID_TEXT, t1.DATE_DEADLINE, t31.FORCE_NEXT, t31.ICON, t1.ID, t1.NOTE_ID, t1.PREVIOUS_ACTIVITY_TYPE_ID, t41.NAME AS PREVIOUS_ACTIVITY_TYPE_ID_TEXT, t1.RECOMMENDED_ACTIVITY_TYPE_ID, t111.NAME AS RECOMMENDED_ACTIVITY_TYPE_ID_TEXT, t1.RES_ID, t1.RES_MODEL, t1.RES_MODEL_ID, t1.RES_NAME, t1.SUMMARY, t1.USER_ID, t21.NAME AS USER_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t101.NAME AS WRITE_UID_TEXT FROM MAIL_ACTIVITY t1 LEFT JOIN RES_USERS t11 ON t1.USER_ID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN MAIL_ACTIVITY_TYPE t31 ON t1.ACTIVITY_TYPE_ID = t31.ID LEFT JOIN MAIL_ACTIVITY_TYPE t41 ON t1.PREVIOUS_ACTIVITY_TYPE_ID = t41.ID LEFT JOIN RES_USERS t51 ON t1.CREATE_USER_ID = t51.ID LEFT JOIN RES_PARTNER t61 ON t51.PARTNER_ID = t61.ID LEFT JOIN RES_USERS t71 ON t1.CREATE_UID = t71.ID LEFT JOIN RES_PARTNER t81 ON t71.PARTNER_ID = t81.ID LEFT JOIN RES_USERS t91 ON t1.WRITE_UID = t91.ID LEFT JOIN RES_PARTNER t101 ON t91.PARTNER_ID = t101.ID LEFT JOIN MAIL_ACTIVITY_TYPE t111 ON t1.RECOMMENDED_ACTIVITY_TYPE_ID = t111.ID LEFT JOIN CALENDAR_EVENT t121 ON t1.CALENDAR_EVENT_ID = t121.ID
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="postgresql">
<![CDATA[ SELECT t31.CATEGORY AS ACTIVITY_CATEGORY, t31.DECORATION_TYPE AS ACTIVITY_DECORATION, t1.ACTIVITY_TYPE_ID, t31.NAME AS ACTIVITY_TYPE_ID_TEXT, t1.AUTOMATED, t1.CALENDAR_EVENT_ID, t131.NAME AS CALENDAR_EVENT_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t91.NAME AS CREATE_UID_TEXT, t1.CREATE_USER_ID, t71.NAME AS CREATE_USER_ID_TEXT, t1.DATE_DEADLINE, t1.FEEDBACK, t31.FORCE_NEXT, t31.ICON, t1.ID, t1.NOTE, t1.NOTE_ID, t51.NAME AS NOTE_ID_TEXT, t1.PREVIOUS_ACTIVITY_TYPE_ID, t41.NAME AS PREVIOUS_ACTIVITY_TYPE_ID_TEXT, t1.RECOMMENDED_ACTIVITY_TYPE_ID, t121.NAME AS RECOMMENDED_ACTIVITY_TYPE_ID_TEXT, t1.RES_ID, t1.RES_MODEL, t1.RES_MODEL_ID, t1.RES_NAME, t1.SUMMARY, t1.USER_ID, t21.NAME AS USER_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t111.NAME AS WRITE_UID_TEXT FROM MAIL_ACTIVITY t1 LEFT JOIN RES_USERS t11 ON t1.USER_ID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN MAIL_ACTIVITY_TYPE t31 ON t1.ACTIVITY_TYPE_ID = t31.ID LEFT JOIN MAIL_ACTIVITY_TYPE t41 ON t1.PREVIOUS_ACTIVITY_TYPE_ID = t41.ID LEFT JOIN NOTE_NOTE t51 ON t1.NOTE_ID = t51.ID LEFT JOIN RES_USERS t61 ON t1.CREATE_USER_ID = t61.ID LEFT JOIN RES_PARTNER t71 ON t61.PARTNER_ID = t71.ID LEFT JOIN RES_USERS t81 ON t1.CREATE_UID = t81.ID LEFT JOIN RES_PARTNER t91 ON t81.PARTNER_ID = t91.ID LEFT JOIN RES_USERS t101 ON t1.WRITE_UID = t101.ID LEFT JOIN RES_PARTNER t111 ON t101.PARTNER_ID = t111.ID LEFT JOIN MAIL_ACTIVITY_TYPE t121 ON t1.RECOMMENDED_ACTIVITY_TYPE_ID = t121.ID LEFT JOIN CALENDAR_EVENT t131 ON t1.CALENDAR_EVENT_ID = t131.ID
]]>
</sql>
</mapper>
......@@ -4,6 +4,9 @@
<mapper namespace="cn.ibizlab.businesscentral.core.odoo_mail.mapper.Mail_activity_typeMapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="Mail_activity_typeResultMap" databaseId="postgresql">
<![CDATA[select t1.* from (SELECT t1.ACTIVE, t1.CATEGORY, t1.CREATE_DATE, t1.CREATE_UID, t51.NAME AS CREATE_UID_TEXT, t1.DECORATION_TYPE, t1.DEFAULT_NEXT_TYPE_ID, t11.NAME AS DEFAULT_NEXT_TYPE_ID_TEXT, t1.DELAY_COUNT, t1.DELAY_FROM, t1.DELAY_UNIT, t1.FORCE_NEXT, t1.ICON, t1.ID, t1.NAME, t1.RES_MODEL_ID, t1.SEQUENCE, t1.SUMMARY, t1.WRITE_DATE, t1.WRITE_UID, t31.NAME AS WRITE_UID_TEXT FROM MAIL_ACTIVITY_TYPE t1 LEFT JOIN MAIL_ACTIVITY_TYPE t11 ON t1.DEFAULT_NEXT_TYPE_ID = t11.ID LEFT JOIN RES_USERS t21 ON t1.WRITE_UID = t21.ID LEFT JOIN RES_PARTNER t31 ON t21.PARTNER_ID = t31.ID LEFT JOIN RES_USERS t41 ON t1.CREATE_UID = t41.ID LEFT JOIN RES_PARTNER t51 ON t41.PARTNER_ID = t51.ID ) t1 where id=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="Mail_activity_typeResultMap" type="cn.ibizlab.businesscentral.core.odoo_mail.domain.Mail_activity_type" autoMapping="true">
......@@ -40,8 +43,45 @@
</resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_MAIL_ACTIVITY_TYPE__MAIL_ACTIVITY_TYPE__DEFAULT_NEXT_TYPE_ID] -->
<select id="selectByDefaultNextTypeId" resultMap="Mail_activity_typeResultMap">
select t1.* from (
<include refid="Default" />
) t1
where default_next_type_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_MAIL_ACTIVITY_TYPE__RES_USERS__CREATE_UID] -->
<select id="selectByCreateUid" resultMap="Mail_activity_typeResultMap">
select t1.* from (
<include refid="Default" />
) t1
where create_uid=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_MAIL_ACTIVITY_TYPE__RES_USERS__WRITE_UID] -->
<select id="selectByWriteUid" resultMap="Mail_activity_typeResultMap">
select t1.* from (
<include refid="Default" />
) t1
where write_uid=#{id}
</select>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.businesscentral.core.odoo_mail.filter.Mail_activity_typeSearchContext" resultMap="Mail_activity_typeResultMap">
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.ACTIVE, t1.CATEGORY, t1.CREATE_DATE, t1.CREATE_UID, t51.NAME AS CREATE_UID_TEXT, t1.DECORATION_TYPE, t1.DEFAULT_NEXT_TYPE_ID, t11.NAME AS DEFAULT_NEXT_TYPE_ID_TEXT, t1.DELAY_COUNT, t1.DELAY_FROM, t1.DELAY_UNIT, t1.FORCE_NEXT, t1.ICON, t1.ID, t1.NAME, t1.RES_MODEL_ID, t1.SEQUENCE, t1.SUMMARY, t1.WRITE_DATE, t1.WRITE_UID, t31.NAME AS WRITE_UID_TEXT FROM MAIL_ACTIVITY_TYPE t1 LEFT JOIN MAIL_ACTIVITY_TYPE t11 ON t1.DEFAULT_NEXT_TYPE_ID = t11.ID LEFT JOIN RES_USERS t21 ON t1.WRITE_UID = t21.ID LEFT JOIN RES_PARTNER t31 ON t21.PARTNER_ID = t31.ID LEFT JOIN RES_USERS t41 ON t1.CREATE_UID = t41.ID LEFT JOIN RES_PARTNER t51 ON t41.PARTNER_ID = t51.ID
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="postgresql">
<![CDATA[ SELECT t1.ACTIVE, t1.CATEGORY, t1.CREATE_DATE, t1.CREATE_UID, t51.NAME AS CREATE_UID_TEXT, t1.DECORATION_TYPE, t1.DEFAULT_NEXT_TYPE_ID, t11.NAME AS DEFAULT_NEXT_TYPE_ID_TEXT, t1.DELAY_COUNT, t1.DELAY_FROM, t1.DELAY_UNIT, t1.FORCE_NEXT, t1.ICON, t1.ID, t1.NAME, t1.RES_MODEL_ID, t1.SEQUENCE, t1.SUMMARY, t1.WRITE_DATE, t1.WRITE_UID, t31.NAME AS WRITE_UID_TEXT FROM MAIL_ACTIVITY_TYPE t1 LEFT JOIN MAIL_ACTIVITY_TYPE t11 ON t1.DEFAULT_NEXT_TYPE_ID = t11.ID LEFT JOIN RES_USERS t21 ON t1.WRITE_UID = t21.ID LEFT JOIN RES_PARTNER t31 ON t21.PARTNER_ID = t31.ID LEFT JOIN RES_USERS t41 ON t1.CREATE_UID = t41.ID LEFT JOIN RES_PARTNER t51 ON t41.PARTNER_ID = t51.ID
]]>
</sql>
</mapper>
......@@ -109,6 +109,55 @@ public class Mail_activityResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "获取活动草稿", tags = {"活动" }, notes = "获取活动草稿")
@RequestMapping(method = RequestMethod.GET, value = "/mail_activities/getdraft")
public ResponseEntity<Mail_activityDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(mail_activityMapping.toDto(mail_activityService.getDraft(new Mail_activity())));
}
@ApiOperation(value = "检查活动", tags = {"活动" }, notes = "检查活动")
@RequestMapping(method = RequestMethod.POST, value = "/mail_activities/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody Mail_activityDTO mail_activitydto) {
return ResponseEntity.status(HttpStatus.OK).body(mail_activityService.checkKey(mail_activityMapping.toDomain(mail_activitydto)));
}
@PreAuthorize("hasPermission(this.mail_activityMapping.toDomain(#mail_activitydto),'iBizBusinessCentral-Mail_activity-Save')")
@ApiOperation(value = "保存活动", tags = {"活动" }, notes = "保存活动")
@RequestMapping(method = RequestMethod.POST, value = "/mail_activities/save")
public ResponseEntity<Boolean> save(@RequestBody Mail_activityDTO mail_activitydto) {
return ResponseEntity.status(HttpStatus.OK).body(mail_activityService.save(mail_activityMapping.toDomain(mail_activitydto)));
}
@PreAuthorize("hasPermission(this.mail_activityMapping.toDomain(#mail_activitydtos),'iBizBusinessCentral-Mail_activity-Save')")
@ApiOperation(value = "批量保存活动", tags = {"活动" }, notes = "批量保存活动")
@RequestMapping(method = RequestMethod.POST, value = "/mail_activities/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<Mail_activityDTO> mail_activitydtos) {
mail_activityService.saveBatch(mail_activityMapping.toDomain(mail_activitydtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Mail_activity-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Mail_activity-Get')")
@ApiOperation(value = "获取数据集", tags = {"活动" } ,notes = "获取数据集")
@RequestMapping(method= RequestMethod.GET , value="/mail_activities/fetchdefault")
public ResponseEntity<List<Mail_activityDTO>> fetchDefault(Mail_activitySearchContext context) {
Page<Mail_activity> domains = mail_activityService.searchDefault(context) ;
List<Mail_activityDTO> list = mail_activityMapping.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-Mail_activity-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Mail_activity-Get')")
@ApiOperation(value = "查询数据集", tags = {"活动" } ,notes = "查询数据集")
@RequestMapping(method= RequestMethod.POST , value="/mail_activities/searchdefault")
public ResponseEntity<Page<Mail_activityDTO>> searchDefault(@RequestBody Mail_activitySearchContext context) {
Page<Mail_activity> domains = mail_activityService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(mail_activityMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
......@@ -109,6 +109,55 @@ public class Mail_activity_typeResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "获取活动类型草稿", tags = {"活动类型" }, notes = "获取活动类型草稿")
@RequestMapping(method = RequestMethod.GET, value = "/mail_activity_types/getdraft")
public ResponseEntity<Mail_activity_typeDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(mail_activity_typeMapping.toDto(mail_activity_typeService.getDraft(new Mail_activity_type())));
}
@ApiOperation(value = "检查活动类型", tags = {"活动类型" }, notes = "检查活动类型")
@RequestMapping(method = RequestMethod.POST, value = "/mail_activity_types/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody Mail_activity_typeDTO mail_activity_typedto) {
return ResponseEntity.status(HttpStatus.OK).body(mail_activity_typeService.checkKey(mail_activity_typeMapping.toDomain(mail_activity_typedto)));
}
@PreAuthorize("hasPermission(this.mail_activity_typeMapping.toDomain(#mail_activity_typedto),'iBizBusinessCentral-Mail_activity_type-Save')")
@ApiOperation(value = "保存活动类型", tags = {"活动类型" }, notes = "保存活动类型")
@RequestMapping(method = RequestMethod.POST, value = "/mail_activity_types/save")
public ResponseEntity<Boolean> save(@RequestBody Mail_activity_typeDTO mail_activity_typedto) {
return ResponseEntity.status(HttpStatus.OK).body(mail_activity_typeService.save(mail_activity_typeMapping.toDomain(mail_activity_typedto)));
}
@PreAuthorize("hasPermission(this.mail_activity_typeMapping.toDomain(#mail_activity_typedtos),'iBizBusinessCentral-Mail_activity_type-Save')")
@ApiOperation(value = "批量保存活动类型", tags = {"活动类型" }, notes = "批量保存活动类型")
@RequestMapping(method = RequestMethod.POST, value = "/mail_activity_types/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<Mail_activity_typeDTO> mail_activity_typedtos) {
mail_activity_typeService.saveBatch(mail_activity_typeMapping.toDomain(mail_activity_typedtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Mail_activity_type-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Mail_activity_type-Get')")
@ApiOperation(value = "获取数据集", tags = {"活动类型" } ,notes = "获取数据集")
@RequestMapping(method= RequestMethod.GET , value="/mail_activity_types/fetchdefault")
public ResponseEntity<List<Mail_activity_typeDTO>> fetchDefault(Mail_activity_typeSearchContext context) {
Page<Mail_activity_type> domains = mail_activity_typeService.searchDefault(context) ;
List<Mail_activity_typeDTO> list = mail_activity_typeMapping.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-Mail_activity_type-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Mail_activity_type-Get')")
@ApiOperation(value = "查询数据集", tags = {"活动类型" } ,notes = "查询数据集")
@RequestMapping(method= RequestMethod.POST , value="/mail_activity_types/searchdefault")
public ResponseEntity<Page<Mail_activity_typeDTO>> searchDefault(@RequestBody Mail_activity_typeSearchContext context) {
Page<Mail_activity_type> domains = mail_activity_typeService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(mail_activity_typeMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
......@@ -109,6 +109,28 @@ public class Res_currencyResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Res_currency-searchDEFAULT-all') and hasPermission(#context,'iBizBusinessCentral-Res_currency-Get')")
@ApiOperation(value = "获取数据查询", tags = {"币种" } ,notes = "获取数据查询")
@RequestMapping(method= RequestMethod.GET , value="/res_currencies/fetchdefault")
public ResponseEntity<List<Res_currencyDTO>> fetchDEFAULT(Res_currencySearchContext context) {
Page<Res_currency> domains = res_currencyService.searchDEFAULT(context) ;
List<Res_currencyDTO> list = res_currencyMapping.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_currency-searchDEFAULT-all') and hasPermission(#context,'iBizBusinessCentral-Res_currency-Get')")
@ApiOperation(value = "查询数据查询", tags = {"币种" } ,notes = "查询数据查询")
@RequestMapping(method= RequestMethod.POST , value="/res_currencies/searchdefault")
public ResponseEntity<Page<Res_currencyDTO>> searchDEFAULT(@RequestBody Res_currencySearchContext context) {
Page<Res_currency> domains = res_currencyService.searchDEFAULT(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(res_currencyMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册