|
|
@@ -1,6 +1,8 @@
|
|
|
package com.ruoyi.web.controller.system;
|
|
|
|
|
|
import java.util.Map;
|
|
|
+
|
|
|
+import com.ruoyi.enums.UserTypeEnum;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
@@ -68,6 +70,11 @@ public class SysProfileController extends BaseController
|
|
|
currentUser.setEmail(user.getEmail());
|
|
|
currentUser.setPhonenumber(user.getPhonenumber());
|
|
|
currentUser.setSex(user.getSex());
|
|
|
+ if(!UserTypeEnum.isCard(user.getUserType())) {
|
|
|
+ currentUser.setLocation(user.getLocation());
|
|
|
+ currentUser.setExamType(user.getExamType());
|
|
|
+ currentUser.setEndYear(user.getEndYear());
|
|
|
+ }
|
|
|
if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(currentUser))
|
|
|
{
|
|
|
return error("修改用户'" + loginUser.getUsername() + "'失败,手机号码已存在");
|