|
@@ -18,19 +18,15 @@ import com.yiqi.common.core.domain.R;
|
|
|
import com.yiqi.common.enums.*;
|
|
|
import com.yiqi.common.utils.*;
|
|
|
import com.yiqi.order.domain.OrderCloth;
|
|
|
-import com.yiqi.order.domain.OrderClothDeliveryAddress;
|
|
|
import com.yiqi.order.domain.OrderClothItem;
|
|
|
+import com.yiqi.order.domain.OrderDelivery;
|
|
|
import com.yiqi.order.domain.dto.OrderClothAppointmentDTO;
|
|
|
-import com.yiqi.order.domain.dto.PayOrderAppDTO;
|
|
|
import com.yiqi.order.domain.dto.weapp.OrderClothAppQueryDTO;
|
|
|
import com.yiqi.order.domain.dto.weapp.UpdateOrderClothTakeClothWayDTO;
|
|
|
import com.yiqi.order.domain.dto.weapp.WeAppOrderClothAppointmentQueryDTO;
|
|
|
import com.yiqi.order.domain.vo.OrderClothVO;
|
|
|
-import com.yiqi.order.domain.vo.weapp.AppPayRespVO;
|
|
|
-import com.yiqi.order.domain.vo.weapp.UpdateOrderClothTakeClothWayRespVO;
|
|
|
import com.yiqi.order.domain.vo.weapp.WeAppOrderClothAppointmentVO;
|
|
|
import com.yiqi.order.service.*;
|
|
|
-import com.yiqi.recharge.domain.dto.ConsumeOrderDTO;
|
|
|
import com.yiqi.system.domain.SysOrg;
|
|
|
import com.yiqi.system.domain.SysStore;
|
|
|
import com.yiqi.system.service.ISysConfigService;
|
|
@@ -74,7 +70,7 @@ public class WeAppOrderClothController {
|
|
|
@Autowired
|
|
|
private IOrderClothItemFlowRecordService orderClothItemFlowRecordService;
|
|
|
@Autowired
|
|
|
- private IOrderClothDeliveryAddressService orderClothDeliveryAddressService;
|
|
|
+ private IOrderDeliveryService orderDeliveryService;
|
|
|
@Autowired
|
|
|
private OrderNoUtils orderNoUtils;
|
|
|
@Autowired
|
|
@@ -123,15 +119,15 @@ public class WeAppOrderClothController {
|
|
|
return R.ok(new ArrayList<>());
|
|
|
}
|
|
|
|
|
|
- List<OrderClothDeliveryAddress> list = orderClothDeliveryAddressService.list(new QueryWrapper<OrderClothDeliveryAddress>().lambda()
|
|
|
- .in(OrderClothDeliveryAddress::getOrderId
|
|
|
- ,orderCloths.stream().map(OrderCloth::getId).collect(Collectors.toSet())));
|
|
|
- Map<Long,OrderClothDeliveryAddress> collectAddressMap = list.stream().filter(orderClothDeliveryAddress -> ClothOrderDeliveryType.collectCloth.getCode()
|
|
|
- .equals(orderClothDeliveryAddress.getClothOrderType()))
|
|
|
- .collect(Collectors.toMap(OrderClothDeliveryAddress::getOrderId,OrderClothDeliveryAddress -> OrderClothDeliveryAddress));
|
|
|
- Map<Long,OrderClothDeliveryAddress> takeAddressMap = list.stream().filter(orderClothDeliveryAddress -> ClothOrderDeliveryType.takeCloth.getCode()
|
|
|
- .equals(orderClothDeliveryAddress.getClothOrderType()))
|
|
|
- .collect(Collectors.toMap(OrderClothDeliveryAddress::getOrderId,OrderClothDeliveryAddress -> OrderClothDeliveryAddress));
|
|
|
+ List<OrderDelivery> list = orderDeliveryService.list(new QueryWrapper<OrderDelivery>().lambda()
|
|
|
+ .in(OrderDelivery::getOrderSn
|
|
|
+ ,orderCloths.stream().map(OrderCloth::getOrderNo).collect(Collectors.toSet())));
|
|
|
+ Map<String,OrderDelivery> collectAddressMap = list.stream().filter(orderDelivery -> ClothOrderDeliveryType.collectCloth.getCode()
|
|
|
+ .equals(orderDelivery.getClothOrderType()))
|
|
|
+ .collect(Collectors.toMap(OrderDelivery::getOrderSn,OrderDelivery -> OrderDelivery));
|
|
|
+ Map<String,OrderDelivery> takeAddressMap = list.stream().filter(orderDelivery -> ClothOrderDeliveryType.takeCloth.getCode()
|
|
|
+ .equals(orderDelivery.getClothOrderType()))
|
|
|
+ .collect(Collectors.toMap(OrderDelivery::getOrderSn,OrderDelivery -> OrderDelivery));
|
|
|
Map<Long,SysOrg> storeOrgMap = new HashMap<>();
|
|
|
Map<Long,SysOrg> factoryOrgMap = new HashMap<>();
|
|
|
if(orderCloths.stream().filter(orderCloth -> SourceType.STORE.getCode().equals(orderCloth.getSourceType())).collect(Collectors.toList()).size() > 0){
|
|
@@ -190,15 +186,16 @@ public class WeAppOrderClothController {
|
|
|
|| ClothOrderType.thirdPart.getCode().equals(orderCloth.getOrderType())){
|
|
|
}
|
|
|
|
|
|
+ // 获取配送费 todo
|
|
|
+
|
|
|
orderClothService.save(orderCloth);
|
|
|
- OrderClothDeliveryAddress orderClothDeliveryAddress = new OrderClothDeliveryAddress(appUserAddress);
|
|
|
- orderClothDeliveryAddress.setDeliveryOrderNo(orderNoUtils.getDeliveryOrderNo());
|
|
|
- orderClothDeliveryAddress.setOrderId(orderCloth.getId());
|
|
|
- orderClothDeliveryAddress.setOrderNo(orderCloth.getOrderNo());
|
|
|
- orderClothDeliveryAddress.setClothOrderType(ClothOrderDeliveryType.collectCloth.getCode());
|
|
|
- orderClothDeliveryAddress.setPayStatus(PayStatus.WAITING_TO_PAY.getCode());
|
|
|
- orderClothDeliveryAddress.setCreateTime(DateUtils.getNowDate());
|
|
|
- orderClothDeliveryAddressService.save(orderClothDeliveryAddress);
|
|
|
+ // 配送记录保存
|
|
|
+ OrderDelivery orderDelivery = new OrderDelivery(appUserAddress);
|
|
|
+ orderDelivery.setDeliverySn(orderNoUtils.getDeliveryOrderNo());
|
|
|
+ orderDelivery.setOrderSn(orderCloth.getOrderNo());
|
|
|
+ orderDelivery.setClothOrderType(ClothOrderDeliveryType.collectCloth.getCode());
|
|
|
+ orderDelivery.setCreateTime(DateUtils.getNowDate());
|
|
|
+ orderDeliveryService.save(orderDelivery);
|
|
|
return R.ok();
|
|
|
}
|
|
|
|
|
@@ -339,16 +336,16 @@ public class WeAppOrderClothController {
|
|
|
|
|
|
if(TakeOrSendClothWay.DELIVERY.getCode().equals(orderCloth.getTakeClothWay())
|
|
|
|| TakeOrSendClothWay.DELIVERY.getCode().equals(orderCloth.getSendClothWay())){
|
|
|
- Map<String,OrderClothDeliveryAddress> orderClothDeliveryAddressMap = orderClothDeliveryAddressService.list(
|
|
|
- new QueryWrapper<OrderClothDeliveryAddress>().lambda()
|
|
|
- .eq(OrderClothDeliveryAddress::getOrderId,orderCloth.getId()))
|
|
|
- .stream().collect(Collectors.toMap(OrderClothDeliveryAddress::getClothOrderType
|
|
|
- ,OrderClothDeliveryAddress -> OrderClothDeliveryAddress));
|
|
|
+ Map<String,OrderDelivery> orderDeliveryMap = orderDeliveryService.list(
|
|
|
+ new QueryWrapper<OrderDelivery>().lambda()
|
|
|
+ .eq(OrderDelivery::getOrderSn,orderCloth.getOrderNo()))
|
|
|
+ .stream().collect(Collectors.toMap(OrderDelivery::getClothOrderType
|
|
|
+ ,OrderDelivery -> OrderDelivery));
|
|
|
if(TakeOrSendClothWay.DELIVERY.getCode().equals(orderCloth.getTakeClothWay())){
|
|
|
- orderClothVO.setCollectClothDeliverInfo(orderClothDeliveryAddressMap.get(ClothOrderDeliveryType.collectCloth.getCode()));
|
|
|
+ orderClothVO.setCollectClothDeliverInfo(orderDeliveryMap.get(ClothOrderDeliveryType.collectCloth.getCode()));
|
|
|
}
|
|
|
if(TakeOrSendClothWay.DELIVERY.getCode().equals(orderCloth.getSendClothWay())){
|
|
|
- orderClothVO.setTakeClothDeliverInfo(orderClothDeliveryAddressMap.get(ClothOrderDeliveryType.takeCloth.getCode()));
|
|
|
+ orderClothVO.setTakeClothDeliverInfo(orderDeliveryMap.get(ClothOrderDeliveryType.takeCloth.getCode()));
|
|
|
}
|
|
|
}
|
|
|
return R.ok(orderClothVO);
|
|
@@ -357,114 +354,114 @@ public class WeAppOrderClothController {
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
@ApiOperation("洗衣订单配送订单下单")
|
|
|
@PostMapping(value = "addSendClothDeliveryOrder")
|
|
|
- public R<UpdateOrderClothTakeClothWayRespVO> addSendClothDeliveryOrder(@RequestBody @Valid UpdateOrderClothTakeClothWayDTO updateOrderClothTakeClothWayDTO) throws Exception{
|
|
|
- if(updateOrderClothTakeClothWayDTO.getAddressId() == null){
|
|
|
- throw new ServiceException("请先选择地址");
|
|
|
- }
|
|
|
-
|
|
|
- OrderCloth orderCloth = orderClothService.getOne(new QueryWrapper<OrderCloth>().lambda()
|
|
|
- .eq(OrderCloth::getId,updateOrderClothTakeClothWayDTO.getOrderId())
|
|
|
- .eq(OrderCloth::getAppUserId,AuthHolder.userId()));
|
|
|
- if(orderCloth == null){
|
|
|
- throw new ServiceException("未查询到订单");
|
|
|
- }
|
|
|
- if(!orderCloth.getOrderStatus().equals(ClothOrderStatusType.HAS_WASH.getCode())){
|
|
|
- throw new ServiceException("订单状态不正确,无法设置配送方式");
|
|
|
- }
|
|
|
- if(StringUtils.isNotEmpty(orderCloth.getSendClothWay())){
|
|
|
- throw new ServiceException("您已经设置好配送方式了");
|
|
|
- }
|
|
|
- orderCloth.setSendClothWay(ClothTakeWay.DELIVERY.getCode());
|
|
|
- if(ClothTakeWay.TOSTORE.getCode().equals(orderCloth.getSendClothWay())){//到店自取,不需要管配送费
|
|
|
- orderClothService.update(new UpdateWrapper<OrderCloth>().lambda()
|
|
|
- .set(OrderCloth::getSendClothWay,orderCloth.getSendClothWay())
|
|
|
- .eq(OrderCloth::getId,updateOrderClothTakeClothWayDTO.getOrderId()));
|
|
|
- UpdateOrderClothTakeClothWayRespVO updateOrderClothTakeClothWayRespVO = new UpdateOrderClothTakeClothWayRespVO();
|
|
|
- updateOrderClothTakeClothWayRespVO.setIsNeedPay(SysBoolType.NO.getCode());
|
|
|
- return R.ok(updateOrderClothTakeClothWayRespVO);
|
|
|
- }
|
|
|
-
|
|
|
- int freeDeliveryNum = 0;
|
|
|
- if(orderCloth.getOrderClothPrice().doubleValue() >= 100){
|
|
|
- freeDeliveryNum++;
|
|
|
- }
|
|
|
- if(orderCloth.getOrderClothPrice().doubleValue() >= 200){
|
|
|
- freeDeliveryNum++;
|
|
|
- }
|
|
|
- if(ClothTakeWay.DELIVERY.getCode().equals(orderCloth.getTakeClothWay())){
|
|
|
- freeDeliveryNum--;
|
|
|
- }
|
|
|
- /**
|
|
|
- * 1.添加配送信息
|
|
|
- * 2.此处需要知道配送费是否免费
|
|
|
- */
|
|
|
- AppUserAddress appUserAddress = appUserAddressService.getOne(new QueryWrapper<AppUserAddress>().lambda()
|
|
|
- .eq(AppUserAddress::getId,updateOrderClothTakeClothWayDTO.getAddressId()));
|
|
|
- OrderClothDeliveryAddress orderClothDeliveryAddress = orderClothDeliveryAddressService
|
|
|
- .getOne(new QueryWrapper<OrderClothDeliveryAddress>().lambda()
|
|
|
- .eq(OrderClothDeliveryAddress::getOrderId,orderCloth.getId())
|
|
|
- .eq(OrderClothDeliveryAddress::getClothOrderType,ClothOrderDeliveryType.takeCloth.getCode()));
|
|
|
- OrderClothDeliveryAddress newAddress = new OrderClothDeliveryAddress(appUserAddress);
|
|
|
- if(orderClothDeliveryAddress == null){
|
|
|
- orderClothDeliveryAddress = newAddress;
|
|
|
- }else{
|
|
|
- BeanUtils.copyProperties(newAddress,orderClothDeliveryAddress,"id");
|
|
|
- }
|
|
|
- orderClothDeliveryAddress.setOrderId(orderCloth.getId());
|
|
|
- orderClothDeliveryAddress.setOrderNo(orderCloth.getOrderNo());
|
|
|
- orderClothDeliveryAddress.setClothOrderType(ClothOrderDeliveryType.takeCloth.getCode());
|
|
|
- orderClothDeliveryAddress.setDeliveryOrderNo(orderNoUtils.getDeliveryOrderNo());
|
|
|
-
|
|
|
- //判断是否需要配送,不需要配送费
|
|
|
- if(freeDeliveryNum > 0){
|
|
|
- orderClothDeliveryAddress.setIsNeedPay(SysBoolType.NO.getCode());
|
|
|
- orderClothDeliveryAddress.setDeliveryAmount(BigDecimal.ZERO);
|
|
|
- orderClothDeliveryAddress.setPayType(PayType.CASH.getCode());
|
|
|
- //不需要配送直接修改订单状态为待配送状态
|
|
|
- orderClothService.update(new UpdateWrapper<OrderCloth>().lambda()
|
|
|
- .set(OrderCloth::getSendClothWay,ClothTakeWay.DELIVERY.getCode())
|
|
|
- .set(OrderCloth::getOrderStatus,ClothOrderStatusType.WAITING_TO_SEND.getCode())
|
|
|
- .eq(OrderCloth::getId,updateOrderClothTakeClothWayDTO.getOrderId()));
|
|
|
- }else{
|
|
|
- orderClothDeliveryAddress.setIsNeedPay(SysBoolType.YES.getCode());
|
|
|
- orderClothDeliveryAddress.setPayStatus(PayStatus.WAITING_TO_PAY.getCode());
|
|
|
- String deliveryPrice = sysConfigService.selectConfigByKey(SysConfigKey.OrderClothDeliveryPrice.getCode());
|
|
|
- if(StringUtils.isEmpty(deliveryPrice)){
|
|
|
- throw new ServiceException("系统未设置配送价格,请联系客服进行处理");
|
|
|
- }
|
|
|
- orderClothDeliveryAddress.setDeliveryAmount(new BigDecimal(deliveryPrice));
|
|
|
- if(StringUtils.isEmpty(updateOrderClothTakeClothWayDTO.getPayType())){
|
|
|
- throw new ServiceException("请先选择支付方式");
|
|
|
- }
|
|
|
- orderClothDeliveryAddress.setPayType(updateOrderClothTakeClothWayDTO.getPayType());
|
|
|
- switch (EnumUtils.getEnumByType(orderClothDeliveryAddress.getPayType(),PayType.class)){
|
|
|
- case ALIPAY:
|
|
|
- case WECHAT:
|
|
|
- {
|
|
|
- AppPayRespVO appPayRespVO = payService.appPay(
|
|
|
- PayOrderAppDTO.buildDeliveryOrderPayData(orderClothDeliveryAddress, updateOrderClothTakeClothWayDTO.getPlatform()));
|
|
|
- UpdateOrderClothTakeClothWayRespVO updateOrderClothTakeClothWayRespVO = new UpdateOrderClothTakeClothWayRespVO();
|
|
|
- updateOrderClothTakeClothWayRespVO.setOrderStr(appPayRespVO.getOrderStr());
|
|
|
- updateOrderClothTakeClothWayRespVO.setIsNeedPay(orderClothDeliveryAddress.getIsNeedPay());
|
|
|
- updateOrderClothTakeClothWayRespVO.setDeliveryOrderNo(orderClothDeliveryAddress.getDeliveryOrderNo());
|
|
|
- //保存配送订单
|
|
|
- orderClothDeliveryAddressService.saveOrUpdate(orderClothDeliveryAddress);
|
|
|
- return R.ok(updateOrderClothTakeClothWayRespVO);
|
|
|
- }
|
|
|
- case BALANCE:
|
|
|
- {
|
|
|
- //余额扣款,扣减余额
|
|
|
- appUserBillMstrService.consumeRecord(ConsumeOrderDTO.buildOrderDeliveryData(orderClothDeliveryAddress,orderCloth.getOrgId(),orderCloth.getSourceType()));
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- //保存配送订单
|
|
|
- orderClothDeliveryAddressService.saveOrUpdate(orderClothDeliveryAddress);
|
|
|
- UpdateOrderClothTakeClothWayRespVO updateOrderClothTakeClothWayRespVO = new UpdateOrderClothTakeClothWayRespVO();
|
|
|
- updateOrderClothTakeClothWayRespVO.setIsNeedPay(orderClothDeliveryAddress.getIsNeedPay());
|
|
|
- updateOrderClothTakeClothWayRespVO.setDeliveryOrderNo(orderClothDeliveryAddress.getDeliveryOrderNo());
|
|
|
- return R.ok(updateOrderClothTakeClothWayRespVO);
|
|
|
+ public R addSendClothDeliveryOrder(@RequestBody @Valid UpdateOrderClothTakeClothWayDTO updateOrderClothTakeClothWayDTO) throws Exception{
|
|
|
+// if(updateOrderClothTakeClothWayDTO.getAddressId() == null){
|
|
|
+// throw new ServiceException("请先选择地址");
|
|
|
+// }
|
|
|
+//
|
|
|
+// OrderCloth orderCloth = orderClothService.getOne(new QueryWrapper<OrderCloth>().lambda()
|
|
|
+// .eq(OrderCloth::getId,updateOrderClothTakeClothWayDTO.getOrderId())
|
|
|
+// .eq(OrderCloth::getAppUserId,AuthHolder.userId()));
|
|
|
+// if(orderCloth == null){
|
|
|
+// throw new ServiceException("未查询到订单");
|
|
|
+// }
|
|
|
+// if(!orderCloth.getOrderStatus().equals(ClothOrderStatusType.HAS_WASH.getCode())){
|
|
|
+// throw new ServiceException("订单状态不正确,无法设置配送方式");
|
|
|
+// }
|
|
|
+// if(StringUtils.isNotEmpty(orderCloth.getSendClothWay())){
|
|
|
+// throw new ServiceException("您已经设置好配送方式了");
|
|
|
+// }
|
|
|
+// orderCloth.setSendClothWay(ClothTakeWay.DELIVERY.getCode());
|
|
|
+// if(ClothTakeWay.TOSTORE.getCode().equals(orderCloth.getSendClothWay())){//到店自取,不需要管配送费
|
|
|
+// orderClothService.update(new UpdateWrapper<OrderCloth>().lambda()
|
|
|
+// .set(OrderCloth::getSendClothWay,orderCloth.getSendClothWay())
|
|
|
+// .eq(OrderCloth::getId,updateOrderClothTakeClothWayDTO.getOrderId()));
|
|
|
+// UpdateOrderClothTakeClothWayRespVO updateOrderClothTakeClothWayRespVO = new UpdateOrderClothTakeClothWayRespVO();
|
|
|
+// updateOrderClothTakeClothWayRespVO.setIsNeedPay(SysBoolType.NO.getCode());
|
|
|
+// return R.ok(updateOrderClothTakeClothWayRespVO);
|
|
|
+// }
|
|
|
+//
|
|
|
+// int freeDeliveryNum = 0;
|
|
|
+// if(orderCloth.getOrderClothPrice().doubleValue() >= 100){
|
|
|
+// freeDeliveryNum++;
|
|
|
+// }
|
|
|
+// if(orderCloth.getOrderClothPrice().doubleValue() >= 200){
|
|
|
+// freeDeliveryNum++;
|
|
|
+// }
|
|
|
+// if(ClothTakeWay.DELIVERY.getCode().equals(orderCloth.getTakeClothWay())){
|
|
|
+// freeDeliveryNum--;
|
|
|
+// }
|
|
|
+// /**
|
|
|
+// * 1.添加配送信息
|
|
|
+// * 2.此处需要知道配送费是否免费
|
|
|
+// */
|
|
|
+// AppUserAddress appUserAddress = appUserAddressService.getOne(new QueryWrapper<AppUserAddress>().lambda()
|
|
|
+// .eq(AppUserAddress::getId,updateOrderClothTakeClothWayDTO.getAddressId()));
|
|
|
+// OrderDelivery orderDelivery = orderDeliveryService
|
|
|
+// .getOne(new QueryWrapper<OrderDelivery>().lambda()
|
|
|
+// .eq(OrderDelivery::getOrderSn,orderCloth.getOrderNo())
|
|
|
+// .eq(OrderDelivery::getClothOrderType,ClothOrderDeliveryType.takeCloth.getCode()));
|
|
|
+// OrderDelivery newAddress = new OrderDelivery(appUserAddress);
|
|
|
+// if(orderDelivery == null){
|
|
|
+// orderDelivery = newAddress;
|
|
|
+// }else{
|
|
|
+// BeanUtils.copyProperties(newAddress,orderDelivery,"id");
|
|
|
+// }
|
|
|
+// orderDelivery.setOrderSn(orderCloth.getOrderNo());
|
|
|
+// orderDelivery.setClothOrderType(ClothOrderDeliveryType.takeCloth.getCode());
|
|
|
+// orderDelivery.setDeliverySn(orderNoUtils.getDeliveryOrderNo());
|
|
|
+//
|
|
|
+// //判断是否需要配送,不需要配送费
|
|
|
+// if(freeDeliveryNum > 0){
|
|
|
+// orderDelivery.setIsNeedPay(SysBoolType.NO.getCode());
|
|
|
+// orderDelivery.setDeliveryAmount(BigDecimal.ZERO);
|
|
|
+// orderDelivery.setPayType(PayType.CASH.getCode());
|
|
|
+// //不需要配送直接修改订单状态为待配送状态
|
|
|
+// orderClothService.update(new UpdateWrapper<OrderCloth>().lambda()
|
|
|
+// .set(OrderCloth::getSendClothWay,ClothTakeWay.DELIVERY.getCode())
|
|
|
+// .set(OrderCloth::getOrderStatus,ClothOrderStatusType.WAITING_TO_SEND.getCode())
|
|
|
+// .eq(OrderCloth::getId,updateOrderClothTakeClothWayDTO.getOrderId()));
|
|
|
+// }else{
|
|
|
+// orderDelivery.setIsNeedPay(SysBoolType.YES.getCode());
|
|
|
+// orderDelivery.setPayStatus(PayStatus.WAITING_TO_PAY.getCode());
|
|
|
+// String deliveryPrice = sysConfigService.selectConfigByKey(SysConfigKey.OrderClothDeliveryPrice.getCode());
|
|
|
+// if(StringUtils.isEmpty(deliveryPrice)){
|
|
|
+// throw new ServiceException("系统未设置配送价格,请联系客服进行处理");
|
|
|
+// }
|
|
|
+// orderDelivery.setDeliveryAmount(new BigDecimal(deliveryPrice));
|
|
|
+// if(StringUtils.isEmpty(updateOrderClothTakeClothWayDTO.getPayType())){
|
|
|
+// throw new ServiceException("请先选择支付方式");
|
|
|
+// }
|
|
|
+// orderDelivery.setPayType(updateOrderClothTakeClothWayDTO.getPayType());
|
|
|
+// switch (EnumUtils.getEnumByType(orderClothDeliveryAddress.getPayType(),PayType.class)){
|
|
|
+// case ALIPAY:
|
|
|
+// case WECHAT:
|
|
|
+// {
|
|
|
+// AppPayRespVO appPayRespVO = payService.appPay(
|
|
|
+// PayOrderAppDTO.buildDeliveryOrderPayData(orderDelivery, updateOrderClothTakeClothWayDTO.getPlatform()));
|
|
|
+// UpdateOrderClothTakeClothWayRespVO updateOrderClothTakeClothWayRespVO = new UpdateOrderClothTakeClothWayRespVO();
|
|
|
+// updateOrderClothTakeClothWayRespVO.setOrderStr(appPayRespVO.getOrderStr());
|
|
|
+// updateOrderClothTakeClothWayRespVO.setIsNeedPay(orderDelivery.getIsNeedPay());
|
|
|
+// updateOrderClothTakeClothWayRespVO.setDeliveryOrderNo(orderDelivery.getDeliveryOrderNo());
|
|
|
+// //保存配送订单
|
|
|
+// orderDeliveryService.saveOrUpdate(orderDelivery);
|
|
|
+// return R.ok(updateOrderClothTakeClothWayRespVO);
|
|
|
+// }
|
|
|
+// case BALANCE:
|
|
|
+// {
|
|
|
+// //余额扣款,扣减余额
|
|
|
+// appUserBillMstrService.consumeRecord(ConsumeOrderDTO.buildOrderDeliveryData(orderDelivery,orderCloth.getOrgId(),orderCloth.getSourceType()));
|
|
|
+// break;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// //保存配送订单
|
|
|
+// orderDeliveryService.saveOrUpdate(orderDelivery);
|
|
|
+// UpdateOrderClothTakeClothWayRespVO updateOrderClothTakeClothWayRespVO = new UpdateOrderClothTakeClothWayRespVO();
|
|
|
+// updateOrderClothTakeClothWayRespVO.setIsNeedPay(orderDelivery.getIsNeedPay());
|
|
|
+// updateOrderClothTakeClothWayRespVO.setDeliveryOrderNo(orderDelivery.getDeliveryOrderNo());
|
|
|
+// return R.ok(updateOrderClothTakeClothWayRespVO);
|
|
|
+ return R.ok("配送订单单独支付已弃用");
|
|
|
}
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|