mirror of https://gitee.com/stylefeng/roses
【7.2.2】【expand】完善业务管理字段
parent
f70998d4e4
commit
501f1a74bb
|
@ -48,6 +48,13 @@ public class SysExpand extends BaseEntity {
|
||||||
@ChineseDescription("状态:1-启用,2-禁用")
|
@ChineseDescription("状态:1-启用,2-禁用")
|
||||||
private Integer expandStatus;
|
private Integer expandStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主业务表,例如:sys_user
|
||||||
|
*/
|
||||||
|
@TableField("primary_table_name")
|
||||||
|
@ChineseDescription("主业务表,例如:sys_user")
|
||||||
|
private String primaryTableName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 业务主键id字段名,例如:user_id
|
* 业务主键id字段名,例如:user_id
|
||||||
*/
|
*/
|
||||||
|
@ -55,4 +62,12 @@ public class SysExpand extends BaseEntity {
|
||||||
@ChineseDescription("业务主键id字段名,例如:user_id")
|
@ChineseDescription("业务主键id字段名,例如:user_id")
|
||||||
private String primaryFieldName;
|
private String primaryFieldName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务主键id字段名驼峰法,例如:userId
|
||||||
|
*/
|
||||||
|
@TableField("primary_field_camel")
|
||||||
|
@ChineseDescription("业务主键id字段名驼峰法,例如:userId")
|
||||||
|
private String primaryFieldCamel;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,10 +45,22 @@ public class SysExpandRequest extends BaseRequest {
|
||||||
@StatusValue(groups = updateStatus.class)
|
@StatusValue(groups = updateStatus.class)
|
||||||
private Integer expandStatus;
|
private Integer expandStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主业务表,例如:sys_user
|
||||||
|
*/
|
||||||
|
@ChineseDescription("主业务表,例如:sys_user")
|
||||||
|
private String primaryTableName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 业务主键id字段名,例如:user_id
|
* 业务主键id字段名,例如:user_id
|
||||||
*/
|
*/
|
||||||
@ChineseDescription("业务主键id字段名,例如:user_id")
|
@ChineseDescription("业务主键id字段名,例如:user_id")
|
||||||
private String primaryFieldName;
|
private String primaryFieldName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务主键id字段名驼峰法,例如:userId
|
||||||
|
*/
|
||||||
|
@ChineseDescription("业务主键id字段名驼峰法,例如:userId")
|
||||||
|
private String primaryFieldCamel;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ import cn.stylefeng.roses.kernel.expand.modular.modular.enums.SysExpandException
|
||||||
import cn.stylefeng.roses.kernel.expand.modular.modular.mapper.SysExpandMapper;
|
import cn.stylefeng.roses.kernel.expand.modular.modular.mapper.SysExpandMapper;
|
||||||
import cn.stylefeng.roses.kernel.expand.modular.modular.pojo.request.SysExpandRequest;
|
import cn.stylefeng.roses.kernel.expand.modular.modular.pojo.request.SysExpandRequest;
|
||||||
import cn.stylefeng.roses.kernel.expand.modular.modular.service.SysExpandService;
|
import cn.stylefeng.roses.kernel.expand.modular.modular.service.SysExpandService;
|
||||||
|
import cn.stylefeng.roses.kernel.rule.enums.StatusEnum;
|
||||||
import cn.stylefeng.roses.kernel.rule.exception.base.ServiceException;
|
import cn.stylefeng.roses.kernel.rule.exception.base.ServiceException;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
@ -31,6 +32,10 @@ public class SysExpandServiceImpl extends ServiceImpl<SysExpandMapper, SysExpand
|
||||||
public void add(SysExpandRequest sysExpandRequest) {
|
public void add(SysExpandRequest sysExpandRequest) {
|
||||||
SysExpand sysExpand = new SysExpand();
|
SysExpand sysExpand = new SysExpand();
|
||||||
BeanUtil.copyProperties(sysExpandRequest, sysExpand);
|
BeanUtil.copyProperties(sysExpandRequest, sysExpand);
|
||||||
|
|
||||||
|
// 设置启用状态
|
||||||
|
sysExpand.setExpandStatus(StatusEnum.ENABLE.getCode());
|
||||||
|
|
||||||
this.save(sysExpand);
|
this.save(sysExpand);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue