Compare commits

...

3 Commits

Author SHA1 Message Date
haozq 81162d395d Merge remote-tracking branch 'origin/master' 2024-04-24 17:50:21 +08:00
haozq 59cf680b45 修改后台bug 2024-04-24 17:50:08 +08:00
haozq 791a90be64 修改用户bug 2024-04-23 18:02:12 +08:00
10 changed files with 38 additions and 23 deletions

View File

@ -72,34 +72,32 @@ public class SysLoginService
}
LoginUser userInfo = userResult.getData();
SysUser user = userResult.getData().getSysUser();
if (UserStatus.DELETED.getCode().equals(user.getDelFlag())) {
recordLogService.recordLogininfor(username,null,"用户登录","对不起,您的账号:" + username + " 已被删除",1,0,"username="+username,startTime);
throw new ServiceException("对不起,您的账号:" + username + " 已被删除",201);
if (UserStatus.DELETED.getCode().equals(user.getStatus())) {
recordLogService.recordLogininfor(username,null,"用户登录","对不起,您的账号:" + username + " 已被停用",1,0,"{'username':'"+username+"'",startTime);
throw new ServiceException("对不起,您的账号:" + username + " 已被停用",201);
}
if (UserStatus.DISABLE.getCode().equals(user.getStatus()))
{
recordLogService.recordLogininfor(username,null,"用户登录","对不起,您的账号:" + username + " 已锁定",1,0,"username="+username,startTime);
if (UserStatus.DISABLE.getCode().equals(user.getStatus())) {
recordLogService.recordLogininfor(username,null,"用户登录","对不起,您的账号:" + username + " 已锁定",1,0,"{'username':'"+username+"'",startTime);
throw new ServiceException("对不起,您的账号:" + username + " 已锁定",201);
}
if(StringHelper.isEmpty(loginType)){
if(!user.getLoginType().contains(Constant.BACK_LOGIN)){
recordLogService.recordLogininfor(username,null,"用户登录","无登录后台权限",1,0,"username="+username,startTime);
recordLogService.recordLogininfor(username,null,"用户登录","无登录后台权限",1,0,"{'username':'"+username+"'",startTime);
throw new ServiceException("对不起,您的账号:" + username + " 无登录后台权限",201);
}
}else if(Constant.SC_SCREEN.equals(loginType)){
if(!user.getLoginType().contains(Constant.SC_SCREEN)){
recordLogService.recordLogininfor(username,null,"省侧大屏用户登录","无登录省侧大屏权限",1,0,"username="+username,startTime);
recordLogService.recordLogininfor(username,null,"省侧大屏用户登录","无登录省侧大屏权限",1,0,"{'username':'"+username+"'",startTime);
throw new ServiceException("对不起,您的账号:" + username + " 无登录省侧大屏权限",201);
}
}else if(Constant.SG_SCREEN.equals(loginType)){
if(!user.getLoginType().contains(Constant.SG_SCREEN)){
recordLogService.recordLogininfor(username,null,"施工大屏用户登录","无登录施工大屏权限",1,0,"username="+username,startTime);
recordLogService.recordLogininfor(username,null,"施工大屏用户登录","无登录施工大屏权限",1,0,"{'username':'"+username+"'",startTime);
throw new ServiceException("对不起,您的账号:" + username + " 无登录施工大屏权限",201);
}
}else if(Constant.APP_LOGIN.equals(loginType)){
if(!user.getLoginType().contains(Constant.APP_LOGIN)){
recordLogService.recordLogininfor(username,null,"APP用户登录","无登录APP权限",1,0,"username="+username,startTime);
recordLogService.recordLogininfor(username,null,"APP用户登录","无登录APP权限",1,0,"{'username':'"+username+"'",startTime);
throw new ServiceException("对不起,您的账号:" + username + " 无登录APP权限",201);
}
}
@ -112,9 +110,9 @@ public class SysLoginService
if(ip.equals(hisIp)){
redisUtil.set("username",ip,times);
}else{
recordLogService.errorLogs(username,user.getUserId(),"用户登录","IP异常",1,1,"username="+username,startTime);
recordLogService.errorLogs(username,user.getUserId(),"用户登录","IP异常",1,1,"{'username':'"+username+"'",startTime);
}
recordLogService.recordLogininfor(username,user.getUserId(), "用户登录", "登录成功",1,1,"username="+username,startTime);
recordLogService.recordLogininfor(username,user.getUserId(), "用户登录", "登录成功",1,1,"{'username':'"+username+"'",startTime);
remoteUserService.updateUserLogin(user.getUserId(),SecurityConstants.INNER);
return userInfo;
}

View File

@ -27,5 +27,9 @@ public class AreaDto {
private String gtId;
private String areaName;
private String proName;
}

View File

@ -59,6 +59,9 @@ public class UserVo {
@ApiModelProperty(value = "账号状态")
private Integer accountStatus;
@ApiModelProperty(value = "账号状态")
private String status;
@ApiModelProperty(value = "状态")
private int delFlag;

View File

@ -26,6 +26,7 @@ import javax.servlet.http.HttpServletRequestWrapper;
*/
@Slf4j
public class XssRequestWrapper extends HttpServletRequestWrapper {
private byte[] body;
private String queryString;

View File

@ -51,7 +51,7 @@
t_code =#{keyWord}
)
</if>
<if test="keyWord!=null and keyWord!=''">
<if test="onLine!=null and onLine!=''">
and on_line =#{onLine}
</if>
</select>

View File

@ -43,8 +43,8 @@
<if test='types=="2"'>
and tcm.user_id is null
</if>
<if test='types=="1"'>
and tcm.user_id is not null and tcm.user_id!=#{userId}
<if test='type=="1"'>
and (tcm.user_id!=#{userId} or tcm.user_id is null )
</if>
<if test="keyWord!=null and keyWord!=''">
AND (

View File

@ -64,8 +64,11 @@
left join tb_project pro on pro.bid_code=area.bid_code and pro.del_flag=0
LEFT JOIN t_pro_gt gt on area.gt_id=gt.gt_id and gt.del_flag=0
where area.del_flag=0
<if test="keyWord!=null and keyWord!=''">
AND INSTR(area_name,#{keyWord}) > 0
<if test="areaName!=null and areaName!=''">
AND INSTR(area_name,#{areaName}) > 0
</if>
<if test="proName!=null and proName!=''">
AND INSTR(pro.pro_name,#{proName}) > 0
</if>
</select>
<select id="getProjectTypeByBidCode" resultType="java.lang.String">
@ -128,8 +131,8 @@
<select id="getProCostList" resultType="com.securitycontrol.entity.screen.vo.ProCostVo">
SELECT pro.pro_name proName,tpc.cost ,tpc.remark,tpc.create_time createTime,tpc.id
FROM tb_project_cost tpc
left join tb_project pro on pro.bid_code=tpc.bid_code
where pro.bid_code=#{bidCode}
left join tb_project pro on pro.bid_code=tpc.bid_code and pro.del_flag=0
where pro.bid_code=#{bidCode}
</select>

View File

@ -63,8 +63,8 @@
FROM tb_project pro
left join sys_build sb on pro.org=sb.org_id
left join tb_user_pro tup on tup.bid_cod=pro.bid_code and tup.del_flag=0
WHERE pro.del_flag=0 and (tup.user_id!=4 or tup.user_id is null)
<if test='type=="1"'>
WHERE pro.del_flag=0 and (tup.user_id!=#{userId} or tup.user_id is null)
<if test='type=="1"'>
AND tup.user_id is null
</if>
<if test='type=="2"'>

View File

@ -10,7 +10,6 @@ import org.springframework.context.annotation.Configuration;
* 自定义密码加密
* @author 黑子
*/
//@Configuration
public class CodeSheepEncryptorCfg {
@Bean(name = "codeSheepEncryptorBean" )

View File

@ -71,6 +71,13 @@
su.login_name AS loginName,
su.del_flag AS delFlag,
su.phone,
CASE
WHEN su.del_flag=1 then '已注销'
WHEN su.status=0 then '正常'
WHEN su.status=1 then '锁定'
WHEN su.status=2 then '停用'
else '正常'
end status ,
su.del_flag AS delFlag
FROM sys_user su
<where>