Kaynağa Gözat

edit 出币

liuchaojie 4 yıl önce
ebeveyn
işleme
55ec7bde95

+ 1 - 1
src/main/java/com/xc/controller/agent/AgentWithdrawController.java

@@ -32,7 +32,7 @@ public class AgentWithdrawController {
     IUserWithdrawService iUserWithdrawService;
 
 
-    //分页查询所有出记录信息及模糊查询
+    //分页查询所有出记录信息及模糊查询
     @RequestMapping({"list.do"})
     @ResponseBody
     public ServerResponse list(@RequestParam(value = "pageNum", defaultValue = "1") int pageNum, @RequestParam(value = "pageSize", defaultValue = "8") int pageSize, @RequestParam(value = "realName", required = false) String realName, @RequestParam(value = "state", required = false) Integer state, @RequestParam(value = "agentId", required = false) Integer agentId, HttpServletRequest request) {

+ 1 - 1
src/main/java/com/xc/controller/backend/AdminController.java

@@ -80,7 +80,7 @@ public class AdminController {
         return this.iSiteAdminService.update(siteAdmin);
     }
 
-    //查询首页 资金情况、持仓情况、盈亏信息、提情况、货币信息、代理信息
+    //查询首页 资金情况、持仓情况、盈亏信息、提情况、货币信息、代理信息
     @RequestMapping({"count.do"})
     @ResponseBody
     public ServerResponse count() {

Dosya farkı çok büyük olduğundan ihmal edildi
+ 2 - 2
src/main/java/com/xc/controller/backend/AdminWithDrawController.java


+ 6 - 6
src/main/java/com/xc/controller/protol/UserWithdrawController.java

@@ -30,14 +30,14 @@ public class UserWithdrawController {
     @Autowired
     IUserService iUserService;
 
-    //分页查询所有提记录
+    //分页查询所有提记录
     @RequestMapping({"list.do"})
     @ResponseBody
     public ServerResponse list(@RequestParam(value = "pageNum", defaultValue = "1") int pageNum, @RequestParam(value = "pageSize", defaultValue = "8") int pageSize, @RequestParam(value = "withStatus", required = false) String withStatus, HttpServletRequest request) {
         return this.iUserWithdrawService.findUserWithList(withStatus, request, pageNum, pageSize);
     }
 
-    //用户提
+    //用户提
     @RequestMapping({"outMoney.do"})
     @ResponseBody
     public ServerResponse outMoney(String amt, HttpServletRequest request) {
@@ -45,10 +45,10 @@ public class UserWithdrawController {
         User user = this.iUserService.getCurrentRefreshUser(request);
         try {
             serverResponse = this.iUserWithdrawService.outMoney(amt, user.getWithPwd(), request);
-            messageService.sendTopicMessage(String.format("%s提了%s", user.getRealName(), amt));
+            messageService.sendTopicMessage(String.format("%s提了%s", user.getRealName(), amt));
         } catch (Exception e) {
-            log.error("出异常 e = {}", e);
-            serverResponse = ServerResponse.createByErrorMsg("出异常,请稍后再试");
+            log.error("出异常 e = {}", e);
+            serverResponse = ServerResponse.createByErrorMsg("出异常,请稍后再试");
         }
         return serverResponse;
     }
@@ -58,4 +58,4 @@ public class UserWithdrawController {
     public ServerResponse userCancel(Integer withId) {
         return this.iUserWithdrawService.userCancel(withId);
     }
-}
+}

+ 6 - 6
src/main/java/com/xc/pojo/UserWithdraw.java

@@ -7,7 +7,7 @@ import java.math.BigDecimal;
 import java.util.Date;
 
 /**
- * 提
+ * 提
  */
 @Data
 public class UserWithdraw {
@@ -16,8 +16,8 @@ public class UserWithdraw {
     private Integer userId;
     private String nickName;
     private Integer agentId;
-    private BigDecimal withAmt;//提的美元
-    private BigDecimal withAmtRMB;//提的人民币
+    private BigDecimal withAmt;//提的美元
+    private BigDecimal withAmtRMB;//提的人民币
     private Date applyTime;
     private Date transTime;
     private String withName;
@@ -25,8 +25,8 @@ public class UserWithdraw {
     private String bankName;
     private String bankAddress;
     private Integer withStatus;
-    private BigDecimal withFee;//提的美元手续费
-    private BigDecimal withFeeRMB;//提的人民币手续费
+    private BigDecimal withFee;//提的美元手续费
+    private BigDecimal withFeeRMB;//提的人民币手续费
     private String withMsg;
 
 
@@ -59,4 +59,4 @@ public class UserWithdraw {
     }
 
 
-}
+}

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

@@ -999,9 +999,9 @@ public class UserServiceImpl implements IUserService {
         }
         int delWithdrawCount = this.iUserWithdrawService.deleteByUserId(userId);
         if (delWithdrawCount > 0) {
-            log.info("删除 提 记录成功");
+            log.info("删除 提 记录成功");
         } else {
-            log.info("删除 提 记录失败");
+            log.info("删除 提 记录失败");
         }
         int delCashCount = this.iUserCashDetailService.deleteByUserId(userId);
         if (delCashCount > 0) {
@@ -1060,9 +1060,9 @@ public class UserServiceImpl implements IUserService {
     public ServerResponse findIdWithPwd(String phone) {
         String idWithPwd = userMapper.findIdWithPwd(phone);
         if (idWithPwd==null){
-            return ServerResponse.createByErrorMsg("请设置提密码!");
+            return ServerResponse.createByErrorMsg("请设置提密码!");
         }else {
-            return ServerResponse.createBySuccessMsg("密码已设置,可以提!");
+            return ServerResponse.createBySuccessMsg("密码已设置,可以提!");
         }
     }
 
@@ -1073,7 +1073,7 @@ public class UserServiceImpl implements IUserService {
         }
         String withPwd = userMapper.findWithPwd(with_pwd);
         if (withPwd!=null){
-            return ServerResponse.createByErrorMsg("您已经添加了提密码!");
+            return ServerResponse.createByErrorMsg("您已经添加了提密码!");
         }
         int i = userMapper.updateWithPwd(with_pwd, phone);
         if (i>0){

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

@@ -99,7 +99,7 @@ public class UserWithdrawServiceImpl implements IUserWithdrawService {
             }
             List<UserPosition> userPositions = this.iUserPositionService.findPositionByUserIdAndSellIdIsNull(user.getId());
             if (userPositions.size() > 0) {
-                return ServerResponse.createByErrorMsg("有持仓单不能出");
+                return ServerResponse.createByErrorMsg("有持仓单不能出");
             }
             if (StringUtils.isBlank(user.getRealName()) || StringUtils.isBlank(user.getIdCard())) {
                 return ServerResponse.createByErrorMsg("未实名认证");
@@ -109,16 +109,16 @@ public class UserWithdrawServiceImpl implements IUserWithdrawService {
                 return ServerResponse.createByErrorMsg("未添加银行卡");
             }
             if (user.getAccountType().intValue() == 1) {
-                return ServerResponse.createByErrorMsg("模拟用户不能出");
+                return ServerResponse.createByErrorMsg("模拟用户不能出");
             }
             SiteSetting siteSetting = this.iSiteSettingService.getSiteSetting();
             if ((new BigDecimal(amt)).compareTo(new BigDecimal(siteSetting.getWithMinAmt().intValue())) == -1) {
-                return ServerResponse.createByErrorMsg("出金额不得低于" + siteSetting.getWithMinAmt() + "元");
+                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 + "点 之间");
+                return ServerResponse.createByErrorMsg("出币失败,出币时间在" + with_time_begin + "点 - " + with_time_end + "点 之间");
             }
             BigDecimal index_user_amt = user.getUserIndexAmt();
             if (index_user_amt.compareTo(new BigDecimal("0")) == -1) {
@@ -131,22 +131,22 @@ public class UserWithdrawServiceImpl implements IUserWithdrawService {
             BigDecimal enable_amt = user.getEnableAmt();
             int compareAmt = enable_amt.compareTo(new BigDecimal(amt));
             if (compareAmt == -1) {
-                return ServerResponse.createByErrorMsg("提失败,用户可用资金不足");
+                return ServerResponse.createByErrorMsg("提失败,用户可用资金不足");
             }
             BigDecimal user_all_amt = user.getUserAmt();
             BigDecimal reckon_all_amt = user_all_amt.subtract(new BigDecimal(amt));
             BigDecimal reckon_enable_amt = enable_amt.subtract(new BigDecimal(amt));
             user.setUserAmt(reckon_all_amt);
             user.setEnableAmt(reckon_enable_amt);
-            log.info("用户提{},金额 = {},总资金 = {},可用资金 = {}", new Object[]{user.getId(), amt, user_all_amt, enable_amt});
-            log.info("提后,总金额={},可用资金={}", reckon_all_amt, reckon_enable_amt);
+            log.info("用户提{},金额 = {},总资金 = {},可用资金 = {}", new Object[]{user.getId(), amt, user_all_amt, enable_amt});
+            log.info("提后,总金额={},可用资金={}", reckon_all_amt, reckon_enable_amt);
 
             int updateUserCount = this.userMapper.updateByPrimaryKeySelective(user);
             if (updateUserCount > 0) {
                 log.info("修改用户资金成功");
             } else {
                 log.error("修改用户资金失败");
-                throw new Exception("用户提,修改用户资金失败");
+                throw new Exception("用户提,修改用户资金失败");
             }
 
             BigDecimal rmb = new BigDecimal(BigInteger.ZERO);
@@ -186,13 +186,13 @@ public class UserWithdrawServiceImpl implements IUserWithdrawService {
 
             int insertCount = this.userWithdrawMapper.insert(userWithdraw);
             if (insertCount > 0) {
-                messageService.sendTopicMessage(String.format("%s提了%s", user.getRealName(), amt));
-                return ServerResponse.createBySuccessMsg("提成功");
+                messageService.sendTopicMessage(String.format("%s提了%s", user.getRealName(), amt));
+                return ServerResponse.createBySuccessMsg("提成功");
             }
-            log.error("保存提记录失败");
-            throw new Exception("用户提现,保存提现记录失败");
+            log.error("保存提记录失败");
+            throw new Exception("用户提币,保存提币记录失败");
         } else {
-            return ServerResponse.createByErrorMsg("提密码不正确!!");
+            return ServerResponse.createByErrorMsg("提密码不正确!!");
         }
     }
 
@@ -218,10 +218,10 @@ public class UserWithdrawServiceImpl implements IUserWithdrawService {
             return ServerResponse.createByErrorMsg("当前订单不能取消");
         }
         userWithdraw.setWithStatus(Integer.valueOf(3));
-        userWithdraw.setWithMsg("用户取消出");
+        userWithdraw.setWithMsg("用户取消出");
         int updateCount = this.userWithdrawMapper.updateByPrimaryKeySelective(userWithdraw);
         if (updateCount > 0) {
-            log.info("修改用户提订单 {} 状态成功", withId);
+            log.info("修改用户提订单 {} 状态成功", withId);
             User user = this.userMapper.selectByPrimaryKey(userWithdraw.getUserId());
             user.setUserAmt(user.getUserAmt().add(userWithdraw.getWithAmt()));
             user.setEnableAmt(user.getEnableAmt().add(userWithdraw.getWithAmt()));
@@ -232,7 +232,7 @@ public class UserWithdrawServiceImpl implements IUserWithdrawService {
             }
             return ServerResponse.createByErrorMsg("取消失败");
         }
-        log.info("修改用户提订单 {} 状态失败", withId);
+        log.info("修改用户提订单 {} 状态失败", withId);
         return ServerResponse.createByErrorMsg("取消失败");
     }
 
@@ -302,10 +302,10 @@ public class UserWithdrawServiceImpl implements IUserWithdrawService {
     public ServerResponse updateState(Integer withId, Integer state, String authMsg) throws Exception {
         UserWithdraw userWithdraw = this.userWithdrawMapper.selectByPrimaryKey(withId);
         if (userWithdraw == null) {
-            return ServerResponse.createByErrorMsg("提订单不存在");
+            return ServerResponse.createByErrorMsg("提订单不存在");
         }
         if (userWithdraw.getWithStatus().intValue() != 0) {
-            return ServerResponse.createByErrorMsg("提订单已处理,不要重复操作");
+            return ServerResponse.createByErrorMsg("提订单已处理,不要重复操作");
         }
         if (state.intValue() == 2 && StringUtils.isBlank(authMsg)) {
             return ServerResponse.createByErrorMsg("失败信息必填");
@@ -316,14 +316,14 @@ public class UserWithdrawServiceImpl implements IUserWithdrawService {
                 return ServerResponse.createByErrorMsg("用户不存在");
             }
             BigDecimal user_amt = user.getUserAmt().add(userWithdraw.getWithAmt());
-            log.info("管理员确认提订单失败,返还用户 {} 总资金,原金额 = {} , 返还后 = {}", new Object[]{user.getId(), user.getUserAmt(), user_amt});
+            log.info("管理员确认提订单失败,返还用户 {} 总资金,原金额 = {} , 返还后 = {}", new Object[]{user.getId(), user.getUserAmt(), user_amt});
             user.setUserAmt(user_amt);
             BigDecimal user_enable_amt = user.getEnableAmt().add(userWithdraw.getWithAmt());
-            log.info("管理员确认提订单失败,返还用户 {} 可用资金,原金额 = {} , 返还后 = {}", new Object[]{user.getId(), user.getEnableAmt(), user_enable_amt});
+            log.info("管理员确认提订单失败,返还用户 {} 可用资金,原金额 = {} , 返还后 = {}", new Object[]{user.getId(), user.getEnableAmt(), user_enable_amt});
             user.setEnableAmt(user_enable_amt);
             int updateCount = this.userMapper.updateByPrimaryKeySelective(user);
             if (updateCount > 0) {
-                log.info("提失败,返还用户资金成功!");
+                log.info("提失败,返还用户资金成功!");
             } else {
                 log.error("返还用户资金出错,抛出异常");
                 throw new Exception("修改用户资金出错,抛出异常");