|
|
|
@@ -16,10 +16,7 @@ import com.iformall.domain.vo.WxCouponPasswordVo; |
|
|
|
import com.iformall.enums.*; |
|
|
|
import com.iformall.exception.MallinkException; |
|
|
|
import com.iformall.mapper.*; |
|
|
|
import com.iformall.service.ExcelService; |
|
|
|
import com.iformall.service.WxCUserBasicInfoService; |
|
|
|
import com.iformall.service.WxCardInfoService; |
|
|
|
import com.iformall.service.WxCouponService; |
|
|
|
import com.iformall.service.*; |
|
|
|
import com.iformall.utils.Constant; |
|
|
|
import com.iformall.utils.DateUtils; |
|
|
|
import com.iformall.utils.RedisLock; |
|
|
|
@@ -83,8 +80,10 @@ public class WxCardInfoServiceImpl implements WxCardInfoService { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
WxCardSpendMapper wxCardSpendMapper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
WxCardSpendService wxCardSpendService; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public PageInfo<WxCardVo> listAsPage(WxCardVo record, Integer pageIndex, Integer pageSize) { |
|
|
|
@@ -507,6 +506,14 @@ public class WxCardInfoServiceImpl implements WxCardInfoService { |
|
|
|
logger.error("card spend insert error"); |
|
|
|
throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "card spend 插入出错!"); |
|
|
|
} |
|
|
|
|
|
|
|
if(record.getCardBeforeAmount().equals(0)){ |
|
|
|
if (wxCardSpendService.cardFinishedUsing(currentDate, cardInfo)) { |
|
|
|
throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "couponOrder status 更新出错!"); |
|
|
|
} |
|
|
|
} |
|
|
|
wxCardSpendService.sendCardBalanceChange(wxCoupon,record); |
|
|
|
|
|
|
|
return new ResultData(); |
|
|
|
|
|
|
|
} |
|
|
|
|