mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-05 19:56:39 +08:00
fix bugger
This commit is contained in:
parent
9693a05646
commit
4256bb3ef7
@ -72,7 +72,7 @@ public class OrderController {
|
||||
OrderAddress orderAddress = new OrderAddress();
|
||||
try {
|
||||
for (OrdersEntity ordersEntitys : ordersEntityList) {
|
||||
System.out.println("ordersEntityList.size()"+ordersEntityList.size());
|
||||
// System.out.println("ordersEntityList.size()"+ordersEntityList.size());
|
||||
cartService.cancelProduct(ordersEntitys.getMemberId(), ordersEntity.getProductCode());
|
||||
//存储orderDetailList
|
||||
OrderDatilListEntity orderDatilListEntity = new OrderDatilListEntity();
|
||||
@ -99,7 +99,7 @@ public class OrderController {
|
||||
total_fee = total_fee + Double.parseDouble(ordersEntitys.getPayAmount()) * ordersEntitys.getBuyCount();
|
||||
}
|
||||
basePoint = basePoint + ordersEntitys.getBasePoint();
|
||||
System.out.println("basePoint"+basePoint);
|
||||
// System.out.println("basePoint"+basePoint);
|
||||
orderAddress.setAddressCityName(ordersEntitys.getOrderAddress().getAddressCityName());
|
||||
orderAddress.setAddressCountyName(ordersEntitys.getOrderAddress().getAddressCountyName());
|
||||
orderAddress.setAddressDetailInfo(ordersEntitys.getOrderAddress().getAddressDetailInfo());
|
||||
@ -122,8 +122,8 @@ public class OrderController {
|
||||
ordersEntity.setOrderNo(GenerateSequenceUtil.generateSequenceNo());
|
||||
ordersEntity.setOrderStatus("0");
|
||||
ordersEntity.setBasePoint(basePoint);
|
||||
|
||||
if (orderService.generateOrder(ordersEntity, orderDatilListJson) == 1) {
|
||||
int result = orderService.generateOrder(ordersEntity, orderDatilListJson);
|
||||
if (result == 1) {
|
||||
System.out.println("orderService.generateOrder(ordersEntity, orderDatilListJson) == 1");
|
||||
wxPayEntity.setProduct_id(ordersEntity.getProductCode());
|
||||
wxPayEntity.setTotal_fee(StringUtil.toString(total_fee));
|
||||
@ -132,6 +132,8 @@ public class OrderController {
|
||||
returnMap.put("orderNumber", ordersEntity.getOrderNo());
|
||||
returnMap.put("orderAmount", ordersEntity.getOrderAmount());
|
||||
return ResponseDTO.succData(returnMap, wxpayService.generateQRCode(wxPayEntity));
|
||||
}else if (result == 3){
|
||||
return ResponseDTO.wrap(OrderResponseCodeConst.GENERATE_FAIL_COUPONDED);
|
||||
}
|
||||
}catch (Exception e){
|
||||
System.out.println(e.getMessage());
|
||||
|
@ -12,6 +12,8 @@ public class OrderResponseCodeConst extends ResponseCodeConst {
|
||||
|
||||
public static final OrderResponseCodeConst GENERATE_FAIL = new OrderResponseCodeConst(9003, "数据生成失败!");
|
||||
|
||||
public static final OrderResponseCodeConst GENERATE_FAIL_COUPONDED = new OrderResponseCodeConst(9004, "优惠券已使用!");
|
||||
|
||||
public static final OrderResponseCodeConst SMS_FAIL = new OrderResponseCodeConst(9005, " 短信校验失败!");
|
||||
|
||||
public static final OrderResponseCodeConst SMS_OVERTIME = new OrderResponseCodeConst(9006, "短信校验超时!");
|
||||
|
@ -63,7 +63,7 @@ public class OrderService {
|
||||
couponCosumeEntity.setRealCouponAmount(realCouponAmount);
|
||||
JSONObject jsonObject = JSONObject.parseObject(couponService.couponCosume(couponCosumeEntity));
|
||||
if (!jsonObject.getString("code").equals("0")) {
|
||||
return 0;
|
||||
return 3;
|
||||
}
|
||||
//coupon json化
|
||||
OrderCouponEntity orderCouponEntity = new OrderCouponEntity();
|
||||
|
Loading…
Reference in New Issue
Block a user