Pārlūkot izejas kodu

增加抽取转换

tags/24080901
WendyYang pirms 1 gada
vecāks
revīzija
bc5c803169
4 mainītis faili ar 36 papildinājumiem un 2 dzēšanām
  1. +7
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingController.java
  2. +21
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java
  3. +7
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/IMeetingService.java
  4. +1
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/impl/MeetingServiceImpl.java

+ 7
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingController.java Parādīt failu

@@ -46,6 +46,13 @@ public class MeetingController {
meetingManage.continueInvite(req.getMeetingId());
}

@PostMapping("/convertToAppoint")
@ApiOperation(value = "转为指定抽取")
@WebLog(value = "转为指定抽取")
public void convertToAppoint(@Valid @RequestBody MeetingIdReq req) {
meetingManage.convertToAppoint(req.getMeetingId());
}

@PostMapping("/expertInviteByCreate")
@ApiOperation(value = "新建会议-专家抽取", hidden = true)
@WebLog(value = "新建会议-专家抽取")


+ 21
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java Parādīt failu

@@ -165,6 +165,27 @@ public class MeetingManage {
}

@Transactional(rollbackFor = Exception.class)
public void convertToAppoint(Long meetingId) {
String key = "CONVERT_TO_APPOINT:" + meetingId;
if (!distributedLock.lock(key, RETRY_TIMES)) {
throw BizException.wrap("已进行转换,请勿重复点击");
}
try {
Meeting meeting = meetingService.getById(meetingId);
if (!MeetingStatusEnum.NORMAL.eq(meeting.getStatus())) {
throw BizException.wrap("转换失败,请刷新后重试");
}
expertInviteTask.cancelByMeetingId(meetingId);
LambdaUpdateWrapper<Meeting> meetingUpdate = Wrappers.lambdaUpdate(Meeting.class)
.set(Meeting::getInviteType, ExpertInviteTypeEnum.APPOINT.getCode())
.eq(Meeting::getId, meetingId);
meetingService.update(meetingUpdate);
} finally {
distributedLock.releaseLock(key);
}
}

@Transactional(rollbackFor = Exception.class)
public void expertInviteByCreate(ExpertInviteReq req) {
String key = INVITED_RULE_CREATE + req.getMeetingId();
if (!distributedLock.lock(key, RETRY_TIMES)) {


+ 7
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/IMeetingService.java Parādīt failu

@@ -23,6 +23,13 @@ public interface IMeetingService extends IService<Meeting> {
**/
void stopRandomInvite(Long meetingId);

/**
* 工作台会议状态统计
*
* @param createBy 创建人
* @return 各状态会议统计
* @author WendyYang
**/
Map<MeetingStatusByDashboard, Integer> meetingCountSummary(Long createBy);

}

+ 1
- 2
pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/impl/MeetingServiceImpl.java Parādīt failu

@@ -34,8 +34,7 @@ public class MeetingServiceImpl extends ServiceImpl<MeetingMapper, Meeting> impl
@Override
public Map<MeetingStatusByDashboard, Integer> meetingCountSummary(Long createBy) {
List<CountGroupByDTO<String>> meetingCountSummary = baseMapper.meetingCountSummary(createBy);
return CollUtils.listToMap(meetingCountSummary,
w -> MeetingStatusByDashboard.valueOf(w.getGroupKey()),
return CollUtils.listToMap(meetingCountSummary, w -> MeetingStatusByDashboard.valueOf(w.getGroupKey()),
CountGroupByDTO::getTotal);
}



Notiek ielāde…
Atcelt
Saglabāt