| | |
| | | import org.springframework.stereotype.Controller; |
| | | |
| | | import java.util.List; |
| | | import com.xiaopeng.common.log.annotation.AdminOperationLog; |
| | | import com.xiaopeng.common.log.enums.AdminBusinessType; |
| | | import com.xiaopeng.common.log.enums.AdminOperationType; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @PostMapping("/v1/api/xp-coupon/add") |
| | | @ApiOperation(value = "添加优惠券",tags = {"管理后台-优惠券"},response = XpCoupon.class) |
| | | @AdminOperationLog( |
| | | businessType = AdminBusinessType.COUPON_MANAGEMENT, |
| | | operationType = AdminOperationType.ADD, |
| | | content = "添加优惠券", |
| | | appendRequestData = true |
| | | ) |
| | | public R<?> add(@RequestBody XpCoupon xpCoupon){ |
| | | xpCouponService.save(xpCoupon); |
| | | return R.ok(); |
| | |
| | | */ |
| | | @DeleteMapping("/v1/api/xp-coupon/deleteById") |
| | | @ApiOperation(value = "删除优惠券",tags = {"管理后台-优惠券"},response = XpCoupon.class) |
| | | @AdminOperationLog( |
| | | businessType = AdminBusinessType.COUPON_MANAGEMENT, |
| | | operationType = AdminOperationType.DELETE, |
| | | contentExpression = "'删除优惠券,id=' + #p0", |
| | | appendRequestData = false |
| | | ) |
| | | public R<?> deleteById(@RequestParam Long id){ |
| | | xpCouponService.removeById(id); |
| | | return R.ok(); |