Sfoglia il codice sorgente

fix 计费单商品

he2802 3 anni fa
parent
commit
04423156cb
25 ha cambiato i file con 258 aggiunte e 275 eliminazioni
  1. 1 1
      zhongzheng-admin/src/main/java/com/zhongzheng/controller/goods/GoodsController.java
  2. 111 0
      zhongzheng-admin/src/main/java/com/zhongzheng/controller/order/OrderGoodsController.java
  3. 1 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/mapper/GoodsMapper.java
  4. 1 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/IGoodsService.java
  5. 5 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsServiceImpl.java
  6. 1 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/order/bo/OrderAddBo.java
  7. 1 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/order/bo/OrderEditBo.java
  8. 19 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/order/bo/OrderGoodsAddBo.java
  9. 19 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/order/bo/OrderGoodsEditBo.java
  10. 1 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/order/domain/Order.java
  11. 13 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/order/domain/OrderGoods.java
  12. 0 41
      zhongzheng-system/src/main/java/com/zhongzheng/modules/order/domain/OrderStudentInfo.java
  13. 0 14
      zhongzheng-system/src/main/java/com/zhongzheng/modules/order/mapper/OrderStudentInfoMapper.java
  14. 2 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/IOrderGoodsService.java
  15. 0 52
      zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/IOrderStudentInfoService.java
  16. 5 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/impl/OrderGoodsServiceImpl.java
  17. 16 8
      zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/impl/OrderServiceImpl.java
  18. 0 101
      zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/impl/OrderStudentInfoServiceImpl.java
  19. 25 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/order/vo/OrderGoodsVo.java
  20. 0 39
      zhongzheng-system/src/main/java/com/zhongzheng/modules/order/vo/OrderStudentInfoVo.java
  21. 1 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/order/vo/OrderVo.java
  22. 1 2
      zhongzheng-system/src/main/resources/mapper/modules/course/CourseMapper.xml
  23. 23 0
      zhongzheng-system/src/main/resources/mapper/modules/goods/GoodsMapper.xml
  24. 12 0
      zhongzheng-system/src/main/resources/mapper/modules/order/OrderGoodsMapper.xml
  25. 0 17
      zhongzheng-system/src/main/resources/mapper/modules/order/OrderStudentInfoMapper.xml

+ 1 - 1
zhongzheng-admin/src/main/java/com/zhongzheng/controller/goods/GoodsController.java

@@ -76,7 +76,7 @@ public class GoodsController extends BaseController {
     @PreAuthorize("@ss.hasPermi('system:goods:query')")
     @GetMapping("/{goodsId}")
     public AjaxResult<GoodsVo> getInfo(@PathVariable("goodsId" ) Long goodsId) {
-        return AjaxResult.success(iGoodsService.queryById(goodsId));
+        return AjaxResult.success(iGoodsService.selectDetail(goodsId));
     }
 
     /**

+ 111 - 0
zhongzheng-admin/src/main/java/com/zhongzheng/controller/order/OrderGoodsController.java

@@ -0,0 +1,111 @@
+package com.zhongzheng.controller.order;
+
+import java.util.List;
+import java.util.Arrays;
+
+import com.zhongzheng.modules.order.bo.OrderGoodsEditBo;
+import com.zhongzheng.modules.order.bo.OrderGoodsQueryBo;
+import com.zhongzheng.modules.order.service.IOrderGoodsService;
+import com.zhongzheng.modules.order.vo.OrderGoodsVo;
+import lombok.RequiredArgsConstructor;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.zhongzheng.common.annotation.Log;
+import com.zhongzheng.common.core.controller.BaseController;
+import com.zhongzheng.common.core.domain.AjaxResult;
+import com.zhongzheng.common.enums.BusinessType;
+import com.zhongzheng.common.utils.poi.ExcelUtil;
+import com.zhongzheng.common.core.page.TableDataInfo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+/**
+ * 订单商品Controller
+ *
+ * @author ruoyi
+ * @date 2021-11-12
+ */
+@Api(value = "订单商品控制器", tags = {"订单商品管理"})
+@RequiredArgsConstructor(onConstructor_ = @Autowired)
+@RestController
+@RequestMapping("/order/goods")
+public class OrderGoodsController extends BaseController {
+
+    private final IOrderGoodsService iOrderGoodsService;
+
+    /**
+     * 查询订单商品列表
+     */
+   /* @ApiOperation("查询订单商品列表")
+    @PreAuthorize("@ss.hasPermi('system:goods:list')")
+    @GetMapping("/list")
+    public TableDataInfo<OrderGoodsVo> list(OrderGoodsQueryBo bo) {
+        startPage();
+        List<OrderGoodsVo> list = iOrderGoodsService.queryList(bo);
+        return getDataTable(list);
+    }*/
+
+    /**
+     * 导出订单商品列表
+     */
+   /* @ApiOperation("导出订单商品列表")
+    @PreAuthorize("@ss.hasPermi('system:goods:export')")
+    @Log(title = "订单商品", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult<OrderGoodsVo> export(OrderGoodsQueryBo bo) {
+        List<OrderGoodsVo> list = iOrderGoodsService.queryList(bo);
+        ExcelUtil<OrderGoodsVo> util = new ExcelUtil<OrderGoodsVo>(OrderGoodsVo.class);
+        return util.exportExcel(list, "订单商品");
+    }*/
+
+    /**
+     * 获取订单商品详细信息
+     */
+    @ApiOperation("获取订单商品详细信息")
+    @PreAuthorize("@ss.hasPermi('system:goods:query')")
+    @GetMapping("/info")
+    public AjaxResult<OrderGoodsVo> getInfo(OrderGoodsQueryBo bo) {
+        return AjaxResult.success(iOrderGoodsService.queryBySnId(bo));
+    }
+
+    /**
+     * 新增订单商品
+     */
+   /* @ApiOperation("新增订单商品")
+    @PreAuthorize("@ss.hasPermi('system:goods:add')")
+    @Log(title = "订单商品", businessType = BusinessType.INSERT)
+    @PostMapping()
+    public AjaxResult<Void> add(@RequestBody OrderGoodsAddBo bo) {
+        return toAjax(iOrderGoodsService.insertByAddBo(bo) ? 1 : 0);
+    }*/
+
+    /**
+     * 修改订单商品
+     */
+    @ApiOperation("修改订单商品")
+    @PreAuthorize("@ss.hasPermi('system:goods:edit')")
+    @Log(title = "订单商品", businessType = BusinessType.UPDATE)
+    @PutMapping()
+    public AjaxResult<Void> edit(@RequestBody OrderGoodsEditBo bo) {
+        return toAjax(iOrderGoodsService.updateByEditBo(bo) ? 1 : 0);
+    }
+
+    /**
+     * 删除订单商品
+     */
+   /* @ApiOperation("删除订单商品")
+    @PreAuthorize("@ss.hasPermi('system:goods:remove')")
+    @Log(title = "订单商品" , businessType = BusinessType.DELETE)
+    @DeleteMapping("/{orderGoodsIds}")
+    public AjaxResult<Void> remove(@PathVariable Long[] orderGoodsIds) {
+        return toAjax(iOrderGoodsService.deleteWithValidByIds(Arrays.asList(orderGoodsIds), true) ? 1 : 0);
+    }*/
+}

+ 1 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/mapper/GoodsMapper.java

@@ -17,4 +17,5 @@ import java.util.List;
  */
 public interface GoodsMapper extends BaseMapper<Goods> {
     List<GoodsVo> selectList(GoodsQueryBo bo);
+    GoodsVo selectDetail(Long goodsId);
 }

+ 1 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/IGoodsService.java

@@ -23,6 +23,7 @@ public interface IGoodsService extends IService<Goods> {
 
 	List<GoodsVo> selectList(GoodsQueryBo bo);
 
+	GoodsVo selectDetail(Long goodsId);
 
 	/**
 	 * 查询列表

+ 5 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsServiceImpl.java

@@ -79,6 +79,11 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
         return goodsMapper.selectList(bo);
     }
 
+    @Override
+    public GoodsVo selectDetail(Long goodsId) {
+        return goodsMapper.selectDetail(goodsId);
+    }
+
     @Override
     public List<GoodsVo> queryList(GoodsQueryBo bo) {
         LambdaQueryWrapper<Goods> lqw = Wrappers.lambdaQuery();

+ 1 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/bo/OrderAddBo.java

@@ -77,4 +77,5 @@ public class OrderAddBo {
     /** 系统订单操作人 */
     @ApiModelProperty("系统订单操作人")
     private String createBy;
+
 }

+ 1 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/bo/OrderEditBo.java

@@ -93,4 +93,5 @@ public class OrderEditBo {
     @ApiModelProperty("学员信息")
     private OrderStudentInfoEditBo OrderStudent;
 
+
 }

+ 19 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/bo/OrderGoodsAddBo.java

@@ -49,4 +49,23 @@ public class OrderGoodsAddBo {
     /** 支付状态 1未收费 2部分收费 3完全收费 */
     @ApiModelProperty("支付状态 1未收费 2部分收费 3完全收费")
     private Integer payStatus;
+
+    /** 业务归属人 */
+    @ApiModelProperty("业务归属人")
+    private String businessOwner;
+    /** 归属部门 */
+    @ApiModelProperty("归属部门")
+    private String dept;
+    /** 渠道来源 */
+    @ApiModelProperty("渠道来源")
+    private String source;
+    /** 到访校区 */
+    @ApiModelProperty("到访校区")
+    private String school;
+    /** 收货地址 */
+    @ApiModelProperty("收货地址")
+    private String address;
+    /** 所在公司 */
+    @ApiModelProperty("所在公司")
+    private String company;
 }

+ 19 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/bo/OrderGoodsEditBo.java

@@ -65,4 +65,23 @@ public class OrderGoodsEditBo {
     @ApiModelProperty("支付状态 1未收费 2部分收费 3完全收费")
     private Integer payStatus;
 
+    /** 业务归属人 */
+    @ApiModelProperty("业务归属人")
+    private String businessOwner;
+    /** 归属部门 */
+    @ApiModelProperty("归属部门")
+    private String dept;
+    /** 渠道来源 */
+    @ApiModelProperty("渠道来源")
+    private String source;
+    /** 到访校区 */
+    @ApiModelProperty("到访校区")
+    private String school;
+    /** 收货地址 */
+    @ApiModelProperty("收货地址")
+    private String address;
+    /** 所在公司 */
+    @ApiModelProperty("所在公司")
+    private String company;
+
 }

+ 1 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/domain/Order.java

@@ -66,4 +66,5 @@ private static final long serialVersionUID=1L;
     /** 系统订单操作人 */
     @TableField(fill = FieldFill.INSERT)
     private String createBy;
+
 }

+ 13 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/domain/OrderGoods.java

@@ -53,4 +53,17 @@ private static final long serialVersionUID=1L;
     private Integer refundStatus;
     /** 支付状态 1未收费 2部分收费 3完全收费 */
     private Integer payStatus;
+
+    /** 业务归属人 */
+    private String businessOwner;
+    /** 归属部门 */
+    private String dept;
+    /** 渠道来源 */
+    private String source;
+    /** 到访校区 */
+    private String school;
+    /** 收货地址 */
+    private String address;
+    /** 所在公司 */
+    private String company;
 }

+ 0 - 41
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/domain/OrderStudentInfo.java

@@ -1,41 +0,0 @@
-package com.zhongzheng.modules.order.domain;
-
-import com.baomidou.mybatisplus.annotation.*;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import lombok.experimental.Accessors;
-import java.io.Serializable;
-import java.util.Date;
-import java.math.BigDecimal;
-import com.zhongzheng.common.annotation.Excel;
-
-/**
- * 订单学员信息对象 order_student_info
- *
- * @author hjl
- * @date 2021-11-08
- */
-@Data
-@NoArgsConstructor
-@Accessors(chain = true)
-@TableName("order_student_info")
-public class OrderStudentInfo implements Serializable {
-
-private static final long serialVersionUID=1L;
-
-    /** $column.columnComment */
-    @TableId(value = "oder_student_id")
-    private Long oderStudentId;
-    /** 订单编号 */
-    private String orderSn;
-    /** 收货地址 */
-    private String address;
-    /** 所在公司 */
-    private String company;
-    /** 添加时间 */
-    @TableField(fill = FieldFill.INSERT)
-    private Long createTime;
-    /** 修改时间 */
-    @TableField(fill = FieldFill.INSERT_UPDATE)
-    private Long updateTime;
-}

+ 0 - 14
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/mapper/OrderStudentInfoMapper.java

@@ -1,14 +0,0 @@
-package com.zhongzheng.modules.order.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.zhongzheng.modules.order.domain.OrderStudentInfo;
-
-/**
- * 订单学员信息Mapper接口
- *
- * @author hjl
- * @date 2021-11-08
- */
-public interface OrderStudentInfoMapper extends BaseMapper<OrderStudentInfo> {
-
-}

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/IOrderGoodsService.java

@@ -23,6 +23,8 @@ public interface IOrderGoodsService extends IService<OrderGoods> {
 	 */
 	OrderGoodsVo queryById(String orderSn);
 
+	OrderGoodsVo queryBySnId(OrderGoodsQueryBo bo);
+
 	List<OrderGoodsVo> selectList(OrderGoodsQueryBo bo);
 
 	/**

+ 0 - 52
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/IOrderStudentInfoService.java

@@ -1,52 +0,0 @@
-package com.zhongzheng.modules.order.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.zhongzheng.modules.order.bo.OrderStudentInfoAddBo;
-import com.zhongzheng.modules.order.bo.OrderStudentInfoEditBo;
-import com.zhongzheng.modules.order.bo.OrderStudentInfoQueryBo;
-import com.zhongzheng.modules.order.domain.OrderStudentInfo;
-import com.zhongzheng.modules.order.vo.OrderStudentInfoVo;
-
-import java.util.Collection;
-import java.util.List;
-
-/**
- * 订单学员信息Service接口
- *
- * @author hjl
- * @date 2021-11-08
- */
-public interface IOrderStudentInfoService extends IService<OrderStudentInfo> {
-	/**
-	 * 查询单个
-	 * @return
-	 */
-	OrderStudentInfoVo queryById(Long oderStudentId);
-
-	/**
-	 * 查询列表
-	 */
-	List<OrderStudentInfoVo> queryList(OrderStudentInfoQueryBo bo);
-
-	/**
-	 * 根据新增业务对象插入订单学员信息
-	 * @param bo 订单学员信息新增业务对象
-	 * @return
-	 */
-	Boolean insertByAddBo(OrderStudentInfoAddBo bo);
-
-	/**
-	 * 根据编辑业务对象修改订单学员信息
-	 * @param bo 订单学员信息编辑业务对象
-	 * @return
-	 */
-	Boolean updateByEditBo(OrderStudentInfoEditBo bo);
-
-	/**
-	 * 校验并删除数据
-	 * @param ids 主键集合
-	 * @param isValid 是否校验,true-删除前校验,false-不校验
-	 * @return
-	 */
-	Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
-}

+ 5 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/impl/OrderGoodsServiceImpl.java

@@ -41,6 +41,11 @@ public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGo
         return BeanUtil.toBean(db, OrderGoodsVo.class);
     }
 
+    @Override
+    public OrderGoodsVo queryBySnId(OrderGoodsQueryBo bo) {
+        return null;
+    }
+
     @Override
     public List<OrderGoodsVo> selectList(OrderGoodsQueryBo bo) {
         return orderGoodsMapper.selectList(bo);

+ 16 - 8
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/impl/OrderServiceImpl.java

@@ -10,12 +10,10 @@ import com.zhongzheng.modules.order.bo.*;
 import com.zhongzheng.modules.order.domain.Order;
 import com.zhongzheng.modules.order.domain.OrderBusiness;
 import com.zhongzheng.modules.order.domain.OrderGoods;
-import com.zhongzheng.modules.order.domain.OrderStudentInfo;
 import com.zhongzheng.modules.order.mapper.OrderMapper;
 import com.zhongzheng.modules.order.service.IOrderBusinessService;
 import com.zhongzheng.modules.order.service.IOrderGoodsService;
 import com.zhongzheng.modules.order.service.IOrderService;
-import com.zhongzheng.modules.order.service.IOrderStudentInfoService;
 import com.zhongzheng.modules.order.vo.OrderListVo;
 import com.zhongzheng.modules.order.vo.OrderVo;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -46,8 +44,6 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
     @Autowired
     private IOrderBusinessService iOrderBusinessService;
 
-    @Autowired
-    private IOrderStudentInfoService iOrderStudentInfoService;
 
     @Autowired
     private OrderMapper orderMapper;
@@ -142,14 +138,16 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
         String out_trade_no = DateUtils.getDateOrderSn();
 
         //生成业务
-        OrderBusinessAddBo orderBusinessAddBo = bo.getOrderBusiness();
+      /*  OrderBusinessAddBo orderBusinessAddBo = bo.getOrderBusiness();
         orderBusinessAddBo.setOrderSn(out_trade_no);
-        iOrderBusinessService.insertByAddBo(orderBusinessAddBo);
+        iOrderBusinessService.insertByAddBo(orderBusinessAddBo);*/
 
         //生成学员
-        OrderStudentInfoAddBo orderStudentInfoAddBo = bo.getOrderStudent();
+     /*   OrderStudentInfoAddBo orderStudentInfoAddBo = bo.getOrderStudent();
         orderStudentInfoAddBo.setOrderSn(out_trade_no);
-        iOrderStudentInfoService.insertByAddBo(orderStudentInfoAddBo);
+        iOrderStudentInfoService.insertByAddBo(orderStudentInfoAddBo);*/
+
+
         BigDecimal totalPrice = new BigDecimal(0);
         BigDecimal payPrice = new BigDecimal(0);
         //生成订单
@@ -160,6 +158,16 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
             if(g.getGoodsInputData()!=null){
                 orderGoods.setGoodsInputData(JSON.toJSONString(g.getGoodsInputData()));
             }
+            //赋值业务信息
+            orderGoods.setBusinessOwner(bo.getOrderBusiness().getBusinessOwner());
+            orderGoods.setDept(bo.getOrderBusiness().getDept());
+            orderGoods.setSource(bo.getOrderBusiness().getSource());
+            orderGoods.setSchool(bo.getOrderBusiness().getSchool());
+
+            //收货公司信息
+            orderGoods.setAddress(bo.getOrderStudent().getAddress());
+            orderGoods.setCompany(bo.getOrderStudent().getCompany());
+
             orderGoods.setCreateTime(DateUtils.getNowTime());
             orderGoods.setUpdateTime(DateUtils.getNowTime());
             coll.add(orderGoods);

+ 0 - 101
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/impl/OrderStudentInfoServiceImpl.java

@@ -1,101 +0,0 @@
-package com.zhongzheng.modules.order.service.impl;
-
-import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.util.StrUtil;
-import com.zhongzheng.common.utils.DateUtils;
-import com.zhongzheng.modules.order.bo.OrderStudentInfoAddBo;
-import com.zhongzheng.modules.order.bo.OrderStudentInfoEditBo;
-import com.zhongzheng.modules.order.bo.OrderStudentInfoQueryBo;
-import com.zhongzheng.modules.order.domain.OrderStudentInfo;
-import com.zhongzheng.modules.order.mapper.OrderStudentInfoMapper;
-import com.zhongzheng.modules.order.service.IOrderStudentInfoService;
-import com.zhongzheng.modules.order.vo.OrderStudentInfoVo;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.pagehelper.Page;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * 订单学员信息Service业务层处理
- *
- * @author hjl
- * @date 2021-11-08
- */
-@Service
-public class OrderStudentInfoServiceImpl extends ServiceImpl<OrderStudentInfoMapper, OrderStudentInfo> implements IOrderStudentInfoService {
-
-    @Override
-    public OrderStudentInfoVo queryById(Long oderStudentId){
-        OrderStudentInfo db = this.baseMapper.selectById(oderStudentId);
-        return BeanUtil.toBean(db, OrderStudentInfoVo.class);
-    }
-
-    @Override
-    public List<OrderStudentInfoVo> queryList(OrderStudentInfoQueryBo bo) {
-        LambdaQueryWrapper<OrderStudentInfo> lqw = Wrappers.lambdaQuery();
-        lqw.eq(StrUtil.isNotBlank(bo.getOrderSn()), OrderStudentInfo::getOrderSn, bo.getOrderSn());
-        lqw.eq(StrUtil.isNotBlank(bo.getAddress()), OrderStudentInfo::getAddress, bo.getAddress());
-        lqw.eq(StrUtil.isNotBlank(bo.getCompany()), OrderStudentInfo::getCompany, bo.getCompany());
-        return entity2Vo(this.list(lqw));
-    }
-
-    /**
-    * 实体类转化成视图对象
-    *
-    * @param collection 实体类集合
-    * @return
-    */
-    private List<OrderStudentInfoVo> entity2Vo(Collection<OrderStudentInfo> collection) {
-        List<OrderStudentInfoVo> voList = collection.stream()
-                .map(any -> BeanUtil.toBean(any, OrderStudentInfoVo.class))
-                .collect(Collectors.toList());
-        if (collection instanceof Page) {
-            Page<OrderStudentInfo> page = (Page<OrderStudentInfo>)collection;
-            Page<OrderStudentInfoVo> pageVo = new Page<>();
-            BeanUtil.copyProperties(page,pageVo);
-            pageVo.addAll(voList);
-            voList = pageVo;
-        }
-        return voList;
-    }
-
-    @Override
-    public Boolean insertByAddBo(OrderStudentInfoAddBo bo) {
-        OrderStudentInfo add = BeanUtil.toBean(bo, OrderStudentInfo.class);
-        validEntityBeforeSave(add);
-        add.setCreateTime(DateUtils.getNowTime());
-        add.setUpdateTime(DateUtils.getNowTime());
-        return this.save(add);
-    }
-
-    @Override
-    public Boolean updateByEditBo(OrderStudentInfoEditBo bo) {
-        OrderStudentInfo update = BeanUtil.toBean(bo, OrderStudentInfo.class);
-        validEntityBeforeSave(update);
-        update.setUpdateTime(DateUtils.getNowTime());
-        return this.updateById(update);
-    }
-
-    /**
-     * 保存前的数据校验
-     *
-     * @param entity 实体类数据
-     */
-    private void validEntityBeforeSave(OrderStudentInfo entity){
-        //TODO 做一些数据校验,如唯一约束
-    }
-
-    @Override
-    public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
-        if(isValid){
-            //TODO 做一些业务上的校验,判断是否需要校验
-        }
-        return this.removeByIds(ids);
-    }
-}

+ 25 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/vo/OrderGoodsVo.java

@@ -74,4 +74,29 @@ public class OrderGoodsVo {
 	@Excel(name = "支付状态 1未收费 2部分收费 3完全收费")
 	@ApiModelProperty("支付状态 1未收费 2部分收费 3完全收费")
 	private Integer payStatus;
+
+	/** 业务归属人 */
+	@Excel(name = "业务归属人")
+	@ApiModelProperty("业务归属人")
+	private String businessOwner;
+	/** 归属部门 */
+	@Excel(name = "归属部门")
+	@ApiModelProperty("归属部门")
+	private String dept;
+	/** 渠道来源 */
+	@Excel(name = "渠道来源")
+	@ApiModelProperty("渠道来源")
+	private String source;
+	/** 到访校区 */
+	@Excel(name = "到访校区")
+	@ApiModelProperty("到访校区")
+	private String school;
+	/** 收货地址 */
+	@Excel(name = "收货地址")
+	@ApiModelProperty("收货地址")
+	private String address;
+	/** 所在公司 */
+	@Excel(name = "所在公司")
+	@ApiModelProperty("所在公司")
+	private String company;
 }

+ 0 - 39
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/vo/OrderStudentInfoVo.java

@@ -1,39 +0,0 @@
-package com.zhongzheng.modules.order.vo;
-
-import com.zhongzheng.common.annotation.Excel;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import java.util.Date;
-
-
-
-/**
- * 订单学员信息视图对象 mall_package
- *
- * @author hjl
- * @date 2021-11-08
- */
-@Data
-@ApiModel("订单学员信息视图对象")
-public class OrderStudentInfoVo {
-	private static final long serialVersionUID = 1L;
-
-	/** $pkColumn.columnComment */
-	@ApiModelProperty("$pkColumn.columnComment")
-	private Long oderStudentId;
-
-	/** 订单编号 */
-	@Excel(name = "订单编号")
-	@ApiModelProperty("订单编号")
-	private String orderSn;
-	/** 收货地址 */
-	@Excel(name = "收货地址")
-	@ApiModelProperty("收货地址")
-	private String address;
-	/** 所在公司 */
-	@Excel(name = "所在公司")
-	@ApiModelProperty("所在公司")
-	private String company;
-}

+ 1 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/vo/OrderVo.java

@@ -81,4 +81,5 @@ public class OrderVo {
 	@Excel(name = "订单来源 1业务员录单")
 	@ApiModelProperty("订单来源 1业务员录单")
 	private Integer orderFrom;
+
 }

+ 1 - 2
zhongzheng-system/src/main/resources/mapper/modules/course/CourseMapper.xml

@@ -63,7 +63,7 @@
             g.goods_id
         FROM
             goods_course gc
-                 LEFT JOIN goods g ON gc.goods_id = g.goods_id
+             LEFT JOIN goods g ON gc.goods_id = g.goods_id
         WHERE
             gc.course_id =#{course_id}
     </select>
@@ -82,7 +82,6 @@
         s.school_name,
         m.category_name,
         cs.subject_name
-
         FROM
         course c
         LEFT JOIN course_education_type cet ON c.education_type_id = cet.id

+ 23 - 0
zhongzheng-system/src/main/resources/mapper/modules/goods/GoodsMapper.xml

@@ -141,4 +141,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             and #{studyStartTime} BETWEEN g.validity_start_time and g.validity_end_time or #{studyEndTime} BETWEEN g.validity_start_time and g.validity_end_time
         </if>
     </select>
+
+    <select id="selectDetail" parameterType="Long" resultMap="GoodsResultVo">
+        SELECT
+            g.*,
+            ps.supply_name,
+            cet.education_name,
+            cpt.project_name,
+            cb.business_name,
+            s.school_name,
+            m.category_name,
+            ot.type AS template_type
+        FROM
+            goods g
+                LEFT JOIN pay_supply ps ON g.supply_id = ps.supply_id
+                LEFT JOIN course_education_type cet ON g.education_type_id = cet.id
+                LEFT JOIN course_project_type cpt ON g.project_id = cpt.id
+                LEFT JOIN course_business cb ON g.business_id = cb.id
+                LEFT JOIN school s ON s.id = g.school_id
+                LEFT JOIN major m ON g.major_id = m.id
+                LEFT JOIN order_input_template ot ON cb.template_status = ot.id
+        WHERE
+            g.goods_id = #{goodsId}
+    </select>
 </mapper>

+ 12 - 0
zhongzheng-system/src/main/resources/mapper/modules/order/OrderGoodsMapper.xml

@@ -17,6 +17,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="goodsReceived" column="goods_received"/>
         <result property="refundStatus" column="refund_status"/>
         <result property="payStatus" column="pay_status"/>
+        <result property="businessOwner" column="business_owner"/>
+        <result property="dept" column="dept"/>
+        <result property="source" column="source"/>
+        <result property="school" column="school"/>
+        <result property="address" column="address"/>
+        <result property="company" column="company"/>
     </resultMap>
 
     <resultMap type="com.zhongzheng.modules.order.vo.OrderGoodsVo" id="OrderGoodsResultVo">
@@ -30,6 +36,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="goodsReceived" column="goods_received"/>
         <result property="refundStatus" column="refund_status"/>
         <result property="payStatus" column="pay_status"/>
+        <result property="businessOwner" column="business_owner"/>
+        <result property="dept" column="dept"/>
+        <result property="source" column="source"/>
+        <result property="school" column="school"/>
+        <result property="address" column="address"/>
+        <result property="company" column="company"/>
 
         <result property="code" column="code"/>
         <result property="goodsName" column="goods_name"/>

+ 0 - 17
zhongzheng-system/src/main/resources/mapper/modules/order/OrderStudentInfoMapper.xml

@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.zhongzheng.modules.order.mapper.OrderStudentInfoMapper">
-
-    <resultMap type="com.zhongzheng.modules.order.domain.OrderStudentInfo" id="OrderStudentInfoResult">
-        <result property="oderStudentId" column="oder_student_id"/>
-        <result property="orderSn" column="order_sn"/>
-        <result property="address" column="address"/>
-        <result property="company" column="company"/>
-        <result property="createTime" column="create_time"/>
-        <result property="updateTime" column="update_time"/>
-    </resultMap>
-
-
-</mapper>