he2802 1 year ago
parent
commit
938b278187

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/bo/UserCertificateQueryBo.java

@@ -99,4 +99,6 @@ public class UserCertificateQueryBo extends BaseEntity {
 	/** 培训结束时间 */
 	/** 培训结束时间 */
 	@ApiModelProperty("结束时间")
 	@ApiModelProperty("结束时间")
 	private Long searchEndTime;
 	private Long searchEndTime;
+
+	private String goodsName;
 }
 }

+ 10 - 1
zhongzheng-system/src/main/resources/mapper/modules/user/UserCertificateMapper.xml

@@ -106,15 +106,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="businessId != null and businessId != ''">
         <if test="businessId != null and businessId != ''">
             AND uc.business_id = #{businessId}
             AND uc.business_id = #{businessId}
         </if>
         </if>
+        <if test="educationTypeId != null and educationTypeId != ''">
+            AND uc.education_type_id = #{educationTypeId}
+        </if>
         <if test="schoolId != null and schoolId != ''">
         <if test="schoolId != null and schoolId != ''">
             AND uc.school_id = #{schoolId}
             AND uc.school_id = #{schoolId}
         </if>
         </if>
         <if test="majorId != null and majorId != ''">
         <if test="majorId != null and majorId != ''">
             AND uc.major_id = #{majorId}
             AND uc.major_id = #{majorId}
         </if>
         </if>
-        <if test="userId != null and majorId != ''">
+        <if test="userId != null and userId != ''">
             AND uc.user_id = #{userId}
             AND uc.user_id = #{userId}
         </if>
         </if>
+        <if test="goodsName != null and goodsName != ''">
+            AND (select count(*) from goods g where g.goods_id = uc.goods_id and g.goods_name like concat('%', #{goodsName}, '%'))>0
+        </if>
+        <if test="certificateCode != null and certificateCode != ''">
+            AND uc.certificate_code = #{certificateCode}
+        </if>
         <if test="searchStartTime != null and searchStartTime != ''">
         <if test="searchStartTime != null and searchStartTime != ''">
             AND uc.create_time > #{searchStartTime}
             AND uc.create_time > #{searchStartTime}
         </if>
         </if>

+ 5 - 0
zhongzheng-system/src/main/resources/mapper/modules/user/UserMapper.xml

@@ -713,6 +713,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="companyName != null and companyName != ''" >
         <if test="companyName != null and companyName != ''" >
             AND u.company_name like concat('%', #{companyName}, '%')
             AND u.company_name like concat('%', #{companyName}, '%')
         </if>
         </if>
+        <if test="majorId != null and majorId != ''" >
+            AND (SELECT count(*) 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 WHERE o.`status` = 1 AND o.user_id = u.user_id AND og.pay_status IN ( 2, 3, 4 )  AND og.refund_status != 2 AND g.major_id = #{majorId})>0
+        </if>
         <if test="educationTypeId != null and educationTypeId != ''" >
         <if test="educationTypeId != null and educationTypeId != ''" >
             AND (SELECT count(*) FROM `order` o
             AND (SELECT count(*) FROM `order` o
             LEFT JOIN order_goods og ON o.order_sn = og.order_sn
             LEFT JOIN order_goods og ON o.order_sn = og.order_sn

+ 2 - 0
zhongzheng-system/src/main/resources/mapper/modules/user/UserStudyRecordMapper.xml

@@ -813,6 +813,7 @@
         ( SELECT m.category_name FROM major m WHERE   m.id =g.major_id LIMIT 1) AS category_name,
         ( SELECT m.category_name FROM major m WHERE   m.id =g.major_id LIMIT 1) AS category_name,
         ( SELECT i.business_name FROM course_business i WHERE i.id = g.business_id LIMIT 1) AS business_name,
         ( SELECT i.business_name FROM course_business i WHERE i.id = g.business_id LIMIT 1) AS business_name,
         ( SELECT p.project_name FROM course_project_type p WHERE p.id = g.project_id LIMIT 1) AS project_name,
         ( SELECT p.project_name FROM course_project_type p WHERE p.id = g.project_id LIMIT 1) AS project_name,
+        (SELECT e.education_name FROM course_education_type e where e.id = g.education_type_id) as education_name,
         ( SELECT count(*) FROM course_file cf WHERE  cf.handouts_id =g.handouts_id AND cf.type = 1 AND cf.`status` = 1 ) AS file_num
         ( SELECT count(*) FROM course_file cf WHERE  cf.handouts_id =g.handouts_id AND cf.type = 1 AND cf.`status` = 1 ) AS file_num
         FROM
         FROM
         goods g
         goods g
@@ -868,6 +869,7 @@
         ( SELECT m.category_name FROM major m WHERE   m.id =g.major_id LIMIT 1) AS category_name,
         ( SELECT m.category_name FROM major m WHERE   m.id =g.major_id LIMIT 1) AS category_name,
         ( SELECT i.business_name FROM course_business i WHERE i.id = g.business_id LIMIT 1) AS business_name,
         ( SELECT i.business_name FROM course_business i WHERE i.id = g.business_id LIMIT 1) AS business_name,
         ( SELECT p.project_name FROM course_project_type p WHERE p.id = g.project_id LIMIT 1) AS project_name,
         ( SELECT p.project_name FROM course_project_type p WHERE p.id = g.project_id LIMIT 1) AS project_name,
+        (SELECT e.education_name FROM course_education_type e where e.id = g.education_type_id) as education_name,
         (SELECT COUNT(*)  FROM goods_course gc LEFT JOIN course_menu cm on cm.course_id = gc.course_id where gc.goods_id=g.goods_id and cm.type = 1 ) as module_num,
         (SELECT COUNT(*)  FROM goods_course gc LEFT JOIN course_menu cm on cm.course_id = gc.course_id where gc.goods_id=g.goods_id and cm.type = 1 ) as module_num,
         (( SELECT
         (( SELECT
         COUNT( cm.id )
         COUNT( cm.id )