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

xignzi006 发布系统代码

上级 18699dea
......@@ -81,4 +81,9 @@ public class mail_message_subtypeFallback implements mail_message_subtypeFeignCl
}
public Page<Mail_message_subtype> searchDefaultEx(Mail_message_subtypeSearchContext context){
return null;
}
}
......@@ -76,4 +76,9 @@ public interface mail_message_subtypeFeignClient {
Page<Mail_message_subtype> searchDefault(@RequestBody Mail_message_subtypeSearchContext context);
@RequestMapping(method = RequestMethod.POST, value = "/mail_message_subtypes/searchdefaultex")
Page<Mail_message_subtype> searchDefaultEx(@RequestBody Mail_message_subtypeSearchContext context);
}
......@@ -20,6 +20,7 @@ import com.alibaba.fastjson.JSONObject;
public interface Mail_message_subtypeMapper extends BaseMapper<Mail_message_subtype>{
Page<Mail_message_subtype> searchDefault(IPage page, @Param("srf") Mail_message_subtypeSearchContext context, @Param("ew") Wrapper<Mail_message_subtype> wrapper) ;
Page<Mail_message_subtype> searchDefaultEx(IPage page, @Param("srf") Mail_message_subtypeSearchContext context, @Param("ew") Wrapper<Mail_message_subtype> wrapper) ;
@Override
Mail_message_subtype selectById(Serializable id);
@Override
......
......@@ -38,6 +38,7 @@ public interface IMail_message_subtypeService extends IService<Mail_message_subt
boolean save(Mail_message_subtype et) ;
void saveBatch(List<Mail_message_subtype> list) ;
Page<Mail_message_subtype> searchDefault(Mail_message_subtypeSearchContext context) ;
Page<Mail_message_subtype> searchDefaultEx(Mail_message_subtypeSearchContext context) ;
List<Mail_message_subtype> selectByParentId(Long id) ;
void removeByParentId(Long id) ;
List<Mail_message_subtype> selectByCreateUid(Long id) ;
......
......@@ -212,6 +212,15 @@ public class Mail_message_subtypeServiceImpl extends ServiceImpl<Mail_message_su
return new PageImpl<Mail_message_subtype>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 数据查询2
*/
@Override
public Page<Mail_message_subtype> searchDefaultEx(Mail_message_subtypeSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Mail_message_subtype> pages=baseMapper.searchDefaultEx(context.getPages(),context,context.getSelectCond());
return new PageImpl<Mail_message_subtype>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
......
......@@ -65,11 +65,26 @@
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据集合[DefaultEx]-->
<select id="searchDefaultEx" parameterType="cn.ibizlab.businesscentral.core.odoo_mail.filter.Mail_message_subtypeSearchContext" resultMap="Mail_message_subtypeResultMap">
select t1.* from (
<include refid="DefaultEx" />
)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, t41.NAME AS CREATE_UID_TEXT, t1.DEFAULT, t1.HIDDEN, t1.ID, t1.INTERNAL, t1.NAME, t1.PARENT_ID, t51.NAME AS PARENT_ID_TEXT, t1.RELATION_FIELD, t1.RES_MODEL, t1.SEQUENCE, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM MAIL_MESSAGE_SUBTYPE 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 LEFT JOIN MAIL_MESSAGE_SUBTYPE t51 ON t1.PARENT_ID = t51.ID
]]>
</sql>
<!--数据查询[DefaultEx]-->
<sql id="DefaultEx" databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.DEFAULT, t1.HIDDEN, t1.ID, t1.INTERNAL, t1.NAME, t1.PARENT_ID, t51.NAME AS PARENT_ID_TEXT, t1.RELATION_FIELD, t1.RES_MODEL, t1.SEQUENCE, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM MAIL_MESSAGE_SUBTYPE 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 LEFT JOIN MAIL_MESSAGE_SUBTYPE t51 ON t1.PARENT_ID = t51.ID
WHERE ( ( t1.RES_MODEL = #{srf.datacontext.res_model} OR t1.RES_MODEL IS NULL ) )
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.DEFAULT, t1.DESCRIPTION, t1.HIDDEN, t1.ID, t1.INTERNAL, t1.NAME, t1.PARENT_ID, t51.NAME AS PARENT_ID_TEXT, t1.RELATION_FIELD, t1.RES_MODEL, t1.SEQUENCE, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM MAIL_MESSAGE_SUBTYPE 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 LEFT JOIN MAIL_MESSAGE_SUBTYPE t51 ON t1.PARENT_ID = t51.ID
......
......@@ -158,6 +158,28 @@ public class Mail_message_subtypeResource {
.body(new PageImpl(mail_message_subtypeMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Mail_message_subtype-searchDefaultEx-all') and hasPermission(#context,'iBizBusinessCentral-Mail_message_subtype-Get')")
@ApiOperation(value = "获取数据查询2", tags = {"消息子类型" } ,notes = "获取数据查询2")
@RequestMapping(method= RequestMethod.GET , value="/mail_message_subtypes/fetchdefaultex")
public ResponseEntity<List<Mail_message_subtypeDTO>> fetchDefaultEx(Mail_message_subtypeSearchContext context) {
Page<Mail_message_subtype> domains = mail_message_subtypeService.searchDefaultEx(context) ;
List<Mail_message_subtypeDTO> list = mail_message_subtypeMapping.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_message_subtype-searchDefaultEx-all') and hasPermission(#context,'iBizBusinessCentral-Mail_message_subtype-Get')")
@ApiOperation(value = "查询数据查询2", tags = {"消息子类型" } ,notes = "查询数据查询2")
@RequestMapping(method= RequestMethod.POST , value="/mail_message_subtypes/searchdefaultex")
public ResponseEntity<Page<Mail_message_subtypeDTO>> searchDefaultEx(@RequestBody Mail_message_subtypeSearchContext context) {
Page<Mail_message_subtype> domains = mail_message_subtypeService.searchDefaultEx(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(mail_message_subtypeMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册