更新了商品类别

This commit is contained in:
chen-xin-zhi 2025-02-02 15:29:42 +08:00
parent ba104286ef
commit 2dba4b00d4

View File

@ -308,7 +308,7 @@ public class CouponController {
/**
* 小程序端用户查看优惠券
* @return 兑换记录列表
* @return 当前用户拥有的优惠券列表
*/
@GetMapping("/list/my")
@Operation(summary = "小程序端用户查看优惠券", description = "参数权限所有人方法名pointsExchangeCoupon")
@ -377,4 +377,30 @@ public class CouponController {
// /**
// * 小程序端用户查看兑换记录
// * @param commonRequest 优惠券id
// * @return 是否更新成功
// */
// @PostMapping("/get/record")
// @Operation(summary = "Web端管理员上(下)架优惠券", description = "参数:优惠券上架状态更新请求体,权限:管理员(admin, boss)方法名deleteExchangeRecord")
// @AuthCheck(mustRole = UserConstant.ADMIN_ROLE)
// public BaseResponse<Boolean> updateCouponShelvesStatus(@RequestBody CommonRequest commonRequest) {
// if (commonRequest == null || commonRequest.getId() <= 0) {
// throw new BusinessException(ErrorCode.PARAMS_ERROR);
// }
// Long id = commonRequest.getId();
// Coupon coupon = couponService.getById(id);
// ThrowUtils.throwIf(coupon == null, ErrorCode.OPERATION_ERROR, "优惠券不存在");
//
// Integer status = coupon.getIsShelves() == 0 ? 1 : 0;
// UpdateWrapper<Coupon> updateWrapper = new UpdateWrapper<>();
// updateWrapper.eq("id", id);
// updateWrapper.set("isShelves", status);
// boolean update = couponService.update(updateWrapper);
// ThrowUtils.throwIf(!update, ErrorCode.OPERATION_ERROR, "上架状态更新失败");
// return ResultUtils.success(true);
// }
}