|
@@ -8,6 +8,7 @@ import com.fs.common.core.domain.R;
|
|
|
import com.fs.common.exception.CustomException;
|
|
|
import com.fs.common.utils.StringUtils;
|
|
|
import com.fs.common.utils.sign.Md5Utils;
|
|
|
+import com.fs.course.service.IFsUserCourseVideoService;
|
|
|
import com.fs.his.domain.FsDoctor;
|
|
|
import com.fs.his.domain.FsPackage;
|
|
|
import com.fs.his.domain.FsUser;
|
|
@@ -29,6 +30,7 @@ import com.github.pagehelper.PageInfo;
|
|
|
import com.google.zxing.WriterException;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
@@ -36,6 +38,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.imageio.ImageIO;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
+import javax.validation.Valid;
|
|
|
import java.awt.*;
|
|
|
import java.awt.image.BufferedImage;
|
|
|
import java.io.*;
|
|
@@ -52,6 +55,7 @@ import static com.fs.his.utils.PhoneUtil.encryptPhone;
|
|
|
|
|
|
@Api("个人中心")
|
|
|
@RestController
|
|
|
+@Slf4j
|
|
|
@RequestMapping(value="/app/user")
|
|
|
public class UserController extends AppBaseController {
|
|
|
|
|
@@ -66,6 +70,8 @@ public class UserController extends AppBaseController {
|
|
|
private IFsUserCouponService couponService;
|
|
|
@Autowired
|
|
|
private IQwAppContactWayService qwAppContactWayService;
|
|
|
+ @Autowired
|
|
|
+ private IFsUserCourseVideoService courseVideoService;
|
|
|
|
|
|
/**
|
|
|
* 获取用户信息
|
|
@@ -88,6 +94,14 @@ public class UserController extends AppBaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Login
|
|
|
+ @ApiOperation("判断用户是否存在头像昵称")
|
|
|
+ @GetMapping("/checkUserInfo")
|
|
|
+ public R checkUserInfo(){
|
|
|
+ log.info("【判断判断用户是否存在头像昵称】:{}",getUserId());
|
|
|
+ return courseVideoService.checkUserInfo(Long.parseLong(getUserId()));
|
|
|
+ }
|
|
|
+
|
|
|
@Login
|
|
|
@ApiOperation("查看推送设置")
|
|
|
@GetMapping("/getUserPushSetting")
|
|
@@ -130,17 +144,23 @@ public class UserController extends AppBaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
@Login
|
|
|
@ApiOperation("修改用户信息")
|
|
|
@PostMapping("/editUser")
|
|
|
- public R editUser(@RequestBody FsUserEditParam param, HttpServletRequest request){
|
|
|
- FsUser map=new FsUser();
|
|
|
- BeanUtils.copyProperties(param,map);
|
|
|
- map.setUserId(Long.parseLong(getUserId()));
|
|
|
- if(userService.updateFsUser(map)>0){
|
|
|
+ public R editUser(@RequestBody @Valid FsUserEditParam param, HttpServletRequest request){
|
|
|
+ param.setUserId(Long.parseLong(getUserId()));
|
|
|
+ log.info("【修改用户头像昵称】:{}",param);
|
|
|
+ if (param.getNickName().length()>50){
|
|
|
+ return R.error("请授权正确的昵称!");
|
|
|
+ }
|
|
|
+ if (StringUtils.isEmpty(param.getAvatar())){
|
|
|
+ param.setAvatar("https://zkzh-2025.oss-cn-beijing.aliyuncs.com/fs/20250715/533c6f87cc2e4ba4a9504374bb58416d.png");
|
|
|
+ }
|
|
|
+ FsUser user=new FsUser();
|
|
|
+ user.setUserId(Long.parseLong(getUserId()));
|
|
|
+ user.setAvatar(param.getAvatar());
|
|
|
+ user.setNickName(param.getNickName());
|
|
|
+ if(userService.updateFsUser(user)>0){
|
|
|
return R.ok("修改成功");
|
|
|
}
|
|
|
else{
|
|
@@ -148,7 +168,6 @@ public class UserController extends AppBaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
@Login
|
|
|
@ApiOperation("注册医生")
|
|
|
@PostMapping("/registerDoctor")
|