新系统应用-菠萝派接口,订单下载(未完成)、商品下载(未完成)、修改订单备注(已完成)、修改库存(已经完成)、订单发货(未完成)
正在显示
15 个修改的文件
包含
320 行增加
和
188 行删除
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; | ||
4 | import com.sibu.orderHelper.integral.pineapple.model.OrdersProduct; | ||
5 | import com.sibu.orderHelper.integral.pineapple.model.Product; | ||
3 | import com.sibu.orderHelper.integral.reponse.CheckRefundStatusResponse; | 6 | import com.sibu.orderHelper.integral.reponse.CheckRefundStatusResponse; |
4 | import com.sibu.orderHelper.integral.reponse.DoingOrderDetailResponse; | 7 | import com.sibu.orderHelper.integral.reponse.DoingOrderDetailResponse; |
5 | import com.sibu.orderHelper.integral.reponse.SkuApiResponse; | 8 | import com.sibu.orderHelper.integral.reponse.SkuApiResponse; |
... | @@ -11,147 +14,76 @@ import java.util.Map; | ... | @@ -11,147 +14,76 @@ import java.util.Map; |
11 | public interface PineappleDao { | 14 | public interface PineappleDao { |
12 | 15 | ||
13 | /** | 16 | /** |
14 | * 退货退款单下载 | 17 | * 根据订单号查询订单信息 只查询不是主订单的订单 |
15 | * @param params | 18 | * @param params |
16 | * @return | 19 | * @return |
17 | */ | 20 | */ |
18 | List<GetRefundBean> pageGetRefundBean(Map<String,Object> params)throws Exception; | 21 | Orders getOrdersByMap(Map<String,Object> params); |
19 | |||
20 | PineappleOderDetailBean getOneIMOrderById(Map<String,Object> map)throws Exception; | ||
21 | |||
22 | |||
23 | |||
24 | |||
25 | |||
26 | //获取api中的商品详情 | ||
27 | IMAPIProductBean getApiProductDetailById(@Param("productId") String productId) throws Exception; | ||
28 | |||
29 | |||
30 | |||
31 | //根据条件查询退款订单 | ||
32 | int countCheckRefundStatusResponse(Map<String,Object> params)throws Exception; | ||
33 | 22 | ||
34 | /** | 23 | /** |
35 | * 根据条件判断该订单是否有成功过的退款记录 | 24 | * 修改订单备注 |
36 | * @param params | 25 | * @param params |
37 | * @return | 26 | * @return |
38 | * @throws Exception | ||
39 | */ | 27 | */ |
40 | IMDoingOrderBean getIMDoingOrderBean(Map<String,Object> params)throws Exception; | 28 | int updateOdersRemark(Map<String,Object> params); |
41 | |||
42 | |||
43 | /** | ||
44 | * 根据orderCode查询成功退款明细记录 | ||
45 | * @param orderCode | ||
46 | * @return | ||
47 | * @throws Exception | ||
48 | */ | ||
49 | List<CheckRefundStatusBean> childrenrefundStatusBySuccess(@Param("orderCode")String orderCode)throws Exception; | ||
50 | |||
51 | 29 | ||
52 | /** | 30 | /** |
53 | * 根据条件判断该订单是否有退款中的退款记录 | 31 | * 查询该订单是否有该快递单号 |
54 | * @param orderCode | ||
55 | * @return | ||
56 | * @throws Exception | ||
57 | */ | ||
58 | List<CheckRefundStatusBean> childrenrefundStatusByCourse(@Param("orderCode")String orderCode)throws Exception; | ||
59 | |||
60 | |||
61 | /** | ||
62 | * 根据条件查询产品 | ||
63 | * @param params | 32 | * @param params |
64 | * @return | 33 | * @return |
65 | * @throws Exception | ||
66 | */ | 34 | */ |
67 | IMProductBean getIMProductBeanByMap(Map<String,Object> params)throws Exception; | 35 | int checkLogisticsNumber(Map<String,Object> params); |
68 | |||
69 | 36 | ||
70 | /** | 37 | /** |
71 | * 修改订单备注 | 38 | * 订单发货更新订单状态与信息 |
72 | * @param params | 39 | * @param params |
73 | * @return | 40 | * @return |
74 | */ | 41 | */ |
75 | int updateSelle(Map<String,Object> params)throws Exception; | 42 | int updateOrdersState(Map<String,Object> params); |
76 | 43 | ||
77 | /** | ||
78 | * 订单发货 | ||
79 | * @param params | ||
80 | * @return | ||
81 | * @throws Exception | ||
82 | */ | ||
83 | int updateBusinessSend(Map<String,Object> params)throws Exception; | ||
84 | 44 | ||
85 | /** | 45 | /** |
86 | * 订单发货时判断订单号是否存在,已存在就不添加该订单号 | 46 | * 商品下载 |
87 | * @param params | 47 | * @param params |
88 | * @return | 48 | * @return |
89 | * @throws Exception | ||
90 | */ | 49 | */ |
91 | int getOrderByMap(Map<String,Object> params)throws Exception; | 50 | List<DownloadProductBean> downloadProductListByMap(Map<String,Object> params); |
92 | 51 | ||
93 | /** | ||
94 | * 根据条件查SKU | ||
95 | * @param params | ||
96 | * @return | ||
97 | * @throws Exception | ||
98 | */ | ||
99 | SkuBean getSkuBeanByMap(Map<String,Object> params)throws Exception; | ||
100 | 52 | ||
101 | /** | 53 | /** |
102 | * 根据产品ID查询所有SKU | 54 | * 根据商品ID获取该商品的所有SKU |
103 | * @param productId | 55 | * @param productId |
104 | * @return | 56 | * @return |
105 | * @throws Exception | ||
106 | */ | 57 | */ |
107 | List<SkuApiResponse> getSkuBeanListByMap(String productId)throws Exception; | 58 | List<DownloadProductSkuBean> downloadSkuByProductId(@Param("productId") String productId); |
108 | 59 | ||
109 | /** | 60 | /** |
110 | * 更新SKU库存 | 61 | * 根据条件更新sku库存 |
111 | * @param skuBean | ||
112 | * @return | ||
113 | * @throws Exception | ||
114 | */ | ||
115 | int updateSku(SkuBean skuBean)throws Exception; | ||
116 | |||
117 | //更新产品库存 | ||
118 | int updateProductInventory(IMProductInventory productInventory) throws Exception; | ||
119 | |||
120 | /** | ||
121 | * 更新产品库存 | ||
122 | * @param params | 62 | * @param params |
123 | * @return | 63 | * @return |
124 | * @throws Exception | ||
125 | */ | 64 | */ |
126 | int updateProduct(Map<String,Object> params)throws Exception; | 65 | int updateSkuStock(Map<String,Object> params); |
127 | |||
128 | 66 | ||
129 | /** | 67 | /** |
130 | * 商品下载 查询产品 | 68 | * 根据商品ID更新商品库存 |
131 | * @param params | 69 | * @param params |
132 | * @return | 70 | * @return |
133 | * @throws Exception | ||
134 | */ | 71 | */ |
135 | List<DownloadProductBean> getProductListByMap(Map<String,Object> params)throws Exception; | 72 | int updateProductStock(Map<String,Object> params); |
136 | 73 | ||
137 | /** | 74 | /** |
138 | * 根据产品ID查询SKU | 75 | * 订单下载 |
139 | * @param productid | 76 | * @param params |
140 | * @return | 77 | * @return |
141 | * @throws Exception | ||
142 | */ | 78 | */ |
143 | List<DownloadProductSkuBean> getDownloadProductSkuBeanList(String productid)throws Exception; | 79 | List<Orders> getOrdersList(Map<String,Object> params); |
144 | 80 | ||
145 | /** | 81 | /** |
146 | * 根据产品ID查询SKU属性 | 82 | * 子订单查询 |
147 | * @param skuId | 83 | * @param orderSn |
148 | * @return | 84 | * @return |
149 | * @throws Exception | ||
150 | */ | 85 | */ |
151 | List<DownloadProductSkuBean> getDownloadSkuBean(@Param("skuId") String skuId)throws Exception; | 86 | List<OrdersProduct> getOrdersProductList(@Param("orderSn")String orderSn); |
152 | |||
153 | 87 | ||
154 | IMDoingOrderBean getOrderListByMap(Map<String,Object> params)throws Exception; | ||
155 | 88 | ||
156 | IMProductBean getIMProductBeanById(@Param("productId") String productId)throws Exception; | ||
157 | } | 89 | } | ... | ... |
com.sibu.orderHelper.model/src/main/java/com/sibu/orderHelper/integral/pineapple/model/Orders.java
0 → 100644
1 | package com.sibu.orderHelper.integral.pineapple.model; | ||
2 | |||
3 | import lombok.Data; | ||
4 | import lombok.ToString; | ||
5 | |||
6 | import java.math.BigDecimal; | ||
7 | import java.util.Date; | ||
8 | import java.util.List; | ||
9 | |||
10 | @Data | ||
11 | @ToString | ||
12 | public class Orders { | ||
13 | private Integer id; | ||
14 | private String orderSn; | ||
15 | private String orderPsn; | ||
16 | private Integer isParent; | ||
17 | private Integer isShow; | ||
18 | private String relationOrderSn; | ||
19 | private Integer orderType; | ||
20 | private Integer sellerId; | ||
21 | private String sellerName; | ||
22 | private Integer memberId; | ||
23 | private String memberName; | ||
24 | private Integer orderState; | ||
25 | private Date payTime; | ||
26 | private Integer paymentStatus; | ||
27 | private Integer invoiceStatus; | ||
28 | private String invoiceTitle; | ||
29 | private String invoiceType; | ||
30 | private BigDecimal moneyProduct; | ||
31 | private BigDecimal moneyLogistics; | ||
32 | private BigDecimal moneyOrder; | ||
33 | private BigDecimal moneyPaidBalance; | ||
34 | private BigDecimal moneyPaidReality; | ||
35 | private BigDecimal moneyCoupon; | ||
36 | private BigDecimal moneyActFull; | ||
37 | private BigDecimal moneyDiscount; | ||
38 | private BigDecimal moneyBack; | ||
39 | private BigDecimal moneyIntegral; | ||
40 | private Integer integral; | ||
41 | private Integer couponUserId; | ||
42 | private Integer actFullId; | ||
43 | private Integer activityId; | ||
44 | private String ip; | ||
45 | private String paymentName; | ||
46 | private String paymentCode; | ||
47 | private String name; | ||
48 | private Integer provinceId; | ||
49 | private Integer cityId; | ||
50 | private Integer areaId; | ||
51 | private String addressAll; | ||
52 | private String addressInfo; | ||
53 | private String mobile; | ||
54 | private String email; | ||
55 | private String zipCode; | ||
56 | private String remark; | ||
57 | private Date deliverTime; | ||
58 | private Date finishTime; | ||
59 | private String tradeSn; | ||
60 | private Integer source; | ||
61 | private Integer logisticsId; | ||
62 | private String logisticsName; | ||
63 | private String logisticsNumber; | ||
64 | private Integer isCodconfim; | ||
65 | private Integer codconfirmId; | ||
66 | private String codconfirmName; | ||
67 | private Date codconfirmTime; | ||
68 | private String codconfirmRemark; | ||
69 | private Integer codconfirmState; | ||
70 | private Date createTime; | ||
71 | private Date DateupdateTime; | ||
72 | private Integer evaluateState; | ||
73 | private String regionName1; | ||
74 | private String regionName2; | ||
75 | private String regionName3; | ||
76 | |||
77 | private List<OrdersProduct> goodinfos; | ||
78 | |||
79 | |||
80 | } |
1 | package com.sibu.orderHelper.integral.pineapple.model; | ||
2 | |||
3 | import lombok.Data; | ||
4 | import lombok.ToString; | ||
5 | |||
6 | import java.math.BigDecimal; | ||
7 | import java.util.Date; | ||
8 | |||
9 | @Data | ||
10 | @ToString | ||
11 | public class OrdersProduct { | ||
12 | private Integer id; | ||
13 | private Integer ordersId; | ||
14 | private String ordersSn; | ||
15 | private String ordersPsn; | ||
16 | private Integer sellerId; | ||
17 | private String sellerName; | ||
18 | private Integer productCateId; | ||
19 | private Integer productId; | ||
20 | private Integer productGoodsId; | ||
21 | private String specInfo; | ||
22 | private String productName; | ||
23 | private String productSku; | ||
24 | private Integer packageGroupsId; | ||
25 | private Integer mallGroupsId; | ||
26 | private Integer giftId; | ||
27 | private Integer isGift; | ||
28 | private BigDecimal moneyPrice; | ||
29 | private Integer number; | ||
30 | private BigDecimal moneyAmount; | ||
31 | private BigDecimal moneyActSingle; | ||
32 | private Integer actSingleId; | ||
33 | private Integer actGroupId; | ||
34 | private Integer actFlashSaleId; | ||
35 | private Integer actFlashSaleProductId; | ||
36 | private Integer actBiddingId; | ||
37 | private Integer actIntegralId; | ||
38 | private Integer actIntegralNum; | ||
39 | private BigDecimal actIntegralMoney; | ||
40 | private String systemRemark; | ||
41 | private Integer backNumber; | ||
42 | private Integer exchangeNumber; | ||
43 | private Date createTime; | ||
44 | private Date updateTime; | ||
45 | private Integer isEvaluate; | ||
46 | |||
47 | |||
48 | } |
com.sibu.orderHelper.model/src/main/java/com/sibu/orderHelper/integral/pineapple/model/Product.java
0 → 100644
1 | package com.sibu.orderHelper.integral.pineapple.model; | ||
2 | |||
3 | import lombok.Data; | ||
4 | import lombok.ToString; | ||
5 | |||
6 | import java.math.BigDecimal; | ||
7 | import java.util.Date; | ||
8 | |||
9 | @Data | ||
10 | @ToString | ||
11 | public class Product { | ||
12 | private Integer id; | ||
13 | private Integer productCateId; | ||
14 | private String productCatePath; | ||
15 | private String name1; | ||
16 | private String name2; | ||
17 | private String keyword; | ||
18 | private Integer productBrandId; | ||
19 | private Integer isSelf; | ||
20 | private BigDecimal costPrice; | ||
21 | private BigDecimal protectedPrice; | ||
22 | private BigDecimal marketPrice; | ||
23 | private BigDecimal mallPcPrice; | ||
24 | private BigDecimal malMobilePrice; | ||
25 | private Integer virtualSales; | ||
26 | private Integer actualSales; | ||
27 | private Integer productStock; | ||
28 | private Integer isNorm; | ||
29 | private String normIds; | ||
30 | private String normName; | ||
31 | private Integer state; | ||
32 | private Integer isTop; | ||
33 | private Date upTime; | ||
34 | private String description; | ||
35 | private String packing; | ||
36 | private Integer sellerId; | ||
37 | private Integer createId; | ||
38 | private Date createTime; | ||
39 | private Date updateTime; | ||
40 | private Integer sellerCateId; | ||
41 | private Integer sellerIsTop; | ||
42 | private Integer sellerState; | ||
43 | private Integer commentsNumber; | ||
44 | private Integer productCateState; | ||
45 | private Integer isInventedProduct; | ||
46 | private Integer transportType; | ||
47 | private Integer transportId; | ||
48 | private String masterImg; | ||
49 | private String productCode; | ||
50 | private BigDecimal saleScale1; | ||
51 | private BigDecimal saleScale2; | ||
52 | |||
53 | |||
54 | } |
1 | package com.sibu.orderHelper.integral.pineapple.model; | ||
2 | |||
3 | import lombok.Data; | ||
4 | import lombok.ToString; | ||
5 | |||
6 | @Data | ||
7 | @ToString | ||
8 | public class ProductGoods { | ||
9 | private Long id; | ||
10 | private Long productId; | ||
11 | private String normAttrId; | ||
12 | private String normName; | ||
13 | private Double mallPcPrice; | ||
14 | private Double mallMobilePrice; | ||
15 | private Long productStock; | ||
16 | private Long productStockWarning; | ||
17 | private Long actualSales; | ||
18 | private String sku; | ||
19 | private String images; | ||
20 | private Long state; | ||
21 | private Double weight; | ||
22 | private Long length; | ||
23 | private Long width; | ||
24 | private Long height; | ||
25 | |||
26 | |||
27 | } |
... | @@ -12,6 +12,7 @@ public class PineappleSyncStockRequest { | ... | @@ -12,6 +12,7 @@ public class PineappleSyncStockRequest { |
12 | @JsonProperty("PlatProductID") | 12 | @JsonProperty("PlatProductID") |
13 | private String platProductID; | 13 | private String platProductID; |
14 | 14 | ||
15 | @NotBlank(message = "skuid参数不能为空") | ||
15 | @JsonProperty("SkuID") | 16 | @JsonProperty("SkuID") |
16 | private String skuID; | 17 | private String skuID; |
17 | 18 | ... | ... |
... | @@ -45,7 +45,7 @@ public class PineappleServiceImpl implements PineappleService { | ... | @@ -45,7 +45,7 @@ public class PineappleServiceImpl implements PineappleService { |
45 | params.put("endTime",""); | 45 | params.put("endTime",""); |
46 | params.put("pageNow","1"); | 46 | params.put("pageNow","1"); |
47 | params.put("PageSize","10"); | 47 | params.put("PageSize","10"); |
48 | return pineappleDao.pageGetRefundBean(params); | 48 | return null; |
49 | } | 49 | } |
50 | 50 | ||
51 | @Override | 51 | @Override |
... | @@ -68,7 +68,7 @@ public class PineappleServiceImpl implements PineappleService { | ... | @@ -68,7 +68,7 @@ public class PineappleServiceImpl implements PineappleService { |
68 | @Override | 68 | @Override |
69 | public PineappleSyncStockResponse updateSyncStock(PineappleSyncStockRequest pineappleSyncStockRequest) throws Exception { | 69 | public PineappleSyncStockResponse updateSyncStock(PineappleSyncStockRequest pineappleSyncStockRequest) throws Exception { |
70 | PineappleSyncStockResponse pineappleSyncStockResponse = new PineappleSyncStockResponse(); | 70 | PineappleSyncStockResponse pineappleSyncStockResponse = new PineappleSyncStockResponse(); |
71 | Map<String,Object> params = new HashMap<>(); | 71 | /* Map<String,Object> params = new HashMap<>(); |
72 | params.put("supplierId",""); | 72 | params.put("supplierId",""); |
73 | params.put("productId",pineappleSyncStockRequest.getPlatProductID()); | 73 | params.put("productId",pineappleSyncStockRequest.getPlatProductID()); |
74 | //先判断SKU在判断产品 | 74 | //先判断SKU在判断产品 |
... | @@ -144,12 +144,13 @@ public class PineappleServiceImpl implements PineappleService { | ... | @@ -144,12 +144,13 @@ public class PineappleServiceImpl implements PineappleService { |
144 | pineappleSyncStockResponse.setQuantity(String.valueOf(pineappleSyncStockRequest.getQuantity())); | 144 | pineappleSyncStockResponse.setQuantity(String.valueOf(pineappleSyncStockRequest.getQuantity())); |
145 | pineappleSyncStockResponse.setMessage(PineappleEnum.ERROR.getMsg()); | 145 | pineappleSyncStockResponse.setMessage(PineappleEnum.ERROR.getMsg()); |
146 | pineappleSyncStockResponse.setCode(PineappleEnum.ERROR.getCode()); | 146 | pineappleSyncStockResponse.setCode(PineappleEnum.ERROR.getCode()); |
147 | return pineappleSyncStockResponse; | 147 | return pineappleSyncStockResponse;*/ |
148 | return null; | ||
148 | } | 149 | } |
149 | 150 | ||
150 | @Override | 151 | @Override |
151 | public BaseResponse shipments(PineappleSendRequest pineappleSend) throws Exception { | 152 | public BaseResponse shipments(PineappleSendRequest pineappleSend) throws Exception { |
152 | BaseResponse baseResponse =new BaseResponse(); | 153 | /*BaseResponse baseResponse =new BaseResponse(); |
153 | Map<String,Object> params = new HashMap<>(); | 154 | Map<String,Object> params = new HashMap<>(); |
154 | String redisMysqlDbConfig = ""; | 155 | String redisMysqlDbConfig = ""; |
155 | //订单号不符合 | 156 | //订单号不符合 |
... | @@ -200,12 +201,13 @@ public class PineappleServiceImpl implements PineappleService { | ... | @@ -200,12 +201,13 @@ public class PineappleServiceImpl implements PineappleService { |
200 | pineappleDao.updateBusinessSend(params); | 201 | pineappleDao.updateBusinessSend(params); |
201 | baseResponse.setMessage(PineappleEnum.ERROR.getMsg()); | 202 | baseResponse.setMessage(PineappleEnum.ERROR.getMsg()); |
202 | baseResponse.setCode(PineappleEnum.ERROR.getCode()); | 203 | baseResponse.setCode(PineappleEnum.ERROR.getCode()); |
203 | return baseResponse; | 204 | return baseResponse;*/ |
205 | return null; | ||
204 | } | 206 | } |
205 | 207 | ||
206 | @Override | 208 | @Override |
207 | public UpdateSellerMemoResponse updateSelle(UpdateSellerMemoRequest updateSellerMemoRequest)throws Exception { | 209 | public UpdateSellerMemoResponse updateSelle(UpdateSellerMemoRequest updateSellerMemoRequest)throws Exception { |
208 | UpdateSellerMemoResponse UpdateSellerMemoResponse =new UpdateSellerMemoResponse(); | 210 | /* UpdateSellerMemoResponse UpdateSellerMemoResponse =new UpdateSellerMemoResponse(); |
209 | Map<String,Object> params = new HashMap<>(); | 211 | Map<String,Object> params = new HashMap<>(); |
210 | String redisMysqlDbConfig = ""; | 212 | String redisMysqlDbConfig = ""; |
211 | //订单号不符合 | 213 | //订单号不符合 |
... | @@ -226,6 +228,7 @@ public class PineappleServiceImpl implements PineappleService { | ... | @@ -226,6 +228,7 @@ public class PineappleServiceImpl implements PineappleService { |
226 | UpdateSellerMemoResponse.setCode(PineappleEnum.SUCCESS.getCode()); | 228 | UpdateSellerMemoResponse.setCode(PineappleEnum.SUCCESS.getCode()); |
227 | UpdateSellerMemoResponse.setMessage(PineappleEnum.SUCCESS.getMsg()); | 229 | UpdateSellerMemoResponse.setMessage(PineappleEnum.SUCCESS.getMsg()); |
228 | 230 | ||
229 | return UpdateSellerMemoResponse; | 231 | return UpdateSellerMemoResponse;*/ |
232 | return null; | ||
230 | } | 233 | } |
231 | } | 234 | } | ... | ... |
... | @@ -32,7 +32,7 @@ public class CheckRefundStatusBizServiceImpl extends AbstractBizService<CheckRef | ... | @@ -32,7 +32,7 @@ public class CheckRefundStatusBizServiceImpl extends AbstractBizService<CheckRef |
32 | params.put("orderCode",callRequest.getBizModel().getOrderID()); | 32 | params.put("orderCode",callRequest.getBizModel().getOrderID()); |
33 | List<CheckRefundStatusBean> checkRefundStatusBeanList = new ArrayList<>(); | 33 | List<CheckRefundStatusBean> checkRefundStatusBeanList = new ArrayList<>(); |
34 | 34 | ||
35 | 35 | /* | |
36 | //先判断是否有退款 | 36 | //先判断是否有退款 |
37 | if(pineappleDao.countCheckRefundStatusResponse(params)>0){ | 37 | if(pineappleDao.countCheckRefundStatusResponse(params)>0){ |
38 | Map<String,Object> map = new HashMap<>(); | 38 | Map<String,Object> map = new HashMap<>(); |
... | @@ -112,7 +112,7 @@ public class CheckRefundStatusBizServiceImpl extends AbstractBizService<CheckRef | ... | @@ -112,7 +112,7 @@ public class CheckRefundStatusBizServiceImpl extends AbstractBizService<CheckRef |
112 | checkRefundStatusResponse.setRefundStatusdescription(PineappleRefundEnum.JH_07.getMsg()); | 112 | checkRefundStatusResponse.setRefundStatusdescription(PineappleRefundEnum.JH_07.getMsg()); |
113 | checkRefundStatusResponse.setChildrenrefundStatus(new ArrayList()); | 113 | checkRefundStatusResponse.setChildrenrefundStatus(new ArrayList()); |
114 | checkRefundStatusResponse.setCode(PineappleEnum.SUCCESS.getCode()); | 114 | checkRefundStatusResponse.setCode(PineappleEnum.SUCCESS.getCode()); |
115 | checkRefundStatusResponse.setMessage(PineappleEnum.SUCCESS.getMsg()); | 115 | checkRefundStatusResponse.setMessage(PineappleEnum.SUCCESS.getMsg());*/ |
116 | return checkRefundStatusResponse; | 116 | return checkRefundStatusResponse; |
117 | } | 117 | } |
118 | 118 | ... | ... |
... | @@ -30,9 +30,9 @@ public class DownloadProductBizServiceImpl extends AbstractBizService<DownloadP | ... | @@ -30,9 +30,9 @@ public class DownloadProductBizServiceImpl extends AbstractBizService<DownloadP |
30 | DownloadProductResponse downloadProductResponse = new DownloadProductResponse(); | 30 | DownloadProductResponse downloadProductResponse = new DownloadProductResponse(); |
31 | Map<String,Object> params =new HashMap<>(); | 31 | Map<String,Object> params =new HashMap<>(); |
32 | params.put("supplierId",callRequest.getSupplier().getId()); | 32 | params.put("supplierId",callRequest.getSupplier().getId()); |
33 | if(!StringUtil.isNull(callRequest.getBizModel().getStatus())){ | 33 | /*if(!StringUtil.isNull(callRequest.getBizModel().getStatus())){ |
34 | params.put("isShow", DownloadProductStatusEnum.resolve(callRequest.getBizModel().getStatus()).intValue()); | 34 | params.put("isShow", DownloadProductStatusEnum.resolve(callRequest.getBizModel().getStatus()).intValue()); |
35 | } | 35 | }*/ |
36 | params.put("PageIndex",(callRequest.getBizModel().getPageIndex() - 1) * callRequest.getBizModel().getPageSize()); | 36 | params.put("PageIndex",(callRequest.getBizModel().getPageIndex() - 1) * callRequest.getBizModel().getPageSize()); |
37 | params.put("PageSize",callRequest.getBizModel().getPageSize()); | 37 | params.put("PageSize",callRequest.getBizModel().getPageSize()); |
38 | if(!StringUtil.isNull(callRequest.getBizModel().getProductId())){ | 38 | if(!StringUtil.isNull(callRequest.getBizModel().getProductId())){ |
... | @@ -42,34 +42,13 @@ public class DownloadProductBizServiceImpl extends AbstractBizService<DownloadP | ... | @@ -42,34 +42,13 @@ public class DownloadProductBizServiceImpl extends AbstractBizService<DownloadP |
42 | params.put("productName",callRequest.getBizModel().getPageSize()); | 42 | params.put("productName",callRequest.getBizModel().getPageSize()); |
43 | } | 43 | } |
44 | //查询产品 | 44 | //查询产品 |
45 | List<DownloadProductBean> downloadProductBeanList = pineappleDao.getProductListByMap(params); | 45 | List<DownloadProductBean> downloadProductBeanList = pineappleDao.downloadProductListByMap(params); |
46 | if(!StringUtil.isNull(downloadProductBeanList) && !downloadProductBeanList.isEmpty()){ | 46 | if(!StringUtil.isNull(downloadProductBeanList) && !downloadProductBeanList.isEmpty()){ |
47 | for(DownloadProductBean product : downloadProductBeanList){ | 47 | for(DownloadProductBean product : downloadProductBeanList){ |
48 | //产品SKU | 48 | //产品SKU |
49 | List<DownloadProductSkuBean> downloadProductSkuBeanList = pineappleDao.getDownloadProductSkuBeanList(product.getPlatProductID()); | 49 | List<DownloadProductSkuBean> downloadProductSkuBeanList = pineappleDao.downloadSkuByProductId(product.getPlatProductID()); |
50 | if(!StringUtil.isNull(downloadProductSkuBeanList) && !downloadProductSkuBeanList.isEmpty()){ | ||
51 | for(int i=0;i<downloadProductSkuBeanList.size();i++){ | ||
52 | DownloadProductSkuBean sku = downloadProductSkuBeanList.get(i); | ||
53 | //查询SKU规格名称 | ||
54 | List<DownloadProductSkuBean> skuList = pineappleDao.getDownloadSkuBean(sku.getSkuID()); | ||
55 | if(!StringUtil.isNull(skuList) && !skuList.isEmpty()){ | ||
56 | StringBuffer sb = new StringBuffer(); | ||
57 | for(int j = 0;j<skuList.size();j++){ | ||
58 | if(j ==0){ | ||
59 | sb.append(skuList.get(j).getSkuname()); | ||
60 | }else{ | ||
61 | sb.append(","+skuList.get(j).getSkuname()); | ||
62 | } | ||
63 | } | ||
64 | sku.setSkuname(sb.toString()); | ||
65 | sku.setSkupictureurl(product.getPictureurl()); | ||
66 | } | ||
67 | |||
68 | } | ||
69 | } | ||
70 | product.setSkus(downloadProductSkuBeanList); | 50 | product.setSkus(downloadProductSkuBeanList); |
71 | }; | 51 | }; |
72 | |||
73 | downloadProductResponse.setTotalcount(downloadProductBeanList.size()); | 52 | downloadProductResponse.setTotalcount(downloadProductBeanList.size()); |
74 | }else{ | 53 | }else{ |
75 | downloadProductResponse.setTotalcount(0); | 54 | downloadProductResponse.setTotalcount(0); | ... | ... |
... | @@ -11,6 +11,7 @@ import com.sibu.orderHelper.integral.model.IMProductBean; | ... | @@ -11,6 +11,7 @@ import com.sibu.orderHelper.integral.model.IMProductBean; |
11 | import com.sibu.orderHelper.integral.model.IMSupplier; | 11 | import com.sibu.orderHelper.integral.model.IMSupplier; |
12 | import com.sibu.orderHelper.integral.pineapple.constant.PineAppleConst; | 12 | import com.sibu.orderHelper.integral.pineapple.constant.PineAppleConst; |
13 | import com.sibu.orderHelper.integral.pineapple.exception.BizException; | 13 | import com.sibu.orderHelper.integral.pineapple.exception.BizException; |
14 | import com.sibu.orderHelper.integral.pineapple.model.Orders; | ||
14 | import com.sibu.orderHelper.integral.pineapple.request.CallRequest; | 15 | import com.sibu.orderHelper.integral.pineapple.request.CallRequest; |
15 | 16 | ||
16 | import com.sibu.orderHelper.integral.pineapple.request.GetOrderRequest; | 17 | import com.sibu.orderHelper.integral.pineapple.request.GetOrderRequest; |
... | @@ -57,11 +58,27 @@ public class GetOrderBizServiceImpl extends AbstractBizService<GetOrderRequest> | ... | @@ -57,11 +58,27 @@ public class GetOrderBizServiceImpl extends AbstractBizService<GetOrderRequest> |
57 | 58 | ||
58 | @Override | 59 | @Override |
59 | public BaseResponse call(CallRequest<GetOrderRequest> callRequest) { | 60 | public BaseResponse call(CallRequest<GetOrderRequest> callRequest) { |
60 | if (StringUtils.isNotBlank(callRequest.getBizModel().getPlatOrderNo())) { | 61 | Map<String,Object> params = new HashMap<>(); |
61 | return this.findByOrderCode(callRequest); | 62 | if(!StringUtil.isNull(callRequest.getBizModel().getPlatOrderNo())){ |
62 | } else { | 63 | params.put("orderSn",callRequest.getBizModel().getPlatOrderNo()); |
63 | return this.findList(callRequest); | ||
64 | } | 64 | } |
65 | params.put("sellerId",callRequest.getSupplier().getId()); | ||
66 | if(!StringUtil.isNull(callRequest.getBizModel().getStartTime())){ | ||
67 | params.put("startTime",callRequest.getBizModel().getStartTime()); | ||
68 | } | ||
69 | if(!StringUtil.isNull(callRequest.getBizModel().getEndTime())){ | ||
70 | params.put("endTime",callRequest.getBizModel().getEndTime()); | ||
71 | } | ||
72 | params.put("PageIndex",(callRequest.getBizModel().getPageIndex() - 1) * callRequest.getBizModel().getPageSize()); | ||
73 | params.put("PageSize",callRequest.getBizModel().getPageSize()); | ||
74 | List<Orders> ordersList = pineappleDao.getOrdersList(params); | ||
75 | |||
76 | |||
77 | GetOrderResponse response = new GetOrderResponse(); | ||
78 | response.setNumTotalOrder(0); | ||
79 | response.setOrders(null); | ||
80 | response.setCode(PineAppleConst.SUCCESS_CODE); | ||
81 | return response; | ||
65 | } | 82 | } |
66 | 83 | ||
67 | 84 | ||
... | @@ -70,7 +87,7 @@ public class GetOrderBizServiceImpl extends AbstractBizService<GetOrderRequest> | ... | @@ -70,7 +87,7 @@ public class GetOrderBizServiceImpl extends AbstractBizService<GetOrderRequest> |
70 | return "Differ.JH.Business.GetOrder"; | 87 | return "Differ.JH.Business.GetOrder"; |
71 | } | 88 | } |
72 | 89 | ||
73 | 90 | /* | |
74 | private GetOrderResponse findByOrderCode(CallRequest<GetOrderRequest> callRequest) { | 91 | private GetOrderResponse findByOrderCode(CallRequest<GetOrderRequest> callRequest) { |
75 | DoingOrderDetailResponse order = null; | 92 | DoingOrderDetailResponse order = null; |
76 | try { | 93 | try { |
... | @@ -184,5 +201,5 @@ public class GetOrderBizServiceImpl extends AbstractBizService<GetOrderRequest> | ... | @@ -184,5 +201,5 @@ public class GetOrderBizServiceImpl extends AbstractBizService<GetOrderRequest> |
184 | response.setCode(PineAppleConst.SUCCESS_CODE); | 201 | response.setCode(PineAppleConst.SUCCESS_CODE); |
185 | 202 | ||
186 | return response; | 203 | return response; |
187 | } | 204 | }*/ |
188 | } | 205 | } | ... | ... |
... | @@ -34,7 +34,7 @@ public class GetRefundBizServiceImpl extends AbstractBizService<GetRefundReques | ... | @@ -34,7 +34,7 @@ public class GetRefundBizServiceImpl extends AbstractBizService<GetRefundReques |
34 | 34 | ||
35 | @Override | 35 | @Override |
36 | public GetRefundResponse call(CallRequest<GetRefundRequest> callRequest) throws Exception { | 36 | public GetRefundResponse call(CallRequest<GetRefundRequest> callRequest) throws Exception { |
37 | GetRefundResponse getRefundResponse =new GetRefundResponse(); | 37 | /*GetRefundResponse getRefundResponse =new GetRefundResponse(); |
38 | Map<String,Object> params = new HashMap<>(); | 38 | Map<String,Object> params = new HashMap<>(); |
39 | params.put("supplierId",callRequest.getSupplier().getId()); | 39 | params.put("supplierId",callRequest.getSupplier().getId()); |
40 | params.put("beginTime",callRequest.getBizModel().getBeginTime()); | 40 | params.put("beginTime",callRequest.getBizModel().getBeginTime()); |
... | @@ -83,8 +83,8 @@ public class GetRefundBizServiceImpl extends AbstractBizService<GetRefundReques | ... | @@ -83,8 +83,8 @@ public class GetRefundBizServiceImpl extends AbstractBizService<GetRefundReques |
83 | getRefundResponse.setRefunds(refundBeanList); | 83 | getRefundResponse.setRefunds(refundBeanList); |
84 | getRefundResponse.setSuccess(true); | 84 | getRefundResponse.setSuccess(true); |
85 | getRefundResponse.setCode(PineappleEnum.SUCCESS.getCode()); | 85 | getRefundResponse.setCode(PineappleEnum.SUCCESS.getCode()); |
86 | getRefundResponse.setMessage(PineappleEnum.SUCCESS.getMsg()); | 86 | getRefundResponse.setMessage(PineappleEnum.SUCCESS.getMsg());*/ |
87 | return getRefundResponse; | 87 | return null; |
88 | } | 88 | } |
89 | 89 | ||
90 | @Override | 90 | @Override | ... | ... |
... | @@ -10,6 +10,7 @@ import com.sibu.orderHelper.enums.PineappleMethodsEnum; | ... | @@ -10,6 +10,7 @@ import com.sibu.orderHelper.enums.PineappleMethodsEnum; |
10 | import com.sibu.orderHelper.integral.dao.PineappleDao; | 10 | import com.sibu.orderHelper.integral.dao.PineappleDao; |
11 | import com.sibu.orderHelper.integral.model.IMDoingOrderBean; | 11 | import com.sibu.orderHelper.integral.model.IMDoingOrderBean; |
12 | import com.sibu.orderHelper.integral.pineapple.exception.BizException; | 12 | import com.sibu.orderHelper.integral.pineapple.exception.BizException; |
13 | import com.sibu.orderHelper.integral.pineapple.model.Orders; | ||
13 | import com.sibu.orderHelper.integral.pineapple.request.CallRequest; | 14 | import com.sibu.orderHelper.integral.pineapple.request.CallRequest; |
14 | import com.sibu.orderHelper.integral.pineapple.response.BaseResponse; | 15 | import com.sibu.orderHelper.integral.pineapple.response.BaseResponse; |
15 | import com.sibu.orderHelper.integral.request.PineappleSendRequest; | 16 | import com.sibu.orderHelper.integral.request.PineappleSendRequest; |
... | @@ -32,53 +33,42 @@ public class PineappleSendBizServiceImpl extends AbstractBizService<PineappleSen | ... | @@ -32,53 +33,42 @@ public class PineappleSendBizServiceImpl extends AbstractBizService<PineappleSen |
32 | public BaseResponse call(CallRequest<PineappleSendRequest> callRequest) throws Exception { | 33 | public BaseResponse call(CallRequest<PineappleSendRequest> callRequest) throws Exception { |
33 | BaseResponse baseResponse =new BaseResponse(); | 34 | BaseResponse baseResponse =new BaseResponse(); |
34 | Map<String,Object> params = new HashMap<>(); | 35 | Map<String,Object> params = new HashMap<>(); |
35 | String redisMysqlDbConfig = ""; | 36 | params.put("orderSn",callRequest.getBizModel().getPlatOrderNo()); |
36 | Integer dataBaseModule = DbUtil.getOrderInWhichDataBase(callRequest.getBizModel().getPlatOrderNo()); | 37 | params.put("sellerId",callRequest.getSupplier().getId()); |
37 | String tableIndex = DbUtil.getOrderInWhichTable(callRequest.getBizModel().getPlatOrderNo()); | ||
38 | redisMysqlDbConfig = String.format(AppConstants.REDIS_DB_TYPE, AppConstants.INTEGRALMALL_ORDER_DATABASE, dataBaseModule.intValue()); | ||
39 | params.put("doingOrderTable","im_doing_order_" + tableIndex); | ||
40 | params.put("orderCode",callRequest.getBizModel().getPlatOrderNo()); | ||
41 | params.put("supplierId",callRequest.getSupplier().getId()); | ||
42 | //只有订单状态为3 4 5 才允许修改地址,快递单号,其中状态为3还可以修改ERP状态与时间,发货时间,订单状态,其他订单状态直接报业务异常 | 38 | //只有订单状态为3 4 5 才允许修改地址,快递单号,其中状态为3还可以修改ERP状态与时间,发货时间,订单状态,其他订单状态直接报业务异常 |
43 | DBContextHolder.setDBType(redisMysqlDbConfig);//切换数据源 | 39 | Orders orders = pineappleDao.getOrdersByMap(params); |
44 | IMDoingOrderBean iMDoingOrderBean = pineappleDao.getOrderListByMap(params); | 40 | if(StringUtil.isNull(orders)){ |
45 | if(StringUtil.isNull(iMDoingOrderBean)){ | 41 | log.error("获取订单数据业务异常:"+callRequest.getBizModel().getPlatOrderNo()); |
46 | log.error("获取订单数据业务异常"); | 42 | throw new BizException("获取订单数据业务异常:"+callRequest.getBizModel().getPlatOrderNo()); |
47 | throw new BizException("获取订单数据业务异常"); | ||
48 | } | 43 | } |
49 | 44 | ||
50 | if(iMDoingOrderBean.getOrderStatus().intValue() == PayOrderStatus.HasReceived.getCode() || iMDoingOrderBean.getOrderStatus().intValue() == PayOrderStatus.HasDelive.getCode() | 45 | if(orders.getOrderState().intValue() == PayOrderStatus.HasReceived.getCode() || orders.getOrderState().intValue() == PayOrderStatus.HasDelive.getCode() |
51 | || iMDoingOrderBean.getOrderStatus().intValue() == PayOrderStatus.WaitShip.getCode()){ | 46 | || orders.getOrderState().intValue() == PayOrderStatus.WaitShip.getCode()){ |
52 | if(iMDoingOrderBean.getOrderStatus().intValue() == PayOrderStatus.WaitShip.getCode()){ | 47 | if(orders.getOrderState().intValue() == PayOrderStatus.WaitShip.getCode()){ |
53 | params.put("orderStatus",PayOrderStatus.HasReceived.getCode()); | 48 | params.put("orderState",PayOrderStatus.HasReceived.getCode()); |
54 | params.put("erpImportDt",new Date()); | 49 | params.put("deliverTime",new Date()); |
55 | params.put("shipDt",new Date()); | ||
56 | } | 50 | } |
57 | if(!StringUtil.isNull(callRequest.getBizModel().getLogisticNo())){ | ||
58 | params.put("expressCode",callRequest.getBizModel().getLogisticNo()); | ||
59 | } | ||
60 | DBContextHolder.setDBType(redisMysqlDbConfig);//切换数据源 | ||
61 | //判断该快递订单号是否存在,已存在就不允许把该快递订单号添加进去 | 51 | //判断该快递订单号是否存在,已存在就不允许把该快递订单号添加进去 |
62 | int num = pineappleDao.getOrderByMap(params); | 52 | int num = pineappleDao.checkLogisticsNumber(params); |
63 | 53 | if(num == 0){ | |
64 | if(num > 0){ | ||
65 | params.put("expressCode",""); | ||
66 | }else{ | ||
67 | if(!StringUtil.isNull(callRequest.getBizModel().getLogisticNo())){ | 54 | if(!StringUtil.isNull(callRequest.getBizModel().getLogisticNo())){ |
68 | if(StringUtil.isNull(iMDoingOrderBean.getExpressCode())){ | 55 | if(StringUtil.isNull(orders.getLogisticsNumber())){ |
69 | params.put("expressCode",callRequest.getBizModel().getLogisticNo()); | 56 | params.put("logisticsNumber",callRequest.getBizModel().getLogisticNo()); |
70 | }else{ | 57 | }else{ |
71 | params.put("expressCode",iMDoingOrderBean.getExpressCode()+";"+callRequest.getBizModel().getLogisticNo()); | 58 | params.put("logisticsNumber",orders.getLogisticsNumber()+";"+callRequest.getBizModel().getLogisticNo()); |
72 | } | 59 | } |
73 | } | 60 | } |
74 | } | 61 | } |
75 | if(StringUtil.isNull(callRequest.getBizModel().getSenderName())){ | 62 | //收货人名字 |
76 | params.put("buyerUsername",""); | 63 | if(!StringUtil.isNull(callRequest.getBizModel().getSenderName())){ |
64 | params.put("name",callRequest.getBizModel().getSenderName()); | ||
77 | } | 65 | } |
66 | //电话 | ||
78 | if(!StringUtil.isNull(callRequest.getBizModel().getSenderTel())){ | 67 | if(!StringUtil.isNull(callRequest.getBizModel().getSenderTel())){ |
79 | params.put("buyerPhone",callRequest.getBizModel().getSenderTel()); | 68 | params.put("mobile",callRequest.getBizModel().getSenderTel()); |
80 | } | 69 | } |
81 | if(!StringUtil.isNull(callRequest.getBizModel().getSenderAddress())){ | 70 | //地址 良品不需要更改地址 |
71 | /* if(!StringUtil.isNull(callRequest.getBizModel().getSenderAddress())){ | ||
82 | String [] str = callRequest.getBizModel().getSenderAddress().split(" "); | 72 | String [] str = callRequest.getBizModel().getSenderAddress().split(" "); |
83 | if(!StringUtil.isNull(str) && str.length >3){ | 73 | if(!StringUtil.isNull(str) && str.length >3){ |
84 | params.put("province",str[0]); | 74 | params.put("province",str[0]); |
... | @@ -88,20 +78,24 @@ public class PineappleSendBizServiceImpl extends AbstractBizService<PineappleSen | ... | @@ -88,20 +78,24 @@ public class PineappleSendBizServiceImpl extends AbstractBizService<PineappleSen |
88 | for(int i = 3;i<str.length;i++){ | 78 | for(int i = 3;i<str.length;i++){ |
89 | address.append(str[i]); | 79 | address.append(str[i]); |
90 | } | 80 | } |
91 | params.put("address",str[0]+"-"+str[1]+"-"+str[2]+"-"+address); | 81 | params.put("addressAll",str[0]+"-"+str[1]+"-"+str[2]); |
82 | params.put("addressInfo",str[0]+"-"+str[1]+"-"+str[2]+"-"+address); | ||
92 | }else{ | 83 | }else{ |
93 | log.error(String.format("订单号:%s,地址不符合要求:%s,请求method:%s,appket:%s",callRequest.getBizModel().getPlatOrderNo(),callRequest.getBizModel().getSenderAddress(),callRequest.getRequest().getMethod(),callRequest.getRequest().getAppkey())); | 84 | log.error(String.format("订单号:%s,地址不符合要求:%s,请求method:%s,appket:%s",callRequest.getBizModel().getPlatOrderNo(),callRequest.getBizModel().getSenderAddress(),callRequest.getRequest().getMethod(),callRequest.getRequest().getAppkey())); |
94 | throw new BizException(String.format("订单号:%s,地址不符合要求:%s,请求method:%s,appket:%s",callRequest.getBizModel().getPlatOrderNo(),callRequest.getBizModel().getSenderAddress(),callRequest.getRequest().getMethod(),callRequest.getRequest().getAppkey())); | 85 | throw new BizException(String.format("订单号:%s,地址不符合要求:%s,请求method:%s,appket:%s",callRequest.getBizModel().getPlatOrderNo(),callRequest.getBizModel().getSenderAddress(),callRequest.getRequest().getMethod(),callRequest.getRequest().getAppkey())); |
95 | } | 86 | } |
96 | } | 87 | }*/ |
97 | params.put("expressName",callRequest.getBizModel().getLogisticName()); | 88 | //物流公司名字 |
89 | if(StringUtil.isNull(orders.getLogisticsName())){ | ||
90 | params.put("expressName",callRequest.getBizModel().getLogisticName()); | ||
98 | 91 | ||
92 | } | ||
99 | }else{ | 93 | }else{ |
100 | log.error("订单发货接口,该订单状态不允许进行发货操作,订单号:"+callRequest.getBizModel().getPlatOrderNo()); | 94 | log.error("订单发货接口,该订单状态不允许进行发货操作,订单号:"+callRequest.getBizModel().getPlatOrderNo()); |
101 | throw new BizException("订单发货接口,该订单状态不允许进行发货操作,订单号:"+callRequest.getBizModel().getPlatOrderNo()); | 95 | throw new BizException("订单发货接口,该订单状态不允许进行发货操作,订单号:"+callRequest.getBizModel().getPlatOrderNo()); |
102 | } | 96 | } |
103 | DBContextHolder.setDBType(redisMysqlDbConfig);//切换数据源 | 97 | //修改订单信息 |
104 | pineappleDao.updateBusinessSend(params); | 98 | pineappleDao.updateOrdersState(params); |
105 | baseResponse.setMessage(PineappleEnum.SUCCESS.getMsg()); | 99 | baseResponse.setMessage(PineappleEnum.SUCCESS.getMsg()); |
106 | baseResponse.setCode(PineappleEnum.SUCCESS.getCode()); | 100 | baseResponse.setCode(PineappleEnum.SUCCESS.getCode()); |
107 | return baseResponse; | 101 | return baseResponse; | ... | ... |
此文件的差异被折叠,
点击展开。
... | @@ -9,6 +9,7 @@ import com.sibu.orderHelper.enums.PineappleMethodsEnum; | ... | @@ -9,6 +9,7 @@ import com.sibu.orderHelper.enums.PineappleMethodsEnum; |
9 | import com.sibu.orderHelper.integral.dao.PineappleDao; | 9 | import com.sibu.orderHelper.integral.dao.PineappleDao; |
10 | import com.sibu.orderHelper.integral.model.IMDoingOrderBean; | 10 | import com.sibu.orderHelper.integral.model.IMDoingOrderBean; |
11 | import com.sibu.orderHelper.integral.pineapple.exception.BizException; | 11 | import com.sibu.orderHelper.integral.pineapple.exception.BizException; |
12 | import com.sibu.orderHelper.integral.pineapple.model.Orders; | ||
12 | import com.sibu.orderHelper.integral.pineapple.request.CallRequest; | 13 | import com.sibu.orderHelper.integral.pineapple.request.CallRequest; |
13 | import com.sibu.orderHelper.integral.reponse.UpdateSellerMemoResponse; | 14 | import com.sibu.orderHelper.integral.reponse.UpdateSellerMemoResponse; |
14 | import com.sibu.orderHelper.integral.request.UpdateSellerMemoRequest; | 15 | import com.sibu.orderHelper.integral.request.UpdateSellerMemoRequest; |
... | @@ -30,22 +31,18 @@ public class UpdateSellerMemoBizServiceImpl extends AbstractBizService<UpdateS | ... | @@ -30,22 +31,18 @@ public class UpdateSellerMemoBizServiceImpl extends AbstractBizService<UpdateS |
30 | public UpdateSellerMemoResponse call(CallRequest<UpdateSellerMemoRequest> callRequest) throws Exception { | 31 | public UpdateSellerMemoResponse call(CallRequest<UpdateSellerMemoRequest> callRequest) throws Exception { |
31 | UpdateSellerMemoResponse UpdateSellerMemoResponse =new UpdateSellerMemoResponse(); | 32 | UpdateSellerMemoResponse UpdateSellerMemoResponse =new UpdateSellerMemoResponse(); |
32 | Map<String,Object> params = new HashMap<>(); | 33 | Map<String,Object> params = new HashMap<>(); |
33 | String redisMysqlDbConfig = ""; | 34 | params.put("orderSn ",callRequest.getBizModel().getPlatOrderNo()); |
34 | Integer dataBaseModule = DbUtil.getOrderInWhichDataBase(callRequest.getBizModel().getPlatOrderNo()); | 35 | params.put("remark ",callRequest.getBizModel().getSellerMemo()); |
35 | String tableIndex = DbUtil.getOrderInWhichTable(callRequest.getBizModel().getPlatOrderNo()); | 36 | params.put("sellerId",callRequest.getSupplier().getId()); |
36 | params.put("doingOrderTable","im_doing_order_" + tableIndex); | 37 | Orders orders = pineappleDao.getOrdersByMap(params); |
37 | params.put("orderCode",callRequest.getBizModel().getPlatOrderNo()); | 38 | if(StringUtil.isNull(orders)){ |
38 | params.put("sellerRemark",callRequest.getBizModel().getSellerMemo()); | 39 | log.error("获取订单数据业务异常"); |
39 | params.put("supplierId",callRequest.getSupplier().getId()); | 40 | throw new BizException("获取订单数据业务异常"); |
40 | redisMysqlDbConfig = String.format(AppConstants.REDIS_DB_TYPE, AppConstants.INTEGRALMALL_ORDER_DATABASE, dataBaseModule.intValue()); | 41 | } |
41 | DBContextHolder.setDBType(redisMysqlDbConfig);//切换数据源 | 42 | if(pineappleDao.updateOdersRemark(params) != 1){ |
42 | IMDoingOrderBean iMDoingOrderBean = pineappleDao.getOrderListByMap(params); | ||
43 | if(StringUtil.isNull(iMDoingOrderBean)){ | ||
44 | log.error("获取订单数据业务异常"); | 43 | log.error("获取订单数据业务异常"); |
45 | throw new BizException("获取订单数据业务异常"); | 44 | throw new BizException("获取订单数据业务异常"); |
46 | } | 45 | } |
47 | DBContextHolder.setDBType(redisMysqlDbConfig);//切换数据源 | ||
48 | pineappleDao.updateSelle(params); | ||
49 | UpdateSellerMemoResponse.setCode(PineappleEnum.SUCCESS.getCode()); | 46 | UpdateSellerMemoResponse.setCode(PineappleEnum.SUCCESS.getCode()); |
50 | UpdateSellerMemoResponse.setMessage(PineappleEnum.SUCCESS.getMsg()); | 47 | UpdateSellerMemoResponse.setMessage(PineappleEnum.SUCCESS.getMsg()); |
51 | return UpdateSellerMemoResponse; | 48 | return UpdateSellerMemoResponse; | ... | ... |
-
请 注册 或 登录 后发表评论