|
@@ -28,6 +28,7 @@ import com.free.dto.TransferApplyCreateDTO;
|
|
|
import com.free.entity.TransferApply;
|
|
|
import com.free.mq.MqService;
|
|
|
import com.free.service.TransferApplyService;
|
|
|
+import com.free.utils.JwtUtil;
|
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
@@ -112,7 +113,18 @@ public class TransferApplyController {
|
|
|
if (num <= 0) {
|
|
|
throw new CustomizationException(ExceptionEnum.NOT_FOUND);
|
|
|
}
|
|
|
- data.setId(id);
|
|
|
+ TransferApply updateData = new TransferApply();
|
|
|
+ updateData.setId(id);
|
|
|
+ // 从token获取信息, 只有客服人员能处理
|
|
|
+ Map userMap = JwtUtil.getDetails(null);
|
|
|
+ String type = (String) userMap.get("type");
|
|
|
+ if (!LoginController.csLoginType.equals(type)) {
|
|
|
+ throw new CustomizationException(ExceptionEnum.ACCPET_USER_TYPE_FAULT);
|
|
|
+
|
|
|
+ }
|
|
|
+ // 获取客服人员id
|
|
|
+ Long customer_id = Long.valueOf(String.valueOf(userMap.get("id")));
|
|
|
+ updateData.setCustomer_id(customer_id);
|
|
|
this.service.updateById(data);
|
|
|
TransferApply newData = this.service.getById(id);
|
|
|
// 如果审核通过了, 则需要给申请人发送mq消息.申请人需要知道是谁跟自己对话
|