he2802 3 лет назад
Родитель
Сommit
ccf0d8cf50

+ 0 - 2
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/bo/CertificateCommonQueryBo.java

@@ -35,8 +35,6 @@ public class CertificateCommonQueryBo extends BaseEntity {
 	/** 排序的方向desc或者asc */
 	@ApiModelProperty(value = "排序的方向", example = "asc,desc")
 	private String isAsc;
-
-
 	/** 证书名称 */
 	@ApiModelProperty("证书名称")
 	private String certificateName;

+ 3 - 0
zhongzheng-system/src/main/resources/mapper/modules/base/CertificateCommonMapper.xml

@@ -39,6 +39,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 #{item}
             </foreach>
         </if>
+        <if test="certificateTypeId != null and certificateTypeId !='' ">
+            AND cc.certificate_type_id =#{certificateTypeId}
+        </if>
     </select>
 
 </mapper>

+ 3 - 0
zhongzheng-system/src/main/resources/mapper/modules/base/CertificateTpMapper.xml

@@ -54,6 +54,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 #{item}
             </foreach>
         </if>
+        <if test="certificateId != null and certificateId !='' ">
+            AND ct.certificate_id =#{certificateId}
+        </if>
     </select>
 
 

+ 4 - 40
zhongzheng-system/src/main/resources/mapper/modules/goods/GoodsMapper.xml

@@ -247,31 +247,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="validityStartTime != null or validityEndTime != null ">
             AND (#{validityStartTime} BETWEEN g.validity_start_time and g.validity_end_time or #{validityEndTime} BETWEEN g.validity_start_time and g.validity_end_time)
         </if>
-        <if test="goodsType ==1 and subjectId >0">
-            AND (SELECT count(*) from goods_course gc LEFT JOIN course c ON gc.course_id = c.course_id where gc.goods_id = g.goods_id and c.`status` = 1
-            AND c.subject_id = #{subjectId}) >0
+        <if test="subjectId != null and subjectId >0">
+            AND FIND_IN_SET(g.subject_ids, #{subjectId})
         </if>
         <if test="goodsType ==1 and haveCourse != null and haveCourse == 1">
             AND (SELECT count(*) from goods_course gc LEFT JOIN course c ON gc.course_id = c.course_id where gc.goods_id = g.goods_id and c.`status` = 1
             ) >0
         </if>
-        <if test="goodsType ==2 and subjectId >0">
-            AND g.goods_id in(
-            SELECT
-            ga.goods_id
-            FROM
-            goods_attached ga
-            LEFT JOIN question_business qb ON ga.major_id = qb.major_id
-            WHERE
-            ((
-            qb.type = 4
-            AND ga.type = 1
-            )
-            OR ( qb.type = 3 AND ga.type = 2 )
-            OR ( qb.type = 2 AND ga.type = 3 ))
-            AND qb.subject_id = #{subjectId}
-            )
-        </if>
         <!-- 数据范围过滤 -->
         ${params.dataScope}
         <if test="sortType != null and sortType == 2">
@@ -373,31 +355,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="validityStartTime != null or validityEndTime != null ">
             AND (#{validityStartTime} BETWEEN g.validity_start_time and g.validity_end_time or #{validityEndTime} BETWEEN g.validity_start_time and g.validity_end_time)
         </if>
-        <if test="goodsType ==1 and subjectId >0">
-            AND (SELECT count(*) from goods_course gc LEFT JOIN course c ON gc.course_id = c.course_id where gc.goods_id = g.goods_id and c.`status` = 1
-            AND c.subject_id = #{subjectId}) >0
+        <if test="subjectId != null and subjectId >0">
+            AND FIND_IN_SET( g.subject_ids, #{subjectId} )
         </if>
         <if test="goodsType ==1 and haveCourse != null and haveCourse == 1">
             AND (SELECT count(*) from goods_course gc LEFT JOIN course c ON gc.course_id = c.course_id where gc.goods_id = g.goods_id and c.`status` = 1
             ) >0
         </if>
-        <if test="goodsType ==2 and subjectId >0">
-            AND g.goods_id in(
-            SELECT
-            ga.goods_id
-            FROM
-            goods_attached ga
-            LEFT JOIN question_business qb ON ga.major_id = qb.major_id
-            WHERE
-            ((
-            qb.type = 4
-            AND ga.type = 1
-            )
-            OR ( qb.type = 3 AND ga.type = 2 )
-            OR ( qb.type = 2 AND ga.type = 3 ))
-            AND qb.subject_id = #{subjectId}
-            )
-        </if>
         <if test="sortType != null and sortType == 2">
             ORDER BY g.stand_price
         </if>