Quellcode durchsuchen

edit agentname phone

liuchaojie vor 4 Jahren
Ursprung
Commit
61cdee96ad

+ 4 - 1
src/main/java/com/xc/pojo/UserRecharge.java

@@ -27,13 +27,15 @@ public class UserRecharge {
     private Date addTime;
     private Date payTime;
     private String agentName;
+    private String phone;
 
     public UserRecharge(){
 
     }
 
     public UserRecharge(Integer id, Integer userId, String nickName, Integer agentId, String orderSn, String paySn, String payChannel
-            , BigDecimal payAmt, Integer orderStatus, String orderDesc, Date addTime, Date payTime, BigDecimal payAmtRMB,String agentName) {
+            , BigDecimal payAmt, Integer orderStatus, String orderDesc, Date addTime, Date payTime, BigDecimal payAmtRMB,String agentName,
+            String phone) {
 
         this.id = id;
 
@@ -60,6 +62,7 @@ public class UserRecharge {
         this.payTime = payTime;
         this.payAmtRMB = payAmtRMB;
         this.agentName= agentName;
+        this.phone = phone;
     }
 
 }

+ 5 - 1
src/main/java/com/xc/pojo/UserWithdraw.java

@@ -28,11 +28,13 @@ public class UserWithdraw {
     private BigDecimal withFee;//提币的美元手续费
     private BigDecimal withFeeRMB;//提币的人民币手续费
     private String withMsg;
+    private String agentName;
+    private String phone;
 
 
     public UserWithdraw(Integer id, Integer userId, String nickName, Integer agentId, BigDecimal withAmt, Date applyTime, Date transTime
             , String withName, String bankNo, String bankName, String bankAddress, Integer withStatus, BigDecimal withFee, String withMsg
-            , BigDecimal withAmtRMB, BigDecimal withFeeRMB) {
+            , BigDecimal withAmtRMB, BigDecimal withFeeRMB,String agentName, String phone) {
         this.id = id;
         this.userId = userId;
         this.nickName = nickName;
@@ -53,6 +55,8 @@ public class UserWithdraw {
         this.withMsg = withMsg;
         this.withAmtRMB = withAmtRMB;
         this.withFeeRMB = withFeeRMB;
+        this.agentName= agentName;
+        this.phone = phone;
     }
 
     public UserWithdraw() {

+ 2 - 3
src/main/java/com/xc/service/impl/PayServiceImpl.java

@@ -71,6 +71,7 @@ public class PayServiceImpl implements IPayService {
         userRecharge.setNickName(user.getRealName());
         userRecharge.setAgentId(user.getAgentId());
         userRecharge.setAgentName(user.getAgentName());
+        userRecharge.setPhone(user.getPhone());
         String ordersn = KeyUtils.getRechargeOrderSn();
         userRecharge.setOrderSn(ordersn);
 
@@ -205,19 +206,17 @@ public class PayServiceImpl implements IPayService {
 
 
         UserRecharge userRecharge = new UserRecharge();
-
         userRecharge.setUserId(user.getId());
         userRecharge.setNickName(user.getRealName());
         userRecharge.setAgentId(user.getAgentId());
         userRecharge.setAgentName(user.getAgentName());
+        userRecharge.setPhone(user.getPhone());
         String ordersn = KeyUtils.getRechargeOrderSn();
         userRecharge.setOrderSn(ordersn);
-
         userRecharge.setPayChannel(payType);
         userRecharge.setPayAmt(new BigDecimal(payAmt));
         userRecharge.setOrderStatus(Integer.valueOf(0));
         userRecharge.setAddTime(new Date());
-
         int insertCount = this.userRechargeMapper.insert(userRecharge);
         if (insertCount > 0) {
             log.info("fly支付,创建支付订单成功!");

+ 2 - 0
src/main/java/com/xc/service/impl/UserRechargeServiceImpl.java

@@ -110,6 +110,7 @@ public class UserRechargeServiceImpl implements IUserRechargeService {
         userRecharge.setNickName(user.getRealName());
         userRecharge.setAgentId(user.getAgentId());
         userRecharge.setAgentName(user.getAgentName());
+        userRecharge.setPhone(user.getPhone());
         String ordersn = KeyUtils.getRechargeOrderSn();
         userRecharge.setOrderSn(ordersn);
         userRecharge.setPayChannel(payType);
@@ -353,6 +354,7 @@ public class UserRechargeServiceImpl implements IUserRechargeService {
         userRecharge.setNickName(user.getRealName());
         userRecharge.setAgentId(user.getAgentId());
         userRecharge.setAgentName(user.getAgentName());
+        userRecharge.setPhone(user.getPhone());
         String ordersn = KeyUtils.getRechargeOrderSn();
         userRecharge.setOrderSn(ordersn);
 

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

@@ -165,13 +165,12 @@ public class UserWithdrawServiceImpl implements IUserWithdrawService {
             rmb = new BigDecimal(amt).multiply(stockCoin.getDefaultRate());
             sxf = stockCoin.getServiceCharge().divide(new BigDecimal(100), 2 ,4).multiply(new BigDecimal(amt));
             rmbSxf = new BigDecimal(amt).multiply(stockCoin.getDefaultRate()).multiply(stockCoin.getServiceCharge()).divide(new BigDecimal(100), 2 ,4);
-
-
             UserWithdraw userWithdraw = new UserWithdraw();
             userWithdraw.setUserId(user.getId());
             userWithdraw.setNickName(user.getRealName());
             userWithdraw.setAgentId(user.getAgentId());
-
+            userWithdraw.setAgentName(user.getAgentName());
+            userWithdraw.setPhone(user.getPhone());
             userWithdraw.setApplyTime(new Date());
             userWithdraw.setWithName(user.getRealName());
             userWithdraw.setBankNo(userBank.getBankNo());
@@ -183,7 +182,6 @@ public class UserWithdrawServiceImpl implements IUserWithdrawService {
             userWithdraw.setWithFee(sxf);
             userWithdraw.setWithAmtRMB(rmb);
             userWithdraw.setWithFeeRMB(rmbSxf);
-
             int insertCount = this.userWithdrawMapper.insert(userWithdraw);
             if (insertCount > 0) {
                 messageService.sendTopicMessage(String.format("%s提币了%s", user.getRealName(), amt));

+ 6 - 2
src/main/java/mappers/UserRechargeMapper.xml

@@ -17,11 +17,12 @@
       <arg column="pay_time" jdbcType="TIMESTAMP" javaType="java.util.Date" />
       <arg column="pay_amt_rMB" jdbcType="DECIMAL" javaType="java.math.BigDecimal" />
       <arg column="agent_name" jdbcType="VARCHAR" javaType="java.lang.String" />
+      <arg column="phone" jdbcType="VARCHAR" javaType="java.lang.String" />
     </constructor>
   </resultMap>
   <sql id="Base_Column_List" >
     id, user_id, nick_name, agent_id, order_sn, pay_sn, pay_channel, pay_amt, order_status,
-    order_desc, add_time, pay_time, pay_amt_rMB ,agent_name
+    order_desc, add_time, pay_time, pay_amt_rMB ,agent_name ,phone
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
     select
@@ -43,7 +44,7 @@
       #{agentId,jdbcType=INTEGER}, #{orderSn,jdbcType=VARCHAR}, #{paySn,jdbcType=VARCHAR},
       #{payChannel,jdbcType=VARCHAR}, #{payAmt,jdbcType=DECIMAL}, #{orderStatus,jdbcType=INTEGER},
       #{orderDesc,jdbcType=VARCHAR}, #{addTime,jdbcType=TIMESTAMP}, #{payTime,jdbcType=TIMESTAMP},
-      #{payAmtRMB,jdbcType=DECIMAL}, #{agentName,jdbcType=VARCHAR}
+      #{payAmtRMB,jdbcType=DECIMAL}, #{agentName,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}
       )
   </insert>
   <insert id="insertSelective" parameterType="com.xc.pojo.UserRecharge" >
@@ -173,6 +174,9 @@
       <if test="agentName != null" >
         agen_name = #{agentName,jdbcType=VARCHAR},
       </if>
+      <if test="phone != null" >
+        phone = #{phone,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>

+ 22 - 13
src/main/java/mappers/UserWithdrawMapper.xml

@@ -19,14 +19,16 @@
       <arg column="with_msg" jdbcType="VARCHAR" javaType="java.lang.String" />
       <arg column="with_amt_rMB" jdbcType="DECIMAL" javaType="java.math.BigDecimal" />
       <arg column="with_fee_rMB" jdbcType="DECIMAL" javaType="java.math.BigDecimal" />
+      <arg column="agent_name" jdbcType="VARCHAR" javaType="java.lang.String" />
+      <arg column="phone" jdbcType="VARCHAR" javaType="java.lang.String" />
     </constructor>
   </resultMap>
   <sql id="Base_Column_List" >
-    id, user_id, nick_name, agent_id, with_amt, apply_time, trans_time, with_name, bank_no, 
-    bank_name, bank_address, with_status, with_fee, with_msg, with_amt_rMB, with_fee_rMB
+    id, user_id, nick_name, agent_id, with_amt, apply_time, trans_time, with_name, bank_no,
+    bank_name, bank_address, with_status, with_fee, with_msg, with_amt_rMB, with_fee_rMB,agent_name ,phone
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
-    select 
+    select
     <include refid="Base_Column_List" />
     from user_withdraw
     where id = #{id,jdbcType=INTEGER}
@@ -36,16 +38,17 @@
     where id = #{id,jdbcType=INTEGER}
   </delete>
   <insert id="insert" parameterType="com.xc.pojo.UserWithdraw" >
-    insert into user_withdraw (id, user_id, nick_name, 
-      agent_id, with_amt, apply_time, 
-      trans_time, with_name, bank_no, 
-      bank_name, bank_address, with_status, 
+    insert into user_withdraw (id, user_id, nick_name,
+      agent_id, with_amt, apply_time,
+      trans_time, with_name, bank_no,
+      bank_name, bank_address, with_status,
       with_fee, with_msg, with_amt_rMB, with_fee_rMB)
-    values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{nickName,jdbcType=VARCHAR}, 
-      #{agentId,jdbcType=INTEGER}, #{withAmt,jdbcType=DECIMAL}, #{applyTime,jdbcType=TIMESTAMP}, 
-      #{transTime,jdbcType=TIMESTAMP}, #{withName,jdbcType=VARCHAR}, #{bankNo,jdbcType=VARCHAR}, 
-      #{bankName,jdbcType=VARCHAR}, #{bankAddress,jdbcType=VARCHAR}, #{withStatus,jdbcType=INTEGER}, 
-      #{withFee,jdbcType=DECIMAL}, #{withMsg,jdbcType=VARCHAR}, #{withAmtRMB,jdbcType=DECIMAL}, #{withFeeRMB,jdbcType=DECIMAL})
+    values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{nickName,jdbcType=VARCHAR},
+      #{agentId,jdbcType=INTEGER}, #{withAmt,jdbcType=DECIMAL}, #{applyTime,jdbcType=TIMESTAMP},
+      #{transTime,jdbcType=TIMESTAMP}, #{withName,jdbcType=VARCHAR}, #{bankNo,jdbcType=VARCHAR},
+      #{bankName,jdbcType=VARCHAR}, #{bankAddress,jdbcType=VARCHAR}, #{withStatus,jdbcType=INTEGER},
+      #{withFee,jdbcType=DECIMAL}, #{withMsg,jdbcType=VARCHAR}, #{withAmtRMB,jdbcType=DECIMAL}, #{withFeeRMB,jdbcType=DECIMAL},
+      #{agentName,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.xc.pojo.UserWithdraw" >
     insert into user_withdraw
@@ -198,6 +201,12 @@
       <if test="withFeeRMB != null" >
         with_fee_rMB = #{withFeeRMB,jdbcType=DECIMAL},
       </if>
+      <if test="agentName != null" >
+        agen_name = #{agentName,jdbcType=VARCHAR},
+      </if>
+      <if test="phone != null" >
+        phone = #{phone,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -302,4 +311,4 @@
   </delete>
 
 
-</mapper>
+</mapper>