Authored by tanling

优惠券使用说明

... ... @@ -27,7 +27,7 @@ public class CouponController {
* @param uid
* @return
*/
@RequestMapping(params = "method=app.coupons.get")
@RequestMapping(params = "method=ufo.coupons.get")
@ResponseBody
public ApiResponse queryCouponList(@RequestParam(value = "uid") Integer uid) {
... ... @@ -43,7 +43,7 @@ public class CouponController {
* @param uid
* @return
*/
@RequestMapping(params = "method=app.coupons.cnt")
@RequestMapping(params = "method=ufo.coupons.cnt")
@ResponseBody
public ApiResponse queryCouponCnt(@RequestParam(value = "uid") Integer uid) {
... ... @@ -59,7 +59,7 @@ public class CouponController {
* @param uid
* @return
*/
@RequestMapping(params = "method=app.coupons.send")
@RequestMapping(params = "method=ufo.coupons.send")
@ResponseBody
public ApiResponse sendCoupon(@RequestParam(value = "uid") Integer uid,
@RequestParam(value = "coupon_tokens") String couponTokens) {
... ...
... ... @@ -7,6 +7,8 @@ import com.yohobuy.ufo.model.promotion.constant.UserCouponsStatusEnum;
import com.yohobuy.ufo.model.promotion.response.CouponInfo;
import com.yohoufo.common.utils.DateUtil;
import com.yohoufo.dal.promotion.model.*;
import org.apache.commons.lang3.StringUtils;
import java.text.MessageFormat;
import java.util.Arrays;
... ... @@ -69,6 +71,9 @@ public class CouponConvert {
couponInfo.setUse_rule(MessageFormat.format(CouponUseLimitTypeEnum.AMOUNT_LIMIT.getText(),coupon.getUseLimitValue().intValue()));
}
if (StringUtils.isNotEmpty(coupon.getRemark())){
couponInfo.setNotes(Arrays.asList(coupon.getRemark()));
}else
// product_limit_type product_limit_value 特定商品
if (coupon.getProductLimitType()!=null && CouponProductLimitTypeEnum.SPECIFIC_PRODUCT.getLimitType().equals(String.valueOf(coupon.getProductLimitType()))){
couponInfo.setNotes(Arrays.asList(CouponProductLimitTypeEnum.SPECIFIC_PRODUCT.getText()));
... ...