Commit 875764ae by 谢海旭

v5.7.0版本 飞行督导:增加角色校验

1 parent 26b0b541
......@@ -865,6 +865,14 @@ public class SupervisorTaskInfoService {
public Long createSpecialTask(CreateSpecialTaskDTO request) {
log.info("新增专项任务 - 开始,request={}", request);
// 校验督导是否为飞行督导角色
String supervisorPhone = request.getSupervisorPhone();
List<MerchantStaffResponse> supervisorList = getMerchantStaffByPhone(supervisorPhone);
if (CollectionUtils.isEmpty(supervisorList)) {
log.warn("新增专项任务失败,手机号 {} 对应的用户不是飞行督导", supervisorPhone);
throw new RpcServiceException(DefaultErrorEnum.SERVICE_ERROR, "该用户不是飞行督导,无法创建专项任务");
}
SupervisorTaskInfo taskInfo = new SupervisorTaskInfo();
taskInfo.setTaskType(TaskTypeEnum.SPECIAL_RECORDING.getCode()); // 4-专项
taskInfo.setTaskStatus(TaskStatusEnum.PENDING.getCode()); // 直接设为待处理
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!