You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
997 B
16 lines
997 B
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.example.web.mapper.UsersMapper">
|
|
<select id="selectCustomersForReturnFlowCheck" resultType="com.example.web.entity.Users">
|
|
SELECT user_id as userId, phone_number as phoneNumber, level, updated_at, followup_at FROM users WHERE updated_at >= DATE_SUB(NOW(), INTERVAL 3 DAY) AND (followup_at IS NULL OR followup_at < DATE_SUB(NOW(), INTERVAL 3 DAY)) AND level != 'organization-sea-pools' AND deleted = 0
|
|
</select>
|
|
<update id="updateByUserId" parameterType="com.example.web.entity.Users">
|
|
UPDATE users
|
|
<set>
|
|
<if test="level != null">level = #{level},</if>
|
|
<if test="updated_at != null">updated_at = #{updated_at},</if>
|
|
<if test="followup_at != null">followup_at = #{followup_at},</if>
|
|
</set>
|
|
WHERE user_id = #{userId}
|
|
</update>
|
|
</mapper>
|