|
@@ -309,10 +309,6 @@ public class BrandServiceImpl implements BrandService {
|
|
|
// 赋予attention字段信息,0:未关注;1:已关注
|
|
|
if (userId == null || userId.equals("")) { // 用户未登录或无效用户id,都是未关注状态
|
|
|
for (BrandSearch search : brandSearches.getRecords()) {
|
|
|
- QueryWrapper<Enterprise> enterpriseQueryWrapper = new QueryWrapper<>();
|
|
|
- enterpriseQueryWrapper.eq("enterprise_usci", search.getEnterpriseName());
|
|
|
- Enterprise enterprise = enterpriseMapper.selectOne(enterpriseQueryWrapper);
|
|
|
- search.setEnterpriseName(enterprise != null ? enterprise.getEnterpriseName() : null);
|
|
|
search.setAttention(0);
|
|
|
}
|
|
|
} else { // 否则,根据用户潜客池,赋予字段相应的值
|
|
@@ -321,10 +317,6 @@ public class BrandServiceImpl implements BrandService {
|
|
|
for (AttentionPool pool : pools)
|
|
|
map.put(pool.getBrandId(), "1");
|
|
|
for (BrandSearch search : brandSearches.getRecords()) {
|
|
|
- QueryWrapper<Enterprise> enterpriseQueryWrapper = new QueryWrapper<>();
|
|
|
- enterpriseQueryWrapper.eq("enterprise_usci", search.getEnterpriseName());
|
|
|
- Enterprise enterprise = enterpriseMapper.selectOne(enterpriseQueryWrapper);
|
|
|
- search.setEnterpriseName(enterprise != null ? enterprise.getEnterpriseName() : null);
|
|
|
search.setAttention(map.get(search.getBrandId()) == null ? 0 : 1);
|
|
|
}
|
|
|
}
|