|
|
@@ -22,99 +22,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="month" column="month" />
|
|
|
</resultMap>
|
|
|
|
|
|
- <sql id="selectPointUserLogVo">
|
|
|
- select id, user_id, activity_id, activity_name, task_id, task_type, points, balance_after, source_log_id, biz_order_id, expire_time, is_expired, create_time, op_type, month from point_user_log
|
|
|
- </sql>
|
|
|
-
|
|
|
- <select id="selectPointUserLogList" parameterType="PointUserLog" resultMap="PointUserLogResult">
|
|
|
- <include refid="selectPointUserLogVo"/>
|
|
|
- <where>
|
|
|
- <if test="userId != null "> and user_id = #{userId}</if>
|
|
|
- <if test="activityId != null "> and activity_id = #{activityId}</if>
|
|
|
- <if test="activityName != null and activityName != ''"> and activity_name like concat('%', #{activityName}, '%')</if>
|
|
|
- <if test="taskId != null "> and task_id = #{taskId}</if>
|
|
|
- <if test="taskType != null "> and task_type = #{taskType}</if>
|
|
|
- <if test="points != null "> and points = #{points}</if>
|
|
|
- <if test="balanceAfter != null "> and balance_after = #{balanceAfter}</if>
|
|
|
- <if test="sourceLogId != null "> and source_log_id = #{sourceLogId}</if>
|
|
|
- <if test="bizOrderId != null and bizOrderId != ''"> and biz_order_id = #{bizOrderId}</if>
|
|
|
- <if test="expireTime != null "> and expire_time = #{expireTime}</if>
|
|
|
- <if test="isExpired != null "> and is_expired = #{isExpired}</if>
|
|
|
- <if test="opType != null "> and op_type = #{opType}</if>
|
|
|
- <if test="month != null and month != ''"> and month = #{month}</if>
|
|
|
- </where>
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="selectPointUserLogById" parameterType="String" resultMap="PointUserLogResult">
|
|
|
- <include refid="selectPointUserLogVo"/>
|
|
|
- where id = #{id}
|
|
|
- </select>
|
|
|
-
|
|
|
- <insert id="insertPointUserLog" parameterType="PointUserLog" useGeneratedKeys="true" keyProperty="id">
|
|
|
- insert into point_user_log
|
|
|
- <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="userId != null">user_id,</if>
|
|
|
- <if test="activityId != null">activity_id,</if>
|
|
|
- <if test="activityName != null and activityName != ''">activity_name,</if>
|
|
|
- <if test="taskId != null">task_id,</if>
|
|
|
- <if test="taskType != null">task_type,</if>
|
|
|
- <if test="points != null">points,</if>
|
|
|
- <if test="balanceAfter != null">balance_after,</if>
|
|
|
- <if test="sourceLogId != null">source_log_id,</if>
|
|
|
- <if test="bizOrderId != null">biz_order_id,</if>
|
|
|
- <if test="expireTime != null">expire_time,</if>
|
|
|
- <if test="isExpired != null">is_expired,</if>
|
|
|
- <if test="createTime != null">create_time,</if>
|
|
|
- <if test="opType != null">op_type,</if>
|
|
|
- <if test="month != null and month != ''">month,</if>
|
|
|
- </trim>
|
|
|
- <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="userId != null">#{userId},</if>
|
|
|
- <if test="activityId != null">#{activityId},</if>
|
|
|
- <if test="activityName != null and activityName != ''">#{activityName},</if>
|
|
|
- <if test="taskId != null">#{taskId},</if>
|
|
|
- <if test="taskType != null">#{taskType},</if>
|
|
|
- <if test="points != null">#{points},</if>
|
|
|
- <if test="balanceAfter != null">#{balanceAfter},</if>
|
|
|
- <if test="sourceLogId != null">#{sourceLogId},</if>
|
|
|
- <if test="bizOrderId != null">#{bizOrderId},</if>
|
|
|
- <if test="expireTime != null">#{expireTime},</if>
|
|
|
- <if test="isExpired != null">#{isExpired},</if>
|
|
|
- <if test="createTime != null">#{createTime},</if>
|
|
|
- <if test="opType != null">#{opType},</if>
|
|
|
- <if test="month != null and month != ''">#{month},</if>
|
|
|
- </trim>
|
|
|
- </insert>
|
|
|
-
|
|
|
- <update id="updatePointUserLog" parameterType="PointUserLog">
|
|
|
- update point_user_log
|
|
|
- <trim prefix="SET" suffixOverrides=",">
|
|
|
- <if test="userId != null">user_id = #{userId},</if>
|
|
|
- <if test="activityId != null">activity_id = #{activityId},</if>
|
|
|
- <if test="activityName != null and activityName != ''">activity_name = #{activityName},</if>
|
|
|
- <if test="taskId != null">task_id = #{taskId},</if>
|
|
|
- <if test="taskType != null">task_type = #{taskType},</if>
|
|
|
- <if test="points != null">points = #{points},</if>
|
|
|
- <if test="balanceAfter != null">balance_after = #{balanceAfter},</if>
|
|
|
- <if test="sourceLogId != null">source_log_id = #{sourceLogId},</if>
|
|
|
- <if test="bizOrderId != null">biz_order_id = #{bizOrderId},</if>
|
|
|
- <if test="expireTime != null">expire_time = #{expireTime},</if>
|
|
|
- <if test="isExpired != null">is_expired = #{isExpired},</if>
|
|
|
- <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
- <if test="opType != null">op_type = #{opType},</if>
|
|
|
- <if test="month != null and month != ''">month = #{month},</if>
|
|
|
- </trim>
|
|
|
- where id = #{id}
|
|
|
- </update>
|
|
|
-
|
|
|
- <delete id="deletePointUserLogById" parameterType="String">
|
|
|
- delete from point_user_log where id = #{id}
|
|
|
- </delete>
|
|
|
-
|
|
|
- <delete id="deletePointUserLogByIds" parameterType="String">
|
|
|
- delete from point_user_log where id in
|
|
|
- <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
- #{id}
|
|
|
- </foreach>
|
|
|
- </delete>
|
|
|
</mapper>
|