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

xignzi006 发布系统代码

上级 0afba7a3
......@@ -33,6 +33,20 @@ public class Ir_attachmentSearchContext extends QueryWrapperContext<Ir_attachmen
if(!ObjectUtils.isEmpty(this.n_name_like)){
this.getSearchCond().like("name", n_name_like);
}
}
private String n_res_model_eq;//[res_model]
public void setN_res_model_eq(String n_res_model_eq) {
this.n_res_model_eq = n_res_model_eq;
if(!ObjectUtils.isEmpty(this.n_res_model_eq)){
this.getSearchCond().eq("res_model", n_res_model_eq);
}
}
private Integer n_res_id_eq;//[res_id]
public void setN_res_id_eq(Integer n_res_id_eq) {
this.n_res_id_eq = n_res_id_eq;
if(!ObjectUtils.isEmpty(this.n_res_id_eq)){
this.getSearchCond().eq("res_id", n_res_id_eq);
}
}
private Long n_company_id_eq;//[公司]
public void setN_company_id_eq(Long n_company_id_eq) {
......
......@@ -19,7 +19,6 @@ import com.alibaba.fastjson.JSONObject;
public interface Ir_attachmentMapper extends BaseMapper<Ir_attachment>{
Page<Ir_attachment> searchByRes(IPage page, @Param("srf") Ir_attachmentSearchContext context, @Param("ew") Wrapper<Ir_attachment> wrapper) ;
Page<Ir_attachment> searchDefault(IPage page, @Param("srf") Ir_attachmentSearchContext context, @Param("ew") Wrapper<Ir_attachment> wrapper) ;
@Override
Ir_attachment selectById(Serializable id);
......
......@@ -37,7 +37,6 @@ public interface IIr_attachmentService extends IService<Ir_attachment>{
boolean checkKey(Ir_attachment et) ;
boolean save(Ir_attachment et) ;
void saveBatch(List<Ir_attachment> list) ;
Page<Ir_attachment> searchByRes(Ir_attachmentSearchContext context) ;
Page<Ir_attachment> searchDefault(Ir_attachmentSearchContext context) ;
List<Ir_attachment> selectByCompanyId(Long id) ;
void removeByCompanyId(Long id) ;
......
......@@ -199,15 +199,6 @@ public class Ir_attachmentServiceImpl extends EBSServiceImpl<Ir_attachmentMapper
}
/**
* 查询集合 ByRes
*/
@Override
public Page<Ir_attachment> searchByRes(Ir_attachmentSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Ir_attachment> pages=baseMapper.searchByRes(context.getPages(),context,context.getSelectCond());
return new PageImpl<Ir_attachment>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 数据集
*/
......
......@@ -58,7 +58,25 @@ public class mail_followersFallback implements mail_followersFeignClient{
return null;
}
public Page<Mail_followers> searchByRes(Mail_followersSearchContext context){
public Mail_followers getDraft(){
return null;
}
public Boolean checkKey(Mail_followers mail_followers){
return false;
}
public Boolean save(Mail_followers mail_followers){
return false;
}
public Boolean saveBatch(List<Mail_followers> mail_followers){
return false;
}
public Page<Mail_followers> searchDefault(Mail_followersSearchContext context){
return null;
}
......
......@@ -56,9 +56,24 @@ public interface mail_followersFeignClient {
Page<Mail_followers> select();
@RequestMapping(method = RequestMethod.GET, value = "/mail_followers/getdraft")
Mail_followers getDraft();
@RequestMapping(method = RequestMethod.POST, value = "/mail_followers/searchbyres")
Page<Mail_followers> searchByRes(@RequestBody Mail_followersSearchContext context);
@RequestMapping(method = RequestMethod.POST, value = "/mail_followers/checkkey")
Boolean checkKey(@RequestBody Mail_followers mail_followers);
@RequestMapping(method = RequestMethod.POST, value = "/mail_followers/save")
Boolean save(@RequestBody Mail_followers mail_followers);
@RequestMapping(method = RequestMethod.POST, value = "/mail_followers/savebatch")
Boolean saveBatch(@RequestBody List<Mail_followers> mail_followers);
@RequestMapping(method = RequestMethod.POST, value = "/mail_followers/searchdefault")
Page<Mail_followers> searchDefault(@RequestBody Mail_followersSearchContext context);
}
......@@ -27,6 +27,62 @@ import cn.ibizlab.businesscentral.core.odoo_mail.domain.Mail_followers;
@Data
public class Mail_followersSearchContext extends QueryWrapperContext<Mail_followers> {
private Integer n_res_id_eq;//[相关文档编号]
public void setN_res_id_eq(Integer n_res_id_eq) {
this.n_res_id_eq = n_res_id_eq;
if(!ObjectUtils.isEmpty(this.n_res_id_eq)){
this.getSearchCond().eq("res_id", n_res_id_eq);
}
}
private String n_res_model_eq;//[相关的文档模型名称]
public void setN_res_model_eq(String n_res_model_eq) {
this.n_res_model_eq = n_res_model_eq;
if(!ObjectUtils.isEmpty(this.n_res_model_eq)){
this.getSearchCond().eq("res_model", n_res_model_eq);
}
}
private String n_partner_id_text_eq;//[相关的业务伙伴]
public void setN_partner_id_text_eq(String n_partner_id_text_eq) {
this.n_partner_id_text_eq = n_partner_id_text_eq;
if(!ObjectUtils.isEmpty(this.n_partner_id_text_eq)){
this.getSearchCond().eq("partner_id_text", n_partner_id_text_eq);
}
}
private String n_partner_id_text_like;//[相关的业务伙伴]
public void setN_partner_id_text_like(String n_partner_id_text_like) {
this.n_partner_id_text_like = n_partner_id_text_like;
if(!ObjectUtils.isEmpty(this.n_partner_id_text_like)){
this.getSearchCond().like("partner_id_text", n_partner_id_text_like);
}
}
private String n_channel_id_text_eq;//[监听器]
public void setN_channel_id_text_eq(String n_channel_id_text_eq) {
this.n_channel_id_text_eq = n_channel_id_text_eq;
if(!ObjectUtils.isEmpty(this.n_channel_id_text_eq)){
this.getSearchCond().eq("channel_id_text", n_channel_id_text_eq);
}
}
private String n_channel_id_text_like;//[监听器]
public void setN_channel_id_text_like(String n_channel_id_text_like) {
this.n_channel_id_text_like = n_channel_id_text_like;
if(!ObjectUtils.isEmpty(this.n_channel_id_text_like)){
this.getSearchCond().like("channel_id_text", n_channel_id_text_like);
}
}
private Long n_channel_id_eq;//[监听器]
public void setN_channel_id_eq(Long n_channel_id_eq) {
this.n_channel_id_eq = n_channel_id_eq;
if(!ObjectUtils.isEmpty(this.n_channel_id_eq)){
this.getSearchCond().eq("channel_id", n_channel_id_eq);
}
}
private Long n_partner_id_eq;//[相关的业务伙伴]
public void setN_partner_id_eq(Long n_partner_id_eq) {
this.n_partner_id_eq = n_partner_id_eq;
if(!ObjectUtils.isEmpty(this.n_partner_id_eq)){
this.getSearchCond().eq("partner_id", n_partner_id_eq);
}
}
/**
* 启用快速搜索
......
......@@ -27,12 +27,26 @@ import cn.ibizlab.businesscentral.core.odoo_mail.domain.Mail_message;
@Data
public class Mail_messageSearchContext extends QueryWrapperContext<Mail_message> {
private String n_model_eq;//[相关的文档模型]
public void setN_model_eq(String n_model_eq) {
this.n_model_eq = n_model_eq;
if(!ObjectUtils.isEmpty(this.n_model_eq)){
this.getSearchCond().eq("model", n_model_eq);
}
}
private String n_moderation_status_eq;//[管理状态]
public void setN_moderation_status_eq(String n_moderation_status_eq) {
this.n_moderation_status_eq = n_moderation_status_eq;
if(!ObjectUtils.isEmpty(this.n_moderation_status_eq)){
this.getSearchCond().eq("moderation_status", n_moderation_status_eq);
}
}
private Integer n_res_id_eq;//[相关文档编号]
public void setN_res_id_eq(Integer n_res_id_eq) {
this.n_res_id_eq = n_res_id_eq;
if(!ObjectUtils.isEmpty(this.n_res_id_eq)){
this.getSearchCond().eq("res_id", n_res_id_eq);
}
}
private String n_message_type_eq;//[类型]
public void setN_message_type_eq(String n_message_type_eq) {
......
......@@ -19,7 +19,7 @@ import com.alibaba.fastjson.JSONObject;
public interface Mail_followersMapper extends BaseMapper<Mail_followers>{
Page<Mail_followers> searchByRes(IPage page, @Param("srf") Mail_followersSearchContext context, @Param("ew") Wrapper<Mail_followers> wrapper) ;
Page<Mail_followers> searchDefault(IPage page, @Param("srf") Mail_followersSearchContext context, @Param("ew") Wrapper<Mail_followers> wrapper) ;
@Override
Mail_followers selectById(Serializable id);
@Override
......@@ -62,4 +62,8 @@ public interface Mail_followersMapper extends BaseMapper<Mail_followers>{
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<Mail_followers> selectByChannelId(@Param("id") Serializable id) ;
List<Mail_followers> selectByPartnerId(@Param("id") Serializable id) ;
}
......@@ -33,7 +33,15 @@ public interface IMail_followersService extends IService<Mail_followers>{
boolean remove(Long key) ;
void removeBatch(Collection<Long> idList) ;
Mail_followers get(Long key) ;
Page<Mail_followers> searchByRes(Mail_followersSearchContext context) ;
Mail_followers getDraft(Mail_followers et) ;
boolean checkKey(Mail_followers et) ;
boolean save(Mail_followers et) ;
void saveBatch(List<Mail_followers> list) ;
Page<Mail_followers> searchDefault(Mail_followersSearchContext context) ;
List<Mail_followers> selectByChannelId(Long id) ;
void removeByChannelId(Long id) ;
List<Mail_followers> selectByPartnerId(Long id) ;
void removeByPartnerId(Long id) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
......
......@@ -154,14 +154,77 @@ public class Mail_followersServiceImpl extends EBSServiceImpl<Mail_followersMapp
return et;
}
@Override
public Mail_followers getDraft(Mail_followers et) {
fillParentData(et);
return et;
}
@Override
public boolean checkKey(Mail_followers et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId())));
}
@Override
@Transactional
public boolean save(Mail_followers et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional
public boolean saveOrUpdate(Mail_followers et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
@Transactional
public boolean saveBatch(Collection<Mail_followers> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
@Transactional
public void saveBatch(List<Mail_followers> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
}
@Override
public List<Mail_followers> selectByChannelId(Long id) {
return baseMapper.selectByChannelId(id);
}
@Override
public void removeByChannelId(Long id) {
this.remove(new QueryWrapper<Mail_followers>().eq("channel_id",id));
}
@Override
public List<Mail_followers> selectByPartnerId(Long id) {
return baseMapper.selectByPartnerId(id);
}
@Override
public void removeByPartnerId(Long id) {
this.remove(new QueryWrapper<Mail_followers>().eq("partner_id",id));
}
/**
* 查询集合 ByRes
* 查询集合 数据集
*/
@Override
public Page<Mail_followers> searchByRes(Mail_followersSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Mail_followers> pages=baseMapper.searchByRes(context.getPages(),context,context.getSelectCond());
public Page<Mail_followers> searchDefault(Mail_followersSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Mail_followers> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<Mail_followers>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
......
......@@ -34,15 +34,6 @@
where company_id=#{id}
</select>
<!--数据集合[ByRes]-->
<select id="searchByRes" parameterType="cn.ibizlab.businesscentral.core.odoo_ir.filter.Ir_attachmentSearchContext" resultMap="Ir_attachmentResultMap">
select t1.* from (
<include refid="ByRes" />
)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]-->
<select id="searchDefault" parameterType="cn.ibizlab.businesscentral.core.odoo_ir.filter.Ir_attachmentSearchContext" resultMap="Ir_attachmentResultMap">
select t1.* from (
......@@ -52,12 +43,6 @@
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[ByRes]-->
<sql id="ByRes" databaseId="postgresql">
<![CDATA[ SELECT t1.ACCESS_TOKEN, t1.CHECKSUM, t1.COMPANY_ID, t1.FILE_SIZE, t1.ID, t1.KEY, t1.MIMETYPE, t1.NAME, t1.PUBLIC, t1.RES_FIELD, t1.RES_ID, t1.RES_MODEL, t1.STORE_FNAME, t1.TYPE, t1.URL FROM IR_ATTACHMENT t1
WHERE ( t1.RES_MODEL = #{srf.webcontext.res_model} AND t1.RES_ID = #{srf.webcontext.res_id} )
]]>
</sql>
<!--数据查询[Default]-->
<sql id="Default" databaseId="postgresql">
<![CDATA[ SELECT t1.ACCESS_TOKEN, t1.CHECKSUM, t1.COMPANY_ID, t1.FILE_SIZE, t1.ID, t1.KEY, t1.MIMETYPE, t1.NAME, t1.PUBLIC, t1.RES_FIELD, t1.RES_ID, t1.RES_MODEL, t1.STORE_FNAME, t1.TYPE, t1.URL FROM IR_ATTACHMENT t1
......
......@@ -4,6 +4,9 @@
<mapper namespace="cn.ibizlab.businesscentral.core.odoo_mail.mapper.Mail_followersMapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="Mail_followersResultMap" databaseId="postgresql">
<![CDATA[select t1.* from (SELECT t1.CHANNEL_ID, t21.NAME AS CHANNEL_ID_TEXT, t1.ID, t1.PARTNER_ID, t11.NAME AS PARTNER_ID_TEXT, t1.RES_ID, t1.RES_MODEL FROM MAIL_FOLLOWERS t1 LEFT JOIN RES_PARTNER t11 ON t1.PARTNER_ID = t11.ID LEFT JOIN MAIL_CHANNEL t21 ON t1.CHANNEL_ID = t21.ID ) t1 where id=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="Mail_followersResultMap" type="cn.ibizlab.businesscentral.core.odoo_mail.domain.Mail_followers" autoMapping="true">
......@@ -26,21 +29,37 @@
</resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_MAIL_FOLLOWERS__MAIL_CHANNEL__CHANNEL_ID] -->
<select id="selectByChannelId" resultMap="Mail_followersResultMap">
select t1.* from (
<include refid="Default" />
) t1
where channel_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_MAIL_FOLLOWERS__RES_PARTNER__PARTNER_ID] -->
<select id="selectByPartnerId" resultMap="Mail_followersResultMap">
select t1.* from (
<include refid="Default" />
) t1
where partner_id=#{id}
</select>
<!--数据集合[ByRes]-->
<select id="searchByRes" parameterType="cn.ibizlab.businesscentral.core.odoo_mail.filter.Mail_followersSearchContext" resultMap="Mail_followersResultMap">
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.businesscentral.core.odoo_mail.filter.Mail_followersSearchContext" resultMap="Mail_followersResultMap">
select t1.* from (
<include refid="ByRes" />
<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>
<!--数据查询[ByRes]-->
<sql id="ByRes" databaseId="postgresql">
<!--数据查询[Default]-->
<sql id="Default" databaseId="postgresql">
<![CDATA[ SELECT t1.CHANNEL_ID, t21.NAME AS CHANNEL_ID_TEXT, t1.ID, t1.PARTNER_ID, t11.NAME AS PARTNER_ID_TEXT, t1.RES_ID, t1.RES_MODEL FROM MAIL_FOLLOWERS t1 LEFT JOIN RES_PARTNER t11 ON t1.PARTNER_ID = t11.ID LEFT JOIN MAIL_CHANNEL t21 ON t1.CHANNEL_ID = t21.ID
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="postgresql">
<![CDATA[ SELECT t1.CHANNEL_ID, t21.NAME AS CHANNEL_ID_TEXT, t1.ID, t1.PARTNER_ID, t11.NAME AS PARTNER_ID_TEXT, t1.RES_ID, t1.RES_MODEL FROM MAIL_FOLLOWERS t1 LEFT JOIN RES_PARTNER t11 ON t1.PARTNER_ID = t11.ID LEFT JOIN MAIL_CHANNEL t21 ON t1.CHANNEL_ID = t21.ID
WHERE ( t1.RES_MODEL = #{srf.webcontext.res_model} AND t1.RES_ID = #{srf.webcontext.res_id} )
]]>
</sql>
</mapper>
......
......@@ -141,7 +141,7 @@
<!--数据查询[ByRes]-->
<sql id="ByRes" databaseId="postgresql">
<![CDATA[ SELECT t1.ADD_SIGN, t1.AUTHOR_ID, t11.NAME AS AUTHOR_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t31.NAME AS CREATE_UID_TEXT, t1.DATE, t1.EMAIL_FROM, t1.ID, t1.MAIL_ACTIVITY_TYPE_ID, t41.NAME AS MAIL_ACTIVITY_TYPE_ID_TEXT, t1.MAIL_SERVER_ID, t1.MESSAGE_ID, t1.MESSAGE_TYPE, t1.MODEL, t1.MODERATION_STATUS, t1.MODERATOR_ID, t61.NAME AS MODERATOR_ID_TEXT, t1.NO_AUTO_THREAD, t1.PARENT_ID, t1.RECORD_NAME, t1.REPLY_TO, t1.RES_ID, t1.SUBJECT, t1.SUBTYPE_ID, t91.NAME AS SUBTYPE_ID_TEXT, t1.WEBSITE_PUBLISHED, t1.WRITE_DATE, t1.WRITE_UID, t81.NAME AS WRITE_UID_TEXT FROM MAIL_MESSAGE t1 LEFT JOIN RES_PARTNER t11 ON t1.AUTHOR_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 MAIL_ACTIVITY_TYPE t41 ON t1.MAIL_ACTIVITY_TYPE_ID = t41.ID LEFT JOIN RES_USERS t51 ON t1.MODERATOR_ID = t51.ID LEFT JOIN RES_PARTNER t61 ON t51.PARTNER_ID = t61.ID LEFT JOIN RES_USERS t71 ON t1.WRITE_UID = t71.ID LEFT JOIN RES_PARTNER t81 ON t71.PARTNER_ID = t81.ID LEFT JOIN MAIL_MESSAGE_SUBTYPE t91 ON t1.SUBTYPE_ID = t91.ID
WHERE ( t1.MODEL = #{srf.datacontext.res_model} AND t1.RES_ID = #{srf.datacontext.res_id} )
WHERE ( t1.MODEL = #{srf.webcontext.res_model} AND t1.RES_ID = #{srf.webcontext.res_id} )
]]>
</sql>
<!--数据查询[Default]-->
......
......@@ -135,28 +135,6 @@ public class Ir_attachmentResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_attachment-searchByRes-all')")
@ApiOperation(value = "获取ByRes", tags = {"附件" } ,notes = "获取ByRes")
@RequestMapping(method= RequestMethod.GET , value="/ir_attachments/fetchbyres")
public ResponseEntity<List<Ir_attachmentDTO>> fetchByRes(Ir_attachmentSearchContext context) {
Page<Ir_attachment> domains = ir_attachmentService.searchByRes(context) ;
List<Ir_attachmentDTO> list = ir_attachmentMapping.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-Ir_attachment-searchByRes-all')")
@ApiOperation(value = "查询ByRes", tags = {"附件" } ,notes = "查询ByRes")
@RequestMapping(method= RequestMethod.POST , value="/ir_attachments/searchbyres")
public ResponseEntity<Page<Ir_attachmentDTO>> searchByRes(@RequestBody Ir_attachmentSearchContext context) {
Page<Ir_attachment> domains = ir_attachmentService.searchByRes(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(ir_attachmentMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_attachment-searchDefault-all')")
@ApiOperation(value = "获取数据集", tags = {"附件" } ,notes = "获取数据集")
@RequestMapping(method= RequestMethod.GET , value="/ir_attachments/fetchdefault")
......
......@@ -108,11 +108,38 @@ public class Mail_followersResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Mail_followers-searchByRes-all')")
@ApiOperation(value = "获取ByRes", tags = {"文档关注者" } ,notes = "获取ByRes")
@RequestMapping(method= RequestMethod.GET , value="/mail_followers/fetchbyres")
public ResponseEntity<List<Mail_followersDTO>> fetchByRes(Mail_followersSearchContext context) {
Page<Mail_followers> domains = mail_followersService.searchByRes(context) ;
@ApiOperation(value = "获取文档关注者草稿", tags = {"文档关注者" }, notes = "获取文档关注者草稿")
@RequestMapping(method = RequestMethod.GET, value = "/mail_followers/getdraft")
public ResponseEntity<Mail_followersDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(mail_followersMapping.toDto(mail_followersService.getDraft(new Mail_followers())));
}
@ApiOperation(value = "检查文档关注者", tags = {"文档关注者" }, notes = "检查文档关注者")
@RequestMapping(method = RequestMethod.POST, value = "/mail_followers/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody Mail_followersDTO mail_followersdto) {
return ResponseEntity.status(HttpStatus.OK).body(mail_followersService.checkKey(mail_followersMapping.toDomain(mail_followersdto)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Mail_followers-Save-all')")
@ApiOperation(value = "保存文档关注者", tags = {"文档关注者" }, notes = "保存文档关注者")
@RequestMapping(method = RequestMethod.POST, value = "/mail_followers/save")
public ResponseEntity<Boolean> save(@RequestBody Mail_followersDTO mail_followersdto) {
return ResponseEntity.status(HttpStatus.OK).body(mail_followersService.save(mail_followersMapping.toDomain(mail_followersdto)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Mail_followers-Save-all')")
@ApiOperation(value = "批量保存文档关注者", tags = {"文档关注者" }, notes = "批量保存文档关注者")
@RequestMapping(method = RequestMethod.POST, value = "/mail_followers/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<Mail_followersDTO> mail_followersdtos) {
mail_followersService.saveBatch(mail_followersMapping.toDomain(mail_followersdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Mail_followers-searchDefault-all')")
@ApiOperation(value = "获取数据集", tags = {"文档关注者" } ,notes = "获取数据集")
@RequestMapping(method= RequestMethod.GET , value="/mail_followers/fetchdefault")
public ResponseEntity<List<Mail_followersDTO>> fetchDefault(Mail_followersSearchContext context) {
Page<Mail_followers> domains = mail_followersService.searchDefault(context) ;
List<Mail_followersDTO> list = mail_followersMapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
.header("x-page", String.valueOf(context.getPageable().getPageNumber()))
......@@ -121,11 +148,11 @@ public class Mail_followersResource {
.body(list);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Mail_followers-searchByRes-all')")
@ApiOperation(value = "查询ByRes", tags = {"文档关注者" } ,notes = "查询ByRes")
@RequestMapping(method= RequestMethod.POST , value="/mail_followers/searchbyres")
public ResponseEntity<Page<Mail_followersDTO>> searchByRes(@RequestBody Mail_followersSearchContext context) {
Page<Mail_followers> domains = mail_followersService.searchByRes(context) ;
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Mail_followers-searchDefault-all')")
@ApiOperation(value = "查询数据集", tags = {"文档关注者" } ,notes = "查询数据集")
@RequestMapping(method= RequestMethod.POST , value="/mail_followers/searchdefault")
public ResponseEntity<Page<Mail_followersDTO>> searchDefault(@RequestBody Mail_followersSearchContext context) {
Page<Mail_followers> domains = mail_followersService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(mail_followersMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册