| | |
| | | <if test="record.status != null and record.status != ''"> |
| | | and a.status = #{record.status} |
| | | </if> |
| | | <if test="record.isRobot != null"> |
| | | and a.is_robot = #{record.isRobot} |
| | | </if> |
| | | </if> |
| | | </where> |
| | | group by a.user_id |
| | |
| | | b.phone phone, |
| | | a.id id, |
| | | (a.amount - a.fee) amount, |
| | | CASE |
| | | WHEN a.type = 1 THEN NULL |
| | | ELSE |
| | | FORMAT( |
| | | (a.amount - a.fee) / ( SELECT VALUE FROM data_dictionary WHERE type = 'USDT_TIME' AND CODE = 'USDT_TIME' ), |
| | | 2 |
| | | ) |
| | | END AS amountUSDT, |
| | | a.type type, |
| | | a.address address, |
| | | a.address_type addressType, |
| | |
| | | where user_id = #{userId} |
| | | </update> |
| | | |
| | | <delete id="deleteMsgByCreateTime"> |
| | | DELETE from chat_msg where create_time < #{dateTime} |
| | | </delete> |
| | | |
| | | <select id="selectChatRedBagByCreateTime" resultType="java.lang.Long"> |
| | | select id |
| | | from chat_red_bag |
| | | where create_time < #{dateTime} order By create_time desc limit 1 |
| | | </select> |
| | | |
| | | <delete id="deleteChatRedBagById"> |
| | | DELETE from chat_red_bag where id < #{id} |
| | | </delete> |
| | | |
| | | <select id="selectChatRedBagRecordByRebBagId" resultType="java.lang.Long"> |
| | | select id |
| | | from chat_red_bag_record |
| | | where red_bag_id = #{id} |
| | | </select> |
| | | |
| | | <delete id="deleteChatRedBagRecordById"> |
| | | DELETE from chat_red_bag_record where id < #{id} |
| | | </delete> |
| | | |
| | | |
| | | </mapper> |