浏览代码

fix 控制台对应页面跳转条件添加

tanzh 3 年之前
父节点
当前提交
d11c0f2279

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/bo/OrderInputQueryBo.java

@@ -65,4 +65,6 @@ public class OrderInputQueryBo extends BaseEntity {
 	private Long endTime;
 	@ApiModelProperty("用户ID")
 	private Long userId;
+	@ApiModelProperty("商品类型 1视频2题库 3面授 4服务 5组合")
+	private Integer goodsType;
 }

+ 4 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/bo/UserQueryBo.java

@@ -160,4 +160,8 @@ public class UserQueryBo extends BaseEntity {
 	/** 身份证号 */
 	@ApiModelProperty("身份证号列表")
 	private List<String> idCards;
+
+	/** 业务层次id */
+	@ApiModelProperty("业务层次id")
+	private Long businessId;
 }

+ 4 - 0
zhongzheng-system/src/main/resources/mapper/modules/order/OrderInputMapper.xml

@@ -87,7 +87,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         LEFT JOIN course_education_type cet ON u.education_type_id = cet.id
         LEFT JOIN course_project_type cpt ON u.project_id = cpt.id
         LEFT JOIN course_business cb ON u.business_id = cb.id
+        LEFT JOIN goods g ON og.goods_id = g.goods_id
         where 1=1
+        <if test="goodsType != null">
+            AND g.goods_type = #{goodsType}
+        </if>
         GROUP BY
         u.input_order_sn
         ORDER BY create_time DESC

+ 9 - 1
zhongzheng-system/src/main/resources/mapper/modules/user/UserMapper.xml

@@ -137,7 +137,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
     <select id="selectList" parameterType="com.zhongzheng.modules.user.bo.UserQueryBo" resultMap="UserResult">
-        SELECT
+        SELECT DISTINCT
         u.*
         <if test="getOrderNum != null and getOrderNum == 1" >
         ,ou.goods_course_num,ou.goods_bank_num
@@ -161,6 +161,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             o.user_id
             ) ou ON u.user_id = ou.user_id
         </if>
+        <if test="businessId != null and businessId != ''">
+            LEFT JOIN `order` o ON u.user_id = o.user_id and o.`status` = 1
+            LEFT JOIN order_goods og ON o.order_sn = og.order_sn and og.`status` = 1
+            LEFT JOIN goods g ON og.goods_id = g.goods_id
+        </if>
         WHERE
         1 = 1
         <if test="status != null and status.size()!=0 ">
@@ -169,6 +174,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 #{item}
             </foreach>
         </if>
+        <if test="businessId != null and businessId != ''">
+            AND g.business_id = #{businessId}
+        </if>
         <if test="nickname != null and nickname != ''" >
             AND u.nickname like concat('%', #{nickname}, '%')
         </if>