|
@@ -2,6 +2,7 @@ package com.ym.mec.web.controller;
|
|
|
|
|
|
import com.ym.mec.auth.api.client.SysUserFeignService;
|
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
|
+import com.ym.mec.auth.api.enums.SysUserType;
|
|
|
import com.ym.mec.biz.dal.dao.EmployeeDao;
|
|
|
import com.ym.mec.biz.dal.entity.Employee;
|
|
|
import com.ym.mec.biz.dal.entity.SporadicChargeInfo;
|
|
@@ -78,6 +79,13 @@ public class SporadicChargeInfoController extends BaseController {
|
|
|
if(user == null){
|
|
|
return failed("学员信息不存在");
|
|
|
}
|
|
|
+ if(user.getUserType() != SysUserType.STUDENT){
|
|
|
+ return failed("该用户不是学员");
|
|
|
+ }
|
|
|
+ if(user.getOrganId() == null){
|
|
|
+ return failed("分部信息异常");
|
|
|
+ }
|
|
|
+ sporadicChargeInfo.setOrganId(Integer.parseInt(user.getOrganId()));
|
|
|
}
|
|
|
return succeed(sporadicChargeInfoService.insert(sporadicChargeInfo));
|
|
|
}
|