init
This commit is contained in:
@@ -13,6 +13,7 @@ import com.ruoyi.cai.dto.app.vo.user.UserAccountVo;
|
||||
import com.ruoyi.cai.dto.app.vo.user.UserAlbumDTO;
|
||||
import com.ruoyi.cai.dto.app.vo.user.UserCountVo;
|
||||
import com.ruoyi.cai.service.*;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.helper.LoginHelper;
|
||||
import com.ruoyi.common.utils.BeanConvertUtil;
|
||||
import com.ruoyi.yunxin.client.ImUserRefClient;
|
||||
@@ -115,6 +116,12 @@ public class CurrentUserManager {
|
||||
updateFlag=true;
|
||||
updateYunxin=true;
|
||||
}
|
||||
if(res.getGender() != null){
|
||||
User user = userService.getById(res.getUserId());
|
||||
if(user.getGender() != 0 && !user.getGender().equals(res.getGender())){
|
||||
throw new ServiceException("性别不可以修改");
|
||||
}
|
||||
}
|
||||
if(res.getCity() != null){
|
||||
update.set(User::getCity,res.getCity());
|
||||
updateFlag=true;
|
||||
|
||||
Reference in New Issue
Block a user