菠萝派接口-发货接口
正在显示
6 个修改的文件
包含
214 行增加
和
43 行删除
1 | package com.sibu.orderHelper.integral.dao; | 1 | package com.sibu.orderHelper.integral.dao; |
2 | import com.sibu.orderHelper.integral.model.*; | 2 | import com.sibu.orderHelper.integral.model.*; |
3 | import com.sibu.orderHelper.integral.pineapple.model.Orders; | 3 | import com.sibu.orderHelper.integral.pineapple.model.*; |
4 | import com.sibu.orderHelper.integral.pineapple.model.OrdersProduct; | ||
5 | import com.sibu.orderHelper.integral.pineapple.model.Product; | ||
6 | import com.sibu.orderHelper.integral.reponse.CheckRefundStatusResponse; | 4 | import com.sibu.orderHelper.integral.reponse.CheckRefundStatusResponse; |
7 | import com.sibu.orderHelper.integral.reponse.DoingOrderDetailResponse; | 5 | import com.sibu.orderHelper.integral.reponse.DoingOrderDetailResponse; |
8 | import com.sibu.orderHelper.integral.reponse.SkuApiResponse; | 6 | import com.sibu.orderHelper.integral.reponse.SkuApiResponse; |
... | @@ -86,4 +84,28 @@ public interface PineappleDao { | ... | @@ -86,4 +84,28 @@ public interface PineappleDao { |
86 | List<OrdersProduct> getOrdersProductList(@Param("orderSn")String orderSn); | 84 | List<OrdersProduct> getOrdersProductList(@Param("orderSn")String orderSn); |
87 | 85 | ||
88 | 86 | ||
87 | /** | ||
88 | * 根据条件查询省市级信息 | ||
89 | * @param params | ||
90 | * @return | ||
91 | */ | ||
92 | Regions getRegionsByMap(Map<String,Object> params); | ||
93 | |||
94 | /** | ||
95 | * 根据id查询省市级信息 | ||
96 | * @param id | ||
97 | * @return | ||
98 | */ | ||
99 | Regions getRegionsById(@Param("id") Integer id); | ||
100 | |||
101 | |||
102 | /** | ||
103 | * 根据条件查询物流公司 | ||
104 | * @return | ||
105 | */ | ||
106 | List<CourierCompany> getCourierCompanyByName(Map<String,Object> params); | ||
107 | |||
108 | |||
109 | |||
110 | |||
89 | } | 111 | } | ... | ... |
... | @@ -68,9 +68,6 @@ | ... | @@ -68,9 +68,6 @@ |
68 | <if test="addressInfo !=null and addressInfo !=''"> | 68 | <if test="addressInfo !=null and addressInfo !=''"> |
69 | address_info = #{addressInfo}, | 69 | address_info = #{addressInfo}, |
70 | </if> | 70 | </if> |
71 | <if test="deliverTime !=null and deliverTime !=''"> | ||
72 | deliver_time = #{deliverTime}, | ||
73 | </if> | ||
74 | <if test="logisticsNumber !=null and logisticsNumber !=''"> | 71 | <if test="logisticsNumber !=null and logisticsNumber !=''"> |
75 | logistics_number = #{logisticsNumber}, | 72 | logistics_number = #{logisticsNumber}, |
76 | </if> | 73 | </if> |
... | @@ -123,9 +120,12 @@ | ... | @@ -123,9 +120,12 @@ |
123 | <if test="productId !=null and productId !=''"> | 120 | <if test="productId !=null and productId !=''"> |
124 | AND (p.id = #{productId} or p.product_code = #{productId} | 121 | AND (p.id = #{productId} or p.product_code = #{productId} |
125 | </if> | 122 | </if> |
126 | <if test="state !=null and state !=''"> | 123 | <if test="state !=null and state !='' and state != -1"> |
127 | AND p.state = #{state} | 124 | AND p.state = #{state} |
128 | </if> | 125 | </if> |
126 | <if test="state !=null and state !='' and state == -1"> | ||
127 | AND p.state IN ('6','7') | ||
128 | </if> | ||
129 | <if test="productName !=null and productName !=''"> | 129 | <if test="productName !=null and productName !=''"> |
130 | AND p.state = #{productName} | 130 | AND p.state = #{productName} |
131 | </if> | 131 | </if> |
... | @@ -180,42 +180,42 @@ | ... | @@ -180,42 +180,42 @@ |
180 | limit ${PageIndex}, ${PageSize} | 180 | limit ${PageIndex}, ${PageSize} |
181 | </select> | 181 | </select> |
182 | 182 | ||
183 | <resultMap id="ordersProduct" type="com.sibu.orderHelper.integral.pineapple.model.OrdersProduct"> | 183 | <resultMap id="ordersProduct" type="com.sibu.orderHelper.integral.pineapple.model.OrdersProduct"> |
184 | <result property="id" column="id" /> | 184 | <result property="id" column="id" /> |
185 | <result property="ordersId" column="orders_id" /> | 185 | <result property="ordersId" column="orders_id" /> |
186 | <result property="ordersSn" column="orders_sn" /> | 186 | <result property="ordersSn" column="orders_sn" /> |
187 | <result property="ordersPsn" column="orders_psn" /> | 187 | <result property="ordersPsn" column="orders_psn" /> |
188 | <result property="sellerId" column="seller_id" /> | 188 | <result property="sellerId" column="seller_id" /> |
189 | <result property="sellerName" column="seller_name" /> | 189 | <result property="sellerName" column="seller_name" /> |
190 | <result property="productCateId" column="product_cate_id" /> | 190 | <result property="productCateId" column="product_cate_id" /> |
191 | <result property="productId" column="product_id" /> | 191 | <result property="productId" column="product_id" /> |
192 | <result property="productGoodsId" column="product_goods_id" /> | 192 | <result property="productGoodsId" column="product_goods_id" /> |
193 | <result property="specInfo" column="spec_info" /> | 193 | <result property="specInfo" column="spec_info" /> |
194 | <result property="productName" column="product_name" /> | 194 | <result property="productName" column="product_name" /> |
195 | <result property="productSku" column="product_sku" /> | 195 | <result property="productSku" column="product_sku" /> |
196 | <result property="packageGroupsId" column="package_groups_id" /> | 196 | <result property="packageGroupsId" column="package_groups_id" /> |
197 | <result property="mallGroupsId" column="mall_groups_id" /> | 197 | <result property="mallGroupsId" column="mall_groups_id" /> |
198 | <result property="giftId" column="gift_id" /> | 198 | <result property="giftId" column="gift_id" /> |
199 | <result property="isGift" column="is_gift" /> | 199 | <result property="isGift" column="is_gift" /> |
200 | <result property="moneyPrice" column="money_price" /> | 200 | <result property="moneyPrice" column="money_price" /> |
201 | <result property="number" column="number" /> | 201 | <result property="number" column="number" /> |
202 | <result property="moneyAmount" column="money_amount" /> | 202 | <result property="moneyAmount" column="money_amount" /> |
203 | <result property="moneyActSingle" column="money_act_single" /> | 203 | <result property="moneyActSingle" column="money_act_single" /> |
204 | <result property="actSingleId" column="act_single_id" /> | 204 | <result property="actSingleId" column="act_single_id" /> |
205 | <result property="actGroupId" column="act_group_id" /> | 205 | <result property="actGroupId" column="act_group_id" /> |
206 | <result property="actFlashSaleId" column="act_flash_sale_id" /> | 206 | <result property="actFlashSaleId" column="act_flash_sale_id" /> |
207 | <result property="actFlashSaleProductId" column="act_flash_sale_product_id" /> | 207 | <result property="actFlashSaleProductId" column="act_flash_sale_product_id" /> |
208 | <result property="actBiddingId" column="act_bidding_id" /> | 208 | <result property="actBiddingId" column="act_bidding_id" /> |
209 | <result property="actIntegralId" column="act_integral_id" /> | 209 | <result property="actIntegralId" column="act_integral_id" /> |
210 | <result property="actIntegralNum" column="act_integral_num" /> | 210 | <result property="actIntegralNum" column="act_integral_num" /> |
211 | <result property="actIntegralMoney" column="act_integral_money" /> | 211 | <result property="actIntegralMoney" column="act_integral_money" /> |
212 | <result property="systemRemark" column="system_remark" /> | 212 | <result property="systemRemark" column="system_remark" /> |
213 | <result property="backNumber" column="back_number" /> | 213 | <result property="backNumber" column="back_number" /> |
214 | <result property="exchangeNumber" column="exchange_number" /> | 214 | <result property="exchangeNumber" column="exchange_number" /> |
215 | <result property="createTime" column="create_time" /> | 215 | <result property="createTime" column="create_time" /> |
216 | <result property="updateTime" column="update_time" /> | 216 | <result property="updateTime" column="update_time" /> |
217 | <result property="isEvaluate" column="is_evaluate" /> | 217 | <result property="isEvaluate" column="is_evaluate" /> |
218 | </resultMap> | 218 | </resultMap> |
219 | 219 | ||
220 | 220 | ||
221 | <!-- 查询子订单--> | 221 | <!-- 查询子订单--> |
... | @@ -223,4 +223,53 @@ | ... | @@ -223,4 +223,53 @@ |
223 | SELECT product_sku,id,product_name,spec_info,number,money_price,money_act_single FROM orders_product | 223 | SELECT product_sku,id,product_name,spec_info,number,money_price,money_act_single FROM orders_product |
224 | WHERE orders_sn = #{ordersSn} | 224 | WHERE orders_sn = #{ordersSn} |
225 | </select> | 225 | </select> |
226 | |||
227 | <!-- 地址实体类--> | ||
228 | <resultMap id="regionsResult" type="com.sibu.orderHelper.integral.pineapple.model.Regions"> | ||
229 | <result property="id" column="id" /> | ||
230 | <result property="parentId" column="parentId" /> | ||
231 | <result property="regionName" column="regionName" /> | ||
232 | <result property="parentPath" column="parentPath" /> | ||
233 | <result property="firstLetter" column="firstLetter" /> | ||
234 | <result property="regionType" column="regionType" /> | ||
235 | <result property="agencyId" column="agencyId" /> | ||
236 | <result property="shippingId" column="shippingId" /> | ||
237 | <result property="visible" column="visible" /> | ||
238 | <result property="rowId" column="rowId" /> | ||
239 | </resultMap> | ||
240 | |||
241 | <!-- 根据条件查询省市级信息--> | ||
242 | <select id="getRegionsByMap" parameterType="java.util.Map" resultMap="regionsResult"> | ||
243 | SELECT * FROM regions WHERE regionName LIKE concat('%',#{name},'%') AND regionType = #{regionType} | ||
244 | </select> | ||
245 | |||
246 | <!-- 根据id查询省市级信息--> | ||
247 | <select id="getRegionsById" parameterType="java.lang.Integer" resultMap="regionsResult"> | ||
248 | select | ||
249 | * | ||
250 | from `regions` | ||
251 | where `id` = #{id} | ||
252 | </select> | ||
253 | |||
254 | <!-- 物流公司实体--> | ||
255 | <resultMap id="courierCompanyResult" type="com.sibu.orderHelper.integral.pineapple.model.CourierCompany"> | ||
256 | <result property="id" column="id" /> | ||
257 | <result property="createTime" column="create_time" /> | ||
258 | <result property="state" column="state" /> | ||
259 | <result property="companyMark" column="company_mark" /> | ||
260 | <result property="companyName" column="company_name" /> | ||
261 | <result property="seq" column="seq" /> | ||
262 | <result property="sellerId" column="seller_id" /> | ||
263 | <result property="companyType" column="company_type" /> | ||
264 | <result property="imagePath" column="image_path" /> | ||
265 | <result property="content" column="content" /> | ||
266 | </resultMap> | ||
267 | |||
268 | <!-- 根据条件查询物流公司--> | ||
269 | <select id="getCourierCompanyByName" parameterType="java.util.Map" resultMap="courierCompanyResult"> | ||
270 | select | ||
271 | * | ||
272 | from `courier_company` | ||
273 | where company_name LIKE concat('%',#{name},'%') AND seller_id =#{sellerId} | ||
274 | </select> | ||
226 | </mapper> | 275 | </mapper> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | package com.sibu.orderHelper.integral.pineapple.enums; | ||
2 | |||
3 | import com.alibaba.druid.util.StringUtils; | ||
4 | import com.sibu.orderHelper.enums.PayOrderStatus; | ||
5 | import com.sibu.orderHelper.integral.pineapple.constant.PineAppleConst; | ||
6 | import org.apache.commons.lang3.EnumUtils; | ||
7 | |||
8 | import java.util.List; | ||
9 | |||
10 | /** | ||
11 | * @author LauKa | ||
12 | * @contact a062431@vip.qq.com | ||
13 | * @date 2018/05/15 | ||
14 | * @description 新系统丁订单状态 | ||
15 | */ | ||
16 | public enum EJavaShopOrderStateEnum { | ||
17 | WaitPay(1, "待支付"), WaitConfirmed(2, "待确认"), WaitShip(3, "待发货"), | ||
18 | HasReceived(4, "已发货"), RefundFail(6, "交易关闭"),Finished(5, "交易完成"); | ||
19 | |||
20 | private int code; // 错误代码 | ||
21 | private String msg; // 错误消息 | ||
22 | |||
23 | public int getCode() { | ||
24 | return code; | ||
25 | } | ||
26 | |||
27 | public String getMsg() { | ||
28 | return msg; | ||
29 | } | ||
30 | |||
31 | EJavaShopOrderStateEnum(int code, String msg) { | ||
32 | this.code = code; | ||
33 | this.msg = msg; | ||
34 | } | ||
35 | |||
36 | public static EJavaShopOrderStateEnum valueOf(int code) { // 手写的从int到enum的转换函数 | ||
37 | List<EJavaShopOrderStateEnum> enums = EnumUtils.getEnumList(EJavaShopOrderStateEnum.class); | ||
38 | EJavaShopOrderStateEnum result = enums.stream() | ||
39 | .filter(p -> p.getCode() == code) | ||
40 | .findFirst() | ||
41 | .orElse(EJavaShopOrderStateEnum.RefundFail); | ||
42 | return result; | ||
43 | } | ||
44 | |||
45 | |||
46 | public static EJavaShopOrderStateEnum resolve(String code) { | ||
47 | List<EJavaShopOrderStateEnum> enums = EnumUtils.getEnumList(EJavaShopOrderStateEnum.class); | ||
48 | EJavaShopOrderStateEnum result = enums.stream() | ||
49 | .filter(p -> StringUtils.equalsIgnoreCase(String.valueOf(p.getCode()), code)) | ||
50 | .findFirst() | ||
51 | .orElse(EJavaShopOrderStateEnum.RefundFail); | ||
52 | return result; | ||
53 | } | ||
54 | |||
55 | |||
56 | } |
1 | package com.sibu.orderHelper.integral.pineapple.model; | ||
2 | |||
3 | import lombok.Data; | ||
4 | import lombok.ToString; | ||
5 | |||
6 | import java.io.Serializable; | ||
7 | |||
8 | @Data | ||
9 | @ToString | ||
10 | public class CourierCompany implements Serializable{ | ||
11 | |||
12 | |||
13 | private Integer id; | ||
14 | private java.util.Date createTime; | ||
15 | private Integer state; | ||
16 | private String companyMark; | ||
17 | private String companyName; | ||
18 | private Integer seq; | ||
19 | private String companyType; | ||
20 | private Integer sellerId; | ||
21 | } |
com.sibu.orderHelper.model/src/main/java/com/sibu/orderHelper/integral/pineapple/model/Regions.java
0 → 100644
1 | package com.sibu.orderHelper.integral.pineapple.model; | ||
2 | |||
3 | |||
4 | import lombok.Data; | ||
5 | import lombok.ToString; | ||
6 | |||
7 | import java.io.Serializable; | ||
8 | |||
9 | @Data | ||
10 | @ToString | ||
11 | public class Regions implements Serializable{ | ||
12 | |||
13 | private Integer id; | ||
14 | private Integer parentId; | ||
15 | private String regionName; | ||
16 | private String parentPath; | ||
17 | private String firstLetter; | ||
18 | private Integer regionType; | ||
19 | private Integer agencyId; | ||
20 | private Integer shippingId; | ||
21 | private Integer visible; | ||
22 | private String rowId; | ||
23 | } |
-
请 注册 或 登录 后发表评论