parent
55c9d339dc
commit
cd161e7e89
|
@ -0,0 +1,98 @@
|
|||
package com.hzya.frame.finance.conf.message.controller;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.hzya.frame.finance.conf.message.entity.FeConfMessageTemplateEntity;
|
||||
import com.hzya.frame.finance.conf.message.service.IFeConfMessageTemplateService;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/fe/conf/message")
|
||||
|
||||
public class MessageController {
|
||||
|
||||
@Autowired
|
||||
private IFeConfMessageTemplateService iFeConfMessageTemplateService;
|
||||
|
||||
/**
|
||||
* 分页查询模板
|
||||
*
|
||||
*/
|
||||
@RequestMapping(value = "/queryPaged", method = RequestMethod.POST)
|
||||
public JsonResultEntity query(@RequestBody FeConfMessageTemplateEntity feConfMessageTemplateEntity) {
|
||||
PageInfo pageInfo = iFeConfMessageTemplateService.queryMessagePaged(feConfMessageTemplateEntity);
|
||||
return new JsonResultEntity("查询成功",true,pageInfo);
|
||||
}
|
||||
/**
|
||||
* 查询消息模板
|
||||
*/
|
||||
@RequestMapping(value = "/queryAll", method = RequestMethod.POST)
|
||||
public JsonResultEntity queryAll(@RequestBody FeConfMessageTemplateEntity feConfMessageTemplateEntity) {
|
||||
List<FeConfMessageTemplateEntity> feConfMessageTemplateEntities = iFeConfMessageTemplateService.queryAll(feConfMessageTemplateEntity);
|
||||
return new JsonResultEntity("查询成功",true,feConfMessageTemplateEntities);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增消息模板
|
||||
*/
|
||||
@RequestMapping(value = "/add", method = RequestMethod.POST)
|
||||
public JsonResultEntity add(@RequestBody FeConfMessageTemplateEntity feConfMessageTemplateEntity) throws Exception {
|
||||
if(feConfMessageTemplateEntity == null){
|
||||
throw new Exception("参数不能为空");
|
||||
}
|
||||
if(feConfMessageTemplateEntity.getCode() == null){
|
||||
throw new Exception("编码不能为空");
|
||||
}
|
||||
if(feConfMessageTemplateEntity.getName() == null){
|
||||
throw new Exception("名称不能为空");
|
||||
}
|
||||
if(feConfMessageTemplateEntity.getTitle() == null){
|
||||
throw new Exception("标题不能为空");
|
||||
}
|
||||
FeConfMessageTemplateEntity save = iFeConfMessageTemplateService.save(feConfMessageTemplateEntity);
|
||||
return new JsonResultEntity("新增成功",true,save);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改消息模板
|
||||
*/
|
||||
@RequestMapping(value = "/update", method = RequestMethod.POST)
|
||||
public JsonResultEntity update(@RequestBody FeConfMessageTemplateEntity feConfMessageTemplateEntity) throws Exception {
|
||||
if(feConfMessageTemplateEntity == null){
|
||||
throw new Exception("参数不能为空");
|
||||
}
|
||||
if(feConfMessageTemplateEntity.getSts().equals("N")){
|
||||
throw new Exception("该记录已删除");
|
||||
}
|
||||
FeConfMessageTemplateEntity update = iFeConfMessageTemplateService.update(feConfMessageTemplateEntity);
|
||||
return new JsonResultEntity("修改成功",true,update);
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用停用状态
|
||||
*/
|
||||
@RequestMapping(value = "/updateStatus", method = RequestMethod.POST)
|
||||
public JsonResultEntity updateStatus(@RequestBody FeConfMessageTemplateEntity feConfMessageTemplateEntity) throws Exception {
|
||||
FeConfMessageTemplateEntity update = iFeConfMessageTemplateService.updateStatus(feConfMessageTemplateEntity);
|
||||
|
||||
return new JsonResultEntity("修改成功",true,update);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除消息模板
|
||||
*/
|
||||
@RequestMapping(value = "/delete", method = RequestMethod.POST)
|
||||
public JsonResultEntity delete(@RequestBody FeConfMessageTemplateEntity feConfMessageTemplateEntity) throws Exception {
|
||||
if(feConfMessageTemplateEntity.getSts().equals("N")){
|
||||
throw new Exception("该记录已删除");
|
||||
}
|
||||
iFeConfMessageTemplateService.logicRemove(feConfMessageTemplateEntity);
|
||||
return new JsonResultEntity("删除成功",true,null);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
package com.hzya.frame.finance.conf.message.dao;
|
||||
|
||||
import com.hzya.frame.finance.conf.message.entity.FeConfMessageTemplateEntity;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 消息模板表(fe_conf_message_template: table)表数据库访问层
|
||||
*
|
||||
* @author lixinyu
|
||||
* @since 2025-08-26 09:14:02
|
||||
*/
|
||||
public interface IFeConfMessageTemplateDao extends IBaseDao<FeConfMessageTemplateEntity, String> {
|
||||
|
||||
FeConfMessageTemplateEntity updateStatus(FeConfMessageTemplateEntity feConfMessageTemplateEntity);
|
||||
|
||||
|
||||
List<FeConfMessageTemplateEntity> page(FeConfMessageTemplateEntity feConfMessageTemplateEntity);
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
package com.hzya.frame.finance.conf.message.dao.impl;
|
||||
|
||||
import com.hzya.frame.finance.conf.message.entity.FeConfMessageTemplateEntity;
|
||||
import com.hzya.frame.finance.conf.message.dao.IFeConfMessageTemplateDao;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 消息模板表(FeConfMessageTemplate)表数据库访问层
|
||||
*
|
||||
* @author lixinyu
|
||||
* @since 2025-08-26 09:14:02
|
||||
*/
|
||||
@Repository
|
||||
public class FeConfMessageTemplateDaoImpl extends MybatisGenericDao<FeConfMessageTemplateEntity, String> implements IFeConfMessageTemplateDao{
|
||||
|
||||
@Override
|
||||
public FeConfMessageTemplateEntity updateStatus(FeConfMessageTemplateEntity feConfMessageTemplateEntity) {
|
||||
int update = this.update("com.hzya.frame.finance.conf.message.dao.impl.FeConfMessageTemplateDaoImpl.update_status", feConfMessageTemplateEntity);
|
||||
if(update > 0){
|
||||
return feConfMessageTemplateEntity;
|
||||
}else{
|
||||
throw new RuntimeException("更新状态失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FeConfMessageTemplateEntity> page(FeConfMessageTemplateEntity feConfMessageTemplateEntity) {
|
||||
List<FeConfMessageTemplateEntity> objects = (List<FeConfMessageTemplateEntity>) this.selectList("com.hzya.frame.finance.conf.message.dao.impl.FeConfMessageTemplateDaoImpl.page", feConfMessageTemplateEntity);
|
||||
return objects;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,207 @@
|
|||
package com.hzya.frame.finance.conf.message.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
/**
|
||||
* 消息模板表(FeConfMessageTemplate)实体类
|
||||
*
|
||||
* @author lixinyu
|
||||
* @since 2025-08-26 09:14:02
|
||||
*/
|
||||
public class FeConfMessageTemplateEntity extends BaseEntity {
|
||||
|
||||
/** 消息模板编码 */
|
||||
private String code;
|
||||
/** 消息模板名称 */
|
||||
private String name;
|
||||
/** 消息标题 */
|
||||
private String title;
|
||||
/** 启用状态 Y:启用 N:停用 */
|
||||
private String enablestate;
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
/** 自定义项1 */
|
||||
private String def1;
|
||||
/** 自定义项2 */
|
||||
private String def2;
|
||||
/** 自定义项3 */
|
||||
private String def3;
|
||||
/** 自定义项4 */
|
||||
private String def4;
|
||||
/** 自定义项5 */
|
||||
private String def5;
|
||||
/** 自定义项6 */
|
||||
private String def6;
|
||||
/** 自定义项7 */
|
||||
private String def7;
|
||||
/** 自定义项8 */
|
||||
private String def8;
|
||||
/** 自定义项9 */
|
||||
private String def9;
|
||||
/** 自定义项10 */
|
||||
private String def10;
|
||||
/** 创建人 */
|
||||
private String createUser;
|
||||
/** 修改人 */
|
||||
private String modifyUser;
|
||||
/** 业务类型
|
||||
*/
|
||||
private String mdmId;
|
||||
/** 业务类型名称 */
|
||||
private String mdmName;
|
||||
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getEnablestate() {
|
||||
return enablestate;
|
||||
}
|
||||
|
||||
public void setEnablestate(String enablestate) {
|
||||
this.enablestate = enablestate;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getDef1() {
|
||||
return def1;
|
||||
}
|
||||
|
||||
public void setDef1(String def1) {
|
||||
this.def1 = def1;
|
||||
}
|
||||
|
||||
public String getDef2() {
|
||||
return def2;
|
||||
}
|
||||
|
||||
public void setDef2(String def2) {
|
||||
this.def2 = def2;
|
||||
}
|
||||
|
||||
public String getDef3() {
|
||||
return def3;
|
||||
}
|
||||
|
||||
public void setDef3(String def3) {
|
||||
this.def3 = def3;
|
||||
}
|
||||
|
||||
public String getDef4() {
|
||||
return def4;
|
||||
}
|
||||
|
||||
public void setDef4(String def4) {
|
||||
this.def4 = def4;
|
||||
}
|
||||
|
||||
public String getDef5() {
|
||||
return def5;
|
||||
}
|
||||
|
||||
public void setDef5(String def5) {
|
||||
this.def5 = def5;
|
||||
}
|
||||
|
||||
public String getDef6() {
|
||||
return def6;
|
||||
}
|
||||
|
||||
public void setDef6(String def6) {
|
||||
this.def6 = def6;
|
||||
}
|
||||
|
||||
public String getDef7() {
|
||||
return def7;
|
||||
}
|
||||
|
||||
public void setDef7(String def7) {
|
||||
this.def7 = def7;
|
||||
}
|
||||
|
||||
public String getDef8() {
|
||||
return def8;
|
||||
}
|
||||
|
||||
public void setDef8(String def8) {
|
||||
this.def8 = def8;
|
||||
}
|
||||
|
||||
public String getDef9() {
|
||||
return def9;
|
||||
}
|
||||
|
||||
public void setDef9(String def9) {
|
||||
this.def9 = def9;
|
||||
}
|
||||
|
||||
public String getDef10() {
|
||||
return def10;
|
||||
}
|
||||
|
||||
public void setDef10(String def10) {
|
||||
this.def10 = def10;
|
||||
}
|
||||
|
||||
public String getCreateUser() {
|
||||
return createUser;
|
||||
}
|
||||
|
||||
public void setCreateUser(String createUser) {
|
||||
this.createUser = createUser;
|
||||
}
|
||||
|
||||
public String getModifyUser() {
|
||||
return modifyUser;
|
||||
}
|
||||
|
||||
public void setModifyUser(String modifyUser) {
|
||||
this.modifyUser = modifyUser;
|
||||
}
|
||||
|
||||
public String getMdmId() {
|
||||
return mdmId;
|
||||
}
|
||||
|
||||
public void setMdmId(String mdmId) {
|
||||
this.mdmId = mdmId;
|
||||
}
|
||||
|
||||
public String getMdmName() {
|
||||
return mdmName;
|
||||
}
|
||||
|
||||
public void setMdmName(String mdmName) {
|
||||
this.mdmName = mdmName;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,393 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzya.frame.finance.conf.message.dao.impl.FeConfMessageTemplateDaoImpl">
|
||||
|
||||
<resultMap id="get-FeConfMessageTemplateEntity-result" type="com.hzya.frame.finance.conf.message.entity.FeConfMessageTemplateEntity" >
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="code" column="code" jdbcType="VARCHAR"/>
|
||||
<result property="name" column="name" jdbcType="VARCHAR"/>
|
||||
<result property="title" column="title" jdbcType="VARCHAR"/>
|
||||
<result property="enablestate" column="enablestate" jdbcType="VARCHAR"/>
|
||||
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
||||
<result property="def1" column="def1" jdbcType="VARCHAR"/>
|
||||
<result property="def2" column="def2" jdbcType="VARCHAR"/>
|
||||
<result property="def3" column="def3" jdbcType="VARCHAR"/>
|
||||
<result property="def4" column="def4" jdbcType="VARCHAR"/>
|
||||
<result property="def5" column="def5" jdbcType="VARCHAR"/>
|
||||
<result property="def6" column="def6" jdbcType="VARCHAR"/>
|
||||
<result property="def7" column="def7" jdbcType="VARCHAR"/>
|
||||
<result property="def8" column="def8" jdbcType="VARCHAR"/>
|
||||
<result property="def9" column="def9" jdbcType="VARCHAR"/>
|
||||
<result property="def10" column="def10" jdbcType="VARCHAR"/>
|
||||
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="createUser" column="create_user" jdbcType="VARCHAR"/>
|
||||
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="modifyUser" column="modify_user" jdbcType="VARCHAR"/>
|
||||
<result property="sts" column="sts" jdbcType="VARCHAR"/>
|
||||
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
|
||||
<result property="mdmName" column="mdm_name" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
<!-- 查询的字段-->
|
||||
<sql id = "FeConfMessageTemplateEntity_Base_Column_List">
|
||||
id
|
||||
,code
|
||||
,name
|
||||
,title
|
||||
,enablestate
|
||||
,remark
|
||||
,def1
|
||||
,def2
|
||||
,def3
|
||||
,def4
|
||||
,def5
|
||||
,def6
|
||||
,def7
|
||||
,def8
|
||||
,def9
|
||||
,def10
|
||||
,create_time
|
||||
,create_user
|
||||
,modify_time
|
||||
,modify_user
|
||||
,sts
|
||||
,mdm_id
|
||||
,mdm_name
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-FeConfMessageTemplateEntity-result" parameterType = "com.hzya.frame.finance.conf.message.entity.FeConfMessageTemplateEntity">
|
||||
select
|
||||
<include refid="FeConfMessageTemplateEntity_Base_Column_List" />
|
||||
from fe_conf_message_template fe_conf_message_template
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null"> and id = #{id} </if>
|
||||
<if test="code != null and code != ''"> and code = #{code} </if>
|
||||
<if test="name != null and name != ''"> and name = #{name}</if>
|
||||
<if test="title != null and title != ''"> and title = #{title} </if>
|
||||
<if test="enablestate != null and enablestate != ''"> and enablestate = #{enablestate} </if>
|
||||
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
|
||||
<if test="def1 != null and def1 != ''"> and def1 = #{def1} </if>
|
||||
<if test="def2 != null and def2 != ''"> and def2 = #{def2} </if>
|
||||
<if test="def3 != null and def3 != ''"> and def3 = #{def3} </if>
|
||||
<if test="def4 != null and def4 != ''"> and def4 = #{def4} </if>
|
||||
<if test="def5 != null and def5 != ''"> and def5 = #{def5} </if>
|
||||
<if test="def6 != null and def6 != ''"> and def6 = #{def6} </if>
|
||||
<if test="def7 != null and def7 != ''"> and def7 = #{def7} </if>
|
||||
<if test="def8 != null and def8 != ''"> and def8 = #{def8} </if>
|
||||
<if test="def9 != null and def9 != ''"> and def9 = #{def9} </if>
|
||||
<if test="def10 != null and def10 != ''"> and def10 = #{def10} </if>
|
||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
||||
<if test="createUser != null and createUser != ''"> and create_user = #{createUser} </if>
|
||||
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
||||
<if test="modifyUser != null and modifyUser != ''"> and modify_user = #{modifyUser} </if>
|
||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
|
||||
<if test="mdmName != null and mdmName != ''"> and mdm_name = #{mdmName} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="page" resultMap="get-FeConfMessageTemplateEntity-result" parameterType = "com.hzya.frame.finance.conf.message.entity.FeConfMessageTemplateEntity">
|
||||
select
|
||||
<include refid="FeConfMessageTemplateEntity_Base_Column_List" />
|
||||
from fe_conf_message_template
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null"> and id like concat('%',#{id},'%') </if>
|
||||
<if test="code != null and code != ''"> and code like concat('%',#{code},'%') </if>
|
||||
<if test="name != null and name != ''"> and name like concat('%',#{name},'%') </if>
|
||||
<if test="title != null and title != ''"> and title like concat('%',#{title},'%') </if>
|
||||
<if test="enablestate != null and enablestate != ''"> and enablestate like concat('%',#{enablestate},'%') </if>
|
||||
<if test="remark != null and remark != ''"> and remark like concat('%',#{remark},'%') </if>
|
||||
<if test="def1 != null and def1 != ''"> and def1 like concat('%',#{def1},'%') </if>
|
||||
<if test="def2 != null and def2 != ''"> and def2 like concat('%',#{def2},'%') </if>
|
||||
<if test="def3 != null and def3 != ''"> and def3 like concat('%',#{def3},'%') </if>
|
||||
<if test="def4 != null and def4 != ''"> and def4 like concat('%',#{def4},'%') </if>
|
||||
<if test="def5 != null and def5 != ''"> and def5 like concat('%',#{def5},'%') </if>
|
||||
<if test="def6 != null and def6 != ''"> and def6 like concat('%',#{def6},'%') </if>
|
||||
<if test="def7 != null and def7 != ''"> and def7 like concat('%',#{def7},'%') </if>
|
||||
<if test="def8 != null and def8 != ''"> and def8 like concat('%',#{def8},'%') </if>
|
||||
<if test="def9 != null and def9 != ''"> and def9 like concat('%',#{def9},'%') </if>
|
||||
<if test="def10 != null and def10 != ''"> and def10 like concat('%',#{def10},'%') </if>
|
||||
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
|
||||
<if test="createUser != null and createUser != ''"> and create_user like concat('%',#{createUser},'%') </if>
|
||||
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
|
||||
<if test="modifyUser != null and modifyUser != ''"> and modify_user like concat('%',#{modifyUser},'%') </if>
|
||||
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if>
|
||||
<if test="mdmId != null and mdmId != ''"> and mdm_id like concat('%',#{mdmId},'%') </if>
|
||||
<if test="mdmName != null and mdmName != ''"> and mdm_name like concat('%',#{mdmName},'%') </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
<!-- 修改启用停用状态 -->
|
||||
<update id="update_status" parameterType = "com.hzya.frame.finance.conf.message.entity.FeConfMessageTemplateEntity">
|
||||
update fe_conf_message_template
|
||||
set enablestate = #{enablestate}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 查询符合条件的数量 -->
|
||||
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.finance.conf.message.entity.FeConfMessageTemplateEntity">
|
||||
select count(1) from fe_conf_message_template
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null"> and id = #{id} </if>
|
||||
<if test="code != null and code != ''"> and code = #{code} </if>
|
||||
<if test="name != null and name != ''"> and name = #{name} </if>
|
||||
<if test="title != null and title != ''"> and title = #{title} </if>
|
||||
<if test="enablestate != null and enablestate != ''"> and enablestate = #{enablestate} </if>
|
||||
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
|
||||
<if test="def1 != null and def1 != ''"> and def1 = #{def1} </if>
|
||||
<if test="def2 != null and def2 != ''"> and def2 = #{def2} </if>
|
||||
<if test="def3 != null and def3 != ''"> and def3 = #{def3} </if>
|
||||
<if test="def4 != null and def4 != ''"> and def4 = #{def4} </if>
|
||||
<if test="def5 != null and def5 != ''"> and def5 = #{def5} </if>
|
||||
<if test="def6 != null and def6 != ''"> and def6 = #{def6} </if>
|
||||
<if test="def7 != null and def7 != ''"> and def7 = #{def7} </if>
|
||||
<if test="def8 != null and def8 != ''"> and def8 = #{def8} </if>
|
||||
<if test="def9 != null and def9 != ''"> and def9 = #{def9} </if>
|
||||
<if test="def10 != null and def10 != ''"> and def10 = #{def10} </if>
|
||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
||||
<if test="createUser != null and createUser != ''"> and create_user = #{createUser} </if>
|
||||
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
||||
<if test="modifyUser != null and modifyUser != ''"> and modify_user = #{modifyUser} </if>
|
||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
|
||||
<if test="mdmName != null and mdmName != ''"> and mdm_name = #{mdmName} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="entity_list_like" resultMap="get-FeConfMessageTemplateEntity-result" parameterType = "com.hzya.frame.finance.conf.message.entity.FeConfMessageTemplateEntity">
|
||||
select
|
||||
<include refid="FeConfMessageTemplateEntity_Base_Column_List" />
|
||||
from fe_conf_message_template
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null"> and id like concat('%',#{id},'%') </if>
|
||||
<if test="code != null and code != ''"> and code like concat('%',#{code},'%') </if>
|
||||
<if test="name != null and name != ''"> and name like concat('%',#{name},'%') </if>
|
||||
<if test="title != null and title != ''"> and title like concat('%',#{title},'%') </if>
|
||||
<if test="enablestate != null and enablestate != ''"> and enablestate like concat('%',#{enablestate},'%') </if>
|
||||
<if test="remark != null and remark != ''"> and remark like concat('%',#{remark},'%') </if>
|
||||
<if test="def1 != null and def1 != ''"> and def1 like concat('%',#{def1},'%') </if>
|
||||
<if test="def2 != null and def2 != ''"> and def2 like concat('%',#{def2},'%') </if>
|
||||
<if test="def3 != null and def3 != ''"> and def3 like concat('%',#{def3},'%') </if>
|
||||
<if test="def4 != null and def4 != ''"> and def4 like concat('%',#{def4},'%') </if>
|
||||
<if test="def5 != null and def5 != ''"> and def5 like concat('%',#{def5},'%') </if>
|
||||
<if test="def6 != null and def6 != ''"> and def6 like concat('%',#{def6},'%') </if>
|
||||
<if test="def7 != null and def7 != ''"> and def7 like concat('%',#{def7},'%') </if>
|
||||
<if test="def8 != null and def8 != ''"> and def8 like concat('%',#{def8},'%') </if>
|
||||
<if test="def9 != null and def9 != ''"> and def9 like concat('%',#{def9},'%') </if>
|
||||
<if test="def10 != null and def10 != ''"> and def10 like concat('%',#{def10},'%') </if>
|
||||
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
|
||||
<if test="createUser != null and createUser != ''"> and create_user like concat('%',#{createUser},'%') </if>
|
||||
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
|
||||
<if test="modifyUser != null and modifyUser != ''"> and modify_user like concat('%',#{modifyUser},'%') </if>
|
||||
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if>
|
||||
<if test="mdmId != null and mdmId != ''"> and mdm_id like concat('%',#{mdmId},'%') </if>
|
||||
<if test="mdmName != null and mdmName != ''"> and mdm_name like concat('%',#{mdmName},'%') </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 查询列表 字段采用or格式 -->
|
||||
<select id="FeConfMessageTemplateentity_list_or" resultMap="get-FeConfMessageTemplateEntity-result" parameterType = "com.hzya.frame.finance.conf.message.entity.FeConfMessageTemplateEntity">
|
||||
select
|
||||
<include refid="FeConfMessageTemplateEntity_Base_Column_List" />
|
||||
from fe_conf_message_template
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null"> or id = #{id} </if>
|
||||
<if test="code != null and code != ''"> or code = #{code} </if>
|
||||
<if test="name != null and name != ''"> or name = #{name} </if>
|
||||
<if test="title != null and title != ''"> or title = #{title} </if>
|
||||
<if test="enablestate != null and enablestate != ''"> or enablestate = #{enablestate} </if>
|
||||
<if test="remark != null and remark != ''"> or remark = #{remark} </if>
|
||||
<if test="def1 != null and def1 != ''"> or def1 = #{def1} </if>
|
||||
<if test="def2 != null and def2 != ''"> or def2 = #{def2} </if>
|
||||
<if test="def3 != null and def3 != ''"> or def3 = #{def3} </if>
|
||||
<if test="def4 != null and def4 != ''"> or def4 = #{def4} </if>
|
||||
<if test="def5 != null and def5 != ''"> or def5 = #{def5} </if>
|
||||
<if test="def6 != null and def6 != ''"> or def6 = #{def6} </if>
|
||||
<if test="def7 != null and def7 != ''"> or def7 = #{def7} </if>
|
||||
<if test="def8 != null and def8 != ''"> or def8 = #{def8} </if>
|
||||
<if test="def9 != null and def9 != ''"> or def9 = #{def9} </if>
|
||||
<if test="def10 != null and def10 != ''"> or def10 = #{def10} </if>
|
||||
<if test="create_time != null"> or create_time = #{create_time} </if>
|
||||
<if test="createUser != null and createUser != ''"> or create_user = #{createUser} </if>
|
||||
<if test="modify_time != null"> or modify_time = #{modify_time} </if>
|
||||
<if test="modifyUser != null and modifyUser != ''"> or modify_user = #{modifyUser} </if>
|
||||
<if test="sts != null and sts != ''"> or sts = #{sts} </if>
|
||||
<if test="mdmId != null and mdmId != ''"> or mdm_id = #{mdmId} </if>
|
||||
<if test="mdmName != null and mdmName != ''"> or mdm_name = #{mdmName} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
|
||||
</select>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="entity_insert" parameterType = "com.hzya.frame.finance.conf.message.entity.FeConfMessageTemplateEntity" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into fe_conf_message_template(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null"> id , </if>
|
||||
<if test="code != null and code != ''"> code , </if>
|
||||
<if test="name != null and name != ''"> name , </if>
|
||||
<if test="title != null and title != ''"> title , </if>
|
||||
<if test="enablestate != null and enablestate != ''"> enablestate , </if>
|
||||
<if test="remark != null and remark != ''"> remark , </if>
|
||||
<if test="def1 != null and def1 != ''"> def1 , </if>
|
||||
<if test="def2 != null and def2 != ''"> def2 , </if>
|
||||
<if test="def3 != null and def3 != ''"> def3 , </if>
|
||||
<if test="def4 != null and def4 != ''"> def4 , </if>
|
||||
<if test="def5 != null and def5 != ''"> def5 , </if>
|
||||
<if test="def6 != null and def6 != ''"> def6 , </if>
|
||||
<if test="def7 != null and def7 != ''"> def7 , </if>
|
||||
<if test="def8 != null and def8 != ''"> def8 , </if>
|
||||
<if test="def9 != null and def9 != ''"> def9 , </if>
|
||||
<if test="def10 != null and def10 != ''"> def10 , </if>
|
||||
<if test="create_time != null"> create_time , </if>
|
||||
<if test="createUser != null and createUser != ''"> create_user , </if>
|
||||
<if test="modify_time != null"> modify_time , </if>
|
||||
<if test="modifyUser != null and modifyUser != ''"> modify_user , </if>
|
||||
<if test="sts != null and sts != ''"> sts , </if>
|
||||
<if test="mdmId != null and mdmId != ''"> mdm_id , </if>
|
||||
<if test="mdmName != null and mdmName != ''"> mdm_name , </if>
|
||||
<if test="sts == null ">sts,</if>
|
||||
</trim>
|
||||
)values(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null"> #{id} ,</if>
|
||||
<if test="code != null and code != ''"> #{code} ,</if>
|
||||
<if test="name != null and name != ''"> #{name} ,</if>
|
||||
<if test="title != null and title != ''"> #{title} ,</if>
|
||||
<if test="enablestate != null and enablestate != ''"> #{enablestate} ,</if>
|
||||
<if test="remark != null and remark != ''"> #{remark} ,</if>
|
||||
<if test="def1 != null and def1 != ''"> #{def1} ,</if>
|
||||
<if test="def2 != null and def2 != ''"> #{def2} ,</if>
|
||||
<if test="def3 != null and def3 != ''"> #{def3} ,</if>
|
||||
<if test="def4 != null and def4 != ''"> #{def4} ,</if>
|
||||
<if test="def5 != null and def5 != ''"> #{def5} ,</if>
|
||||
<if test="def6 != null and def6 != ''"> #{def6} ,</if>
|
||||
<if test="def7 != null and def7 != ''"> #{def7} ,</if>
|
||||
<if test="def8 != null and def8 != ''"> #{def8} ,</if>
|
||||
<if test="def9 != null and def9 != ''"> #{def9} ,</if>
|
||||
<if test="def10 != null and def10 != ''"> #{def10} ,</if>
|
||||
<if test="create_time != null"> #{create_time} ,</if>
|
||||
<if test="createUser != null and createUser != ''"> #{createUser} ,</if>
|
||||
<if test="modify_time != null"> #{modify_time} ,</if>
|
||||
<if test="modifyUser != null and modifyUser != ''"> #{modifyUser} ,</if>
|
||||
<if test="sts != null and sts != ''"> #{sts} ,</if>
|
||||
<if test="mdmId != null and mdmId != ''"> #{mdmId} ,</if>
|
||||
<if test="mdmName != null and mdmName != ''"> #{mdmName} ,</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into fe_conf_message_template(code, name, title, enablestate, remark, def1, def2, def3, def4, def5, def6, def7, def8, def9, def10, create_time, create_user, modify_time, modify_user, sts, mdm_id, mdm_name, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.code},#{entity.name},#{entity.title},#{entity.enablestate},#{entity.remark},#{entity.def1},#{entity.def2},#{entity.def3},#{entity.def4},#{entity.def5},#{entity.def6},#{entity.def7},#{entity.def8},#{entity.def9},#{entity.def10},#{entity.create_time},#{entity.createUser},#{entity.modify_time},#{entity.modifyUser},#{entity.sts},#{entity.mdmId},#{entity.mdmName}, 'Y')
|
||||
</foreach>
|
||||
</insert>
|
||||
<!-- 批量新增或者修改-->
|
||||
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into fe_conf_message_template(code, name, title, enablestate, remark, def1, def2, def3, def4, def5, def6, def7, def8, def9, def10, create_time, create_user, modify_time, modify_user, sts, mdm_id, mdm_name)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.code},#{entity.name},#{entity.title},#{entity.enablestate},#{entity.remark},#{entity.def1},#{entity.def2},#{entity.def3},#{entity.def4},#{entity.def5},#{entity.def6},#{entity.def7},#{entity.def8},#{entity.def9},#{entity.def10},#{entity.create_time},#{entity.createUser},#{entity.modify_time},#{entity.modifyUser},#{entity.sts},#{entity.mdmId},#{entity.mdmName})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
code = values(code),
|
||||
name = values(name),
|
||||
title = values(title),
|
||||
enablestate = values(enablestate),
|
||||
remark = values(remark),
|
||||
def1 = values(def1),
|
||||
def2 = values(def2),
|
||||
def3 = values(def3),
|
||||
def4 = values(def4),
|
||||
def5 = values(def5),
|
||||
def6 = values(def6),
|
||||
def7 = values(def7),
|
||||
def8 = values(def8),
|
||||
def9 = values(def9),
|
||||
def10 = values(def10),
|
||||
create_time = values(create_time),
|
||||
create_user = values(create_user),
|
||||
modify_time = values(modify_time),
|
||||
modify_user = values(modify_user),
|
||||
sts = values(sts),
|
||||
mdm_id = values(mdm_id),
|
||||
mdm_name = values(mdm_name)</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType = "com.hzya.frame.finance.conf.message.entity.FeConfMessageTemplateEntity" >
|
||||
update fe_conf_message_template set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="code != null and code != ''"> code = #{code},</if>
|
||||
<if test="name != null and name != ''"> name = #{name},</if>
|
||||
<if test="title != null and title != ''"> title = #{title},</if>
|
||||
<if test="enablestate != null and enablestate != ''"> enablestate = #{enablestate},</if>
|
||||
<if test="remark != null and remark != ''"> remark = #{remark},</if>
|
||||
<if test="def1 != null and def1 != ''"> def1 = #{def1},</if>
|
||||
<if test="def2 != null and def2 != ''"> def2 = #{def2},</if>
|
||||
<if test="def3 != null and def3 != ''"> def3 = #{def3},</if>
|
||||
<if test="def4 != null and def4 != ''"> def4 = #{def4},</if>
|
||||
<if test="def5 != null and def5 != ''"> def5 = #{def5},</if>
|
||||
<if test="def6 != null and def6 != ''"> def6 = #{def6},</if>
|
||||
<if test="def7 != null and def7 != ''"> def7 = #{def7},</if>
|
||||
<if test="def8 != null and def8 != ''"> def8 = #{def8},</if>
|
||||
<if test="def9 != null and def9 != ''"> def9 = #{def9},</if>
|
||||
<if test="def10 != null and def10 != ''"> def10 = #{def10},</if>
|
||||
<if test="create_time != null"> create_time = #{create_time},</if>
|
||||
<if test="createUser != null and createUser != ''"> create_user = #{createUser},</if>
|
||||
<if test="modify_time != null"> modify_time = #{modify_time},</if>
|
||||
<if test="modifyUser != null and modifyUser != ''"> modify_user = #{modifyUser},</if>
|
||||
<if test="sts != null and sts != ''"> sts = #{sts},</if>
|
||||
<if test="mdmId != null and mdmId != ''"> mdm_id = #{mdmId},</if>
|
||||
<if test="mdmName != null and mdmName != ''"> mdm_name = #{mdmName},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete" parameterType = "com.hzya.frame.finance.conf.message.entity.FeConfMessageTemplateEntity" >
|
||||
update fe_conf_message_template set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 多条件逻辑删除 -->
|
||||
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.finance.conf.message.entity.FeConfMessageTemplateEntity" >
|
||||
update fe_conf_message_template set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null"> and id = #{id} </if>
|
||||
<if test="code != null and code != ''"> and code = #{code} </if>
|
||||
<if test="name != null and name != ''"> and name = #{name} </if>
|
||||
<if test="title != null and title != ''"> and title = #{title} </if>
|
||||
<if test="enablestate != null and enablestate != ''"> and enablestate = #{enablestate} </if>
|
||||
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
|
||||
<if test="def1 != null and def1 != ''"> and def1 = #{def1} </if>
|
||||
<if test="def2 != null and def2 != ''"> and def2 = #{def2} </if>
|
||||
<if test="def3 != null and def3 != ''"> and def3 = #{def3} </if>
|
||||
<if test="def4 != null and def4 != ''"> and def4 = #{def4} </if>
|
||||
<if test="def5 != null and def5 != ''"> and def5 = #{def5} </if>
|
||||
<if test="def6 != null and def6 != ''"> and def6 = #{def6} </if>
|
||||
<if test="def7 != null and def7 != ''"> and def7 = #{def7} </if>
|
||||
<if test="def8 != null and def8 != ''"> and def8 = #{def8} </if>
|
||||
<if test="def9 != null and def9 != ''"> and def9 = #{def9} </if>
|
||||
<if test="def10 != null and def10 != ''"> and def10 = #{def10} </if>
|
||||
<if test="createUser != null and createUser != ''"> and create_user = #{createUser} </if>
|
||||
<if test="modifyUser != null and modifyUser != ''"> and modify_user = #{modifyUser} </if>
|
||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
|
||||
<if test="mdmName != null and mdmName != ''"> and mdm_name = #{mdmName} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</update>
|
||||
<!--通过主键删除-->
|
||||
<delete id="entity_delete">
|
||||
delete from fe_conf_message_template where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.hzya.frame.finance.conf.message.service;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.hzya.frame.finance.conf.message.entity.FeConfMessageTemplateEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 消息模板表(FeConfMessageTemplate)表服务接口
|
||||
*
|
||||
* @author lixinyu
|
||||
* @since 2025-08-26 09:14:02
|
||||
*/
|
||||
public interface IFeConfMessageTemplateService extends IBaseService<FeConfMessageTemplateEntity, String>{
|
||||
List<FeConfMessageTemplateEntity> queryAll(FeConfMessageTemplateEntity feConfMessageTemplateEntity);
|
||||
|
||||
FeConfMessageTemplateEntity updateStatus(FeConfMessageTemplateEntity feConfMessageTemplateEntity) throws Exception;
|
||||
|
||||
void delete(FeConfMessageTemplateEntity feConfMessageTemplateEntity) throws Exception;
|
||||
|
||||
PageInfo queryMessagePaged(FeConfMessageTemplateEntity feConfMessageTemplateEntity);
|
||||
}
|
|
@ -0,0 +1,94 @@
|
|||
package com.hzya.frame.finance.conf.message.service.impl;
|
||||
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.hzya.frame.finance.conf.message.entity.FeConfMessageTemplateEntity;
|
||||
import com.hzya.frame.finance.conf.message.dao.IFeConfMessageTemplateDao;
|
||||
import com.hzya.frame.finance.conf.message.service.IFeConfMessageTemplateService;
|
||||
import com.hzya.frame.page.PageAttribute;
|
||||
import org.junit.Assert;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 消息模板表(FeConfMessageTemplate)表服务实现类
|
||||
*
|
||||
* @author lixinyu
|
||||
* @since 2025-08-26 09:14:02
|
||||
*/
|
||||
@Service
|
||||
public class FeConfMessageTemplateServiceImpl extends BaseService<FeConfMessageTemplateEntity, String> implements IFeConfMessageTemplateService {
|
||||
|
||||
private IFeConfMessageTemplateDao feConfMessageTemplateDao;
|
||||
|
||||
@Autowired
|
||||
public void setFeConfMessageTemplateDao(IFeConfMessageTemplateDao dao) {
|
||||
this.feConfMessageTemplateDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询全部消息模板信息
|
||||
* @param feConfMessageTemplateEntity
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<FeConfMessageTemplateEntity> queryAll(FeConfMessageTemplateEntity feConfMessageTemplateEntity) {
|
||||
List<FeConfMessageTemplateEntity> query = feConfMessageTemplateDao.queryByLike(feConfMessageTemplateEntity);
|
||||
return query;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改消息模板
|
||||
* @param feConfMessageTemplateEntity
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public FeConfMessageTemplateEntity updateStatus(FeConfMessageTemplateEntity feConfMessageTemplateEntity) throws Exception {
|
||||
if(feConfMessageTemplateEntity == null){
|
||||
throw new Exception("参数不能为空");
|
||||
}
|
||||
if(feConfMessageTemplateEntity.getId() == null){
|
||||
throw new Exception("id不能为空");
|
||||
}
|
||||
if(feConfMessageTemplateEntity.getSts().equals("N")){
|
||||
throw new Exception("该记录已删除,无法修改");
|
||||
}
|
||||
FeConfMessageTemplateEntity update = feConfMessageTemplateDao.updateStatus(feConfMessageTemplateEntity);
|
||||
List<FeConfMessageTemplateEntity> query = feConfMessageTemplateDao.query(update);
|
||||
return query.get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除消息模板
|
||||
* @param feConfMessageTemplateEntity
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public void delete(FeConfMessageTemplateEntity feConfMessageTemplateEntity) throws Exception {
|
||||
if(feConfMessageTemplateEntity == null){
|
||||
throw new Exception("参数不能为空");
|
||||
}
|
||||
if(feConfMessageTemplateEntity.getId() == null){
|
||||
throw new Exception("id不能为空");
|
||||
}
|
||||
feConfMessageTemplateDao.logicRemove(feConfMessageTemplateEntity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询消息模板
|
||||
* @param feConfMessageTemplateEntity
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public PageInfo queryMessagePaged(FeConfMessageTemplateEntity feConfMessageTemplateEntity) {
|
||||
PageHelper.startPage(feConfMessageTemplateEntity.getPageNum(), feConfMessageTemplateEntity.getPageSize());
|
||||
List<FeConfMessageTemplateEntity> query = feConfMessageTemplateDao.page(feConfMessageTemplateEntity);
|
||||
return new PageInfo(query);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,80 @@
|
|||
package com.hzya.frame.finance.conf.notificationRules.controller;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.hzya.frame.finance.conf.message.entity.FeConfMessageTemplateEntity;
|
||||
import com.hzya.frame.finance.conf.notificationRules.dao.impl.FeConfNotificationRulesDaoImpl;
|
||||
import com.hzya.frame.finance.conf.notificationRules.entity.FeConfNotificationRulesEntity;
|
||||
import com.hzya.frame.finance.conf.notificationRules.service.IFeConfNotificationRulesService;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/fe/conf/notificationRules")
|
||||
public class NotificationRulesController {
|
||||
@Autowired
|
||||
private IFeConfNotificationRulesService iFeConfNotificationRulesService;
|
||||
|
||||
/**
|
||||
* 分页查询通知规则
|
||||
*/
|
||||
@PostMapping("/queryPaged")
|
||||
public JsonResultEntity queryPaged(@RequestBody FeConfNotificationRulesEntity feConfNotificationRulesEntity){
|
||||
PageInfo pageInfo = iFeConfNotificationRulesService.queryNotificationRulesPaged(feConfNotificationRulesEntity);
|
||||
return new JsonResultEntity("查询成功",true,pageInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 条件查询通知规则
|
||||
*/
|
||||
@PostMapping("/queryAll")
|
||||
public JsonResultEntity queryAll(@RequestBody FeConfNotificationRulesEntity feConfNotificationRulesEntity){
|
||||
List<FeConfNotificationRulesEntity> list = iFeConfNotificationRulesService.queryByLike(feConfNotificationRulesEntity);
|
||||
return new JsonResultEntity("查询成功",true,list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增通知规则
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
public JsonResultEntity add(@RequestBody FeConfNotificationRulesEntity feConfNotificationRulesEntity){
|
||||
FeConfNotificationRulesEntity feConfNotificationRulesEntity1 = iFeConfNotificationRulesService.insert(feConfNotificationRulesEntity);
|
||||
return new JsonResultEntity("新增成功",true,feConfNotificationRulesEntity1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用停用状态
|
||||
*/
|
||||
@PostMapping("/updateStatus")
|
||||
public JsonResultEntity updateStatus(@RequestBody FeConfNotificationRulesEntity feConfNotificationRulesEntity){
|
||||
FeConfNotificationRulesEntity feConfNotificationRulesEntity1 = iFeConfNotificationRulesService.updateStatus(feConfNotificationRulesEntity);
|
||||
return new JsonResultEntity("更新成功",true,feConfNotificationRulesEntity1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改通知规则
|
||||
*/
|
||||
@PostMapping("/update")
|
||||
public JsonResultEntity update(@RequestBody FeConfNotificationRulesEntity feConfNotificationRulesEntity) throws Exception {
|
||||
FeConfNotificationRulesEntity feConfNotificationRulesEntity1 = iFeConfNotificationRulesService.updateFeConfNotificationRulesEntity(feConfNotificationRulesEntity);
|
||||
return new JsonResultEntity("修改成功",true,feConfNotificationRulesEntity1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除通知规则
|
||||
*/
|
||||
@PostMapping("/delete")
|
||||
public JsonResultEntity delete(@RequestBody FeConfNotificationRulesEntity feConfNotificationRulesEntity) throws Exception {
|
||||
if(feConfNotificationRulesEntity.getSts().equals("N")){
|
||||
throw new Exception("该记录已删除");
|
||||
}
|
||||
iFeConfNotificationRulesService.logicRemove(feConfNotificationRulesEntity);
|
||||
return new JsonResultEntity("删除成功",true,null);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package com.hzya.frame.finance.conf.notificationRules.dao;
|
||||
|
||||
import com.hzya.frame.finance.conf.notificationRules.entity.FeConfNotificationRulesEntity;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 通知规则表(fe_conf_notification_rules: table)表数据库访问层
|
||||
*
|
||||
* @author lixinyu
|
||||
* @since 2025-08-28 14:41:42
|
||||
*/
|
||||
public interface IFeConfNotificationRulesDao extends IBaseDao<FeConfNotificationRulesEntity, String> {
|
||||
|
||||
List<FeConfNotificationRulesEntity> queryNotificationRulesPaged(FeConfNotificationRulesEntity feConfNotificationRulesEntity);
|
||||
|
||||
FeConfNotificationRulesEntity queryById(String id);
|
||||
|
||||
int updateStatus(FeConfNotificationRulesEntity feConfNotificationRulesEntity);
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
package com.hzya.frame.finance.conf.notificationRules.dao.impl;
|
||||
|
||||
import com.hzya.frame.finance.conf.notificationRules.entity.FeConfNotificationRulesEntity;
|
||||
import com.hzya.frame.finance.conf.notificationRules.dao.IFeConfNotificationRulesDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 通知规则表(FeConfNotificationRules)表数据库访问层
|
||||
*
|
||||
* @author lixinyu
|
||||
* @since 2025-08-28 14:41:42
|
||||
*/
|
||||
@Repository
|
||||
public class FeConfNotificationRulesDaoImpl extends MybatisGenericDao<FeConfNotificationRulesEntity, String> implements IFeConfNotificationRulesDao{
|
||||
|
||||
@Override
|
||||
public List<FeConfNotificationRulesEntity> queryNotificationRulesPaged(FeConfNotificationRulesEntity feConfNotificationRulesEntity) {
|
||||
List<FeConfNotificationRulesEntity> objects = (List<FeConfNotificationRulesEntity>) this.selectList("com.hzya.frame.finance.conf.notificationRules.dao.impl.FeConfNotificationRulesDaoImpl.page", feConfNotificationRulesEntity);
|
||||
return objects;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FeConfNotificationRulesEntity queryById(String id) {
|
||||
FeConfNotificationRulesEntity feConfNotificationRulesEntity = (FeConfNotificationRulesEntity) this.selectOne("com.hzya.frame.finance.conf.notificationRules.dao.impl.FeConfNotificationRulesDaoImpl.queryById", id);
|
||||
return feConfNotificationRulesEntity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateStatus(FeConfNotificationRulesEntity feConfNotificationRulesEntity) {
|
||||
int update = this.update("com.hzya.frame.finance.conf.notificationRules.dao.impl.FeConfNotificationRulesDaoImpl.update_status", feConfNotificationRulesEntity);
|
||||
return update;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,326 @@
|
|||
package com.hzya.frame.finance.conf.notificationRules.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
/**
|
||||
* 通知规则表(FeConfNotificationRules)实体类
|
||||
*
|
||||
* @author lixinyu
|
||||
* @since 2025-08-28 14:41:42
|
||||
*/
|
||||
public class FeConfNotificationRulesEntity extends BaseEntity {
|
||||
|
||||
/** 编码 */
|
||||
private String code;
|
||||
/** 名称 */
|
||||
private String name;
|
||||
/** 业务类型id */
|
||||
private String mdmId;
|
||||
/** 业务类型名称 */
|
||||
private String mdmName;
|
||||
/** 单据类型ID */
|
||||
private String pkBilltypeid;
|
||||
/** 单据类型编码 */
|
||||
private String pkBilltypecode;
|
||||
/** 单据类型名称 */
|
||||
private String pkBilltypename;
|
||||
/** 通知方式Id */
|
||||
private String notificationMethodid;
|
||||
/** 通知方式编码 */
|
||||
private String notificationMethodcode;
|
||||
/** 通知方式名称 */
|
||||
private String notificationMethodname;
|
||||
/** 通知策略(cron表达式) */
|
||||
private String notificationStrategy;
|
||||
/** 通知对象id */
|
||||
private String notificationTargetid;
|
||||
/** 通知对象编码 */
|
||||
private String notificationTargetcode;
|
||||
/** 通知对象名称 */
|
||||
private String notificationTargetname;
|
||||
/** 消息模板id */
|
||||
private Long messageTemplateid;
|
||||
/** 消息模板编码 */
|
||||
private String messageTemplatecode;
|
||||
/** 消息模板名称 */
|
||||
private String messageTemplatename;
|
||||
/** 启用状态 Y:启用 N:停用 */
|
||||
private String enablestate;
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
/** 自定义项1 */
|
||||
private String def1;
|
||||
/** 自定义项2 */
|
||||
private String def2;
|
||||
/** 自定义项3 */
|
||||
private String def3;
|
||||
/** 自定义项4 */
|
||||
private String def4;
|
||||
/** 自定义项5 */
|
||||
private String def5;
|
||||
/** 自定义项6 */
|
||||
private String def6;
|
||||
/** 自定义项7 */
|
||||
private String def7;
|
||||
/** 自定义项8 */
|
||||
private String def8;
|
||||
/** 自定义项9 */
|
||||
private String def9;
|
||||
/** 自定义项10 */
|
||||
private String def10;
|
||||
/** 创建人 */
|
||||
private String createUser;
|
||||
/** 修改人 */
|
||||
private String modifyUser;
|
||||
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getMdmId() {
|
||||
return mdmId;
|
||||
}
|
||||
|
||||
public void setMdmId(String mdmId) {
|
||||
this.mdmId = mdmId;
|
||||
}
|
||||
|
||||
public String getMdmName() {
|
||||
return mdmName;
|
||||
}
|
||||
|
||||
public void setMdmName(String mdmName) {
|
||||
this.mdmName = mdmName;
|
||||
}
|
||||
|
||||
public String getPkBilltypeid() {
|
||||
return pkBilltypeid;
|
||||
}
|
||||
|
||||
public void setPkBilltypeid(String pkBilltypeid) {
|
||||
this.pkBilltypeid = pkBilltypeid;
|
||||
}
|
||||
|
||||
public String getPkBilltypecode() {
|
||||
return pkBilltypecode;
|
||||
}
|
||||
|
||||
public void setPkBilltypecode(String pkBilltypecode) {
|
||||
this.pkBilltypecode = pkBilltypecode;
|
||||
}
|
||||
|
||||
public String getPkBilltypename() {
|
||||
return pkBilltypename;
|
||||
}
|
||||
|
||||
public void setPkBilltypename(String pkBilltypename) {
|
||||
this.pkBilltypename = pkBilltypename;
|
||||
}
|
||||
|
||||
public String getNotificationMethodid() {
|
||||
return notificationMethodid;
|
||||
}
|
||||
|
||||
public void setNotificationMethodid(String notificationMethodid) {
|
||||
this.notificationMethodid = notificationMethodid;
|
||||
}
|
||||
|
||||
public String getNotificationMethodcode() {
|
||||
return notificationMethodcode;
|
||||
}
|
||||
|
||||
public void setNotificationMethodcode(String notificationMethodcode) {
|
||||
this.notificationMethodcode = notificationMethodcode;
|
||||
}
|
||||
|
||||
public String getNotificationMethodname() {
|
||||
return notificationMethodname;
|
||||
}
|
||||
|
||||
public void setNotificationMethodname(String notificationMethodname) {
|
||||
this.notificationMethodname = notificationMethodname;
|
||||
}
|
||||
|
||||
public String getNotificationStrategy() {
|
||||
return notificationStrategy;
|
||||
}
|
||||
|
||||
public void setNotificationStrategy(String notificationStrategy) {
|
||||
this.notificationStrategy = notificationStrategy;
|
||||
}
|
||||
|
||||
public String getNotificationTargetid() {
|
||||
return notificationTargetid;
|
||||
}
|
||||
|
||||
public void setNotificationTargetid(String notificationTargetid) {
|
||||
this.notificationTargetid = notificationTargetid;
|
||||
}
|
||||
|
||||
public String getNotificationTargetcode() {
|
||||
return notificationTargetcode;
|
||||
}
|
||||
|
||||
public void setNotificationTargetcode(String notificationTargetcode) {
|
||||
this.notificationTargetcode = notificationTargetcode;
|
||||
}
|
||||
|
||||
public String getNotificationTargetname() {
|
||||
return notificationTargetname;
|
||||
}
|
||||
|
||||
public void setNotificationTargetname(String notificationTargetname) {
|
||||
this.notificationTargetname = notificationTargetname;
|
||||
}
|
||||
|
||||
public Long getMessageTemplateid() {
|
||||
return messageTemplateid;
|
||||
}
|
||||
|
||||
public void setMessageTemplateid(Long messageTemplateid) {
|
||||
this.messageTemplateid = messageTemplateid;
|
||||
}
|
||||
|
||||
public String getMessageTemplatecode() {
|
||||
return messageTemplatecode;
|
||||
}
|
||||
|
||||
public void setMessageTemplatecode(String messageTemplatecode) {
|
||||
this.messageTemplatecode = messageTemplatecode;
|
||||
}
|
||||
|
||||
public String getMessageTemplatename() {
|
||||
return messageTemplatename;
|
||||
}
|
||||
|
||||
public void setMessageTemplatename(String messageTemplatename) {
|
||||
this.messageTemplatename = messageTemplatename;
|
||||
}
|
||||
|
||||
public String getEnablestate() {
|
||||
return enablestate;
|
||||
}
|
||||
|
||||
public void setEnablestate(String enablestate) {
|
||||
this.enablestate = enablestate;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getDef1() {
|
||||
return def1;
|
||||
}
|
||||
|
||||
public void setDef1(String def1) {
|
||||
this.def1 = def1;
|
||||
}
|
||||
|
||||
public String getDef2() {
|
||||
return def2;
|
||||
}
|
||||
|
||||
public void setDef2(String def2) {
|
||||
this.def2 = def2;
|
||||
}
|
||||
|
||||
public String getDef3() {
|
||||
return def3;
|
||||
}
|
||||
|
||||
public void setDef3(String def3) {
|
||||
this.def3 = def3;
|
||||
}
|
||||
|
||||
public String getDef4() {
|
||||
return def4;
|
||||
}
|
||||
|
||||
public void setDef4(String def4) {
|
||||
this.def4 = def4;
|
||||
}
|
||||
|
||||
public String getDef5() {
|
||||
return def5;
|
||||
}
|
||||
|
||||
public void setDef5(String def5) {
|
||||
this.def5 = def5;
|
||||
}
|
||||
|
||||
public String getDef6() {
|
||||
return def6;
|
||||
}
|
||||
|
||||
public void setDef6(String def6) {
|
||||
this.def6 = def6;
|
||||
}
|
||||
|
||||
public String getDef7() {
|
||||
return def7;
|
||||
}
|
||||
|
||||
public void setDef7(String def7) {
|
||||
this.def7 = def7;
|
||||
}
|
||||
|
||||
public String getDef8() {
|
||||
return def8;
|
||||
}
|
||||
|
||||
public void setDef8(String def8) {
|
||||
this.def8 = def8;
|
||||
}
|
||||
|
||||
public String getDef9() {
|
||||
return def9;
|
||||
}
|
||||
|
||||
public void setDef9(String def9) {
|
||||
this.def9 = def9;
|
||||
}
|
||||
|
||||
public String getDef10() {
|
||||
return def10;
|
||||
}
|
||||
|
||||
public void setDef10(String def10) {
|
||||
this.def10 = def10;
|
||||
}
|
||||
|
||||
public String getCreateUser() {
|
||||
return createUser;
|
||||
}
|
||||
|
||||
public void setCreateUser(String createUser) {
|
||||
this.createUser = createUser;
|
||||
}
|
||||
|
||||
public String getModifyUser() {
|
||||
return modifyUser;
|
||||
}
|
||||
|
||||
public void setModifyUser(String modifyUser) {
|
||||
this.modifyUser = modifyUser;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,541 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzya.frame.finance.conf.notificationRules.dao.impl.FeConfNotificationRulesDaoImpl">
|
||||
|
||||
<resultMap id="get-FeConfNotificationRulesEntity-result" type="com.hzya.frame.finance.conf.notificationRules.entity.FeConfNotificationRulesEntity" >
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="code" column="code" jdbcType="VARCHAR"/>
|
||||
<result property="name" column="name" jdbcType="VARCHAR"/>
|
||||
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
|
||||
<result property="mdmName" column="mdm_name" jdbcType="VARCHAR"/>
|
||||
<result property="pkBilltypeid" column="pk_billtypeid" jdbcType="VARCHAR"/>
|
||||
<result property="pkBilltypecode" column="pk_billtypecode" jdbcType="VARCHAR"/>
|
||||
<result property="pkBilltypename" column="pk_billtypename" jdbcType="VARCHAR"/>
|
||||
<result property="notificationMethodid" column="notification_methodid" jdbcType="VARCHAR"/>
|
||||
<result property="notificationMethodcode" column="notification_methodcode" jdbcType="VARCHAR"/>
|
||||
<result property="notificationMethodname" column="notification_methodname" jdbcType="VARCHAR"/>
|
||||
<result property="notificationStrategy" column="notification_strategy" jdbcType="VARCHAR"/>
|
||||
<result property="notificationTargetid" column="notification_targetid" jdbcType="VARCHAR"/>
|
||||
<result property="notificationTargetcode" column="notification_targetcode" jdbcType="VARCHAR"/>
|
||||
<result property="notificationTargetname" column="notification_targetname" jdbcType="VARCHAR"/>
|
||||
<result property="messageTemplateid" column="message_templateid" jdbcType="INTEGER"/>
|
||||
<result property="messageTemplatecode" column="message_templatecode" jdbcType="VARCHAR"/>
|
||||
<result property="messageTemplatename" column="message_templatename" jdbcType="VARCHAR"/>
|
||||
<result property="enablestate" column="enablestate" jdbcType="VARCHAR"/>
|
||||
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
||||
<result property="def1" column="def1" jdbcType="VARCHAR"/>
|
||||
<result property="def2" column="def2" jdbcType="VARCHAR"/>
|
||||
<result property="def3" column="def3" jdbcType="VARCHAR"/>
|
||||
<result property="def4" column="def4" jdbcType="VARCHAR"/>
|
||||
<result property="def5" column="def5" jdbcType="VARCHAR"/>
|
||||
<result property="def6" column="def6" jdbcType="VARCHAR"/>
|
||||
<result property="def7" column="def7" jdbcType="VARCHAR"/>
|
||||
<result property="def8" column="def8" jdbcType="VARCHAR"/>
|
||||
<result property="def9" column="def9" jdbcType="VARCHAR"/>
|
||||
<result property="def10" column="def10" jdbcType="VARCHAR"/>
|
||||
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="createUser" column="create_user" jdbcType="VARCHAR"/>
|
||||
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="modifyUser" column="modify_user" jdbcType="VARCHAR"/>
|
||||
<result property="sts" column="sts" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
<!-- 查询的字段-->
|
||||
<sql id = "FeConfNotificationRulesEntity_Base_Column_List">
|
||||
id
|
||||
,code
|
||||
,name
|
||||
,mdm_id
|
||||
,mdm_name
|
||||
,pk_billtypeid
|
||||
,pk_billtypecode
|
||||
,pk_billtypename
|
||||
,notification_methodid
|
||||
,notification_methodcode
|
||||
,notification_methodname
|
||||
,notification_strategy
|
||||
,notification_targetid
|
||||
,notification_targetcode
|
||||
,notification_targetname
|
||||
,message_templateid
|
||||
,message_templatecode
|
||||
,message_templatename
|
||||
,enablestate
|
||||
,remark
|
||||
,def1
|
||||
,def2
|
||||
,def3
|
||||
,def4
|
||||
,def5
|
||||
,def6
|
||||
,def7
|
||||
,def8
|
||||
,def9
|
||||
,def10
|
||||
,create_time
|
||||
,create_user
|
||||
,modify_time
|
||||
,modify_user
|
||||
,sts
|
||||
</sql>
|
||||
<select id="queryById" resultMap="get-FeConfNotificationRulesEntity-result" parameterType = "com.hzya.frame.finance.conf.notificationRules.entity.FeConfNotificationRulesEntity">
|
||||
select *
|
||||
from fe_conf_notification_rules
|
||||
where id = #{id}
|
||||
</select>
|
||||
<update id="update_status" parameterType = "com.hzya.frame.finance.conf.notificationRules.entity.FeConfNotificationRulesEntity">
|
||||
update fe_conf_notification_rules
|
||||
set enablestate = #{enablestate}
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 分页查询条件 -->
|
||||
<select id="page" resultMap="get-FeConfNotificationRulesEntity-result" parameterType = "com.hzya.frame.finance.conf.notificationRules.entity.FeConfNotificationRulesEntity">
|
||||
select
|
||||
<include refid="FeConfNotificationRulesEntity_Base_Column_List" />
|
||||
from fe_conf_notification_rules
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null"> and id like concat('%',#{id},'%') </if>
|
||||
<if test="code != null and code != ''"> and code like concat('%',#{code},'%') </if>
|
||||
<if test="name != null and name != ''"> and name like concat('%',#{name},'%') </if>
|
||||
<if test="mdmId != null and mdmId != ''"> and mdm_id like concat('%',#{mdmId},'%') </if>
|
||||
<if test="mdmName != null and mdmName != ''"> and mdm_name like concat('%',#{mdmName},'%') </if>
|
||||
<if test="pkBilltypeid != null and pkBilltypeid != ''"> and pk_billtypeid like concat('%',#{pkBilltypeid},'%') </if>
|
||||
<if test="pkBilltypecode != null and pkBilltypecode != ''"> and pk_billtypecode like concat('%',#{pkBilltypecode},'%') </if>
|
||||
<if test="pkBilltypename != null and pkBilltypename != ''"> and pk_billtypename like concat('%',#{pkBilltypename},'%') </if>
|
||||
<if test="notificationMethodid != null and notificationMethodid != ''"> and notification_methodid like concat('%',#{notificationMethodid},'%') </if>
|
||||
<if test="notificationMethodcode != null and notificationMethodcode != ''"> and notification_methodcode like concat('%',#{notificationMethodcode},'%') </if>
|
||||
<if test="notificationMethodname != null and notificationMethodname != ''"> and notification_methodname like concat('%',#{notificationMethodname},'%') </if>
|
||||
<if test="notificationStrategy != null and notificationStrategy != ''"> and notification_strategy like concat('%',#{notificationStrategy},'%') </if>
|
||||
<if test="notificationTargetid != null and notificationTargetid != ''"> and notification_targetid like concat('%',#{notificationTargetid},'%') </if>
|
||||
<if test="notificationTargetcode != null and notificationTargetcode != ''"> and notification_targetcode like concat('%',#{notificationTargetcode},'%') </if>
|
||||
<if test="notificationTargetname != null and notificationTargetname != ''"> and notification_targetname like concat('%',#{notificationTargetname},'%') </if>
|
||||
<if test="messageTemplateid != null"> and message_templateid like concat('%',#{messageTemplateid},'%') </if>
|
||||
<if test="messageTemplatecode != null and messageTemplatecode != ''"> and message_templatecode like concat('%',#{messageTemplatecode},'%') </if>
|
||||
<if test="messageTemplatename != null and messageTemplatename != ''"> and message_templatename like concat('%',#{messageTemplatename},'%') </if>
|
||||
<if test="enablestate != null and enablestate != ''"> and enablestate like concat('%',#{enablestate},'%') </if>
|
||||
<if test="remark != null and remark != ''"> and remark like concat('%',#{remark},'%') </if>
|
||||
<if test="def1 != null and def1 != ''"> and def1 like concat('%',#{def1},'%') </if>
|
||||
<if test="def2 != null and def2 != ''"> and def2 like concat('%',#{def2},'%') </if>
|
||||
<if test="def3 != null and def3 != ''"> and def3 like concat('%',#{def3},'%') </if>
|
||||
<if test="def4 != null and def4 != ''"> and def4 like concat('%',#{def4},'%') </if>
|
||||
<if test="def5 != null and def5 != ''"> and def5 like concat('%',#{def5},'%') </if>
|
||||
<if test="def6 != null and def6 != ''"> and def6 like concat('%',#{def6},'%') </if>
|
||||
<if test="def7 != null and def7 != ''"> and def7 like concat('%',#{def7},'%') </if>
|
||||
<if test="def8 != null and def8 != ''"> and def8 like concat('%',#{def8},'%') </if>
|
||||
<if test="def9 != null and def9 != ''"> and def9 like concat('%',#{def9},'%') </if>
|
||||
<if test="def10 != null and def10 != ''"> and def10 like concat('%',#{def10},'%') </if>
|
||||
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
|
||||
<if test="createUser != null and createUser != ''"> and create_user like concat('%',#{createUser},'%') </if>
|
||||
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
|
||||
<if test="modifyUser != null and modifyUser != ''"> and modify_user like concat('%',#{modifyUser},'%') </if>
|
||||
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</select>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-FeConfNotificationRulesEntity-result" parameterType = "com.hzya.frame.finance.conf.notificationRules.entity.FeConfNotificationRulesEntity">
|
||||
select
|
||||
<include refid="FeConfNotificationRulesEntity_Base_Column_List" />
|
||||
from fe_conf_notification_rules
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null"> and id = #{id} </if>
|
||||
<if test="code != null and code != ''"> and code = #{code} </if>
|
||||
<if test="name != null and name != ''"> and name = #{name} </if>
|
||||
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
|
||||
<if test="mdmName != null and mdmName != ''"> and mdm_name = #{mdmName} </if>
|
||||
<if test="pkBilltypeid != null and pkBilltypeid != ''"> and pk_billtypeid = #{pkBilltypeid} </if>
|
||||
<if test="pkBilltypecode != null and pkBilltypecode != ''"> and pk_billtypecode = #{pkBilltypecode} </if>
|
||||
<if test="pkBilltypename != null and pkBilltypename != ''"> and pk_billtypename = #{pkBilltypename} </if>
|
||||
<if test="notificationMethodid != null and notificationMethodid != ''"> and notification_methodid = #{notificationMethodid} </if>
|
||||
<if test="notificationMethodcode != null and notificationMethodcode != ''"> and notification_methodcode = #{notificationMethodcode} </if>
|
||||
<if test="notificationMethodname != null and notificationMethodname != ''"> and notification_methodname = #{notificationMethodname} </if>
|
||||
<if test="notificationStrategy != null and notificationStrategy != ''"> and notification_strategy = #{notificationStrategy} </if>
|
||||
<if test="notificationTargetid != null and notificationTargetid != ''"> and notification_targetid = #{notificationTargetid} </if>
|
||||
<if test="notificationTargetcode != null and notificationTargetcode != ''"> and notification_targetcode = #{notificationTargetcode} </if>
|
||||
<if test="notificationTargetname != null and notificationTargetname != ''"> and notification_targetname = #{notificationTargetname} </if>
|
||||
<if test="messageTemplateid != null"> and message_templateid = #{messageTemplateid} </if>
|
||||
<if test="messageTemplatecode != null and messageTemplatecode != ''"> and message_templatecode = #{messageTemplatecode} </if>
|
||||
<if test="messageTemplatename != null and messageTemplatename != ''"> and message_templatename = #{messageTemplatename} </if>
|
||||
<if test="enablestate != null and enablestate != ''"> and enablestate = #{enablestate} </if>
|
||||
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
|
||||
<if test="def1 != null and def1 != ''"> and def1 = #{def1} </if>
|
||||
<if test="def2 != null and def2 != ''"> and def2 = #{def2} </if>
|
||||
<if test="def3 != null and def3 != ''"> and def3 = #{def3} </if>
|
||||
<if test="def4 != null and def4 != ''"> and def4 = #{def4} </if>
|
||||
<if test="def5 != null and def5 != ''"> and def5 = #{def5} </if>
|
||||
<if test="def6 != null and def6 != ''"> and def6 = #{def6} </if>
|
||||
<if test="def7 != null and def7 != ''"> and def7 = #{def7} </if>
|
||||
<if test="def8 != null and def8 != ''"> and def8 = #{def8} </if>
|
||||
<if test="def9 != null and def9 != ''"> and def9 = #{def9} </if>
|
||||
<if test="def10 != null and def10 != ''"> and def10 = #{def10} </if>
|
||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
||||
<if test="createUser != null and createUser != ''"> and create_user = #{createUser} </if>
|
||||
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
||||
<if test="modifyUser != null and modifyUser != ''"> and modify_user = #{modifyUser} </if>
|
||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 查询符合条件的数量 -->
|
||||
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.finance.conf.notificationRules.entity.FeConfNotificationRulesEntity">
|
||||
select count(1) from fe_conf_notification_rules
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null"> and id = #{id} </if>
|
||||
<if test="code != null and code != ''"> and code = #{code} </if>
|
||||
<if test="name != null and name != ''"> and name = #{name} </if>
|
||||
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
|
||||
<if test="mdmName != null and mdmName != ''"> and mdm_name = #{mdmName} </if>
|
||||
<if test="pkBilltypeid != null and pkBilltypeid != ''"> and pk_billtypeid = #{pkBilltypeid} </if>
|
||||
<if test="pkBilltypecode != null and pkBilltypecode != ''"> and pk_billtypecode = #{pkBilltypecode} </if>
|
||||
<if test="pkBilltypename != null and pkBilltypename != ''"> and pk_billtypename = #{pkBilltypename} </if>
|
||||
<if test="notificationMethodid != null and notificationMethodid != ''"> and notification_methodid = #{notificationMethodid} </if>
|
||||
<if test="notificationMethodcode != null and notificationMethodcode != ''"> and notification_methodcode = #{notificationMethodcode} </if>
|
||||
<if test="notificationMethodname != null and notificationMethodname != ''"> and notification_methodname = #{notificationMethodname} </if>
|
||||
<if test="notificationStrategy != null and notificationStrategy != ''"> and notification_strategy = #{notificationStrategy} </if>
|
||||
<if test="notificationTargetid != null and notificationTargetid != ''"> and notification_targetid = #{notificationTargetid} </if>
|
||||
<if test="notificationTargetcode != null and notificationTargetcode != ''"> and notification_targetcode = #{notificationTargetcode} </if>
|
||||
<if test="notificationTargetname != null and notificationTargetname != ''"> and notification_targetname = #{notificationTargetname} </if>
|
||||
<if test="messageTemplateid != null"> and message_templateid = #{messageTemplateid} </if>
|
||||
<if test="messageTemplatecode != null and messageTemplatecode != ''"> and message_templatecode = #{messageTemplatecode} </if>
|
||||
<if test="messageTemplatename != null and messageTemplatename != ''"> and message_templatename = #{messageTemplatename} </if>
|
||||
<if test="enablestate != null and enablestate != ''"> and enablestate = #{enablestate} </if>
|
||||
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
|
||||
<if test="def1 != null and def1 != ''"> and def1 = #{def1} </if>
|
||||
<if test="def2 != null and def2 != ''"> and def2 = #{def2} </if>
|
||||
<if test="def3 != null and def3 != ''"> and def3 = #{def3} </if>
|
||||
<if test="def4 != null and def4 != ''"> and def4 = #{def4} </if>
|
||||
<if test="def5 != null and def5 != ''"> and def5 = #{def5} </if>
|
||||
<if test="def6 != null and def6 != ''"> and def6 = #{def6} </if>
|
||||
<if test="def7 != null and def7 != ''"> and def7 = #{def7} </if>
|
||||
<if test="def8 != null and def8 != ''"> and def8 = #{def8} </if>
|
||||
<if test="def9 != null and def9 != ''"> and def9 = #{def9} </if>
|
||||
<if test="def10 != null and def10 != ''"> and def10 = #{def10} </if>
|
||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
||||
<if test="createUser != null and createUser != ''"> and create_user = #{createUser} </if>
|
||||
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
||||
<if test="modifyUser != null and modifyUser != ''"> and modify_user = #{modifyUser} </if>
|
||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="entity_list_like" resultMap="get-FeConfNotificationRulesEntity-result" parameterType = "com.hzya.frame.finance.conf.notificationRules.entity.FeConfNotificationRulesEntity">
|
||||
select
|
||||
<include refid="FeConfNotificationRulesEntity_Base_Column_List" />
|
||||
from fe_conf_notification_rules
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null"> and id like concat('%',#{id},'%') </if>
|
||||
<if test="code != null and code != ''"> and code like concat('%',#{code},'%') </if>
|
||||
<if test="name != null and name != ''"> and name like concat('%',#{name},'%') </if>
|
||||
<if test="mdmId != null and mdmId != ''"> and mdm_id like concat('%',#{mdmId},'%') </if>
|
||||
<if test="mdmName != null and mdmName != ''"> and mdm_name like concat('%',#{mdmName},'%') </if>
|
||||
<if test="pkBilltypeid != null and pkBilltypeid != ''"> and pk_billtypeid like concat('%',#{pkBilltypeid},'%') </if>
|
||||
<if test="pkBilltypecode != null and pkBilltypecode != ''"> and pk_billtypecode like concat('%',#{pkBilltypecode},'%') </if>
|
||||
<if test="pkBilltypename != null and pkBilltypename != ''"> and pk_billtypename like concat('%',#{pkBilltypename},'%') </if>
|
||||
<if test="notificationMethodid != null and notificationMethodid != ''"> and notification_methodid like concat('%',#{notificationMethodid},'%') </if>
|
||||
<if test="notificationMethodcode != null and notificationMethodcode != ''"> and notification_methodcode like concat('%',#{notificationMethodcode},'%') </if>
|
||||
<if test="notificationMethodname != null and notificationMethodname != ''"> and notification_methodname like concat('%',#{notificationMethodname},'%') </if>
|
||||
<if test="notificationStrategy != null and notificationStrategy != ''"> and notification_strategy like concat('%',#{notificationStrategy},'%') </if>
|
||||
<if test="notificationTargetid != null and notificationTargetid != ''"> and notification_targetid like concat('%',#{notificationTargetid},'%') </if>
|
||||
<if test="notificationTargetcode != null and notificationTargetcode != ''"> and notification_targetcode like concat('%',#{notificationTargetcode},'%') </if>
|
||||
<if test="notificationTargetname != null and notificationTargetname != ''"> and notification_targetname like concat('%',#{notificationTargetname},'%') </if>
|
||||
<if test="messageTemplateid != null"> and message_templateid like concat('%',#{messageTemplateid},'%') </if>
|
||||
<if test="messageTemplatecode != null and messageTemplatecode != ''"> and message_templatecode like concat('%',#{messageTemplatecode},'%') </if>
|
||||
<if test="messageTemplatename != null and messageTemplatename != ''"> and message_templatename like concat('%',#{messageTemplatename},'%') </if>
|
||||
<if test="enablestate != null and enablestate != ''"> and enablestate like concat('%',#{enablestate},'%') </if>
|
||||
<if test="remark != null and remark != ''"> and remark like concat('%',#{remark},'%') </if>
|
||||
<if test="def1 != null and def1 != ''"> and def1 like concat('%',#{def1},'%') </if>
|
||||
<if test="def2 != null and def2 != ''"> and def2 like concat('%',#{def2},'%') </if>
|
||||
<if test="def3 != null and def3 != ''"> and def3 like concat('%',#{def3},'%') </if>
|
||||
<if test="def4 != null and def4 != ''"> and def4 like concat('%',#{def4},'%') </if>
|
||||
<if test="def5 != null and def5 != ''"> and def5 like concat('%',#{def5},'%') </if>
|
||||
<if test="def6 != null and def6 != ''"> and def6 like concat('%',#{def6},'%') </if>
|
||||
<if test="def7 != null and def7 != ''"> and def7 like concat('%',#{def7},'%') </if>
|
||||
<if test="def8 != null and def8 != ''"> and def8 like concat('%',#{def8},'%') </if>
|
||||
<if test="def9 != null and def9 != ''"> and def9 like concat('%',#{def9},'%') </if>
|
||||
<if test="def10 != null and def10 != ''"> and def10 like concat('%',#{def10},'%') </if>
|
||||
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
|
||||
<if test="createUser != null and createUser != ''"> and create_user like concat('%',#{createUser},'%') </if>
|
||||
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
|
||||
<if test="modifyUser != null and modifyUser != ''"> and modify_user like concat('%',#{modifyUser},'%') </if>
|
||||
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 查询列表 字段采用or格式 -->
|
||||
<select id="FeConfNotificationRulesentity_list_or" resultMap="get-FeConfNotificationRulesEntity-result" parameterType = "com.hzya.frame.finance.conf.notificationRules.entity.FeConfNotificationRulesEntity">
|
||||
select
|
||||
<include refid="FeConfNotificationRulesEntity_Base_Column_List" />
|
||||
from fe_conf_notification_rules
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null"> or id = #{id} </if>
|
||||
<if test="code != null and code != ''"> or code = #{code} </if>
|
||||
<if test="name != null and name != ''"> or name = #{name} </if>
|
||||
<if test="mdmId != null and mdmId != ''"> or mdm_id = #{mdmId} </if>
|
||||
<if test="mdmName != null and mdmName != ''"> or mdm_name = #{mdmName} </if>
|
||||
<if test="pkBilltypeid != null and pkBilltypeid != ''"> or pk_billtypeid = #{pkBilltypeid} </if>
|
||||
<if test="pkBilltypecode != null and pkBilltypecode != ''"> or pk_billtypecode = #{pkBilltypecode} </if>
|
||||
<if test="pkBilltypename != null and pkBilltypename != ''"> or pk_billtypename = #{pkBilltypename} </if>
|
||||
<if test="notificationMethodid != null and notificationMethodid != ''"> or notification_methodid = #{notificationMethodid} </if>
|
||||
<if test="notificationMethodcode != null and notificationMethodcode != ''"> or notification_methodcode = #{notificationMethodcode} </if>
|
||||
<if test="notificationMethodname != null and notificationMethodname != ''"> or notification_methodname = #{notificationMethodname} </if>
|
||||
<if test="notificationStrategy != null and notificationStrategy != ''"> or notification_strategy = #{notificationStrategy} </if>
|
||||
<if test="notificationTargetid != null and notificationTargetid != ''"> or notification_targetid = #{notificationTargetid} </if>
|
||||
<if test="notificationTargetcode != null and notificationTargetcode != ''"> or notification_targetcode = #{notificationTargetcode} </if>
|
||||
<if test="notificationTargetname != null and notificationTargetname != ''"> or notification_targetname = #{notificationTargetname} </if>
|
||||
<if test="messageTemplateid != null"> or message_templateid = #{messageTemplateid} </if>
|
||||
<if test="messageTemplatecode != null and messageTemplatecode != ''"> or message_templatecode = #{messageTemplatecode} </if>
|
||||
<if test="messageTemplatename != null and messageTemplatename != ''"> or message_templatename = #{messageTemplatename} </if>
|
||||
<if test="enablestate != null and enablestate != ''"> or enablestate = #{enablestate} </if>
|
||||
<if test="remark != null and remark != ''"> or remark = #{remark} </if>
|
||||
<if test="def1 != null and def1 != ''"> or def1 = #{def1} </if>
|
||||
<if test="def2 != null and def2 != ''"> or def2 = #{def2} </if>
|
||||
<if test="def3 != null and def3 != ''"> or def3 = #{def3} </if>
|
||||
<if test="def4 != null and def4 != ''"> or def4 = #{def4} </if>
|
||||
<if test="def5 != null and def5 != ''"> or def5 = #{def5} </if>
|
||||
<if test="def6 != null and def6 != ''"> or def6 = #{def6} </if>
|
||||
<if test="def7 != null and def7 != ''"> or def7 = #{def7} </if>
|
||||
<if test="def8 != null and def8 != ''"> or def8 = #{def8} </if>
|
||||
<if test="def9 != null and def9 != ''"> or def9 = #{def9} </if>
|
||||
<if test="def10 != null and def10 != ''"> or def10 = #{def10} </if>
|
||||
<if test="create_time != null"> or create_time = #{create_time} </if>
|
||||
<if test="createUser != null and createUser != ''"> or create_user = #{createUser} </if>
|
||||
<if test="modify_time != null"> or modify_time = #{modify_time} </if>
|
||||
<if test="modifyUser != null and modifyUser != ''"> or modify_user = #{modifyUser} </if>
|
||||
<if test="sts != null and sts != ''"> or sts = #{sts} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
|
||||
</select>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="entity_insert" parameterType = "com.hzya.frame.finance.conf.notificationRules.entity.FeConfNotificationRulesEntity" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into fe_conf_notification_rules(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null"> id , </if>
|
||||
<if test="code != null and code != ''"> code , </if>
|
||||
<if test="name != null and name != ''"> name , </if>
|
||||
<if test="mdmId != null and mdmId != ''"> mdm_id , </if>
|
||||
<if test="mdmName != null and mdmName != ''"> mdm_name , </if>
|
||||
<if test="pkBilltypeid != null and pkBilltypeid != ''"> pk_billtypeid , </if>
|
||||
<if test="pkBilltypecode != null and pkBilltypecode != ''"> pk_billtypecode , </if>
|
||||
<if test="pkBilltypename != null and pkBilltypename != ''"> pk_billtypename , </if>
|
||||
<if test="notificationMethodid != null and notificationMethodid != ''"> notification_methodid , </if>
|
||||
<if test="notificationMethodcode != null and notificationMethodcode != ''"> notification_methodcode , </if>
|
||||
<if test="notificationMethodname != null and notificationMethodname != ''"> notification_methodname , </if>
|
||||
<if test="notificationStrategy != null and notificationStrategy != ''"> notification_strategy , </if>
|
||||
<if test="notificationTargetid != null and notificationTargetid != ''"> notification_targetid , </if>
|
||||
<if test="notificationTargetcode != null and notificationTargetcode != ''"> notification_targetcode , </if>
|
||||
<if test="notificationTargetname != null and notificationTargetname != ''"> notification_targetname , </if>
|
||||
<if test="messageTemplateid != null"> message_templateid , </if>
|
||||
<if test="messageTemplatecode != null and messageTemplatecode != ''"> message_templatecode , </if>
|
||||
<if test="messageTemplatename != null and messageTemplatename != ''"> message_templatename , </if>
|
||||
<if test="enablestate != null and enablestate != ''"> enablestate , </if>
|
||||
<if test="remark != null and remark != ''"> remark , </if>
|
||||
<if test="def1 != null and def1 != ''"> def1 , </if>
|
||||
<if test="def2 != null and def2 != ''"> def2 , </if>
|
||||
<if test="def3 != null and def3 != ''"> def3 , </if>
|
||||
<if test="def4 != null and def4 != ''"> def4 , </if>
|
||||
<if test="def5 != null and def5 != ''"> def5 , </if>
|
||||
<if test="def6 != null and def6 != ''"> def6 , </if>
|
||||
<if test="def7 != null and def7 != ''"> def7 , </if>
|
||||
<if test="def8 != null and def8 != ''"> def8 , </if>
|
||||
<if test="def9 != null and def9 != ''"> def9 , </if>
|
||||
<if test="def10 != null and def10 != ''"> def10 , </if>
|
||||
<if test="create_time != null"> create_time , </if>
|
||||
<if test="createUser != null and createUser != ''"> create_user , </if>
|
||||
<if test="modify_time != null"> modify_time , </if>
|
||||
<if test="modifyUser != null and modifyUser != ''"> modify_user , </if>
|
||||
<if test="sts != null and sts != ''"> sts , </if>
|
||||
<if test="sts == null ">sts,</if>
|
||||
</trim>
|
||||
)values(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null"> #{id} ,</if>
|
||||
<if test="code != null and code != ''"> #{code} ,</if>
|
||||
<if test="name != null and name != ''"> #{name} ,</if>
|
||||
<if test="mdmId != null and mdmId != ''"> #{mdmId} ,</if>
|
||||
<if test="mdmName != null and mdmName != ''"> #{mdmName} ,</if>
|
||||
<if test="pkBilltypeid != null and pkBilltypeid != ''"> #{pkBilltypeid} ,</if>
|
||||
<if test="pkBilltypecode != null and pkBilltypecode != ''"> #{pkBilltypecode} ,</if>
|
||||
<if test="pkBilltypename != null and pkBilltypename != ''"> #{pkBilltypename} ,</if>
|
||||
<if test="notificationMethodid != null and notificationMethodid != ''"> #{notificationMethodid} ,</if>
|
||||
<if test="notificationMethodcode != null and notificationMethodcode != ''"> #{notificationMethodcode} ,</if>
|
||||
<if test="notificationMethodname != null and notificationMethodname != ''"> #{notificationMethodname} ,</if>
|
||||
<if test="notificationStrategy != null and notificationStrategy != ''"> #{notificationStrategy} ,</if>
|
||||
<if test="notificationTargetid != null and notificationTargetid != ''"> #{notificationTargetid} ,</if>
|
||||
<if test="notificationTargetcode != null and notificationTargetcode != ''"> #{notificationTargetcode} ,</if>
|
||||
<if test="notificationTargetname != null and notificationTargetname != ''"> #{notificationTargetname} ,</if>
|
||||
<if test="messageTemplateid != null"> #{messageTemplateid} ,</if>
|
||||
<if test="messageTemplatecode != null and messageTemplatecode != ''"> #{messageTemplatecode} ,</if>
|
||||
<if test="messageTemplatename != null and messageTemplatename != ''"> #{messageTemplatename} ,</if>
|
||||
<if test="enablestate != null and enablestate != ''"> #{enablestate} ,</if>
|
||||
<if test="remark != null and remark != ''"> #{remark} ,</if>
|
||||
<if test="def1 != null and def1 != ''"> #{def1} ,</if>
|
||||
<if test="def2 != null and def2 != ''"> #{def2} ,</if>
|
||||
<if test="def3 != null and def3 != ''"> #{def3} ,</if>
|
||||
<if test="def4 != null and def4 != ''"> #{def4} ,</if>
|
||||
<if test="def5 != null and def5 != ''"> #{def5} ,</if>
|
||||
<if test="def6 != null and def6 != ''"> #{def6} ,</if>
|
||||
<if test="def7 != null and def7 != ''"> #{def7} ,</if>
|
||||
<if test="def8 != null and def8 != ''"> #{def8} ,</if>
|
||||
<if test="def9 != null and def9 != ''"> #{def9} ,</if>
|
||||
<if test="def10 != null and def10 != ''"> #{def10} ,</if>
|
||||
<if test="create_time != null"> #{create_time} ,</if>
|
||||
<if test="createUser != null and createUser != ''"> #{createUser} ,</if>
|
||||
<if test="modify_time != null"> #{modify_time} ,</if>
|
||||
<if test="modifyUser != null and modifyUser != ''"> #{modifyUser} ,</if>
|
||||
<if test="sts != null and sts != ''"> #{sts} ,</if>
|
||||
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into fe_conf_notification_rules(code, name, mdm_id, mdm_name, pk_billtypeid, pk_billtypecode, pk_billtypename, notification_methodid, notification_methodcode, notification_methodname, notification_strategy, notification_targetid, notification_targetcode, notification_targetname, message_templateid, message_templatecode, message_templatename, enablestate, remark, def1, def2, def3, def4, def5, def6, def7, def8, def9, def10, create_time, create_user, modify_time, modify_user, sts, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.code},#{entity.name},#{entity.mdmId},#{entity.mdmName},#{entity.pkBilltypeid},#{entity.pkBilltypecode},#{entity.pkBilltypename},#{entity.notificationMethodid},#{entity.notificationMethodcode},#{entity.notificationMethodname},#{entity.notificationStrategy},#{entity.notificationTargetid},#{entity.notificationTargetcode},#{entity.notificationTargetname},#{entity.messageTemplateid},#{entity.messageTemplatecode},#{entity.messageTemplatename},#{entity.enablestate},#{entity.remark},#{entity.def1},#{entity.def2},#{entity.def3},#{entity.def4},#{entity.def5},#{entity.def6},#{entity.def7},#{entity.def8},#{entity.def9},#{entity.def10},#{entity.create_time},#{entity.createUser},#{entity.modify_time},#{entity.modifyUser},#{entity.sts}, 'Y')
|
||||
</foreach>
|
||||
</insert>
|
||||
<!-- 批量新增或者修改-->
|
||||
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into fe_conf_notification_rules(code, name, mdm_id, mdm_name, pk_billtypeid, pk_billtypecode, pk_billtypename, notification_methodid, notification_methodcode, notification_methodname, notification_strategy, notification_targetid, notification_targetcode, notification_targetname, message_templateid, message_templatecode, message_templatename, enablestate, remark, def1, def2, def3, def4, def5, def6, def7, def8, def9, def10, create_time, create_user, modify_time, modify_user, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.code},#{entity.name},#{entity.mdmId},#{entity.mdmName},#{entity.pkBilltypeid},#{entity.pkBilltypecode},#{entity.pkBilltypename},#{entity.notificationMethodid},#{entity.notificationMethodcode},#{entity.notificationMethodname},#{entity.notificationStrategy},#{entity.notificationTargetid},#{entity.notificationTargetcode},#{entity.notificationTargetname},#{entity.messageTemplateid},#{entity.messageTemplatecode},#{entity.messageTemplatename},#{entity.enablestate},#{entity.remark},#{entity.def1},#{entity.def2},#{entity.def3},#{entity.def4},#{entity.def5},#{entity.def6},#{entity.def7},#{entity.def8},#{entity.def9},#{entity.def10},#{entity.create_time},#{entity.createUser},#{entity.modify_time},#{entity.modifyUser},#{entity.sts})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
code = values(code),
|
||||
name = values(name),
|
||||
mdm_id = values(mdm_id),
|
||||
mdm_name = values(mdm_name),
|
||||
pk_billtypeid = values(pk_billtypeid),
|
||||
pk_billtypecode = values(pk_billtypecode),
|
||||
pk_billtypename = values(pk_billtypename),
|
||||
notification_methodid = values(notification_methodid),
|
||||
notification_methodcode = values(notification_methodcode),
|
||||
notification_methodname = values(notification_methodname),
|
||||
notification_strategy = values(notification_strategy),
|
||||
notification_targetid = values(notification_targetid),
|
||||
notification_targetcode = values(notification_targetcode),
|
||||
notification_targetname = values(notification_targetname),
|
||||
message_templateid = values(message_templateid),
|
||||
message_templatecode = values(message_templatecode),
|
||||
message_templatename = values(message_templatename),
|
||||
enablestate = values(enablestate),
|
||||
remark = values(remark),
|
||||
def1 = values(def1),
|
||||
def2 = values(def2),
|
||||
def3 = values(def3),
|
||||
def4 = values(def4),
|
||||
def5 = values(def5),
|
||||
def6 = values(def6),
|
||||
def7 = values(def7),
|
||||
def8 = values(def8),
|
||||
def9 = values(def9),
|
||||
def10 = values(def10),
|
||||
create_time = values(create_time),
|
||||
create_user = values(create_user),
|
||||
modify_time = values(modify_time),
|
||||
modify_user = values(modify_user),
|
||||
sts = values(sts)</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType = "com.hzya.frame.finance.conf.notificationRules.entity.FeConfNotificationRulesEntity" >
|
||||
update fe_conf_notification_rules set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="code != null and code != ''"> code = #{code},</if>
|
||||
<if test="name != null and name != ''"> name = #{name},</if>
|
||||
<if test="mdmId != null and mdmId != ''"> mdm_id = #{mdmId},</if>
|
||||
<if test="mdmName != null and mdmName != ''"> mdm_name = #{mdmName},</if>
|
||||
<if test="pkBilltypeid != null and pkBilltypeid != ''"> pk_billtypeid = #{pkBilltypeid},</if>
|
||||
<if test="pkBilltypecode != null and pkBilltypecode != ''"> pk_billtypecode = #{pkBilltypecode},</if>
|
||||
<if test="pkBilltypename != null and pkBilltypename != ''"> pk_billtypename = #{pkBilltypename},</if>
|
||||
<if test="notificationMethodid != null and notificationMethodid != ''"> notification_methodid = #{notificationMethodid},</if>
|
||||
<if test="notificationMethodcode != null and notificationMethodcode != ''"> notification_methodcode = #{notificationMethodcode},</if>
|
||||
<if test="notificationMethodname != null and notificationMethodname != ''"> notification_methodname = #{notificationMethodname},</if>
|
||||
<if test="notificationStrategy != null and notificationStrategy != ''"> notification_strategy = #{notificationStrategy},</if>
|
||||
<if test="notificationTargetid != null and notificationTargetid != ''"> notification_targetid = #{notificationTargetid},</if>
|
||||
<if test="notificationTargetcode != null and notificationTargetcode != ''"> notification_targetcode = #{notificationTargetcode},</if>
|
||||
<if test="notificationTargetname != null and notificationTargetname != ''"> notification_targetname = #{notificationTargetname},</if>
|
||||
<if test="messageTemplateid != null"> message_templateid = #{messageTemplateid},</if>
|
||||
<if test="messageTemplatecode != null and messageTemplatecode != ''"> message_templatecode = #{messageTemplatecode},</if>
|
||||
<if test="messageTemplatename != null and messageTemplatename != ''"> message_templatename = #{messageTemplatename},</if>
|
||||
<if test="enablestate != null and enablestate != ''"> enablestate = #{enablestate},</if>
|
||||
<if test="remark != null and remark != ''"> remark = #{remark},</if>
|
||||
<if test="def1 != null and def1 != ''"> def1 = #{def1},</if>
|
||||
<if test="def2 != null and def2 != ''"> def2 = #{def2},</if>
|
||||
<if test="def3 != null and def3 != ''"> def3 = #{def3},</if>
|
||||
<if test="def4 != null and def4 != ''"> def4 = #{def4},</if>
|
||||
<if test="def5 != null and def5 != ''"> def5 = #{def5},</if>
|
||||
<if test="def6 != null and def6 != ''"> def6 = #{def6},</if>
|
||||
<if test="def7 != null and def7 != ''"> def7 = #{def7},</if>
|
||||
<if test="def8 != null and def8 != ''"> def8 = #{def8},</if>
|
||||
<if test="def9 != null and def9 != ''"> def9 = #{def9},</if>
|
||||
<if test="def10 != null and def10 != ''"> def10 = #{def10},</if>
|
||||
<if test="create_time != null"> create_time = #{create_time},</if>
|
||||
<if test="createUser != null and createUser != ''"> create_user = #{createUser},</if>
|
||||
<if test="modify_time != null"> modify_time = #{modify_time},</if>
|
||||
<if test="modifyUser != null and modifyUser != ''"> modify_user = #{modifyUser},</if>
|
||||
<if test="sts != null and sts != ''"> sts = #{sts},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete" parameterType = "com.hzya.frame.finance.conf.notificationRules.entity.FeConfNotificationRulesEntity" >
|
||||
update fe_conf_notification_rules set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 多条件逻辑删除 -->
|
||||
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.finance.conf.notificationRules.entity.FeConfNotificationRulesEntity" >
|
||||
update fe_conf_notification_rules set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null"> and id = #{id} </if>
|
||||
<if test="code != null and code != ''"> and code = #{code} </if>
|
||||
<if test="name != null and name != ''"> and name = #{name} </if>
|
||||
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
|
||||
<if test="mdmName != null and mdmName != ''"> and mdm_name = #{mdmName} </if>
|
||||
<if test="pkBilltypeid != null and pkBilltypeid != ''"> and pk_billtypeid = #{pkBilltypeid} </if>
|
||||
<if test="pkBilltypecode != null and pkBilltypecode != ''"> and pk_billtypecode = #{pkBilltypecode} </if>
|
||||
<if test="pkBilltypename != null and pkBilltypename != ''"> and pk_billtypename = #{pkBilltypename} </if>
|
||||
<if test="notificationMethodid != null and notificationMethodid != ''"> and notification_methodid = #{notificationMethodid} </if>
|
||||
<if test="notificationMethodcode != null and notificationMethodcode != ''"> and notification_methodcode = #{notificationMethodcode} </if>
|
||||
<if test="notificationMethodname != null and notificationMethodname != ''"> and notification_methodname = #{notificationMethodname} </if>
|
||||
<if test="notificationStrategy != null and notificationStrategy != ''"> and notification_strategy = #{notificationStrategy} </if>
|
||||
<if test="notificationTargetid != null and notificationTargetid != ''"> and notification_targetid = #{notificationTargetid} </if>
|
||||
<if test="notificationTargetcode != null and notificationTargetcode != ''"> and notification_targetcode = #{notificationTargetcode} </if>
|
||||
<if test="notificationTargetname != null and notificationTargetname != ''"> and notification_targetname = #{notificationTargetname} </if>
|
||||
<if test="messageTemplateid != null"> and message_templateid = #{messageTemplateid} </if>
|
||||
<if test="messageTemplatecode != null and messageTemplatecode != ''"> and message_templatecode = #{messageTemplatecode} </if>
|
||||
<if test="messageTemplatename != null and messageTemplatename != ''"> and message_templatename = #{messageTemplatename} </if>
|
||||
<if test="enablestate != null and enablestate != ''"> and enablestate = #{enablestate} </if>
|
||||
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
|
||||
<if test="def1 != null and def1 != ''"> and def1 = #{def1} </if>
|
||||
<if test="def2 != null and def2 != ''"> and def2 = #{def2} </if>
|
||||
<if test="def3 != null and def3 != ''"> and def3 = #{def3} </if>
|
||||
<if test="def4 != null and def4 != ''"> and def4 = #{def4} </if>
|
||||
<if test="def5 != null and def5 != ''"> and def5 = #{def5} </if>
|
||||
<if test="def6 != null and def6 != ''"> and def6 = #{def6} </if>
|
||||
<if test="def7 != null and def7 != ''"> and def7 = #{def7} </if>
|
||||
<if test="def8 != null and def8 != ''"> and def8 = #{def8} </if>
|
||||
<if test="def9 != null and def9 != ''"> and def9 = #{def9} </if>
|
||||
<if test="def10 != null and def10 != ''"> and def10 = #{def10} </if>
|
||||
<if test="createUser != null and createUser != ''"> and create_user = #{createUser} </if>
|
||||
<if test="modifyUser != null and modifyUser != ''"> and modify_user = #{modifyUser} </if>
|
||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</update>
|
||||
<!--通过主键删除-->
|
||||
<delete id="entity_delete">
|
||||
delete from fe_conf_notification_rules where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.hzya.frame.finance.conf.notificationRules.service;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.hzya.frame.finance.conf.notificationRules.entity.FeConfNotificationRulesEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
/**
|
||||
* 通知规则表(FeConfNotificationRules)表服务接口
|
||||
*
|
||||
* @author lixinyu
|
||||
* @since 2025-08-28 14:41:42
|
||||
*/
|
||||
public interface IFeConfNotificationRulesService extends IBaseService<FeConfNotificationRulesEntity, String>{
|
||||
PageInfo queryNotificationRulesPaged(FeConfNotificationRulesEntity feConfNotificationRulesEntity);
|
||||
|
||||
FeConfNotificationRulesEntity insert(FeConfNotificationRulesEntity feConfNotificationRulesEntity);
|
||||
|
||||
FeConfNotificationRulesEntity updateStatus(FeConfNotificationRulesEntity feConfNotificationRulesEntity);
|
||||
|
||||
FeConfNotificationRulesEntity updateFeConfNotificationRulesEntity(FeConfNotificationRulesEntity feConfNotificationRulesEntity) throws Exception;
|
||||
}
|
|
@ -0,0 +1,102 @@
|
|||
package com.hzya.frame.finance.conf.notificationRules.service.impl;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.hzya.frame.finance.conf.notificationRules.entity.FeConfNotificationRulesEntity;
|
||||
import com.hzya.frame.finance.conf.notificationRules.dao.IFeConfNotificationRulesDao;
|
||||
import com.hzya.frame.finance.conf.notificationRules.service.IFeConfNotificationRulesService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import javax.annotation.Resource;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 通知规则表(FeConfNotificationRules)表服务实现类
|
||||
*
|
||||
* @author lixinyu
|
||||
* @since 2025-08-28 14:41:42
|
||||
*/
|
||||
@Service
|
||||
public class FeConfNotificationRulesServiceImpl extends BaseService<FeConfNotificationRulesEntity, String> implements IFeConfNotificationRulesService {
|
||||
|
||||
private IFeConfNotificationRulesDao feConfNotificationRulesDao;
|
||||
|
||||
@Autowired
|
||||
public void setFeConfNotificationRulesDao(IFeConfNotificationRulesDao dao) {
|
||||
this.feConfNotificationRulesDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询通知规则
|
||||
* @param feConfNotificationRulesEntity
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public PageInfo queryNotificationRulesPaged(FeConfNotificationRulesEntity feConfNotificationRulesEntity) {
|
||||
PageHelper.startPage(feConfNotificationRulesEntity.getPageNum(), feConfNotificationRulesEntity.getPageSize());
|
||||
List<FeConfNotificationRulesEntity> list = feConfNotificationRulesDao.queryNotificationRulesPaged(feConfNotificationRulesEntity);
|
||||
return new PageInfo(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增通知规则
|
||||
* @param feConfNotificationRulesEntity
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public FeConfNotificationRulesEntity insert(FeConfNotificationRulesEntity feConfNotificationRulesEntity) {
|
||||
if(feConfNotificationRulesEntity.getPkBilltypeid() == null || "".equals(feConfNotificationRulesEntity.getPkBilltypeid())){
|
||||
throw new RuntimeException("单据类型不能为空");
|
||||
}
|
||||
if(feConfNotificationRulesEntity.getNotificationStrategy() == null || "".equals(feConfNotificationRulesEntity.getNotificationStrategy())){
|
||||
throw new RuntimeException("通知策略不能为空");
|
||||
}
|
||||
if(feConfNotificationRulesEntity.getNotificationTargetid() == null || "".equals(feConfNotificationRulesEntity.getNotificationTargetid())){
|
||||
throw new RuntimeException("通知对象不能为空");
|
||||
}
|
||||
if(feConfNotificationRulesEntity.getMessageTemplateid() == null || "".equals(feConfNotificationRulesEntity.getMessageTemplateid())){
|
||||
throw new RuntimeException("消息模板不能为空");
|
||||
}
|
||||
FeConfNotificationRulesEntity save = feConfNotificationRulesDao.save(feConfNotificationRulesEntity);
|
||||
FeConfNotificationRulesEntity feConfNotificationRulesEntity1 = feConfNotificationRulesDao.queryById(save.getId());
|
||||
return feConfNotificationRulesEntity1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用停用
|
||||
* @param feConfNotificationRulesEntity
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public FeConfNotificationRulesEntity updateStatus(FeConfNotificationRulesEntity feConfNotificationRulesEntity) {
|
||||
if(feConfNotificationRulesEntity.getId() == null){
|
||||
throw new RuntimeException("id不能为空");
|
||||
}
|
||||
if(feConfNotificationRulesEntity.getSts().equals("N")){
|
||||
throw new RuntimeException("该数据已删除,无法修改");
|
||||
}
|
||||
int update = feConfNotificationRulesDao.updateStatus(feConfNotificationRulesEntity);
|
||||
if(update >0){
|
||||
return feConfNotificationRulesDao.queryById(feConfNotificationRulesEntity.getId());
|
||||
}else{
|
||||
throw new RuntimeException("更新失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改通知规则
|
||||
* @param feConfNotificationRulesEntity
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public FeConfNotificationRulesEntity updateFeConfNotificationRulesEntity(FeConfNotificationRulesEntity feConfNotificationRulesEntity) throws Exception {
|
||||
if(feConfNotificationRulesEntity.getSts().equals("N")){
|
||||
throw new Exception("该记录已删除,修改失败");
|
||||
}
|
||||
FeConfNotificationRulesEntity update = feConfNotificationRulesDao.update(feConfNotificationRulesEntity);
|
||||
return update;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue