From 4d2d47577b5d6f27288bfcfc60b74435d464dde0 Mon Sep 17 00:00:00 2001
From: zj <1772600164@qq.com>
Date: Sun, 29 Sep 2024 17:33:39 +0800
Subject: [PATCH] 1

---
 src/main/resources/mapper/UserWithdrawMapper.xml               |    6 +++---
 src/main/java/com/nq/utils/task/stock/StockTask.java           |    2 +-
 src/main/java/com/nq/service/impl/UserWithdrawServiceImpl.java |    3 +--
 src/main/java/com/nq/service/impl/UserPositionServiceImpl.java |    2 +-
 src/main/resources/mapper/UserRechargeMapper.xml               |   12 ++++++------
 5 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/src/main/java/com/nq/service/impl/UserPositionServiceImpl.java b/src/main/java/com/nq/service/impl/UserPositionServiceImpl.java
index e8d6776..cea8031 100644
--- a/src/main/java/com/nq/service/impl/UserPositionServiceImpl.java
+++ b/src/main/java/com/nq/service/impl/UserPositionServiceImpl.java
@@ -1255,7 +1255,7 @@
             userPosition.setBuyOrderPrice(userStockSubscribe.getBuyPrice());
             userPosition.setOrderDirection("买涨");
 
-            userPosition.setOrderNum(userStockSubscribe.getApplyNumber());
+            userPosition.setOrderNum(userStockSubscribe.getApplyNumber()*stockSubscribe.getLever().intValue());
 
 
             userPosition.setIsLock(Integer.valueOf(0));
diff --git a/src/main/java/com/nq/service/impl/UserWithdrawServiceImpl.java b/src/main/java/com/nq/service/impl/UserWithdrawServiceImpl.java
index ee3a466..9a72659 100644
--- a/src/main/java/com/nq/service/impl/UserWithdrawServiceImpl.java
+++ b/src/main/java/com/nq/service/impl/UserWithdrawServiceImpl.java
@@ -127,7 +127,7 @@
             String time = iStockConfigServices.queryByKey(EConfigKey.WITHDRAW_TIME_SETTING.getCode()).getCValue();
 
             if (!WithDrawUtils.checkIsWithTime( Integer.parseInt(time.split("-")[0]), Integer.parseInt(time.split("-")[1]))) {
-                return ServerResponse.createByErrorMsg("撤销失败了。提现时间为" + time.split("-")[0] + "点 - " + time.split("-")[1] + "点之间的",request);
+                return ServerResponse.createByErrorMsg("提现失败。提现时间为" + time.split("-")[0] + " - " + time.split("-")[1],request);
             }
             BigDecimal useAmt =  iUserAssetsServices.getAvailableBalance(accsetType,user.getId());
             BigDecimal tAmt = new BigDecimal(amt);
@@ -161,7 +161,6 @@
         }
 
     }
-
 
     public ServerResponse<PageInfo> findUserWithList(String withStatus, HttpServletRequest request, int pageNum, int pageSize) {
 
diff --git a/src/main/java/com/nq/utils/task/stock/StockTask.java b/src/main/java/com/nq/utils/task/stock/StockTask.java
index 9919de7..09597ba 100644
--- a/src/main/java/com/nq/utils/task/stock/StockTask.java
+++ b/src/main/java/com/nq/utils/task/stock/StockTask.java
@@ -61,7 +61,7 @@
     /**
      * 同步系统所需要的股票
      */
-    @Scheduled(cron = "0 0/30 * * * ?")
+    @Scheduled(cron = "0 0/10 * * * ?")
     public void syncINStockData() {
         if (syncINStockData.get()) { // 判断任务是否在处理中
             return;
diff --git a/src/main/resources/mapper/UserRechargeMapper.xml b/src/main/resources/mapper/UserRechargeMapper.xml
index 2f36d6c..ecda781 100644
--- a/src/main/resources/mapper/UserRechargeMapper.xml
+++ b/src/main/resources/mapper/UserRechargeMapper.xml
@@ -219,8 +219,8 @@
     FROM user_recharge s
     join site_pay p
     on s.pay_id = p.id
-    where  agent_id != 1
-    <if test="agentId != null">
+    where  1=1
+    <if test="agentId != null and agentId != ''">
       and ( agent_id = #{agentId}
       or agent_id in (
       select agent_user.id
@@ -229,20 +229,20 @@
       )
       )
     </if>
-    <if test="userId != null">
+    <if test="userId != null and agentId != ''">
       and user_id = #{userId}
     </if>
     <if test="realName != null and realName != '' ">
       and nick_name like CONCAT('%','${realName}','%')
     </if>
-    <if test="state != null">
+    <if test="state != null and agentId != ''">
       and order_status = #{state}
     </if>
 
-    <if test="begin_time != null ">
+    <if test="begin_time != null  and agentId != ''">
       and pay_time <![CDATA[>=]]> #{begin_time}
     </if>
-    <if test="end_time != null ">
+    <if test="end_time != null and agentId != ''">
       and pay_time <![CDATA[<=]]> #{end_time}
     </if>
     ORDER BY s.id DESC
diff --git a/src/main/resources/mapper/UserWithdrawMapper.xml b/src/main/resources/mapper/UserWithdrawMapper.xml
index 6311b02..4720ee1 100644
--- a/src/main/resources/mapper/UserWithdrawMapper.xml
+++ b/src/main/resources/mapper/UserWithdrawMapper.xml
@@ -235,8 +235,8 @@
     SELECT
     <include refid="Base_Column_List"/>
     FROM user_withdraw
-    where agent_id != 1
-      <if test="agentId != null">
+    where 1=1
+      <if test="agentId != null and agentId != ''">
         and ( agent_id = #{agentId}
         or agent_id in (
         select agent_user.id
@@ -245,7 +245,7 @@
         )
         )
       </if>
-      <if test="userId != null">
+      <if test="userId != null and agentId != ''">
         and user_id = #{userId}
       </if>
       <if test="realName != null and realName != '' ">

--
Gitblit v1.9.3