yxt_djz 3 years ago
parent
commit
50dcaac3f0
  1. 4
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedcategory/RestrictedCategoryMapper.java
  2. 10
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/restrictedcategory/RestrictedCategoryService.java

4
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<RestrictedCategory>
List<RestrictedCategoryVo> selectListVo();
@Select("select * from restricted_category where categorys like CONCAT('%',#{categoryKey},'%') and brands like CONCAT('%',#{brandCode},'%')")
List<RestrictedCategory> limitJudgement(@Param("categoryKey")String categoryKey, @Param("brandCode")String brandCode);
@Select("select * from restricted_category where categorys like CONCAT('%',#{categoryKey},'%') ")
List<RestrictedCategory> selectByCategorys(@Param("categoryKey")String categoryKey);
@Select("select * from restricted_category where brands like CONCAT('%',#{brandCode},'%') ")
List<RestrictedCategory> selectByBrands(@Param("brandCode")String brand);
}

10
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<RestrictedCate
}
public List<RestrictedCategory> limitJudgement(String categoryKey, String brandSid) {
return baseMapper.limitJudgement(categoryKey,brandSid);
List<RestrictedCategory> r=baseMapper.selectByCategorys(categoryKey);
if(r==null||r.size()==0){
return new ArrayList<>();
}
List<RestrictedCategory> r1=baseMapper.selectByBrands(brandSid);
if(r1==null||r1.size()==0){
return new ArrayList<>();
}
return r1;//baseMapper.limitJudgement(categoryKey,brandSid);
}
}
Loading…
Cancel
Save