Commit 017ad585 authored by 鲍德's avatar 鲍德

风险巡查项目岗位返回增加用户姓名

parent 7465d894
...@@ -50,6 +50,16 @@ public class CurrentRiskPost extends BaseEntityClean ...@@ -50,6 +50,16 @@ public class CurrentRiskPost extends BaseEntityClean
/** 删除标志(0代表存在 1代表删除) */ /** 删除标志(0代表存在 1代表删除) */
private String delFlag; private String delFlag;
private String nickName;
public String getNickName() {
return nickName;
}
public void setNickName(String nickName) {
this.nickName = nickName;
}
public void setId(Long id) public void setId(Long id)
{ {
this.id = id; this.id = id;
......
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.censoft.censoftrongtong.mapper.CurrentRiskPostMapper"> <mapper namespace="com.censoft.censoftrongtong.mapper.CurrentRiskPostMapper">
<resultMap type="com.censoft.censoftrongtong.domain.CurrentRiskPost" id="CurrentRiskPostResult"> <resultMap type="com.censoft.censoftrongtong.domain.CurrentRiskPost" id="CurrentRiskPostResult">
<result property="id" column="id" /> <result property="id" column="id"/>
<result property="projectId" column="project_id" /> <result property="projectId" column="project_id"/>
<result property="riskPostCode" column="risk_post_code" /> <result property="riskPostCode" column="risk_post_code"/>
<result property="riskPostName" column="risk_post_name" /> <result property="riskPostName" column="risk_post_name"/>
<result property="patrolType" column="patrol_type" /> <result property="patrolType" column="patrol_type"/>
<result property="riskPostDesc" column="risk_post_desc" /> <result property="riskPostDesc" column="risk_post_desc"/>
<result property="userId" column="user_id" /> <result property="userId" column="user_id"/>
<result property="sortNum" column="sort_num" /> <result property="sortNum" column="sort_num"/>
<result property="delFlag" column="del_flag" /> <result property="delFlag" column="del_flag"/>
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by"/>
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time"/>
<result property="remark" column="remark" /> <result property="remark" column="remark"/>
<result property="nickName" column="nickName"/>
</resultMap> </resultMap>
<sql id="selectCurrentRiskPostVo"> <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> </sql>
<select id="selectCurrentRiskPostList" parameterType="com.censoft.censoftrongtong.domain.CurrentRiskPost" resultMap="CurrentRiskPostResult"> <select id="selectCurrentRiskPostList" parameterType="com.censoft.censoftrongtong.domain.CurrentRiskPost"
<include refid="selectCurrentRiskPostVo"/> 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> <where>
<if test="projectId != null "> and project_id = #{projectId}</if> <if test="projectId != null ">and project_id = #{projectId}</if>
<if test="riskPostCode != null and riskPostCode != ''"> and risk_post_code = #{riskPostCode}</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 test="patrolType != null and patrolType != ''"> and patrol_type = #{patrolType}</if> '%')
<if test="riskPostDesc != null and riskPostDesc != ''"> and risk_post_desc = #{riskPostDesc}</if> </if>
<if test="userId != null and userId != ''"> and user_id = #{userId}</if> <if test="patrolType != null and patrolType != ''">and patrol_type = #{patrolType}</if>
<if test="sortNum != null "> and sort_num = #{sortNum}</if> <if test="riskPostDesc != null and riskPostDesc != ''">and risk_post_desc = #{riskPostDesc}</if>
<if test="userId != null and userId != ''">and user_id = #{userId}</if>
<if test="sortNum != null ">and sort_num = #{sortNum}</if>
</where> </where>
</select> </select>
...@@ -100,7 +131,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -100,7 +131,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update> </update>
<delete id="deleteCurrentRiskPostById" parameterType="Long"> <delete id="deleteCurrentRiskPostById" parameterType="Long">
delete from current_risk_post where id = #{id} delete
from current_risk_post
where id = #{id}
</delete> </delete>
<delete id="deleteCurrentRiskPostByIds" parameterType="String"> <delete id="deleteCurrentRiskPostByIds" parameterType="String">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment