refactor(coupon): 移除优惠券相关模块代码

- 删除优惠券控制器相关类,包括 AppCouponController 和 CouponController
- 移除优惠券记录控制器 CouponRecordController
- 删除优惠券数据访问层接口及实现类
- 移除优惠券相关的实体类、请求响应对象
- 清理业务逻辑层中与优惠券相关的服务接口及实现
- 从 PriceBiz 中移除优惠券相关导入依赖
- 从任务类 DownloadNotificationTasker 中移除优惠券相关导入
- 删除优惠券相关的 MyBatis 映射文件
This commit is contained in:
2026-01-20 16:30:47 +08:00
parent e268d236f4
commit 9a31e71e42
25 changed files with 0 additions and 825 deletions

View File

@@ -1,47 +0,0 @@
package com.ycwl.basic.controller.mobile;
import com.ycwl.basic.constant.BaseContextHandler;
import com.ycwl.basic.model.mobile.coupon.req.ClaimCouponReq;
import com.ycwl.basic.model.pc.coupon.entity.CouponEntity;
import com.ycwl.basic.model.pc.couponRecord.entity.CouponRecordEntity;
import com.ycwl.basic.service.mobile.AppCouponRecordService;
import com.ycwl.basic.utils.ApiResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/api/mobile/coupon/v1")
public class AppCouponController {
@Autowired
private AppCouponRecordService appCouponRecordService;
/**
* 根据memberId、faceId和type查找优惠券记录
*/
@GetMapping("/record")
public ApiResponse<CouponRecordEntity> getCouponRecords(
@RequestParam Long faceId,
@RequestParam Integer type) {
CouponRecordEntity record = appCouponRecordService.queryByMemberIdAndFaceIdAndType(Long.valueOf(BaseContextHandler.getUserId()), faceId, type);
return ApiResponse.success(record);
}
/**
* 领取优惠券
*/
@PostMapping("/claim")
public ApiResponse<CouponEntity> claimCoupon(@RequestBody ClaimCouponReq request) {
request.setMemberId(Long.valueOf(BaseContextHandler.getUserId()));
try {
CouponEntity coupon = appCouponRecordService.claimCoupon(
request.getMemberId(),
request.getFaceId(),
request.getType()
);
return ApiResponse.success(coupon);
} catch (RuntimeException e) {
return ApiResponse.fail(e.getMessage());
}
}
}