| | |
| | | a.user_id userId, |
| | | a.nick_name nickName, |
| | | a.chat_no chatNo, |
| | | a.phone phone, |
| | | a.status status, |
| | | a.invite_id inviteId, |
| | | a.is_robot isRobot, |
| | | date_format(a.create_time, '%Y-%m-%d %H:%m:%s') createTime, |
| | | IFNULL(sum(b.total_amount), 0) totalAmount, |
| | | IFNULL(sum(b.ava_amount), 0) avaAmount |
| | |
| | | <if test="record.nickName != null and record.nickName != ''"> |
| | | and a.nick_name like CONCAT('%', CONCAT(#{record.nickName}, '%')) |
| | | </if> |
| | | <if test="record.chatNo != null and record.chatNo != ''"> |
| | | and a.chat_no = #{record.chatNo} |
| | | <if test="record.inviteId != null and record.inviteId != ''"> |
| | | and a.invite_id = #{record.inviteId} |
| | | </if> |
| | | <if test="record.status != null and record.status != ''"> |
| | | and a.status = #{record.status} |
| | |
| | | update chat_amount_flow set state = #{state} where user_id = #{userId} and relation_id = #{id} |
| | | </update> |
| | | |
| | | <update id="updateIsRobotByUserId"> |
| | | update chat_user |
| | | set |
| | | is_robot = #{isRobot} |
| | | where user_id = #{userId} |
| | | </update> |
| | | |
| | | </mapper> |