Browse Source

标签添加修改

master
zxc 5 years ago
parent
commit
dd613eed12
  1. 4
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java
  2. 1
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java

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

@ -327,7 +327,9 @@ public class IssueProjectTagDictRedis {
}
if (status.equals(NumConstant.ONE_STR)){
//标签使用次数-1
if (null != redisUtils.getScore(key,formDTO) && redisUtils.getScore(key,formDTO)>NumConstant.ZERO){
Double score = redisUtils.getScore(key, formDTO);
// 避免score为负数
if (null != score && score > NumConstant.ZERO){
redisUtils.zIncrementScore(key, formDTO,NumConstant.ONE_NEG);
}
}

1
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java

@ -177,6 +177,7 @@ public class IssueTagsServiceImpl extends BaseServiceImpl<IssueTagsDao, IssueTag
@Transactional(rollbackFor = Exception.class)
public void issueTagSave(IssueTagsSaveFormDTO form, TokenDto tokenDto) {
String customerId = tokenDto.getCustomerId();
// 根据议题ID查询此议题原来有哪些标签
List<IssueTagFormDTO> tags = baseDao.selectTagsByIssueId(form.getIssueId());
if (CollectionUtils.isEmpty(form.getTagList())){
// 清空此议题的标签

Loading…
Cancel
Save