|
|
@ -31,6 +31,7 @@ import com.elink.esua.epdc.dto.NewsDepartmentDTO; |
|
|
|
import com.elink.esua.epdc.entity.NewsDepartmentEntity; |
|
|
|
import com.elink.esua.epdc.redis.NewsDepartmentRedis; |
|
|
|
import com.elink.esua.epdc.service.NewsDepartmentService; |
|
|
|
import com.google.common.collect.Lists; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
@ -126,4 +127,18 @@ public class NewsDepartmentServiceImpl extends BaseServiceImpl<NewsDepartmentDao |
|
|
|
this.insertBatch(list, NumConstant.TWENTY); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<Long> listNewsDeptId(String newsId) { |
|
|
|
QueryWrapper<NewsDepartmentEntity> wrapper = new QueryWrapper<>(); |
|
|
|
wrapper.eq("NEWS_ID", newsId); |
|
|
|
List<NewsDepartmentEntity> newsDepartmentEntities = this.baseDao.selectList(wrapper); |
|
|
|
|
|
|
|
List<Long> result = Lists.newArrayList(); |
|
|
|
if(CollUtil.isNotEmpty(newsDepartmentEntities)){ |
|
|
|
for (NewsDepartmentEntity newsDepartmentEntity : newsDepartmentEntities) { |
|
|
|
result.add(newsDepartmentEntity.getDeptId()); |
|
|
|
} |
|
|
|
} |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |