|
|
@ -9,6 +9,7 @@ import com.hai.config.DataUtilConfig; |
|
|
|
import com.hai.config.QianZhuConfig; |
|
|
|
import com.hai.config.QianZhuConfig; |
|
|
|
import com.hai.entity.*; |
|
|
|
import com.hai.entity.*; |
|
|
|
import com.hai.openApi.config.PriceComputeConfig; |
|
|
|
import com.hai.openApi.config.PriceComputeConfig; |
|
|
|
|
|
|
|
import com.hai.openApi.service.ApiBlxCouponService; |
|
|
|
import com.hai.openApi.service.ApiMchProductService; |
|
|
|
import com.hai.openApi.service.ApiMchProductService; |
|
|
|
import com.hai.openApi.service.ApiOrderCreateHandleService; |
|
|
|
import com.hai.openApi.service.ApiOrderCreateHandleService; |
|
|
|
import com.hai.openApi.type.OperatorTypeEnum; |
|
|
|
import com.hai.openApi.type.OperatorTypeEnum; |
|
|
@ -47,6 +48,9 @@ public class ApiOrderCreateHandleServiceImpl implements ApiOrderCreateHandleServ |
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private ApiProductService apiProductService; |
|
|
|
private ApiProductService apiProductService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private ApiBlxCouponService apiBlxCouponService; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public ApiOrder oilHandle(JSONObject object) throws Exception { |
|
|
|
public ApiOrder oilHandle(JSONObject object) throws Exception { |
|
|
|
|
|
|
|
|
|
|
@ -349,6 +353,20 @@ public class ApiOrderCreateHandleServiceImpl implements ApiOrderCreateHandleServ |
|
|
|
// 查询api商户
|
|
|
|
// 查询api商户
|
|
|
|
ApiMerchants apiMerchants = apiMerchantsService.findByMchId(object.getString("merchId")); |
|
|
|
ApiMerchants apiMerchants = apiMerchantsService.findByMchId(object.getString("merchId")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ApiBlxCoupon apiBlxCoupon = apiBlxCouponService.findBlxCoupon(object.getString("couponCode")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 查询折扣比例
|
|
|
|
|
|
|
|
Map<String, Object> mapProduct = new HashMap<>(); |
|
|
|
|
|
|
|
mapProduct.put("mchId" , object.getString("merchId")); |
|
|
|
|
|
|
|
mapProduct.put("productType" , OrderProductType.PRODUCT_TYPE13.getNumber()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ApiMchProduct apiMchProducts = apiMchProductService.findByMap(mapProduct); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BigDecimal priceTotal = new BigDecimal(0); |
|
|
|
|
|
|
|
BigDecimal facePrice = new BigDecimal(0); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|