From 903873477151ed8523a8a72bc08589a7674f0901 Mon Sep 17 00:00:00 2001 From: lin <642018748@qq.com> Date: Mon, 3 Apr 2023 15:57:46 +0800 Subject: [PATCH] fix business --- .../db/migration/V2023040300001_business.sql | 103 +++++++++++++++++- .../com/iformall/domain/po/WxScoreRules.java | 5 + .../service/impl/WxScoreRulesServiceImpl.java | 2 +- 3 files changed, 108 insertions(+), 2 deletions(-) diff --git a/mallinkAdmin/src/main/resources/db/migration/V2023040300001_business.sql b/mallinkAdmin/src/main/resources/db/migration/V2023040300001_business.sql index 99de096c9..6c127b8f7 100644 --- a/mallinkAdmin/src/main/resources/db/migration/V2023040300001_business.sql +++ b/mallinkAdmin/src/main/resources/db/migration/V2023040300001_business.sql @@ -97,4 +97,105 @@ alter table wx_coupon_95 modify column business int(11); alter table wx_coupon_96 modify column business int(11); alter table wx_coupon_97 modify column business int(11); alter table wx_coupon_98 modify column business int(11); -alter table wx_coupon_99 modify column business int(11); \ No newline at end of file +alter table wx_coupon_99 modify column business int(11); + +alter table wx_coupon_channel_0 modify column business int(11); +alter table wx_coupon_channel_1 modify column business int(11); +alter table wx_coupon_channel_2 modify column business int(11); +alter table wx_coupon_channel_3 modify column business int(11); +alter table wx_coupon_channel_4 modify column business int(11); +alter table wx_coupon_channel_5 modify column business int(11); +alter table wx_coupon_channel_6 modify column business int(11); +alter table wx_coupon_channel_7 modify column business int(11); +alter table wx_coupon_channel_8 modify column business int(11); +alter table wx_coupon_channel_9 modify column business int(11); +alter table wx_coupon_channel_10 modify column business int(11); +alter table wx_coupon_channel_11 modify column business int(11); +alter table wx_coupon_channel_12 modify column business int(11); +alter table wx_coupon_channel_13 modify column business int(11); +alter table wx_coupon_channel_14 modify column business int(11); +alter table wx_coupon_channel_15 modify column business int(11); +alter table wx_coupon_channel_16 modify column business int(11); +alter table wx_coupon_channel_17 modify column business int(11); +alter table wx_coupon_channel_18 modify column business int(11); +alter table wx_coupon_channel_19 modify column business int(11); +alter table wx_coupon_channel_20 modify column business int(11); +alter table wx_coupon_channel_21 modify column business int(11); +alter table wx_coupon_channel_22 modify column business int(11); +alter table wx_coupon_channel_23 modify column business int(11); +alter table wx_coupon_channel_24 modify column business int(11); +alter table wx_coupon_channel_25 modify column business int(11); +alter table wx_coupon_channel_26 modify column business int(11); +alter table wx_coupon_channel_27 modify column business int(11); +alter table wx_coupon_channel_28 modify column business int(11); +alter table wx_coupon_channel_29 modify column business int(11); +alter table wx_coupon_channel_30 modify column business int(11); +alter table wx_coupon_channel_31 modify column business int(11); +alter table wx_coupon_channel_32 modify column business int(11); +alter table wx_coupon_channel_33 modify column business int(11); +alter table wx_coupon_channel_34 modify column business int(11); +alter table wx_coupon_channel_35 modify column business int(11); +alter table wx_coupon_channel_36 modify column business int(11); +alter table wx_coupon_channel_37 modify column business int(11); +alter table wx_coupon_channel_38 modify column business int(11); +alter table wx_coupon_channel_39 modify column business int(11); +alter table wx_coupon_channel_40 modify column business int(11); +alter table wx_coupon_channel_41 modify column business int(11); +alter table wx_coupon_channel_42 modify column business int(11); +alter table wx_coupon_channel_43 modify column business int(11); +alter table wx_coupon_channel_44 modify column business int(11); +alter table wx_coupon_channel_45 modify column business int(11); +alter table wx_coupon_channel_46 modify column business int(11); +alter table wx_coupon_channel_47 modify column business int(11); +alter table wx_coupon_channel_48 modify column business int(11); +alter table wx_coupon_channel_49 modify column business int(11); +alter table wx_coupon_channel_50 modify column business int(11); +alter table wx_coupon_channel_51 modify column business int(11); +alter table wx_coupon_channel_52 modify column business int(11); +alter table wx_coupon_channel_53 modify column business int(11); +alter table wx_coupon_channel_54 modify column business int(11); +alter table wx_coupon_channel_55 modify column business int(11); +alter table wx_coupon_channel_56 modify column business int(11); +alter table wx_coupon_channel_57 modify column business int(11); +alter table wx_coupon_channel_58 modify column business int(11); +alter table wx_coupon_channel_59 modify column business int(11); +alter table wx_coupon_channel_60 modify column business int(11); +alter table wx_coupon_channel_61 modify column business int(11); +alter table wx_coupon_channel_62 modify column business int(11); +alter table wx_coupon_channel_63 modify column business int(11); +alter table wx_coupon_channel_64 modify column business int(11); +alter table wx_coupon_channel_65 modify column business int(11); +alter table wx_coupon_channel_66 modify column business int(11); +alter table wx_coupon_channel_67 modify column business int(11); +alter table wx_coupon_channel_68 modify column business int(11); +alter table wx_coupon_channel_69 modify column business int(11); +alter table wx_coupon_channel_70 modify column business int(11); +alter table wx_coupon_channel_71 modify column business int(11); +alter table wx_coupon_channel_72 modify column business int(11); +alter table wx_coupon_channel_73 modify column business int(11); +alter table wx_coupon_channel_74 modify column business int(11); +alter table wx_coupon_channel_75 modify column business int(11); +alter table wx_coupon_channel_76 modify column business int(11); +alter table wx_coupon_channel_77 modify column business int(11); +alter table wx_coupon_channel_78 modify column business int(11); +alter table wx_coupon_channel_79 modify column business int(11); +alter table wx_coupon_channel_80 modify column business int(11); +alter table wx_coupon_channel_81 modify column business int(11); +alter table wx_coupon_channel_82 modify column business int(11); +alter table wx_coupon_channel_83 modify column business int(11); +alter table wx_coupon_channel_84 modify column business int(11); +alter table wx_coupon_channel_85 modify column business int(11); +alter table wx_coupon_channel_86 modify column business int(11); +alter table wx_coupon_channel_87 modify column business int(11); +alter table wx_coupon_channel_88 modify column business int(11); +alter table wx_coupon_channel_89 modify column business int(11); +alter table wx_coupon_channel_90 modify column business int(11); +alter table wx_coupon_channel_91 modify column business int(11); +alter table wx_coupon_channel_92 modify column business int(11); +alter table wx_coupon_channel_93 modify column business int(11); +alter table wx_coupon_channel_94 modify column business int(11); +alter table wx_coupon_channel_95 modify column business int(11); +alter table wx_coupon_channel_96 modify column business int(11); +alter table wx_coupon_channel_97 modify column business int(11); +alter table wx_coupon_channel_98 modify column business int(11); +alter table wx_coupon_channel_99 modify column business int(11); diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxScoreRules.java b/mallinkService/src/main/java/com/iformall/domain/po/WxScoreRules.java index 93be81c73..ec7b3676f 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxScoreRules.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxScoreRules.java @@ -163,6 +163,11 @@ public class WxScoreRules extends BaseTenantEntity { return JSONObject.parseObject(json); } + public static JSONObject replaceBusinessName(JSONObject json,String businessName) { + json.replace("title", "\""+businessName+"\""); + return json; + } + public boolean checkRules() { if (rules == null) return true; diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxScoreRulesServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxScoreRulesServiceImpl.java index 2304a6086..1f7a1cebf 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxScoreRulesServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxScoreRulesServiceImpl.java @@ -153,7 +153,7 @@ public class WxScoreRulesServiceImpl implements WxScoreRulesService { for (int i = 0 ; i < rootBusiness.size(); i++){ WxBusiness bu = rootBusiness.get(i); if (currentBusinessRuleMap.containsKey(bu.getId())) { - businessRuleMap.put(bu.getId(),currentBusinessRuleMap.get(bu.getId())); + businessRuleMap.put(bu.getId(),WxScoreRules.replaceBusinessName(currentBusinessRuleMap.get(bu.getId()),bu.getTitle())); }else { if (!businessRuleMap.containsKey(bu.getId())){ businessRuleMap.put(bu.getId(), WxScoreRules.createBusinessDefaultJson(bu.getId(),bu.getTitle()));