he2802 3 жил өмнө
parent
commit
b0126bd261

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/bo/GoodsQueryBo.java

@@ -148,4 +148,7 @@ GoodsQueryBo extends BaseEntity {
 
 	@ApiModelProperty("获取节数量 1")
 	private Long sectionNum;
+
+	@ApiModelProperty("搜索kEY")
+	private String searchKey;
 }

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

@@ -176,6 +176,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </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}, '%'))
         </if>
           <if test="goodsStatus != null ">
             AND g.goods_status = #{goodsStatus}

+ 0 - 1
zhongzheng-system/src/main/resources/mapper/modules/user/UserSubscribeMapper.xml

@@ -96,7 +96,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </if>
         <if test="canBefore != null and canBefore == 1 ">
             and us.subscribe_status = 1
-            and us.before_id >0
             and us.exam_status = 0
             and (us.before_status = 1 or (SELECT count(*) from user_exam_goods ueg where ueg.user_id = us.user_id and ueg.goods_id = us.goods_id and ueg.do_number - ueg.expend_before>0)>0)
         </if>