1、增加单位图标管理
2、修改机构登录 3、订单问题处理 4、完善组态绑定及删除关联
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
package com.xinda.system.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.xinda.common.annotation.Excel;
|
||||
import com.xinda.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 系统配置对象 sys_info
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2025-05-29
|
||||
*/
|
||||
@ApiModel(value = "SysInfo",description = "系统配置 sys_info")
|
||||
@Data
|
||||
public class SysInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id唯一标识 */
|
||||
private Long id;
|
||||
|
||||
/** 登录标题名称 */
|
||||
@Excel(name = "登录标题名称")
|
||||
@ApiModelProperty("登录标题名称")
|
||||
private String loginName;
|
||||
|
||||
/** 首页标题名称 */
|
||||
@Excel(name = "首页标题名称")
|
||||
@ApiModelProperty("首页标题名称")
|
||||
private String indexName;
|
||||
|
||||
/** LOGO */
|
||||
@Excel(name = "LOGO")
|
||||
@ApiModelProperty("LOGO")
|
||||
private String logoUrl;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.xinda.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.xinda.system.domain.SysInfo;
|
||||
|
||||
/**
|
||||
* 系统配置Mapper接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2025-05-29
|
||||
*/
|
||||
public interface SysInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询系统配置
|
||||
*
|
||||
* @param id 系统配置主键
|
||||
* @return 系统配置
|
||||
*/
|
||||
public SysInfo selectSysInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询系统配置列表
|
||||
*
|
||||
* @param sysInfo 系统配置
|
||||
* @return 系统配置集合
|
||||
*/
|
||||
public List<SysInfo> selectSysInfoList(SysInfo sysInfo);
|
||||
|
||||
/**
|
||||
* 新增系统配置
|
||||
*
|
||||
* @param sysInfo 系统配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysInfo(SysInfo sysInfo);
|
||||
|
||||
/**
|
||||
* 修改系统配置
|
||||
*
|
||||
* @param sysInfo 系统配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysInfo(SysInfo sysInfo);
|
||||
|
||||
/**
|
||||
* 删除系统配置
|
||||
*
|
||||
* @param id 系统配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除系统配置
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysInfoByIds(Long[] ids);
|
||||
}
|
||||
@@ -44,6 +44,7 @@ public interface SysUserMapper
|
||||
*/
|
||||
public SysUser selectUserByUserName(String userName);
|
||||
|
||||
SysUser selectUserByUserNameAndDeptId(@Param("userName")String userName, @Param("deptId") Long deptId);
|
||||
/**
|
||||
* 通过用户ID查询用户
|
||||
*
|
||||
@@ -109,7 +110,7 @@ public interface SysUserMapper
|
||||
* @return 结果
|
||||
*/
|
||||
public SysUser checkUserNameUnique(String userName);
|
||||
|
||||
public SysUser checkDeptUserNameUnique(@Param("userName") String userName, @Param("deptId") Long deptId);
|
||||
/**
|
||||
* 校验手机号码是否唯一
|
||||
*
|
||||
@@ -183,4 +184,5 @@ public interface SysUserMapper
|
||||
*/
|
||||
List<SysUser> selectByDeptId(Long deptId);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.xinda.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.xinda.system.domain.SysInfo;
|
||||
|
||||
/**
|
||||
* 系统配置Service接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2025-05-29
|
||||
*/
|
||||
public interface ISysInfoService
|
||||
{
|
||||
/**
|
||||
* 查询系统配置
|
||||
*
|
||||
* @param id 系统配置主键
|
||||
* @return 系统配置
|
||||
*/
|
||||
public SysInfo selectSysInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询系统配置列表
|
||||
*
|
||||
* @param sysInfo 系统配置
|
||||
* @return 系统配置集合
|
||||
*/
|
||||
public List<SysInfo> selectSysInfoList(SysInfo sysInfo);
|
||||
|
||||
/**
|
||||
* 新增系统配置
|
||||
*
|
||||
* @param sysInfo 系统配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysInfo(SysInfo sysInfo);
|
||||
|
||||
/**
|
||||
* 修改系统配置
|
||||
*
|
||||
* @param sysInfo 系统配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysInfo(SysInfo sysInfo);
|
||||
|
||||
/**
|
||||
* 批量删除系统配置
|
||||
*
|
||||
* @param ids 需要删除的系统配置主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除系统配置信息
|
||||
*
|
||||
* @param id 系统配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysInfoById(Long id);
|
||||
}
|
||||
@@ -256,4 +256,5 @@ public interface ISysUserService
|
||||
*/
|
||||
List<SysUser> selectByDeptId();
|
||||
|
||||
SysUser selectUserByUserNameAndDeptId(String username, Long deptId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.xinda.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.xinda.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.xinda.system.mapper.SysInfoMapper;
|
||||
import com.xinda.system.domain.SysInfo;
|
||||
import com.xinda.system.service.ISysInfoService;
|
||||
|
||||
/**
|
||||
* 系统配置Service业务层处理
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2025-05-29
|
||||
*/
|
||||
@Service
|
||||
public class SysInfoServiceImpl implements ISysInfoService
|
||||
{
|
||||
@Autowired
|
||||
private SysInfoMapper sysInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询系统配置
|
||||
*
|
||||
* @param id 系统配置主键
|
||||
* @return 系统配置
|
||||
*/
|
||||
@Override
|
||||
public SysInfo selectSysInfoById(Long id)
|
||||
{
|
||||
return sysInfoMapper.selectSysInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询系统配置列表
|
||||
*
|
||||
* @param sysInfo 系统配置
|
||||
* @return 系统配置
|
||||
*/
|
||||
@Override
|
||||
public List<SysInfo> selectSysInfoList(SysInfo sysInfo)
|
||||
{
|
||||
return sysInfoMapper.selectSysInfoList(sysInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增系统配置
|
||||
*
|
||||
* @param sysInfo 系统配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSysInfo(SysInfo sysInfo)
|
||||
{
|
||||
sysInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return sysInfoMapper.insertSysInfo(sysInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改系统配置
|
||||
*
|
||||
* @param sysInfo 系统配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSysInfo(SysInfo sysInfo)
|
||||
{
|
||||
Long id = 1L;
|
||||
if(sysInfo.getId()!=null){
|
||||
sysInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return sysInfoMapper.updateSysInfo(sysInfo);
|
||||
}else{
|
||||
sysInfo.setId(id);
|
||||
sysInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return sysInfoMapper.insertSysInfo(sysInfo);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除系统配置
|
||||
*
|
||||
* @param ids 需要删除的系统配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysInfoByIds(Long[] ids)
|
||||
{
|
||||
return sysInfoMapper.deleteSysInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除系统配置信息
|
||||
*
|
||||
* @param id 系统配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysInfoById(Long id)
|
||||
{
|
||||
return sysInfoMapper.deleteSysInfoById(id);
|
||||
}
|
||||
}
|
||||
@@ -131,6 +131,19 @@ public class SysUserServiceImpl implements ISysUserService
|
||||
return userMapper.selectUserByUserName(userName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过用户名查询用户
|
||||
*
|
||||
* @param userName 用户名
|
||||
* @return 用户对象信息
|
||||
*/
|
||||
// @Cacheable(value = "sysUser", key = "#root.methodName + '_' + #userName", unless = "#result == null")
|
||||
@Override
|
||||
public SysUser selectUserByUserNameAndDeptId(String userName, Long deptId)
|
||||
{
|
||||
return userMapper.selectUserByUserNameAndDeptId(userName,deptId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过用户ID查询用户
|
||||
*
|
||||
@@ -190,7 +203,8 @@ public class SysUserServiceImpl implements ISysUserService
|
||||
public String checkUserNameUnique(SysUser user)
|
||||
{
|
||||
Long userId = StringUtils.isNull(user.getUserId()) ? -1L : user.getUserId();
|
||||
SysUser info = userMapper.checkUserNameUnique(user.getUserName());
|
||||
SysUser info = userMapper.checkDeptUserNameUnique(user.getUserName(),user.getDeptId());
|
||||
// SysUser info = userMapper.checkUserNameUnique(user.getUserName());
|
||||
if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue())
|
||||
{
|
||||
return UserConstants.NOT_UNIQUE;
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xinda.system.mapper.SysInfoMapper">
|
||||
|
||||
<resultMap type="SysInfo" id="SysInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="loginName" column="login_name" />
|
||||
<result property="indexName" column="index_name" />
|
||||
<result property="logoUrl" column="logo_url" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysInfoVo">
|
||||
select id, login_name, index_name, logo_url, create_by, create_time, update_by, update_time from sys_info
|
||||
</sql>
|
||||
|
||||
<select id="selectSysInfoList" parameterType="SysInfo" resultMap="SysInfoResult">
|
||||
<include refid="selectSysInfoVo"/>
|
||||
<where>
|
||||
<if test="loginName != null and loginName != ''"> and login_name like concat('%', #{loginName}, '%')</if>
|
||||
<if test="indexName != null and indexName != ''"> and index_name like concat('%', #{indexName}, '%')</if>
|
||||
<if test="logoUrl != null and logoUrl != ''"> and logo_url = #{logoUrl}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSysInfoById" parameterType="Long" resultMap="SysInfoResult">
|
||||
<include refid="selectSysInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSysInfo" parameterType="SysInfo">
|
||||
insert into sys_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="loginName != null">login_name,</if>
|
||||
<if test="indexName != null">index_name,</if>
|
||||
<if test="logoUrl != null">logo_url,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="loginName != null">#{loginName},</if>
|
||||
<if test="indexName != null">#{indexName},</if>
|
||||
<if test="logoUrl != null">#{logoUrl},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysInfo" parameterType="SysInfo">
|
||||
update sys_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="loginName != null">login_name = #{loginName},</if>
|
||||
<if test="indexName != null">index_name = #{indexName},</if>
|
||||
<if test="logoUrl != null">logo_url = #{logoUrl},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysInfoById" parameterType="Long">
|
||||
delete from sys_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysInfoByIds" parameterType="String">
|
||||
delete from sys_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -140,6 +140,12 @@
|
||||
where u.user_name = #{userName} and u.del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="selectUserByUserNameAndDeptId" resultMap="SysUserResult">
|
||||
<include refid="selectUserVo"/>
|
||||
where u.user_name = #{userName} and u.dept_id = #{deptId} and u.del_flag = '0'
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectUserById" parameterType="Long" resultMap="SysUserResult">
|
||||
<include refid="selectUserVo"/>
|
||||
where u.user_id = #{userId}
|
||||
@@ -149,6 +155,11 @@
|
||||
select user_id, user_name from sys_user where user_name = #{userName} and del_flag = '0' limit 1
|
||||
</select>
|
||||
|
||||
<select id="checkDeptUserNameUnique" resultMap="SysUserResult">
|
||||
select user_id, user_name from sys_user where user_name = #{userName} and dept_id = #{deptId} and del_flag = '0' limit 1
|
||||
</select>
|
||||
|
||||
|
||||
<select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult">
|
||||
select user_id, phonenumber from sys_user where phonenumber = #{phonenumber} and del_flag = '0' limit 1
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user