|
@@ -1,35 +1,35 @@
|
|
|
<?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">
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.ruoyi.system.mapper.CpsUsrApplyMapper">
|
|
|
|
|
|
<resultMap type="com.ruoyi.system.domain.CpsUsrApply" id="CpsUsrApplyResult">
|
|
|
- <result property="id" column="id" />
|
|
|
- <result property="usrName" column="usr_name" />
|
|
|
- <result property="tel" column="tel" />
|
|
|
- <result property="orgUnitName" column="org_unit_name" />
|
|
|
- <result property="uniLevel" column="uni_level" />
|
|
|
- <result property="email" column="email" />
|
|
|
- <result property="usrType" column="usr_type" />
|
|
|
- <result property="conferenceFlag" column="conference_flag" />
|
|
|
- <result property="conferenceRel" column="conference_rel" />
|
|
|
- <result property="applyType" column="apply_type" />
|
|
|
- <result property="reviewState" column="review_state" />
|
|
|
- <result property="reviewMsg" column="review_msg" />
|
|
|
- <result property="usrWechatId" column="usr_wechat_id" />
|
|
|
- <result property="contentId" column="content_id" />
|
|
|
+ <result property="id" column="id"/>
|
|
|
+ <result property="usrName" column="usr_name"/>
|
|
|
+ <result property="tel" column="tel"/>
|
|
|
+ <result property="orgUnitName" column="org_unit_name"/>
|
|
|
+ <result property="uniLevel" column="uni_level"/>
|
|
|
+ <result property="email" column="email"/>
|
|
|
+ <result property="usrType" column="usr_type"/>
|
|
|
+ <result property="conferenceFlag" column="conference_flag"/>
|
|
|
+ <result property="conferenceRel" column="conference_rel"/>
|
|
|
+ <result property="applyType" column="apply_type"/>
|
|
|
+ <result property="reviewState" column="review_state"/>
|
|
|
+ <result property="reviewMsg" column="review_msg"/>
|
|
|
+ <result property="usrWechatId" column="usr_wechat_id"/>
|
|
|
+ <result property="contentId" column="content_id"/>
|
|
|
<result property="contentTitle" column="content_title"/>
|
|
|
<result property="deptId" column="dept_id"/>
|
|
|
- <result property="wayComing" column="way_coming" />
|
|
|
- <result property="comInfo" column="com_info" />
|
|
|
- <result property="wayBack" column="way_back" />
|
|
|
- <result property="backInfo" column="back_info" />
|
|
|
- <result property="remark" column="remark" />
|
|
|
- <result property="updateTime" column="update_time" />
|
|
|
- <result property="createTime" column="create_time" />
|
|
|
- <result property="createBy" column="create_by" />
|
|
|
- <result property="updateBy" column="update_by" />
|
|
|
+ <result property="wayComing" column="way_coming"/>
|
|
|
+ <result property="comInfo" column="com_info"/>
|
|
|
+ <result property="wayBack" column="way_back"/>
|
|
|
+ <result property="backInfo" column="back_info"/>
|
|
|
+ <result property="remark" column="remark"/>
|
|
|
+ <result property="updateTime" column="update_time"/>
|
|
|
+ <result property="createTime" column="create_time"/>
|
|
|
+ <result property="createBy" column="create_by"/>
|
|
|
+ <result property="updateBy" column="update_by"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectCpsUsrApplyVo">
|
|
@@ -48,27 +48,53 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
usr_wechat_id,
|
|
|
content_id,
|
|
|
content_title,
|
|
|
- dept_id, way_coming, com_info, way_back, back_info, remark,
|
|
|
+ dept_id,
|
|
|
+ way_coming,
|
|
|
+ com_info,
|
|
|
+ way_back,
|
|
|
+ back_info,
|
|
|
+ remark,
|
|
|
update_time,
|
|
|
create_time,
|
|
|
create_by,
|
|
|
update_by
|
|
|
from cps_usr_apply usrApply
|
|
|
</sql>
|
|
|
+ <select id="qryUserApply">
|
|
|
+ SELECT usrApply.id,
|
|
|
+ usr_name usrName,
|
|
|
+ tel,
|
|
|
+ apply_type applyType,
|
|
|
+ review_state reviewState,
|
|
|
+ usr_wechat_id usrWechatId,
|
|
|
+ content_id contentId,
|
|
|
+ content_title contentTitle,
|
|
|
+ usrApply.create_time createTime,
|
|
|
+ dic.dict_label applyTypeName,
|
|
|
+ dicReview.dict_label reviewStateName
|
|
|
+ FROM cps_usr_apply usrApply
|
|
|
+ inner JOIN sys_dict_data dic on usrApply.apply_type = dic.dict_value and dic.dict_type = 'apply_type'
|
|
|
+ inner JOIN sys_dict_data dicReview
|
|
|
+ on usrApply.review_state = dicReview.dict_value and dicReview.dict_type = 'review_state'
|
|
|
+ where usrApply.usr_wechat_id = #{usrId}
|
|
|
+ </select>
|
|
|
|
|
|
- <select id="selectCpsUsrApplyList" parameterType="com.ruoyi.system.domain.CpsUsrApply" resultMap="CpsUsrApplyResult">
|
|
|
+ <select id="selectCpsUsrApplyList" parameterType="com.ruoyi.system.domain.CpsUsrApply"
|
|
|
+ resultMap="CpsUsrApplyResult">
|
|
|
<include refid="selectCpsUsrApplyVo"/>
|
|
|
<where>
|
|
|
- <if test="usrName != null and usrName != ''"> and usr_name like concat('%', #{usrName}, '%')</if>
|
|
|
- <if test="tel != null and tel != ''"> and tel = #{tel}</if>
|
|
|
- <if test="orgUnitName != null and orgUnitName != ''"> and org_unit_name like concat('%', #{orgUnitName}, '%')</if>
|
|
|
- <if test="uniLevel != null and uniLevel != ''"> and uni_levle = #{uniLevel}</if>
|
|
|
- <if test="usrType != null and usrType != ''"> and usr_type = #{usrType}</if>
|
|
|
- <if test="conferenceFlag != null and conferenceFlag != ''"> and conference_flag = #{conferenceFlag}</if>
|
|
|
- <if test="applyType != null and applyType != ''"> and apply_type = #{applyType}</if>
|
|
|
- <if test="reviewState != null and reviewState != ''"> and review_state = #{reviewState}</if>
|
|
|
- <if test="wayComing != null and wayComing != ''"> and way_coming = #{wayComing}</if>
|
|
|
- <if test="wayBack != null and wayBack != ''"> and way_back = #{wayBack}</if>
|
|
|
+ <if test="usrName != null and usrName != ''">and usr_name like concat('%', #{usrName}, '%')</if>
|
|
|
+ <if test="tel != null and tel != ''">and tel = #{tel}</if>
|
|
|
+ <if test="orgUnitName != null and orgUnitName != ''">and org_unit_name like concat('%', #{orgUnitName},
|
|
|
+ '%')
|
|
|
+ </if>
|
|
|
+ <if test="uniLevel != null and uniLevel != ''">and uni_levle = #{uniLevel}</if>
|
|
|
+ <if test="usrType != null and usrType != ''">and usr_type = #{usrType}</if>
|
|
|
+ <if test="conferenceFlag != null and conferenceFlag != ''">and conference_flag = #{conferenceFlag}</if>
|
|
|
+ <if test="applyType != null and applyType != ''">and apply_type = #{applyType}</if>
|
|
|
+ <if test="reviewState != null and reviewState != ''">and review_state = #{reviewState}</if>
|
|
|
+ <if test="wayComing != null and wayComing != ''">and way_coming = #{wayComing}</if>
|
|
|
+ <if test="wayBack != null and wayBack != ''">and way_back = #{wayBack}</if>
|
|
|
${params.dataScope}
|
|
|
</where>
|
|
|
</select>
|
|
@@ -83,7 +109,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
where tel = #{tel} and apply_type = #{meetingType}
|
|
|
</select>
|
|
|
|
|
|
- <insert id="insertCpsUsrApply" parameterType="com.ruoyi.system.domain.CpsUsrApply" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ <insert id="insertCpsUsrApply" parameterType="com.ruoyi.system.domain.CpsUsrApply" useGeneratedKeys="true"
|
|
|
+ keyProperty="id">
|
|
|
insert into cps_usr_apply
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="usrName != null">usr_name,</if>
|
|
@@ -110,7 +137,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="createTime != null">create_time,</if>
|
|
|
<if test="createBy != null">create_by,</if>
|
|
|
<if test="updateBy != null">update_by,</if>
|
|
|
- </trim>
|
|
|
+ </trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="usrName != null">#{usrName},</if>
|
|
|
<if test="tel != null">#{tel},</if>
|
|
@@ -136,10 +163,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
|
<if test="createBy != null">#{createBy},</if>
|
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
|
- </trim>
|
|
|
+ </trim>
|
|
|
</insert>
|
|
|
|
|
|
- <insert id="insertCpsUsrApplyOrUpdate" parameterType="com.ruoyi.system.domain.CpsUsrApply" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ <insert id="insertCpsUsrApplyOrUpdate" parameterType="com.ruoyi.system.domain.CpsUsrApply" useGeneratedKeys="true"
|
|
|
+ keyProperty="id">
|
|
|
insert into cps_usr_apply
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="usrName != null">usr_name,</if>
|
|
@@ -251,7 +279,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</update>
|
|
|
|
|
|
<delete id="deleteCpsUsrApplyById" parameterType="Long">
|
|
|
- delete from cps_usr_apply where id = #{id}
|
|
|
+ delete
|
|
|
+ from cps_usr_apply
|
|
|
+ where id = #{id}
|
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteCpsUsrApplyByIds" parameterType="String">
|