2
0

feat: 补充操作日志

This commit is contained in:
caiyuchao
2025-01-22 17:45:56 +08:00
parent 8085c3d8c4
commit a75d638d30
3 changed files with 15 additions and 0 deletions

View File

@@ -13,6 +13,8 @@ import org.springframework.web.bind.annotation.RestController;
import org.wfc.common.core.web.controller.BaseController; import org.wfc.common.core.web.controller.BaseController;
import org.wfc.common.core.web.domain.AjaxResult; import org.wfc.common.core.web.domain.AjaxResult;
import org.wfc.common.core.web.page.TableDataInfo; import org.wfc.common.core.web.page.TableDataInfo;
import org.wfc.common.log.annotation.Log;
import org.wfc.common.log.enums.BusinessType;
import org.wfc.system.domain.UBillRule; import org.wfc.system.domain.UBillRule;
import org.wfc.system.service.IUBillRuleService; import org.wfc.system.service.IUBillRuleService;
@@ -51,16 +53,19 @@ public class UBillRuleController extends BaseController {
return success(uBillRuleService.getById(id)); return success(uBillRuleService.getById(id));
} }
@Log(title = "计费规则", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody UBillRule uBillRule) { public AjaxResult add(@RequestBody UBillRule uBillRule) {
return toAjax(uBillRuleService.save(uBillRule)); return toAjax(uBillRuleService.save(uBillRule));
} }
@Log(title = "计费规则", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody UBillRule uBillRule) { public AjaxResult edit(@RequestBody UBillRule uBillRule) {
return toAjax(uBillRuleService.updateById(uBillRule)); return toAjax(uBillRuleService.updateById(uBillRule));
} }
@Log(title = "计费规则", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) { public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(uBillRuleService.removeByIds(CollUtil.newArrayList(ids))); return toAjax(uBillRuleService.removeByIds(CollUtil.newArrayList(ids)));

View File

@@ -14,6 +14,8 @@ import org.springframework.web.bind.annotation.RestController;
import org.wfc.common.core.web.controller.BaseController; import org.wfc.common.core.web.controller.BaseController;
import org.wfc.common.core.web.domain.AjaxResult; import org.wfc.common.core.web.domain.AjaxResult;
import org.wfc.common.core.web.page.TableDataInfo; import org.wfc.common.core.web.page.TableDataInfo;
import org.wfc.common.log.annotation.Log;
import org.wfc.common.log.enums.BusinessType;
import org.wfc.system.domain.UPackage; import org.wfc.system.domain.UPackage;
import org.wfc.system.domain.URateLimit; import org.wfc.system.domain.URateLimit;
import org.wfc.system.service.IUPackageService; import org.wfc.system.service.IUPackageService;
@@ -57,16 +59,19 @@ public class UPackageController extends BaseController {
return success(uPackageService.getById(id)); return success(uPackageService.getById(id));
} }
@Log(title = "套餐设置", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody UPackage uPackage) { public AjaxResult add(@RequestBody UPackage uPackage) {
return toAjax(uPackageService.save(uPackage)); return toAjax(uPackageService.save(uPackage));
} }
@Log(title = "套餐设置", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody UPackage uPackage) { public AjaxResult edit(@RequestBody UPackage uPackage) {
return toAjax(uPackageService.updateById(uPackage)); return toAjax(uPackageService.updateById(uPackage));
} }
@Log(title = "套餐设置", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) { public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(uPackageService.removeByIds(CollUtil.newArrayList(ids))); return toAjax(uPackageService.removeByIds(CollUtil.newArrayList(ids)));

View File

@@ -13,6 +13,8 @@ import org.springframework.web.bind.annotation.RestController;
import org.wfc.common.core.web.controller.BaseController; import org.wfc.common.core.web.controller.BaseController;
import org.wfc.common.core.web.domain.AjaxResult; import org.wfc.common.core.web.domain.AjaxResult;
import org.wfc.common.core.web.page.TableDataInfo; import org.wfc.common.core.web.page.TableDataInfo;
import org.wfc.common.log.annotation.Log;
import org.wfc.common.log.enums.BusinessType;
import org.wfc.system.domain.URateLimit; import org.wfc.system.domain.URateLimit;
import org.wfc.system.service.IURateLimitService; import org.wfc.system.service.IURateLimitService;
@@ -51,16 +53,19 @@ public class URateLimitController extends BaseController {
return success(uRateLimitService.getById(id)); return success(uRateLimitService.getById(id));
} }
@Log(title = "限速设置", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody URateLimit uRateLimit) { public AjaxResult add(@RequestBody URateLimit uRateLimit) {
return toAjax(uRateLimitService.save(uRateLimit)); return toAjax(uRateLimitService.save(uRateLimit));
} }
@Log(title = "限速设置", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody URateLimit uRateLimit) { public AjaxResult edit(@RequestBody URateLimit uRateLimit) {
return toAjax(uRateLimitService.updateById(uRateLimit)); return toAjax(uRateLimitService.updateById(uRateLimit));
} }
@Log(title = "限速设置", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) { public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(uRateLimitService.removeByIds(CollUtil.newArrayList(ids))); return toAjax(uRateLimitService.removeByIds(CollUtil.newArrayList(ids)));