|
@@ -124,7 +124,7 @@ public class UserServiceImpl implements IUserService {
|
|
if (agentUser == null) {
|
|
if (agentUser == null) {
|
|
return ServerResponse.createByErrorMsg("注册失败, 代理不存在");
|
|
return ServerResponse.createByErrorMsg("注册失败, 代理不存在");
|
|
}
|
|
}
|
|
- if (agentUser.getIsLock().intValue() == 1) {
|
|
|
|
|
|
+ if (agentUser.getIsLock() == 1) {
|
|
return ServerResponse.createByErrorMsg("注册失败, 代理已被锁定");
|
|
return ServerResponse.createByErrorMsg("注册失败, 代理已被锁定");
|
|
}
|
|
}
|
|
User dbuser = this.userMapper.findByPhone(phone);
|
|
User dbuser = this.userMapper.findByPhone(phone);
|
|
@@ -137,7 +137,7 @@ public class UserServiceImpl implements IUserService {
|
|
user.setPhone(phone);
|
|
user.setPhone(phone);
|
|
user.setUserPwd(userPwd);
|
|
user.setUserPwd(userPwd);
|
|
user.setAccountType(0);
|
|
user.setAccountType(0);
|
|
- user.setIsLock(1);
|
|
|
|
|
|
+ user.setIsLock(0);
|
|
user.setIsActive(0);
|
|
user.setIsActive(0);
|
|
user.setRegTime(new Date());
|
|
user.setRegTime(new Date());
|
|
String uip = IpUtils.getIp(request);
|
|
String uip = IpUtils.getIp(request);
|
|
@@ -296,9 +296,6 @@ public class UserServiceImpl implements IUserService {
|
|
|
|
|
|
|
|
|
|
public ServerResponse getUserInfo(HttpServletRequest request) {
|
|
public ServerResponse getUserInfo(HttpServletRequest request) {
|
|
-// String loginToken = CookieUtils.readLoginToken(request, PropertiesUtil.getProperty("user.cookie.name"));
|
|
|
|
-// String userJson = RedisShardedPoolUtils.get(loginToken);
|
|
|
|
-// User user = (User)JsonUtil.string2Obj(userJson, User.class);
|
|
|
|
User user = getCurrentUser(request);
|
|
User user = getCurrentUser(request);
|
|
User dbuser = this.userMapper.selectByPrimaryKey(user.getId());
|
|
User dbuser = this.userMapper.selectByPrimaryKey(user.getId());
|
|
UserInfoVO userInfoVO = assembleUserInfoVO(dbuser);
|
|
UserInfoVO userInfoVO = assembleUserInfoVO(dbuser);
|
|
@@ -1161,22 +1158,23 @@ public class UserServiceImpl implements IUserService {
|
|
BigDecimal userAllAmt = user.getUserAmt();
|
|
BigDecimal userAllAmt = user.getUserAmt();
|
|
userAllAmt = userAllAmt.add(allProfitAndLose);
|
|
userAllAmt = userAllAmt.add(allProfitAndLose);
|
|
userInfoVO.setUserAmt(userAllAmt);
|
|
userInfoVO.setUserAmt(userAllAmt);
|
|
- userInfoVO.setEnableIndexAmt(user.getEnableIndexAmt());
|
|
|
|
- IndexPositionVO indexPositionVO = this.iUserIndexPositionService.findUserIndexPositionAllProfitAndLose(user.getId());
|
|
|
|
- BigDecimal allIndexProfitAndLose = indexPositionVO.getAllIndexProfitAndLose();
|
|
|
|
- userInfoVO.setAllIndexProfitAndLose(allIndexProfitAndLose);
|
|
|
|
- userInfoVO.setAllIndexFreezAmt(indexPositionVO.getAllIndexFreezAmt());
|
|
|
|
- BigDecimal userAllIndexAmt = user.getUserIndexAmt();
|
|
|
|
- userAllIndexAmt = userAllIndexAmt.add(allIndexProfitAndLose);
|
|
|
|
- userInfoVO.setUserIndexAmt(userAllIndexAmt);
|
|
|
|
- userInfoVO.setEnableFuturesAmt(user.getEnableFutAmt());
|
|
|
|
- FuturesPositionVO futuresPositionVO = this.iUserFuturesPositionService.findUserFuturesPositionAllProfitAndLose(user.getId());
|
|
|
|
- userInfoVO.setAllFuturesFreezAmt(futuresPositionVO.getAllFuturesDepositAmt());
|
|
|
|
- BigDecimal allFuturesProfitAndLose = futuresPositionVO.getAllFuturesProfitAndLose();
|
|
|
|
- userInfoVO.setAllFuturesProfitAndLose(allFuturesProfitAndLose);
|
|
|
|
- BigDecimal userAllFuturesAmt = user.getUserFutAmt();
|
|
|
|
- userAllFuturesAmt = userAllFuturesAmt.add(allFuturesProfitAndLose);
|
|
|
|
- userInfoVO.setUserFuturesAmt(userAllFuturesAmt);
|
|
|
|
|
|
+
|
|
|
|
+// userInfoVO.setEnableIndexAmt(user.getEnableIndexAmt());
|
|
|
|
+// IndexPositionVO indexPositionVO = this.iUserIndexPositionService.findUserIndexPositionAllProfitAndLose(user.getId());
|
|
|
|
+// BigDecimal allIndexProfitAndLose = indexPositionVO.getAllIndexProfitAndLose();
|
|
|
|
+// userInfoVO.setAllIndexProfitAndLose(allIndexProfitAndLose);
|
|
|
|
+// userInfoVO.setAllIndexFreezAmt(indexPositionVO.getAllIndexFreezAmt());
|
|
|
|
+// BigDecimal userAllIndexAmt = user.getUserIndexAmt();
|
|
|
|
+// userAllIndexAmt = userAllIndexAmt.add(allIndexProfitAndLose);
|
|
|
|
+// userInfoVO.setUserIndexAmt(userAllIndexAmt);
|
|
|
|
+// userInfoVO.setEnableFuturesAmt(user.getEnableFutAmt());
|
|
|
|
+// FuturesPositionVO futuresPositionVO = this.iUserFuturesPositionService.findUserFuturesPositionAllProfitAndLose(user.getId());
|
|
|
|
+// userInfoVO.setAllFuturesFreezAmt(futuresPositionVO.getAllFuturesDepositAmt());
|
|
|
|
+// BigDecimal allFuturesProfitAndLose = futuresPositionVO.getAllFuturesProfitAndLose();
|
|
|
|
+// userInfoVO.setAllFuturesProfitAndLose(allFuturesProfitAndLose);
|
|
|
|
+// BigDecimal userAllFuturesAmt = user.getUserFutAmt();
|
|
|
|
+// userAllFuturesAmt = userAllFuturesAmt.add(allFuturesProfitAndLose);
|
|
|
|
+// userInfoVO.setUserFuturesAmt(userAllFuturesAmt);
|
|
// 获取用户是否有绑定银行卡
|
|
// 获取用户是否有绑定银行卡
|
|
if(0 == userMapper.selectHaveBankCardByUserId(userInfoVO.getId())){
|
|
if(0 == userMapper.selectHaveBankCardByUserId(userInfoVO.getId())){
|
|
userInfoVO.setHaveBankCard(false);
|
|
userInfoVO.setHaveBankCard(false);
|