| | |
| | | import com.xiaopeng.common.core.constant.CacheConstants; |
| | | import com.xiaopeng.common.core.domain.R; |
| | | import com.xiaopeng.common.core.web.page.PageInfo; |
| | | import com.xiaopeng.common.log.annotation.AdminOperationLog; |
| | | import com.xiaopeng.common.log.enums.AdminBusinessType; |
| | | import com.xiaopeng.common.log.enums.AdminOperationType; |
| | | import com.xiaopeng.operation.service.*; |
| | | import com.xiaopeng.operation.service.IXpActicityCouponService; |
| | | import com.xiaopeng.operation.service.IXpActicityService; |
| | |
| | | |
| | | @PostMapping("/v1/api/appUserCoupon/add") |
| | | @ApiOperation(value = "添加活动", tags = {"管理后台-活动管理"}, response = XpCoupon.class) |
| | | @AdminOperationLog( |
| | | businessType = AdminBusinessType.ACTIVITY_MANAGEMENT, |
| | | operationType = AdminOperationType.ADD, |
| | | content = "添加活动", |
| | | appendRequestData = true |
| | | ) |
| | | public R<?> add(@RequestBody XpActivityDto dto) { |
| | | service.save(dto); |
| | | return R.ok(); |
| | |
| | | |
| | | @PostMapping("/v1/api/appUserCoupon/{op}") |
| | | @ApiOperation(value = "修改活动状态,release,pause,resume,stop,del", tags = {"管理后台-活动管理"}, response = XpCoupon.class) |
| | | @AdminOperationLog( |
| | | businessType = AdminBusinessType.ACTIVITY_MANAGEMENT, |
| | | operationTypeExpression = "#p0 == 'release' ? T(com.xiaopeng.common.log.enums.AdminOperationType).RELEASE : (#p0 == 'del' ? T(com.xiaopeng.common.log.enums.AdminOperationType).DELETE : T(com.xiaopeng.common.log.enums.AdminOperationType).EDIT)", |
| | | contentExpression = "'修改活动状态:' + #p0 + ',id=' + #p1", |
| | | appendRequestData = true |
| | | ) |
| | | public R<XpActivity> updateById(@PathVariable String op, @RequestParam Long id) { |
| | | |
| | | XpActivity activity = service.getById(id); |