Commit 81c9d8f4 authored by hezhen's avatar hezhen

123

parent 621b70c0
......@@ -128,7 +128,7 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
}
//支付后更新优惠卷状态
public BigDecimal useTickerNo(Integer userId, String TickerNo, String orderNo,Integer channel,BigDecimal amout){
public BigDecimal useTickerNo(Integer userId, String TickerNo, String orderNo,Integer channel,BigDecimal amout,Integer type){
BigDecimal couponAmout=new BigDecimal("0.00");
if (userId==null||userId==0||StringUtils.isBlank(TickerNo)){
log.error("----参数不能为空");
......@@ -141,11 +141,15 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
log.error(userId+"----已领优惠卷");
return couponAmout;
}
UserCoupon userCoupon=list.get(0);
if (type==1){
userCoupon.setIsUse(1);
userCoupon.setOrderNo(orderNo);
userCoupon.setUseTime(System.currentTimeMillis());
updateSelectiveById(userCoupon);
}
return getCouponAmout(userCoupon.getCouponId(),channel,amout);
}
......
......@@ -52,9 +52,10 @@ public class UserCouponController extends ActivityBaseController<UserCouponBiz>
@RequestParam(value = "TickerNo",defaultValue ="" ) String TickerNo,
@RequestParam(value = "orderNo",defaultValue ="" ) String orderNo,
@RequestParam(value = "channel",defaultValue ="1" ) Integer channel,
@RequestParam(value = "amout",defaultValue ="0.00" ) BigDecimal amout
@RequestParam(value = "amout",defaultValue ="0.00" ) BigDecimal amout,
@RequestParam(value = "amout",defaultValue ="1" ) Integer type
) {
return baseBiz.useTickerNo(userId,TickerNo,orderNo,channel,amout);
return baseBiz.useTickerNo(userId,TickerNo,orderNo,channel,amout,type);
}
@ApiOperation("优惠卷取消使用")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment