|
|
@@ -215,7 +215,10 @@ public class WxCreditHistoryServiceImpl implements WxCreditHistoryService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
int creditChangeNumOrigin = creditIncrement(record); |
|
|
int creditChangeNumOrigin = creditIncrement(record); |
|
|
int creditChangeNum = CreditUtil.calUserCredit(creditChangeNumOrigin,wxCUser,wxLevelConfigMapper,wxCUserBasicInfo,wxScoreRulesService) ; |
|
|
|
|
|
|
|
|
int creditChangeNum = creditChangeNumOrigin ; |
|
|
|
|
|
if (record.getCreditType().equals(EnumScoreType.CONSUMPTION.getCode()) || record.getCreditType().equals(EnumScoreType.SPEND_CREDIT.getCode())) { |
|
|
|
|
|
creditChangeNum = CreditUtil.calUserCredit(creditChangeNumOrigin, wxCUser, wxLevelConfigMapper, wxCUserBasicInfo, wxScoreRulesService); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (creditChangeNum != 0) { |
|
|
if (creditChangeNum != 0) { |
|
|
Integer total = currentCreditAmount + creditChangeNum; |
|
|
Integer total = currentCreditAmount + creditChangeNum; |
|
|
@@ -309,17 +312,17 @@ public class WxCreditHistoryServiceImpl implements WxCreditHistoryService { |
|
|
WxCreditHistory wxCreditHistory = new WxCreditHistory(); |
|
|
WxCreditHistory wxCreditHistory = new WxCreditHistory(); |
|
|
wxCreditHistory.setBusinessId(Long.valueOf(wxMerchant.getBusinessId())); |
|
|
wxCreditHistory.setBusinessId(Long.valueOf(wxMerchant.getBusinessId())); |
|
|
wxCreditHistory.setTenantId(tenantId); |
|
|
wxCreditHistory.setTenantId(tenantId); |
|
|
int credit = 0; |
|
|
|
|
|
|
|
|
int credit; |
|
|
int creditNew = 0 ; |
|
|
int creditNew = 0 ; |
|
|
if (StringUtils.isNotBlank(spendStr)) { |
|
|
if (StringUtils.isNotBlank(spendStr)) { |
|
|
wxCreditHistory.setSpend(new BigDecimal(spendStr).multiply(new BigDecimal(100)).intValue()); |
|
|
wxCreditHistory.setSpend(new BigDecimal(spendStr).multiply(new BigDecimal(100)).intValue()); |
|
|
credit = payAddCredit(wxCreditHistory); |
|
|
credit = payAddCredit(wxCreditHistory); |
|
|
if(Objects.nonNull(userId)) { |
|
|
|
|
|
|
|
|
if (Objects.nonNull(userId)) { |
|
|
WxCUser wxCUser = wxCUserMapper.selectByPrimaryKey(userId); |
|
|
WxCUser wxCUser = wxCUserMapper.selectByPrimaryKey(userId); |
|
|
WxCUserBasicInfo wxCUserBasicInfo = wxCUserBasicInfoMapper.selectByPrimaryKey(userId); |
|
|
WxCUserBasicInfo wxCUserBasicInfo = wxCUserBasicInfoMapper.selectByPrimaryKey(userId); |
|
|
creditNew = CreditUtil.calUserCredit(credit,wxCUser,wxLevelConfigMapper,wxCUserBasicInfo,wxScoreRulesService) ; |
|
|
|
|
|
|
|
|
creditNew = CreditUtil.calUserCredit(credit, wxCUser, wxLevelConfigMapper, wxCUserBasicInfo, wxScoreRulesService); |
|
|
} else { |
|
|
} else { |
|
|
creditNew = credit ; |
|
|
|
|
|
|
|
|
creditNew = credit; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
creditMap.put("credit", creditNew); |
|
|
creditMap.put("credit", creditNew); |
|
|
|