|
|
|
@ -46,11 +46,7 @@ import com.elink.esua.epdc.dto.issue.IssueDTO; |
|
|
|
import com.elink.esua.epdc.dto.topic.GroupTopicUserReadDTO; |
|
|
|
import com.elink.esua.epdc.dto.topic.TopicDTO; |
|
|
|
import com.elink.esua.epdc.dto.topic.TopicDetailDTO; |
|
|
|
import com.elink.esua.epdc.dto.topic.form.TopicListFormDTO; |
|
|
|
import com.elink.esua.epdc.dto.topic.form.TopicChangeToIssueFormDTO; |
|
|
|
import com.elink.esua.epdc.dto.topic.form.TopicCloseFormDTO; |
|
|
|
import com.elink.esua.epdc.dto.topic.form.TopicReviewFormDTO; |
|
|
|
import com.elink.esua.epdc.dto.topic.form.TopicSubmitFormDTO; |
|
|
|
import com.elink.esua.epdc.dto.topic.form.*; |
|
|
|
import com.elink.esua.epdc.dto.topic.result.TopicDetailResultDTO; |
|
|
|
import com.elink.esua.epdc.dto.topic.result.TopicListResultDTO; |
|
|
|
import com.elink.esua.epdc.modules.async.NewsTask; |
|
|
|
@ -206,15 +202,24 @@ public class TopicServiceImpl extends BaseServiceImpl<TopicDao, TopicEntity> imp |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public TopicDetailResultDTO getTopicDetailById(String id) { |
|
|
|
TopicDetailResultDTO resultDto = baseDao.selectOneOfTopicDetailById(id); |
|
|
|
public TopicDetailResultDTO getTopicDetailById(TopicDetailFormDTO formDto) { |
|
|
|
TopicDetailResultDTO resultDto = baseDao.selectOneOfTopicDetailById(formDto.getId()); |
|
|
|
if (null != resultDto) { |
|
|
|
// 更新浏览次数
|
|
|
|
TopicEntity entity = new TopicEntity(); |
|
|
|
entity.setId(id); |
|
|
|
entity.setId(formDto.getId()); |
|
|
|
entity.setBrowseNum(resultDto.getBrowseNum() + 1); |
|
|
|
this.updateById(entity); |
|
|
|
|
|
|
|
// 获取群主信息
|
|
|
|
UserGroupDTO userGroupDto = userGroupService.getLordInfoByGroupId(resultDto.getGroupId()); |
|
|
|
if (formDto.getUserId().equals(userGroupDto.getUserId())) { |
|
|
|
resultDto.setLordFlag(NumConstant.ONE_STR); |
|
|
|
} else { |
|
|
|
resultDto.setLordFlag(NumConstant.ZERO_STR); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return resultDto; |
|
|
|
} |
|
|
|
|
|
|
|
@ -300,12 +305,9 @@ public class TopicServiceImpl extends BaseServiceImpl<TopicDao, TopicEntity> imp |
|
|
|
EpdcEventSubmitFormDTO eventSubmitFormDto = baseDao.selectOneOfTopicForChangeToIssue(formDto.getId()); |
|
|
|
eventSubmitFormDto.setCategoryId(formDto.getCategoryId()); |
|
|
|
eventSubmitFormDto.setAdvice(formDto.getAdvice()); |
|
|
|
UserDetail user = SecurityUser.getUser(); |
|
|
|
if (null != user) { |
|
|
|
eventSubmitFormDto.setChangeUserId(user.getId()); |
|
|
|
eventSubmitFormDto.setChangeUsername(user.getUsername()); |
|
|
|
eventSubmitFormDto.setChangeUserMobile(user.getMobile()); |
|
|
|
} |
|
|
|
eventSubmitFormDto.setChangeUserId(null); |
|
|
|
eventSubmitFormDto.setChangeUsername(formDto.getNickname()); |
|
|
|
eventSubmitFormDto.setChangeUserMobile(formDto.getMobile()); |
|
|
|
Result<IssueDTO> eventResult = eventFeignClient.submitEvent(eventSubmitFormDto); |
|
|
|
if (!eventResult.success()) { |
|
|
|
return eventResult; |
|
|
|
|