Authored by Lixiaodi

Merge branch 'dev' of http://git.yoho.cn/ufo/yohoufo-fore into dev

Showing 34 changed files with 101 additions and 104 deletions
@@ -2,10 +2,10 @@ package com.yohoufo.order.controller; @@ -2,10 +2,10 @@ package com.yohoufo.order.controller;
2 2
3 import com.yohoufo.common.ApiResponse; 3 import com.yohoufo.common.ApiResponse;
4 import com.yohoufo.order.common.TabType; 4 import com.yohoufo.order.common.TabType;
5 -import com.yohoufo.order.request.OrderListRequest;  
6 -import com.yohoufo.order.request.OrderRequest;  
7 -import com.yohoufo.order.response.OrderDetailInfo;  
8 -import com.yohoufo.order.response.OrderListInfoRsp; 5 +import com.yohoufo.order.model.request.OrderListRequest;
  6 +import com.yohoufo.order.model.request.OrderRequest;
  7 +import com.yohoufo.order.model.response.OrderDetailInfo;
  8 +import com.yohoufo.order.model.response.OrderListInfoRsp;
9 import com.yohoufo.order.service.IBuyerOrderService; 9 import com.yohoufo.order.service.IBuyerOrderService;
10 import com.yohoufo.order.service.impl.SellerOrderService; 10 import com.yohoufo.order.service.impl.SellerOrderService;
11 import org.springframework.beans.factory.annotation.Autowired; 11 import org.springframework.beans.factory.annotation.Autowired;
@@ -35,7 +35,7 @@ public class BuyerOrderController { @@ -35,7 +35,7 @@ public class BuyerOrderController {
35 * 5:交易成功 35 * 5:交易成功
36 * 7:交易失败 36 * 7:交易失败
37 */ 37 */
38 - @RequestMapping(params = "method=app.buyer.list") 38 + @RequestMapping(params = "method=ufo.order.list")
39 @ResponseBody 39 @ResponseBody
40 public ApiResponse getOrderList(@RequestParam("type") int type, 40 public ApiResponse getOrderList(@RequestParam("type") int type,
41 @RequestParam("uid") int uid, 41 @RequestParam("uid") int uid,
@@ -79,12 +79,16 @@ public class BuyerOrderController { @@ -79,12 +79,16 @@ public class BuyerOrderController {
79 * @param uid 79 * @param uid
80 * @return 80 * @return
81 */ 81 */
82 - @RequestMapping(params = "method=app.buyer.detail") 82 + @RequestMapping(params = "method=ufo.order.detail")
83 @ResponseBody 83 @ResponseBody
84 public ApiResponse getOrderDetail(@RequestParam("orderCode") long orderCode, 84 public ApiResponse getOrderDetail(@RequestParam("orderCode") long orderCode,
85 @RequestParam("uid") int uid, 85 @RequestParam("uid") int uid,
86 @RequestParam("tabType") String tabType) { 86 @RequestParam("tabType") String tabType) {
  87 + TabType actor = TabType.getTabType(tabType);
87 88
  89 + if (Objects.isNull(actor)){
  90 + return new ApiResponse.ApiResponseBuilder().code(400).message("非法的tab").build();
  91 + }
88 OrderRequest orderRequest = OrderRequest.builder() 92 OrderRequest orderRequest = OrderRequest.builder()
89 .uid(uid) 93 .uid(uid)
90 .orderCode(orderCode) 94 .orderCode(orderCode)
@@ -100,7 +104,7 @@ public class BuyerOrderController { @@ -100,7 +104,7 @@ public class BuyerOrderController {
100 * 取消订单 104 * 取消订单
101 */ 105 */
102 106
103 - @RequestMapping(params = "method=app.buyer.cancel") 107 + @RequestMapping(params = "method=ufo.buyer.cancel")
104 @ResponseBody 108 @ResponseBody
105 public ApiResponse cancel(@RequestParam("orderCode") long orderCode, 109 public ApiResponse cancel(@RequestParam("orderCode") long orderCode,
106 @RequestParam("uid") int uid) { 110 @RequestParam("uid") int uid) {
@@ -120,7 +124,7 @@ public class BuyerOrderController { @@ -120,7 +124,7 @@ public class BuyerOrderController {
120 * @param uid 124 * @param uid
121 * @return 125 * @return
122 */ 126 */
123 - @RequestMapping(params = "method=app.buyer.confirm") 127 + @RequestMapping(params = "method=ufo.buyer.confirm")
124 @ResponseBody 128 @ResponseBody
125 public ApiResponse confirm(@RequestParam("orderCode") long orderCode, 129 public ApiResponse confirm(@RequestParam("orderCode") long orderCode,
126 @RequestParam("uid") int uid) { 130 @RequestParam("uid") int uid) {
@@ -6,9 +6,9 @@ import com.yohoufo.common.ApiResponse; @@ -6,9 +6,9 @@ import com.yohoufo.common.ApiResponse;
6 import com.yohoufo.order.common.Payment; 6 import com.yohoufo.order.common.Payment;
7 import com.yohoufo.order.model.NotifyResponse; 7 import com.yohoufo.order.model.NotifyResponse;
8 import com.yohoufo.order.model.PaymentData; 8 import com.yohoufo.order.model.PaymentData;
9 -import com.yohoufo.order.request.PaymentRequest;  
10 -import com.yohoufo.order.response.PaymentConfirmRsp;  
11 -import com.yohoufo.order.response.PrepayResponse; 9 +import com.yohoufo.order.model.request.PaymentRequest;
  10 +import com.yohoufo.order.model.response.PaymentConfirmRsp;
  11 +import com.yohoufo.order.model.response.PrepayResponse;
12 import com.yohoufo.order.service.IPaymentService; 12 import com.yohoufo.order.service.IPaymentService;
13 import com.yohoufo.order.service.pay.alipay.AlipayService; 13 import com.yohoufo.order.service.pay.alipay.AlipayService;
14 import com.yohoufo.order.service.pay.weixin.WeixinPayAppService; 14 import com.yohoufo.order.service.pay.weixin.WeixinPayAppService;
@@ -2,9 +2,9 @@ package com.yohoufo.order.controller; @@ -2,9 +2,9 @@ package com.yohoufo.order.controller;
2 2
3 3
4 import com.yohoufo.common.ApiResponse; 4 import com.yohoufo.common.ApiResponse;
5 -import com.yohoufo.order.request.ShoppingRequest;  
6 -import com.yohoufo.order.response.OrderSubmitResponse;  
7 -import com.yohoufo.order.response.PaymentResponse; 5 +import com.yohoufo.order.model.request.ShoppingRequest;
  6 +import com.yohoufo.order.model.response.OrderSubmitResponse;
  7 +import com.yohoufo.order.model.response.PaymentResponse;
8 import com.yohoufo.order.service.IShoppingService; 8 import com.yohoufo.order.service.IShoppingService;
9 import org.springframework.beans.factory.annotation.Autowired; 9 import org.springframework.beans.factory.annotation.Autowired;
10 import org.springframework.web.bind.annotation.*; 10 import org.springframework.web.bind.annotation.*;
1 -package com.yohoufo.order.request; 1 +package com.yohoufo.order.model.request;
2 2
3 import com.yohoufo.order.common.TabType; 3 import com.yohoufo.order.common.TabType;
4 import lombok.AllArgsConstructor; 4 import lombok.AllArgsConstructor;
1 -package com.yohoufo.order.request; 1 +package com.yohoufo.order.model.request;
2 2
3 import lombok.AllArgsConstructor; 3 import lombok.AllArgsConstructor;
4 import lombok.Data; 4 import lombok.Data;
1 -package com.yohoufo.order.request; 1 +package com.yohoufo.order.model.request;
2 2
3 import lombok.AllArgsConstructor; 3 import lombok.AllArgsConstructor;
4 import lombok.Data; 4 import lombok.Data;
5 import lombok.NoArgsConstructor; 5 import lombok.NoArgsConstructor;
6 import lombok.experimental.Builder; 6 import lombok.experimental.Builder;
7 7
8 -import java.math.BigDecimal;  
9 -  
10 @Data 8 @Data
11 @Builder 9 @Builder
12 @AllArgsConstructor 10 @AllArgsConstructor
1 -package com.yohoufo.order.request; 1 +package com.yohoufo.order.model.request;
2 2
3 import lombok.AllArgsConstructor; 3 import lombok.AllArgsConstructor;
4 import lombok.Data; 4 import lombok.Data;
1 -package com.yohoufo.order.response; 1 +package com.yohoufo.order.model.response;
2 2
3 import lombok.Data; 3 import lombok.Data;
4 4
1 -package com.yohoufo.order.response; 1 +package com.yohoufo.order.model.response;
2 2
3 3
4 import com.yohoufo.order.common.ButtonShow; 4 import com.yohoufo.order.common.ButtonShow;
1 -package com.yohoufo.order.response; 1 +package com.yohoufo.order.model.response;
2 2
3 import com.yohoufo.order.common.ButtonShow; 3 import com.yohoufo.order.common.ButtonShow;
4 import lombok.Data; 4 import lombok.Data;
1 -package com.yohoufo.order.response; 1 +package com.yohoufo.order.model.response;
2 2
3 import lombok.AllArgsConstructor; 3 import lombok.AllArgsConstructor;
4 import lombok.Data; 4 import lombok.Data;
1 -package com.yohoufo.order.response; 1 +package com.yohoufo.order.model.response;
2 2
3 3
4 import lombok.Data; 4 import lombok.Data;
1 -package com.yohoufo.order.response; 1 +package com.yohoufo.order.model.response;
2 2
3 import lombok.Data; 3 import lombok.Data;
4 import lombok.ToString; 4 import lombok.ToString;
1 -package com.yohoufo.order.response; 1 +package com.yohoufo.order.model.response;
2 2
3 import lombok.Data; 3 import lombok.Data;
4 import lombok.ToString; 4 import lombok.ToString;
5 5
6 -import java.math.BigDecimal;  
7 import java.util.List; 6 import java.util.List;
8 7
9 @Data 8 @Data
1 -package com.yohoufo.order.response; 1 +package com.yohoufo.order.model.response;
2 2
3 import com.alibaba.fastjson.JSONObject; 3 import com.alibaba.fastjson.JSONObject;
4 import lombok.ToString; 4 import lombok.ToString;
@@ -3,8 +3,8 @@ package com.yohoufo.order.service; @@ -3,8 +3,8 @@ package com.yohoufo.order.service;
3 import com.yoho.error.ServiceError; 3 import com.yoho.error.ServiceError;
4 import com.yoho.error.exception.ServiceException; 4 import com.yoho.error.exception.ServiceException;
5 import com.yohoufo.order.model.OrderInfo; 5 import com.yohoufo.order.model.OrderInfo;
6 -import com.yohoufo.order.request.PaymentRequest;  
7 -import com.yohoufo.order.response.PrepayResponse; 6 +import com.yohoufo.order.model.request.PaymentRequest;
  7 +import com.yohoufo.order.model.response.PrepayResponse;
8 import org.slf4j.Logger; 8 import org.slf4j.Logger;
9 import org.slf4j.LoggerFactory; 9 import org.slf4j.LoggerFactory;
10 import java.math.BigDecimal; 10 import java.math.BigDecimal;
@@ -11,12 +11,11 @@ import com.yohoufo.dal.order.model.BuyerOrder; @@ -11,12 +11,11 @@ import com.yohoufo.dal.order.model.BuyerOrder;
11 import com.yohoufo.dal.order.model.BuyerOrderMeta; 11 import com.yohoufo.dal.order.model.BuyerOrderMeta;
12 import com.yohoufo.order.common.OrderCodeType; 12 import com.yohoufo.order.common.OrderCodeType;
13 import com.yohoufo.order.common.OrderStatus; 13 import com.yohoufo.order.common.OrderStatus;
14 -import com.yohoufo.order.common.SellerOrderStatus;  
15 import com.yohoufo.order.constants.MetaKey; 14 import com.yohoufo.order.constants.MetaKey;
16 import com.yohoufo.order.constants.OrderConstant; 15 import com.yohoufo.order.constants.OrderConstant;
17 import com.yohoufo.order.model.OrderInfo; 16 import com.yohoufo.order.model.OrderInfo;
18 -import com.yohoufo.order.request.PaymentRequest;  
19 -import com.yohoufo.order.response.PrepayResponse; 17 +import com.yohoufo.order.model.request.PaymentRequest;
  18 +import com.yohoufo.order.model.response.PrepayResponse;
20 import org.apache.commons.lang3.StringUtils; 19 import org.apache.commons.lang3.StringUtils;
21 import org.slf4j.Logger; 20 import org.slf4j.Logger;
22 import org.slf4j.LoggerFactory; 21 import org.slf4j.LoggerFactory;
1 package com.yohoufo.order.service; 1 package com.yohoufo.order.service;
2 2
3 -import com.yohoufo.order.request.OrderRequest;  
4 -import com.yohoufo.order.response.OrderDetailInfo; 3 +import com.yohoufo.order.model.request.OrderRequest;
  4 +import com.yohoufo.order.model.response.OrderDetailInfo;
5 5
6 public interface IBuyerOrderService extends IOrderListService{ 6 public interface IBuyerOrderService extends IOrderListService{
7 7
1 package com.yohoufo.order.service; 1 package com.yohoufo.order.service;
2 2
3 -import com.yohoufo.order.request.OrderListRequest;  
4 -import com.yohoufo.order.response.OrderListInfoRsp; 3 +import com.yohoufo.order.model.request.OrderListRequest;
  4 +import com.yohoufo.order.model.response.OrderListInfoRsp;
5 5
6 /** 6 /**
7 * Created by chenchao on 2018/9/19. 7 * Created by chenchao on 2018/9/19.
1 package com.yohoufo.order.service; 1 package com.yohoufo.order.service;
2 2
3 -import com.yohoufo.order.request.PaymentRequest;  
4 -import com.yohoufo.order.response.PaymentConfirmRsp;  
5 -import com.yohoufo.order.response.PrepayResponse; 3 +import com.yohoufo.order.model.request.PaymentRequest;
  4 +import com.yohoufo.order.model.response.PaymentConfirmRsp;
  5 +import com.yohoufo.order.model.response.PrepayResponse;
6 6
7 public interface IPaymentService { 7 public interface IPaymentService {
8 8
1 package com.yohoufo.order.service; 1 package com.yohoufo.order.service;
2 2
3 3
4 -import com.yohoufo.order.request.ShoppingRequest;  
5 -import com.yohoufo.order.response.OrderSubmitResponse;  
6 -import com.yohoufo.order.response.PaymentResponse; 4 +import com.yohoufo.order.model.request.ShoppingRequest;
  5 +import com.yohoufo.order.model.response.OrderSubmitResponse;
  6 +import com.yohoufo.order.model.response.PaymentResponse;
7 7
8 public interface IShoppingService { 8 public interface IShoppingService {
9 9
@@ -7,18 +7,16 @@ import com.yoho.error.ServiceError; @@ -7,18 +7,16 @@ import com.yoho.error.ServiceError;
7 import com.yoho.error.exception.ServiceException; 7 import com.yoho.error.exception.ServiceException;
8 import com.yohoufo.dal.order.SellerOrderMapper; 8 import com.yohoufo.dal.order.SellerOrderMapper;
9 import com.yohoufo.dal.order.SellerOrderMetaMapper; 9 import com.yohoufo.dal.order.SellerOrderMetaMapper;
10 -import com.yohoufo.dal.order.model.BuyerOrder;  
11 import com.yohoufo.dal.order.model.BuyerOrderMeta; 10 import com.yohoufo.dal.order.model.BuyerOrderMeta;
12 import com.yohoufo.dal.order.model.SellerOrder; 11 import com.yohoufo.dal.order.model.SellerOrder;
13 import com.yohoufo.dal.order.model.SellerOrderMeta; 12 import com.yohoufo.dal.order.model.SellerOrderMeta;
14 import com.yohoufo.order.common.OrderCodeType; 13 import com.yohoufo.order.common.OrderCodeType;
15 -import com.yohoufo.order.common.OrderStatus;  
16 import com.yohoufo.order.common.SellerOrderStatus; 14 import com.yohoufo.order.common.SellerOrderStatus;
17 import com.yohoufo.order.constants.MetaKey; 15 import com.yohoufo.order.constants.MetaKey;
18 import com.yohoufo.order.constants.OrderConstant; 16 import com.yohoufo.order.constants.OrderConstant;
19 import com.yohoufo.order.model.OrderInfo; 17 import com.yohoufo.order.model.OrderInfo;
20 -import com.yohoufo.order.request.PaymentRequest;  
21 -import com.yohoufo.order.response.PrepayResponse; 18 +import com.yohoufo.order.model.request.PaymentRequest;
  19 +import com.yohoufo.order.model.response.PrepayResponse;
22 import org.apache.commons.lang3.StringUtils; 20 import org.apache.commons.lang3.StringUtils;
23 import org.slf4j.Logger; 21 import org.slf4j.Logger;
24 import org.slf4j.LoggerFactory; 22 import org.slf4j.LoggerFactory;
@@ -7,10 +7,10 @@ import com.yohoufo.dal.order.model.BuyerOrderGoods; @@ -7,10 +7,10 @@ import com.yohoufo.dal.order.model.BuyerOrderGoods;
7 import com.yohoufo.dal.order.model.SellerOrderGoods; 7 import com.yohoufo.dal.order.model.SellerOrderGoods;
8 import com.yohoufo.order.common.OrderStatus; 8 import com.yohoufo.order.common.OrderStatus;
9 import com.yohoufo.order.common.TabType; 9 import com.yohoufo.order.common.TabType;
10 -import com.yohoufo.order.request.OrderListRequest;  
11 -import com.yohoufo.order.response.GoodsInfo;  
12 -import com.yohoufo.order.response.OrderListInfo;  
13 -import com.yohoufo.order.response.OrderListInfoRsp; 10 +import com.yohoufo.order.model.request.OrderListRequest;
  11 +import com.yohoufo.order.model.response.GoodsInfo;
  12 +import com.yohoufo.order.model.response.OrderListInfo;
  13 +import com.yohoufo.order.model.response.OrderListInfoRsp;
14 import com.yohoufo.order.service.IOrderListService; 14 import com.yohoufo.order.service.IOrderListService;
15 import org.slf4j.Logger; 15 import org.slf4j.Logger;
16 import org.slf4j.LoggerFactory; 16 import org.slf4j.LoggerFactory;
@@ -17,10 +17,10 @@ import com.yohoufo.order.common.Payment; @@ -17,10 +17,10 @@ import com.yohoufo.order.common.Payment;
17 import com.yohoufo.order.common.TabType; 17 import com.yohoufo.order.common.TabType;
18 import com.yohoufo.order.constants.MetaKey; 18 import com.yohoufo.order.constants.MetaKey;
19 import com.yohoufo.order.constants.OrderConstant; 19 import com.yohoufo.order.constants.OrderConstant;
20 -import com.yohoufo.order.request.OrderListRequest;  
21 -import com.yohoufo.order.request.OrderRequest;  
22 -import com.yohoufo.order.response.GoodsInfo;  
23 -import com.yohoufo.order.response.OrderDetailInfo; 20 +import com.yohoufo.order.model.request.OrderListRequest;
  21 +import com.yohoufo.order.model.request.OrderRequest;
  22 +import com.yohoufo.order.model.response.GoodsInfo;
  23 +import com.yohoufo.order.model.response.OrderDetailInfo;
24 import com.yohoufo.order.service.IBuyerOrderService; 24 import com.yohoufo.order.service.IBuyerOrderService;
25 import org.slf4j.Logger; 25 import org.slf4j.Logger;
26 import org.slf4j.LoggerFactory; 26 import org.slf4j.LoggerFactory;
1 package com.yohoufo.order.service.impl; 1 package com.yohoufo.order.service.impl;
2 2
3 -import com.alibaba.fastjson.JSON;  
4 import com.alibaba.fastjson.JSONObject; 3 import com.alibaba.fastjson.JSONObject;
5 import com.yoho.core.common.utils.DateUtil; 4 import com.yoho.core.common.utils.DateUtil;
6 import com.yoho.error.ServiceError; 5 import com.yoho.error.ServiceError;
7 import com.yoho.error.exception.ServiceException; 6 import com.yoho.error.exception.ServiceException;
8 -import com.yohoufo.common.utils.SignUtils;  
9 -import com.yohoufo.common.utils.TimeUtils;  
10 -import com.yohoufo.dal.order.BuyerOrderMapper;  
11 import com.yohoufo.dal.order.BuyerOrderMetaMapper; 7 import com.yohoufo.dal.order.BuyerOrderMetaMapper;
12 import com.yohoufo.dal.order.OrdersPayMapper; 8 import com.yohoufo.dal.order.OrdersPayMapper;
13 -import com.yohoufo.dal.order.SellerOrderMapper;  
14 -import com.yohoufo.dal.order.model.BuyerOrder;  
15 -import com.yohoufo.dal.order.model.BuyerOrderMeta;  
16 import com.yohoufo.dal.order.model.OrdersPay; 9 import com.yohoufo.dal.order.model.OrdersPay;
17 -import com.yohoufo.dal.order.model.SellerOrder;  
18 import com.yohoufo.order.common.*; 10 import com.yohoufo.order.common.*;
19 -import com.yohoufo.order.constants.MetaKey;  
20 -import com.yohoufo.order.constants.OrderConstant;  
21 import com.yohoufo.order.model.OrderInfo; 11 import com.yohoufo.order.model.OrderInfo;
22 import com.yohoufo.order.model.PayQueryBo; 12 import com.yohoufo.order.model.PayQueryBo;
23 import com.yohoufo.order.model.PaymentData; 13 import com.yohoufo.order.model.PaymentData;
24 -import com.yohoufo.order.request.PaymentRequest;  
25 -import com.yohoufo.order.response.PaymentConfirmRsp;  
26 -import com.yohoufo.order.response.PrepayResponse; 14 +import com.yohoufo.order.model.request.PaymentRequest;
  15 +import com.yohoufo.order.model.response.PaymentConfirmRsp;
  16 +import com.yohoufo.order.model.response.PrepayResponse;
27 import com.yohoufo.order.service.AbstractOrderPaymentService; 17 import com.yohoufo.order.service.AbstractOrderPaymentService;
28 import com.yohoufo.order.service.BuyerOrderPaymentService; 18 import com.yohoufo.order.service.BuyerOrderPaymentService;
29 import com.yohoufo.order.service.IPaymentService; 19 import com.yohoufo.order.service.IPaymentService;
@@ -33,14 +23,11 @@ import com.yohoufo.order.service.pay.alipay.AlipayService; @@ -33,14 +23,11 @@ import com.yohoufo.order.service.pay.alipay.AlipayService;
33 import com.yohoufo.order.service.pay.weixin.WeixinPayAppService; 23 import com.yohoufo.order.service.pay.weixin.WeixinPayAppService;
34 import com.yohoufo.order.service.support.codegenerator.OrderCodeGenerator; 24 import com.yohoufo.order.service.support.codegenerator.OrderCodeGenerator;
35 import com.yohoufo.order.service.support.codegenerator.bean.CodeMeta; 25 import com.yohoufo.order.service.support.codegenerator.bean.CodeMeta;
36 -import org.apache.commons.lang3.StringUtils;  
37 import org.slf4j.Logger; 26 import org.slf4j.Logger;
38 import org.slf4j.LoggerFactory; 27 import org.slf4j.LoggerFactory;
39 import org.springframework.beans.factory.annotation.Autowired; 28 import org.springframework.beans.factory.annotation.Autowired;
40 -import org.springframework.beans.factory.annotation.Value;  
41 import org.springframework.stereotype.Service; 29 import org.springframework.stereotype.Service;
42 import java.math.BigDecimal; 30 import java.math.BigDecimal;
43 -import java.util.Date;  
44 31
45 32
46 @Service 33 @Service
1 package com.yohoufo.order.service.impl; 1 package com.yohoufo.order.service.impl;
2 2
3 -import com.google.common.collect.Lists;  
4 -import com.sun.corba.se.spi.ior.IOR;  
5 import com.yoho.error.ServiceError; 3 import com.yoho.error.ServiceError;
6 import com.yoho.error.exception.ServiceException; 4 import com.yoho.error.exception.ServiceException;
7 import com.yoho.service.model.response.UserAddressRspBO; 5 import com.yoho.service.model.response.UserAddressRspBO;
8 import com.yohobuy.ufo.model.order.bo.PlatformFee; 6 import com.yohobuy.ufo.model.order.bo.PlatformFee;
9 import com.yohobuy.ufo.model.order.bo.SoldPrdComputeBo; 7 import com.yohobuy.ufo.model.order.bo.SoldPrdComputeBo;
10 import com.yohobuy.ufo.model.order.req.SellerOrderComputeReq; 8 import com.yohobuy.ufo.model.order.req.SellerOrderComputeReq;
11 -import com.yohobuy.ufo.model.order.req.SellerOrderListReq;  
12 import com.yohobuy.ufo.model.order.req.SellerOrderSubmitReq; 9 import com.yohobuy.ufo.model.order.req.SellerOrderSubmitReq;
13 import com.yohoufo.common.caller.UfoServiceCaller; 10 import com.yohoufo.common.caller.UfoServiceCaller;
14 import com.yohoufo.common.exception.GatewayException; 11 import com.yohoufo.common.exception.GatewayException;
@@ -29,13 +26,12 @@ import com.yohoufo.order.model.GoodsInfo; @@ -29,13 +26,12 @@ import com.yohoufo.order.model.GoodsInfo;
29 import com.yohoufo.order.model.SellerOrderContext; 26 import com.yohoufo.order.model.SellerOrderContext;
30 import com.yohoufo.order.model.dto.PlatformFeeDto; 27 import com.yohoufo.order.model.dto.PlatformFeeDto;
31 import com.yohoufo.order.model.dto.SellerOrderComputeResult; 28 import com.yohoufo.order.model.dto.SellerOrderComputeResult;
32 -import com.yohoufo.order.request.OrderListRequest;  
33 -import com.yohoufo.order.response.OrderListInfo;  
34 -import com.yohoufo.order.response.OrderListInfoRsp; 29 +import com.yohoufo.order.model.request.OrderListRequest;
  30 +import com.yohoufo.order.model.response.OrderListInfo;
  31 +import com.yohoufo.order.model.response.OrderListInfoRsp;
35 import com.yohoufo.order.service.IOrderListService; 32 import com.yohoufo.order.service.IOrderListService;
36 import com.yohoufo.order.service.handler.SellerOrderComputeHandler; 33 import com.yohoufo.order.service.handler.SellerOrderComputeHandler;
37 import com.yohoufo.order.service.handler.SellerOrderSubmitHandler; 34 import com.yohoufo.order.service.handler.SellerOrderSubmitHandler;
38 -import com.yohoufo.order.service.impl.AbsOrderListService;  
39 import com.yohoufo.order.service.proxy.UserProxyService; 35 import com.yohoufo.order.service.proxy.UserProxyService;
40 import com.yohoufo.order.service.support.codegenerator.OrderCodeGenerator; 36 import com.yohoufo.order.service.support.codegenerator.OrderCodeGenerator;
41 import com.yohoufo.product.model.GoodsSize; 37 import com.yohoufo.product.model.GoodsSize;
@@ -392,7 +388,7 @@ public class SellerOrderService extends AbsOrderListService implements IOrderLis @@ -392,7 +388,7 @@ public class SellerOrderService extends AbsOrderListService implements IOrderLis
392 388
393 orderListInfo.setSkup(sellerOrderGoods.getId()); 389 orderListInfo.setSkup(sellerOrderGoods.getId());
394 // 390 //
395 - com.yohoufo.order.response.GoodsInfo goodsInfo = new com.yohoufo.order.response.GoodsInfo(); 391 + com.yohoufo.order.model.response.GoodsInfo goodsInfo = new com.yohoufo.order.model.response.GoodsInfo();
396 goodsInfo.setColorName(sellerOrderGoods.getColorName()); 392 goodsInfo.setColorName(sellerOrderGoods.getColorName());
397 goodsInfo.setProductName(sellerOrderGoods.getProductName()); 393 goodsInfo.setProductName(sellerOrderGoods.getProductName());
398 goodsInfo.setGoodImg(sellerOrderGoods.getImageUrl()); 394 goodsInfo.setGoodImg(sellerOrderGoods.getImageUrl());
@@ -11,9 +11,9 @@ import com.yohoufo.order.common.OrderCodeType; @@ -11,9 +11,9 @@ import com.yohoufo.order.common.OrderCodeType;
11 import com.yohoufo.order.common.SkupStatus; 11 import com.yohoufo.order.common.SkupStatus;
12 import com.yohoufo.order.constants.OrderConstant; 12 import com.yohoufo.order.constants.OrderConstant;
13 import com.yohoufo.order.model.dto.OrderBuilder; 13 import com.yohoufo.order.model.dto.OrderBuilder;
14 -import com.yohoufo.order.request.ShoppingRequest;  
15 -import com.yohoufo.order.response.OrderSubmitResponse;  
16 -import com.yohoufo.order.response.PaymentResponse; 14 +import com.yohoufo.order.model.request.ShoppingRequest;
  15 +import com.yohoufo.order.model.response.OrderSubmitResponse;
  16 +import com.yohoufo.order.model.response.PaymentResponse;
17 import com.yohoufo.order.service.ISubmitOrderService; 17 import com.yohoufo.order.service.ISubmitOrderService;
18 import com.yohoufo.order.service.IShoppingService; 18 import com.yohoufo.order.service.IShoppingService;
19 import com.yohoufo.order.service.proxy.UserProxyService; 19 import com.yohoufo.order.service.proxy.UserProxyService;
@@ -2,8 +2,8 @@ package com.yohoufo.order.service.support; @@ -2,8 +2,8 @@ package com.yohoufo.order.service.support;
2 2
3 import com.yohoufo.dal.order.model.SellerOrderGoods; 3 import com.yohoufo.dal.order.model.SellerOrderGoods;
4 import com.yohoufo.order.constants.OrderConstant; 4 import com.yohoufo.order.constants.OrderConstant;
5 -import com.yohoufo.order.response.GoodsInfo;  
6 -import com.yohoufo.order.response.PaymentResponse; 5 +import com.yohoufo.order.model.response.GoodsInfo;
  6 +import com.yohoufo.order.model.response.PaymentResponse;
7 import org.springframework.stereotype.Service; 7 import org.springframework.stereotype.Service;
8 8
9 import java.math.BigDecimal; 9 import java.math.BigDecimal;
@@ -103,12 +103,6 @@ public class ProductSearchController { @@ -103,12 +103,6 @@ public class ProductSearchController {
103 return new ApiResponse.ApiResponseBuilder().code(200).message("product.search.list.filter").data(resp).build(); 103 return new ApiResponse.ApiResponseBuilder().code(200).message("product.search.list.filter").data(resp).build();
104 } 104 }
105 105
106 - private SearchProductListFilterResp mockSearchProductListFilter(){  
107 - String mockJson = "{\"filter\":[{\"filterId\":\"brand\",\"filterName\":\"品牌\",\"itemList\":[{\"itemId\":\"591\",\"itemName\":\"F.L.Y.D\"},{\"itemId\":\"232\",\"itemName\":\"HIPANDA\"},{\"itemId\":\"3640\",\"itemName\":\"PSO BRAND\"}],\"multiSelect\":false},{\"filterId\":\"sort\",\"filterName\":\"品类\",\"itemList\":[{\"itemId\":\"114\",\"itemName\":\"T恤\"}],\"multiSelect\":false},{\"filterId\":\"gender\",\"filterName\":\"性别\",\"itemList\":[{\"itemId\":\"1,3\",\"itemName\":\"MEN\"}],\"multiSelect\":false},{\"filterId\":\"size\",\"filterName\":\"尺码\",\"itemList\":[{\"itemId\":\"207\",\"itemName\":\"S\"},{\"itemId\":\"208\",\"itemName\":\"S/M\"},{\"itemId\":\"203\",\"itemName\":\"M\"},{\"itemId\":\"201\",\"itemName\":\"L\"},{\"itemId\":\"211\",\"itemName\":\"XL\"},{\"itemId\":\"216\",\"itemName\":\"XXL\"},{\"itemId\":\"218\",\"itemName\":\"XXXL\"},{\"itemId\":\"348\",\"itemName\":\"XXXXL\"}],\"multiSelect\":false}]}";  
108 - SearchProductListFilterResp data = UfoJsonUtil.safelyParseObject(mockJson, SearchProductListFilterResp.class);  
109 - return data;  
110 - }  
111 -  
112 @IgnoreSignature 106 @IgnoreSignature
113 @ApiOperation(name = "ufo.product.search.brandList", desc="品牌列表") 107 @ApiOperation(name = "ufo.product.search.brandList", desc="品牌列表")
114 @RequestMapping(params = "method=ufo.product.search.brandList") 108 @RequestMapping(params = "method=ufo.product.search.brandList")
@@ -116,12 +110,8 @@ public class ProductSearchController { @@ -116,12 +110,8 @@ public class ProductSearchController {
116 @Cachable(expire = 300) 110 @Cachable(expire = 300)
117 public ApiResponse searchBrandList() { 111 public ApiResponse searchBrandList() {
118 112
119 - return new ApiResponse.ApiResponseBuilder().code(200).message("product.search.list.filter").data(mocksearchBrandList()).build();  
120 - } 113 + SearchBrandListResp resp = productSearchService.searchBrandList();
121 114
122 - private SearchBrandListResp mocksearchBrandList(){  
123 - String mockJson = "{\"brand_list\":[{\"brand_id\":76,\"brand_name\":\"乔丹达斯123\",\"brand_logo\":\"http://flv01.static.yhbimg.com/goodsimg/2018/09/12/19/03202a396af0a030516ff40c0289f0b1e5.png\"},{\"brand_id\":78,\"brand_name\":\"阿迪达斯\",\"brand_logo\":\"http://flv01.static.yhbimg.com/goodsimg/2018/09/12/20/03cf82ff042cb4057ba5dfbedb6fb623d2.jpg\"}]}";  
124 - SearchBrandListResp data = UfoJsonUtil.safelyParseObject(mockJson, SearchBrandListResp.class);  
125 - return data; 115 + return new ApiResponse.ApiResponseBuilder().code(200).message("product.search.brandList").data(resp).build();
126 } 116 }
127 } 117 }
@@ -54,7 +54,7 @@ public class SearchParam { @@ -54,7 +54,7 @@ public class SearchParam {
54 setOrder(req.getOrder()).setBrand(req.getBrand()).setSize(req.getSize()) 54 setOrder(req.getOrder()).setBrand(req.getBrand()).setSize(req.getSize())
55 .setMaxSort(req.getMaxSort()).setMidSort(req.getMidSort()) 55 .setMaxSort(req.getMaxSort()).setMidSort(req.getMidSort())
56 .setQuery(req.getQuery()).setSoonSale(req.getIsSoonSale()) 56 .setQuery(req.getQuery()).setSoonSale(req.getIsSoonSale())
57 - .setProductPool(req.getPool()).setBrandSeries(req.getSeries()); 57 + .setProductPool(req.getPool()).setBrandSeries(req.getSeries()).setGender(req.getGender());
58 return this; 58 return this;
59 } 59 }
60 60
@@ -15,6 +15,7 @@ public class ProductSearchReq { @@ -15,6 +15,7 @@ public class ProductSearchReq {
15 private String pool; 15 private String pool;
16 private String order; 16 private String order;
17 private String isSoonSale; //Y saletime查了大于now的 17 private String isSoonSale; //Y saletime查了大于now的
  18 + private Integer not_id;
18 19
19 20
20 public Integer getId() { 21 public Integer getId() {
@@ -133,4 +134,13 @@ public class ProductSearchReq { @@ -133,4 +134,13 @@ public class ProductSearchReq {
133 this.isSoonSale = isSoonSale; 134 this.isSoonSale = isSoonSale;
134 return this; 135 return this;
135 } 136 }
  137 +
  138 +
  139 + public Integer getNot_id() {
  140 + return not_id;
  141 + }
  142 +
  143 + public void setNot_id(Integer not_id) {
  144 + this.not_id = not_id;
  145 + }
136 } 146 }
@@ -19,8 +19,8 @@ public class SearchBrandListResp { @@ -19,8 +19,8 @@ public class SearchBrandListResp {
19 } 19 }
20 20
21 public static class BrandIntro { 21 public static class BrandIntro {
22 - @JSONField(name = "brand_id")  
23 - private Integer brandId; 22 + @JSONField(name = "id")
  23 + private Integer id;
24 24
25 @JSONField(name = "brand_name") 25 @JSONField(name = "brand_name")
26 private String brandName; 26 private String brandName;
@@ -29,12 +29,12 @@ public class SearchBrandListResp { @@ -29,12 +29,12 @@ public class SearchBrandListResp {
29 private String brandLogo; 29 private String brandLogo;
30 30
31 31
32 - public Integer getBrandId() {  
33 - return brandId; 32 + public Integer getId() {
  33 + return id;
34 } 34 }
35 35
36 - public void setBrandId(Integer brandId) {  
37 - this.brandId = brandId; 36 + public void setId(Integer id) {
  37 + this.id = id;
38 } 38 }
39 39
40 public String getBrandName() { 40 public String getBrandName() {
@@ -4,6 +4,7 @@ package com.yohoufo.product.service; @@ -4,6 +4,7 @@ package com.yohoufo.product.service;
4 import com.alibaba.fastjson.JSONObject; 4 import com.alibaba.fastjson.JSONObject;
5 import com.yohoufo.product.request.ProductSearchReq; 5 import com.yohoufo.product.request.ProductSearchReq;
6 import com.yohoufo.product.request.SortIdLevel; 6 import com.yohoufo.product.request.SortIdLevel;
  7 +import com.yohoufo.product.response.SearchBrandListResp;
7 import com.yohoufo.product.response.SearchProductListFilterResp; 8 import com.yohoufo.product.response.SearchProductListFilterResp;
8 9
9 public interface ProductSearchService { 10 public interface ProductSearchService {
@@ -14,4 +15,6 @@ public interface ProductSearchService { @@ -14,4 +15,6 @@ public interface ProductSearchService {
14 15
15 SearchProductListFilterResp searchProductListFilter(ProductSearchReq req); 16 SearchProductListFilterResp searchProductListFilter(ProductSearchReq req);
16 17
  18 + SearchBrandListResp searchBrandList();
  19 +
17 } 20 }
@@ -5,6 +5,7 @@ import java.util.List; @@ -5,6 +5,7 @@ import java.util.List;
5 import java.util.Map; 5 import java.util.Map;
6 import java.util.stream.Collectors; 6 import java.util.stream.Collectors;
7 7
  8 +import com.alibaba.fastjson.JSON;
8 import com.alibaba.fastjson.JSONArray; 9 import com.alibaba.fastjson.JSONArray;
9 import com.yohoufo.common.utils.UfoStringUtils; 10 import com.yohoufo.common.utils.UfoStringUtils;
10 import com.yohoufo.dal.product.ProductSortMapper; 11 import com.yohoufo.dal.product.ProductSortMapper;
@@ -13,6 +14,7 @@ import com.yohoufo.product.helper.SearchParam; @@ -13,6 +14,7 @@ import com.yohoufo.product.helper.SearchParam;
13 import com.yohoufo.product.model.FilterItem; 14 import com.yohoufo.product.model.FilterItem;
14 import com.yohoufo.product.request.ProductSearchReq; 15 import com.yohoufo.product.request.ProductSearchReq;
15 import com.yohoufo.product.request.SortIdLevel; 16 import com.yohoufo.product.request.SortIdLevel;
  17 +import com.yohoufo.product.response.SearchBrandListResp;
16 import com.yohoufo.product.response.SearchProductListFilterResp; 18 import com.yohoufo.product.response.SearchProductListFilterResp;
17 import org.apache.commons.lang3.StringUtils; 19 import org.apache.commons.lang3.StringUtils;
18 import org.slf4j.Logger; 20 import org.slf4j.Logger;
@@ -185,6 +187,17 @@ public class ProductSearchServiceImpl implements ProductSearchService { @@ -185,6 +187,17 @@ public class ProductSearchServiceImpl implements ProductSearchService {
185 } 187 }
186 188
187 @Override 189 @Override
  190 + public SearchBrandListResp searchBrandList() {
  191 + SearchBrandListResp resp = new SearchBrandListResp();
  192 + SearchParam searchParam = new SearchParam();
  193 + JSONObject data = search(searchParam.getParam(), BRAND_LIST_URL);
  194 + if(data != null && !CollectionUtils.isEmpty(data.getJSONArray("brand_list"))) {
  195 + resp = JSON.toJavaObject(data, SearchBrandListResp.class);
  196 + }
  197 + return resp;
  198 + }
  199 +
  200 + @Override
188 public SortIdLevel getSortLevelById(String sortId) { 201 public SortIdLevel getSortLevelById(String sortId) {
189 SortIdLevel sortIdLevel = new SortIdLevel(); 202 SortIdLevel sortIdLevel = new SortIdLevel();
190 if (StringUtils.isNotBlank(sortId)) { 203 if (StringUtils.isNotBlank(sortId)) {