| @@ -186,7 +186,8 @@ public class WxScoreRules extends BaseTenantEntity { | |||||
| } | } | ||||
| public static JSONObject replaceBusinessName(JSONObject json,String businessName) { | public static JSONObject replaceBusinessName(JSONObject json,String businessName) { | ||||
| json.replace("title", businessName); | |||||
| json.put("title",businessName); | |||||
| // json.replace("title", businessName); | |||||
| return json; | return json; | ||||
| } | } | ||||
| @@ -777,13 +777,14 @@ public class WxCreditHistoryServiceImpl implements WxCreditHistoryService { | |||||
| @Override | @Override | ||||
| public void oldAddCreditWithNewConsume(TenantEntity tenantEntity, WxCreditHistory wxCreditHistory, WxCUserBasicInfo basicInfo,EnumAppPlat plat) { | public void oldAddCreditWithNewConsume(TenantEntity tenantEntity, WxCreditHistory wxCreditHistory, WxCUserBasicInfo basicInfo,EnumAppPlat plat) { | ||||
| if(!EnumScoreType.SPEND_CREDIT.getCode().equals(wxCreditHistory.getCreditType()) | if(!EnumScoreType.SPEND_CREDIT.getCode().equals(wxCreditHistory.getCreditType()) | ||||
| || !EnumScoreType.CONSUMPTION.getCode().equals(wxCreditHistory.getCreditType())){ | |||||
| && !EnumScoreType.CONSUMPTION.getCode().equals(wxCreditHistory.getCreditType())){ | |||||
| return; | return; | ||||
| } | } | ||||
| try{ | try{ | ||||
| WxCUserBasicInfo oldBasicInfo = wxCUserFromService.selectOldByNew(tenantEntity, wxCreditHistory.getCUserId(), plat); | WxCUserBasicInfo oldBasicInfo = wxCUserFromService.selectOldByNew(tenantEntity, wxCreditHistory.getCUserId(), plat); | ||||
| if(basicInfo == null){ | if(basicInfo == null){ | ||||
| logger.info("推广会员消费加积分未找到用户"); | |||||
| return; | return; | ||||
| } | } | ||||
| WxCreditHistory oldAddCredit = new WxCreditHistory(); | WxCreditHistory oldAddCredit = new WxCreditHistory(); | ||||
| @@ -800,7 +801,7 @@ public class WxCreditHistoryServiceImpl implements WxCreditHistoryService { | |||||
| }catch(Exception e){ | }catch(Exception e){ | ||||
| logger.error("推广会员消费加积分错误"+e.getMessage()); | |||||
| } | } | ||||
| } | } | ||||
| @@ -144,7 +144,7 @@ public class WxScoreRulesServiceImpl implements WxScoreRulesService { | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| logger.info("mysql >> data"+JSONObject.toJSONString(currentBusinessRuleMap)); | |||||
| // logger.info("mysql >> data"+JSONObject.toJSONString(currentBusinessRuleMap)); | |||||
| //根据业态来匹配 | //根据业态来匹配 | ||||
| Map<Integer,JSONObject> businessRuleMap = new HashMap<Integer,JSONObject>(); | Map<Integer,JSONObject> businessRuleMap = new HashMap<Integer,JSONObject>(); | ||||
| List<WxBusiness> rootBusiness = wxBusinessService.findListAll(true,tenantEntity, null, null); | List<WxBusiness> rootBusiness = wxBusinessService.findListAll(true,tenantEntity, null, null); | ||||
| @@ -152,7 +152,7 @@ public class WxScoreRulesServiceImpl implements WxScoreRulesService { | |||||
| for (int i = 0 ; i < rootBusiness.size(); i++){ | for (int i = 0 ; i < rootBusiness.size(); i++){ | ||||
| WxBusiness bu = rootBusiness.get(i); | WxBusiness bu = rootBusiness.get(i); | ||||
| if (currentBusinessRuleMap.containsKey(bu.getId())) { | if (currentBusinessRuleMap.containsKey(bu.getId())) { | ||||
| logger.info("-- >> bu"+JSONObject.toJSONString(bu)); | |||||
| // logger.info("-- >> bu"+JSONObject.toJSONString(bu)); | |||||
| businessRuleMap.put(bu.getId(),WxScoreRules.replaceBusinessName(currentBusinessRuleMap.get(bu.getId()),bu.getTitle())); | businessRuleMap.put(bu.getId(),WxScoreRules.replaceBusinessName(currentBusinessRuleMap.get(bu.getId()),bu.getTitle())); | ||||
| }else { | }else { | ||||
| if (!businessRuleMap.containsKey(bu.getId())){ | if (!businessRuleMap.containsKey(bu.getId())){ | ||||