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.domain.AjaxResult;
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.service.IUBillRuleService;
@@ -51,16 +53,19 @@ public class UBillRuleController extends BaseController {
return success(uBillRuleService.getById(id));
}
@Log(title = "计费规则", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody UBillRule uBillRule) {
return toAjax(uBillRuleService.save(uBillRule));
}
@Log(title = "计费规则", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody UBillRule uBillRule) {
return toAjax(uBillRuleService.updateById(uBillRule));
}
@Log(title = "计费规则", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] 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.domain.AjaxResult;
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.URateLimit;
import org.wfc.system.service.IUPackageService;
@@ -57,16 +59,19 @@ public class UPackageController extends BaseController {
return success(uPackageService.getById(id));
}
@Log(title = "套餐设置", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody UPackage uPackage) {
return toAjax(uPackageService.save(uPackage));
}
@Log(title = "套餐设置", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody UPackage uPackage) {
return toAjax(uPackageService.updateById(uPackage));
}
@Log(title = "套餐设置", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] 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.domain.AjaxResult;
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.service.IURateLimitService;
@@ -51,16 +53,19 @@ public class URateLimitController extends BaseController {
return success(uRateLimitService.getById(id));
}
@Log(title = "限速设置", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody URateLimit uRateLimit) {
return toAjax(uRateLimitService.save(uRateLimit));
}
@Log(title = "限速设置", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody URateLimit uRateLimit) {
return toAjax(uRateLimitService.updateById(uRateLimit));
}
@Log(title = "限速设置", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(uRateLimitService.removeByIds(CollUtil.newArrayList(ids)));