|
@@ -72,6 +72,7 @@ public class UserLogicImpl extends BaseLogic implements UserLogic {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private BankAccountInfoService bankAccountInfoService;
|
|
private BankAccountInfoService bankAccountInfoService;
|
|
|
|
+ private String userId;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public UserDTO getUserByEmail(String s) {
|
|
public UserDTO getUserByEmail(String s) {
|
|
@@ -552,7 +553,7 @@ public class UserLogicImpl extends BaseLogic implements UserLogic {
|
|
@Override
|
|
@Override
|
|
public ResponseResult<UserVO> updateUserPassword(UserVO userVO, HttpServletRequest request){
|
|
public ResponseResult<UserVO> updateUserPassword(UserVO userVO, HttpServletRequest request){
|
|
ResponseResult<UserVO> result = new ResponseResult<>();
|
|
ResponseResult<UserVO> result = new ResponseResult<>();
|
|
- Long userId = (Long) request.getSession().getAttribute("userId");
|
|
|
|
|
|
+ Long userId = Long.parseLong((String) request.getSession().getAttribute("userId"));
|
|
try {
|
|
try {
|
|
if (userId == null)
|
|
if (userId == null)
|
|
throw new Exception("用户未登录");
|
|
throw new Exception("用户未登录");
|
|
@@ -586,7 +587,7 @@ public class UserLogicImpl extends BaseLogic implements UserLogic {
|
|
@Override
|
|
@Override
|
|
public ResponseResult<UserVO> updateUserEmail(UserVO userVO, HttpServletRequest request) {
|
|
public ResponseResult<UserVO> updateUserEmail(UserVO userVO, HttpServletRequest request) {
|
|
ResponseResult<UserVO> result = new ResponseResult<>();
|
|
ResponseResult<UserVO> result = new ResponseResult<>();
|
|
- Long userId = (Long) request.getSession().getAttribute("userId");
|
|
|
|
|
|
+ Long userId = Long.parseLong((String) request.getSession().getAttribute("userId"));
|
|
try {
|
|
try {
|
|
if (userId == null)
|
|
if (userId == null)
|
|
throw new Exception("用户未登录");
|
|
throw new Exception("用户未登录");
|
|
@@ -610,7 +611,7 @@ public class UserLogicImpl extends BaseLogic implements UserLogic {
|
|
@Override
|
|
@Override
|
|
public ResponseResult<UserVO> updateUserMobile(UserVO userVO, HttpServletRequest request) {
|
|
public ResponseResult<UserVO> updateUserMobile(UserVO userVO, HttpServletRequest request) {
|
|
ResponseResult<UserVO> result = new ResponseResult<>();
|
|
ResponseResult<UserVO> result = new ResponseResult<>();
|
|
- Long userId = (Long) request.getSession().getAttribute("userId");
|
|
|
|
|
|
+ Long userId = Long.parseLong((String) request.getSession().getAttribute("userId"));
|
|
try {
|
|
try {
|
|
if (userId == null)
|
|
if (userId == null)
|
|
throw new Exception("用户未登录");
|
|
throw new Exception("用户未登录");
|
|
@@ -639,7 +640,7 @@ public class UserLogicImpl extends BaseLogic implements UserLogic {
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
return new ResponseResult<Object>(ResponseStatus.FAILED, "上传失败,请稍后再试",null);
|
|
return new ResponseResult<Object>(ResponseStatus.FAILED, "上传失败,请稍后再试",null);
|
|
}
|
|
}
|
|
- infoVO.setUser_id((Long) request.getSession().getAttribute("userId"));
|
|
|
|
|
|
+ infoVO.setUser_id(Long.parseLong((String) request.getSession().getAttribute("userId")));
|
|
BankAccountInfo info = bankAccountInfoService.setBankAccountInfo(bankAccountInfoVOWrapper.unwrap(infoVO));
|
|
BankAccountInfo info = bankAccountInfoService.setBankAccountInfo(bankAccountInfoVOWrapper.unwrap(infoVO));
|
|
if (info==null){
|
|
if (info==null){
|
|
return new ResponseResult<Object>(ResponseStatus.FAILED, "上传出错,请稍后再试",null);
|
|
return new ResponseResult<Object>(ResponseStatus.FAILED, "上传出错,请稍后再试",null);
|