update 订单逻辑改造工厂模式

This commit is contained in:
2023-09-01 15:45:04 +08:00
parent fbe05c8c6b
commit fbe64887f5
6 changed files with 39 additions and 12 deletions

View File

@@ -23,6 +23,8 @@ import com.jsowell.pile.domain.ThirdPartyStationRelation;
import com.jsowell.pile.domain.ThirdpartyParkingConfig;
import com.jsowell.pile.dto.lutongyunting.BindCouponDTO;
import com.jsowell.pile.service.*;
import com.jsowell.pile.service.orderlogic.AbstractOrderLogic;
import com.jsowell.pile.service.orderlogic.OrderLogicFactory;
import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO;
import com.jsowell.pile.vo.web.PileStationVO;
import com.jsowell.thirdparty.lianlian.service.LianLianService;
@@ -67,10 +69,7 @@ public class TransactionRecordsRequestHandler extends AbstractHandler {
private IOrderBasicInfoService orderBasicInfoService;
@Autowired
private IPileAuthCardService pileAuthCardService;
@Autowired
private IThirdPartySettingInfoService thirdPartySettingInfoService;
private IPileMerchantInfoService pileMerchantInfoService;
@Autowired
private LianLianService lianLianService;
@@ -78,9 +77,6 @@ public class TransactionRecordsRequestHandler extends AbstractHandler {
@Autowired
private IThirdPartyStationRelationService thirdPartyStationRelationService;
@Autowired
private IMemberPlateNumberRelationService memberPlateNumberRelationService;
@Autowired
private IPileStationInfoService pileStationInfoService;
@@ -625,7 +621,11 @@ public class TransactionRecordsRequestHandler extends AbstractHandler {
// 结算订单操作
try {
orderBasicInfoService.settleOrder(data, orderBasicInfo);
// orderBasicInfoService.settleOrder(data, orderBasicInfo);
// 新逻辑
String mode = pileMerchantInfoService.getDelayModeByMerchantId(orderBasicInfo.getMerchantId());
AbstractOrderLogic orderLogic = OrderLogicFactory.getOrderLogic(mode);
orderLogic.settleOrder(data, orderBasicInfo);
} catch (Exception e) {
log.error("结算订单发生异常", e);
}