...
|
...
|
@@ -4,6 +4,7 @@ package com.yohoufo.promotion.controller; |
|
|
import com.google.common.base.Splitter;
|
|
|
import com.yoho.error.exception.ServiceException;
|
|
|
import com.yohobuy.ufo.model.promotion.constant.CouponTypeEnum;
|
|
|
import com.yohoufo.promotion.model.CouponCntReq;
|
|
|
import com.yohoufo.promotion.model.CouponReceiveChannel;
|
|
|
import com.yohobuy.ufo.model.promotion.request.UserCouponListReq;
|
|
|
import com.yohobuy.ufo.model.promotion.response.CouponInfo;
|
...
|
...
|
@@ -119,11 +120,15 @@ public class CouponController { |
|
|
@RequestMapping(params = "method=ufo.coupons.cnt")
|
|
|
@ResponseBody
|
|
|
public ApiResponse queryCouponCnt(@RequestParam(value = "uid") Integer uid,
|
|
|
@RequestParam(value = "client_type",required = false)String clientType,
|
|
|
@RequestParam(value = "business_client", required = false,defaultValue = "ufo") String businessClient) {
|
|
|
|
|
|
logger.info("query user coupons cnt, uid: {} ,{}", uid, businessClient);
|
|
|
int couponCnt = couponService.queryCouponCnt(uid, businessClient);
|
|
|
logger.info("query user coupons cnt uid: {}, v: {}", uid, couponCnt);
|
|
|
CouponCntReq req = CouponCntReq.builder().uid(uid)
|
|
|
.clientType(clientType)
|
|
|
.businessClient(businessClient)
|
|
|
.build();
|
|
|
logger.info("query user coupons cnt, req: {} ", req);
|
|
|
int couponCnt = couponService.queryCouponCnt(req);
|
|
|
logger.info("query user coupons cnt req: {}, v: {}", req, couponCnt);
|
|
|
return new ApiResponse.ApiResponseBuilder().code(200).data(couponCnt).build();
|
|
|
}
|
|
|
|
...
|
...
|
|