new-dev
袁野 1 year ago
parent f091875cb7
commit 5487d5d6be
  1. 2
      hai-bweb/src/main/java/com/bweb/controller/HighTestController.java
  2. 2
      hai-cweb/src/main/java/com/cweb/controller/Goods/ShoppingCartController.java
  3. 96
      hai-order/src/main/java/com/web/controller/OrderController.java
  4. 146
      hai-order/src/main/java/com/web/controller/OrderPayController.java
  5. 36
      hai-service/src/main/java/com/hai/openApi/service/impl/ApiOrderCreateHandleServiceImpl.java
  6. 13
      hai-service/src/main/java/com/hai/openApi/service/impl/ApiOrderServiceImpl.java
  7. 5
      hai-service/src/main/java/com/hai/order/model/CreateOrderChildModel.java
  8. 5
      hai-service/src/main/java/com/hai/order/model/CreateOrderModel.java
  9. 24
      hai-service/src/main/java/com/hai/order/model/combine/Amount.java
  10. 49
      hai-service/src/main/java/com/hai/order/model/combine/CombineOrderModel.java
  11. 20
      hai-service/src/main/java/com/hai/order/model/combine/CreateCombine.java
  12. 54
      hai-service/src/main/java/com/hai/order/model/combine/SubOrders.java
  13. 2
      hai-service/src/main/java/com/hai/order/service/OrderCreateHandleService.java
  14. 5
      hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java
  15. 8
      hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java
  16. 1
      hai-service/src/main/java/com/hai/order/type/OrderChildGoodsType.java
  17. 7
      hai-service/src/main/java/com/hai/service/impl/CommonServiceImpl.java
  18. 2
      v1/src/main/java/com/v1/controller/business/BlxCouponController.java
  19. 3
      v1/src/main/java/com/v1/controller/orderController.java

File diff suppressed because one or more lines are too long

@ -147,6 +147,8 @@ public class ShoppingCartController {
shoppingCart.setImg(sku.getShowImg()); shoppingCart.setImg(sku.getShowImg());
shoppingCart.setOriginalPrice(sku.getOriginalPrice()); shoppingCart.setOriginalPrice(sku.getOriginalPrice());
shoppingCart.setLoseEfficacy(false); shoppingCart.setLoseEfficacy(false);
shoppingCart.setOpId(goodsDetail.getOpId());
shoppingCart.setOpName(goodsDetail.getOpName());
shoppingCart.setWhetherCheck(true); shoppingCart.setWhetherCheck(true);
shoppingCart.setPrice(sku.getPrice()); shoppingCart.setPrice(sku.getPrice());
shoppingCart.setCreateTime(new Date()); shoppingCart.setCreateTime(new Date());

@ -23,6 +23,7 @@ import com.hai.order.model.CreateOrderChildModel;
import com.hai.order.model.CreateOrderModel; import com.hai.order.model.CreateOrderModel;
import com.hai.order.model.ExportOrderMobileModel; import com.hai.order.model.ExportOrderMobileModel;
import com.hai.order.model.ExportOrderModel; import com.hai.order.model.ExportOrderModel;
import com.hai.order.model.combine.CreateCombine;
import com.hai.order.service.OrderService; import com.hai.order.service.OrderService;
import com.hai.order.type.OrderChildGoodsType; import com.hai.order.type.OrderChildGoodsType;
import com.hai.order.type.OrderPayType; import com.hai.order.type.OrderPayType;
@ -160,6 +161,101 @@ public class OrderController {
} }
} }
@RequestMapping(value="/createCombine",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "创建合单订单")
public ResponseData createCombine(@RequestBody CreateCombine createCombine) {
try {
// 用户信息
HighUserModel userModel = userCenter.getSessionModel(HighUserModel.class);
if (userModel == null) {
log.error("OrderController -> create() error!","");
throw ErrorHelp.genException(SysCode.System, ErrorCode.USE_VISIT_ILLEGAL, "");
}
if (StringUtils.isBlank(userModel.getHighUser().getPhone())) {
log.error("OrderController -> create() error!","");
throw ErrorHelp.genException(SysCode.System, ErrorCode.NO_BIND_PHONE, "");
}
String combineOrderNo = OrderUtil.generateOrderNo();
List<CreateOrderModel> orderModels = createCombine.getCreateOrderModel();
for (CreateOrderModel body : orderModels) {
body.setMemId(userModel.getHighUser().getId());
body.setMemName(userModel.getHighUser().getName());
body.setMemPhone(userModel.getHighUser().getPhone());
if (body.getChildOrderList() == null || body.getChildOrderList().size() == 0) {
log.error("OrderController -> create() error!","");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
for (CreateOrderChildModel childModel : body.getChildOrderList()) {
childModel.setMemId(body.getMemId());
childModel.setMemName(body.getMemName());
childModel.setMemPhone(body.getMemPhone());
// 校验子订单参数
if (childModel.getGoodsType() == null
|| OrderChildGoodsType.getDataByType(childModel.getGoodsType()) == null
|| childModel.getGoodsId() == null
|| childModel.getSaleCount() == null) {
log.error("OrderController -> create() error!","");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
if (childModel.getGoodsType().equals(OrderChildGoodsType.TYPE1.getNumber())
|| childModel.getGoodsType().equals(OrderChildGoodsType.TYPE8.getNumber())) {
if (childModel.getGoodsPrice() == null) {
log.error("OrderController -> create() error!","");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未填写充值金额");
}
} else if (childModel.getGoodsType().equals(OrderChildGoodsType.TYPE3.getNumber())) {
if (childModel.getGoodsPrice() == null || childModel.getGasOilNo() == null || childModel.getGasGunNo() == null) {
log.error("OrderController -> create() error!","");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未填写加油信息;加油金额、油号、抢号");
}
} else if (childModel.getGoodsType().equals(OrderChildGoodsType.TYPE6.getNumber())) {
if (childModel.getRechargeContent() == null) {
log.error("OrderController -> create() error!","");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "请输入充值内容!");
}
} else if (childModel.getGoodsType().equals(OrderChildGoodsType.TYPE4.getNumber()) || childModel.getGoodsType().equals(OrderChildGoodsType.TYPE9.getNumber())|| childModel.getGoodsType().equals(OrderChildGoodsType.TYPE10.getNumber())) {
if (childModel.getCustomerMobile() == null) {
log.error("OrderController -> create() error!","");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "请输入下单手机号!");
}
} else if (childModel.getGoodsType().equals(OrderChildGoodsType.TYPE11.getNumber())) {
if (childModel.getSkuId() == null) {
log.error("OrderController -> create() error!","");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "请选择规格!");
}
if (body.getDeliveryAddressId() == null) {
log.error("OrderController -> create() error!","");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "请选择收货地址!");
}
}
}
body.setOrderNo(OrderUtil.generateOrderNo());
body.setCombineOrderNo(combineOrderNo);
orderService.createOrder(body);
}
return ResponseMsgUtil.success(combineOrderNo);
} catch (Exception e) {
log.error("OrderController -> create() error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/cancel",method = RequestMethod.POST) @RequestMapping(value="/cancel",method = RequestMethod.POST)
@ResponseBody @ResponseBody
@ApiOperation(value = "订单取消") @ApiOperation(value = "订单取消")

@ -21,6 +21,7 @@ import com.hai.enum_type.UserCardType;
import com.hai.model.HighMerchantStoreModel; import com.hai.model.HighMerchantStoreModel;
import com.hai.model.HighUserModel; import com.hai.model.HighUserModel;
import com.hai.model.ResponseData; import com.hai.model.ResponseData;
import com.hai.order.model.combine.CombineOrderModel;
import com.hai.order.service.OrderPayBeforeService; import com.hai.order.service.OrderPayBeforeService;
import com.hai.order.service.OrderService; import com.hai.order.service.OrderService;
import com.hai.order.service.OrderPayService; import com.hai.order.service.OrderPayService;
@ -32,6 +33,7 @@ import com.web.config.SysConst;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.bouncycastle.LICENSE;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
@ -43,10 +45,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.*;
import java.util.HashMap;
import java.util.Map;
import java.util.SortedMap;
import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.ThreadLocalRandom;
/** /**
@ -142,9 +141,9 @@ public class OrderPayController {
weChatPayReqInfo.setMch_id(SysConst.getSysConfig().getWxPayMchId()); // 商户号 weChatPayReqInfo.setMch_id(SysConst.getSysConfig().getWxPayMchId()); // 商户号
if (PlatformType.TYPE2.getNumber().equals(body.getInteger("platformType"))) { if (PlatformType.TYPE2.getNumber().equals(body.getInteger("platformType"))) {
if (openIdType != null && openIdType.equals(2)) { if (openIdType != null && openIdType.equals(2)) {
weChatPayReqInfo.setSub_appid(WxOrderConfig.APPID_QYX_MP); // 商户号公众号 weChatPayReqInfo.setSub_appid(WxOrderConfig.APPID_QYX_MP); // 黔印象公众号
} else { } else {
weChatPayReqInfo.setSub_appid(WxOrderConfig.APPID_QYX_MINI); // 嗨森逛小程序 weChatPayReqInfo.setSub_appid(WxOrderConfig.APPID_QYX_MINI); // 黔印象小程序
} }
} else { } else {
if (openIdType != null && openIdType.equals(2)) { if (openIdType != null && openIdType.equals(2)) {
@ -400,119 +399,7 @@ public class OrderPayController {
return ResponseMsgUtil.exception(e); return ResponseMsgUtil.exception(e);
} }
} }
/*
@RequestMapping(value="/oilCardPay",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "嗨森逛油卡支付")
public ResponseData oilCardPay(@RequestBody JSONObject body) {
try {
if (body == null
|| StringUtils.isBlank(body.getString("orderNo"))
|| StringUtils.isBlank(body.getString("cardNo"))
|| StringUtils.isBlank(body.getString("password"))) {
log.error("oilCardPay error!", "参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
// 获取当前操作人信息
HighUserModel userInfoModel = userCenter.getSessionModel(HighUserModel.class);
if (userInfoModel == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.SEC_USER_EXPIRED, "");
}
String password = body.getString("password");
// 查询用户与卡号的关系
HighUserCard userCard = userCardService.getDetailByUserCardNo(userInfoModel.getHighUser().getId(), body.getString("cardNo"));
if (userCard == null) {
log.error("OrderController --> orderToPay() ERROR", "未绑定卡号");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未绑定卡号");
}
// 查询用户支付密码
HighUserPayPassword userPayPassword = userPayPasswordService.getDetailByUser(userInfoModel.getHighUser().getId());
if (userPayPassword == null) {
log.error("orderToPay error!", "未设置支付密码");
throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_SET_USER_PAY_PWD, "");
}
if (StringUtils.isBlank(password)) {
log.error("orderToPay error!", "未输入支付密码");
throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_ENTER_USER_PAY_PWD, "");
}
// 支付密码是否正确
if (!AESEncodeUtil.aesEncrypt(password).equals(userPayPassword.getPassword())) {
log.error("orderToPay error!", "");
throw ErrorHelp.genException(SysCode.System, ErrorCode.USER_PAY_PWD_ERROR, "");
}
// 查询订单
HighOrder order = orderService.getOrderDetailByNo(body.getString("orderNo"));
if(!order.getOrderStatus().equals(OrderStatus.STATUS1.getNumber())) {
log.error("OrderController --> orderToPay() ERROR", "订单不处于待支付状态");
throw ErrorHelp.genException(SysCode.System, ErrorCode.ORDER_NO_STAY_PAY, "");
}
return ResponseMsgUtil.success(orderPayService.oilCardPay(order, userCard));
} catch (Exception e) {
log.error("OrderPayController -> oilCardPay() error!",e);
return ResponseMsgUtil.exception(e);
}
}*/
/* @RequestMapping(value="/hltCardPay",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "贵州汇联通工会卡支付")
public ResponseData hltCardPay(@RequestBody JSONObject body) {
try {
if (body == null
|| StringUtils.isBlank(body.getString("orderNo"))
|| StringUtils.isBlank(body.getString("cardNo"))
|| StringUtils.isBlank(body.getString("password"))) {
log.error("oilCardPay error!", "参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
// 获取当前操作人信息
HighUserModel userInfoModel = userCenter.getSessionModel(HighUserModel.class);
if (userInfoModel == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.SEC_USER_EXPIRED, "");
}
String password = body.getString("password");
// 查询用户与卡号的关系
HighUserCard userCard = userCardService.getDetailByUserCardNo(userInfoModel.getHighUser().getId(), body.getString("cardNo"));
if (userCard == null) {
log.error("OrderController --> orderToPay() ERROR", "未绑定卡号");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未绑定卡号");
}
// 查询用户支付密码
HighUserPayPassword userPayPassword = userPayPasswordService.getDetailByUser(userInfoModel.getHighUser().getId());
if (userPayPassword == null) {
log.error("orderToPay error!", "未设置支付密码");
throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_SET_USER_PAY_PWD, "");
}
if (StringUtils.isBlank(password)) {
log.error("orderToPay error!", "未输入支付密码");
throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_ENTER_USER_PAY_PWD, "");
}
// 支付密码是否正确
if (!AESEncodeUtil.aesEncrypt(password).equals(userPayPassword.getPassword())) {
log.error("orderToPay error!", "");
throw ErrorHelp.genException(SysCode.System, ErrorCode.USER_PAY_PWD_ERROR, "");
}
// 查询订单
HighOrder order = orderService.getOrderDetailByNo(body.getString("orderNo"));
if(!order.getOrderStatus().equals(OrderStatus.STATUS1.getNumber())) {
log.error("OrderController --> orderToPay() ERROR", "订单不处于待支付状态");
throw ErrorHelp.genException(SysCode.System, ErrorCode.ORDER_NO_STAY_PAY, "");
}
return ResponseMsgUtil.success(orderPayService.hltCardPay(order, userCard));
} catch (Exception e) {
log.error("OrderController -> hltCardPay() error!",e);
return ResponseMsgUtil.exception(e);
}
}*/
@RequestMapping(value = "/unionPay", method = RequestMethod.POST) @RequestMapping(value = "/unionPay", method = RequestMethod.POST)
@ResponseBody @ResponseBody
@ -548,4 +435,27 @@ public class OrderPayController {
} }
} }
@RequestMapping(value = "wechatCombinePay" , method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "微信合单支付")
public ResponseData wechatCombinePay(@RequestBody JSONObject body, HttpServletRequest request) {
if (body == null
|| StringUtils.isBlank(body.getString("combineOrderNo"))
|| StringUtils.isBlank(body.getString("openId"))
) {
log.error("wechatCombinePay error!", "参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
Map<String , Object> map = new HashMap<>();
map.put("combineOrderNo" , body.getString("combineOrderNo"));
List<HighOrder> orders = orderService.getOrderList(map);
CombineOrderModel combineOrderModel = new CombineOrderModel();
return ResponseMsgUtil.success("");
}
} }

@ -348,8 +348,6 @@ public class ApiOrderCreateHandleServiceImpl implements ApiOrderCreateHandleServ
// 获取下单内容 // 获取下单内容
JSONObject dataObject = JSONObject.parseObject(object.getString("content")); JSONObject dataObject = JSONObject.parseObject(object.getString("content"));
JSONArray dataArray = dataObject.getJSONArray("data");
// 查询api商户 // 查询api商户
ApiMerchants apiMerchants = apiMerchantsService.findByMchId(object.getString("merchId")); ApiMerchants apiMerchants = apiMerchantsService.findByMchId(object.getString("merchId"));
@ -360,13 +358,39 @@ public class ApiOrderCreateHandleServiceImpl implements ApiOrderCreateHandleServ
mapProduct.put("mchId" , object.getString("merchId")); mapProduct.put("mchId" , object.getString("merchId"));
mapProduct.put("productType" , OrderProductType.PRODUCT_TYPE13.getNumber()); mapProduct.put("productType" , OrderProductType.PRODUCT_TYPE13.getNumber());
ApiMchProduct apiMchProducts = apiMchProductService.findByMap(mapProduct); ApiMchProduct mchProduct = apiMchProductService.findByMap(mapProduct);
BigDecimal priceTotal = new BigDecimal(0);
BigDecimal facePrice = new BigDecimal(0);
// 计算成本价格
BigDecimal price = priceComputeConfig.computationPriceCost(mchProduct.getDiscount() , new BigDecimal(apiBlxCoupon.getDenomination()));
// 判断金额是否充足
if (apiMerchants.getAmounts().compareTo(price) < 0) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.INSUFFICIENT_BALANCE);
}
// 组装内容
JSONObject jsonObject = new JSONObject();
jsonObject.put("name" ,apiBlxCoupon.getCouponName());
jsonObject.put("couponCode" , apiBlxCoupon.getCouponCode());
jsonObject.put("receiverPhone" , dataObject.getString("receiverPhone"));
jsonObject.put("receiverCount" , dataObject.getString("receiverCount"));
// 组装api订单
ApiOrder apiOrder = new ApiOrder();
apiOrder.setCreateTime(new Date());
apiOrder.setTitle(apiMerchants.getMerchantName() + "|" + OrderProductType.PRODUCT_TYPE13.getName() + "|扣款" + price);
apiOrder.setFacePrice(new BigDecimal(apiBlxCoupon.getDenomination()));
apiOrder.setCostPrice(price);
apiOrder.setOrderPrice(price.multiply(new BigDecimal(object.getInteger("receiverCount"))));
apiOrder.setMchId(object.getString("merchId"));
apiOrder.setMchName(apiMerchants.getMerchantName());
apiOrder.setUpdateTime(new Date());
apiOrder.setProductType(object.getInteger("productType"));
apiOrder.setMchOrderNo(object.getString("orderNo"));
apiOrder.setNotifyUrl(object.getString("notifyUrl"));
apiOrder.setContent(jsonObject.toJSONString());
return null; return apiOrder;
} }
} }

@ -84,7 +84,7 @@ public class ApiOrderServiceImpl implements ApiOrderService {
createOrderModel.setOrderNo(OrderUtil.generateOrderNo()); createOrderModel.setOrderNo(OrderUtil.generateOrderNo());
// 判断订单号是否重复 // 判断订单号是否重复
if (apiOrderList.size() > 0) { if (!apiOrderList.isEmpty()) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.ORDER_ALREADY_EXISTS); throw ErrorHelp.genException(SysCode.System, ErrorCode.ORDER_ALREADY_EXISTS);
} }
@ -109,8 +109,6 @@ public class ApiOrderServiceImpl implements ApiOrderService {
orderService.createOrder(createOrderModel); orderService.createOrder(createOrderModel);
} }
// 处理肯德基订单 // 处理肯德基订单
if (OrderProductType.PRODUCT_TYPE2.getNumber().equals(object.getInteger("productType"))) { if (OrderProductType.PRODUCT_TYPE2.getNumber().equals(object.getInteger("productType"))) {
apiOrder = orderCreateHandleService.kfcHandle(object); apiOrder = orderCreateHandleService.kfcHandle(object);
@ -206,17 +204,16 @@ public class ApiOrderServiceImpl implements ApiOrderService {
// 处理停车券订单 // 处理停车券订单
if (OrderProductType.PRODUCT_TYPE13.getNumber().equals(object.getInteger("productType"))) { if (OrderProductType.PRODUCT_TYPE13.getNumber().equals(object.getInteger("productType"))) {
apiOrder = orderCreateHandleService.mobileHandle(object); apiOrder = orderCreateHandleService.blxCouponHandle(object);
// 组装子订单内容 // 组装子订单内容
CreateOrderChildModel createOrderChildModel = new CreateOrderChildModel(); CreateOrderChildModel createOrderChildModel = new CreateOrderChildModel();
createOrderChildModel.setMemName(apiMerchants.getMerchantName()); createOrderChildModel.setMemName(apiMerchants.getMerchantName());
createOrderChildModel.setMemPhone(apiMerchants.getPhone()); createOrderChildModel.setMemPhone(apiMerchants.getPhone());
createOrderChildModel.setCompanyId(2L); createOrderChildModel.setCompanyId(2L);
createOrderChildModel.setGoodsType(OrderChildGoodsType.TYPE6.getNumber()); createOrderChildModel.setGoodsType(OrderChildGoodsType.TYPE12.getNumber());
createOrderChildModel.setGoodsId(dataObject.getLong("productId")); createOrderChildModel.setCouponCode(dataObject.getString("couponCode"));
createOrderChildModel.setRechargeContent(dataObject.getString("mobile")); createOrderChildModel.setSaleCount(dataObject.getInteger("receiverCount"));
createOrderChildModel.setSaleCount(1);
createOrderChildModel.setIsTyAgent(false); createOrderChildModel.setIsTyAgent(false);
createOrderChildModel.setGoodsPrice(apiOrder.getOrderPrice()); createOrderChildModel.setGoodsPrice(apiOrder.getOrderPrice());

@ -119,4 +119,9 @@ public class CreateOrderChildModel {
private Long shopCartId; private Long shopCartId;
/** ======================= 实物商品所需参数 end ======================== **/ /** ======================= 实物商品所需参数 end ======================== **/
/** ======================= 比邻星停车券 start ======================== **/
// 停车券编码
private String couponCode;
/** ======================= 比邻星停车券 end ======================== **/
} }

@ -24,6 +24,11 @@ public class CreateOrderModel {
*/ */
private String orderNo; private String orderNo;
/**
* 合单订单号
*/
private String combineOrderNo;
/** /**
* 用户id * 用户id
*/ */

@ -0,0 +1,24 @@
package com.hai.order.model.combine;
import lombok.Data;
/**
* @author sum1dream
*/
@Data
public class Amount {
/**
* @Author Sum1Dream
* @Description // 标价金额 子单金额,单位为分。
* @Date 2023/8/7 15:21
*/
private Integer totalAmount;
/**
* @Author Sum1Dream
* @Description // 标价币种 人民币:CNY。
* @Date 2023/8/7 15:21
*/
private String currency;
}

@ -1,44 +1,57 @@
package com.hai.order.model.combine; package com.hai.order.model.combine;
import com.alibaba.fastjson.JSONObject;
import com.hai.order.model.CreateOrderModel; import com.hai.order.model.CreateOrderModel;
import lombok.Data;
import java.util.List; import java.util.List;
public class CombineOrderModel { /**
/** * @author sum1dream
* 公司id
*/ */
private Long companyId; @Data
public class CombineOrderModel {
/** /**
* 用户id * @Author Sum1Dream
* @Description // 合单商户appid
* @Date 2023/8/7 15:21
*/ */
private Long userId; private String combineAppid;
/** /**
* 用户名称 * @Author Sum1Dream
* @Description // 合单商户号
* @Date 2023/8/7 15:21
*/ */
private String userName; private String combineMchId;
/** /**
* 用户手机号 * @Author Sum1Dream
* @Description // 合单商户订单号
* @Date 2023/8/7 15:21
*/ */
private String userPhone; private String combineOutTradeNo;
/** /**
* 用户优惠券关系id * @Author Sum1Dream
* @Description // 子单信息
* @Date 2023/8/7 15:21
*/ */
private Long memDiscountId; private List<SubOrders> subOrders;
/** /**
* 支付积分金币 * @Author Sum1Dream
* @Description // 支付者信息
* @Date 2023/8/7 15:21
*/ */
private Integer payGold; private JSONObject combinePayerInfo;
/** /**
* 支付密码 * @Author Sum1Dream
* @Description // 接收微信支付异步通知回调地址
* @Date 2023/8/7 15:21
*/ */
private String payPwd; private String notifyUrl;
List<CreateOrderModel> createOrderModelList;
} }

@ -0,0 +1,20 @@
package com.hai.order.model.combine;
import com.hai.order.model.CreateOrderModel;
import lombok.Data;
import java.util.List;
/**
* @author sum1dream
*/
@Data
public class CreateCombine {
/**
* @Author Sum1Dream
* @Description // 合单商户号
* @Date 2023/8/7 15:21
*/
private List<CreateOrderModel> createOrderModel;
}

@ -0,0 +1,54 @@
package com.hai.order.model.combine;
import lombok.Data;
/**
* @author sum1dream
*/
@Data
public class SubOrders {
/**
* @Author Sum1Dream
* @Description // 子单商户号
* @Date 2023/8/7 15:21
*/
private String mchId;
/**
* @Author Sum1Dream
* @Description // 附加数据
* @Date 2023/8/7 15:21
*/
private String attach;
/**
* @Author Sum1Dream
* @Description // 订单金额
* @Date 2023/8/7 15:21
*/
private Amount amount;
/**
* @Author Sum1Dream
* @Description // 子单商户订单号
* @Date 2023/8/7 15:21
*/
private String outTradeNo;
/**
* @Author Sum1Dream
* @Description // 子单商户订单号
* @Date 2023/8/7 15:21
*/
private String subMchId;
/**
* @Author Sum1Dream
* @Description // 商品描述
* @Date 2023/8/7 15:21
*/
private String description;
}

@ -86,4 +86,6 @@ public interface OrderCreateHandleService {
*/ */
HighChildOrder goods(HighOrder order, CreateOrderChildModel createOrderChild) throws Exception; HighChildOrder goods(HighOrder order, CreateOrderChildModel createOrderChild) throws Exception;
HighChildOrder blxCoupon(HighOrder order , CreateOrderChildModel createOrderChildModel) throws Exception;
} }

@ -968,4 +968,9 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
return childOrder; return childOrder;
} }
@Override
public HighChildOrder blxCoupon(HighOrder order, CreateOrderChildModel createOrderChildModel) throws Exception {
return null;
}
} }

@ -167,6 +167,7 @@ public class OrderServiceImpl implements OrderService {
order.setPromoteCode(popularizeUser.getAgentId().toString()); order.setPromoteCode(popularizeUser.getAgentId().toString());
} }
order.setCombineOrderNo(createOrderModel.getCombineOrderNo());
order.setOrderNo(createOrderModel.getOrderNo()); order.setOrderNo(createOrderModel.getOrderNo());
order.setMemId(createOrderModel.getMemId()); order.setMemId(createOrderModel.getMemId());
order.setMemName(createOrderModel.getMemName()); order.setMemName(createOrderModel.getMemName());
@ -328,6 +329,9 @@ public class OrderServiceImpl implements OrderService {
order.setExt6(order.getExt6() + "," +childOrder.getGoodsImg()); order.setExt6(order.getExt6() + "," +childOrder.getGoodsImg());
} }
// 比邻星停车券
} else if (child.getGoodsType().equals(OrderChildGoodsType.TYPE12.getNumber())) {
HighChildOrder childOrder = orderCreateHandleService.blxCoupon(order , child);
} else { } else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知业务类型"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知业务类型");
} }
@ -815,6 +819,10 @@ public class OrderServiceImpl implements OrderService {
criteria.andCompanyIdEqualTo(MapUtils.getLong(param, "companyId")); criteria.andCompanyIdEqualTo(MapUtils.getLong(param, "companyId"));
} }
if (StringUtils.isNotBlank(MapUtils.getString(param , "combineOrderNo"))) {
criteria.andCombineOrderNoEqualTo(MapUtils.getString(param , "combineOrderNo"));
}
if (StringUtils.isNotBlank(MapUtils.getString(param, "title"))) { if (StringUtils.isNotBlank(MapUtils.getString(param, "title"))) {
criteria.andTitleLike("%" + MapUtils.getString(param, "title") + "%"); criteria.andTitleLike("%" + MapUtils.getString(param, "title") + "%");
} }

@ -20,6 +20,7 @@ public enum OrderChildGoodsType {
TYPE9(9, "星巴克"), TYPE9(9, "星巴克"),
TYPE10(10, "第三方充值"), TYPE10(10, "第三方充值"),
TYPE11(11, "实物商品购买"), TYPE11(11, "实物商品购买"),
TYPE12(12, "比邻星停车券"),
; ;
private Integer number; private Integer number;

@ -846,7 +846,7 @@ public class CommonServiceImpl implements CommonService {
} }
String borderWidth; String borderWidth;
String padding; String padding;
Double alpha; double alpha;
// 1:ios 2:安卓 // 1:ios 2:安卓
if (type == 2) { if (type == 2) {
borderWidth = "12"; borderWidth = "12";
@ -874,11 +874,6 @@ public class CommonServiceImpl implements CommonService {
storeModel.setSourceType(1); storeModel.setSourceType(1);
storeModel.setLatitude(payData.getString("latitude")); storeModel.setLatitude(payData.getString("latitude"));
storeModel.setLongitude(payData.getString("longitude")); storeModel.setLongitude(payData.getString("longitude"));
// if (payData.getString("iconPath") == null) {
// storeModel.setLogo(CommonSysConst.getSysConfig().getFilesystem() + "/img/store.png");
// } else {
// storeModel.setLogo(payData.getString("iconPath"));
// }
storeModel.setIconPath(CommonSysConst.getSysConfig().getFilesystem() + "/img/location.png"); storeModel.setIconPath(CommonSysConst.getSysConfig().getFilesystem() + "/img/location.png");
storeModel.setLogo(CommonSysConst.getSysConfig().getFilesystem() + "/img/store.png"); storeModel.setLogo(CommonSysConst.getSysConfig().getFilesystem() + "/img/store.png");
storeModel.setRotate(1); storeModel.setRotate(1);

@ -32,7 +32,7 @@ import java.util.Map;
public class BlxCouponController { public class BlxCouponController {
private static Logger log = LoggerFactory.getLogger(MobileRechargeController.class); private static Logger log = LoggerFactory.getLogger(BlxCouponController.class);
@Resource @Resource
private ApiMerchantsService apiMerchantsService; private ApiMerchantsService apiMerchantsService;

@ -169,8 +169,7 @@ public class orderController {
} }
} }
if (object.getInteger("productType").equals(OrderProductType.PRODUCT_TYPE13.getNumber())) { if (object.getInteger("productType").equals(OrderProductType.PRODUCT_TYPE13.getNumber())) {
if (dataObject.getJSONArray("data") == null if ( StringUtils.isBlank(dataObject.getString("couponCode"))
|| StringUtils.isBlank(dataObject.getString("couponCode"))
|| StringUtils.isBlank(dataObject.getString("receiverPhone")) || StringUtils.isBlank(dataObject.getString("receiverPhone"))
|| dataObject.getInteger("receiverCount") == null || dataObject.getInteger("receiverCount") == null
) { ) {

Loading…
Cancel
Save