|
|
@ -7,12 +7,14 @@ import com.msdw.tms.common.utils.PageUtils; |
|
|
|
import com.msdw.tms.common.utils.R; |
|
|
|
import com.msdw.tms.common.utils.R; |
|
|
|
import com.msdw.tms.entity.UserEntity; |
|
|
|
import com.msdw.tms.entity.UserEntity; |
|
|
|
import com.msdw.tms.entity.vo.UserEntityVo; |
|
|
|
import com.msdw.tms.entity.vo.UserEntityVo; |
|
|
|
|
|
|
|
import com.msdw.tms.entity.vo.UserProsonalEntityVo; |
|
|
|
import com.msdw.tms.service.UserService; |
|
|
|
import com.msdw.tms.service.UserService; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.Arrays; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
|
@RestController |
|
|
|
@RestController |
|
|
@ -40,6 +42,7 @@ public class UserController implements UserControllerApi { |
|
|
|
public R info(@PathVariable("id") Long id){ |
|
|
|
public R info(@PathVariable("id") Long id){ |
|
|
|
UserEntity userEntity = userService.getById(id); |
|
|
|
UserEntity userEntity = userService.getById(id); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// userService.queryUserInfo();
|
|
|
|
return R.ok().put("growthChangeHistory", userEntity); |
|
|
|
return R.ok().put("growthChangeHistory", userEntity); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -64,10 +67,16 @@ public class UserController implements UserControllerApi { |
|
|
|
* 修改 |
|
|
|
* 修改 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
|
|
|
|
@Transactional |
|
|
|
@PutMapping("/update") |
|
|
|
@PutMapping("/update") |
|
|
|
public R update(@RequestBody UserEntity userEntity){ |
|
|
|
public R update(@RequestBody UserProsonalEntityVo vo){ |
|
|
|
userService.updateById(userEntity); |
|
|
|
List<UserEntityVo> userEntityVoList = vo.getUserEntityVoList(); |
|
|
|
|
|
|
|
UserEntity userInfo = vo.getUserEntity(); |
|
|
|
|
|
|
|
userService.updateById(userInfo); |
|
|
|
|
|
|
|
for (int i = 0;i<userEntityVoList.size();i++){ |
|
|
|
|
|
|
|
UserEntityVo personalFile = userEntityVoList.get(i); |
|
|
|
|
|
|
|
userService.updateUserPersonal(personalFile); |
|
|
|
|
|
|
|
} |
|
|
|
return R.ok(); |
|
|
|
return R.ok(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -82,7 +91,7 @@ public class UserController implements UserControllerApi { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 校验密码 |
|
|
|
* 校验并更新密码 |
|
|
|
* @param entity 封装用户id和输入的原密码和新密码 |
|
|
|
* @param entity 封装用户id和输入的原密码和新密码 |
|
|
|
* @return R 响应的状态信息 |
|
|
|
* @return R 响应的状态信息 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|