瀏覽代碼

fix:优惠券分部为空处理

liujunchi 3 年之前
父節點
當前提交
2957f1225a

+ 2 - 1
mec-biz/src/main/resources/config/mybatis/SysCouponCodeMapper.xml

@@ -176,7 +176,8 @@
 			<if test="organId!=null">
 				AND su.organ_id_=#{organId}
 				and (find_in_set(#{organId},JSON_UNQUOTE(json_extract(sc.use_condition_,'$.organId')))
-				or JSON_UNQUOTE(json_extract(sc.use_condition_,'$.organId')) is null)
+				or JSON_UNQUOTE(json_extract(sc.use_condition_,'$.organId')) is null
+				or JSON_UNQUOTE(json_extract(sc.use_condition_,'$.organId')) = "")
 			</if>
 			<if test="search!=null and search!=''">
 				AND (scc.user_id_=#{search} OR su.phone_=#{search} OR su.username_ LIKE CONCAT('%', #{search}, '%'))

+ 2 - 1
mec-biz/src/main/resources/config/mybatis/SysCouponIssueRecordMapper.xml

@@ -176,7 +176,8 @@
                 OR stock_count_ = - 1
             )
         and (find_in_set(c.organ_id_,JSON_UNQUOTE(json_extract(a.use_condition_,'$.organId')))
-        or JSON_UNQUOTE(json_extract(a.use_condition_,'$.organId')) is null)
+        or JSON_UNQUOTE(json_extract(a.use_condition_,'$.organId')) is null
+        or JSON_UNQUOTE(json_extract(a.use_condition_,'$.organId')) = "")
     </select>
 
 </mapper>