fix
This commit is contained in:
parent
714b759050
commit
eee546fcc4
@ -1,7 +1,6 @@
|
||||
package com.agileboot.common.mybatis.core.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.Data;
|
||||
@ -23,6 +22,9 @@ public class BaseEntity implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@ -33,8 +35,8 @@ public class BaseEntity implements Serializable {
|
||||
/**
|
||||
* 创建部门
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long createDept;
|
||||
// @TableField(fill = FieldFill.INSERT)
|
||||
// private Long createDept;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
@ -60,6 +62,10 @@ public class BaseEntity implements Serializable {
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateTime;
|
||||
|
||||
@TableLogic
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Integer deleted;
|
||||
|
||||
/**
|
||||
* 请求参数
|
||||
*/
|
||||
|
||||
@ -24,7 +24,7 @@ mybatis-plus:
|
||||
dbConfig:
|
||||
idType: ASSIGN_ID # 主键类型: AUTO 自增 NONE 空 INPUT 用户输入 ASSIGN_ID 雪花 ASSIGN_UUID 唯一 UUID
|
||||
table-underline: true # 默认数据库表下划线命名
|
||||
# logic-delete-field: logic_status # 全局逻辑删除字段名
|
||||
logic-delete-field: deleted # 全局逻辑删除字段名
|
||||
logicDeleteValue: 1 # 逻辑已删除值(框架表均使用此值 禁止随意修改)
|
||||
logicNotDeleteValue: 0 # 逻辑未删除值
|
||||
insertStrategy: NOT_NULL
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
package com.agileboot.system.config.controller;
|
||||
|
||||
import com.agileboot.common.core.core.R;
|
||||
import com.agileboot.common.core.exception.BizException;
|
||||
import com.agileboot.system.config.service.ISysConfigService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
@ -22,7 +22,7 @@ public class SysConfigController {
|
||||
private final ISysConfigService sysConfigService;
|
||||
|
||||
@GetMapping("/test")
|
||||
public R<String> test() {
|
||||
return R.ok(sysConfigService.getConfigValueByKey("sys.config.test"));
|
||||
public R<String> test(@RequestParam("key") String key) {
|
||||
return R.ok(sysConfigService.getConfigValueByKey(key));
|
||||
}
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@ public class ConfigDTO {
|
||||
|
||||
public ConfigDTO(SysConfig entity) {
|
||||
if (entity != null) {
|
||||
configId = entity.getConfigId() + "";
|
||||
configId = entity.getId();
|
||||
configName = entity.getConfigName();
|
||||
configKey = entity.getConfigKey();
|
||||
configValue = entity.getConfigValue();
|
||||
|
||||
@ -1,9 +1,7 @@
|
||||
package com.agileboot.system.config.pojo.entity;
|
||||
|
||||
import com.agileboot.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@ -29,10 +27,6 @@ public class SysConfig extends BaseEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("参数主键")
|
||||
@TableId(value = "config_id", type = IdType.AUTO)
|
||||
private Integer configId;
|
||||
|
||||
@ApiModelProperty("配置名称")
|
||||
@TableField("config_name")
|
||||
private String configName;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user