Showing
11 changed files
with
159 additions
and
47 deletions
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 | +} |
@@ -182,7 +182,7 @@ | @@ -182,7 +182,7 @@ | ||
182 | 182 | ||
183 | 183 | ||
184 | <sql id="Query_Condition_Sql" > | 184 | <sql id="Query_Condition_Sql" > |
185 | - uid = #{uid,jdbcType=INTEGER} | 185 | + uid = #{uid,jdbcType=INTEGER} and del=0 |
186 | </sql> | 186 | </sql> |
187 | 187 | ||
188 | <select id="selectCountByUid" resultType="java.lang.Integer" parameterType="java.lang.Integer" > | 188 | <select id="selectCountByUid" resultType="java.lang.Integer" parameterType="java.lang.Integer" > |
@@ -205,10 +205,10 @@ | @@ -205,10 +205,10 @@ | ||
205 | select | 205 | select |
206 | uid, sum(amount) as amount | 206 | uid, sum(amount) as amount |
207 | from entry_seller_recharge_order | 207 | from entry_seller_recharge_order |
208 | - where status = 1 and uid = #{uid,jdbcType=INTEGER} and type in(1,2) | 208 | + where status = 1 and uid = #{uid,jdbcType=INTEGER} and type in(1,2) and del=0 |
209 | </select> | 209 | </select> |
210 | - <delete id="clearUserHistoryData"> | ||
211 | - delete from entry_seller_recharge_order | 210 | + <update id="clearUserHistoryData"> |
211 | + update entry_seller_recharge_order set del = 1 | ||
212 | where uid = #{uid} and order_code < #{orderCode} | 212 | where uid = #{uid} and order_code < #{orderCode} |
213 | - </delete> | 213 | + </update> |
214 | </mapper> | 214 | </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> |
@@ -185,23 +185,23 @@ | @@ -185,23 +185,23 @@ | ||
185 | select | 185 | select |
186 | count(*) | 186 | count(*) |
187 | from seller_wallet_detail | 187 | from seller_wallet_detail |
188 | - where uid = #{uid,jdbcType=INTEGER} and is_batch = 0 and type in (1,31,32,33,34,35,61) | 188 | + where uid = #{uid,jdbcType=INTEGER} and is_batch = 0 and type in (1,31,32,33,34,35,61) and del=0 |
189 | </select> | 189 | </select> |
190 | <select id="selectUserDetail" resultMap="BaseResultMap" > | 190 | <select id="selectUserDetail" resultMap="BaseResultMap" > |
191 | select | 191 | select |
192 | <include refid="Base_Column_List" /> | 192 | <include refid="Base_Column_List" /> |
193 | from seller_wallet_detail | 193 | from seller_wallet_detail |
194 | - 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} | 194 | + 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} |
195 | </select> | 195 | </select> |
196 | 196 | ||
197 | <select id="selectUserPunishAmount" resultMap="BaseResultMap" > | 197 | <select id="selectUserPunishAmount" resultMap="BaseResultMap" > |
198 | select | 198 | select |
199 | uid, sum(amount) as amount | 199 | uid, sum(amount) as amount |
200 | from seller_wallet_detail | 200 | from seller_wallet_detail |
201 | - where uid = #{uid,jdbcType=INTEGER} and is_batch = 0 and type in (31,32,33,34,35) | 201 | + where uid = #{uid,jdbcType=INTEGER} and is_batch = 0 and type in (31,32,33,34,35) and del=0 |
202 | </select> | 202 | </select> |
203 | <delete id="clearUserHistoryData"> | 203 | <delete id="clearUserHistoryData"> |
204 | - delete from seller_wallet_detail | 204 | + update seller_wallet_detail set del = 1 |
205 | where uid = #{uid,jdbcType=INTEGER} | 205 | where uid = #{uid,jdbcType=INTEGER} |
206 | </delete> | 206 | </delete> |
207 | 207 |
@@ -169,7 +169,7 @@ | @@ -169,7 +169,7 @@ | ||
169 | lock_amount = #{lockAmount,jdbcType=DECIMAL}, | 169 | lock_amount = #{lockAmount,jdbcType=DECIMAL}, |
170 | </if> | 170 | </if> |
171 | <if test="joinTimes != null" > | 171 | <if test="joinTimes != null" > |
172 | - join_times = #{joinTimes,jdbcType=DECIMAL}, | 172 | + join_times = #{joinTimes,jdbcType=INTEGER}, |
173 | </if> | 173 | </if> |
174 | update_time = #{updateTime,jdbcType=INTEGER}, status=1 | 174 | update_time = #{updateTime,jdbcType=INTEGER}, status=1 |
175 | where uid = #{uid,jdbcType=INTEGER} and type=1 and status=0 | 175 | where uid = #{uid,jdbcType=INTEGER} and type=1 and status=0 |
@@ -186,4 +186,5 @@ | @@ -186,4 +186,5 @@ | ||
186 | <update id="updateMoneyForTest"> | 186 | <update id="updateMoneyForTest"> |
187 | update seller_wallet set amount = amount + 10 where id = 3 | 187 | update seller_wallet set amount = amount + 10 where id = 3 |
188 | </update> | 188 | </update> |
189 | + | ||
189 | </mapper> | 190 | </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); |
product/src/test/java/Test11.java
deleted
100644 → 0
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 | -} |
@@ -86,6 +86,7 @@ datasources: | @@ -86,6 +86,7 @@ datasources: | ||
86 | - com.yohoufo.dal.order.SellerLevelFuncMapper | 86 | - com.yohoufo.dal.order.SellerLevelFuncMapper |
87 | - com.yohoufo.dal.order.OrderOverTimeMapper | 87 | - com.yohoufo.dal.order.OrderOverTimeMapper |
88 | - com.yohoufo.dal.order.BuyerOrderViewMapper | 88 | - com.yohoufo.dal.order.BuyerOrderViewMapper |
89 | + - com.yohoufo.dal.order.SellerJoinHistoryMapper | ||
89 | 90 | ||
90 | ufo_promotion: | 91 | ufo_promotion: |
91 | servers: | 92 | servers: |
@@ -85,6 +85,7 @@ datasources: | @@ -85,6 +85,7 @@ datasources: | ||
85 | - com.yohoufo.dal.order.SellerLevelFuncMapper | 85 | - com.yohoufo.dal.order.SellerLevelFuncMapper |
86 | - com.yohoufo.dal.order.OrderOverTimeMapper | 86 | - com.yohoufo.dal.order.OrderOverTimeMapper |
87 | - com.yohoufo.dal.order.BuyerOrderViewMapper | 87 | - com.yohoufo.dal.order.BuyerOrderViewMapper |
88 | + - com.yohoufo.dal.order.SellerJoinHistoryMapper | ||
88 | 89 | ||
89 | ufo_promotion: | 90 | ufo_promotion: |
90 | servers: | 91 | servers: |
-
Please register or login to post a comment