Merge branch 'master' of http://git.yoho.cn/ufo/ufo-platform
Showing
20 changed files
with
978 additions
and
60 deletions
1 | +package com.yoho.order.dal; | ||
2 | + | ||
3 | +import java.util.List; | ||
4 | + | ||
5 | +import org.apache.ibatis.annotations.Param; | ||
6 | + | ||
7 | +import com.yoho.order.model.BuyerOrderGoods; | ||
8 | + | ||
9 | +/** | ||
10 | + * Created by caoyan on 2018/9/12. | ||
11 | + */ | ||
12 | +public interface BuyerOrderGoodsMapper { | ||
13 | + | ||
14 | + List<BuyerOrderGoods> selectByOrderCode(@Param("orderCodeList") List<String> orderCodeList); | ||
15 | +} |
1 | +package com.yoho.order.dal; | ||
2 | + | ||
3 | +import java.util.List; | ||
4 | + | ||
5 | +import org.apache.ibatis.annotations.Param; | ||
6 | + | ||
7 | +import com.yoho.order.model.ExpressInfo; | ||
8 | + | ||
9 | +/** | ||
10 | + * Created by caoyan on 2018/9/12. | ||
11 | + */ | ||
12 | +public interface ExpressInfoMapper { | ||
13 | + | ||
14 | + List<ExpressInfo> selectByOrderCodeList(@Param("orderCodeList") List<String> orderCodeList); | ||
15 | + | ||
16 | + ExpressInfo selectByWaybillCode(@Param("waybillCode") String waybillCode); | ||
17 | +} |
1 | +package com.yoho.order.dal; | ||
2 | + | ||
3 | +import java.util.List; | ||
4 | + | ||
5 | +import org.apache.ibatis.annotations.Param; | ||
6 | + | ||
7 | +import com.yoho.order.model.SellerOrderGoods; | ||
8 | + | ||
9 | +/** | ||
10 | + * Created by caoyan on 2018/9/12. | ||
11 | + */ | ||
12 | +public interface SellerOrderGoodsMapper { | ||
13 | + | ||
14 | + List<SellerOrderGoods> selectByIds(@Param("idList") List<Integer> idList); | ||
15 | +} |
1 | +package com.yoho.order.dal; | ||
2 | + | ||
3 | +import java.util.List; | ||
4 | + | ||
5 | +import org.apache.ibatis.annotations.Param; | ||
6 | + | ||
7 | +import com.yoho.order.model.SellerOrder; | ||
8 | + | ||
9 | +/** | ||
10 | + * Created by caoyan on 2018/9/12. | ||
11 | + */ | ||
12 | +public interface SellerOrderMapper { | ||
13 | + | ||
14 | + List<SellerOrder> selectBySkups(@Param("skupList") List<Integer> skupList); | ||
15 | + | ||
16 | + SellerOrder selectByOrderCode(@Param("orderCode") String orderCode); | ||
17 | +} |
@@ -16,7 +16,7 @@ public class BuyerOrder implements Serializable { | @@ -16,7 +16,7 @@ public class BuyerOrder implements Serializable { | ||
16 | 16 | ||
17 | private Integer uid; | 17 | private Integer uid; |
18 | 18 | ||
19 | - private Integer orderCode; | 19 | + private String orderCode; |
20 | 20 | ||
21 | private Integer sellerUid;//卖家UID | 21 | private Integer sellerUid;//卖家UID |
22 | 22 | ||
@@ -43,8 +43,6 @@ public class BuyerOrder implements Serializable { | @@ -43,8 +43,6 @@ public class BuyerOrder implements Serializable { | ||
43 | 43 | ||
44 | private Integer updateTime;//更新时间 | 44 | private Integer updateTime;//更新时间 |
45 | 45 | ||
46 | - private Byte orderStatus;//1:有效,0:逻辑删除 | ||
47 | - | ||
48 | private String channelNo;//渠道号 | 46 | private String channelNo;//渠道号 |
49 | 47 | ||
50 | public Integer getId() { | 48 | public Integer getId() { |
@@ -63,11 +61,11 @@ public class BuyerOrder implements Serializable { | @@ -63,11 +61,11 @@ public class BuyerOrder implements Serializable { | ||
63 | this.uid = uid; | 61 | this.uid = uid; |
64 | } | 62 | } |
65 | 63 | ||
66 | - public Integer getOrderCode() { | 64 | + public String getOrderCode() { |
67 | return orderCode; | 65 | return orderCode; |
68 | } | 66 | } |
69 | 67 | ||
70 | - public void setOrderCode(Integer orderCode) { | 68 | + public void setOrderCode(String orderCode) { |
71 | this.orderCode = orderCode; | 69 | this.orderCode = orderCode; |
72 | } | 70 | } |
73 | 71 | ||
@@ -151,14 +149,6 @@ public class BuyerOrder implements Serializable { | @@ -151,14 +149,6 @@ public class BuyerOrder implements Serializable { | ||
151 | this.updateTime = updateTime; | 149 | this.updateTime = updateTime; |
152 | } | 150 | } |
153 | 151 | ||
154 | - public Byte getOrderStatus() { | ||
155 | - return orderStatus; | ||
156 | - } | ||
157 | - | ||
158 | - public void setOrderStatus(Byte orderStatus) { | ||
159 | - this.orderStatus = orderStatus; | ||
160 | - } | ||
161 | - | ||
162 | public String getChannelNo() { | 152 | public String getChannelNo() { |
163 | return channelNo; | 153 | return channelNo; |
164 | } | 154 | } |
@@ -169,7 +159,7 @@ public class BuyerOrder implements Serializable { | @@ -169,7 +159,7 @@ public class BuyerOrder implements Serializable { | ||
169 | 159 | ||
170 | @Override | 160 | @Override |
171 | public String toString() { | 161 | public String toString() { |
172 | - return "Brand{" + | 162 | + return "BuyerOrder{" + |
173 | "id=" + id + | 163 | "id=" + id + |
174 | ", uid='" + uid + '\'' + | 164 | ", uid='" + uid + '\'' + |
175 | ", orderCode='" + orderCode + '\'' + | 165 | ", orderCode='" + orderCode + '\'' + |
@@ -183,7 +173,6 @@ public class BuyerOrder implements Serializable { | @@ -183,7 +173,6 @@ public class BuyerOrder implements Serializable { | ||
183 | ", status=" + status + | 173 | ", status=" + status + |
184 | ", createTime=" + createTime + | 174 | ", createTime=" + createTime + |
185 | ", updateTime=" + updateTime + | 175 | ", updateTime=" + updateTime + |
186 | - ", orderStatus=" + orderStatus + | ||
187 | ", channelNo=" + channelNo + | 176 | ", channelNo=" + channelNo + |
188 | '}'; | 177 | '}'; |
189 | } | 178 | } |
1 | +package com.yoho.order.model; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | +import java.math.BigDecimal; | ||
5 | + | ||
6 | +/** | ||
7 | + * @author caoyan | ||
8 | + * @date 2018/9/12 | ||
9 | + */ | ||
10 | +public class BuyerOrderGoods implements Serializable { | ||
11 | + | ||
12 | + | ||
13 | + private static final long serialVersionUID = 2607922995706119816L; | ||
14 | + | ||
15 | + private Integer id; | ||
16 | + | ||
17 | + private Integer uid; | ||
18 | + | ||
19 | + private String orderCode; | ||
20 | + | ||
21 | + private Integer skup; | ||
22 | + | ||
23 | + private BigDecimal goodsPrice;//标价 | ||
24 | + | ||
25 | + private BigDecimal goodsAmount;//成交价 | ||
26 | + | ||
27 | + public Integer getId() { | ||
28 | + return id; | ||
29 | + } | ||
30 | + | ||
31 | + public void setId(Integer id) { | ||
32 | + this.id = id; | ||
33 | + } | ||
34 | + | ||
35 | + public Integer getUid() { | ||
36 | + return uid; | ||
37 | + } | ||
38 | + | ||
39 | + public void setUid(Integer uid) { | ||
40 | + this.uid = uid; | ||
41 | + } | ||
42 | + | ||
43 | + public String getOrderCode() { | ||
44 | + return orderCode; | ||
45 | + } | ||
46 | + | ||
47 | + public void setOrderCode(String orderCode) { | ||
48 | + this.orderCode = orderCode; | ||
49 | + } | ||
50 | + | ||
51 | + public Integer getSkup() { | ||
52 | + return skup; | ||
53 | + } | ||
54 | + | ||
55 | + public void setSkup(Integer skup) { | ||
56 | + this.skup = skup; | ||
57 | + } | ||
58 | + | ||
59 | + public BigDecimal getGoodsPrice() { | ||
60 | + return goodsPrice; | ||
61 | + } | ||
62 | + | ||
63 | + public void setGoodsPrice(BigDecimal goodsPrice) { | ||
64 | + this.goodsPrice = goodsPrice; | ||
65 | + } | ||
66 | + | ||
67 | + public BigDecimal getGoodsAmount() { | ||
68 | + return goodsAmount; | ||
69 | + } | ||
70 | + | ||
71 | + public void setGoodsAmount(BigDecimal goodsAmount) { | ||
72 | + this.goodsAmount = goodsAmount; | ||
73 | + } | ||
74 | + | ||
75 | + @Override | ||
76 | + public String toString() { | ||
77 | + return "BuyerOrderGoods{" + | ||
78 | + "id=" + id + | ||
79 | + ", uid='" + uid + '\'' + | ||
80 | + ", orderCode='" + orderCode + '\'' + | ||
81 | + ", skup='" + skup + '\'' + | ||
82 | + ", goodsPrice=" + goodsPrice + | ||
83 | + ", goodsAmount=" + goodsAmount + | ||
84 | + '}'; | ||
85 | + } | ||
86 | +} |
@@ -14,8 +14,102 @@ public class BuyerOrderReq extends PageRequestBO{ | @@ -14,8 +14,102 @@ public class BuyerOrderReq extends PageRequestBO{ | ||
14 | */ | 14 | */ |
15 | private static final long serialVersionUID = 1620427808531296022L; | 15 | private static final long serialVersionUID = 1620427808531296022L; |
16 | 16 | ||
17 | + private String orderCode; | ||
18 | + | ||
19 | + private Integer uid; | ||
20 | + | ||
21 | + private Integer sellerUid; | ||
22 | + | ||
23 | + private String sellerWaybillCode; | ||
24 | + | ||
25 | + private Integer productId; | ||
26 | + | ||
27 | + private Integer storageId; | ||
28 | + | ||
29 | + private String mobile; | ||
30 | + | ||
31 | + private Integer skup; | ||
32 | + | ||
33 | + private Byte status; | ||
34 | + | ||
17 | private List<Byte> statusList; | 35 | private List<Byte> statusList; |
18 | 36 | ||
37 | + private String statusStr; | ||
38 | + | ||
39 | + private Integer depotNo; | ||
40 | + | ||
41 | + public String getOrderCode() { | ||
42 | + return orderCode; | ||
43 | + } | ||
44 | + | ||
45 | + public void setOrderCode(String orderCode) { | ||
46 | + this.orderCode = orderCode; | ||
47 | + } | ||
48 | + | ||
49 | + public Integer getUid() { | ||
50 | + return uid; | ||
51 | + } | ||
52 | + | ||
53 | + public void setUid(Integer uid) { | ||
54 | + this.uid = uid; | ||
55 | + } | ||
56 | + | ||
57 | + public Integer getSellerUid() { | ||
58 | + return sellerUid; | ||
59 | + } | ||
60 | + | ||
61 | + public void setSellerUid(Integer sellerUid) { | ||
62 | + this.sellerUid = sellerUid; | ||
63 | + } | ||
64 | + | ||
65 | + public String getSellerWaybillCode() { | ||
66 | + return sellerWaybillCode; | ||
67 | + } | ||
68 | + | ||
69 | + public void setSellerWaybillCode(String sellerWaybillCode) { | ||
70 | + this.sellerWaybillCode = sellerWaybillCode; | ||
71 | + } | ||
72 | + | ||
73 | + public Integer getProductId() { | ||
74 | + return productId; | ||
75 | + } | ||
76 | + | ||
77 | + public void setProductId(Integer productId) { | ||
78 | + this.productId = productId; | ||
79 | + } | ||
80 | + | ||
81 | + public Integer getStorageId() { | ||
82 | + return storageId; | ||
83 | + } | ||
84 | + | ||
85 | + public void setStorageId(Integer storageId) { | ||
86 | + this.storageId = storageId; | ||
87 | + } | ||
88 | + | ||
89 | + public String getMobile() { | ||
90 | + return mobile; | ||
91 | + } | ||
92 | + | ||
93 | + public void setMobile(String mobile) { | ||
94 | + this.mobile = mobile; | ||
95 | + } | ||
96 | + | ||
97 | + public Integer getSkup() { | ||
98 | + return skup; | ||
99 | + } | ||
100 | + | ||
101 | + public void setSkup(Integer skup) { | ||
102 | + this.skup = skup; | ||
103 | + } | ||
104 | + | ||
105 | + public Byte getStatus() { | ||
106 | + return status; | ||
107 | + } | ||
108 | + | ||
109 | + public void setStatus(Byte status) { | ||
110 | + this.status = status; | ||
111 | + } | ||
112 | + | ||
19 | public List<Byte> getStatusList() { | 113 | public List<Byte> getStatusList() { |
20 | return statusList; | 114 | return statusList; |
21 | } | 115 | } |
@@ -24,10 +118,35 @@ public class BuyerOrderReq extends PageRequestBO{ | @@ -24,10 +118,35 @@ public class BuyerOrderReq extends PageRequestBO{ | ||
24 | this.statusList = statusList; | 118 | this.statusList = statusList; |
25 | } | 119 | } |
26 | 120 | ||
27 | - @Override | 121 | + public String getStatusStr() { |
122 | + return statusStr; | ||
123 | + } | ||
124 | + | ||
125 | + public void setStatusStr(String statusStr) { | ||
126 | + this.statusStr = statusStr; | ||
127 | + } | ||
128 | + | ||
129 | + public Integer getDepotNo() { | ||
130 | + return depotNo; | ||
131 | + } | ||
132 | + | ||
133 | + public void setDepotNo(Integer depotNo) { | ||
134 | + this.depotNo = depotNo; | ||
135 | + } | ||
136 | + | ||
28 | public String toString() { | 137 | public String toString() { |
29 | return "BuyerOrderListReq{" + | 138 | return "BuyerOrderListReq{" + |
139 | + "orderCode=" + orderCode + | ||
140 | + "uid=" + uid + | ||
141 | + "sellerUid=" + sellerUid + | ||
142 | + "sellerWaybillCode=" + sellerWaybillCode + | ||
143 | + "productId=" + productId + | ||
144 | + "storageId=" + storageId + | ||
145 | + "skup=" + skup + | ||
146 | + "status=" + status + | ||
30 | "statusList=" + statusList + | 147 | "statusList=" + statusList + |
148 | + "statusStr=" + statusStr + | ||
149 | + "depotNo=" + depotNo + | ||
31 | '}'; | 150 | '}'; |
32 | } | 151 | } |
33 | } | 152 | } |
@@ -15,7 +15,7 @@ public class ExpressInfo implements Serializable { | @@ -15,7 +15,7 @@ public class ExpressInfo implements Serializable { | ||
15 | 15 | ||
16 | private Integer uid; | 16 | private Integer uid; |
17 | 17 | ||
18 | - private Integer orderCode; | 18 | + private String orderCode; |
19 | 19 | ||
20 | private String waybillCode;//运单号 | 20 | private String waybillCode;//运单号 |
21 | 21 | ||
@@ -50,11 +50,11 @@ public class ExpressInfo implements Serializable { | @@ -50,11 +50,11 @@ public class ExpressInfo implements Serializable { | ||
50 | this.uid = uid; | 50 | this.uid = uid; |
51 | } | 51 | } |
52 | 52 | ||
53 | - public Integer getOrderCode() { | 53 | + public String getOrderCode() { |
54 | return orderCode; | 54 | return orderCode; |
55 | } | 55 | } |
56 | 56 | ||
57 | - public void setOrderCode(Integer orderCode) { | 57 | + public void setOrderCode(String orderCode) { |
58 | this.orderCode = orderCode; | 58 | this.orderCode = orderCode; |
59 | } | 59 | } |
60 | 60 |
@@ -16,7 +16,7 @@ public class SellerOrder implements Serializable { | @@ -16,7 +16,7 @@ public class SellerOrder implements Serializable { | ||
16 | 16 | ||
17 | private Integer uid; | 17 | private Integer uid; |
18 | 18 | ||
19 | - private Integer orderCode; | 19 | + private String orderCode; |
20 | 20 | ||
21 | private Integer skup;//映射ufo_product.storage_price.id | 21 | private Integer skup;//映射ufo_product.storage_price.id |
22 | 22 | ||
@@ -56,11 +56,11 @@ public class SellerOrder implements Serializable { | @@ -56,11 +56,11 @@ public class SellerOrder implements Serializable { | ||
56 | this.uid = uid; | 56 | this.uid = uid; |
57 | } | 57 | } |
58 | 58 | ||
59 | - public Integer getOrderCode() { | 59 | + public String getOrderCode() { |
60 | return orderCode; | 60 | return orderCode; |
61 | } | 61 | } |
62 | 62 | ||
63 | - public void setOrderCode(Integer orderCode) { | 63 | + public void setOrderCode(String orderCode) { |
64 | this.orderCode = orderCode; | 64 | this.orderCode = orderCode; |
65 | } | 65 | } |
66 | 66 |
@@ -12,15 +12,19 @@ public class SellerOrderGoods implements Serializable { | @@ -12,15 +12,19 @@ public class SellerOrderGoods implements Serializable { | ||
12 | 12 | ||
13 | private Integer id; | 13 | private Integer id; |
14 | 14 | ||
15 | + private Integer uid; | ||
16 | + | ||
15 | private Integer productId; | 17 | private Integer productId; |
16 | 18 | ||
17 | private String productName; | 19 | private String productName; |
18 | 20 | ||
19 | - private Integer skup; | 21 | + private Integer storageId; |
20 | 22 | ||
21 | private Integer depotNo; | 23 | private Integer depotNo; |
22 | 24 | ||
23 | - private Integer goodsId; | 25 | + private Integer sizeId; |
26 | + | ||
27 | + private String sizeName; | ||
24 | 28 | ||
25 | private Integer colorId; | 29 | private Integer colorId; |
26 | 30 | ||
@@ -30,6 +34,10 @@ public class SellerOrderGoods implements Serializable { | @@ -30,6 +34,10 @@ public class SellerOrderGoods implements Serializable { | ||
30 | 34 | ||
31 | private Byte status; | 35 | private Byte status; |
32 | 36 | ||
37 | + private Integer imageId; | ||
38 | + | ||
39 | + private String imageUrl; | ||
40 | + | ||
33 | public Integer getId() { | 41 | public Integer getId() { |
34 | return id; | 42 | return id; |
35 | } | 43 | } |
@@ -38,6 +46,14 @@ public class SellerOrderGoods implements Serializable { | @@ -38,6 +46,14 @@ public class SellerOrderGoods implements Serializable { | ||
38 | this.id = id; | 46 | this.id = id; |
39 | } | 47 | } |
40 | 48 | ||
49 | + public Integer getUid() { | ||
50 | + return uid; | ||
51 | + } | ||
52 | + | ||
53 | + public void setUid(Integer uid) { | ||
54 | + this.uid = uid; | ||
55 | + } | ||
56 | + | ||
41 | public Integer getProductId() { | 57 | public Integer getProductId() { |
42 | return productId; | 58 | return productId; |
43 | } | 59 | } |
@@ -54,12 +70,12 @@ public class SellerOrderGoods implements Serializable { | @@ -54,12 +70,12 @@ public class SellerOrderGoods implements Serializable { | ||
54 | this.productName = productName; | 70 | this.productName = productName; |
55 | } | 71 | } |
56 | 72 | ||
57 | - public Integer getSkup() { | ||
58 | - return skup; | 73 | + public Integer getStorageId() { |
74 | + return storageId; | ||
59 | } | 75 | } |
60 | 76 | ||
61 | - public void setSkup(Integer skup) { | ||
62 | - this.skup = skup; | 77 | + public void setStorageId(Integer storageId) { |
78 | + this.storageId = storageId; | ||
63 | } | 79 | } |
64 | 80 | ||
65 | public Integer getDepotNo() { | 81 | public Integer getDepotNo() { |
@@ -70,12 +86,20 @@ public class SellerOrderGoods implements Serializable { | @@ -70,12 +86,20 @@ public class SellerOrderGoods implements Serializable { | ||
70 | this.depotNo = depotNo; | 86 | this.depotNo = depotNo; |
71 | } | 87 | } |
72 | 88 | ||
73 | - public Integer getGoodsId() { | ||
74 | - return goodsId; | 89 | + public Integer getSizeId() { |
90 | + return sizeId; | ||
75 | } | 91 | } |
76 | 92 | ||
77 | - public void setGoodsId(Integer goodsId) { | ||
78 | - this.goodsId = goodsId; | 93 | + public void setSizeId(Integer sizeId) { |
94 | + this.sizeId = sizeId; | ||
95 | + } | ||
96 | + | ||
97 | + public String getSizeName() { | ||
98 | + return sizeName; | ||
99 | + } | ||
100 | + | ||
101 | + public void setSizeName(String sizeName) { | ||
102 | + this.sizeName = sizeName; | ||
79 | } | 103 | } |
80 | 104 | ||
81 | public Integer getColorId() { | 105 | public Integer getColorId() { |
@@ -109,4 +133,21 @@ public class SellerOrderGoods implements Serializable { | @@ -109,4 +133,21 @@ public class SellerOrderGoods implements Serializable { | ||
109 | public void setStatus(Byte status) { | 133 | public void setStatus(Byte status) { |
110 | this.status = status; | 134 | this.status = status; |
111 | } | 135 | } |
136 | + | ||
137 | + public Integer getImageId() { | ||
138 | + return imageId; | ||
139 | + } | ||
140 | + | ||
141 | + public void setImageId(Integer imageId) { | ||
142 | + this.imageId = imageId; | ||
143 | + } | ||
144 | + | ||
145 | + public String getImageUrl() { | ||
146 | + return imageUrl; | ||
147 | + } | ||
148 | + | ||
149 | + public void setImageUrl(String imageUrl) { | ||
150 | + this.imageUrl = imageUrl; | ||
151 | + } | ||
152 | + | ||
112 | } | 153 | } |
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.yoho.order.dal.BuyerOrderGoodsMapper"> | ||
4 | + <resultMap id="BaseResultMap" type="com.yoho.order.model.BuyerOrderGoods"> | ||
5 | + <result column="id" property="id" jdbcType="INTEGER" /> | ||
6 | + <result column="uid" property="uid" jdbcType="INTEGER" /> | ||
7 | + <result column="order_code" property="orderCode" jdbcType="BIGINT" /> | ||
8 | + <result column="skup" property="skup" jdbcType="INTEGER" /> | ||
9 | + <result column="goods_price" property="goodsPrice" jdbcType="DECIMAL" /> | ||
10 | + <result column="goods_amount" property="goodsAmount" jdbcType="DECIMAL" /> | ||
11 | + </resultMap> | ||
12 | + | ||
13 | + <sql id="Base_Column_List"> | ||
14 | + id, uid, order_code, skup, goods_price, goods_amount | ||
15 | + </sql> | ||
16 | + | ||
17 | + <select id="selectById" resultMap="BaseResultMap"> | ||
18 | + select <include refid="Base_Column_List" /> | ||
19 | + from buyer_order_goods where id = #{id} | ||
20 | + </select> | ||
21 | + | ||
22 | + <select id="selectByOrderCode" resultMap="BaseResultMap"> | ||
23 | + select <include refid="Base_Column_List" /> | ||
24 | + from buyer_order_goods | ||
25 | + where order_code in | ||
26 | + <foreach collection="orderCodeList" item="orderCode" open="(" close=")" separator=","> | ||
27 | + #{orderCode} | ||
28 | + </foreach> | ||
29 | + </select> | ||
30 | + | ||
31 | + | ||
32 | +</mapper> |
@@ -15,13 +15,12 @@ | @@ -15,13 +15,12 @@ | ||
15 | <result column="status" property="status" jdbcType="TINYINT" /> | 15 | <result column="status" property="status" jdbcType="TINYINT" /> |
16 | <result column="create_time" property="createTime" jdbcType="INTEGER" /> | 16 | <result column="create_time" property="createTime" jdbcType="INTEGER" /> |
17 | <result column="update_time" property="updateTime" jdbcType="INTEGER" /> | 17 | <result column="update_time" property="updateTime" jdbcType="INTEGER" /> |
18 | - <result column="order_status" property="orderStatus" jdbcType="TINYINT" /> | ||
19 | <result column="channel_no" property="channelNo" jdbcType="VARCHAR" /> | 18 | <result column="channel_no" property="channelNo" jdbcType="VARCHAR" /> |
20 | </resultMap> | 19 | </resultMap> |
21 | 20 | ||
22 | <sql id="Base_Column_List"> | 21 | <sql id="Base_Column_List"> |
23 | id, uid, order_code, seller_uid, client_type, payment, payment_type, is_cancel, | 22 | id, uid, order_code, seller_uid, client_type, payment, payment_type, is_cancel, |
24 | - amount, ship_fee, status, create_time, update_time, order_status, channel_no | 23 | + amount, ship_fee, status, create_time, update_time, channel_no |
25 | </sql> | 24 | </sql> |
26 | 25 | ||
27 | <select id="selectById" resultMap="BaseResultMap"> | 26 | <select id="selectById" resultMap="BaseResultMap"> |
@@ -38,27 +37,63 @@ | @@ -38,27 +37,63 @@ | ||
38 | </select> | 37 | </select> |
39 | 38 | ||
40 | <sql id="Query_Order_Sql" > | 39 | <sql id="Query_Order_Sql" > |
41 | - <if test="buyerOrderReq.statusList != null and buyerOrderReq.statusList.size() > 0"> | ||
42 | - and status in | 40 | + <if test="buyerOrderReq.statusList != null and buyerOrderReq.statusList.size() >0"> |
41 | + and a.status in | ||
43 | <foreach collection="buyerOrderReq.statusList" item="status" open="(" close=")" separator=","> | 42 | <foreach collection="buyerOrderReq.statusList" item="status" open="(" close=")" separator=","> |
44 | #{status} | 43 | #{status} |
45 | </foreach> | 44 | </foreach> |
46 | </if> | 45 | </if> |
46 | + <if test="buyerOrderReq.orderCode != null and buyerOrderReq.orderCode != '' "> | ||
47 | + and a.order_code = #{buyerOrderReq.orderCode} | ||
48 | + </if> | ||
49 | + <if test="buyerOrderReq.uid != null and buyerOrderReq.uid != 0 "> | ||
50 | + and a.uid = #{buyerOrderReq.uid} | ||
51 | + </if> | ||
52 | + <if test="buyerOrderReq.status != null "> | ||
53 | + and a.status = #{buyerOrderReq.status} | ||
54 | + </if> | ||
55 | + <if test="buyerOrderReq.productId != null and buyerOrderReq.productId != 0 "> | ||
56 | + and c.product_id = #{buyerOrderReq.productId} | ||
57 | + </if> | ||
58 | + <if test="buyerOrderReq.storageId != null and buyerOrderReq.storageId != 0 "> | ||
59 | + and c.storage_id = #{buyerOrderReq.storageId} | ||
60 | + </if> | ||
61 | + <if test="buyerOrderReq.skup != null and buyerOrderReq.skup != 0 "> | ||
62 | + and c.id = #{buyerOrderReq.skup} | ||
63 | + </if> | ||
64 | + <if test="buyerOrderReq.depotNo != null and buyerOrderReq.depotNo != 0 "> | ||
65 | + and c.depot_no = #{buyerOrderReq.depotNo} | ||
66 | + </if> | ||
67 | + <if test="buyerOrderReq.mobile != null and buyerOrderReq.mobile != '' "> | ||
68 | + and (a.uid = #{buyerOrderReq.sellerUid} or a.seller_uid = #{buyerOrderReq.sellerUid}) | ||
69 | + </if> | ||
47 | </sql> | 70 | </sql> |
48 | 71 | ||
49 | <select id="selectTotalByCondition" resultType="java.lang.Integer" parameterType="com.yoho.order.model.BuyerOrderReq"> | 72 | <select id="selectTotalByCondition" resultType="java.lang.Integer" parameterType="com.yoho.order.model.BuyerOrderReq"> |
50 | - select count(1) | ||
51 | - from buyer_order | 73 | + select count(a.id) |
74 | + from buyer_order a | ||
75 | + <if test="(buyerOrderReq.depotNo != null) or (buyerOrderReq.productId != null) or (buyerOrderReq.storageId != null) or (buyerOrderReq.skup != null)"> | ||
76 | + LEFT JOIN buyer_order_goods b | ||
77 | + ON( b.order_code=a.order_code) | ||
78 | + LEFT JOIN seller_order_goods c | ||
79 | + ON( c.id=b.skup) | ||
80 | + </if> | ||
52 | where 1=1 | 81 | where 1=1 |
53 | <include refid="Query_Order_Sql" /> | 82 | <include refid="Query_Order_Sql" /> |
54 | </select> | 83 | </select> |
55 | 84 | ||
56 | <select id="selectByCondition" resultMap="BaseResultMap" parameterType="com.yoho.order.model.BuyerOrderReq"> | 85 | <select id="selectByCondition" resultMap="BaseResultMap" parameterType="com.yoho.order.model.BuyerOrderReq"> |
57 | - select <include refid="Base_Column_List" /> | ||
58 | - from buyer_order | 86 | + select a.* |
87 | + from buyer_order a | ||
88 | + <if test="(buyerOrderReq.productId != null) or (buyerOrderReq.storageId != null) or (buyerOrderReq.skup != null)"> | ||
89 | + LEFT JOIN buyer_order_goods b | ||
90 | + ON( b.order_code=a.order_code) | ||
91 | + LEFT JOIN seller_order_goods c | ||
92 | + ON( c.id=b.skup) | ||
93 | + </if> | ||
59 | where 1=1 | 94 | where 1=1 |
60 | <include refid="Query_Order_Sql" /> | 95 | <include refid="Query_Order_Sql" /> |
61 | - order by create_time desc | 96 | + order by a.create_time desc |
62 | <if test="buyerOrderReq.start!=null and buyerOrderReq.size != null"> | 97 | <if test="buyerOrderReq.start!=null and buyerOrderReq.size != null"> |
63 | limit #{buyerOrderReq.start},#{buyerOrderReq.size} | 98 | limit #{buyerOrderReq.start},#{buyerOrderReq.size} |
64 | </if> | 99 | </if> |
1 | <?xml version="1.0" encoding="UTF-8" ?> | 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" > | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
3 | -<mapper namespace="com.yoho.ufo.dal.ExpressInfoMapper"> | 3 | +<mapper namespace="com.yoho.order.dal.ExpressInfoMapper"> |
4 | <resultMap id="BaseResultMap" type="com.yoho.order.model.ExpressInfo"> | 4 | <resultMap id="BaseResultMap" type="com.yoho.order.model.ExpressInfo"> |
5 | <result column="id" property="id" jdbcType="INTEGER" /> | 5 | <result column="id" property="id" jdbcType="INTEGER" /> |
6 | <result column="uid" property="uid" jdbcType="INTEGER" /> | 6 | <result column="uid" property="uid" jdbcType="INTEGER" /> |
@@ -19,9 +19,17 @@ | @@ -19,9 +19,17 @@ | ||
19 | create_time, express_type, state | 19 | create_time, express_type, state |
20 | </sql> | 20 | </sql> |
21 | 21 | ||
22 | - <select id="selectById" resultMap="BaseResultMap"> | 22 | + <select id="selectByOrderCodeList" resultMap="BaseResultMap"> |
23 | select <include refid="Base_Column_List" /> | 23 | select <include refid="Base_Column_List" /> |
24 | - from express_info where id = #{id} | 24 | + from express_info where order_code in |
25 | + <foreach collection="orderCodeList" item="orderCode" open="(" close=")" separator=","> | ||
26 | + #{orderCode} | ||
27 | + </foreach> | ||
28 | + </select> | ||
29 | + | ||
30 | + <select id="selectByWaybillCode" resultMap="BaseResultMap"> | ||
31 | + select <include refid="Base_Column_List" /> | ||
32 | + from express_info where waybill_code = #{waybillCode} | ||
25 | </select> | 33 | </select> |
26 | 34 | ||
27 | </mapper> | 35 | </mapper> |
1 | <?xml version="1.0" encoding="UTF-8" ?> | 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" > | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
3 | -<mapper namespace="com.yoho.ufo.dal.SellerOrderGoodsMapper"> | 3 | +<mapper namespace="com.yoho.order.dal.SellerOrderGoodsMapper"> |
4 | <resultMap id="BaseResultMap" type="com.yoho.order.model.SellerOrderGoods"> | 4 | <resultMap id="BaseResultMap" type="com.yoho.order.model.SellerOrderGoods"> |
5 | <result column="id" property="id" jdbcType="INTEGER" /> | 5 | <result column="id" property="id" jdbcType="INTEGER" /> |
6 | + <result column="uid" property="uid" jdbcType="INTEGER" /> | ||
6 | <result column="product_id" property="productId" jdbcType="INTEGER" /> | 7 | <result column="product_id" property="productId" jdbcType="INTEGER" /> |
7 | <result column="product_name" property="productName" jdbcType="VARCHAR" /> | 8 | <result column="product_name" property="productName" jdbcType="VARCHAR" /> |
8 | - <result column="skup" property="skup" jdbcType="INTEGER" /> | 9 | + <result column="storage_id" property="storageId" jdbcType="INTEGER" /> |
9 | <result column="depot_no" property="depotNo" jdbcType="INTEGER" /> | 10 | <result column="depot_no" property="depotNo" jdbcType="INTEGER" /> |
10 | - <result column="goods_id" property="goodsId" jdbcType="INTEGER" /> | 11 | + <result column="size_id" property="sizeId" jdbcType="INTEGER" /> |
12 | + <result column="size_name" property="sizeName" jdbcType="VARCHAR" /> | ||
11 | <result column="color_id" property="colorId" jdbcType="SMALLINT" /> | 13 | <result column="color_id" property="colorId" jdbcType="SMALLINT" /> |
12 | <result column="color_name" property="colorName" jdbcType="VARCHAR" /> | 14 | <result column="color_name" property="colorName" jdbcType="VARCHAR" /> |
13 | <result column="goods_price" property="goodsPrice" jdbcType="DECIMAL" /> | 15 | <result column="goods_price" property="goodsPrice" jdbcType="DECIMAL" /> |
14 | <result column="status" property="status" jdbcType="TINYINT" /> | 16 | <result column="status" property="status" jdbcType="TINYINT" /> |
17 | + <result column="image_id" property="imageId" jdbcType="INTEGER" /> | ||
18 | + <result column="image_url" property="imageUrl" jdbcType="VARCHAR" /> | ||
15 | </resultMap> | 19 | </resultMap> |
16 | 20 | ||
17 | <sql id="Base_Column_List"> | 21 | <sql id="Base_Column_List"> |
18 | - id, product_id, product_name, skup, depot_no, goods_id, color_id, color_name, goods_price, status | 22 | + id, uid, product_id, product_name, storage_id, depot_no, size_id, size_name, color_id, |
23 | + color_name, goods_price, status, image_id, image_url | ||
19 | </sql> | 24 | </sql> |
20 | 25 | ||
21 | - <select id="selectById" resultMap="BaseResultMap"> | 26 | + <select id="selectByIds" resultMap="BaseResultMap"> |
22 | select <include refid="Base_Column_List" /> | 27 | select <include refid="Base_Column_List" /> |
23 | - from seller_order_goods where id = #{id} | 28 | + from seller_order_goods where id in |
29 | + <foreach collection="idList" item="id" open="(" close=")" separator=","> | ||
30 | + #{id} | ||
31 | + </foreach> | ||
24 | </select> | 32 | </select> |
25 | 33 | ||
26 | </mapper> | 34 | </mapper> |
1 | <?xml version="1.0" encoding="UTF-8" ?> | 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" > | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
3 | -<mapper namespace="com.yoho.ufo.dal.SellerOrderMapper"> | 3 | +<mapper namespace="com.yoho.order.dal.SellerOrderMapper"> |
4 | <resultMap id="BaseResultMap" type="com.yoho.order.model.SellerOrder"> | 4 | <resultMap id="BaseResultMap" type="com.yoho.order.model.SellerOrder"> |
5 | <result column="id" property="id" jdbcType="INTEGER" /> | 5 | <result column="id" property="id" jdbcType="INTEGER" /> |
6 | <result column="uid" property="uid" jdbcType="INTEGER" /> | 6 | <result column="uid" property="uid" jdbcType="INTEGER" /> |
@@ -26,9 +26,17 @@ | @@ -26,9 +26,17 @@ | ||
26 | from seller_order where id = #{id} | 26 | from seller_order where id = #{id} |
27 | </select> | 27 | </select> |
28 | 28 | ||
29 | - <select id="selectCountByStatus" resultMap="BaseResultMap"> | 29 | + <select id="selectBySkups" resultMap="BaseResultMap"> |
30 | select <include refid="Base_Column_List" /> | 30 | select <include refid="Base_Column_List" /> |
31 | - from seller_order where id = #{id} | 31 | + from seller_order where id in |
32 | + <foreach collection="skupList" item="skup" open="(" close=")" separator=","> | ||
33 | + #{skup} | ||
34 | + </foreach> | ||
35 | + </select> | ||
36 | + | ||
37 | + <select id="selectByOrderCode" resultMap="BaseResultMap"> | ||
38 | + select <include refid="Base_Column_List" /> | ||
39 | + from seller_order where order_code = #{orderCode} | ||
32 | </select> | 40 | </select> |
33 | 41 | ||
34 | </mapper> | 42 | </mapper> |
@@ -38,6 +38,10 @@ | @@ -38,6 +38,10 @@ | ||
38 | <groupId>com.yoho.ufo.model</groupId> | 38 | <groupId>com.yoho.ufo.model</groupId> |
39 | <artifactId>order-ufo-model</artifactId> | 39 | <artifactId>order-ufo-model</artifactId> |
40 | </dependency> | 40 | </dependency> |
41 | + <dependency> | ||
42 | + <groupId>com.yoho.core</groupId> | ||
43 | + <artifactId>yoho-core-rest-client-simple</artifactId> | ||
44 | + </dependency> | ||
41 | </dependencies> | 45 | </dependencies> |
42 | 46 | ||
43 | </project> | 47 | </project> |
1 | package com.yoho.ufo.order.service.impl; | 1 | package com.yoho.ufo.order.service.impl; |
2 | 2 | ||
3 | +import java.util.Collections; | ||
3 | import java.util.List; | 4 | import java.util.List; |
4 | import java.util.Map; | 5 | import java.util.Map; |
6 | +import java.util.stream.Collectors; | ||
5 | 7 | ||
6 | import org.apache.commons.collections.CollectionUtils; | 8 | import org.apache.commons.collections.CollectionUtils; |
9 | +import org.apache.commons.lang3.StringUtils; | ||
7 | import org.elasticsearch.common.collect.Lists; | 10 | import org.elasticsearch.common.collect.Lists; |
8 | import org.elasticsearch.common.collect.Maps; | 11 | import org.elasticsearch.common.collect.Maps; |
12 | +import org.elasticsearch.common.netty.util.internal.StringUtil; | ||
9 | import org.slf4j.Logger; | 13 | import org.slf4j.Logger; |
10 | import org.slf4j.LoggerFactory; | 14 | import org.slf4j.LoggerFactory; |
11 | import org.springframework.beans.factory.annotation.Autowired; | 15 | import org.springframework.beans.factory.annotation.Autowired; |
12 | import org.springframework.stereotype.Service; | 16 | import org.springframework.stereotype.Service; |
13 | 17 | ||
18 | +import com.alibaba.fastjson.JSONObject; | ||
14 | import com.yoho.core.common.utils.DateUtil; | 19 | import com.yoho.core.common.utils.DateUtil; |
20 | +import com.yoho.core.rest.client.ServiceCaller; | ||
21 | +import com.yoho.order.dal.BuyerOrderGoodsMapper; | ||
15 | import com.yoho.order.dal.BuyerOrderMapper; | 22 | import com.yoho.order.dal.BuyerOrderMapper; |
23 | +import com.yoho.order.dal.ExpressInfoMapper; | ||
24 | +import com.yoho.order.dal.SellerOrderGoodsMapper; | ||
25 | +import com.yoho.order.dal.SellerOrderMapper; | ||
16 | import com.yoho.order.model.BuyerOrder; | 26 | import com.yoho.order.model.BuyerOrder; |
27 | +import com.yoho.order.model.BuyerOrderGoods; | ||
17 | import com.yoho.order.model.BuyerOrderReq; | 28 | import com.yoho.order.model.BuyerOrderReq; |
29 | +import com.yoho.order.model.ExpressInfo; | ||
30 | +import com.yoho.order.model.SellerOrder; | ||
31 | +import com.yoho.order.model.SellerOrderGoods; | ||
18 | import com.yoho.ufo.order.constant.Constant; | 32 | import com.yoho.ufo.order.constant.Constant; |
19 | import com.yoho.ufo.order.service.IBuyerOrderService; | 33 | import com.yoho.ufo.order.service.IBuyerOrderService; |
20 | import com.yoho.ufo.service.model.PageResponseBO; | 34 | import com.yoho.ufo.service.model.PageResponseBO; |
@@ -32,6 +46,21 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { | @@ -32,6 +46,21 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { | ||
32 | @Autowired | 46 | @Autowired |
33 | private BuyerOrderMapper buyerOrderMapper; | 47 | private BuyerOrderMapper buyerOrderMapper; |
34 | 48 | ||
49 | + @Autowired | ||
50 | + private SellerOrderMapper sellerOrderMapper; | ||
51 | + | ||
52 | + @Autowired | ||
53 | + private ExpressInfoMapper expressInfoMapper; | ||
54 | + | ||
55 | + @Autowired | ||
56 | + private BuyerOrderGoodsMapper buyerOrderGoodsMapper; | ||
57 | + | ||
58 | + @Autowired | ||
59 | + private SellerOrderGoodsMapper sellerOrderGoodsMapper; | ||
60 | + | ||
61 | + @Autowired | ||
62 | + private ServiceCaller serviceCaller; | ||
63 | + | ||
35 | public Map<String, Integer> getCountByJudgeStatus(){ | 64 | public Map<String, Integer> getCountByJudgeStatus(){ |
36 | List<Byte> toBeJudgedList = Lists.newArrayList(); | 65 | List<Byte> toBeJudgedList = Lists.newArrayList(); |
37 | List<Byte> alreadyJudgedList = Lists.newArrayList(); | 66 | List<Byte> alreadyJudgedList = Lists.newArrayList(); |
@@ -51,6 +80,10 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { | @@ -51,6 +80,10 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { | ||
51 | } | 80 | } |
52 | 81 | ||
53 | public PageResponseBO<BuyerOrderResp> queryOrderList(BuyerOrderReq req) { | 82 | public PageResponseBO<BuyerOrderResp> queryOrderList(BuyerOrderReq req) { |
83 | + if(!checkAndBuildParam(req)) { | ||
84 | + return null; | ||
85 | + } | ||
86 | + | ||
54 | int total = buyerOrderMapper.selectTotalByCondition(req); | 87 | int total = buyerOrderMapper.selectTotalByCondition(req); |
55 | if(total == 0) { | 88 | if(total == 0) { |
56 | return null; | 89 | return null; |
@@ -61,24 +94,95 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { | @@ -61,24 +94,95 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { | ||
61 | return null; | 94 | return null; |
62 | } | 95 | } |
63 | 96 | ||
97 | + //查询buyer_order_goods | ||
98 | + List<String> buyerOrderCodeList = orderList.stream().map(BuyerOrder::getOrderCode).collect(Collectors.toList()); | ||
99 | + List<BuyerOrderGoods> buyerGoodsList = buyerOrderGoodsMapper.selectByOrderCode(buyerOrderCodeList); | ||
100 | + Map<String, BuyerOrderGoods> buyerGoodsMap = buyerGoodsList.stream().collect(Collectors.toMap(BuyerOrderGoods::getOrderCode, b->b)); | ||
101 | + | ||
102 | + //查询seller_order_goods | ||
103 | + List<Integer> skupList = buyerGoodsList.stream().map(BuyerOrderGoods::getSkup).collect(Collectors.toList()); | ||
104 | + List<SellerOrderGoods> sellerGoodsList = sellerOrderGoodsMapper.selectByIds(skupList); | ||
105 | + Map<Integer, SellerOrderGoods> sellerGoodsMap = sellerGoodsList.stream().collect(Collectors.toMap(SellerOrderGoods::getId, s->s)); | ||
106 | + | ||
107 | + //查询seller_order | ||
108 | + List<SellerOrder> sellerOrderList = sellerOrderMapper.selectBySkups(skupList); | ||
109 | + List<String> sellerOrderCodeList = sellerOrderList.stream().map(SellerOrder::getOrderCode).collect(Collectors.toList()); | ||
110 | + Map<Integer, SellerOrder> sellerOrderMap = sellerOrderList.stream().collect(Collectors.toMap(SellerOrder::getSkup, s->s)); | ||
111 | + | ||
112 | + //查询卖家快递单号 | ||
113 | + List<ExpressInfo> expressInfoList =expressInfoMapper.selectByOrderCodeList(sellerOrderCodeList); | ||
114 | + Map<String, ExpressInfo> expressInfoMap = expressInfoList.stream().collect(Collectors.toMap(ExpressInfo::getOrderCode, e->e)); | ||
115 | + | ||
116 | + List<BuyerOrderResp> respList = convertToResp(orderList, buyerGoodsMap, sellerOrderMap, sellerGoodsMap,expressInfoMap); | ||
117 | + | ||
118 | + PageResponseBO<BuyerOrderResp> result=new PageResponseBO<>(); | ||
119 | + result.setList(respList); | ||
120 | + result.setPage(req.getPage()); | ||
121 | + result.setSize(req.getSize()); | ||
122 | + result.setTotal(total); | ||
123 | + | ||
124 | + return result; | ||
125 | + } | ||
126 | + | ||
127 | + private List<BuyerOrderResp> convertToResp(List<BuyerOrder> orderList, Map<String, BuyerOrderGoods> buyerGoodsMap, | ||
128 | + Map<Integer, SellerOrder> sellerOrderMap, Map<Integer, SellerOrderGoods> sellerGoodsMap, Map<String, ExpressInfo> expressInfoMap){ | ||
64 | List<BuyerOrderResp> respList = Lists.newArrayList(); | 129 | List<BuyerOrderResp> respList = Lists.newArrayList(); |
65 | for(BuyerOrder item : orderList) { | 130 | for(BuyerOrder item : orderList) { |
131 | + Integer skup = buyerGoodsMap.get(item.getOrderCode()).getSkup(); | ||
132 | + SellerOrder sellerOrder= sellerOrderMap.get(skup); | ||
66 | BuyerOrderResp resp = new BuyerOrderResp(); | 133 | BuyerOrderResp resp = new BuyerOrderResp(); |
134 | + resp.setId(item.getId()); | ||
67 | resp.setOrderCode(item.getOrderCode()); | 135 | resp.setOrderCode(item.getOrderCode()); |
68 | resp.setStatus(item.getStatus()); | 136 | resp.setStatus(item.getStatus()); |
69 | - resp.setCreateTimeStr(DateUtil.long2DateStr(item.getCreateTime()*1000, "yyyy-MM-dd HH:mm:ss")); | 137 | + resp.setProductNum(1);//目前固定为1 |
138 | + resp.setSkuStr(sellerGoodsMap.get(skup).getStorageId().toString()); | ||
139 | + resp.setDepotNo(sellerGoodsMap.get(skup).getDepotNo()); | ||
140 | + resp.setSellerWaybillCode(expressInfoMap.get(sellerOrder.getOrderCode()).getWaybillCode()); | ||
141 | + resp.setCreateTimeStr(null == item.getCreateTime() ? "" : DateUtil.long2DateStr(item.getCreateTime().longValue()*1000, "yyyy-MM-dd HH:mm:ss")); | ||
70 | 142 | ||
71 | respList.add(resp); | 143 | respList.add(resp); |
72 | } | 144 | } |
73 | 145 | ||
74 | - PageResponseBO<BuyerOrderResp> result=new PageResponseBO<>(); | ||
75 | - result.setList(respList); | ||
76 | - result.setPage(req.getPage()); | ||
77 | - result.setSize(req.getSize()); | ||
78 | - result.setTotal(total); | 146 | + return respList; |
147 | + } | ||
79 | 148 | ||
80 | - return result; | 149 | + private boolean checkAndBuildParam(BuyerOrderReq req) { |
150 | + if(StringUtils.isNotEmpty(req.getStatusStr())) { | ||
151 | + req.setStatusList(convertStatus(req.getStatusStr())); | ||
152 | + } | ||
153 | + | ||
154 | + if(StringUtils.isNotEmpty(req.getSellerWaybillCode())) { | ||
155 | + ExpressInfo expressInfo = expressInfoMapper.selectByWaybillCode(req.getSellerWaybillCode()); | ||
156 | + if(null == expressInfo) { | ||
157 | + return false; | ||
158 | + }else { | ||
159 | + String sellerOrderCode = expressInfo.getOrderCode(); | ||
160 | + SellerOrder sellerOrder = sellerOrderMapper.selectByOrderCode(sellerOrderCode); | ||
161 | + req.setSkup(sellerOrder.getSkup()); | ||
162 | + } | ||
163 | + } | ||
81 | 164 | ||
165 | + if(StringUtils.isNotEmpty(req.getMobile())) { | ||
166 | + Map<String,String> request = Collections.singletonMap("account", req.getMobile()); | ||
167 | + JSONObject jsonObject = serviceCaller.getcall("uic.getProfileAction", request, JSONObject.class); | ||
168 | + if(null == jsonObject.getJSONObject("data") || null == jsonObject.getJSONObject("data").getInteger("uid")) { | ||
169 | + return false; | ||
170 | + } | ||
171 | + Integer uid = jsonObject.getJSONObject("data").getInteger("uid"); | ||
172 | + req.setSellerUid(uid);//卖家uid | ||
173 | + } | ||
174 | + | ||
175 | + return true; | ||
176 | + | ||
177 | + } | ||
178 | + | ||
179 | + private List<Byte> convertStatus(String statusStr){ | ||
180 | + String[] statusArr = StringUtil.split(statusStr, ','); | ||
181 | + List<Byte> list = Lists.newArrayList(); | ||
182 | + for(int i=0; i<statusArr.length; i++) { | ||
183 | + list.add(Byte.valueOf(statusArr[i])); | ||
184 | + } | ||
185 | + return list; | ||
82 | } | 186 | } |
83 | 187 | ||
84 | } | 188 | } |
@@ -21,6 +21,7 @@ datasources: | @@ -21,6 +21,7 @@ datasources: | ||
21 | - com.yoho.order.dal.SellerOrderMapper | 21 | - com.yoho.order.dal.SellerOrderMapper |
22 | - com.yoho.order.dal.SellerOrderGoodsMapper | 22 | - com.yoho.order.dal.SellerOrderGoodsMapper |
23 | - com.yoho.order.dal.ExpressInfoMapper | 23 | - com.yoho.order.dal.ExpressInfoMapper |
24 | + - com.yoho.order.dal.BuyerOrderGoodsMapper | ||
24 | 25 | ||
25 | 26 | ||
26 | readOnlyInSlave: true | 27 | readOnlyInSlave: true |
@@ -21,5 +21,6 @@ datasources: | @@ -21,5 +21,6 @@ datasources: | ||
21 | - com.yoho.order.dal.SellerOrderMapper | 21 | - com.yoho.order.dal.SellerOrderMapper |
22 | - com.yoho.order.dal.SellerOrderGoodsMapper | 22 | - com.yoho.order.dal.SellerOrderGoodsMapper |
23 | - com.yoho.order.dal.ExpressInfoMapper | 23 | - com.yoho.order.dal.ExpressInfoMapper |
24 | + - com.yoho.order.dal.BuyerOrderGoodsMapper | ||
24 | 25 | ||
25 | readOnlyInSlave: ${readOnlyInSlave} | 26 | readOnlyInSlave: ${readOnlyInSlave} |
1 | +<!DOCTYPE html> | ||
2 | +<html> | ||
3 | +<head> | ||
4 | + <meta charset="UTF-8"/> | ||
5 | + <title>Yoho!Buy运营平台</title> | ||
6 | + <script src="/ufoPlatform/js/include.js"></script> | ||
7 | +</head> | ||
8 | +<body class="easyui-layout"> | ||
9 | +<div region="north" style="height:300px;"> | ||
10 | + <script> | ||
11 | + document.write(addHead('鉴定中心', '列表管理')); | ||
12 | + </script> | ||
13 | + <div style="margin-left:1200px"> | ||
14 | + <select id="depotNo" style="width:70px;"> | ||
15 | + <option value="1" selected>北京</option> | ||
16 | + <option value="2">南京</option> | ||
17 | + </select> | ||
18 | + </div> | ||
19 | + <div id="tt" class="easyui-tabs"> | ||
20 | + <div title="待鉴定" style="padding:20px;display:none;"> | ||
21 | + <div> | ||
22 | + <label>订单编号:</label> | ||
23 | + <input id="orderCode_0" type="text" class="easyui-textbox" style="width:150px"> | ||
24 | + | ||
25 | + <label>买家UID:</label> | ||
26 | + <input id="buyerUid_0" type="text" class="easyui-textbox" style="width:150px"/> | ||
27 | + | ||
28 | + <label>卖家快递单号:</label> | ||
29 | + <input id="sellerWaybillCode_0" type="text" class="easyui-textbox" style="width:150px"/> | ||
30 | + | ||
31 | + <label>订单状态:</label> | ||
32 | + <select id="status_0" class="easyui-combobox" style="width:100px;" > | ||
33 | + <option value="">全部</option> | ||
34 | + <option value="2">卖家已发货</option> | ||
35 | + <option value="3">平台鉴定中</option> | ||
36 | + </select> | ||
37 | + | ||
38 | + <br> | ||
39 | + | ||
40 | + <label>商品编码:</label> | ||
41 | + <input id="productId_0" type="text" class="easyui-textbox" style="width:150px"/> | ||
42 | + | ||
43 | + <label> SKU:</label> | ||
44 | + <input id="sku_0" type="text" class="easyui-textbox" style="width:150px"/> | ||
45 | + | ||
46 | + <label> 手机号:</label> | ||
47 | + <input id="mobile_0" type="text" class="easyui-textbox" style="width:150px"/> | ||
48 | + | ||
49 | + <label> SKU-P:</label> | ||
50 | + <input id="skup_0" type="text" class="easyui-textbox" style="width:150px"/> | ||
51 | + | ||
52 | + <a id="searchBtn_0" class="btn-info">查询</a> | ||
53 | + <a id="allBtn_0" class="btn-success">全部</a> | ||
54 | + </div> | ||
55 | + </div> | ||
56 | + <div title="鉴定完成" style="overflow:auto;padding:20px;display:none;"> | ||
57 | + <div> | ||
58 | + <label>订单编号:</label> | ||
59 | + <input id="orderCode_1" type="text" class="easyui-textbox" style="width:150px"> | ||
60 | + | ||
61 | + <label>买家UID:</label> | ||
62 | + <input id="buyerUid_1" type="text" class="easyui-textbox" style="width:150px"/> | ||
63 | + | ||
64 | + <label>卖家快递单号:</label> | ||
65 | + <input id="sellerWaybillCode_1" type="text" class="easyui-textbox" style="width:150px"/> | ||
66 | + | ||
67 | + <label>订单状态:</label> | ||
68 | + <select id="status_1" class="easyui-combobox" style="width:100px;" > | ||
69 | + <option value="">全部</option> | ||
70 | + <option value="4">鉴定通过</option> | ||
71 | + <option value="13">鉴定不通过</option> | ||
72 | + </select> | ||
73 | + | ||
74 | + <br> | ||
75 | + | ||
76 | + <label>商品编码:</label> | ||
77 | + <input id="productId_1" type="text" class="easyui-textbox" style="width:150px"/> | ||
78 | + | ||
79 | + <label> SKU:</label> | ||
80 | + <input id="sku_1" type="text" class="easyui-textbox" style="width:150px"/> | ||
81 | + | ||
82 | + <label> 手机号:</label> | ||
83 | + <input id="mobile_1" type="text" class="easyui-textbox" style="width:150px"/> | ||
84 | + | ||
85 | + <label> SKU-P:</label> | ||
86 | + <input id="skup_1" type="text" class="easyui-textbox" style="width:150px"/> | ||
87 | + | ||
88 | + <a id="searchBtn_1" class="btn-info">查询</a> | ||
89 | + <a id="allBtn_1" class="btn-success">全部</a> | ||
90 | + </div> | ||
91 | + </div> | ||
92 | + </div> | ||
93 | +</div> | ||
94 | + | ||
95 | +<div id="orderList" region="center"> | ||
96 | + <table id="orderListTable"></table> | ||
97 | +</div> | ||
98 | +<script> | ||
99 | +$(function() { | ||
100 | + | ||
101 | + $("#depotNo").combobox({ | ||
102 | + onchange : function(newValue, oldValue){ | ||
103 | + var depotNo = $("#depotNo").combobox("getValue"); | ||
104 | + alert(depotNo); | ||
105 | + } | ||
106 | + }); | ||
107 | + | ||
108 | + $("#searchBtn_0").linkbutton({ | ||
109 | + iconCls : "icon-search", | ||
110 | + onClick : function() { | ||
111 | + $("#orderListTable").datagrid("load", { | ||
112 | + statusStr : "2,3", | ||
113 | + status : $("#status_0").myCombobox("getValue"), | ||
114 | + orderCode : $("#orderCode_0").val(), | ||
115 | + uid : $("#buyerUid_0").val(), | ||
116 | + productId : $("#productId_0").val(), | ||
117 | + storageId : $("#sku_0").val(), | ||
118 | + skup : $("#skup_0").val(), | ||
119 | + sellerWaybillCode : $("#sellerWaybillCode_0").val(), | ||
120 | + mobile : $("#mobile_0").val(), | ||
121 | + depotNo : $("#depotNo").myCombobox("getValue") | ||
122 | + }); | ||
123 | + } | ||
124 | + }); | ||
125 | + $("#searchBtn_1").linkbutton({ | ||
126 | + iconCls : "icon-search", | ||
127 | + onClick : function() { | ||
128 | + $("#orderListTable").datagrid("load", { | ||
129 | + statusStr : "4,13", | ||
130 | + status : $("#status_1").myCombobox("getValue"), | ||
131 | + orderCode : $("#orderCode_1").val(), | ||
132 | + uid : $("#buyerUid_1").val(), | ||
133 | + productId : $("#productId_1").val(), | ||
134 | + storageId : $("#sku_1").val(), | ||
135 | + skup : $("#skup_1").val(), | ||
136 | + sellerWaybillCode : $("#sellerWaybillCode_1").val(), | ||
137 | + mobile : $("#mobile_1").val() | ||
138 | + }); | ||
139 | + } | ||
140 | + }) | ||
141 | + | ||
142 | + getToBeJudgedList(); | ||
143 | + $("#tt").tabs({ | ||
144 | + onSelect:function(title,index){ | ||
145 | + if(index == 0){ | ||
146 | + getToBeJudgedList(); | ||
147 | + }else if(index == 1){ | ||
148 | + getAlreadyJudgedList(); | ||
149 | + } | ||
150 | + } | ||
151 | + }); | ||
152 | + | ||
153 | + //全部按钮 | ||
154 | + $("#allBtn_0").linkbutton({ | ||
155 | + iconCls: "icon-import", | ||
156 | + onClick: function () { | ||
157 | + $("#orderCode_0").textbox('setValue',''); | ||
158 | + $("#uid_0").textbox('setValue',''); | ||
159 | + $("#sellerWaybillCode_0").textbox('setValue',''); | ||
160 | + $("#status_0").combobox('setValue',''); | ||
161 | + $("#productId_0").textbox('setValue',''); | ||
162 | + $("#sku_0").textbox('setValue',''); | ||
163 | + $("#mobile_0").textbox('setValue',''); | ||
164 | + $("#skup_0").textbox('setValue',''); | ||
165 | + $("#orderListTable").datagrid("load", { | ||
166 | + statusStr: "2,3", | ||
167 | + }); | ||
168 | + } | ||
169 | + }); | ||
170 | + | ||
171 | + $("#allBtn_1").linkbutton({ | ||
172 | + iconCls: "icon-import", | ||
173 | + onClick: function () { | ||
174 | + $("#orderCode_1").textbox('setValue',''); | ||
175 | + $("#uid_1").textbox('setValue',''); | ||
176 | + $("#sellerWaybillCode_1").textbox('setValue',''); | ||
177 | + $("#status_1").combobox('setValue',''); | ||
178 | + $("#productId_1").textbox('setValue',''); | ||
179 | + $("#sku_1").textbox('setValue',''); | ||
180 | + $("#mobile_1").textbox('setValue',''); | ||
181 | + $("#skup_1").textbox('setValue',''); | ||
182 | + $("#orderListTable").datagrid("load", { | ||
183 | + statusStr: "4,13", | ||
184 | + }); | ||
185 | + } | ||
186 | + }); | ||
187 | + | ||
188 | +}); | ||
189 | + | ||
190 | +function getToBeJudgedList(){ | ||
191 | + $("#orderListTable").myDatagrid({ | ||
192 | + fit: true, | ||
193 | + fitColumns: true, | ||
194 | + striped: true, | ||
195 | + url: contextPath + "/buyerOrder/queryOrderList", | ||
196 | + method: 'POST', | ||
197 | + queryParams: { | ||
198 | + statusStr: "2,3" | ||
199 | + }, | ||
200 | + loadFilter: function (data) { | ||
201 | + var temp = defaultLoadFilter(data); | ||
202 | + temp=null==temp?[]:temp; | ||
203 | + temp.rows = temp.list; | ||
204 | + return temp; | ||
205 | + }, | ||
206 | + | ||
207 | + columns: [[{ | ||
208 | + title: "卖家快递单号", | ||
209 | + field: "sellerWaybillCode", | ||
210 | + width: 30, | ||
211 | + align: "center" | ||
212 | + }, { | ||
213 | + title: "收货仓库", | ||
214 | + field: "depotNo", | ||
215 | + width: 20, | ||
216 | + align: "center" | ||
217 | + }, { | ||
218 | + title: "商品件数", | ||
219 | + field: "productNum", | ||
220 | + width: 20, | ||
221 | + align: "center" | ||
222 | + }, { | ||
223 | + title: "SKU", | ||
224 | + field: "skuStr", | ||
225 | + width: 20, | ||
226 | + align: "center" | ||
227 | + }, { | ||
228 | + title: "订单编号", | ||
229 | + field: "orderCode", | ||
230 | + width: 30, | ||
231 | + align: "center" | ||
232 | + }, { | ||
233 | + title: "订单状态", | ||
234 | + field: "status", | ||
235 | + width: 20, | ||
236 | + align: "center", | ||
237 | + formatter: function (value, rowData, rowIndex) { | ||
238 | + if (value == 2) { | ||
239 | + return "卖家已发货"; | ||
240 | + }else if(value == 3){ | ||
241 | + return "平台鉴定中"; | ||
242 | + } | ||
243 | + } | ||
244 | + },{ | ||
245 | + title: "下单时间", | ||
246 | + field: "createTimeStr", | ||
247 | + width: 20, | ||
248 | + align: "center" | ||
249 | + },{ | ||
250 | + title: "操作", | ||
251 | + field: "asdf", | ||
252 | + width: 30, | ||
253 | + align: "center", | ||
254 | + formatter: function (value, rowData, rowIndex) { | ||
255 | + if (rowData.status == 2) { | ||
256 | + return "<a role='close' dataId='"+ rowData.shopId +"' style='margin-left:10px;background-color: #5cb85c !important;'>确认收货</a>"; | ||
257 | + } else if (rowData.status == 3) { | ||
258 | + return "<a role='open' dataId='"+ rowData.shopId +"' style='margin-left:10px;background-color: #d9534f !important;'>鉴定通过</a>"+ | ||
259 | + "<a role='open' dataId='"+ rowData.shopId +"' style='margin-left:10px;background-color: #5cb85c !important;'>鉴定不通过</a>"; | ||
260 | + } | ||
261 | + } | ||
262 | + }]], | ||
263 | + cache: false, | ||
264 | + pagination: true, | ||
265 | + pageSize: 20, | ||
266 | + idField: "id", | ||
267 | + singleSelect: true, | ||
268 | + onLoadSuccess: function (data) { | ||
269 | + $(this).datagrid("getPanel").find("a[role='open']").linkbutton({ | ||
270 | + onClick: function () { | ||
271 | + var shopsId = $(this).attr("dataId"); | ||
272 | + $.post(contextPath + "/couponLimit/shopStartOrStop.do", { | ||
273 | + shopsIdForShop : shopsId, | ||
274 | + shopLimitStatus : 1, | ||
275 | + type : 0 | ||
276 | + }, function(data) { | ||
277 | + if (data.code == CODE_SUCCESS) { | ||
278 | + $("#limitListTable").datagrid("reload"); | ||
279 | + window.self.$.messager.show({ | ||
280 | + title : "提示", | ||
281 | + msg : "开启成功!" | ||
282 | + }); | ||
283 | + } else { | ||
284 | + window.self.$.messager.alert("失败", data.message, "error"); | ||
285 | + } | ||
286 | + }); | ||
287 | + | ||
288 | + | ||
289 | + } | ||
290 | + }); | ||
291 | + $(this).datagrid("getPanel").find("a[role='close']").linkbutton({ | ||
292 | + onClick: function () { | ||
293 | + var shopsId = $(this).attr("dataId"); | ||
294 | + $.post(contextPath + "/couponLimit/shopStartOrStop.do", { | ||
295 | + shopsIdForShop : shopsId, | ||
296 | + shopLimitStatus : 0, | ||
297 | + type : 0 | ||
298 | + }, function(data) { | ||
299 | + if (data.code == CODE_SUCCESS) { | ||
300 | + $("#limitListTable").datagrid("reload"); | ||
301 | + window.self.$.messager.show({ | ||
302 | + title : "提示", | ||
303 | + msg : "关闭成功!" | ||
304 | + }); | ||
305 | + } else { | ||
306 | + window.self.$.messager.alert("失败", data.message, "error"); | ||
307 | + } | ||
308 | + }); | ||
309 | + | ||
310 | + } | ||
311 | + }); | ||
312 | + } | ||
313 | + }); | ||
314 | +} | ||
315 | + | ||
316 | +function getAlreadyJudgedList(){ | ||
317 | + var depotNo = $("#depotNo").myCombobox("getValue"); | ||
318 | + $("#orderListTable").myDatagrid({ | ||
319 | + fit: true, | ||
320 | + fitColumns: true, | ||
321 | + striped: true, | ||
322 | + url: contextPath + "/buyerOrder/queryOrderList", | ||
323 | + method: 'POST', | ||
324 | + queryParams: { | ||
325 | + statusStr: "4,13", | ||
326 | + depotNo: depotNo | ||
327 | + }, | ||
328 | + loadFilter: function (data) { | ||
329 | + var temp = defaultLoadFilter(data); | ||
330 | + temp=null==temp?[]:temp; | ||
331 | + temp.rows = temp.list; | ||
332 | + return temp; | ||
333 | + }, | ||
334 | + | ||
335 | + columns: [[{ | ||
336 | + title: "卖家快递单号", | ||
337 | + field: "sellerWaybillCode", | ||
338 | + width: 30, | ||
339 | + align: "center" | ||
340 | + }, { | ||
341 | + title: "收货仓库", | ||
342 | + field: "depotNo", | ||
343 | + width: 20, | ||
344 | + align: "center" | ||
345 | + }, { | ||
346 | + title: "商品件数", | ||
347 | + field: "productNum", | ||
348 | + width: 20, | ||
349 | + align: "center" | ||
350 | + }, { | ||
351 | + title: "SKU", | ||
352 | + field: "skuStr", | ||
353 | + width: 20, | ||
354 | + align: "center" | ||
355 | + }, { | ||
356 | + title: "订单编号", | ||
357 | + field: "orderCode", | ||
358 | + width: 30, | ||
359 | + align: "center" | ||
360 | + }, { | ||
361 | + title: "订单状态", | ||
362 | + field: "status", | ||
363 | + width: 20, | ||
364 | + align: "center", | ||
365 | + formatter: function (value, rowData, rowIndex) { | ||
366 | + if (value == 4) { | ||
367 | + return "鉴定通过"; | ||
368 | + }else if(value == 13){ | ||
369 | + return "鉴定不通过"; | ||
370 | + } | ||
371 | + } | ||
372 | + },{ | ||
373 | + title: "下单时间", | ||
374 | + field: "createTimeStr", | ||
375 | + width: 20, | ||
376 | + align: "center" | ||
377 | + }]], | ||
378 | + cache: false, | ||
379 | + pagination: true, | ||
380 | + pageSize: 20, | ||
381 | + idField: "id", | ||
382 | + singleSelect: true, | ||
383 | + onLoadSuccess: function (data) { | ||
384 | + } | ||
385 | + }); | ||
386 | +} | ||
387 | + | ||
388 | +function addPage() { | ||
389 | + var div = $("<div id='addProductCouponLimitDiv'>").appendTo($(document.body)); | ||
390 | + var url = contextPath + "/html/promotion/useCouponLimit/add.html"; | ||
391 | + $(div).myDialog({ | ||
392 | + width: "50%", | ||
393 | + height: "40%", | ||
394 | + title: "导入商品的用券限制", | ||
395 | + href: url, | ||
396 | + modal: true, | ||
397 | + collapsible: true, | ||
398 | + cache: false, | ||
399 | + buttons: [{ | ||
400 | + text: "保存", | ||
401 | + id: "saveBtn", | ||
402 | + iconCls: "icon-save", | ||
403 | + onClick: function () { | ||
404 | + $('#uploadFile').click(); | ||
405 | + } | ||
406 | + }, { | ||
407 | + text: "关闭", | ||
408 | + iconCls: "icon-cancel", | ||
409 | + handler: function () { | ||
410 | + $(div).dialog("close"); | ||
411 | + } | ||
412 | + }] | ||
413 | + }); | ||
414 | +} | ||
415 | + | ||
416 | +</script> | ||
417 | +</body> | ||
418 | +</html> |
-
Please register or login to post a comment