Bläddra i källkod

edit outmoney

liuchaojie 4 år sedan
förälder
incheckning
653b63ddf4

+ 19 - 18
src/main/java/com/xc/service/impl/UserServiceImpl.java

@@ -124,7 +124,7 @@ public class UserServiceImpl implements IUserService {
         if (agentUser == null) {
             return ServerResponse.createByErrorMsg("注册失败, 代理不存在");
         }
-        if (agentUser.getIsLock().intValue() == 1) {
+        if (agentUser.getIsLock() == 1) {
             return ServerResponse.createByErrorMsg("注册失败, 代理已被锁定");
         }
         User dbuser = this.userMapper.findByPhone(phone);
@@ -137,7 +137,7 @@ public class UserServiceImpl implements IUserService {
         user.setPhone(phone);
         user.setUserPwd(userPwd);
         user.setAccountType(0);
-        user.setIsLock(1);
+        user.setIsLock(0);
         user.setIsActive(0);
         user.setRegTime(new Date());
         String uip = IpUtils.getIp(request);
@@ -1161,22 +1161,23 @@ public class UserServiceImpl implements IUserService {
         BigDecimal userAllAmt = user.getUserAmt();
         userAllAmt = userAllAmt.add(allProfitAndLose);
         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())){
             userInfoVO.setHaveBankCard(false);

+ 7 - 14
src/main/java/com/xc/service/impl/UserWithdrawServiceImpl.java

@@ -108,26 +108,19 @@ public class UserWithdrawServiceImpl implements IUserWithdrawService {
             if (userBank == null) {
                 return ServerResponse.createByErrorMsg("未添加银行卡");
             }
-            if (user.getAccountType().intValue() == 1) {
+            if (user.getAccountType() == 1) {
                 return ServerResponse.createByErrorMsg("模拟用户不能出币");
             }
             SiteSetting siteSetting = this.iSiteSettingService.getSiteSetting();
             if ((new BigDecimal(amt)).compareTo(new BigDecimal(siteSetting.getWithMinAmt().intValue())) == -1) {
                 return ServerResponse.createByErrorMsg("出币金额不得低于" + siteSetting.getWithMinAmt() + "元");
             }
-            int with_time_begin = siteSetting.getWithTimeBegin().intValue();
-            int with_time_end = siteSetting.getWithTimeEnd().intValue();
-            if (!WithDrawUtils.checkIsWithTime(with_time_begin, with_time_end)) {
-                return ServerResponse.createByErrorMsg("出币失败,出币时间在" + with_time_begin + "点 - " + with_time_end + "点 之间");
-            }
-            BigDecimal index_user_amt = user.getUserIndexAmt();
-            if (index_user_amt.compareTo(new BigDecimal("0")) == -1) {
-                return ServerResponse.createByErrorMsg("货币资金不能小于0");
-            }
-            BigDecimal futures_user_amt = user.getUserFutAmt();
-            if (futures_user_amt.compareTo(new BigDecimal("0")) == -1) {
-                return ServerResponse.createByErrorMsg("期货资金不能小于0");
-            }
+//            int with_time_begin = siteSetting.getWithTimeBegin().intValue();
+//            int with_time_end = siteSetting.getWithTimeEnd().intValue();
+//            if (!WithDrawUtils.checkIsWithTime(with_time_begin, with_time_end)) {
+//                return ServerResponse.createByErrorMsg("出币失败,出币时间在" + with_time_begin + "点 - " + with_time_end + "点 之间");
+//            }
+
             BigDecimal enable_amt = user.getEnableAmt();
             int compareAmt = enable_amt.compareTo(new BigDecimal(amt));
             if (compareAmt == -1) {