浏览代码

报考用户

he2802 3 年之前
父节点
当前提交
ac327ddacc

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

@@ -4,6 +4,7 @@ import java.util.List;
 import java.util.Arrays;
 import java.util.Arrays;
 
 
 import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.common.utils.ServletUtils;
+import com.zhongzheng.modules.goods.bo.GoodsQueryBo;
 import com.zhongzheng.modules.order.bo.OrderGoodsEditBo;
 import com.zhongzheng.modules.order.bo.OrderGoodsEditBo;
 import com.zhongzheng.modules.order.bo.OrderGoodsQueryBo;
 import com.zhongzheng.modules.order.bo.OrderGoodsQueryBo;
 import com.zhongzheng.modules.order.service.IOrderGoodsService;
 import com.zhongzheng.modules.order.service.IOrderGoodsService;
@@ -143,4 +144,13 @@ public class OrderGoodsController extends BaseController {
         List<OrderGoodsVo> list = iOrderGoodsService.selectBuyGoodsUserList(bo);
         List<OrderGoodsVo> list = iOrderGoodsService.selectBuyGoodsUserList(bo);
         return getDataTable(list);
         return getDataTable(list);
     }
     }
+
+    @ApiOperation("查询购买直播商品的用户列表")
+    @PreAuthorize("@ss.hasPermi('system:invoice:list')")
+    @GetMapping("/listLiveGoodsList")
+    public TableDataInfo<OrderGoodsVo> listLiveGoodsList(GoodsQueryBo bo) {
+        startPage();
+        List<OrderGoodsVo> list = iOrderGoodsService.listLiveGoodsList(bo);
+        return getDataTable(list);
+    }
 }
 }

+ 0 - 2
zhongzheng-framework/src/main/java/com/zhongzheng/framework/web/service/TokenService.java

@@ -86,8 +86,6 @@ public class TokenService
         if (Validator.isNotEmpty(token))
         if (Validator.isNotEmpty(token))
         {
         {
             String uuid = "";
             String uuid = "";
-            System.out.println(token);
-            System.out.println("我的令牌");
             Claims claims = parseToken(token);
             Claims claims = parseToken(token);
             // 解析对应的权限以及用户信息
             // 解析对应的权限以及用户信息
             uuid = (String) claims.get(Constants.LOGIN_USER_KEY);
             uuid = (String) claims.get(Constants.LOGIN_USER_KEY);

+ 10 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/mapper/OrderGoodsMapper.java

@@ -3,6 +3,7 @@ package com.zhongzheng.modules.order.mapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.zhongzheng.modules.bank.bo.QuestionQueryBo;
 import com.zhongzheng.modules.bank.bo.QuestionQueryBo;
 import com.zhongzheng.modules.bank.vo.QuestionVo;
 import com.zhongzheng.modules.bank.vo.QuestionVo;
+import com.zhongzheng.modules.goods.bo.GoodsQueryBo;
 import com.zhongzheng.modules.order.bo.OrderAddBo;
 import com.zhongzheng.modules.order.bo.OrderAddBo;
 import com.zhongzheng.modules.order.bo.OrderGoodsQueryBo;
 import com.zhongzheng.modules.order.bo.OrderGoodsQueryBo;
 import com.zhongzheng.modules.order.domain.OrderGoods;
 import com.zhongzheng.modules.order.domain.OrderGoods;
@@ -19,17 +20,26 @@ import java.util.Map;
  */
  */
 public interface OrderGoodsMapper extends BaseMapper<OrderGoods> {
 public interface OrderGoodsMapper extends BaseMapper<OrderGoods> {
     List<OrderGoodsVo> selectList(OrderGoodsQueryBo bo);
     List<OrderGoodsVo> selectList(OrderGoodsQueryBo bo);
+
     OrderGoodsVo selectDetail(OrderGoodsQueryBo bo);
     OrderGoodsVo selectDetail(OrderGoodsQueryBo bo);
 
 
     List<OrderGoodsVo> selectOrderGoods(OrderGoodsQueryBo orderGoodsQueryBo);
     List<OrderGoodsVo> selectOrderGoods(OrderGoodsQueryBo orderGoodsQueryBo);
 
 
     List<OrderGoodsVo> selectOrderTwoGoods(OrderGoodsQueryBo orderGoodsQueryBo);
     List<OrderGoodsVo> selectOrderTwoGoods(OrderGoodsQueryBo orderGoodsQueryBo);
+
     Long getBuyGoodsHistory(OrderGoodsQueryBo bo);
     Long getBuyGoodsHistory(OrderGoodsQueryBo bo);
+
     Long getBuyGoodsReadyPay(OrderGoodsQueryBo bo);
     Long getBuyGoodsReadyPay(OrderGoodsQueryBo bo);
 
 
     List<OrderGoodsVo> sendGoods();
     List<OrderGoodsVo> sendGoods();
+
     List<OrderGoodsVo> rebuyInfo(OrderGoodsQueryBo bo);
     List<OrderGoodsVo> rebuyInfo(OrderGoodsQueryBo bo);
+
     OrderGoodsVo gradeGoods(OrderGoodsQueryBo bo);
     OrderGoodsVo gradeGoods(OrderGoodsQueryBo bo);
+
     List<OrderGoodsVo> selectCanInvoiceList(OrderGoodsQueryBo bo);
     List<OrderGoodsVo> selectCanInvoiceList(OrderGoodsQueryBo bo);
+
     List<OrderGoodsVo> selectBuyGoodsUserList(OrderGoodsQueryBo bo);
     List<OrderGoodsVo> selectBuyGoodsUserList(OrderGoodsQueryBo bo);
+
+    List<OrderGoodsVo> listLiveGoodsList(GoodsQueryBo bo);
 }
 }

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

@@ -1,6 +1,7 @@
 package com.zhongzheng.modules.order.service;
 package com.zhongzheng.modules.order.service;
 
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.zhongzheng.modules.goods.bo.GoodsQueryBo;
 import com.zhongzheng.modules.order.bo.OrderAddBo;
 import com.zhongzheng.modules.order.bo.OrderAddBo;
 import com.zhongzheng.modules.order.bo.OrderGoodsAddBo;
 import com.zhongzheng.modules.order.bo.OrderGoodsAddBo;
 import com.zhongzheng.modules.order.bo.OrderGoodsEditBo;
 import com.zhongzheng.modules.order.bo.OrderGoodsEditBo;
@@ -78,4 +79,6 @@ public interface IOrderGoodsService extends IService<OrderGoods> {
     OrderGoodsVo gradeGoods(OrderGoodsQueryBo bo);
     OrderGoodsVo gradeGoods(OrderGoodsQueryBo bo);
 
 
     List<OrderGoodsVo> selectBuyGoodsUserList(OrderGoodsQueryBo bo);
     List<OrderGoodsVo> selectBuyGoodsUserList(OrderGoodsQueryBo bo);
+
+    List<OrderGoodsVo> listLiveGoodsList(GoodsQueryBo bo);
 }
 }

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

@@ -10,6 +10,7 @@ import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.SecurityUtils;
 import com.zhongzheng.common.utils.SecurityUtils;
 import com.zhongzheng.modules.bank.mapper.QuestionMapper;
 import com.zhongzheng.modules.bank.mapper.QuestionMapper;
 import com.zhongzheng.modules.course.domain.CourseModule;
 import com.zhongzheng.modules.course.domain.CourseModule;
+import com.zhongzheng.modules.goods.bo.GoodsQueryBo;
 import com.zhongzheng.modules.goods.domain.Goods;
 import com.zhongzheng.modules.goods.domain.Goods;
 import com.zhongzheng.modules.goods.service.IGoodsService;
 import com.zhongzheng.modules.goods.service.IGoodsService;
 import com.zhongzheng.modules.goods.vo.GoodsVo;
 import com.zhongzheng.modules.goods.vo.GoodsVo;
@@ -308,6 +309,11 @@ public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGo
         return this.baseMapper.selectBuyGoodsUserList(bo);
         return this.baseMapper.selectBuyGoodsUserList(bo);
     }
     }
 
 
+    @Override
+    public List<OrderGoodsVo> listLiveGoodsList(GoodsQueryBo bo) {
+        return this.baseMapper.listLiveGoodsList(bo);
+    }
+
     public boolean joinGrade(Long orderGoodsId, Long gradeId, Long userId, Long goodsId) {
     public boolean joinGrade(Long orderGoodsId, Long gradeId, Long userId, Long goodsId) {
         ClassGradeVo classGradeVo = iClassGradeService.queryById(gradeId);
         ClassGradeVo classGradeVo = iClassGradeService.queryById(gradeId);
         if (classGradeVo == null) {
         if (classGradeVo == null) {

+ 1 - 46
zhongzheng-system/src/main/resources/mapper/modules/bank/QuestionMapper.xml

@@ -482,50 +482,5 @@
         ORDER BY og.create_time DESC
         ORDER BY og.create_time DESC
     </select>
     </select>
 
 
-    <select id="listLiveGoodsList" parameterType="com.zhongzheng.modules.goods.bo.GoodsQueryBo" resultMap="GoodsUserQuestionVo">
-        SELECT
-        g.*,
-        cet.education_name,
-        cpt.project_name,
-        cb.business_name,
-        o.user_id,
-        o.order_sn,
-        og.create_time as order_create_time,
-        og.service_start_time,
-        og.service_end_time,
-        og.order_goods_id,
-        u.realname,
-        u.id_card,
-        u.user_id
-        FROM `order` o
-        LEFT JOIN order_goods og ON o.order_sn = og.order_sn
-        LEFT JOIN goods g ON og.goods_id = g.goods_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 `user` u ON u.user_id = o.user_id
-        WHERE
-        1 = 1
-        <if test="goodsType != null and goodsType != ''">
-            AND g.goods_type = #{goodsType}
-        </if>
-        AND og.pay_status IN ( 2, 3, 4 )
-        AND og.refund_status IN (0,3,1)
-        <if test="goodsId != null and goodsId != ''">
-            AND og.goods_id = #{goodsId}
-        </if>
-        <if test="educationTypeId != null and educationTypeId != ''">
-            AND g.education_type_id = #{educationTypeId}
-        </if>
-        <if test="businessId != null and businessId != ''">
-            AND g.business_id = #{businessId}
-        </if>
-        <if test="majorId != null and majorId != ''">
-            AND g.major_id = #{majorId}
-        </if>
-        <if test="searchKey != null and searchKey != ''">
-            and (g.goods_name like concat('%', #{searchKey}, '%') or g.code like concat('%', #{searchKey}, '%') or u.realname like concat('%', #{searchKey}, '%') or u.id_card like concat('%', #{searchKey}, '%'))
-        </if>
-        ORDER BY og.create_time DESC
-    </select>
+
 </mapper>
 </mapper>

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

@@ -497,7 +497,7 @@
         (SELECT cet.business_name FROM  course_business cet  where cet.id = g.business_id) as business_name,
         (SELECT cet.business_name FROM  course_business cet  where cet.id = g.business_id) as business_name,
         (SELECT COUNT(1) FROM goods_course gc where gc.goods_id = g.goods_id) as course_num,
         (SELECT COUNT(1) FROM goods_course gc where gc.goods_id = g.goods_id) as course_num,
         (case WHEN (SELECT COUNT(1) FROM user_period up LEFT JOIN user_period_status ups on up.id = ups.period_id where up.goods_id = g.goods_id AND ups.period_status =1 and ups.`status` =0) >0 then 0 ELSE 1 end) as rebuild_status,
         (case WHEN (SELECT COUNT(1) FROM user_period up LEFT JOIN user_period_status ups on up.id = ups.period_id where up.goods_id = g.goods_id AND ups.period_status =1 and ups.`status` =0) >0 then 0 ELSE 1 end) as rebuild_status,
-        (case WHEN (SELECT COUNT(1) FROM exam_apply_goods eag LEFT JOIN exam_apply ea on eag.apply_id = ea.apply_id where eag.goods_id = g.goods_id and ea.`status` = 1 and unix_timestamp(now()) BETWEEN ea.apply_start_time and ea.apply_end_time) >0 then 1 ELSE 0 end) as apply_status,
+        (case WHEN (SELECT COUNT(1) FROM exam_apply_goods eag LEFT JOIN exam_apply ea on eag.apply_id = ea.apply_id LEFT JOIN exam_apply_user eau on eau.apply_id = ea.apply_id where eau.user_id = o.user_id and  eag.goods_id = g.goods_id and ea.`status` = 1 and unix_timestamp(now()) BETWEEN ea.apply_start_time and ea.apply_end_time) >0 then 1 ELSE 0 end) as apply_status,
         (case WHEN (SELECT COUNT(1) FROM exam_before_goods ebg LEFT JOIN exam_before eb on ebg.before_id = eb.before_id where ebg.goods_id = g.goods_id and eb.`status` = 1 and unix_timestamp(now()) BETWEEN eb.before_start_time and eb.before_end_time) >0 then 1 ELSE 0 end) as before_status,
         (case WHEN (SELECT COUNT(1) FROM exam_before_goods ebg LEFT JOIN exam_before eb on ebg.before_id = eb.before_id where ebg.goods_id = g.goods_id and eb.`status` = 1 and unix_timestamp(now()) BETWEEN eb.before_start_time and eb.before_end_time) >0 then 1 ELSE 0 end) as before_status,
         (SELECT ea.apply_name FROM exam_apply_goods eag LEFT JOIN exam_apply ea on eag.apply_id = ea.apply_id where eag.goods_id = g.goods_id and ea.`status` = 1 and unix_timestamp(now()) BETWEEN ea.apply_start_time and ea.apply_end_time) as apply_name,
         (SELECT ea.apply_name FROM exam_apply_goods eag LEFT JOIN exam_apply ea on eag.apply_id = ea.apply_id where eag.goods_id = g.goods_id and ea.`status` = 1 and unix_timestamp(now()) BETWEEN ea.apply_start_time and ea.apply_end_time) as apply_name,
         (SELECT eb.before_name FROM exam_before_goods ebg LEFT JOIN exam_before eb on ebg.before_id = eb.before_id where ebg.goods_id = g.goods_id and eb.`status` = 1 and unix_timestamp(now()) BETWEEN eb.before_start_time and eb.before_end_time) as before_name,
         (SELECT eb.before_name FROM exam_before_goods ebg LEFT JOIN exam_before eb on ebg.before_id = eb.before_id where ebg.goods_id = g.goods_id and eb.`status` = 1 and unix_timestamp(now()) BETWEEN eb.before_start_time and eb.before_end_time) as before_name,

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

@@ -557,4 +557,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                                             ''
                                             ''
                                         ))))
                                         ))))
     </select>
     </select>
+
+
 </mapper>
 </mapper>

+ 43 - 1
zhongzheng-system/src/main/resources/mapper/modules/order/OrderGoodsMapper.xml

@@ -333,6 +333,48 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
           AND og.goods_id = #{goodsId}
           AND og.goods_id = #{goodsId}
     </select>
     </select>
 
 
-
+    <select id="listLiveGoodsList" parameterType="com.zhongzheng.modules.goods.bo.GoodsQueryBo" resultMap="OrderGoodsResultVo">
+        SELECT
+        g.*,
+        cet.education_name,
+        cpt.project_name,
+        cb.business_name,
+        o.user_id,
+        o.order_sn,
+        og.service_start_time,
+        og.service_end_time,
+        og.order_goods_id,
+        u.realname,
+        u.id_card,
+        u.user_id
+        FROM `order` o
+        LEFT JOIN order_goods og ON o.order_sn = og.order_sn
+        LEFT JOIN goods g ON og.goods_id = g.goods_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 `user` u ON u.user_id = o.user_id
+        WHERE
+        1 = 1
+        AND g.goods_type = 6
+        AND og.pay_status IN ( 2, 3, 4 )
+        AND og.refund_status IN (0,3,1)
+        <if test="goodsId != null and goodsId != ''">
+            AND og.goods_id = #{goodsId}
+        </if>
+        <if test="educationTypeId != null and educationTypeId != ''">
+            AND g.education_type_id = #{educationTypeId}
+        </if>
+        <if test="businessId != null and businessId != ''">
+            AND g.business_id = #{businessId}
+        </if>
+        <if test="majorId != null and majorId != ''">
+            AND g.major_id = #{majorId}
+        </if>
+        <if test="searchKey != null and searchKey != ''">
+            and (g.goods_name like concat('%', #{searchKey}, '%') or g.code like concat('%', #{searchKey}, '%') or u.realname like concat('%', #{searchKey}, '%') or u.id_card like concat('%', #{searchKey}, '%'))
+        </if>
+        ORDER BY og.create_time DESC
+    </select>
 
 
 </mapper>
 </mapper>