mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 19:45:09 +08:00
update订单逻辑改造工厂模式
This commit is contained in:
@@ -141,6 +141,22 @@ public class OrderService {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成订单
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
public String generateOrderV2(GenerateOrderDTO dto) throws ParseException {
|
||||
// 新逻辑
|
||||
String delayMode = pileMerchantInfoService.getDelayModeByWechatAppId(dto.getAppId());
|
||||
AbstractOrderLogic orderLogic = OrderLogicFactory.getOrderLogic(delayMode);
|
||||
OrderBasicInfo orderBasicInfo = orderLogic.generateOrder(dto);
|
||||
if (orderBasicInfo != null) {
|
||||
return orderBasicInfo.getOrderCode();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单支付
|
||||
* @param dto
|
||||
|
||||
Reference in New Issue
Block a user