Merge branch 'master' into dev

yy_dev
胡锐 1 year ago
commit 32a612b853
  1. 6
      cweb/src/main/java/com/cweb/controller/BsPayQrCodeController.java
  2. 10
      service/src/main/java/com/hfkj/channel/lakala/LaKaLaTradeSeparateService.java
  3. 3
      service/src/main/java/com/hfkj/service/impl/BsTradeOrderServiceImpl.java

@ -110,7 +110,11 @@ public class BsPayQrCodeController {
// 用户优惠
if (StringUtils.isNotBlank(body.getString("phone"))) {
discountActivityList.addAll(storeDiscountActivityService.getUseDiscountListByPhone(body.getString("phone")));
List<BsStoreDiscountActivity> userDiscountActivityList = new ArrayList<>();
List<BsStoreDiscountActivity> userDiscountActivity = storeDiscountActivityService.getUseDiscountListByPhone(body.getString("phone"));
userDiscountActivityList.addAll(userDiscountActivity.stream().filter(o -> o.getMerId().equals(store.getMerId())).collect(Collectors.toList()));
userDiscountActivityList.addAll(userDiscountActivity.stream().filter(o -> o.getStoreId().equals(store.getId())).collect(Collectors.toList()));
discountActivityList.addAll(userDiscountActivityList);
}
// 优惠活动

@ -72,10 +72,12 @@ public class LaKaLaTradeSeparateService {
Map<String,Object> recvDatasMap;
for (BsTradeOrderProfitSharingReceiver receiver : profitSharingReceiverList) {
recvDatasMap = new HashMap<>();
recvDatasMap.put("recv_no", receiver.getReceiverAccount());
recvDatasMap.put("separate_value", receiver.getReceiverAmount().multiply(new BigDecimal("100")).longValue());
recvDatasMapList.add(recvDatasMap);
if (receiver.getReceiverAmount().compareTo(new BigDecimal("0")) != 0) {
recvDatasMap = new HashMap<>();
recvDatasMap.put("recv_no", receiver.getReceiverAccount());
recvDatasMap.put("separate_value", receiver.getReceiverAmount().multiply(new BigDecimal("100")).longValue());
recvDatasMapList.add(recvDatasMap);
}
}
map.put("recv_datas", recvDatasMapList);
commonParam.put("req_data", map);

@ -108,9 +108,11 @@ public class BsTradeOrderServiceImpl implements BsTradeOrderService {
tradeOrder.setTradeActualAmount(tradeAmount);
tradeOrder.setStoreDiscountSatisfy(false);
tradeOrder.setUserPhone(userPhone);
tradeOrder.setProfitSharingStatus(false);
// 门店优惠
if (storeDiscount != null) {
tradeOrder.setProfitSharingStatus(true);
tradeOrder.setStoreDiscountId(storeDiscount.getId());
tradeOrder.setStoreDiscountName(storeDiscount.getName());
tradeOrder.setStoreDiscountType(storeDiscount.getDiscountType());
@ -199,7 +201,6 @@ public class BsTradeOrderServiceImpl implements BsTradeOrderService {
tradeOrder.setQrCodeId(MapUtils.getLong(param, "qrCodeId"));
}
tradeOrder.setProfitSharingStatus(false);
editOrder(tradeOrder);
Map<String, Object> returnParam = new HashMap<>();

Loading…
Cancel
Save