Browse Source

注释修改

dev_shibei_match
wangchao 4 years ago
parent
commit
a43dec39d7
  1. 12
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java
  2. 4
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTagsServiceImpl.java

12
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java

@ -358,6 +358,18 @@ public class IssueProjectTagDictRedis {
redisUtils.zSetAdd(key,o); redisUtils.zSetAdd(key,o);
} }
/**
* @Description 给客户下的分类/标签批量增加/减少热度
* param :
* key : 0 代表减一 1 代表加一
* value :
* key : 某一客户下分类/标签的redisKey
* value : 需要修改的分类/标签
* @param param
* @return void
* @author wangc
* @date 2021.03.20 01:04
*/
public void batchIncrScore(Map<String,Map<String,List<IssueCategoryTagResultDTO>>> param){ public void batchIncrScore(Map<String,Map<String,List<IssueCategoryTagResultDTO>>> param){
if(CollectionUtils.isEmpty(param)) return; if(CollectionUtils.isEmpty(param)) return;
redisTemplate.executePipelined((RedisCallback) connection -> { redisTemplate.executePipelined((RedisCallback) connection -> {

4
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTagsServiceImpl.java

@ -41,6 +41,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import java.util.Arrays; import java.util.Arrays;
import java.util.LinkedList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -142,8 +143,9 @@ public class ProjectTagsServiceImpl extends BaseServiceImpl<ProjectTagsDao, Proj
if(null != orientIds && null == newIds) differentSet.setMinus(orientIds); if(null != orientIds && null == newIds) differentSet.setMinus(orientIds);
if(null == orientIds && null != newIds) differentSet.setPlus(newIds); if(null == orientIds && null != newIds) differentSet.setPlus(newIds);
if(null != orientIds && null != newIds){ if(null != orientIds && null != newIds){
List<String> replaceNews = new LinkedList<>(newIds);
differentSet.setPlus(newIds.removeAll(orientIds) ? newIds : null); differentSet.setPlus(newIds.removeAll(orientIds) ? newIds : null);
differentSet.setMinus(orientIds.removeAll(newIds) ? orientIds : null); differentSet.setMinus(orientIds.removeAll(replaceNews) ? orientIds : null);
} }
Result result = issueClient.updateCitations(differentSet); Result result = issueClient.updateCitations(differentSet);
if(!result.success()) throw new RenException(result.getInternalMsg()); if(!result.success()) throw new RenException(result.getInternalMsg());

Loading…
Cancel
Save