|
@@ -3,6 +3,7 @@ package com.care.keeper.controller;
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
import cn.hutool.core.collection.CollUtil;
|
|
import cn.hutool.core.collection.CollUtil;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
+import com.care.client.vo.MemberInfoVO;
|
|
import com.care.common.entity.*;
|
|
import com.care.common.entity.*;
|
|
import com.care.common.service.*;
|
|
import com.care.common.service.*;
|
|
import com.care.common.util.Result;
|
|
import com.care.common.util.Result;
|
|
@@ -13,10 +14,7 @@ import com.care.keeper.vo.KeeperInfoVO;
|
|
import com.care.keeper.vo.OlderVO;
|
|
import com.care.keeper.vo.OlderVO;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestHeader;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
@@ -72,6 +70,26 @@ public class KeeperMemberApiController {
|
|
return Result.success(current);
|
|
return Result.success(current);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @PostMapping("/update/updateMyInfo")
|
|
|
|
+ @ApiOperation(value = "修改个人信息(电话、姓名、头像、性别等) -- 二期新增", notes = "修改个人信息(电话、姓名、头像、性别等)")
|
|
|
|
+ public Result<Object> updateMyInfo(@RequestHeader("token") String token,
|
|
|
|
+ @RequestBody KeeperInfoVO vo){
|
|
|
|
+ try {
|
|
|
|
+ KeeperInfoVO current = keeperPassportService.checkToken(token);
|
|
|
|
+ CareSysUser member = careSysUserService.detailByPhone4Keeper(current.getPhone());
|
|
|
|
+ vo.setId(member.getId());
|
|
|
|
+ if(this.keeperInfoApiService.updateMyInfo(vo)){
|
|
|
|
+ return Result.success("修改成功!");
|
|
|
|
+ } else {
|
|
|
|
+ return Result.error("修改失败!");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ return Result.error("修改失败!");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
@ApiOperation(value = "刷新基本信息", notes = "刷新用户基本录信息")
|
|
@ApiOperation(value = "刷新基本信息", notes = "刷新用户基本录信息")
|
|
@PostMapping("refresh")
|
|
@PostMapping("refresh")
|
|
public Result<Object> refreshMember(@RequestHeader String token) {
|
|
public Result<Object> refreshMember(@RequestHeader String token) {
|