diff --git a/mallinkAdmin/src/main/resources/db/migration/V202007311200__FOR_MEMBER_ONLY_001.sql b/mallinkAdmin/src/main/resources/db/migration/V202007311200__FOR_MEMBER_ONLY_001.sql index 010095a24..6a293f5f6 100644 --- a/mallinkAdmin/src/main/resources/db/migration/V202007311200__FOR_MEMBER_ONLY_001.sql +++ b/mallinkAdmin/src/main/resources/db/migration/V202007311200__FOR_MEMBER_ONLY_001.sql @@ -123,26 +123,29 @@ BEGIN DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET err_flag = TRUE; UPDATE wx_c_user SET user_id = newCuserId WHERE user_id = oldCuserId ; - UPDATE wx_activity_join SET user_id = newCuserId WHERE user_id = oldCuserId ; - UPDATE wx_c_user_tags SET user_id = newCuserId WHERE user_id = oldCuserId ; + --活动报名表(如果新旧会员同时报名一个活动会导致数据重复) + --UPDATE wx_activity_join SET user_id = newCuserId WHERE user_id = oldCuserId ; + --会员标签表需单独做合并 + --UPDATE wx_c_user_tags SET user_id = newCuserId WHERE user_id = oldCuserId ; UPDATE wx_game_action_log SET user_id = newCuserId WHERE user_id = oldCuserId ; UPDATE wx_order_group SET user_id = newCuserId WHERE user_id = oldCuserId ; UPDATE wx_order_press SET user_id = newCuserId WHERE user_id = oldCuserId ; UPDATE wx_question_log SET user_id = newCuserId WHERE user_id = oldCuserId ; - UPDATE wx_c_user_car SET c_user_id = newCuserId WHERE c_user_id = oldCuserId ; + --新旧会员都绑定了同一车牌的情况 + --UPDATE wx_c_user_car SET c_user_id = newCuserId WHERE c_user_id = oldCuserId ; UPDATE wx_c_user_from_b SET c_user_id = newCuserId WHERE c_user_id = oldCuserId ; UPDATE wx_coupon_order SET c_user_id = newCuserId WHERE c_user_id = oldCuserId ; - UPDATE wx_credit_history SET c_user_id = newCuserId WHERE c_user_id = oldCuserId ; + --UPDATE wx_credit_history SET c_user_id = newCuserId WHERE c_user_id = oldCuserId ; UPDATE wx_order SET c_user_id = newCuserId WHERE c_user_id = oldCuserId ; UPDATE wx_pay_order SET c_user_id = newCuserId WHERE c_user_id = oldCuserId ; UPDATE wx_refund_order SET c_user_id = newCuserId WHERE c_user_id = oldCuserId ; - UPDATE wx_score_history SET c_user_id = newCuserId WHERE c_user_id = oldCuserId ; + --UPDATE wx_score_history SET c_user_id = newCuserId WHERE c_user_id = oldCuserId ; UPDATE wx_card_spend SET owner_id = newCuserId WHERE owner_id = oldCuserId ; UPDATE wx_coupon_order SET owner_id = newCuserId WHERE owner_id = oldCuserId ; - UPDATE wx_credit_history SET operator_id = newCuserId WHERE operator_type in (1,2) and operator_id = oldCuserId ; + --UPDATE wx_credit_history SET operator_id = newCuserId WHERE operator_type in (1,2) and operator_id = oldCuserId ; UPDATE wx_c_user_basic_info SET phone = phone + '(作废)',`status` = 1 WHERE id = oldCuserId ;