|
|
@@ -281,4 +281,30 @@ public class KwsSpecialService {
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param code 专场编号
|
|
|
+ * @desc 专场编号查询关联企业ID
|
|
|
+ * @author zk
|
|
|
+ * @date 2023/12/16
|
|
|
+ **/
|
|
|
+ public List<Long> findEntIdsByCode(String code) {
|
|
|
+ //企业ID结果集
|
|
|
+ List<Long> entIds = new ArrayList<>();
|
|
|
+ //专场
|
|
|
+ List<KwsSpecial> specials = kwsSpecialDao.findList(new HashMap<>(){{put("code", code);}});
|
|
|
+ if (CollectionUtils.isNotEmpty(specials)) {
|
|
|
+ KwsSpecial special = specials.get(NumberConstant.ZERO);
|
|
|
+ entIds.add(special.getEntId());
|
|
|
+
|
|
|
+ //专场关联企业
|
|
|
+ List<KwsEntSpecial> entSpecials = kwsEntSpecialDao.findList(new HashMap<>(){{put("specialId", special.getId());}});
|
|
|
+ if (CollectionUtils.isNotEmpty(entSpecials)) {
|
|
|
+ entSpecials.forEach(e ->{
|
|
|
+ entIds.add(e.getEntId());
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return entIds;
|
|
|
+ }
|
|
|
}
|