|
|
@@ -14,19 +14,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="isDelete" column="is_delete" />
|
|
|
<result property="userId" column="user_id" />
|
|
|
<result property="status" column="status" />
|
|
|
+ <result property="loginName" column="login_name" />
|
|
|
+ <result property="userName" column="user_name" />
|
|
|
+ <result property="alertContent" column="alert_content" />
|
|
|
+ <result property="photoUrl" column="photo_url" />
|
|
|
+
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectAlertUpvoteLogVo">
|
|
|
- select alert_upvote_id, alert_id, create_by, create_time, update_by, update_time, is_delete, user_id, status 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>
|
|
|
|
|
|
<select id="selectAlertUpvoteLogList" parameterType="AlertUpvoteLog" resultMap="AlertUpvoteLogResult">
|
|
|
<include refid="selectAlertUpvoteLogVo"/>
|
|
|
- <where>
|
|
|
- <if test="alertId != null "> and alert_id = #{alertId}</if>
|
|
|
- <if test="isDelete != null "> and is_delete = #{isDelete}</if>
|
|
|
- <if test="userId != null "> and user_id = #{userId}</if>
|
|
|
+ <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>
|
|
|
+ <if test="startTime != null "> and create_time >= #{startTime}</if>
|
|
|
+ <if test="endTime != null "> and create_time < #{endTime}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
@@ -46,6 +53,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="isDelete != null ">is_delete,</if>
|
|
|
<if test="userId != null ">user_id,</if>
|
|
|
<if test="status != null ">status,</if>
|
|
|
+ <if test="loginName != null ">login_name,</if>
|
|
|
+ <if test="userName != null ">user_name,</if>
|
|
|
+ <if test="alertContent != null ">alert_content,</if>
|
|
|
+ <if test="photoUrl != null ">photo_url,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="alertId != null ">#{alertId},</if>
|
|
|
@@ -56,6 +67,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="isDelete != null ">#{isDelete},</if>
|
|
|
<if test="userId != null ">#{userId},</if>
|
|
|
<if test="status != null ">#{status},</if>
|
|
|
+ <if test="loginName != null ">#{loginName},</if>
|
|
|
+ <if test="userName != null ">#{userName},</if>
|
|
|
+ <if test="alertContent != null ">#{alertContent},</if>
|
|
|
+ <if test="photoUrl != null ">#{photoUrl},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
@@ -70,6 +85,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="isDelete != null ">is_delete = #{isDelete},</if>
|
|
|
<if test="userId != null ">user_id = #{userId},</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="alertContent != null ">alert_content = #{alertContent},</if>
|
|
|
+ <if test="photoUrl != null ">photo_url = #{photoUrl},</if>
|
|
|
</trim>
|
|
|
where alert_upvote_id = #{alertUpvoteId}
|
|
|
</update>
|