|
|
@ -9,7 +9,9 @@ import com.epmet.commons.rocketmq.messages.GroupAchievementMQMsg; |
|
|
|
import com.epmet.commons.tools.constant.AppClientConstant; |
|
|
|
import com.epmet.commons.tools.constant.FieldConstant; |
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.distributedlock.DistributedLock; |
|
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
|
import com.epmet.commons.tools.enums.AchievementTypeEnum; |
|
|
|
import com.epmet.commons.tools.enums.EventEnum; |
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
@ -41,7 +43,6 @@ import com.epmet.entity.IssueEntity; |
|
|
|
import com.epmet.entity.IssueProcessEntity; |
|
|
|
import com.epmet.entity.IssueProjectRelationEntity; |
|
|
|
import com.epmet.feign.*; |
|
|
|
import com.epmet.commons.tools.enums.AchievementTypeEnum; |
|
|
|
import com.epmet.redis.GovIssueRedis; |
|
|
|
import com.epmet.redis.IssueVoteDetailRedis; |
|
|
|
import com.epmet.resi.group.dto.group.form.AllIssueFormDTO; |
|
|
@ -62,6 +63,7 @@ import com.epmet.utils.ModuleConstants; |
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
|
|
import org.redisson.api.RLock; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
@ -136,6 +138,8 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp |
|
|
|
private GovProjectOpenFeignClient govProjectOpenFeignClient; |
|
|
|
@Autowired |
|
|
|
private IssueVoteDetailService issueVoteDetailService; |
|
|
|
@Autowired |
|
|
|
private DistributedLock distributedLock; |
|
|
|
|
|
|
|
|
|
|
|
@Value("${openapi.scan.server.url}") |
|
|
@ -957,7 +961,11 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp |
|
|
|
* @date 2020/12/9 10:01 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public void shiftProjectV2(ShiftProjectFormDTO formDTO) { |
|
|
|
public Result shiftProjectV2(ShiftProjectFormDTO formDTO) { |
|
|
|
RLock lock = null; |
|
|
|
try { |
|
|
|
// 锁持有10分钟,等待10s
|
|
|
|
lock = distributedLock.tryLock(formDTO.getIssueId()); |
|
|
|
//1:查询议题数据
|
|
|
|
IssueEntity entity = baseDao.selectById(formDTO.getIssueId()); |
|
|
|
if (null == entity) { |
|
|
@ -1078,6 +1086,13 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp |
|
|
|
|
|
|
|
//8.记录日志
|
|
|
|
//SendMqMsgUtil.build().openFeignClient(messageOpenFeignClient).sendProjectChangedMqMsg();
|
|
|
|
return new Result(); |
|
|
|
} catch (Exception e) { |
|
|
|
return new Result().error("议题数据正在处理中,请勿重复提交!"); |
|
|
|
} finally { |
|
|
|
distributedLock.unLock(lock); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|