...
|
...
|
@@ -40,10 +40,12 @@ public class ShoppingController { |
|
|
*/
|
|
|
@RequestMapping(params = "method=ufo.order.payment")
|
|
|
public ApiResponse payment(@RequestParam(name = "uid") int uid,
|
|
|
@RequestParam(name = "skup") int skup){
|
|
|
@RequestParam(name = "skup") int skup,
|
|
|
@RequestParam(value = "app_version", required = false)String appVersion){
|
|
|
//AUTO 自动匹配
|
|
|
ShoppingRequest req = ShoppingRequest.builder().uid(uid).skup(skup)
|
|
|
.couponCodes(CouponConstants.AUTO_RECOMMENDED_COUPON_CODES).build();
|
|
|
.couponCodes(CouponConstants.AUTO_RECOMMENDED_COUPON_CODES)
|
|
|
.appVersion(appVersion).build();
|
|
|
logger.info("in ufo.order.payment, req {}", req);
|
|
|
PaymentResponse paymentResponse = buyerOrderService.payment(req);
|
|
|
return new ApiResponse.ApiResponseBuilder().code(200).data(paymentResponse).message("结算成功").build();
|
...
|
...
|
@@ -59,7 +61,10 @@ public class ShoppingController { |
|
|
@RequestParam(name = "skup") int skup,
|
|
|
@RequestParam(name = "coupon_code",required = false) String couponCode) {
|
|
|
|
|
|
ShoppingRequest req = ShoppingRequest.builder().uid(uid).skup(skup).couponCodes(CouponCodeUtils.asList(couponCode)).build();
|
|
|
ShoppingRequest req = ShoppingRequest.builder()
|
|
|
.uid(uid).skup(skup)
|
|
|
.couponCodes(CouponCodeUtils.asList(couponCode))
|
|
|
.build();
|
|
|
logger.info("in ufo.order.selectCoupon, req {}", req);
|
|
|
ShoppingCouponListResp resp = buyerOrderService.selectCoupon(req);
|
|
|
return new ApiResponse.ApiResponseBuilder().code(200).data(resp).message("ok").build();
|
...
|
...
|
@@ -74,12 +79,14 @@ public class ShoppingController { |
|
|
public ApiResponse compute(@RequestParam(name = "uid") int uid,
|
|
|
@RequestParam(name = "skup") int skup,
|
|
|
@RequestParam(name = "coupon_code",required = false) String couponCode,
|
|
|
@RequestParam(name = "addressId", required = false) String addressId) {
|
|
|
@RequestParam(name = "addressId", required = false) String addressId,
|
|
|
@RequestParam(value = "app_version", required = false)String appVersion) {
|
|
|
|
|
|
ShoppingRequest req = ShoppingRequest.builder().uid(uid)
|
|
|
.skup(skup)
|
|
|
.couponCodes(CouponCodeUtils.asList(couponCode))
|
|
|
.addressId(addressId)
|
|
|
.appVersion(appVersion)
|
|
|
.build();
|
|
|
logger.info("in ufo.order.compute, req {}", req);
|
|
|
ComputeResponse resp = buyerOrderService.compute(req);
|
...
|
...
|
|