订单超时自动好评Job测试
This commit is contained in:
@@ -73,27 +73,30 @@
|
||||
</select>
|
||||
|
||||
<!--订单评论超时分页-->
|
||||
<select id="selectOrderCommentTimeOutPage" resultType="cn.iocoder.mall.order.biz.dataobject.OrderCommentDO">
|
||||
<select id="selectOrderCommentTimeOutPage" parameterType="cn.iocoder.mall.order.api.dto.OrderCommentTimeOutPageDTO" resultType="cn.iocoder.mall.order.biz.dataobject.OrderCommentDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM order_comment
|
||||
WHERE
|
||||
comment_state = #{commentState}
|
||||
having
|
||||
TIMESTAMPDIFF(DAY,create_time,NOW()) > #{orverDay}
|
||||
LIMIT ${pageNo*pageSize},${pageSize}
|
||||
comment_state = #{commentTimeOut.commentState}
|
||||
HAVING
|
||||
TIMESTAMPDIFF(DAY,create_time,NOW()) > #{commentTimeOut.overDay}
|
||||
LIMIT ${commentTimeOut.pageNo*commentTimeOut.pageSize},${commentTimeOut.pageSize}
|
||||
</select>
|
||||
|
||||
<!--批量更新订单评论-->
|
||||
<update id="updateBatchOrderCommentState" parameterType="java.util.List">
|
||||
<update id="updateBatchOrderCommentState">
|
||||
UPDATE order_comment
|
||||
SET
|
||||
comment_state = #{commentState}
|
||||
WHERE
|
||||
id IN
|
||||
<foreach collection="list" item="item" index="index" open="" close="" separator=";">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
id
|
||||
IN
|
||||
<if test="list !=null">
|
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
</if>
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
@@ -74,6 +74,8 @@
|
||||
<foreach collection="commentIds" item="commentId" separator="," open="(" close=")">
|
||||
#{commentId}
|
||||
</foreach>
|
||||
AND
|
||||
user_type = #{userType}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user