|
@@ -16,9 +16,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="status" column="status" />
|
|
<result property="status" column="status" />
|
|
|
<result property="loginName" column="login_name" />
|
|
<result property="loginName" column="login_name" />
|
|
|
<result property="userName" column="user_name" />
|
|
<result property="userName" column="user_name" />
|
|
|
|
|
+ <result property="sapEmployeeId" column="alert_title" />
|
|
|
|
|
+ <result property="postName" column="post_name" />
|
|
|
<result property="alertContent" column="alert_content" />
|
|
<result property="alertContent" column="alert_content" />
|
|
|
<result property="photoUrl" column="photo_url" />
|
|
<result property="photoUrl" column="photo_url" />
|
|
|
<result property="statusName" column="statusName" />
|
|
<result property="statusName" column="statusName" />
|
|
|
|
|
+ <result property="alertTitle" column="alert_title" />
|
|
|
|
|
+ <result property="companyName" column="company_name" />
|
|
|
|
|
+ <result property="officeName" column="office_name" />
|
|
|
|
|
+ <result property="subOfficeName" column="sub_office_name" />
|
|
|
|
|
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
@@ -26,34 +32,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
select alert_upvote_id, alert_id, create_by, create_time, update_by, update_time, is_delete, user_id, status,login_name,user_name,alert_content,photo_url from alert_upvote_log
|
|
select alert_upvote_id, alert_id, create_by, create_time, update_by, update_time, is_delete, user_id, status,login_name,user_name,alert_content,photo_url from alert_upvote_log
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
|
- <select id="selectAlertUpvoteLogList" parameterType="AlertUpvoteLog" resultMap="AlertUpvoteLogResult">
|
|
|
|
|
- select alert_upvote_id,
|
|
|
|
|
- alert_id,
|
|
|
|
|
- create_by,
|
|
|
|
|
- create_time,
|
|
|
|
|
- update_by,
|
|
|
|
|
- update_time,
|
|
|
|
|
- is_delete,
|
|
|
|
|
- user_id,
|
|
|
|
|
- status,
|
|
|
|
|
- login_name,
|
|
|
|
|
- user_name,
|
|
|
|
|
- IF(alert_content!='null', alert_content, "") alert_content,
|
|
|
|
|
- photo_url,
|
|
|
|
|
|
|
+ <select id="selectAlertUpvoteLogList" resultType="com.dgtly.system.domain.AlertUpvoteLog">
|
|
|
|
|
+ select alert_upvote_id as alertUpvoteId,
|
|
|
|
|
+ alert_id as alertId,
|
|
|
|
|
+ create_time as createTime,
|
|
|
|
|
+ update_time as updateTime,
|
|
|
|
|
+ user_id as userId,
|
|
|
|
|
+ status as status,
|
|
|
|
|
+ login_name as loginName,
|
|
|
|
|
+ user_name as userName,
|
|
|
|
|
+ sap_employee_id as sapEmployeeId,
|
|
|
|
|
+ post_name as postName,
|
|
|
|
|
+ alert_content as alertContent,
|
|
|
|
|
+ photo_url as photoUrl,
|
|
|
|
|
+ alert_title as alertTitle,
|
|
|
|
|
+ company_name as companyName,
|
|
|
|
|
+ office_name as officeName,
|
|
|
|
|
+ sub_office_name as subOfficeName,
|
|
|
CASE
|
|
CASE
|
|
|
WHEN status = '0' THEN '无'
|
|
WHEN status = '0' THEN '无'
|
|
|
WHEN status = '1' THEN '赞'
|
|
WHEN status = '1' THEN '赞'
|
|
|
WHEN status = '2' THEN '踩'
|
|
WHEN status = '2' THEN '踩'
|
|
|
END statusName
|
|
END statusName
|
|
|
from alert_upvote_log
|
|
from alert_upvote_log
|
|
|
- <where>
|
|
|
|
|
- <if test="userName != null "> and user_name like concat('%', #{userName}, '%')</if>
|
|
|
|
|
- <if test="loginName != null "> and login_name like concat('%', #{loginName}, '%')</if>
|
|
|
|
|
- <if test="alertContent != null "> and alert_content like concat('%', #{alertContent}, '%')</if>
|
|
|
|
|
- <if test="status != null "> and status = #{status}</if>
|
|
|
|
|
|
|
+ where status != '0'
|
|
|
|
|
+ <if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
|
|
|
|
+ <if test="loginName != null and loginName != '' "> and login_name like concat('%', #{loginName}, '%')</if>
|
|
|
|
|
+ <if test="alertContent != null and alertContent != '' "> and alert_content like concat('%', #{alertContent}, '%')</if>
|
|
|
|
|
+ <if test="status != null"> and status = #{status}</if>
|
|
|
<if test="startTime != null "> and create_time >= #{startTime}</if>
|
|
<if test="startTime != null "> and create_time >= #{startTime}</if>
|
|
|
<if test="endTime != null "> and create_time < #{endTime}</if>
|
|
<if test="endTime != null "> and create_time < #{endTime}</if>
|
|
|
- </where>
|
|
|
|
|
order by create_time desc
|
|
order by create_time desc
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
@@ -73,10 +81,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="isDelete != null ">is_delete,</if>
|
|
<if test="isDelete != null ">is_delete,</if>
|
|
|
<if test="userId != null ">user_id,</if>
|
|
<if test="userId != null ">user_id,</if>
|
|
|
<if test="status != null ">status,</if>
|
|
<if test="status != null ">status,</if>
|
|
|
- <if test="loginName != null ">login_name,</if>
|
|
|
|
|
- <if test="userName != null ">user_name,</if>
|
|
|
|
|
|
|
+ <if test="alertTitle != null and alertTitle != ''">alert_title,</if>
|
|
|
<if test="alertContent != null ">alert_content,</if>
|
|
<if test="alertContent != null ">alert_content,</if>
|
|
|
<if test="photoUrl != null ">photo_url,</if>
|
|
<if test="photoUrl != null ">photo_url,</if>
|
|
|
|
|
+ <if test="loginName != null and loginName != ''">login_name,</if>
|
|
|
|
|
+ <if test="userName != null and userName != ''">user_name,</if>
|
|
|
|
|
+ <if test="postName != null and postName != ''">post_name,</if>
|
|
|
|
|
+ <if test="sapEmployeeId != null and sapEmployeeId != ''">sap_employee_id,</if>
|
|
|
|
|
+ <if test="salesLevel != null and salesLevel != ''">sales_level,</if>
|
|
|
|
|
+ <if test="companyName != null and companyName != ''">company_name,</if>
|
|
|
|
|
+ <if test="officeName != null and officeName != ''">office_name,</if>
|
|
|
|
|
+ <if test="subOfficeName != null and subOfficeName != ''">sub_office_name,</if>
|
|
|
</trim>
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="alertId != null ">#{alertId},</if>
|
|
<if test="alertId != null ">#{alertId},</if>
|
|
@@ -87,10 +102,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="isDelete != null ">#{isDelete},</if>
|
|
<if test="isDelete != null ">#{isDelete},</if>
|
|
|
<if test="userId != null ">#{userId},</if>
|
|
<if test="userId != null ">#{userId},</if>
|
|
|
<if test="status != null ">#{status},</if>
|
|
<if test="status != null ">#{status},</if>
|
|
|
- <if test="loginName != null ">#{loginName},</if>
|
|
|
|
|
- <if test="userName != null ">#{userName},</if>
|
|
|
|
|
|
|
+ <if test="alertTitle != null and alertTitle != ''">#{alertTitle},</if>
|
|
|
<if test="alertContent != null ">#{alertContent},</if>
|
|
<if test="alertContent != null ">#{alertContent},</if>
|
|
|
<if test="photoUrl != null ">#{photoUrl},</if>
|
|
<if test="photoUrl != null ">#{photoUrl},</if>
|
|
|
|
|
+ <if test="loginName != null and loginName != ''">#{loginName},</if>
|
|
|
|
|
+ <if test="userName != null and userName != ''">#{userName},</if>
|
|
|
|
|
+ <if test="postName != null and postName != ''">#{postName},</if>
|
|
|
|
|
+ <if test="sapEmployeeId != null and sapEmployeeId != ''">#{sapEmployeeId},</if>
|
|
|
|
|
+ <if test="salesLevel != null and salesLevel != ''">#{salesLevel},</if>
|
|
|
|
|
+ <if test="companyName != null and companyName != ''">#{companyName},</if>
|
|
|
|
|
+ <if test="officeName != null and officeName != ''">#{officeName},</if>
|
|
|
|
|
+ <if test="subOfficeName != null and subOfficeName != ''">#{subOfficeName},</if>
|
|
|
</trim>
|
|
</trim>
|
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
|
@@ -105,10 +127,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="isDelete != null ">is_delete = #{isDelete},</if>
|
|
<if test="isDelete != null ">is_delete = #{isDelete},</if>
|
|
|
<if test="userId != null ">user_id = #{userId},</if>
|
|
<if test="userId != null ">user_id = #{userId},</if>
|
|
|
<if test="status != null ">status = #{status},</if>
|
|
<if test="status != null ">status = #{status},</if>
|
|
|
- <if test="loginName != null ">login_name = #{loginName},</if>
|
|
|
|
|
- <if test="userName != null ">user_name = #{userName},</if>
|
|
|
|
|
|
|
+ <if test="alertTitle != null and alertTitle != ''">alert_title = #{alertTitle},</if>
|
|
|
<if test="alertContent != null ">alert_content = #{alertContent},</if>
|
|
<if test="alertContent != null ">alert_content = #{alertContent},</if>
|
|
|
<if test="photoUrl != null ">photo_url = #{photoUrl},</if>
|
|
<if test="photoUrl != null ">photo_url = #{photoUrl},</if>
|
|
|
|
|
+ <if test="loginName != null and loginName != ''">login_name = #{loginName},</if>
|
|
|
|
|
+ <if test="userName != null and userName != ''">user_name = #{userName},</if>
|
|
|
|
|
+ <if test="postName != null and postName != ''">post_name = #{postName},</if>
|
|
|
|
|
+ <if test="sapEmployeeId != null and sapEmployeeId != ''">sap_employee_id = #{sapEmployeeId},</if>
|
|
|
|
|
+ <if test="salesLevel != null and salesLevel != ''">sales_level = #{salesLevel},</if>
|
|
|
|
|
+ <if test="companyName != null and companyName != ''">company_name = #{companyName},</if>
|
|
|
|
|
+ <if test="officeName != null and officeName != ''">office_name = #{officeName},</if>
|
|
|
|
|
+ <if test="subOfficeName != null and subOfficeName != ''">sub_office_name = #{subOfficeName},</if>
|
|
|
</trim>
|
|
</trim>
|
|
|
where alert_upvote_id = #{alertUpvoteId}
|
|
where alert_upvote_id = #{alertUpvoteId}
|
|
|
</update>
|
|
</update>
|
|
@@ -128,4 +157,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<include refid="selectAlertUpvoteLogVo"/>
|
|
<include refid="selectAlertUpvoteLogVo"/>
|
|
|
where user_id = #{userId} and alert_id = #{alertId}
|
|
where user_id = #{userId} and alert_id = #{alertId}
|
|
|
</select>
|
|
</select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="selectMasterNameByCode" resultType="com.dgtly.system.domain.AlertUpvoteLog">
|
|
|
|
|
+ select
|
|
|
|
|
+ sales_company_name AS companyName,
|
|
|
|
|
+ sales_office_name AS officeName,
|
|
|
|
|
+ sales_group_name AS subOfficeName
|
|
|
|
|
+ from data_master_customer where 1=1
|
|
|
|
|
+ <if test="customerCode !=null and customerCode !='' ">and CustomerCode =#{customerCode}</if>
|
|
|
|
|
+ <if test="salesOfficeCode !=null and salesOfficeCode !='' ">and sales_office =#{salesOfficeCode}</if>
|
|
|
|
|
+ <if test="salesGroupCode !=null and salesGroupCode !='' ">and sales_group =#{salesGroupCode}</if>
|
|
|
|
|
+ limit 1
|
|
|
|
|
+ </select>
|
|
|
</mapper>
|
|
</mapper>
|