Browse Source

Merge branch 'dev_add_customer_id' into dev_temp

dev_shibei_match
zhaoqifeng 5 years ago
parent
commit
943641e5b7
  1. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailTemplateEntity.java
  2. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupTemplateEntity.java
  3. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java
  4. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ShiBeiScreenCollServiceImpl.java
  5. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenDifficultyDataDao.xml
  6. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenEventImgDataDao.xml
  7. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActLiveRecServiceImpl.java
  8. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActSignInRecServiceImpl.java
  9. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActLiveRecDao.xml
  10. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActSignInRecDao.xml
  11. 1
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointAdjustmentLogServiceImpl.java
  12. 2
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssuesToBeCountedResultDTO.java
  13. 3
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProcessServiceImpl.java
  14. 1
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
  15. 3
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalDailyServiceImpl.java
  16. 11
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java
  17. 1
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteStatisticalDailyDao.xml
  18. 1
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
  19. 4
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectOrgRelationDao.xml
  20. 2
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/ResiTopicTurnIssueFromDTO.java
  21. 7
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java
  22. 8
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicCommentServiceImpl.java
  23. 32
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java
  24. 1
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/TopicDraftServiceImpl.java
  25. 8
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicAttachmentDao.xml
  26. 6
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml
  27. 12
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicOperationDao.xml

6
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailTemplateEntity.java

@ -84,10 +84,4 @@ public class IndexGroupDetailTemplateEntity extends BaseEpmetEntity {
*/
private String correlation;
/**
* 客户ID
*/
@TableField(fill = FieldFill.INSERT)
private String customerId;
}

6
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupTemplateEntity.java

@ -62,10 +62,4 @@ public class IndexGroupTemplateEntity extends BaseEpmetEntity {
*/
private String allIndexCodePath;
/**
* 客户ID
*/
@TableField(fill = FieldFill.INSERT)
private String customerId;
}

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java

@ -185,7 +185,9 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr
imgMap.values().forEach(list -> {imgList.addAll(list);});
difficulties.removeIf( diff -> StringUtils.isBlank(diff.getLatestOperateDesc()));
imgList.forEach(item -> {
item.setCustomerId(param.getCustomerId());
});
screenDifficultyDataService.dataClean(param.getCustomerId(),difficulties,imgList);
log.info("【大屏数据抽取-难点赌点执行完毕】 客户Id{} 难点赌点数据{}",param.getCustomerId(),JSON.toJSONString(difficulties));
}

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ShiBeiScreenCollServiceImpl.java

@ -33,6 +33,7 @@ import com.epmet.entity.evaluationindex.screen.ScreenCustomerAgencyEntity;
import com.epmet.entity.evaluationindex.screen.ScreenCustomerBizOrgEntity;
import com.epmet.entity.evaluationindex.screen.ScreenEventImgDataEntity;
import com.epmet.entity.evaluationindex.screen.ScreenUserJoinEntity;
import com.epmet.service.evaluationindex.screen.ScreenEventImgDataService;
import com.epmet.service.evaluationindex.screen.ShiBeiScreenCollService;
import org.apache.commons.collections4.ListUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -94,6 +95,8 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService {
private ScreenIndexDataYearlyDao screenIndexDataYearlyDao;
@Autowired
private ScreenPublicPartiTotalDataDao screenPublicPartiTotalDataDao;
@Autowired
private ScreenEventImgDataService screenEventImgDataService;
@DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true)
@Override
@ -194,6 +197,7 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService {
for (int j = NumConstant.ZERO; j < formDTO.getDataList().get(i).getImgDataList().size(); j++) {
// 新增 中央区-事件数据图片数据 表
ScreenEventImgDataEntity imgDataEntity = new ScreenEventImgDataEntity();
imgDataEntity.setCustomerId(customerId);
imgDataEntity.setEventId(formDTO.getDataList().get(i).getImgDataList().get(j).getEventId());
imgDataEntity.setEventImgUrl(formDTO.getDataList().get(i).getImgDataList().get(j).getImgUrl());
imgDataEntity.setSort(formDTO.getDataList().get(i).getImgDataList().get(j).getSort());
@ -205,6 +209,7 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService {
if (isImgUrl) {
screenEventImgDataDao.delEventImgDataByEvent(events);
screenEventImgDataDao.batchInsertEventImgData(eventImgDataList);
// screenEventImgDataService.insertBatch(eventImgDataList);
}
}

2
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenDifficultyDataDao.xml

@ -193,6 +193,7 @@
insert into screen_difficulty_img_data
(
ID,
CUSTOMER_ID,
EVENT_ID,
EVENT_IMG_URL,
SORT,
@ -206,6 +207,7 @@
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(), '-', '') AS id),
#{item.customerId},
#{item.eventId},
#{item.eventImgUrl},
#{item.sort},

2
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenEventImgDataDao.xml

@ -16,6 +16,7 @@
insert into screen_event_img_data
(
ID,
CUSTOMER_ID,
EVENT_ID,
EVENT_IMG_URL,
SORT,
@ -29,6 +30,7 @@
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(), '-', '') AS id),
#{item.customerId},
#{item.eventId},
#{item.eventImgUrl},
#{item.sort},

2
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActLiveRecServiceImpl.java

@ -152,6 +152,7 @@ public class ActLiveRecServiceImpl extends BaseServiceImpl<ActLiveRecDao, ActLiv
// 存储活动实况记录表
String uuid = UUID.randomUUID().toString().replaceAll("-","");
formDTO.setId(uuid);
formDTO.setCustomerId(tokenDto.getCustomerId());
baseDao.insertActLiveRec(formDTO);
//存储活动实况图片
@ -163,6 +164,7 @@ public class ActLiveRecServiceImpl extends BaseServiceImpl<ActLiveRecDao, ActLiv
actLivePicEntity.setLiveId(uuid);
actLivePicEntity.setPicUrl(imgUrl);
actLivePicEntity.setSort(i + NumConstant.ONE);
actLivePicEntity.setCustomerId(tokenDto.getCustomerId());
actLivePicDao.insert(actLivePicEntity);
}
}

2
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActSignInRecServiceImpl.java

@ -106,6 +106,7 @@ public class ActSignInRecServiceImpl extends BaseServiceImpl<ActSignInRecDao, Ac
// 存储活动签到记录表
String uuid = UUID.randomUUID().toString().replaceAll("-","");
dto.setId(uuid);
dto.setCustomerId(tokenDto.getCustomerId());
baseDao.insertActSignInRec(dto);
//存储活动签到图片
@ -117,6 +118,7 @@ public class ActSignInRecServiceImpl extends BaseServiceImpl<ActSignInRecDao, Ac
actLivePicEntity.setSignInId(uuid);
actLivePicEntity.setPicUrl(imgUrl);
actLivePicEntity.setSort(i + NumConstant.ONE);
actLivePicEntity.setCustomerId(formDTO.getCustomerId());
actSignInPicDao.insert(actLivePicEntity);
}
}

2
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActLiveRecDao.xml

@ -53,6 +53,7 @@
<insert id="insertActLiveRec" parameterType="com.epmet.dto.form.resi.ResiActInsertLiveFormDTO">
INSERT INTO act_live_rec (
ID,
CUSTOMER_ID,
ACT_ID,
USER_ID,
LONGITUDE,
@ -67,6 +68,7 @@
UPDATED_TIME)
VALUES
( #{id},
#{customerId},
#{actId},
#{userId},
#{longitude},

2
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActSignInRecDao.xml

@ -24,6 +24,7 @@
<insert id="insertActSignInRec" parameterType="com.epmet.dto.ActSignInRecDTO">
INSERT INTO act_sign_in_rec (
ID,
CUSTOMER_ID,
ACT_ID,
USER_ID,
LONGITUDE,
@ -40,6 +41,7 @@
UPDATED_TIME)
VALUES
( #{id},
#{customerId},
#{actId},
#{userId},
#{longitude},

1
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointAdjustmentLogServiceImpl.java

@ -219,6 +219,7 @@ public class PointAdjustmentLogServiceImpl extends BaseServiceImpl<PointAdjustme
adjustmentEntity.setPoint(point);
adjustmentEntity.setOperatorAgencyId(agencyId);
adjustmentEntity.setUserId(param.getUserId());
adjustmentEntity.setCustomerId(param.getCustomerId());
//此处设置无效,会拦截到当前请求token中的userId,实际与这里的operatorId一致
adjustmentEntity.setCreatedBy(param.getOperatorId());
pointAdjustmentLogDao.insert(adjustmentEntity);

2
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssuesToBeCountedResultDTO.java

@ -18,6 +18,8 @@ public class IssuesToBeCountedResultDTO implements Serializable {
* */
private String issueId;
private String customerId;
/**
* 议题状态
* */

3
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProcessServiceImpl.java

@ -127,7 +127,8 @@ public class IssueProcessServiceImpl extends BaseServiceImpl<IssueProcessDao, Is
@Override
@Transactional(rollbackFor = Exception.class)
public int insertOne(IssueProcessDTO issueProcessDTO) {
return baseDao.insertOne(issueProcessDTO);
IssueProcessEntity entity = ConvertUtils.sourceToTarget(issueProcessDTO, IssueProcessEntity.class);
return baseDao.insert(entity);
}
/**

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

@ -262,6 +262,7 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
//2.新增议题流程
IssueProcessDTO issueProcessDTO = new IssueProcessDTO();
issueProcessDTO.setCustomerId(issueShiftedFromTopicFormDTO.getCustomerId());
issueProcessDTO.setIssueId(issueDTO.getId());
issueProcessDTO.setIssueStatus(ModuleConstants.ISSUE_STATUS_VOTING);
issueProcessDTO.setOrgType(ModuleConstants.ISSUE_PROCESS_ORG_TYPE_GRID);

3
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalDailyServiceImpl.java

@ -161,6 +161,7 @@ public class IssueVoteStatisticalDailyServiceImpl extends BaseServiceImpl<IssueV
baseDao.getDailyStatisticalCountByIssueIdAndStatisticalDate(dailyStatisticalToUpdate);
for(IssuesToBeCountedResultDTO o : value){
dailyStatisticalToUpdate.setCustomerId(o.getCustomerId());
//o的attitudeUpToYesterday有三种值:opposition 、 support 、 null
//当o的attitudeUpToYesterday为null时,List中只有一条
//当o的attitudeUpToYesterday不为null时,List中可能存在一条或者两条
@ -292,7 +293,7 @@ public class IssueVoteStatisticalDailyServiceImpl extends BaseServiceImpl<IssueV
}
});
if(dailyListToInsert.size() > NumConstant.ZERO){
baseDao.insertBatch(dailyListToInsert);
insertBatch(dailyListToInsert);
}
if(dailyListToUpdate.size() > NumConstant.ZERO){
baseDao.updateBatch(dailyListToUpdate);

11
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java

@ -51,12 +51,12 @@ import com.epmet.resi.group.feign.ResiGroupOpenFeignClient;
import com.epmet.service.IssueVoteDetailService;
import com.epmet.service.IssueVoteStatisticalService;
import com.epmet.utils.ModuleConstants;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.time.LocalDate;
import java.time.LocalDateTime;
@ -376,7 +376,11 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl<IssueVoteSt
// 批量插入
baseDao.insertBatch(summary);
if(CollectionUtils.isNotEmpty(summary)) {
List<IssueVoteStatisticalEntity> issueVoteStatisticalEntityList = ConvertUtils.sourceToTarget(summary,
IssueVoteStatisticalEntity.class);
insertBatch(issueVoteStatisticalEntityList);
}
}
}
else if (ids.size() < statisiticalIds.size()) {
@ -407,8 +411,9 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl<IssueVoteSt
//根据ids去缓存中取值
List<IssueVoteStatisticalDTO> listToAdd = new ArrayList<>();
setVotableCountsAndUpdateCache(listToAdd,issues,votableCountMap);
List<IssueVoteStatisticalEntity> issueVoteStatisticalEntityList = ConvertUtils.sourceToTarget(listToAdd, IssueVoteStatisticalEntity.class);
// 批量新增listToAdd
baseDao.insertBatch(listToAdd);
insertBatch(issueVoteStatisticalEntityList);
}

1
epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteStatisticalDailyDao.xml

@ -28,6 +28,7 @@
SELECT
issue.ID AS ISSUE_ID,
issue.ISSUE_STATUS,
issue.CUSTOMER_ID,
vote.ATTITUDE,
IFNULL(vote.VOTE_COUNT,0)AS VOTE_COUNT,
totalvote.ATTITUDE AS ATTITUDE_UP_TO_YESTERDAY,

1
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java

@ -1315,6 +1315,7 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
ProjectOrgRelationDTO relation = ConvertUtils.sourceToTarget(period,ProjectOrgRelationDTO.class);
relation.setFirstDealtDate(period.getPeriodTillReplyFirstly());
relation.setSourceOperation(period.getLastAction());
relation.setCustomerId(customerId);
return relation;
}).collect(Collectors.toList());
totalContainer.addAll(formatted);

4
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectOrgRelationDao.xml

@ -50,6 +50,7 @@
<insert id="insertBatch" parameterType="java.util.List">
INSERT INTO project_org_relation(
ID,
CUSTOMER_ID,
PROJECT_STAFF_ID,
INFORMED_DATE,
CREATED_TIME,
@ -61,6 +62,7 @@
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(),'-','') as id),
#{item.customerId},
#{item.projectStaffId},
<choose>
<when test="null == item.informedDate">
@ -108,6 +110,7 @@
<!-- 批量插入 -->
INSERT INTO project_org_relation(
ID,
CUSTOMER_ID,
PROJECT_STAFF_ID,
INFORMED_DATE,
HANDLED_DATE,
@ -124,6 +127,7 @@
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(),'-','') as id),
#{item.customerId},
#{item.projectStaffId},
#{item.informedDate},
#{item.handledDate},

2
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/ResiTopicTurnIssueFromDTO.java

@ -48,4 +48,6 @@ public class ResiTopicTurnIssueFromDTO implements Serializable {
private String actionType;
private String customerId;
}

7
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java

@ -241,6 +241,7 @@ public class ResiTopicController {
@PostMapping("turnintoissue")
public Result turnIntoIssue(@LoginUser TokenDto tokenDto,@RequestBody ResiTopicTurnIssueFromDTO topicTurnIssueFromDTO){
topicTurnIssueFromDTO.setUserId(tokenDto.getUserId());
topicTurnIssueFromDTO.setCustomerId(tokenDto.getCustomerId());
ValidatorUtils.validateEntity(topicTurnIssueFromDTO);
topicService.shiftIssue(topicTurnIssueFromDTO);
return new Result();
@ -256,6 +257,7 @@ public class ResiTopicController {
@PostMapping("turnintoissuev2")
public Result<FirstTopicShiftedToIssueApplicationResultDTO> turnIntoIssueV2(@LoginUser TokenDto tokenDto, @RequestBody ResiTopicTurnIssueFromDTO topicTurnIssueFromDTO){
topicTurnIssueFromDTO.setUserId(tokenDto.getUserId());
topicTurnIssueFromDTO.setCustomerId(tokenDto.getCustomerId());
ValidatorUtils.validateEntity(topicTurnIssueFromDTO);
return new Result<FirstTopicShiftedToIssueApplicationResultDTO>().ok(topicService.shiftIssueV2(topicTurnIssueFromDTO));
}
@ -271,6 +273,7 @@ public class ResiTopicController {
@PostMapping("editissueapplication")
public Result<FirstTopicShiftedToIssueApplicationResultDTO> editIssueApplication(@LoginUser TokenDto tokenDto, @RequestBody ResiTopicTurnIssueFromDTO param){
param.setUserId(tokenDto.getUserId());
param.setCustomerId(tokenDto.getCustomerId());
ValidatorUtils.validateEntity(param);
return new Result<FirstTopicShiftedToIssueApplicationResultDTO>().ok(topicService.shiftIssueV2(param));
}
@ -283,7 +286,9 @@ public class ResiTopicController {
* @date 2020.11.23 03:08
*/
@PostMapping("fetchtopicinfowhenauditissue")
public Result<IssueShiftedFromTopicFormDTO> fetchTopicInfoWhenAuditIssue(@RequestBody ResiTopicTurnIssueFromDTO param){
public Result<IssueShiftedFromTopicFormDTO> fetchTopicInfoWhenAuditIssue(@LoginUser TokenDto tokenDto,
@RequestBody ResiTopicTurnIssueFromDTO param){
param.setCustomerId(tokenDto.getCustomerId());
return new Result<IssueShiftedFromTopicFormDTO>().ok(topicService.getIssueInfoWhenAudit(param));
}

8
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicCommentServiceImpl.java

@ -34,6 +34,7 @@ import com.epmet.commons.tools.scan.param.TextScanParamDTO;
import com.epmet.commons.tools.scan.param.TextTaskDTO;
import com.epmet.commons.tools.scan.result.SyncScanResult;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.utils.ScanContentUtils;
@ -109,6 +110,9 @@ public class ResiTopicCommentServiceImpl extends BaseServiceImpl<ResiTopicCommen
@Autowired
ResiTopicDao resiTopicdDao;
@Autowired
LoginUserUtil loginUserUtil;
@Value("${openapi.scan.server.url}")
private String scanApiUrl;
@Value("${openapi.scan.method.textSyncScan}")
@ -231,7 +235,9 @@ public class ResiTopicCommentServiceImpl extends BaseServiceImpl<ResiTopicCommen
ResiTopicCommentEntity comment = ConvertUtils.sourceToTarget(resiCommentFormDTO,ResiTopicCommentEntity.class);
comment.setStatus(TopicConstant.PUBLISHMENT);
comment.setCreatedBy(tokenDto.getUserId());
baseDao.insertOne(comment);
//2021/1/29 客户Id
comment.setCustomerId(loginUserUtil.getLoginUserCustomerId());
baseDao.insert(comment);
// 话题评论前3次,加积分【对小组内话题进行15字以上评论】
Integer commentCount = baseDao.selectCommentCountByUserId(tokenDto.getUserId());
if (null == commentCount || commentCount <= NumConstant.THREE){

32
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java

@ -38,6 +38,7 @@ import com.epmet.commons.tools.scan.param.TextScanParamDTO;
import com.epmet.commons.tools.scan.param.TextTaskDTO;
import com.epmet.commons.tools.scan.result.SyncScanResult;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.*;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.constant.OrgInfoConstant;
@ -102,7 +103,6 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jsoup.helper.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@ -177,6 +177,9 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
@Autowired
private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient;
@Autowired
private LoginUserUtil loginUserUtil;
@Value("${openapi.scan.server.url}")
private String scanApiUrl;
@Value("${openapi.scan.method.textSyncScan}")
@ -310,9 +313,14 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
logger.error(ModuleConstant.TOPIC_CONTENT_NUMBER_OF_WORDS_EXCEEDED);
throw new RenException(ModuleConstant.TOPIC_CONTENT_NUMBER_OF_WORDS_EXCEEDED);
}
String customerId = loginUserUtil.getLoginUserCustomerId();
ResiTopicEntity topic = ConvertUtils.sourceToTarget(resiTopicPublishFormDTO,ResiTopicEntity.class);
topic.setCreatedBy(tokenDto.getUserId());
topic.setStatus(TopicConstant.PUBLISHMENT);
//2021/1/29 客户Id
topic.setCustomerId(customerId);
baseDao.insertOne(topic);
if(StringUtils.isBlank(topic.getId())){
//没有返回主键
@ -329,6 +337,8 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
attachment.setAttachmentFormat(url.substring(url.lastIndexOf(".") + NumConstant.ONE).toLowerCase());
attachment.setSort(sort++);
attachment.setAttachmentType("image");
//2021/1/29 客户Id
attachment.setCustomerId(customerId);
resiTopicAttachmentDao.insertOne(attachment);
}
}
@ -338,6 +348,8 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
operation.setTopicId(topic.getId());
operation.setOperationType(TopicConstant.PUBLISHMENT);
operation.setCreatedBy(tokenDto.getUserId());
//2021/1/29 客户Id
operation.setCustomerId(customerId);
resiTopicOperationDao.insertOne(operation);
@ -356,6 +368,8 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
statistical2Update.setTotalTopics(null == statistical.get(NumConstant.ZERO).getTotalTopics() ? NumConstant.ONE : statistical.get(NumConstant.ZERO).getTotalTopics() + NumConstant.ONE);
statistical2Update.setUpdatedBy(tokenDto.getUserId());
statistical2Update.setUpdatedTime(currentTime);
//2021/1/29 客户Id
statistical2Update.setCustomerId(customerId);
resiGroupStatisticalDao.updateById(statistical2Update);
}
}else{
@ -369,6 +383,8 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
ResiGroupEntity group2Update = new ResiGroupEntity();
group2Update.setId(resiTopicPublishFormDTO.getGroupId());
group2Update.setLatestTopicPublishDate(currentTime);
//2021/1/29 客户Id
group2Update.setCustomerId(customerId);
resiGroupDao.updateById(group2Update);
// 创建话题增加积分
@ -556,12 +572,17 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
topicForUpdate.setUpdatedBy(tokenDto.getUserId());
topicForUpdate.setStatus(TopicConstant.HIDDEN);
baseDao.update(topicForUpdate);
String customerId = loginUserUtil.getLoginUserCustomerId();
//3.话题操作记录
ResiTopicOperationEntity operationRecord = new ResiTopicOperationEntity();
operationRecord.setTopicId(hiddenFormDTO.getTopicId());
operationRecord.setOperationReason(hiddenFormDTO.getOperateReason());
operationRecord.setOperationType(TopicConstant.HIDDEN);
operationRecord.setCreatedBy(tokenDto.getUserId());
//2021/1/29 客户Id
operationRecord.setCustomerId(customerId);
resiTopicOperationDao.insertOne(operationRecord);
// 4.组话题数量-1 (对应的在解除屏蔽时组话题数量+1)
@ -618,6 +639,7 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
operation.setTopicId(id);
operation.setOperationType(TopicConstant.CANCEL_HIDDEN);
operation.setCreatedBy(tokenDto.getUserId());
operation.setCustomerId(loginUserUtil.getLoginUserCustomerId());
resiTopicOperationDao.insertOne(operation);
}
QueryWrapper<ResiGroupStatisticalEntity> statisticalWrapper = new QueryWrapper<>();
@ -678,6 +700,8 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
operation.setOperationReason(closeFormDTO.getOperateReason());
operation.setCreatedBy(tokenDto.getUserId());
operation.setOperationType(TopicConstant.CLOSED);
//2021/1/29 客户Id
operation.setCustomerId(loginUserUtil.getLoginUserCustomerId());
resiTopicOperationDao.insertOne(operation);
return new Result();
@ -975,6 +999,8 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
List<String> ids = new ArrayList<>();
List<ResiTopicOperationEntity> topicOperationList = new ArrayList<>();
ResiTopicOperationEntity resiTopicOperationEntity = null;
//2021/1/29 客户Id
String customerId = loginUserUtil.getLoginUserCustomerId();
for (ResiTopicDTO dto : list) {
ids.add(dto.getId());
resiTopicOperationEntity = new ResiTopicOperationEntity();
@ -985,6 +1011,7 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
resiTopicOperationEntity.setRevision(NumConstant.ZERO);
resiTopicOperationEntity.setCreatedBy(removeMemberFormDTO.getUserId());
resiTopicOperationEntity.setUpdatedBy(removeMemberFormDTO.getUserId());
resiGroupMemberEntity.setCustomerId(customerId);
topicOperationList.add(resiTopicOperationEntity);
}
baseDao.cancelHiddenOrCloseBatch(ids, removeMemberFormDTO.getUserId(),TopicConstant.HIDDEN);
@ -1463,6 +1490,7 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
operation.setCreatedTime(now);
operation.setCreatedBy(topicTurnIssueFromDTO.getUserId());
operation.setTopicId(topicTurnIssueFromDTO.getTopicId());
operation.setCustomerId(topicTurnIssueFromDTO.getCustomerId());
operation.setOperationType(ModuleConstant.TOPIC_OPERATION_TYPE_SHIFT_ISSUE);
int operationResult = resiTopicOperationDao.insertOneByParams(operation);
if (operationResult != NumConstant.ONE) {
@ -1580,6 +1608,7 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
operation.setCreatedBy(topicTurnIssueFromDTO.getUserId());
operation.setTopicId(topicTurnIssueFromDTO.getTopicId());
operation.setOperationType(ModuleConstant.TOPIC_OPERATION_TYPE_SHIFT_ISSUE);
operation.setCustomerId(topicTurnIssueFromDTO.getCustomerId());
int operationResult = resiTopicOperationDao.insertOneByParams(operation);
if (operationResult != NumConstant.ONE) {
logger.warn(ModuleConstant.FAILURE_TO_ADD_TOPIC_OPERATION);
@ -1714,6 +1743,7 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
operation.setCreatedBy(param.getUserId());
operation.setTopicId(param.getTopicId());
operation.setOperationType(ModuleConstant.TOPIC_OPERATION_TYPE_SHIFT_ISSUE);
operation.setCustomerId(param.getCustomerId());
int operationResult = resiTopicOperationDao.insertOneByParams(operation);
if (operationResult != NumConstant.ONE) {
logger.warn(ModuleConstant.FAILURE_TO_ADD_TOPIC_OPERATION);

1
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/TopicDraftServiceImpl.java

@ -752,6 +752,7 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD
List<ResiTopicAttachmentEntity> topicAttachments = ConvertUtils.sourceToTarget(attachmentList, ResiTopicAttachmentEntity.class);
topicAttachments.forEach(item -> {
item.setId(null);
item.setCustomerId(tokenDto.getCustomerId());
item.setTopicId(resiTopic.getId());
item.setCreatedBy(draft.getCreatedBy());
item.setUpdatedBy(draft.getCreatedBy());

8
epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicAttachmentDao.xml

@ -30,6 +30,9 @@
<if test='null != sort'>
sort,
</if>
<if test='null != customerId and "" != customerId'>
customer_id,
</if>
<if test ='null != createdBy'>
created_by,
</if>
@ -59,6 +62,9 @@
<if test='null != sort'>
#{sort},
</if>
<if test='null != customerId and "" != customerId'>
#{customerId},
</if>
<if test ='null != createdBy'>
#{createdBy},
</if>
@ -76,6 +82,7 @@
insert into resi_topic_attachment
(
id,
customer_id,
topic_id,
attachment_name,
attachment_format,
@ -93,6 +100,7 @@
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(), '-', '') AS id),
#{item.customerId},
#{item.topicId},
#{item.attachmentName},
#{item.attachmentFormat},

6
epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml

@ -58,6 +58,9 @@
<if test ='null != dimension'>
dimension,
</if>
<if test='null != customerId and "" != customerId'>
customer_id,
</if>
<if test ='null != createdBy'>
created_by,
</if>
@ -97,6 +100,9 @@
<if test ='null != dimension'>
#{dimension},
</if>
<if test='null != customerId and "" != customerId'>
#{customerId},
</if>
<if test ='null != createdBy'>
#{createdBy},
</if>

12
epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicOperationDao.xml

@ -22,6 +22,9 @@
<if test='null != operationReason'>
operation_reason,
</if>
<if test='null != customerId and "" != customerId'>
customer_id,
</if>
<if test ='null != createdBy'>
created_by,
</if>
@ -42,6 +45,9 @@
<if test='null != operationReason'>
#{operationReason},
</if>
<if test='null != customerId and "" != customerId'>
#{customerId},
</if>
<if test ='null != createdBy'>
#{createdBy},
</if>
@ -72,6 +78,9 @@
<if test='null != operationReason'>
operation_reason,
</if>
<if test='null != customerId and "" != customerId'>
customer_id,
</if>
<if test ='null != createdBy'>
created_by,
</if>
@ -98,6 +107,9 @@
<if test='null != operationReason'>
#{operationReason},
</if>
<if test='null != customerId and "" != customerId'>
#{customerId},
</if>
<if test ='null != createdBy'>
#{createdBy},
</if>

Loading…
Cancel
Save