Commit 9fc18906 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents fd1f43a9 dbc08d24
...@@ -126,6 +126,8 @@ class AreaFeignFallbackFactory implements FallbackFactory<IApiAreaFeign> { ...@@ -126,6 +126,8 @@ class AreaFeignFallbackFactory implements FallbackFactory<IApiAreaFeign> {
@Override @Override
public String getFlatSitesByAreaIds(SitePdu query) { public String getFlatSitesByAreaIds(SitePdu query) {
log.error("暂时无法获取站点列表,请稍后再试!!query:{}", JSON.toJSONString(query));
log.error("e",t);
ApiResp<String> failResp = new ApiResp<>(); ApiResp<String> failResp = new ApiResp<>();
failResp.setCode(ApiRespCodeEnum.FAILED.getValue()); failResp.setCode(ApiRespCodeEnum.FAILED.getValue());
failResp.setMsg("暂时无法获取站点列表,请稍后再试!"); failResp.setMsg("暂时无法获取站点列表,请稍后再试!");
......
...@@ -61,6 +61,7 @@ data|Object|数据对象|- ...@@ -61,6 +61,7 @@ data|Object|数据对象|-
&emsp;&emsp;qq|String|QQ号码 &emsp;&emsp;qq|String|QQ号码
&emsp;&emsp;siteIds|String|所属站点id,多个逗号分隔 &emsp;&emsp;siteIds|String|所属站点id,多个逗号分隔
&emsp;&emsp;areaCodes|String|所属区域code,多个逗号分隔 &emsp;&emsp;areaCodes|String|所属区域code,多个逗号分隔
&emsp;&emsp;areaNames|String|所属区域名称,多个逗号分隔
&emsp;&emsp;menuList|Arrays|菜单列表,树结构 &emsp;&emsp;menuList|Arrays|菜单列表,树结构
&emsp;&emsp;&emsp;id|Long|菜单ID,主键 &emsp;&emsp;&emsp;id|Long|菜单ID,主键
&emsp;&emsp;&emsp;name|String|菜单名称 &emsp;&emsp;&emsp;name|String|菜单名称
...@@ -85,6 +86,7 @@ data|Object|数据对象|- ...@@ -85,6 +86,7 @@ data|Object|数据对象|-
"data":{ "data":{
"user":{ "user":{
"areaCodes":"", "areaCodes":"",
"areaNames":"",
"createTime":1654132346000, "createTime":1654132346000,
"createUserId":1, "createUserId":1,
"createUserName":"admin", "createUserName":"admin",
...@@ -352,6 +354,7 @@ data|object|数据对象 ...@@ -352,6 +354,7 @@ data|object|数据对象
&emsp;&emsp;mobile|String|用户手机号 &emsp;&emsp;mobile|String|用户手机号
&emsp;&emsp;siteIds|String|所属站点id,多个逗号分隔 &emsp;&emsp;siteIds|String|所属站点id,多个逗号分隔
&emsp;&emsp;areaCodes|String|所属区域code,多个逗号分隔 &emsp;&emsp;areaCodes|String|所属区域code,多个逗号分隔
&emsp;&emsp;areaNames|String|所属区域名称,多个逗号分隔
&emsp;&emsp;roleId|String|所属角色id,多个逗号分隔 &emsp;&emsp;roleId|String|所属角色id,多个逗号分隔
&emsp;&emsp;roleName|String|所属角色名称,多个逗号分隔 &emsp;&emsp;roleName|String|所属角色名称,多个逗号分隔
&emsp;&emsp;lastLoginTime|Date|最后登录时间 &emsp;&emsp;lastLoginTime|Date|最后登录时间
...@@ -404,6 +407,7 @@ data|object|数据对象 ...@@ -404,6 +407,7 @@ data|object|数据对象
&emsp;userType|Integer|用户类型(0.系统用户,1.普通用户,2.工作人员) &emsp;userType|Integer|用户类型(0.系统用户,1.普通用户,2.工作人员)
&emsp;siteIds|String|所属站点id,多个逗号分隔 &emsp;siteIds|String|所属站点id,多个逗号分隔
&emsp;areaCodes|String|所属区域code,多个逗号分隔 &emsp;areaCodes|String|所属区域code,多个逗号分隔
&emsp;areaNames|String|所属区域名称,多个逗号分隔
&emsp;roleId|String|所属角色Id,多个逗号分隔 &emsp;roleId|String|所属角色Id,多个逗号分隔
&emsp;roleName|String|所属角色名称,多个逗号分隔 &emsp;roleName|String|所属角色名称,多个逗号分隔
&emsp;lastLoginTime|Date|最后登录时间 &emsp;lastLoginTime|Date|最后登录时间
...@@ -440,6 +444,7 @@ realName|String|是|用户真实姓名 ...@@ -440,6 +444,7 @@ realName|String|是|用户真实姓名
mobile|String|是|用户手机号 mobile|String|是|用户手机号
siteIds|String|否|所属站点id,多个逗号分隔 siteIds|String|否|所属站点id,多个逗号分隔
areaCodes|String|否|所属区域code,多个逗号分隔 areaCodes|String|否|所属区域code,多个逗号分隔
areaNames|String|否|所属区域名称,多个逗号分隔
roleId|String|所属角色Id,多个逗号分隔 roleId|String|所属角色Id,多个逗号分隔
roleName|String|所属角色名称,多个逗号分隔 roleName|String|所属角色名称,多个逗号分隔
...@@ -450,7 +455,8 @@ roleName|String|所属角色名称,多个逗号分隔 ...@@ -450,7 +455,8 @@ roleName|String|所属角色名称,多个逗号分隔
"realName":"coyvcd", "realName":"coyvcd",
"mobile":"avklzq", "mobile":"avklzq",
"siteIds":"hgh6s1", "siteIds":"hgh6s1",
"areaCodes":"a4cexd" "areaCodes":"a4cexd",
"areaNames":"a4cexd"
} }
``` ```
...@@ -470,6 +476,7 @@ data|object|数据对象 ...@@ -470,6 +476,7 @@ data|object|数据对象
&emsp;&emsp;userType|Integer|用户类型(0.系统用户,1.普通用户,2.工作人员) &emsp;&emsp;userType|Integer|用户类型(0.系统用户,1.普通用户,2.工作人员)
&emsp;&emsp;siteIds|String|所属站点id,多个逗号分隔 &emsp;&emsp;siteIds|String|所属站点id,多个逗号分隔
&emsp;&emsp;areaCodes|String|所属区域code,多个逗号分隔 &emsp;&emsp;areaCodes|String|所属区域code,多个逗号分隔
&emsp;&emsp;areaNames|String|所属区域名称,多个逗号分隔
&emsp;&emsp;roleId|String|所属角色id,多个逗号分隔 &emsp;&emsp;roleId|String|所属角色id,多个逗号分隔
&emsp;&emsp;roleName|String|所属角色名称,多个逗号分隔 &emsp;&emsp;roleName|String|所属角色名称,多个逗号分隔
**响应消息样例:** **响应消息样例:**
......
...@@ -87,6 +87,10 @@ public class UserEntity extends UserVo implements IUser { ...@@ -87,6 +87,10 @@ public class UserEntity extends UserVo implements IUser {
*/ */
@JSONField(serialize = false) @JSONField(serialize = false)
private String lastLoginAddress; private String lastLoginAddress;
/**
* 所属区域code,多个逗号分隔
*/
private String areaNames;
...@@ -357,7 +361,20 @@ public class UserEntity extends UserVo implements IUser { ...@@ -357,7 +361,20 @@ public class UserEntity extends UserVo implements IUser {
this.lastLoginAddress = lastLoginAddress; this.lastLoginAddress = lastLoginAddress;
} }
/**
* 获取 所属区域code,多个逗号分隔
* @return String
*/
public String getAreaNames(){
return areaNames;
}
/**
* 设置 所属区域code,多个逗号分隔
* @param areaNames
*/
public void setAreaNames(String areaNames){
this.areaNames = areaNames;
}
@Override @Override
...@@ -393,6 +410,7 @@ public class UserEntity extends UserVo implements IUser { ...@@ -393,6 +410,7 @@ public class UserEntity extends UserVo implements IUser {
sb.append(",createUserName:").append(getCreateUserName()); sb.append(",createUserName:").append(getCreateUserName());
sb.append(",lastLoginTime:").append(getLastLoginTime()); sb.append(",lastLoginTime:").append(getLastLoginTime());
sb.append(",lastLoginAddress:").append(getLastLoginAddress()); sb.append(",lastLoginAddress:").append(getLastLoginAddress());
sb.append(",areaNames:").append(getAreaNames());
return sb.toString(); return sb.toString();
} }
...@@ -427,5 +445,7 @@ public class UserEntity extends UserVo implements IUser { ...@@ -427,5 +445,7 @@ public class UserEntity extends UserVo implements IUser {
this.lastLoginTime = null; this.lastLoginTime = null;
this.lastLoginAddress = ""; this.lastLoginAddress = "";
this.areaNames = "";
} }
} }
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd"> "mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.user.dao.ibatis.UserDaoImpl"> <mapper namespace="com.mortals.xhx.module.user.dao.ibatis.UserDaoImpl">
<!-- 字段和属性映射 --> <!-- 字段和属性映射 -->
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
<result property="createUserName" column="createUserName" /> <result property="createUserName" column="createUserName" />
<result property="lastLoginTime" column="lastLoginTime" /> <result property="lastLoginTime" column="lastLoginTime" />
<result property="lastLoginAddress" column="lastLoginAddress" /> <result property="lastLoginAddress" column="lastLoginAddress" />
<result property="areaNames" column="areaNames" />
</resultMap> </resultMap>
...@@ -84,23 +85,26 @@ ...@@ -84,23 +85,26 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('lastLoginAddress') or colPickMode == 1 and data.containsKey('lastLoginAddress')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('lastLoginAddress') or colPickMode == 1 and data.containsKey('lastLoginAddress')))">
a.lastLoginAddress, a.lastLoginAddress,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('areaNames') or colPickMode == 1 and data.containsKey('areaNames')))">
a.areaNames,
</if>
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="UserEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="UserEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_user insert into mortals_xhx_user
(loginName,loginPwd,loginLimitAddress,realName,mobile,phone,email,qq,userType,siteIds,areaCodes,status,createTime,createUserId,createUserName,lastLoginTime,lastLoginAddress) (loginName,loginPwd,loginLimitAddress,realName,mobile,phone,email,qq,userType,siteIds,areaCodes,status,createTime,createUserId,createUserName,lastLoginTime,lastLoginAddress,areaNames)
VALUES VALUES
(#{loginName},#{loginPwd},#{loginLimitAddress},#{realName},#{mobile},#{phone},#{email},#{qq},#{userType},#{siteIds},#{areaCodes},#{status},#{createTime},#{createUserId},#{createUserName},#{lastLoginTime},#{lastLoginAddress}) (#{loginName},#{loginPwd},#{loginLimitAddress},#{realName},#{mobile},#{phone},#{email},#{qq},#{userType},#{siteIds},#{areaCodes},#{status},#{createTime},#{createUserId},#{createUserName},#{lastLoginTime},#{lastLoginAddress},#{areaNames})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_user insert into mortals_xhx_user
(loginName,loginPwd,loginLimitAddress,realName,mobile,phone,email,qq,userType,siteIds,areaCodes,status,createTime,createUserId,createUserName,lastLoginTime,lastLoginAddress) (loginName,loginPwd,loginLimitAddress,realName,mobile,phone,email,qq,userType,siteIds,areaCodes,status,createTime,createUserId,createUserName,lastLoginTime,lastLoginAddress,areaNames)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.loginName},#{item.loginPwd},#{item.loginLimitAddress},#{item.realName},#{item.mobile},#{item.phone},#{item.email},#{item.qq},#{item.userType},#{item.siteIds},#{item.areaCodes},#{item.status},#{item.createTime},#{item.createUserId},#{item.createUserName},#{item.lastLoginTime},#{item.lastLoginAddress}) (#{item.loginName},#{item.loginPwd},#{item.loginLimitAddress},#{item.realName},#{item.mobile},#{item.phone},#{item.email},#{item.qq},#{item.userType},#{item.siteIds},#{item.areaCodes},#{item.status},#{item.createTime},#{item.createUserId},#{item.createUserName},#{item.lastLoginTime},#{item.lastLoginAddress},#{item.areaNames})
</foreach> </foreach>
</insert> </insert>
...@@ -170,6 +174,9 @@ ...@@ -170,6 +174,9 @@
<if test="(colPickMode==0 and data.containsKey('lastLoginAddress')) or (colPickMode==1 and !data.containsKey('lastLoginAddress'))"> <if test="(colPickMode==0 and data.containsKey('lastLoginAddress')) or (colPickMode==1 and !data.containsKey('lastLoginAddress'))">
a.lastLoginAddress=#{data.lastLoginAddress}, a.lastLoginAddress=#{data.lastLoginAddress},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('areaNames')) or (colPickMode==1 and !data.containsKey('areaNames'))">
a.areaNames=#{data.areaNames},
</if>
</trim> </trim>
<trim suffixOverrides="where" suffix=""> <trim suffixOverrides="where" suffix="">
where where
...@@ -316,6 +323,13 @@ ...@@ -316,6 +323,13 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="areaNames=(case" suffix="ELSE areaNames end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('areaNames')) or (colPickMode==1 and !item.containsKey('areaNames'))">
when a.id=#{item.id} then #{item.areaNames}
</if>
</foreach>
</trim>
</trim> </trim>
where id in where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")"> <foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
...@@ -711,6 +725,21 @@ ...@@ -711,6 +725,21 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('areaNames')">
<if test="conditionParamRef.areaNames != null and conditionParamRef.areaNames != ''">
${_conditionType_} a.areaNames like #{${_conditionParam_}.areaNames}
</if>
<if test="conditionParamRef.areaNames == null">
${_conditionType_} a.areaNames is null
</if>
</if>
<if test="conditionParamRef.containsKey('areaNamesList')">
${_conditionType_} a.areaNames in
<foreach collection="conditionParamRef.areaNamesList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
</sql> </sql>
<sql id="_orderCols_"> <sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()"> <if test="orderColList != null and !orderColList.isEmpty()">
...@@ -814,6 +843,11 @@ ...@@ -814,6 +843,11 @@
<if test='orderCol.lastLoginAddress != null and "DESC".equalsIgnoreCase(orderCol.lastLoginAddress)'>DESC</if> <if test='orderCol.lastLoginAddress != null and "DESC".equalsIgnoreCase(orderCol.lastLoginAddress)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('areaNames')">
a.areaNames
<if test='orderCol.areaNames != null and "DESC".equalsIgnoreCase(orderCol.areaNames)'>DESC</if>
,
</if>
</trim> </trim>
</if> </if>
</sql> </sql>
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
<result property="lastLoginAddress" column="lastLoginAddress" /> <result property="lastLoginAddress" column="lastLoginAddress" />
<result property="roleId" column="roleId" /> <result property="roleId" column="roleId" />
<result property="roleName" column="roleName" /> <result property="roleName" column="roleName" />
<result property="areaNames" column="areaNames" />
</resultMap> </resultMap>
<!-- 获取列表 --> <!-- 获取列表 -->
...@@ -97,6 +98,9 @@ ...@@ -97,6 +98,9 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('roleName') or colPickMode == 1 and data.containsKey('roleName')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('roleName') or colPickMode == 1 and data.containsKey('roleName')))">
a.roleName, a.roleName,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('areaNames') or colPickMode == 1 and data.containsKey('areaNames')))">
a.areaNames,
</if>
</trim> </trim>
</sql> </sql>
<!-- 获取列表 --> <!-- 获取列表 -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment