领导履职代码迁移
This commit is contained in:
parent
dc8461ceee
commit
ab1ca78891
|
|
@ -4,6 +4,7 @@ import com.bonus.system.service.ISysDeptService;
|
||||||
import com.bonus.common.core.web.controller.BaseController;
|
import com.bonus.common.core.web.controller.BaseController;
|
||||||
import com.bonus.common.core.web.page.TableDataInfo;
|
import com.bonus.common.core.web.page.TableDataInfo;
|
||||||
import com.bonus.system.api.domain.SysDept;
|
import com.bonus.system.api.domain.SysDept;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
@ -16,7 +17,7 @@ import java.util.Map;
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/org")
|
@RequestMapping("/org")
|
||||||
public class OrgController extends BaseController {
|
public class OrgController extends BaseController {
|
||||||
@Resource
|
@Autowired
|
||||||
private ISysDeptService deptService;
|
private ISysDeptService deptService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import com.bonus.common.core.web.page.TableDataInfo;
|
||||||
import com.bonus.common.log.annotation.SysLog;
|
import com.bonus.common.log.annotation.SysLog;
|
||||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||||
import com.bonus.common.security.utils.SecurityUtils;
|
import com.bonus.common.security.utils.SecurityUtils;
|
||||||
import com.bonus.system.domain.SysConfig;
|
import com.bonus.system.api.domain.SysConfig;
|
||||||
import com.bonus.system.service.ISysConfigService;
|
import com.bonus.system.service.ISysConfigService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
|
||||||
|
|
@ -1,112 +0,0 @@
|
||||||
package com.bonus.system.domain;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
|
||||||
import javax.validation.constraints.Size;
|
|
||||||
|
|
||||||
import com.bonus.common.core.annotation.Excel;
|
|
||||||
import com.bonus.common.core.web.domain.BaseEntity;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 参数配置表 sys_config
|
|
||||||
*
|
|
||||||
* @author ldlv
|
|
||||||
*/
|
|
||||||
public class SysConfig extends BaseEntity
|
|
||||||
{
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** 参数主键 */
|
|
||||||
@Excel(name = "参数主键", cellType = Excel.ColumnType.NUMERIC)
|
|
||||||
private Long configId;
|
|
||||||
|
|
||||||
/** 参数名称 */
|
|
||||||
@Excel(name = "参数名称")
|
|
||||||
private String configName;
|
|
||||||
|
|
||||||
/** 参数键名 */
|
|
||||||
@Excel(name = "参数键名")
|
|
||||||
private String configKey;
|
|
||||||
|
|
||||||
/** 参数键值 */
|
|
||||||
@Excel(name = "参数键值")
|
|
||||||
private String configValue;
|
|
||||||
|
|
||||||
/** 系统内置(Y是 N否) */
|
|
||||||
@Excel(name = "系统内置", readConverterExp = "Y=是,N=否")
|
|
||||||
private String configType;
|
|
||||||
|
|
||||||
public Long getConfigId()
|
|
||||||
{
|
|
||||||
return configId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setConfigId(Long configId)
|
|
||||||
{
|
|
||||||
this.configId = configId;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotBlank(message = "参数名称不能为空")
|
|
||||||
@Size(min = 0, max = 100, message = "参数名称不能超过100个字符")
|
|
||||||
public String getConfigName()
|
|
||||||
{
|
|
||||||
return configName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setConfigName(String configName)
|
|
||||||
{
|
|
||||||
this.configName = configName;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotBlank(message = "参数键名长度不能为空")
|
|
||||||
@Size(min = 0, max = 100, message = "参数键名长度不能超过100个字符")
|
|
||||||
public String getConfigKey()
|
|
||||||
{
|
|
||||||
return configKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setConfigKey(String configKey)
|
|
||||||
{
|
|
||||||
this.configKey = configKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotBlank(message = "参数键值不能为空")
|
|
||||||
@Size(min = 0, max = 500, message = "参数键值长度不能超过500个字符")
|
|
||||||
public String getConfigValue()
|
|
||||||
{
|
|
||||||
return configValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setConfigValue(String configValue)
|
|
||||||
{
|
|
||||||
this.configValue = configValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getConfigType()
|
|
||||||
{
|
|
||||||
return configType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setConfigType(String configType)
|
|
||||||
{
|
|
||||||
this.configType = configType;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
.append("configId", getConfigId())
|
|
||||||
.append("configName", getConfigName())
|
|
||||||
.append("configKey", getConfigKey())
|
|
||||||
.append("configValue", getConfigValue())
|
|
||||||
.append("configType", getConfigType())
|
|
||||||
.append("createBy", getCreateBy())
|
|
||||||
.append("createTime", getCreateTime())
|
|
||||||
.append("updateBy", getUpdateBy())
|
|
||||||
.append("updateTime", getUpdateTime())
|
|
||||||
.append("remark", getRemark())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
package com.bonus.system.mapper;
|
package com.bonus.system.mapper;
|
||||||
|
|
||||||
|
import com.bonus.system.api.domain.SysConfig;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.bonus.system.domain.SysConfig;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 参数配置 数据层
|
* 参数配置 数据层
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
package com.bonus.system.service;
|
package com.bonus.system.service;
|
||||||
|
|
||||||
|
import com.bonus.system.api.domain.SysConfig;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.bonus.system.domain.SysConfig;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 参数配置 服务层
|
* 参数配置 服务层
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,10 @@ import com.bonus.common.core.utils.StringUtils;
|
||||||
import com.bonus.common.datasource.annotation.DataSource;
|
import com.bonus.common.datasource.annotation.DataSource;
|
||||||
import com.bonus.common.datasource.annotation.DataSourceType;
|
import com.bonus.common.datasource.annotation.DataSourceType;
|
||||||
import com.bonus.common.redis.service.RedisService;
|
import com.bonus.common.redis.service.RedisService;
|
||||||
|
import com.bonus.system.api.domain.SysConfig;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.bonus.common.core.text.Convert;
|
import com.bonus.common.core.text.Convert;
|
||||||
import com.bonus.system.domain.SysConfig;
|
|
||||||
import com.bonus.system.mapper.SysConfigMapper;
|
import com.bonus.system.mapper.SysConfigMapper;
|
||||||
import com.bonus.system.service.ISysConfigService;
|
import com.bonus.system.service.ISysConfigService;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.bonus.system.mapper.SysConfigMapper">
|
<mapper namespace="com.bonus.system.mapper.SysConfigMapper">
|
||||||
|
|
||||||
<resultMap type="com.bonus.system.domain.SysConfig" id="SysConfigResult">
|
<resultMap type="com.bonus.system.api.domain.SysConfig" id="SysConfigResult">
|
||||||
<id property="configId" column="config_id" />
|
<id property="configId" column="config_id" />
|
||||||
<result property="configName" column="config_name" />
|
<result property="configName" column="config_name" />
|
||||||
<result property="configKey" column="config_key" />
|
<result property="configKey" column="config_key" />
|
||||||
|
|
@ -33,12 +33,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</where>
|
</where>
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectConfig" parameterType="com.bonus.system.domain.SysConfig" resultMap="SysConfigResult">
|
<select id="selectConfig" parameterType="com.bonus.system.api.domain.SysConfig" resultMap="SysConfigResult">
|
||||||
<include refid="selectConfigVo"/>
|
<include refid="selectConfigVo"/>
|
||||||
<include refid="sqlwhereSearch"/>
|
<include refid="sqlwhereSearch"/>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectConfigList" parameterType="com.bonus.system.domain.SysConfig" resultMap="SysConfigResult">
|
<select id="selectConfigList" parameterType="com.bonus.system.api.domain.SysConfig" resultMap="SysConfigResult">
|
||||||
<include refid="selectConfigVo"/>
|
<include refid="selectConfigVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="configName != null and configName != ''">
|
<if test="configName != null and configName != ''">
|
||||||
|
|
@ -69,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where config_key = #{configKey} limit 1
|
where config_key = #{configKey} limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertConfig" parameterType="com.bonus.system.domain.SysConfig">
|
<insert id="insertConfig" parameterType="com.bonus.system.api.domain.SysConfig">
|
||||||
insert into sys_config (
|
insert into sys_config (
|
||||||
<if test="configName != null and configName != '' ">config_name,</if>
|
<if test="configName != null and configName != '' ">config_name,</if>
|
||||||
<if test="configKey != null and configKey != '' ">config_key,</if>
|
<if test="configKey != null and configKey != '' ">config_key,</if>
|
||||||
|
|
@ -89,7 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateConfig" parameterType="com.bonus.system.domain.SysConfig">
|
<update id="updateConfig" parameterType="com.bonus.system.api.domain.SysConfig">
|
||||||
update sys_config
|
update sys_config
|
||||||
<set>
|
<set>
|
||||||
<if test="configName != null and configName != ''">config_name = #{configName},</if>
|
<if test="configName != null and configName != ''">config_name = #{configName},</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue