领导履职代码迁移
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.page.TableDataInfo;
|
||||
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.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
|
@ -16,7 +17,7 @@ import java.util.Map;
|
|||
@RestController
|
||||
@RequestMapping("/org")
|
||||
public class OrgController extends BaseController {
|
||||
@Resource
|
||||
@Autowired
|
||||
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.security.annotation.RequiresPermissions;
|
||||
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 org.springframework.beans.factory.annotation.Autowired;
|
||||
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,18 +1,20 @@
|
|||
package com.bonus.system.mapper;
|
||||
|
||||
import com.bonus.system.api.domain.SysConfig;
|
||||
|
||||
import java.util.List;
|
||||
import com.bonus.system.domain.SysConfig;
|
||||
|
||||
|
||||
/**
|
||||
* 参数配置 数据层
|
||||
*
|
||||
*
|
||||
* @author ldlv
|
||||
*/
|
||||
public interface SysConfigMapper
|
||||
{
|
||||
/**
|
||||
* 查询参数配置信息
|
||||
*
|
||||
*
|
||||
* @param config 参数配置信息
|
||||
* @return 参数配置信息
|
||||
*/
|
||||
|
|
@ -20,7 +22,7 @@ public interface SysConfigMapper
|
|||
|
||||
/**
|
||||
* 通过ID查询配置
|
||||
*
|
||||
*
|
||||
* @param configId 参数ID
|
||||
* @return 参数配置信息
|
||||
*/
|
||||
|
|
@ -28,7 +30,7 @@ public interface SysConfigMapper
|
|||
|
||||
/**
|
||||
* 查询参数配置列表
|
||||
*
|
||||
*
|
||||
* @param config 参数配置信息
|
||||
* @return 参数配置集合
|
||||
*/
|
||||
|
|
@ -36,7 +38,7 @@ public interface SysConfigMapper
|
|||
|
||||
/**
|
||||
* 根据键名查询参数配置信息
|
||||
*
|
||||
*
|
||||
* @param configKey 参数键名
|
||||
* @return 参数配置信息
|
||||
*/
|
||||
|
|
@ -44,7 +46,7 @@ public interface SysConfigMapper
|
|||
|
||||
/**
|
||||
* 新增参数配置
|
||||
*
|
||||
*
|
||||
* @param config 参数配置信息
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -52,7 +54,7 @@ public interface SysConfigMapper
|
|||
|
||||
/**
|
||||
* 修改参数配置
|
||||
*
|
||||
*
|
||||
* @param config 参数配置信息
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -60,7 +62,7 @@ public interface SysConfigMapper
|
|||
|
||||
/**
|
||||
* 删除参数配置
|
||||
*
|
||||
*
|
||||
* @param configId 参数ID
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -68,7 +70,7 @@ public interface SysConfigMapper
|
|||
|
||||
/**
|
||||
* 批量删除参数信息
|
||||
*
|
||||
*
|
||||
* @param configIds 需要删除的参数ID
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
package com.bonus.system.service;
|
||||
|
||||
import com.bonus.system.api.domain.SysConfig;
|
||||
|
||||
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.DataSourceType;
|
||||
import com.bonus.common.redis.service.RedisService;
|
||||
import com.bonus.system.api.domain.SysConfig;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.bonus.common.core.text.Convert;
|
||||
import com.bonus.system.domain.SysConfig;
|
||||
import com.bonus.system.mapper.SysConfigMapper;
|
||||
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">
|
||||
<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" />
|
||||
<result property="configName" column="config_name" />
|
||||
<result property="configKey" column="config_key" />
|
||||
|
|
@ -33,12 +33,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
</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="sqlwhereSearch"/>
|
||||
</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"/>
|
||||
<where>
|
||||
<if test="configName != null and configName != ''">
|
||||
|
|
@ -69,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where config_key = #{configKey} limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertConfig" parameterType="com.bonus.system.domain.SysConfig">
|
||||
<insert id="insertConfig" parameterType="com.bonus.system.api.domain.SysConfig">
|
||||
insert into sys_config (
|
||||
<if test="configName != null and configName != '' ">config_name,</if>
|
||||
<if test="configKey != null and configKey != '' ">config_key,</if>
|
||||
|
|
@ -89,7 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateConfig" parameterType="com.bonus.system.domain.SysConfig">
|
||||
<update id="updateConfig" parameterType="com.bonus.system.api.domain.SysConfig">
|
||||
update sys_config
|
||||
<set>
|
||||
<if test="configName != null and configName != ''">config_name = #{configName},</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue