diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedcategory/RestrictedCategoryMapper.java b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedcategory/RestrictedCategoryMapper.java index 9945e2ac..d1ee957a 100644 --- a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedcategory/RestrictedCategoryMapper.java +++ b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedcategory/RestrictedCategoryMapper.java @@ -64,4 +64,8 @@ public interface RestrictedCategoryMapper extends BaseMapper List selectListVo(); @Select("select * from restricted_category where categorys like CONCAT('%',#{categoryKey},'%') and brands like CONCAT('%',#{brandCode},'%')") List limitJudgement(@Param("categoryKey")String categoryKey, @Param("brandCode")String brandCode); + @Select("select * from restricted_category where categorys like CONCAT('%',#{categoryKey},'%') ") + List selectByCategorys(@Param("categoryKey")String categoryKey); + @Select("select * from restricted_category where brands like CONCAT('%',#{brandCode},'%') ") + List selectByBrands(@Param("brandCode")String brand); } \ No newline at end of file diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedcategory/RestrictedCategoryService.java b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedcategory/RestrictedCategoryService.java index 890b1f1c..90d741b7 100644 --- a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedcategory/RestrictedCategoryService.java +++ b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedcategory/RestrictedCategoryService.java @@ -175,6 +175,14 @@ public class RestrictedCategoryService extends MybatisBaseService limitJudgement(String categoryKey, String brandSid) { - return baseMapper.limitJudgement(categoryKey,brandSid); + List r=baseMapper.selectByCategorys(categoryKey); + if(r==null||r.size()==0){ + return new ArrayList<>(); + } + List r1=baseMapper.selectByBrands(brandSid); + if(r1==null||r1.size()==0){ + return new ArrayList<>(); + } + return r1;//baseMapper.limitJudgement(categoryKey,brandSid); } } \ No newline at end of file