new-dev
袁野 1 year ago
parent c361cba48d
commit de244978b6
  1. 4
      hai-service/src/main/java/com/hai/openApi/config/BlxConfig.java
  2. 18
      hai-service/src/main/java/com/hai/openApi/service/ApiOrderCreateHandleService.java
  3. 12
      hai-service/src/main/java/com/hai/openApi/service/impl/ApiOrderCreateHandleServiceImpl.java
  4. 21
      hai-service/src/main/java/com/hai/openApi/service/impl/ApiOrderServiceImpl.java
  5. 2
      hai-service/src/main/java/com/hai/order/type/OrderProductType.java
  6. 16
      v1/src/main/java/com/v1/controller/orderController.java

@ -277,7 +277,7 @@ public class BlxConfig {
public JSONObject creatOrder(JSONObject object) {
Map<String , Object > map = new HashMap<>();
map.put("organizeCode" , object.getString("organizeCode"));
map.put("organizeCode" , "dhy");
map.put("userMobile" , object.getString("userMobile"));
map.put("userCouponCode" , object.getString("userCouponCode"));
map.put("parkOrderId" , object.getString("parkOrderId"));
@ -290,7 +290,7 @@ public class BlxConfig {
map.put("inTime" , object.getString("inTime"));
map.put("outTime" , object.getString("outTime"));
map.put("carNo" , object.getString("carNo"));
map.put("parkType" , object.getString("parkType"));
map.put("parkType" , 1);
Map<String , Object> header = new HashMap<>();
header.put("token" , generateJw());

@ -68,6 +68,24 @@ public interface ApiOrderCreateHandleService {
*/
ApiOrder starbucksHandle(JSONObject object) throws Exception;
/**
* @Author Sum1Dream
* @Name blxCouponHandle
* @Description // 比邻星停车券业务
* @Date 17:15 2023/8/30
* @Param [object]
* @Return com.hai.entity.ApiOrder
*/
ApiOrder blxCouponHandle(JSONObject object) throws Exception;
/**
* @Author Sum1Dream
* @Name blxOrder
* @Description // 比邻星停车下单业务
* @Date 17:16 2023/8/30
* @Param [object]
* @Return com.hai.entity.ApiOrder
*/
ApiOrder blxOrder(JSONObject object) throws Exception;
}

@ -393,4 +393,16 @@ public class ApiOrderCreateHandleServiceImpl implements ApiOrderCreateHandleServ
return apiOrder;
}
@Override
public ApiOrder blxOrder(JSONObject object) throws Exception {
// 获取下单内容
JSONObject dataObject = JSONObject.parseObject(object.getString("content"));
// 查询api商户
ApiMerchants apiMerchants = apiMerchantsService.findByMchId(object.getString("merchId"));
return null;
}
}

@ -222,6 +222,27 @@ public class ApiOrderServiceImpl implements ApiOrderService {
orderService.createOrder(createOrderModel);
}
// 处理停车订单
if (OrderProductType.PRODUCT_TYPE14.getNumber().equals(object.getInteger("productType"))) {
apiOrder = orderCreateHandleService.blxCouponHandle(object);
// 组装子订单内容
CreateOrderChildModel createOrderChildModel = new CreateOrderChildModel();
createOrderChildModel.setMemName(apiMerchants.getMerchantName());
createOrderChildModel.setMemPhone(apiMerchants.getPhone());
createOrderChildModel.setCompanyId(2L);
createOrderChildModel.setGoodsType(OrderChildGoodsType.TYPE12.getNumber());
createOrderChildModel.setCouponCode(dataObject.getString("couponCode"));
createOrderChildModel.setSaleCount(dataObject.getInteger("receiverCount"));
createOrderChildModel.setIsTyAgent(false);
createOrderChildModel.setGoodsPrice(apiOrder.getOrderPrice());
// 组装订单
createOrderModel.getChildOrderList().add(createOrderChildModel);
orderService.createOrder(createOrderModel);
}

@ -14,6 +14,7 @@ public enum OrderProductType {
PRODUCT_TYPE3(3, "第三方充值", "orderLogo/member-top-up.png" , "MEMBER_RECHARGE_CONFIG"),
PRODUCT_TYPE4(4, "积分充值", "orderLogo/integral-top-up.png" , "INTEGRAL_RECHARGE_CONFIG"),
PRODUCT_TYPE5(5, "购买卡券", "orderLogo/coupon.png", "COUPON_CONFIG"),
PRODUCT_TYPE6(6, "在线加油" , "orderLogo/refuel-online.png", "REFUEL_ONLINE_CONFIG"),
PRODUCT_TYPE7(7, "优惠券包", "orderLogo/coupon-packs.png", "COUPON_PACKS_CONFIG"),
PRODUCT_TYPE8(8, "汇联通工会卡充值", "orderLogo/hlt.png", "HLT_CONFIG"),
@ -22,6 +23,7 @@ public enum OrderProductType {
PRODUCT_TYPE11(11, "贵州中石化" , "", "GZ_SINOPEC_CONFIG"),
PRODUCT_TYPE12(12, "实物商品" , "orderLogo/goods.png", "GOODS"),
PRODUCT_TYPE13(13, "比邻星停车券" , "orderLogo/coupon.png", "BLX_COUPON"),
PRODUCT_TYPE14(14, "比邻星停车业务" , "orderLogo/coupon.png", "BLX_PARK"),
PRODUCT_TYPE101(101, "惠支付" , "orderLogo/pay.png", "PAY"),
PRODUCT_TYPE102(102, "门店活动" , "orderLogo/store_activity.png", "STORE_ACTIVITY"),
;

@ -177,6 +177,22 @@ public class orderController {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未填写卡券编码,手机号,购买数量");
}
}
if (object.getInteger("productType").equals(OrderProductType.PRODUCT_TYPE14.getNumber())) {
if ( StringUtils.isBlank(dataObject.getString("userMobile"))
|| StringUtils.isBlank(dataObject.getString("parkOrderId"))
|| StringUtils.isBlank(dataObject.getString("parkName"))
|| dataObject.getInteger("orderType") == null
|| dataObject.getBigDecimal("prePrice") == null
|| dataObject.getInteger("parkId") == null
|| dataObject.getInteger("parkTime") == null
|| dataObject.getDate("inTime") == null
|| dataObject.getDate("outTime") == null
|| dataObject.getDate("carNo") == null
) {
log.error("OrderController -> create() error!","");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未填写卡券编码,手机号,购买数量");
}
}
return ResponseMsgUtil.success(apiOrderService.createOrder(object));

Loading…
Cancel
Save