|
@@ -6,6 +6,8 @@ import lombok.RequiredArgsConstructor;
|
|
|
import jakarta.servlet.http.HttpServletResponse;
|
|
import jakarta.servlet.http.HttpServletResponse;
|
|
|
import jakarta.validation.constraints.*;
|
|
import jakarta.validation.constraints.*;
|
|
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
|
|
|
+import org.dromara.backstage.aop.annotation.SyncDataToLocal;
|
|
|
|
|
+import org.dromara.common.message.kafka.constant.MessageEventTypeConstants;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
|
@@ -75,22 +77,12 @@ public class PtParameterController extends BaseController {
|
|
|
@SaCheckPermission("basicParameter:ptParameter:add")
|
|
@SaCheckPermission("basicParameter:ptParameter:add")
|
|
|
@Log(title = "系统参数", businessType = BusinessType.INSERT)
|
|
@Log(title = "系统参数", businessType = BusinessType.INSERT)
|
|
|
@RepeatSubmit()
|
|
@RepeatSubmit()
|
|
|
|
|
+ @SyncDataToLocal(eventType = MessageEventTypeConstants.ptParameter_ADD)
|
|
|
@PostMapping()
|
|
@PostMapping()
|
|
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody PtParameterBo bo) {
|
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody PtParameterBo bo) {
|
|
|
return toAjax(ptParameterService.insertByBo(bo));
|
|
return toAjax(ptParameterService.insertByBo(bo));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
- * 修改系统参数
|
|
|
|
|
- */
|
|
|
|
|
- @SaCheckPermission("basicParameter:ptParameter:edit")
|
|
|
|
|
- @Log(title = "系统参数", businessType = BusinessType.UPDATE)
|
|
|
|
|
- @RepeatSubmit()
|
|
|
|
|
- @PutMapping()
|
|
|
|
|
- public R<Void> edit(@Validated(EditGroup.class) @RequestBody PtParameterBo bo) {
|
|
|
|
|
- return toAjax(ptParameterService.updateByBo(bo));
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* 删除系统参数
|
|
* 删除系统参数
|
|
|
*
|
|
*
|
|
@@ -99,10 +91,23 @@ public class PtParameterController extends BaseController {
|
|
|
@SaCheckPermission("basicParameter:ptParameter:remove")
|
|
@SaCheckPermission("basicParameter:ptParameter:remove")
|
|
|
@Log(title = "系统参数", businessType = BusinessType.DELETE)
|
|
@Log(title = "系统参数", businessType = BusinessType.DELETE)
|
|
|
@DeleteMapping("/{paramIds}")
|
|
@DeleteMapping("/{paramIds}")
|
|
|
|
|
+ @SyncDataToLocal(eventType = MessageEventTypeConstants.ptParameter_EDIT)
|
|
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
|
|
@PathVariable Long[] paramIds) {
|
|
@PathVariable Long[] paramIds) {
|
|
|
return toAjax(ptParameterService.deleteWithValidByIds(List.of(paramIds), true));
|
|
return toAjax(ptParameterService.deleteWithValidByIds(List.of(paramIds), true));
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 修改系统参数
|
|
|
|
|
+ */
|
|
|
|
|
+ @SaCheckPermission("basicParameter:ptParameter:edit")
|
|
|
|
|
+ @Log(title = "系统参数", businessType = BusinessType.UPDATE)
|
|
|
|
|
+ @RepeatSubmit()
|
|
|
|
|
+ @SyncDataToLocal(eventType = MessageEventTypeConstants.ptParameter_REMOVE)
|
|
|
|
|
+ @PutMapping()
|
|
|
|
|
+ public R<Void> edit(@Validated(EditGroup.class) @RequestBody PtParameterBo bo) {
|
|
|
|
|
+ return toAjax(ptParameterService.updateByBo(bo));
|
|
|
|
|
+ }
|
|
|
/**
|
|
/**
|
|
|
* 根据参数键名查询参数值
|
|
* 根据参数键名查询参数值
|
|
|
*
|
|
*
|