yangyb 2 viikkoa sitten
vanhempi
sitoutus
2b6d29d59c

+ 20 - 0
mall-service/src/main/java/com/txz/mall/business/OrderServiceBusiness.java

@@ -0,0 +1,20 @@
+package com.txz.mall.business;
+
+import vo.StoreOrderVO;
+
+
+/**
+ * Created by CodeGenerator on 2025/07/15.
+ */
+public interface OrderServiceBusiness {
+
+
+    /**
+     * 获取订单列表
+     *
+     * @return 订单列表
+     */
+    StoreOrderVO orderDetail(Long id);
+
+
+}

+ 48 - 0
mall-service/src/main/java/com/txz/mall/business/impl/OrderServiceBusinessImpl.java

@@ -0,0 +1,48 @@
+package com.txz.mall.business.impl;
+
+import com.txz.mall.business.OrderServiceBusiness;
+import com.txz.mall.model.StoreOrder;
+import com.txz.mall.model.StoreOrderInfo;
+import com.txz.mall.service.*;
+import lombok.AllArgsConstructor;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import tk.mybatis.mapper.entity.Condition;
+import tk.mybatis.mapper.entity.Example;
+import vo.StoreOrderVO;
+
+import java.util.List;
+
+
+/**
+ * Created by CodeGenerator on 2025/07/15.
+ */
+@Service
+@Transactional
+@AllArgsConstructor
+public class OrderServiceBusinessImpl implements OrderServiceBusiness {
+
+    private final StoreOrderService storeOrderService;
+    private final StoreOrderInfoService storeOrderInfoService;
+    private final UserAddressService userAddressService;
+    private final StorePinkService storePinkService;
+    private final StoreCombinationService storeCombinationService;
+
+    @Override
+    public StoreOrderVO orderDetail(Long id) {
+        StoreOrder storeOrder = storeOrderService.findById(id);
+        Condition infoCondition = new Condition(StoreOrderInfo.class);
+        Example.Criteria infoCriteria = infoCondition.createCriteria();
+        infoCriteria.andEqualTo("isDelete", 0);
+        infoCriteria.andEqualTo("orderId", storeOrder.getOrderId());
+        List<StoreOrderInfo> infoList = storeOrderInfoService.findByCondition(infoCondition);
+
+
+        StoreOrderVO vo = new StoreOrderVO();
+        BeanUtils.copyProperties(storeOrder, vo);
+        vo.setOrderInfoVO(infoList);
+        return vo;
+    }
+
+}

+ 1 - 11
mall-service/src/main/java/com/txz/mall/controller/CombinationController.java

@@ -152,16 +152,6 @@ public class CombinationController {
         return Result.success();
     }
 
-//    @PostMapping("/getActivityProduct")
-//    @ApiOperation(value = "获取活动商品列表")
-//    public Result<PageInfo<ActivityProductVO>> productList(@RequestParam("activityId") Long activityId, @RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size) {
-//        if (activityId == null) {
-//            return Result.fail(ResultCode.ID_IS_NULL);
-//        }
-//        PageInfo<ActivityProductVO> list = storeCombinationService.getActivityProduct(activityId, page, size);
-//        return Result.success(list);
-//    }
-
     @PostMapping("/getActivityProductIds")
     @ApiOperation(value = "获取活动商品ids")
     public Result<List<Long>> getActivityProductIds(@RequestParam("activityId") Long activityId) {
@@ -193,7 +183,7 @@ public class CombinationController {
         if (dto.getPinkId() == null && dto.getCid() == null) {
             return Result.fail(ResultCode.ID_IS_NULL);
         }
-        storeCombinationService.goPink(dto);
+        storeOrderService.goPink(dto);
         return Result.success();
     }
 

+ 4 - 1
mall-service/src/main/java/com/txz/mall/controller/OrderController.java

@@ -2,6 +2,7 @@ package com.txz.mall.controller;
 
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
+import com.txz.mall.business.OrderServiceBusiness;
 import com.txz.mall.core.Result;
 import com.txz.mall.core.ResultCode;
 import com.txz.mall.model.StoreOrder;
@@ -34,6 +35,8 @@ public class OrderController {
 
     @Resource
     private StoreOrderService storeOrderService;
+    @Resource
+    private OrderServiceBusiness orderServiceBusiness;
 
     @PostMapping("/add")
     @ApiOperation(value = "创建订单")
@@ -89,7 +92,7 @@ public class OrderController {
         if (id == null) {
             return Result.fail(ResultCode.ID_IS_NULL);
         }
-        StoreOrderVO vo = storeOrderService.orderDetail(id);
+        StoreOrderVO vo = orderServiceBusiness.orderDetail(id);
         return Result.success(vo);
     }
 

+ 1 - 0
mall-service/src/main/java/com/txz/mall/core/ResultCode.java

@@ -38,6 +38,7 @@ public enum ResultCode {
     IDENTITYUPKEY_IS_ERROR("6014","身份证正面照片key不能为空"),
     CODE_IS_INVALID("6015","验证码无效"),
     TOKEN_IS_NULL("6016","TOKEN不能为空"),
+    INSUFFICIENT_BALANCE("8000", "余额不足"),
 
 
 

+ 12 - 12
mall-service/src/main/java/com/txz/mall/model/StorePink.java

@@ -100,12 +100,12 @@ public class StorePink {
     @Column(name = "l_id")
     private Integer lId;
 
-    /**
-     * 是否发送模板消息0未发送1已发送
-     */
-    @ApiModelProperty(value = "是否发送模板消息 0未发送 1已发送")
-    @Column(name = "is_tpl")
-    private Integer isTpl;
+//    /**
+//     * 是否发送模板消息0未发送1已发送
+//     */
+//    @ApiModelProperty(value = "是否发送模板消息 0未发送 1已发送")
+//    @Column(name = "is_tpl")
+//    private Integer isTpl;
 
     /**
      * 是否退款 0未退款 1已退款
@@ -121,12 +121,12 @@ public class StorePink {
     @Column(name = "status")
     private Integer status;
 
-    /**
-     * 是否虚拟拼团
-     */
-    @ApiModelProperty(value = "是否虚拟拼团")
-    @Column(name = "is_virtual")
-    private Integer isVirtual;
+//    /**
+//     * 是否虚拟拼团
+//     */
+//    @ApiModelProperty(value = "是否虚拟拼团")
+//    @Column(name = "is_virtual")
+//    private Integer isVirtual;
 
     /**
      * 用户昵称

+ 0 - 14
mall-service/src/main/java/com/txz/mall/service/StoreCombinationService.java

@@ -1,10 +1,7 @@
 package com.txz.mall.service;
 
-import com.github.pagehelper.PageInfo;
 import com.txz.mall.core.Service;
 import com.txz.mall.model.StoreCombination;
-import dto.GoPinkDTO;
-import vo.ActivityProductVO;
 
 import java.util.List;
 
@@ -22,17 +19,6 @@ public interface StoreCombinationService extends Service<StoreCombination> {
      */
     void addActivityProduct(List<StoreCombination> list, Long activityId);
 
-    /**
-     * 获取活动商品列表
-     */
-    PageInfo<ActivityProductVO> getActivityProduct(Long activityId, Integer page, Integer size);
-
-    /**
-     * 去拼团
-     *
-     */
-    void goPink(GoPinkDTO dto);
-
     /**
      * 更多拼团信息
      */

+ 5 - 6
mall-service/src/main/java/com/txz/mall/service/StoreOrderService.java

@@ -29,6 +29,11 @@ public interface StoreOrderService extends Service<StoreOrder> {
      */
     void goOpen(Long orderId);
 
+    /**
+     * 去拼团
+     */
+    void goPink(GoPinkDTO dto);
+
     /**
      * 导出订单
      *
@@ -71,12 +76,6 @@ public interface StoreOrderService extends Service<StoreOrder> {
      */
     List<StoreOrderVO> orderList(StoreOrderDTO dto);
 
-    /**
-     * 获取订单列表
-     *
-     * @return 订单列表
-     */
-    StoreOrderVO orderDetail(Long id);
 
     /**
      * 获取用户当前的拼团订单

+ 12 - 153
mall-service/src/main/java/com/txz/mall/service/impl/StoreCombinationServiceImpl.java

@@ -1,32 +1,29 @@
 package com.txz.mall.service.impl;
 
 import cn.hutool.core.collection.CollUtil;
-import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
-import com.github.pagehelper.PageHelper;
-import com.github.pagehelper.PageInfo;
 import com.txz.mall.core.AbstractService;
 import com.txz.mall.core.ServiceException;
-import com.txz.mall.dubbo.client.CifUserDubboServiceClient;
 import com.txz.mall.model.StoreCombination;
 import com.txz.mall.model.StoreFlashActivity;
-import com.txz.mall.model.StorePink;
 import com.txz.mall.model.StoreProduct;
-import com.txz.mall.service.*;
-import dto.GoPinkDTO;
+import com.txz.mall.service.StoreCombinationService;
+import com.txz.mall.service.StoreFlashActivityService;
+import com.txz.mall.service.StorePinkService;
+import com.txz.mall.service.StoreProductService;
 import lombok.AllArgsConstructor;
 import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import tk.mybatis.mapper.entity.Condition;
 import tk.mybatis.mapper.entity.Example;
-import vo.ActivityProductVO;
 import vo.FlashActivityVO;
 
-import java.util.*;
+import java.util.Date;
+import java.util.List;
 import java.util.stream.Collectors;
 
 
@@ -41,9 +38,6 @@ public class StoreCombinationServiceImpl extends AbstractService<StoreCombinatio
     private final StoreProductService storeProductService;
     private final StoreFlashActivityService storeFlashActivityService;
     private final StorePinkService storePinkService;
-    private final ProductAttrService productAttrService;
-    private final ProductAttrValueService productAttrValueService;
-    private final CifUserDubboServiceClient userDubboServiceClient;
 
     @Override
     public void addActivityProduct(List<StoreCombination> list, Long activityId) {
@@ -57,10 +51,12 @@ public class StoreCombinationServiceImpl extends AbstractService<StoreCombinatio
                 .collect(Collectors.joining(","));
         List<StoreProduct> productList = storeProductService.findByIds(idsStr);
         for (StoreCombination storeCombination : list) {
-            StoreProduct product = productList.stream()
-                    .filter(item -> item.getId().equals(storeCombination.getProductId()))
-                    .findFirst().orElse(null);
-            BeanUtils.copyProperties(product, storeCombination);
+            List<StoreProduct> productCollect = productList.stream()
+                    .filter(item -> item.getId().equals(storeCombination.getProductId())).collect(Collectors.toList());
+            if (CollectionUtils.isEmpty(productCollect)) {
+                continue;
+            }
+            BeanUtils.copyProperties(productCollect.get(0), storeCombination);
             storeCombination.setStartTime(flashActivity.getStartTime());
             storeCombination.setStopTime(flashActivity.getEndTime());
             if (activityVO != null) {
@@ -86,143 +82,6 @@ public class StoreCombinationServiceImpl extends AbstractService<StoreCombinatio
         save(list);
     }
 
-    @Override
-    public PageInfo<ActivityProductVO> getActivityProduct(Long activityId, Integer page, Integer size) {
-        PageHelper.startPage(page, size);
-        PageInfo pageInfo = null;
-        Condition productCondition = new Condition(StoreProduct.class);
-        Example.Criteria productCriteria = productCondition.createCriteria();
-        productCriteria.andEqualTo("isDelete", 0);
-        List<StoreProduct> productList = storeProductService.findByCondition(productCondition);
-        List<Long> productCollect = productList.stream().map(StoreProduct::getId).collect(Collectors.toList());
-
-        Condition condition = new Condition(StoreCombination.class);
-        Example.Criteria criteria = condition.createCriteria();
-        criteria.andEqualTo("isDelete", 0);
-        criteria.andEqualTo("activityId", activityId);
-        List<StoreCombination> activityList = findByCondition(condition);
-        List<Long> combinationCollect = activityList.stream().map(StoreCombination::getProductId).collect(Collectors.toList());
-
-        Set<Long> combinationSet = new HashSet<>(combinationCollect);
-        Set<Long> productSet = new HashSet<>(productCollect);
-
-        // 交集
-        Set<Long> intersectionSet = new HashSet<>(productSet);
-        intersectionSet.retainAll(combinationSet);
-
-//        List<ActivityProductVO> list = productList.stream()
-//                .map(product -> {
-//                    ActivityProductVO vo = new ActivityProductVO();
-//                    BeanUtils.copyProperties(vo, product); // Spring BeanUtils
-//                    if (intersectionSet.contains(vo.getId())) {
-//                        vo.setIsExist(1);
-//                    } else {
-//                        vo.setIsExist(0);
-//                    }
-//                    return vo;
-//                })
-//                .collect(Collectors.toList());
-//
-//        return new PageInfo(list);
-
-        return null;
-    }
-
-
-    @Override
-    public void goPink(GoPinkDTO dto) {
-        Date date = new Date();
-        if (dto.getPinkId() == null && dto.getCid() != null) {
-            automaticMatch(dto);
-        }
-        if (dto.getPinkId() != null) {
-            StorePink teamPink = storePinkService.findById(dto.getPinkId());
-            if (ObjectUtil.isNull(teamPink) || teamPink.getIsRefund().equals(1)) {
-                throw new ServiceException("对应的拼团不存在");
-            }
-            Condition condition = new Condition(StoreCombination.class);
-            Example.Criteria criteria = condition.createCriteria();
-            criteria.andEqualTo("isDelete", 0);
-            criteria.andEqualTo("isShow", 1);
-            criteria.andLessThanOrEqualTo("startTime", date);
-            criteria.andGreaterThanOrEqualTo("stopTime", date);
-            List<StoreCombination> combinationList = findByCondition(condition);
-            if (CollUtil.isEmpty(combinationList)) {
-                throw new ServiceException("拼团商品不存在或未开启");
-            }
-
-            Condition pinkCondition = new Condition(StorePink.class);
-            Example.Criteria pinkCriteria = pinkCondition.createCriteria();
-            pinkCriteria.andEqualTo("isDelete", 0);
-            pinkCriteria.andEqualTo("kId", dto.getPinkId());
-            pinkCriteria.andEqualTo("status", 1);
-            List<StorePink> pinkList = storePinkService.findByCondition(pinkCondition);
-
-            //拼团剩余人数
-            int count = teamPink.getPeople() - (CollUtil.isEmpty(pinkList) ? 0 : pinkList.size());
-            if (count < 1) {
-                throw new ServiceException("拼团已满");
-            }
-            List<Long> uidList = pinkList.stream().map(StorePink::getUid).collect(Collectors.toList());
-            if (uidList.contains(dto.getUserId())) {
-                throw new ServiceException("您已加入该拼团");
-            }
-            // 加入拼团
-            StorePink storePink = new StorePink();
-            BeanUtils.copyProperties(teamPink, storePink);
-            storePink.setId(null);
-//            storePink.setOrderId(null);
-            storePink.setOrderIdKey(null);
-            storePink.setUid(dto.getUserId());
-            storePink.setKId(1L);
-            storePink.setCreateTime(date);
-            storePinkService.save(storePink);
-            if (count == 1) {
-                storePinkService.pinkSuccess(teamPink.getId());
-            }
-        }
-    }
-
-    /**
-     * 自动匹配
-     */
-    private void automaticMatch(GoPinkDTO dto) {
-        // 找一个最快能成团的
-        Date date = new Date();
-        StoreCombination storeCombination = findById(dto.getCid());
-        if (ObjectUtil.isNull(storeCombination) || storeCombination.getIsDelete().equals(1)) {
-            throw new ServiceException("对应拼团商品不存在");
-        }
-        Condition pinkCondition = new Condition(StorePink.class);
-        Example.Criteria pinkCriteria = pinkCondition.createCriteria();
-        pinkCriteria.andEqualTo("isDelete", 0);
-        pinkCriteria.andEqualTo("cid", dto.getCid());
-        pinkCriteria.andEqualTo("status", 1);
-        List<StorePink> pinkList = storePinkService.findByCondition(pinkCondition);
-        Map<String, List<StorePink>> collect = pinkList.stream().collect(Collectors.groupingBy(StorePink::getOrderId));
-        // 找出最多value对应的key
-        List<StorePink> maxPinkList = collect.values().stream()
-                .max(Comparator.comparing(List::size))
-                .orElse(Collections.emptyList());
-        if (CollectionUtils.isNotEmpty(maxPinkList)) {
-            StorePink pink = maxPinkList.stream().filter(i -> i.getKId().equals(0L)).collect(Collectors.toList()).get(0);
-            int count = pink.getPeople() - (CollUtil.isEmpty(pinkList) ? 0 : pinkList.size());
-            if (count > 0) {
-                StorePink storePink = new StorePink();
-                BeanUtils.copyProperties(pink, storePink);
-                storePink.setId(null);
-//            storePink.setOrderId(null);
-                storePink.setOrderIdKey(null);
-                storePink.setUid(dto.getUserId());
-                storePink.setKId(1L);
-                storePink.setCreateTime(date);
-                storePinkService.save(storePink);
-                if (count == 1) {
-                    storePinkService.pinkSuccess(pink.getId());
-                }
-            }
-        }
-    }
 
     @Override
     public List<StoreCombination> getMore(Integer comId) {

+ 109 - 18
mall-service/src/main/java/com/txz/mall/service/impl/StoreOrderServiceImpl.java

@@ -108,7 +108,6 @@ public class StoreOrderServiceImpl extends AbstractService<StoreOrder> implement
         storePink.setStopTime(DateUtils.addMinutes(date, effectiveTime));
         storePink.setKId(0L);
         storePink.setUid(storeOrder.getUid());
-        storePink.setIsTpl(0);
         storePink.setIsRefund(0);
         storePink.setStatus(1);
         storePinkService.save(storePink);
@@ -117,6 +116,102 @@ public class StoreOrderServiceImpl extends AbstractService<StoreOrder> implement
         update(storeOrder);
     }
 
+
+    @Override
+    public void goPink(GoPinkDTO dto) {
+        Date date = new Date();
+        if (dto.getPinkId() == null && dto.getCid() != null) {
+            automaticMatch(dto);
+        }
+        if (dto.getPinkId() != null) {
+            StorePink teamPink = storePinkService.findById(dto.getPinkId());
+            if (ObjectUtil.isNull(teamPink) || teamPink.getIsRefund().equals(1)) {
+                throw new ServiceException("对应的拼团不存在");
+            }
+            Condition condition = new Condition(StoreCombination.class);
+            Example.Criteria criteria = condition.createCriteria();
+            criteria.andEqualTo("isDelete", 0);
+            criteria.andEqualTo("isShow", 1);
+            criteria.andLessThanOrEqualTo("startTime", date);
+            criteria.andGreaterThanOrEqualTo("stopTime", date);
+            List<StoreCombination> combinationList = storeCombinationService.findByCondition(condition);
+            if (CollUtil.isEmpty(combinationList)) {
+                throw new ServiceException("拼团商品不存在或未开启");
+            }
+
+            Condition pinkCondition = new Condition(StorePink.class);
+            Example.Criteria pinkCriteria = pinkCondition.createCriteria();
+            pinkCriteria.andEqualTo("isDelete", 0);
+            pinkCriteria.andEqualTo("kId", dto.getPinkId());
+            pinkCriteria.andEqualTo("status", 1);
+            List<StorePink> pinkList = storePinkService.findByCondition(pinkCondition);
+
+            //拼团剩余人数
+            int count = teamPink.getPeople() - (CollUtil.isEmpty(pinkList) ? 0 : pinkList.size());
+            if (count < 1) {
+                throw new ServiceException("拼团已满");
+            }
+            List<Long> uidList = pinkList.stream().map(StorePink::getUid).collect(Collectors.toList());
+            if (uidList.contains(dto.getUserId())) {
+                throw new ServiceException("您已加入该拼团");
+            }
+            // 加入拼团
+            StorePink storePink = new StorePink();
+            BeanUtils.copyProperties(teamPink, storePink);
+            storePink.setId(null);
+//            storePink.setOrderId(null);
+            storePink.setOrderIdKey(null);
+            storePink.setUid(dto.getUserId());
+            storePink.setKId(1L);
+            storePink.setCreateTime(date);
+            storePinkService.save(storePink);
+            if (count == 1) {
+                storePinkService.pinkSuccess(teamPink.getId());
+            }
+        }
+    }
+
+    /**
+     * 自动匹配
+     */
+    private void automaticMatch(GoPinkDTO dto) {
+        // 找一个最快能成团的
+        Date date = new Date();
+        StoreCombination storeCombination = storeCombinationService.findById(dto.getCid());
+        if (ObjectUtil.isNull(storeCombination) || storeCombination.getIsDelete().equals(1)) {
+            throw new ServiceException("对应拼团商品不存在");
+        }
+        Condition pinkCondition = new Condition(StorePink.class);
+        Example.Criteria pinkCriteria = pinkCondition.createCriteria();
+        pinkCriteria.andEqualTo("isDelete", 0);
+        pinkCriteria.andEqualTo("cid", dto.getCid());
+        pinkCriteria.andEqualTo("status", 1);
+        List<StorePink> pinkList = storePinkService.findByCondition(pinkCondition);
+        Map<String, List<StorePink>> collect = pinkList.stream().collect(Collectors.groupingBy(StorePink::getOrderId));
+        // 找出最多value对应的key
+        List<StorePink> maxPinkList = collect.values().stream()
+                .max(Comparator.comparing(List::size))
+                .orElse(Collections.emptyList());
+        if (CollectionUtils.isNotEmpty(maxPinkList)) {
+            StorePink pink = maxPinkList.stream().filter(i -> i.getKId().equals(0L)).collect(Collectors.toList()).get(0);
+            int count = pink.getPeople() - (CollUtil.isEmpty(pinkList) ? 0 : pinkList.size());
+            if (count > 0) {
+                StorePink storePink = new StorePink();
+                BeanUtils.copyProperties(pink, storePink);
+                storePink.setId(null);
+//            storePink.setOrderId(null);
+                storePink.setOrderIdKey(null);
+                storePink.setUid(dto.getUserId());
+                storePink.setKId(1L);
+                storePink.setCreateTime(date);
+                storePinkService.save(storePink);
+                if (count == 1) {
+                    storePinkService.pinkSuccess(pink.getId());
+                }
+            }
+        }
+    }
+
     @Override
     public void exportFile(HttpServletResponse response) {
         OutputStream outputStream;
@@ -746,20 +841,6 @@ public class StoreOrderServiceImpl extends AbstractService<StoreOrder> implement
         return arrayList;
     }
 
-    @Override
-    public StoreOrderVO orderDetail(Long id) {
-        StoreOrder storeOrder = findById(id);
-        Condition infoCondition = new Condition(StoreOrderInfo.class);
-        Example.Criteria infoCriteria = infoCondition.createCriteria();
-        infoCriteria.andEqualTo("isDelete", 0);
-        infoCriteria.andEqualTo("orderId", storeOrder.getOrderId());
-        List<StoreOrderInfo> infoList = storeOrderInfoService.findByCondition(infoCondition);
-        StoreOrderVO vo = new StoreOrderVO();
-        BeanUtils.copyProperties(storeOrder, vo);
-        vo.setOrderInfoVO(infoList);
-        return vo;
-    }
-
     @Override
     public List<StoreOrder> getUserCurrentCombinationOrders(Long uid, Long combinationId) {
         Condition condition = new Condition(StoreOrder.class);
@@ -1046,7 +1127,7 @@ public class StoreOrderServiceImpl extends AbstractService<StoreOrder> implement
 //        redisUtil.lPush(Constants.ORDER_AUTO_CANCEL_KEY, storeOrder.getOrderId());
 //
         MyRecord record = new MyRecord();
-        record.set("orderId", storeOrder.getOrderId());
+        record.set("orderId", storeOrder.getId());
         record.set("orderNo", orderNo);
         return record;
     }
@@ -1055,14 +1136,24 @@ public class StoreOrderServiceImpl extends AbstractService<StoreOrder> implement
     public Boolean goPay(Long orderId) {
         // 扣取余额
 //        accountDubboServiceClient.recharge()
-
+//        Boolean b = accountDubboServiceClient.checkFee(user.getId(), storeOrder.getPayPrice());
+//        if (!b){
+//            return Result.fail(ResultCode.INSUFFICIENT_BALANCE);
+//        }
+//
         StoreOrder storeOrder = findById(orderId);
         if (storeOrder.getPaid() == 1) {
-            goOpen(orderId);
+
             return true;
         } else {
             return false;
         }
+//        if (type == 0) {
+//            goOpen(orderId);
+//        } else {
+////            goPink();
+//        }
+//        return true;
     }
 
     /**

+ 1 - 0
mall-service/src/main/java/dto/PreOrderRequest.java

@@ -38,4 +38,5 @@ public class PreOrderRequest {
     @ApiModelProperty(value = "用户id")
     @NotNull(message = "用户id不能为空")
     private Long userId;
+
 }

+ 12 - 0
mall-service/src/main/java/vo/StoreOrderVO.java

@@ -8,10 +8,13 @@ package vo;
 
 import com.txz.mall.model.StoreOrder;
 import com.txz.mall.model.StoreOrderInfo;
+import com.txz.mall.model.StoreOrderStatus;
+import dto.UserAddressDTO;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.io.Serializable;
+import java.math.BigDecimal;
 import java.util.List;
 
 @Data
@@ -20,4 +23,13 @@ public class StoreOrderVO extends StoreOrder implements Serializable {
     @ApiModelProperty(value = "商品信息")
     private List<StoreOrderInfo> orderInfoVO;
 
+    @ApiModelProperty(value = "订单轨迹")
+    private List<StoreOrderStatus> orderStatus;
+
+    @ApiModelProperty(value = "收货信息")
+    private UserAddressDTO orderAddress;
+
+    @ApiModelProperty(value = "奖励佣金")
+    private BigDecimal brokerage;
+
 }