| | |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.xiaopeng.account.model.dto.ReceiveCouponDto; |
| | | import com.xiaopeng.account.model.dto.SendCouponDto; |
| | | import com.xiaopeng.account.model.query.XpUserCouponListQuery; |
| | |
| | | import com.xiaopeng.account.model.vo.XpAppUserCouponTotalVo; |
| | | import com.xiaopeng.account.model.vo.XpAppUserCouponVo; |
| | | import com.xiaopeng.account.service.IXpAppUserCouponService; |
| | | import com.xiaopeng.account.vo.CouponReceiptRecordDto; |
| | | import com.xiaopeng.account.vo.CouponReceiptRecordVo; |
| | | import com.xiaopeng.account.vo.UserCouponListVo; |
| | | import com.xiaopeng.api.dto.account.GetUserCouponDto; |
| | | import com.xiaopeng.api.dto.account.NavigationCouponPickerRequest; |
| | |
| | | } |
| | | |
| | | |
| | | @PostMapping("/api/v1/appUserCoupon/saveInfo") |
| | | @PostMapping("/api/v1/appUserCoupon/saveInfo_activity") |
| | | @ApiOperation(value = "活动发放优惠券", tags = {"管理后台-活动发放优惠券"}) |
| | | public R<String> sendSave(@RequestBody UseUserCouponDto dto) { |
| | | xpAppUserCouponService.saveInfo(dto); |
| | | public R<String> saveInfo_activity(@RequestBody UseUserCouponDto dto) { |
| | | xpAppUserCouponService.saveInfo_activity(dto); |
| | | return R.ok(); |
| | | } |
| | | /** |
| | |
| | | UserCouponListVo userCouponList = xpAppUserCouponService.getUserCouponList(orderMoney, uid); |
| | | return R.ok(userCouponList); |
| | | } |
| | | |
| | | /** |
| | | * 获取用户活动领取的优惠券 |
| | | * @return |
| | | */ |
| | | @PostMapping("/logan/inner/appUserCoupon/getXpAppUserCoupon") |
| | | public R<List<XpAppUserCoupon>> getXpAppUserCoupon(@RequestParam Long activityId){ |
| | | List<XpAppUserCoupon> list = xpAppUserCouponService.list(new QueryWrapper<XpAppUserCoupon>() |
| | | .eq("activity_id", activityId).eq("is_deleted", 0)); |
| | | return R.ok(list); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @GetMapping("/api/v1/activity/getCouponReceiptRecord") |
| | | @ApiOperation(value = "获取活动领取记录", tags = {"管理后台-活动管理"}) |
| | | public R<PageInfo<CouponReceiptRecordDto>> getCouponReceiptRecord(@RequestBody CouponReceiptRecordVo vo){ |
| | | PageInfo<CouponReceiptRecordDto> pageInfo = new PageInfo<CouponReceiptRecordDto>(vo.getPageNum(), vo.getPageSize()); |
| | | List<CouponReceiptRecordDto> couponReceiptRecord = xpAppUserCouponService.getCouponReceiptRecord(pageInfo, vo); |
| | | pageInfo.setRecords(couponReceiptRecord); |
| | | return R.ok(pageInfo); |
| | | } |
| | | |
| | | |
| | | |
| | | } |