Merge branch 'master' into dev

yy_dev
胡锐 2 years 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"))) { 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; Map<String,Object> recvDatasMap;
for (BsTradeOrderProfitSharingReceiver receiver : profitSharingReceiverList) { for (BsTradeOrderProfitSharingReceiver receiver : profitSharingReceiverList) {
recvDatasMap = new HashMap<>(); if (receiver.getReceiverAmount().compareTo(new BigDecimal("0")) != 0) {
recvDatasMap.put("recv_no", receiver.getReceiverAccount()); recvDatasMap = new HashMap<>();
recvDatasMap.put("separate_value", receiver.getReceiverAmount().multiply(new BigDecimal("100")).longValue()); recvDatasMap.put("recv_no", receiver.getReceiverAccount());
recvDatasMapList.add(recvDatasMap); recvDatasMap.put("separate_value", receiver.getReceiverAmount().multiply(new BigDecimal("100")).longValue());
recvDatasMapList.add(recvDatasMap);
}
} }
map.put("recv_datas", recvDatasMapList); map.put("recv_datas", recvDatasMapList);
commonParam.put("req_data", map); commonParam.put("req_data", map);

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

Loading…
Cancel
Save