Authored by Lixiaodi

Merge branch 'dev_seller_soft_delete' into test6.8.9

  1 +package com.yohoufo.dal.order;
  2 +
  3 +import com.yohoufo.dal.order.model.SellerJoinHistory;
  4 +
  5 +public interface SellerJoinHistoryMapper {
  6 + int deleteByPrimaryKey(Integer id);
  7 +
  8 + int insert(SellerJoinHistory record);
  9 +
  10 + int insertSelective(SellerJoinHistory record);
  11 +
  12 + SellerJoinHistory selectByPrimaryKey(Integer id);
  13 +
  14 + int updateByPrimaryKeySelective(SellerJoinHistory record);
  15 +
  16 + int updateByPrimaryKey(SellerJoinHistory record);
  17 +}
  1 +package com.yohoufo.dal.order.model;
  2 +
  3 +public class SellerJoinHistory {
  4 + private Integer id;
  5 +
  6 + private Integer uid;
  7 +
  8 + private String certNo;
  9 +
  10 + private Integer createTime;
  11 +
  12 + public Integer getId() {
  13 + return id;
  14 + }
  15 +
  16 + public void setId(Integer id) {
  17 + this.id = id;
  18 + }
  19 +
  20 + public Integer getUid() {
  21 + return uid;
  22 + }
  23 +
  24 + public void setUid(Integer uid) {
  25 + this.uid = uid;
  26 + }
  27 +
  28 + public String getCertNo() {
  29 + return certNo;
  30 + }
  31 +
  32 + public void setCertNo(String certNo) {
  33 + this.certNo = certNo == null ? null : certNo.trim();
  34 + }
  35 +
  36 + public Integer getCreateTime() {
  37 + return createTime;
  38 + }
  39 +
  40 + public void setCreateTime(Integer createTime) {
  41 + this.createTime = createTime;
  42 + }
  43 +}
@@ -179,7 +179,7 @@ @@ -179,7 +179,7 @@
179 179
180 180
181 <sql id="Query_Condition_Sql" > 181 <sql id="Query_Condition_Sql" >
182 - uid = #{uid,jdbcType=INTEGER} 182 + uid = #{uid,jdbcType=INTEGER} and del=0
183 </sql> 183 </sql>
184 184
185 <select id="selectCountByUid" resultType="java.lang.Integer" parameterType="java.lang.Integer" > 185 <select id="selectCountByUid" resultType="java.lang.Integer" parameterType="java.lang.Integer" >
@@ -202,10 +202,10 @@ @@ -202,10 +202,10 @@
202 select 202 select
203 uid, sum(amount) as amount 203 uid, sum(amount) as amount
204 from entry_seller_recharge_order 204 from entry_seller_recharge_order
205 - where status = 1 and uid = #{uid,jdbcType=INTEGER} and type in(1,2) 205 + where status = 1 and uid = #{uid,jdbcType=INTEGER} and type in(1,2) and del=0
206 </select> 206 </select>
207 - <delete id="clearUserHistoryData">  
208 - delete from entry_seller_recharge_order 207 + <update id="clearUserHistoryData">
  208 + update entry_seller_recharge_order set del = 1
209 where uid = #{uid} and order_code &lt; #{orderCode} 209 where uid = #{uid} and order_code &lt; #{orderCode}
210 - </delete> 210 + </update>
211 </mapper> 211 </mapper>
  1 +<?xml version="1.0" encoding="UTF-8" ?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3 +<mapper namespace="com.yohoufo.dal.order.SellerJoinHistoryMapper" >
  4 + <resultMap id="BaseResultMap" type="com.yohoufo.dal.order.model.SellerJoinHistory" >
  5 + <id column="id" property="id" jdbcType="INTEGER" />
  6 + <result column="uid" property="uid" jdbcType="INTEGER" />
  7 + <result column="cert_no" property="certNo" jdbcType="VARCHAR" />
  8 + <result column="create_time" property="createTime" jdbcType="INTEGER" />
  9 + </resultMap>
  10 + <sql id="Base_Column_List" >
  11 + id, uid, cert_no, create_time
  12 + </sql>
  13 + <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  14 + select
  15 + <include refid="Base_Column_List" />
  16 + from seller_join_history
  17 + where id = #{id,jdbcType=INTEGER}
  18 + </select>
  19 + <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  20 + delete from seller_join_history
  21 + where id = #{id,jdbcType=INTEGER}
  22 + </delete>
  23 + <insert id="insert" parameterType="com.yohoufo.dal.order.model.SellerJoinHistory" >
  24 + insert into seller_join_history (id, uid, cert_no,
  25 + create_time)
  26 + values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=INTEGER}, #{certNo,jdbcType=VARCHAR},
  27 + #{createTime,jdbcType=INTEGER})
  28 + </insert>
  29 + <insert id="insertSelective" parameterType="com.yohoufo.dal.order.model.SellerJoinHistory" >
  30 + insert into seller_join_history
  31 + <trim prefix="(" suffix=")" suffixOverrides="," >
  32 + <if test="id != null" >
  33 + id,
  34 + </if>
  35 + <if test="uid != null" >
  36 + uid,
  37 + </if>
  38 + <if test="certNo != null" >
  39 + cert_no,
  40 + </if>
  41 + <if test="createTime != null" >
  42 + create_time,
  43 + </if>
  44 + </trim>
  45 + <trim prefix="values (" suffix=")" suffixOverrides="," >
  46 + <if test="id != null" >
  47 + #{id,jdbcType=INTEGER},
  48 + </if>
  49 + <if test="uid != null" >
  50 + #{uid,jdbcType=INTEGER},
  51 + </if>
  52 + <if test="certNo != null" >
  53 + #{certNo,jdbcType=VARCHAR},
  54 + </if>
  55 + <if test="createTime != null" >
  56 + #{createTime,jdbcType=INTEGER},
  57 + </if>
  58 + </trim>
  59 + </insert>
  60 + <update id="updateByPrimaryKeySelective" parameterType="com.yohoufo.dal.order.model.SellerJoinHistory" >
  61 + update seller_join_history
  62 + <set >
  63 + <if test="uid != null" >
  64 + uid = #{uid,jdbcType=INTEGER},
  65 + </if>
  66 + <if test="certNo != null" >
  67 + cert_no = #{certNo,jdbcType=VARCHAR},
  68 + </if>
  69 + <if test="createTime != null" >
  70 + create_time = #{createTime,jdbcType=INTEGER},
  71 + </if>
  72 + </set>
  73 + where id = #{id,jdbcType=INTEGER}
  74 + </update>
  75 + <update id="updateByPrimaryKey" parameterType="com.yohoufo.dal.order.model.SellerJoinHistory" >
  76 + update seller_join_history
  77 + set uid = #{uid,jdbcType=INTEGER},
  78 + cert_no = #{certNo,jdbcType=VARCHAR},
  79 + create_time = #{createTime,jdbcType=INTEGER}
  80 + where id = #{id,jdbcType=INTEGER}
  81 + </update>
  82 +</mapper>
@@ -182,23 +182,23 @@ @@ -182,23 +182,23 @@
182 select 182 select
183 count(*) 183 count(*)
184 from seller_wallet_detail 184 from seller_wallet_detail
185 - where uid = #{uid,jdbcType=INTEGER} and is_batch = 0 and type in (1,31,32,33,34,35,61) 185 + where uid = #{uid,jdbcType=INTEGER} and is_batch = 0 and type in (1,31,32,33,34,35,61) and del=0
186 </select> 186 </select>
187 <select id="selectUserDetail" resultMap="BaseResultMap" > 187 <select id="selectUserDetail" resultMap="BaseResultMap" >
188 select 188 select
189 <include refid="Base_Column_List" /> 189 <include refid="Base_Column_List" />
190 from seller_wallet_detail 190 from seller_wallet_detail
191 - where uid = #{uid,jdbcType=INTEGER} and is_batch = 0 and type in (1,31,32,33,34,35,61) order by id desc limit #{start},#{count} 191 + where uid = #{uid,jdbcType=INTEGER} and is_batch = 0 and type in (1,31,32,33,34,35,61) and del=0 order by id desc limit #{start},#{count}
192 </select> 192 </select>
193 193
194 <select id="selectUserPunishAmount" resultMap="BaseResultMap" > 194 <select id="selectUserPunishAmount" resultMap="BaseResultMap" >
195 select 195 select
196 uid, sum(amount) as amount 196 uid, sum(amount) as amount
197 from seller_wallet_detail 197 from seller_wallet_detail
198 - where uid = #{uid,jdbcType=INTEGER} and is_batch = 0 and type in (31,32,33,34,35) 198 + where uid = #{uid,jdbcType=INTEGER} and is_batch = 0 and type in (31,32,33,34,35) and del=0
199 </select> 199 </select>
200 <delete id="clearUserHistoryData"> 200 <delete id="clearUserHistoryData">
201 - delete from seller_wallet_detail 201 + update seller_wallet_detail set del = 1
202 where uid = #{uid,jdbcType=INTEGER} 202 where uid = #{uid,jdbcType=INTEGER}
203 </delete> 203 </delete>
204 204
@@ -166,7 +166,7 @@ @@ -166,7 +166,7 @@
166 lock_amount = #{lockAmount,jdbcType=DECIMAL}, 166 lock_amount = #{lockAmount,jdbcType=DECIMAL},
167 </if> 167 </if>
168 <if test="joinTimes != null" > 168 <if test="joinTimes != null" >
169 - join_times = #{joinTimes,jdbcType=DECIMAL}, 169 + join_times = #{joinTimes,jdbcType=INTEGER},
170 </if> 170 </if>
171 update_time = #{updateTime,jdbcType=INTEGER}, status=1 171 update_time = #{updateTime,jdbcType=INTEGER}, status=1
172 where uid = #{uid,jdbcType=INTEGER} and type=1 and status=0 172 where uid = #{uid,jdbcType=INTEGER} and type=1 and status=0
@@ -183,4 +183,5 @@ @@ -183,4 +183,5 @@
183 <update id="updateMoneyForTest"> 183 <update id="updateMoneyForTest">
184 update seller_wallet set amount = amount + 10 where id = 3 184 update seller_wallet set amount = amount + 10 where id = 3
185 </update> 185 </update>
  186 +
186 </mapper> 187 </mapper>
@@ -42,11 +42,4 @@ public class MerchantController { @@ -42,11 +42,4 @@ public class MerchantController {
42 return service.getMerchantLowMoneyWarnTip(uid); 42 return service.getMerchantLowMoneyWarnTip(uid);
43 } 43 }
44 44
45 - @RequestMapping(params = "method=ufo.merchant.canRejoin")  
46 - @ResponseBody  
47 - public ApiResponse canRejoin(@RequestParam("uid") int uid) {  
48 - LOG.info("canReJoin uid={}", uid);  
49 - return new ApiResponse(200, "查询成功", service.canRejoin(uid));  
50 - }  
51 -  
52 } 45 }
@@ -381,6 +381,8 @@ public class PaymentServiceImpl implements IPaymentService { @@ -381,6 +381,8 @@ public class PaymentServiceImpl implements IPaymentService {
381 OrdersPayTransfer newTransfer = new OrdersPayTransfer(); 381 OrdersPayTransfer newTransfer = new OrdersPayTransfer();
382 newTransfer.setId(transfer.getId()); 382 newTransfer.setId(transfer.getId());
383 newTransfer.setStatus(1); 383 newTransfer.setStatus(1);
  384 + newTransfer.setAlipayTradeId(transferData.getAlipayTradeId());
  385 + newTransfer.setAlipayTradeResult(JSON.toJSONString(transferData));
384 newTransfer.setUpdateTime(now); 386 newTransfer.setUpdateTime(now);
385 ordersPayTransferMapper.updateByPrimaryKeySelective(newTransfer); 387 ordersPayTransferMapper.updateByPrimaryKeySelective(newTransfer);
386 logger.info("transferSuccess 修改转账状态成功 tradeBillsId={}, tradeBillsId={}, orderCode={}", tradeBillsId, tradeBillsId, orderCode); 388 logger.info("transferSuccess 修改转账状态成功 tradeBillsId={}, tradeBillsId={}, orderCode={}", tradeBillsId, tradeBillsId, orderCode);
@@ -395,6 +397,8 @@ public class PaymentServiceImpl implements IPaymentService { @@ -395,6 +397,8 @@ public class PaymentServiceImpl implements IPaymentService {
395 OrdersPayTransfer newTransfer = new OrdersPayTransfer(); 397 OrdersPayTransfer newTransfer = new OrdersPayTransfer();
396 newTransfer.setId(transfer.getId()); 398 newTransfer.setId(transfer.getId());
397 newTransfer.setStatus(3); 399 newTransfer.setStatus(3);
  400 + newTransfer.setAlipayTradeId(transferData.getAlipayTradeId());
  401 + newTransfer.setAlipayTradeResult(JSON.toJSONString(transferData));
398 newTransfer.setUpdateTime(now); 402 newTransfer.setUpdateTime(now);
399 ordersPayTransferMapper.updateByPrimaryKeySelective(newTransfer); 403 ordersPayTransferMapper.updateByPrimaryKeySelective(newTransfer);
400 logger.info("transferSuccess 转账表(失败)更新成功 tradeBillsId={}, tradeBillsId={}, orderCode={}", tradeBillsId, tradeBillsId, orderCode); 404 logger.info("transferSuccess 转账表(失败)更新成功 tradeBillsId={}, tradeBillsId={}, orderCode={}", tradeBillsId, tradeBillsId, orderCode);
1 -package com.yohoufo.order;  
2 -  
3 -import com.google.common.collect.Lists;  
4 -import com.yohoufo.product.model.PriceTrendResp;  
5 -  
6 -import java.util.List;  
7 -import java.util.stream.Collectors;  
8 -  
9 -/**  
10 - * Created by li.ma on 2019/1/17.  
11 - */  
12 -public class Test11 {  
13 - public static void main(String[] args) {  
14 - List<PriceTrendResp> result = Lists.newArrayList();  
15 -  
16 - PriceTrendResp resp =new PriceTrendResp();  
17 - resp.setEndTime("2019-01-09 00:00:00");  
18 - resp.setProductId(1002512);  
19 - result.add(resp);  
20 -  
21 - PriceTrendResp resp1 =new PriceTrendResp();  
22 - resp1.setEndTime("2019-01-09 00:00:00");  
23 - resp1.setProductId(46346346);  
24 - result.add(resp1);  
25 -  
26 - List<PriceTrendResp> collect = result.stream().distinct().collect(Collectors.toList());  
27 -  
28 - System.out.println(collect);  
29 - }  
30 -}  
@@ -89,6 +89,7 @@ datasources: @@ -89,6 +89,7 @@ datasources:
89 - com.yohoufo.dal.order.SellerLevelFuncMapper 89 - com.yohoufo.dal.order.SellerLevelFuncMapper
90 - com.yohoufo.dal.order.OrderOverTimeMapper 90 - com.yohoufo.dal.order.OrderOverTimeMapper
91 - com.yohoufo.dal.order.BuyerOrderViewMapper 91 - com.yohoufo.dal.order.BuyerOrderViewMapper
  92 + - com.yohoufo.dal.order.SellerJoinHistoryMapper
92 93
93 ufo_promotion: 94 ufo_promotion:
94 servers: 95 servers:
@@ -88,6 +88,7 @@ datasources: @@ -88,6 +88,7 @@ datasources:
88 - com.yohoufo.dal.order.SellerLevelFuncMapper 88 - com.yohoufo.dal.order.SellerLevelFuncMapper
89 - com.yohoufo.dal.order.OrderOverTimeMapper 89 - com.yohoufo.dal.order.OrderOverTimeMapper
90 - com.yohoufo.dal.order.BuyerOrderViewMapper 90 - com.yohoufo.dal.order.BuyerOrderViewMapper
  91 + - com.yohoufo.dal.order.SellerJoinHistoryMapper
91 92
92 ufo_promotion: 93 ufo_promotion:
93 servers: 94 servers: