Loading censoft-rongtong/src/main/java/com/censoft/censoftrongtong/domain/CurrentRiskPost.java +11 −1 Original line number Diff line number Diff line Loading @@ -50,6 +50,16 @@ public class CurrentRiskPost extends BaseEntityClean /** 删除标志(0代表存在 1代表删除) */ private String delFlag; private String nickName; public String getNickName() { return nickName; } public void setNickName(String nickName) { this.nickName = nickName; } public void setId(Long id) { this.id = id; Loading censoft-rongtong/src/main/resources/mapper/system/CurrentRiskPostMapper.xml +67 −34 Original line number Diff line number Diff line Loading @@ -19,18 +19,49 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <result property="updateBy" column="update_by"/> <result property="updateTime" column="update_time"/> <result property="remark" column="remark"/> <result property="nickName" column="nickName"/> </resultMap> <sql id="selectCurrentRiskPostVo"> select id, project_id, risk_post_code, risk_post_name, patrol_type, risk_post_desc, user_id, sort_num, del_flag, create_by, create_time, update_by, update_time, remark from current_risk_post select id, project_id, risk_post_code, risk_post_name, patrol_type, risk_post_desc, user_id, sort_num, del_flag, create_by, create_time, update_by, update_time, remark from current_risk_post </sql> <select id="selectCurrentRiskPostList" parameterType="com.censoft.censoftrongtong.domain.CurrentRiskPost" resultMap="CurrentRiskPostResult"> <include refid="selectCurrentRiskPostVo"/> <select id="selectCurrentRiskPostList" parameterType="com.censoft.censoftrongtong.domain.CurrentRiskPost" resultMap="CurrentRiskPostResult"> SELECT a.id, project_id, risk_post_code, risk_post_name, patrol_type, risk_post_desc, a.user_id, sort_num, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, GROUP_CONCAT(b.nick_name) nickName FROM current_risk_post a LEFT JOIN sys_user b on FIND_IN_SET(b.user_id,a.user_id) <where> <if test="projectId != null ">and project_id = #{projectId}</if> <if test="riskPostCode != null and riskPostCode != ''">and risk_post_code = #{riskPostCode}</if> <if test="riskPostName != null and riskPostName != ''"> and risk_post_name like concat('%', #{riskPostName}, '%')</if> <if test="riskPostName != null and riskPostName != ''">and risk_post_name like concat('%', #{riskPostName}, '%') </if> <if test="patrolType != null and patrolType != ''">and patrol_type = #{patrolType}</if> <if test="riskPostDesc != null and riskPostDesc != ''">and risk_post_desc = #{riskPostDesc}</if> <if test="userId != null and userId != ''">and user_id = #{userId}</if> Loading Loading @@ -100,7 +131,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" </update> <delete id="deleteCurrentRiskPostById" parameterType="Long"> delete from current_risk_post where id = #{id} delete from current_risk_post where id = #{id} </delete> <delete id="deleteCurrentRiskPostByIds" parameterType="String"> Loading Loading
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/domain/CurrentRiskPost.java +11 −1 Original line number Diff line number Diff line Loading @@ -50,6 +50,16 @@ public class CurrentRiskPost extends BaseEntityClean /** 删除标志(0代表存在 1代表删除) */ private String delFlag; private String nickName; public String getNickName() { return nickName; } public void setNickName(String nickName) { this.nickName = nickName; } public void setId(Long id) { this.id = id; Loading
censoft-rongtong/src/main/resources/mapper/system/CurrentRiskPostMapper.xml +67 −34 Original line number Diff line number Diff line Loading @@ -19,18 +19,49 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <result property="updateBy" column="update_by"/> <result property="updateTime" column="update_time"/> <result property="remark" column="remark"/> <result property="nickName" column="nickName"/> </resultMap> <sql id="selectCurrentRiskPostVo"> select id, project_id, risk_post_code, risk_post_name, patrol_type, risk_post_desc, user_id, sort_num, del_flag, create_by, create_time, update_by, update_time, remark from current_risk_post select id, project_id, risk_post_code, risk_post_name, patrol_type, risk_post_desc, user_id, sort_num, del_flag, create_by, create_time, update_by, update_time, remark from current_risk_post </sql> <select id="selectCurrentRiskPostList" parameterType="com.censoft.censoftrongtong.domain.CurrentRiskPost" resultMap="CurrentRiskPostResult"> <include refid="selectCurrentRiskPostVo"/> <select id="selectCurrentRiskPostList" parameterType="com.censoft.censoftrongtong.domain.CurrentRiskPost" resultMap="CurrentRiskPostResult"> SELECT a.id, project_id, risk_post_code, risk_post_name, patrol_type, risk_post_desc, a.user_id, sort_num, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, GROUP_CONCAT(b.nick_name) nickName FROM current_risk_post a LEFT JOIN sys_user b on FIND_IN_SET(b.user_id,a.user_id) <where> <if test="projectId != null ">and project_id = #{projectId}</if> <if test="riskPostCode != null and riskPostCode != ''">and risk_post_code = #{riskPostCode}</if> <if test="riskPostName != null and riskPostName != ''"> and risk_post_name like concat('%', #{riskPostName}, '%')</if> <if test="riskPostName != null and riskPostName != ''">and risk_post_name like concat('%', #{riskPostName}, '%') </if> <if test="patrolType != null and patrolType != ''">and patrol_type = #{patrolType}</if> <if test="riskPostDesc != null and riskPostDesc != ''">and risk_post_desc = #{riskPostDesc}</if> <if test="userId != null and userId != ''">and user_id = #{userId}</if> Loading Loading @@ -100,7 +131,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" </update> <delete id="deleteCurrentRiskPostById" parameterType="Long"> delete from current_risk_post where id = #{id} delete from current_risk_post where id = #{id} </delete> <delete id="deleteCurrentRiskPostByIds" parameterType="String"> Loading