Pārlūkot izejas kodu

fix bug

release_toaliyun_real
winter pirms 3 gadiem
vecāks
revīzija
8ca352b9f6
3 mainītis faili ar 12 papildinājumiem un 7 dzēšanām
  1. +1
    -1
      mallinkPosApi/src/main/java/com/iformall/service/impl/PosServiceImpl.java
  2. +10
    -5
      mallinkService/src/main/java/com/iformall/service/impl/WxCardSpendServiceImpl.java
  3. +1
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java

+ 1
- 1
mallinkPosApi/src/main/java/com/iformall/service/impl/PosServiceImpl.java Parādīt failu

@@ -1340,7 +1340,7 @@ public class PosServiceImpl implements PosService {
creditHistory.setFinalTenantId(couponOrderCVo.getFinalTenantId());
creditHistory.setCreditType(EnumScoreType.CONSUMPTION.getCode());
creditHistory.setCouponId(couponOrderCVo.getCouponId());
creditHistory.setBusinessId(coupon.getBusiness());
creditHistory.setBusinessId(wxMerchant.getBusinessId());
creditHistory.setSpend(couponOrderCVo.getCouponPrice());
//如果券与商户一对一 则直接将消费商户更新为此商户 若一对多 则消费商户显示多商户
creditHistory.setMerchantId(wxMerchant.getId());


+ 10
- 5
mallinkService/src/main/java/com/iformall/service/impl/WxCardSpendServiceImpl.java Parādīt failu

@@ -288,6 +288,8 @@ public class WxCardSpendServiceImpl implements WxCardSpendService {
}
// 有价储值卡消费时,如果未启用分账,金额也记入补贴表,可能会导致查询错误,
Long merchantId = couponMerchant.getMerchantId();
WxMerchant merchant = wxMerchantMapper.selectById(merchantId);
if (cardInfo.getSaleAmount() > 0) {
if (payment > 0) {
try {
@@ -299,8 +301,6 @@ public class WxCardSpendServiceImpl implements WxCardSpendService {
//更新商户余额
if (real_payment > 0) {
Long merchantId = couponMerchant.getMerchantId();
WxMerchant merchant = wxMerchantMapper.selectById(merchantId);
wxCashOutService.addCashOut(merchant, real_payment);
}
}
@@ -318,7 +318,12 @@ public class WxCardSpendServiceImpl implements WxCardSpendService {
orderUpdate.setPayment(record.getDeductionAmount());
orderUpdate.setCreditByPamentRate(false);
}
wxScoreRulesService.addScore2(coupon,EnumScoreType.CONSUMPTION, orderUpdate, coupon.getBusiness());
if (null != merchant) {
wxScoreRulesService.addScore2(coupon,EnumScoreType.CONSUMPTION, orderUpdate, merchant.getBusinessId());
}else {
wxScoreRulesService.addScore2(coupon,EnumScoreType.CONSUMPTION, orderUpdate, coupon.getBusiness());
}
} catch (Exception e) {
logger.error("成长值:" + e.getMessage());
}
@@ -335,7 +340,6 @@ public class WxCardSpendServiceImpl implements WxCardSpendService {
creditHistory.setTenantId(record.getFinalTenantId());
creditHistory.setFinalTenantId(record.getFinalTenantId());
creditHistory.setCreditType(EnumScoreType.CONSUMPTION.getCode());
creditHistory.setBusinessId(coupon.getBusiness());
//看是按售价比例算还是按面额比例算
if (coupon.getCardScoreRule().intValue() == EnumCardScoreRule.BY_SALE_PRICE.getCode().intValue()) {
creditHistory.setSpend(payment);
@@ -347,6 +351,7 @@ public class WxCardSpendServiceImpl implements WxCardSpendService {
creditHistory.setMerchantId(record.getMerchantId());
WxMerchant wxMerchant = wxMerchantMapper.selectById(record.getMerchantId());
creditHistory.setChangePurpose("卡消费:消费商户["+wxMerchant.getName()+"] 金额["+creditHistory.getSpendStr()+"元]");
creditHistory.setBusinessId(wxMerchant.getBusinessId());
wxCreditHistoryService.saveOrUpdate(creditHistory,record);
} catch (Exception e) {
logger.error("积分值:" + e.getMessage());
@@ -1329,7 +1334,7 @@ public class WxCardSpendServiceImpl implements WxCardSpendService {
orderUpdate.setPayment(record.getRealPayment());
orderUpdate.setPaymentTime(record.getUpdateDate());
orderUpdate.setPaymentType(EnumPayType.PAY_PAYMENT.getCode());
int point = wxScoreRulesService.addScore2(coupon,EnumScoreType.CONSUMPTION, orderUpdate, coupon.getBusiness());
int point = wxScoreRulesService.addScore2(coupon,EnumScoreType.CONSUMPTION, orderUpdate, merchant.getBusinessId());
scoreCreditCalc.setScore(scoreCreditCalc.getScore() + point);
} catch (Exception e) {
logger.error("成长值:" + e.getMessage());


+ 1
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java Parādīt failu

@@ -2915,7 +2915,7 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService {
WxCouponOrder couponOrder = wxCouponOrderMapper.selectById(couponOrderId,tenantinfo.getTenantId());
WxCUserBasicInfo wxCUserBasicInfo = wxCUserBasicInfoMapper.selectById(couponOrder.getcUserId(),couponOrder.getFinalTenantId());
WxCoupon coupon = wxCouponMapper.selectById(couponOrder.getCouponId(),couponOrder.getTenantId());
doAfterVerify(couponOrder, coupon, wxCUserBasicInfo);
//doAfterVerify(couponOrder, coupon, wxCUserBasicInfo);
}
return 0;
}


Notiek ielāde…
Atcelt
Saglabāt