|
|
@@ -104,22 +104,24 @@
|
|
|
</set>WHERE id_ = #{id}
|
|
|
</update>
|
|
|
<update id="use">
|
|
|
+ UPDATE activity_user_mapper SET
|
|
|
<if test="type == 'VIP'">
|
|
|
- UPDATE activity_user_mapper SET vip_flag_ = 2,vip_group_id_ = #{groupId},update_time_ = NOW()
|
|
|
- WHERE FIND_IN_SET(id_,#{activityUserMapperIds}) AND FIND_IN_SET(user_id_,#{studentIds}) AND return_fee_ = 0 AND vip_flag_ = 1;
|
|
|
+ vip_flag_ = 2,vip_group_id_ = #{groupId},update_time_ = NOW()
|
|
|
+ WHERE vip_flag_ = 1
|
|
|
</if>
|
|
|
<if test="type == 'GIVE_VIP'">
|
|
|
- UPDATE activity_user_mapper SET give_vip_flag_ = 2,give_vip_group_id_ = #{groupId},update_time_ = NOW()
|
|
|
- WHERE FIND_IN_SET(id_,#{activityUserMapperIds}) AND FIND_IN_SET(user_id_,#{studentIds}) AND return_fee_ = 0 AND give_vip_flag_ = 1;
|
|
|
+ give_vip_flag_ = 2,give_vip_group_id_ = #{groupId},update_time_ = NOW()
|
|
|
+ WHERE give_vip_flag_ = 1
|
|
|
</if>
|
|
|
<if test="type == 'PRACTICE'">
|
|
|
- UPDATE activity_user_mapper SET practice_flag_ = 2,practice_group_id_ = #{groupId},update_time_ = NOW()
|
|
|
- WHERE FIND_IN_SET(id_,#{activityUserMapperIds}) AND FIND_IN_SET(user_id_,#{studentIds}) AND return_fee_ = 0 AND practice_flag_ = 1;
|
|
|
+ practice_flag_ = 2,practice_group_id_ = #{groupId},update_time_ = NOW()
|
|
|
+ WHERE practice_flag_ = 1
|
|
|
</if>
|
|
|
<if test="type == 'GIVE_PRACTICE'">
|
|
|
- UPDATE activity_user_mapper SET give_practice_flag_ = 2,give_practice_group_id_ = #{groupId},update_time_ = NOW()
|
|
|
- WHERE FIND_IN_SET(id_,#{activityUserMapperIds}) AND FIND_IN_SET(user_id_,#{studentIds}) AND return_fee_ = 0 AND give_practice_flag_ = 1;
|
|
|
+ give_practice_flag_ = 2,give_practice_group_id_ = #{groupId},update_time_ = NOW()
|
|
|
+ WHERE give_practice_flag_ = 1
|
|
|
</if>
|
|
|
+ AND FIND_IN_SET(id_,#{activityUserMapperIds}) AND FIND_IN_SET(user_id_,#{studentIds}) AND return_fee_ = 0
|
|
|
</update>
|
|
|
|
|
|
<!-- 根据主键删除一条记录 -->
|