Merge remote-tracking branch 'remotes/origin/master' into dev
commit
8c31dfe3f7
|
|
@ -1,11 +1,11 @@
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img alt="logo" src="https://oscimg.oschina.net/oscnet/up-b99b286755aef70355a7084753f89cdb7c9.png">
|
<img alt="logo" src="https://oscimg.oschina.net/oscnet/up-b99b286755aef70355a7084753f89cdb7c9.png">
|
||||||
</p>
|
</p>
|
||||||
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">RuoYi v3.6.5.0.8</h1>
|
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">RuoYi v3.6.5.0.9</h1>
|
||||||
<h4 align="center">基于 Vue/Element UI 和 Spring Boot/Spring Cloud & Alibaba 前后端分离的分布式微服务架构</h4>
|
<h4 align="center">基于 Vue/Element UI 和 Spring Boot/Spring Cloud & Alibaba 前后端分离的分布式微服务架构</h4>
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://gitee.com/y_project/RuoYi-Cloud/stargazers"><img src="https://gitee.com/y_project/RuoYi-Cloud/badge/star.svg?theme=dark"></a>
|
<a href="https://gitee.com/y_project/RuoYi-Cloud/stargazers"><img src="https://gitee.com/y_project/RuoYi-Cloud/badge/star.svg?theme=dark"></a>
|
||||||
<a href="https://gitee.com/y_project/RuoYi-Cloud"><img src="https://img.shields.io/badge/RuoYi-v3.6.5.0.8-brightgreen.svg"></a>
|
<a href="https://gitee.com/y_project/RuoYi-Cloud"><img src="https://img.shields.io/badge/RuoYi-v3.6.5.0.9-brightgreen.svg"></a>
|
||||||
<a href="https://gitee.com/y_project/RuoYi-Cloud/blob/master/LICENSE"><img src="https://img.shields.io/github/license/mashape/apistatus.svg"></a>
|
<a href="https://gitee.com/y_project/RuoYi-Cloud/blob/master/LICENSE"><img src="https://img.shields.io/github/license/mashape/apistatus.svg"></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
|
||||||
4
pom.xml
4
pom.xml
|
|
@ -6,14 +6,14 @@
|
||||||
|
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi</artifactId>
|
||||||
<version>3.6.5.0.8</version>
|
<version>3.6.5.0.9</version>
|
||||||
|
|
||||||
<name>ruoyi</name>
|
<name>ruoyi</name>
|
||||||
<url>http://www.ruoyi.vip</url>
|
<url>http://www.ruoyi.vip</url>
|
||||||
<description>若依微服务系统</description>
|
<description>若依微服务系统</description>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<ruoyi.version>3.6.5.0.8</ruoyi.version>
|
<ruoyi.version>3.6.5.0.9</ruoyi.version>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
<java.version>1.8</java.version>
|
<java.version>1.8</java.version>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi</artifactId>
|
||||||
<version>3.6.5.0.8</version>
|
<version>3.6.5.0.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-api</artifactId>
|
<artifactId>ruoyi-api</artifactId>
|
||||||
<version>3.6.5.0.8</version>
|
<version>3.6.5.0.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.zkjiadi</groupId>
|
<groupId>com.zkjiadi</groupId>
|
||||||
<artifactId>zkjiadi-mall-api</artifactId>
|
<artifactId>zkjiadi-mall-api</artifactId>
|
||||||
<version>1.0.6</version>
|
<version>1.0.7</version>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
<groupId>com.squareup.okhttp3</groupId>
|
||||||
|
|
|
||||||
|
|
@ -52,4 +52,10 @@ public interface RemoteUserService extends InnerRemoteUserService
|
||||||
*/
|
*/
|
||||||
@PutMapping("/user/recordlogin")
|
@PutMapping("/user/recordlogin")
|
||||||
public R<Boolean> recordUserLogin(@RequestBody SysUser sysUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
public R<Boolean> recordUserLogin(@RequestBody SysUser sysUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同步至go框架
|
||||||
|
*/
|
||||||
|
@PostMapping("/user/syncGO")
|
||||||
|
public R<Boolean> syncGO(@RequestBody SysUser sysUser);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,11 @@ public class RemoteUserFallbackFactory implements FallbackFactory<RemoteUserServ
|
||||||
return R.fail("记录用户登录信息失败:" + throwable.getMessage());
|
return R.fail("记录用户登录信息失败:" + throwable.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<Boolean> syncGO(SysUser sysUser) {
|
||||||
|
return R.fail("同步用户信息至GO失败:" + throwable.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public R<LoginUser> edit_Inner(@NotNull LoginUser user, @NotNull String source) {
|
public R<LoginUser> edit_Inner(@NotNull LoginUser user, @NotNull String source) {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi</artifactId>
|
||||||
<version>3.6.5.0.8</version>
|
<version>3.6.5.0.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi</artifactId>
|
||||||
<version>3.6.5.0.8</version>
|
<version>3.6.5.0.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-common</artifactId>
|
<artifactId>ruoyi-common</artifactId>
|
||||||
<version>3.6.5.0.8</version>
|
<version>3.6.5.0.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,20 @@ public class SecurityConstants
|
||||||
*/
|
*/
|
||||||
public static final String DETAILS_USER_ID = "user_id";
|
public static final String DETAILS_USER_ID = "user_id";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户ID字段
|
||||||
|
*/
|
||||||
|
public static final String DETAILS_SUB = "sub";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户ID字段
|
||||||
|
*/
|
||||||
|
public static final String DETAILS_IAT= "iat";
|
||||||
|
/**
|
||||||
|
* 用户ID字段
|
||||||
|
*/
|
||||||
|
public static final String DETAILS_EXP= "exp";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户名字段
|
* 用户名字段
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,18 @@
|
||||||
package com.ruoyi.common.core.utils;
|
package com.ruoyi.common.core.utils;
|
||||||
|
|
||||||
|
import java.util.Base64;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import com.ruoyi.common.core.constant.SecurityConstants;
|
import com.ruoyi.common.core.constant.SecurityConstants;
|
||||||
import com.ruoyi.common.core.constant.TokenConstants;
|
import com.ruoyi.common.core.constant.TokenConstants;
|
||||||
|
import com.ruoyi.common.core.exception.ServiceException;
|
||||||
import com.ruoyi.common.core.text.Convert;
|
import com.ruoyi.common.core.text.Convert;
|
||||||
import io.jsonwebtoken.Claims;
|
import io.jsonwebtoken.Claims;
|
||||||
import io.jsonwebtoken.Jwts;
|
import io.jsonwebtoken.Jwts;
|
||||||
import io.jsonwebtoken.SignatureAlgorithm;
|
import io.jsonwebtoken.SignatureAlgorithm;
|
||||||
|
|
||||||
|
import javax.naming.AuthenticationException;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Jwt工具类
|
* Jwt工具类
|
||||||
*
|
*
|
||||||
|
|
@ -15,7 +20,7 @@ import io.jsonwebtoken.SignatureAlgorithm;
|
||||||
*/
|
*/
|
||||||
public class JwtUtils
|
public class JwtUtils
|
||||||
{
|
{
|
||||||
public static String secret = TokenConstants.SECRET;
|
public static String secret = Base64.getEncoder().encodeToString(TokenConstants.SECRET.getBytes()) ;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 从数据声明生成令牌
|
* 从数据声明生成令牌
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-common</artifactId>
|
<artifactId>ruoyi-common</artifactId>
|
||||||
<version>3.6.5.0.8</version>
|
<version>3.6.5.0.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-common</artifactId>
|
<artifactId>ruoyi-common</artifactId>
|
||||||
<version>3.6.5.0.8</version>
|
<version>3.6.5.0.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-common</artifactId>
|
<artifactId>ruoyi-common</artifactId>
|
||||||
<version>3.6.5.0.8</version>
|
<version>3.6.5.0.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-common</artifactId>
|
<artifactId>ruoyi-common</artifactId>
|
||||||
<version>3.6.5.0.8</version>
|
<version>3.6.5.0.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-common</artifactId>
|
<artifactId>ruoyi-common</artifactId>
|
||||||
<version>3.6.5.0.8</version>
|
<version>3.6.5.0.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-common</artifactId>
|
<artifactId>ruoyi-common</artifactId>
|
||||||
<version>3.6.5.0.8</version>
|
<version>3.6.5.0.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,14 @@
|
||||||
package com.ruoyi.common.security.service;
|
package com.ruoyi.common.security.service;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
|
import io.jsonwebtoken.Claims;
|
||||||
|
import io.jsonwebtoken.Jwts;
|
||||||
|
import io.jsonwebtoken.impl.DefaultClaims;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
@ -61,6 +66,10 @@ public class TokenService
|
||||||
claimsMap.put(SecurityConstants.USER_KEY, token);
|
claimsMap.put(SecurityConstants.USER_KEY, token);
|
||||||
claimsMap.put(SecurityConstants.DETAILS_USER_ID, userId);
|
claimsMap.put(SecurityConstants.DETAILS_USER_ID, userId);
|
||||||
claimsMap.put(SecurityConstants.DETAILS_USERNAME, userName);
|
claimsMap.put(SecurityConstants.DETAILS_USERNAME, userName);
|
||||||
|
claimsMap.put(SecurityConstants.DETAILS_SUB,userId);
|
||||||
|
int now = Math.toIntExact(System.currentTimeMillis() / 1000);
|
||||||
|
claimsMap.put(SecurityConstants.DETAILS_IAT,now);
|
||||||
|
claimsMap.put(SecurityConstants.DETAILS_EXP,now+TOKEN_EXPIRE_TIME*60);
|
||||||
|
|
||||||
// 接口返回信息
|
// 接口返回信息
|
||||||
Map<String, Object> rspMap = new HashMap<String, Object>();
|
Map<String, Object> rspMap = new HashMap<String, Object>();
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-common</artifactId>
|
<artifactId>ruoyi-common</artifactId>
|
||||||
<version>3.6.5.0.8</version>
|
<version>3.6.5.0.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-common</artifactId>
|
<artifactId>ruoyi-common</artifactId>
|
||||||
<version>3.6.5.0.8</version>
|
<version>3.6.5.0.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi</artifactId>
|
||||||
<version>3.6.5.0.8</version>
|
<version>3.6.5.0.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
@ -84,7 +84,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ujcms</groupId>
|
<groupId>com.ujcms</groupId>
|
||||||
<artifactId>ujcms-commons</artifactId>
|
<artifactId>ujcms-commons</artifactId>
|
||||||
<version>9.6.0</version>
|
<version>9.6.0.0.1</version>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,6 @@ public class AuthFilter implements GlobalFilter, Ordered
|
||||||
{
|
{
|
||||||
ServerHttpRequest request = exchange.getRequest();
|
ServerHttpRequest request = exchange.getRequest();
|
||||||
ServerHttpRequest.Builder mutate = request.mutate();
|
ServerHttpRequest.Builder mutate = request.mutate();
|
||||||
|
|
||||||
String url = request.getURI().getPath();
|
String url = request.getURI().getPath();
|
||||||
// 跳过不需要验证的路径
|
// 跳过不需要验证的路径
|
||||||
if (StringUtils.matches(url, ignoreWhite.getWhites()))
|
if (StringUtils.matches(url, ignoreWhite.getWhites()))
|
||||||
|
|
@ -56,11 +55,19 @@ public class AuthFilter implements GlobalFilter, Ordered
|
||||||
{
|
{
|
||||||
return unauthorizedResponse(exchange, "令牌不能为空");
|
return unauthorizedResponse(exchange, "令牌不能为空");
|
||||||
}
|
}
|
||||||
Claims claims = JwtUtils.parseToken(token);
|
/*Claims claims = JwtUtils.parseToken(token);
|
||||||
if (claims == null)
|
if (claims == null)
|
||||||
{
|
{
|
||||||
return unauthorizedResponse(exchange, "令牌已过期或验证不正确!");
|
return unauthorizedResponse(exchange, "令牌已过期或验证不正确!");
|
||||||
}
|
}*/
|
||||||
|
Claims claims;
|
||||||
|
try{
|
||||||
|
claims = JwtUtils.parseToken(token);
|
||||||
|
if (claims == null)
|
||||||
|
return unauthorizedResponse(exchange, "令牌已过期或验证不正确!");
|
||||||
|
}catch (Exception e){
|
||||||
|
return unauthorizedResponse(exchange, "令牌已过期或验证不正确!");
|
||||||
|
}
|
||||||
String userkey = JwtUtils.getUserKey(claims);
|
String userkey = JwtUtils.getUserKey(claims);
|
||||||
boolean islogin = redisService.hasKey(getTokenKey(userkey));
|
boolean islogin = redisService.hasKey(getTokenKey(userkey));
|
||||||
if (!islogin)
|
if (!islogin)
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ public class GatewayExceptionHandler implements ErrorWebExceptionHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
String msg;
|
String msg;
|
||||||
|
|
||||||
if (ex instanceof NotFoundException)
|
if (ex instanceof NotFoundException)
|
||||||
{
|
{
|
||||||
msg = "服务未找到";
|
msg = "服务未找到";
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi</artifactId>
|
||||||
<version>3.6.5.0.8</version>
|
<version>3.6.5.0.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-modules</artifactId>
|
<artifactId>ruoyi-modules</artifactId>
|
||||||
<version>3.6.5.0.8</version>
|
<version>3.6.5.0.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-modules</artifactId>
|
<artifactId>ruoyi-modules</artifactId>
|
||||||
<version>3.6.5.0.8</version>
|
<version>3.6.5.0.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-modules</artifactId>
|
<artifactId>ruoyi-modules</artifactId>
|
||||||
<version>3.6.5.0.8</version>
|
<version>3.6.5.0.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
@ -75,6 +75,18 @@
|
||||||
<groupId>de.codecentric</groupId>
|
<groupId>de.codecentric</groupId>
|
||||||
<artifactId>spring-boot-admin-starter-client</artifactId>
|
<artifactId>spring-boot-admin-starter-client</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.squareup.okhttp3</groupId>
|
||||||
|
<artifactId>okhttp</artifactId>
|
||||||
|
<version>3.12.13</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ujcms</groupId>
|
||||||
|
<artifactId>ujcms-commons</artifactId>
|
||||||
|
<version>9.6.0.0.1</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.ruoyi.job.config;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证码配置
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Configuration
|
||||||
|
@RefreshScope
|
||||||
|
@ConfigurationProperties(prefix = "security.sms.aliyuncs")
|
||||||
|
public class SmsConfig
|
||||||
|
{
|
||||||
|
private String accessKeyId;
|
||||||
|
private String accessKeySecret;
|
||||||
|
private String signName;
|
||||||
|
private String templateCode;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,78 @@
|
||||||
|
package com.ruoyi.job.domain;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||||
|
import com.ruoyi.job.util.ProgressFormatterUtil;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.springframework.data.annotation.Id;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 直播预告报名信息导出实体
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
public class ScClassUserInfo extends BaseEntity {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
//@ExcelIgnore // 不导出该字段
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
//@ExcelIgnore // 不导出该字段
|
||||||
|
private Long classId;
|
||||||
|
|
||||||
|
//@ColumnWidth(25)
|
||||||
|
// @ExcelProperty("名称(报名时)")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
//@ColumnWidth(25)
|
||||||
|
//@ExcelProperty("单位")
|
||||||
|
private String firm;
|
||||||
|
|
||||||
|
//@ColumnWidth(25)
|
||||||
|
//@ExcelProperty("专业")
|
||||||
|
private String specialized;
|
||||||
|
|
||||||
|
//@ColumnWidth(35)
|
||||||
|
//@ExcelProperty("手机号")
|
||||||
|
private String phonenumber;
|
||||||
|
|
||||||
|
//@ColumnWidth(35)
|
||||||
|
//@ExcelProperty("昵称")
|
||||||
|
private String nickName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户订单编号
|
||||||
|
*/
|
||||||
|
//@ExcelProperty("客户订单编号")
|
||||||
|
private String userSn;
|
||||||
|
|
||||||
|
//@ExcelIgnore
|
||||||
|
private Boolean todayAttendanceIs;
|
||||||
|
|
||||||
|
@JsonIgnore
|
||||||
|
// @ExcelProperty("是否打卡")
|
||||||
|
private String attendanceIs;
|
||||||
|
|
||||||
|
//@ExcelProperty("签到次数")
|
||||||
|
private Integer attendanceCount;
|
||||||
|
|
||||||
|
//@ExcelIgnore
|
||||||
|
private BigDecimal progress;
|
||||||
|
|
||||||
|
//@ExcelProperty("总学习进度")
|
||||||
|
private String progressPercent;
|
||||||
|
|
||||||
|
public String getAttendanceIs() {
|
||||||
|
return attendanceCount.compareTo(0) > 0 ? "是" : "否";
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProgressPercent() {
|
||||||
|
return ProgressFormatterUtil.format(this.progress.multiply(BigDecimal.valueOf(100)));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.ruoyi.job.service;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.exception.CaptchaException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证码处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
*/
|
||||||
|
public interface SmsService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 发送学习短信通知
|
||||||
|
*/
|
||||||
|
public void sendStudyNoticeSms(String phone) throws CaptchaException;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.ruoyi.job.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
|
import com.ruoyi.common.core.exception.CaptchaException;
|
||||||
|
import com.ruoyi.job.config.SmsConfig;
|
||||||
|
import com.ruoyi.job.service.SmsService;
|
||||||
|
import com.ujcms.commons.sms.AliyunUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证码实现处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SmsServiceImpl implements SmsService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private SmsConfig smsConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送学习短信通知
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void sendStudyNoticeSms(String phone) throws CaptchaException {
|
||||||
|
AliyunUtils.sendSms(smsConfig.getAccessKeyId(),
|
||||||
|
smsConfig.getAccessKeySecret(),
|
||||||
|
smsConfig.getSignName(),
|
||||||
|
smsConfig.getTemplateCode(),
|
||||||
|
JSONObject.of(),
|
||||||
|
phone
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
package com.ruoyi.job.task;
|
||||||
|
|
||||||
|
import com.ruoyi.job.config.SmsConfig;
|
||||||
|
import com.ruoyi.job.domain.ScClassUserInfo;
|
||||||
|
import com.ruoyi.job.mapper.ScClassUserInfoMapper;
|
||||||
|
import com.ruoyi.job.service.SmsService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Component("liveTask")
|
||||||
|
public class LiveTask {
|
||||||
|
@Resource
|
||||||
|
ScClassUserInfoMapper scClassUserInfoMapper;
|
||||||
|
@Autowired
|
||||||
|
private SmsService smsAliyuncs;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SmsConfig smsConfig;
|
||||||
|
/**
|
||||||
|
* 短信打卡
|
||||||
|
*/
|
||||||
|
public void CourseSmsNotice(){
|
||||||
|
List<ScClassUserInfo> list = scClassUserInfoMapper.waitNoticeCourseUser();
|
||||||
|
list.forEach(item->{
|
||||||
|
if (item.getPhonenumber() != null && !item.getPhonenumber().trim().isEmpty()){
|
||||||
|
log.info("发送打卡提醒 {} {} {}",item.getUserId(),item.getNickName(),item.getPhonenumber());
|
||||||
|
smsAliyuncs.sendStudyNoticeSms(item.getPhonenumber());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.ruoyi.job.util;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
|
import java.text.NumberFormat;
|
||||||
|
|
||||||
|
public class ProgressFormatterUtil {
|
||||||
|
public static String format(BigDecimal progress ) {
|
||||||
|
if (progress == null) return "0";
|
||||||
|
// 保留两位小数(四舍五入)
|
||||||
|
BigDecimal scaled = progress.setScale(2, RoundingMode.HALF_UP);
|
||||||
|
// 去除末尾零和小数点
|
||||||
|
NumberFormat nf = NumberFormat.getInstance();
|
||||||
|
nf.setMaximumFractionDigits(2);
|
||||||
|
nf.setMinimumFractionDigits(0);
|
||||||
|
return nf.format(scaled) + "%";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,100 @@
|
||||||
|
<?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.ruoyi.job.mapper.ScClassUserInfoMapper">
|
||||||
|
<resultMap id="scClassUserInfo" type="com.ruoyi.job.domain.ScClassUserInfo">
|
||||||
|
<id column="id" property="id"/>
|
||||||
|
<result column="name" property="name"/>
|
||||||
|
<result column="firm" property="firm"/>
|
||||||
|
<result column="specialized" property="specialized"/>
|
||||||
|
<result column="nick_name" property="nickName"/>
|
||||||
|
<result column="todayAttendanceIs" property="todayAttendanceIs"/>
|
||||||
|
<result column="attendanceCount" property="attendanceCount"/>
|
||||||
|
<result column="progress" property="progress"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="waitNoticeCourseUser" resultMap="scClassUserInfo">
|
||||||
|
SELECT
|
||||||
|
progress.id,
|
||||||
|
progress.userId,
|
||||||
|
progress.classId,
|
||||||
|
progress.`name`,
|
||||||
|
progress.email,
|
||||||
|
progress.phonenumber,
|
||||||
|
progress.userSn,
|
||||||
|
progress.firm,
|
||||||
|
progress.posts,
|
||||||
|
progress.areas_of_focus,
|
||||||
|
progress.issue,
|
||||||
|
progress.specialized,
|
||||||
|
progress.nick_name,
|
||||||
|
attendance.todayAttendanceIs,
|
||||||
|
attendance.attendanceCount,
|
||||||
|
progress.progress
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
scui.id,
|
||||||
|
COUNT( sua_today.id ) AS todayAttendanceIs,
|
||||||
|
COUNT( sua_count.id ) AS attendanceCount
|
||||||
|
FROM
|
||||||
|
sc_class_user_info scui
|
||||||
|
LEFT JOIN sc_user_attendance sua_today ON (
|
||||||
|
sua_today.class_info_id = scui.class_id
|
||||||
|
AND sua_today.user_id = scui.user_id
|
||||||
|
AND sua_today.`status` = 1
|
||||||
|
AND to_days( sua_today.create_time ) = to_days(
|
||||||
|
now())
|
||||||
|
)
|
||||||
|
LEFT JOIN sc_user_attendance sua_count ON ( sua_count.class_info_id = scui.class_id AND sua_count.user_id = scui.user_id AND sua_count.`status` = 1 )
|
||||||
|
WHERE
|
||||||
|
scui.`status` = 1
|
||||||
|
AND scui.end_time > now()
|
||||||
|
AND ( scui.delete_flag != scui.id OR scui.delete_flag IS NULL )
|
||||||
|
GROUP BY
|
||||||
|
scui.id
|
||||||
|
) attendance
|
||||||
|
INNER JOIN (
|
||||||
|
SELECT
|
||||||
|
scui.id,
|
||||||
|
scui.user_id AS userId,
|
||||||
|
scui.class_id AS classId,
|
||||||
|
scui.`name`,
|
||||||
|
scui.email,
|
||||||
|
scui.phonenumber,
|
||||||
|
scui.user_sn AS userSn,
|
||||||
|
scui.firm,
|
||||||
|
scui.posts,
|
||||||
|
scui.areas_of_focus,
|
||||||
|
scui.issue,
|
||||||
|
scui.specialized,
|
||||||
|
y.nick_name,
|
||||||
|
CASE
|
||||||
|
WHEN COUNT( DISTINCT video.id ) = 0 THEN
|
||||||
|
0 ELSE (
|
||||||
|
COUNT(
|
||||||
|
DISTINCT
|
||||||
|
CASE
|
||||||
|
|
||||||
|
WHEN ( TIME_TO_SEC( video.duration ) = 0 AND record.type_id IS NOT NULL )
|
||||||
|
OR (
|
||||||
|
record.total_duration >= 0.8 * TIME_TO_SEC( video.duration )) THEN
|
||||||
|
video.id
|
||||||
|
END
|
||||||
|
)
|
||||||
|
) / COUNT(DISTINCT video.id )
|
||||||
|
END AS progress
|
||||||
|
FROM
|
||||||
|
sc_class_user_info scui
|
||||||
|
INNER JOIN sys_user y ON scui.user_id = y.user_id
|
||||||
|
LEFT JOIN sc_video video ON ( video.class_info_id = scui.class_id AND video.`status` = 1 )
|
||||||
|
LEFT JOIN sc_class_user_record_info record ON ( record.type = 'ScVideo' AND record.type_id = video.id AND scui.user_id = record.user_id )
|
||||||
|
WHERE
|
||||||
|
scui.`status` = 1
|
||||||
|
AND scui.end_time > now()
|
||||||
|
AND ( scui.delete_flag != scui.id OR scui.delete_flag IS NULL )
|
||||||
|
GROUP BY
|
||||||
|
scui.id
|
||||||
|
) progress ON attendance.id = progress.id WHERE progress.progress < 1 GROUP BY progress.userId
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-modules</artifactId>
|
<artifactId>ruoyi-modules</artifactId>
|
||||||
<version>3.6.5.0.8</version>
|
<version>3.6.5.0.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -166,6 +166,16 @@ public class SysUserController extends BaseController
|
||||||
return R.ok(userService.updateUserProfile(sysUser));
|
return R.ok(userService.updateUserProfile(sysUser));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*记录用户登录IP地址和登录时间
|
||||||
|
*/
|
||||||
|
@InnerAuth
|
||||||
|
@PutMapping("/syncGO")
|
||||||
|
public R<Boolean> syncGO(@RequestBody SysUser sysUser)
|
||||||
|
{
|
||||||
|
return R.ok(userService.syncGO(sysUser));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取用户信息
|
* 获取用户信息
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.ruoyi.system.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class SyncGoUser {
|
||||||
|
private Integer userId;
|
||||||
|
private String nickname;
|
||||||
|
private String username;
|
||||||
|
private String mobile;
|
||||||
|
private String lastIp;
|
||||||
|
private String remark;
|
||||||
|
private String avatar;
|
||||||
|
private Integer status;
|
||||||
|
}
|
||||||
|
|
@ -170,6 +170,14 @@ public interface ISysUserService
|
||||||
*/
|
*/
|
||||||
public boolean updateUserProfile(SysUser user);
|
public boolean updateUserProfile(SysUser user);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同步用户基本信息
|
||||||
|
*
|
||||||
|
* @param user 用户信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public boolean syncGO(SysUser user);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改用户头像
|
* 修改用户头像
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,17 @@ import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import javax.validation.Validator;
|
import javax.validation.Validator;
|
||||||
|
|
||||||
|
import cn.hutool.system.UserInfo;
|
||||||
import com.github.pagehelper.Page;
|
import com.github.pagehelper.Page;
|
||||||
import com.ruoyi.system.api.domain.KSysUserAccount;
|
import com.ruoyi.system.api.domain.KSysUserAccount;
|
||||||
|
import com.ruoyi.system.domain.SyncGoUser;
|
||||||
import com.ruoyi.system.service.IKSysUserService;
|
import com.ruoyi.system.service.IKSysUserService;
|
||||||
|
import org.apache.http.client.methods.HttpPost;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
@ -35,6 +40,7 @@ import com.ruoyi.system.mapper.SysUserRoleMapper;
|
||||||
import com.ruoyi.system.service.ISysConfigService;
|
import com.ruoyi.system.service.ISysConfigService;
|
||||||
import com.ruoyi.system.service.ISysDeptService;
|
import com.ruoyi.system.service.ISysDeptService;
|
||||||
import com.ruoyi.system.service.ISysUserService;
|
import com.ruoyi.system.service.ISysUserService;
|
||||||
|
import org.springframework.web.client.RestTemplate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户 业务层处理
|
* 用户 业务层处理
|
||||||
|
|
@ -44,6 +50,11 @@ import com.ruoyi.system.service.ISysUserService;
|
||||||
@Service
|
@Service
|
||||||
public class SysUserServiceImpl implements ISysUserService
|
public class SysUserServiceImpl implements ISysUserService
|
||||||
{
|
{
|
||||||
|
@Value("${go.host}")
|
||||||
|
private String goHost;
|
||||||
|
@Value("${go.accessKey}")
|
||||||
|
private String accessKey;
|
||||||
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(SysUserServiceImpl.class);
|
private static final Logger log = LoggerFactory.getLogger(SysUserServiceImpl.class);
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
@ -73,6 +84,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
@Autowired
|
@Autowired
|
||||||
protected Validator validator;
|
protected Validator validator;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据条件分页查询用户列表
|
* 根据条件分页查询用户列表
|
||||||
*
|
*
|
||||||
|
|
@ -308,7 +320,9 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
@Override
|
@Override
|
||||||
public boolean registerUser(SysUser user)
|
public boolean registerUser(SysUser user)
|
||||||
{
|
{
|
||||||
return userMapper.insertUser(user) > 0;
|
boolean res = userMapper.insertUser(user) > 0;
|
||||||
|
this.syncGO(user);
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -335,6 +349,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
kSysUserService.updateSysUserAccount(user.getSysUserAccount());
|
kSysUserService.updateSysUserAccount(user.getSysUserAccount());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.syncGO(user);
|
||||||
return userMapper.updateUser(user);
|
return userMapper.updateUser(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -361,6 +376,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
@Override
|
@Override
|
||||||
public int updateUserStatus(SysUser user)
|
public int updateUserStatus(SysUser user)
|
||||||
{
|
{
|
||||||
|
this.syncGO(user);
|
||||||
return userMapper.updateUser(user);
|
return userMapper.updateUser(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -373,9 +389,39 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
@Override
|
@Override
|
||||||
public boolean updateUserProfile(SysUser user)
|
public boolean updateUserProfile(SysUser user)
|
||||||
{
|
{
|
||||||
|
this.syncGO(user);
|
||||||
return userMapper.updateUser(user) > 0;
|
return userMapper.updateUser(user) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同步用户基本信息
|
||||||
|
*
|
||||||
|
* @param user 用户信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean syncGO(SysUser user){
|
||||||
|
RestTemplate restTemplate = new RestTemplate();
|
||||||
|
String url = goHost + "/api/v2/mini/user/zkSyncUser/"+accessKey;
|
||||||
|
SyncGoUser syncGoUser = new SyncGoUser();
|
||||||
|
syncGoUser.setUserId(Math.toIntExact(user.getUserId()));
|
||||||
|
syncGoUser.setNickname(user.getNickName());
|
||||||
|
syncGoUser.setUsername(user.getUserName());
|
||||||
|
syncGoUser.setMobile(user.getPhonenumber());
|
||||||
|
syncGoUser.setLastIp(user.getLoginIp());
|
||||||
|
syncGoUser.setRemark(user.getRemark());
|
||||||
|
syncGoUser.setAvatar(user.getAvatar());
|
||||||
|
syncGoUser.setStatus(Objects.equals(user.getStatus(), "正常") ?0:1);
|
||||||
|
ResponseEntity<String> response = restTemplate.postForEntity(url, syncGoUser, String.class);
|
||||||
|
// 检查响应状态码
|
||||||
|
if (response.getStatusCode().is2xxSuccessful()) {
|
||||||
|
System.out.println("响应内容:" + response.getBody());
|
||||||
|
} else {
|
||||||
|
System.out.println("请求失败,状态码:" + response.getStatusCode());
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改用户头像
|
* 修改用户头像
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,9 @@ open class InnerSysUserController : BaseController() {
|
||||||
originUser.avatar = targetUser.avatar ?: originUser.avatar
|
originUser.avatar = targetUser.avatar ?: originUser.avatar
|
||||||
originUser.sex = targetUser.sex ?: originUser.sex
|
originUser.sex = targetUser.sex ?: originUser.sex
|
||||||
originUser.updateBy = originUser.userName
|
originUser.updateBy = originUser.userName
|
||||||
originUser.sysUserAccount = loginUser.sysUser.sysUserAccount.apply { this.userId = originUser.userId }
|
if (loginUser.sysUser.sysUserAccount != null){
|
||||||
|
originUser.sysUserAccount = loginUser.sysUser.sysUserAccount.apply { this.userId = originUser.userId }
|
||||||
|
}
|
||||||
userService.updateUser(originUser)
|
userService.updateUser(originUser)
|
||||||
// 更新缓存用户信息
|
// 更新缓存用户信息
|
||||||
tokenService.setLoginUser(loginUser)
|
tokenService.setLoginUser(loginUser)
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.ruoyi.system.mapper.KSysUserMapper">
|
<mapper namespace="com.ruoyi.system.mapper.KSysUserMapper">
|
||||||
|
|
||||||
<resultMap type="SysUser" id="SysUserResult">
|
<resultMap type="com.ruoyi.system.api.domain.SysUser" id="SysUserResult">
|
||||||
<id property="userId" column="user_id"/>
|
<id property="userId" column="user_id"/>
|
||||||
<result property="deptId" column="dept_id"/>
|
<result property="deptId" column="dept_id"/>
|
||||||
<result property="userName" column="user_name"/>
|
<result property="userName" column="user_name"/>
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
<result property="remark" column="remark"/>
|
<result property="remark" column="remark"/>
|
||||||
<association property="sysUserAccount" javaType="com.ruoyi.system.api.domain.KSysUserAccount"
|
<association property="sysUserAccount" javaType="com.ruoyi.system.api.domain.KSysUserAccount"
|
||||||
resultMap="KSysUserAccount"/>
|
resultMap="KSysUserAccount"/>
|
||||||
<association property="dept" javaType="SysDept" resultMap="deptResult"/>
|
<association property="dept" javaType="com.ruoyi.system.api.domain.SysDept" resultMap="deptResult"/>
|
||||||
<collection property="roles" javaType="java.util.List" resultMap="RoleResult"/>
|
<collection property="roles" javaType="java.util.List" resultMap="RoleResult"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<resultMap id="KSysUserAccount" type="com.ruoyi.system.api.domain.KSysUserAccount">
|
<resultMap id="KSysUserAccount" type="com.ruoyi.system.api.domain.KSysUserAccount">
|
||||||
|
|
@ -44,7 +44,7 @@
|
||||||
<result property="refreshToken" column="refreshToken"/>
|
<result property="refreshToken" column="refreshToken"/>
|
||||||
<result property="expireTime" column="expireTime"/>
|
<result property="expireTime" column="expireTime"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<resultMap id="deptResult" type="SysDept">
|
<resultMap id="deptResult" type="com.ruoyi.system.api.domain.SysDept">
|
||||||
<id property="deptId" column="dept_id"/>
|
<id property="deptId" column="dept_id"/>
|
||||||
<result property="parentId" column="parent_id"/>
|
<result property="parentId" column="parent_id"/>
|
||||||
<result property="deptName" column="dept_name"/>
|
<result property="deptName" column="dept_name"/>
|
||||||
|
|
@ -54,7 +54,7 @@
|
||||||
<result property="status" column="dept_status"/>
|
<result property="status" column="dept_status"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap id="RoleResult" type="SysRole">
|
<resultMap id="RoleResult" type="com.ruoyi.system.api.domain.SysRole">
|
||||||
<id property="roleId" column="role_id"/>
|
<id property="roleId" column="role_id"/>
|
||||||
<result property="roleName" column="role_name"/>
|
<result property="roleName" column="role_name"/>
|
||||||
<result property="roleKey" column="role_key"/>
|
<result property="roleKey" column="role_key"/>
|
||||||
|
|
|
||||||
|
|
@ -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.ruoyi.system.mapper.SysConfigMapper">
|
<mapper namespace="com.ruoyi.system.mapper.SysConfigMapper">
|
||||||
|
|
||||||
<resultMap type="SysConfig" id="SysConfigResult">
|
<resultMap type="com.ruoyi.system.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="SysConfig" resultMap="SysConfigResult">
|
<select id="selectConfig" parameterType="com.ruoyi.system.domain.SysConfig" resultMap="SysConfigResult">
|
||||||
<include refid="selectConfigVo"/>
|
<include refid="selectConfigVo"/>
|
||||||
<include refid="sqlwhereSearch"/>
|
<include refid="sqlwhereSearch"/>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectConfigList" parameterType="SysConfig" resultMap="SysConfigResult">
|
<select id="selectConfigList" parameterType="com.ruoyi.system.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="SysConfig">
|
<insert id="insertConfig" parameterType="com.ruoyi.system.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="SysConfig">
|
<update id="updateConfig" parameterType="com.ruoyi.system.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>
|
||||||
|
|
|
||||||
|
|
@ -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.ruoyi.system.mapper.SysDeptMapper">
|
<mapper namespace="com.ruoyi.system.mapper.SysDeptMapper">
|
||||||
|
|
||||||
<resultMap type="SysDept" id="SysDeptResult">
|
<resultMap type="com.ruoyi.system.api.domain.SysDept" id="SysDeptResult">
|
||||||
<id property="deptId" column="dept_id" />
|
<id property="deptId" column="dept_id" />
|
||||||
<result property="parentId" column="parent_id" />
|
<result property="parentId" column="parent_id" />
|
||||||
<result property="ancestors" column="ancestors" />
|
<result property="ancestors" column="ancestors" />
|
||||||
|
|
@ -27,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
from sys_dept d
|
from sys_dept d
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectDeptList" parameterType="SysDept" resultMap="SysDeptResult">
|
<select id="selectDeptList" parameterType="com.ruoyi.system.api.domain.SysDept" resultMap="SysDeptResult">
|
||||||
<include refid="selectDeptVo"/>
|
<include refid="selectDeptVo"/>
|
||||||
where d.del_flag = '0'
|
where d.del_flag = '0'
|
||||||
<if test="deptId != null and deptId != 0">
|
<if test="deptId != null and deptId != 0">
|
||||||
|
|
@ -85,7 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
|
where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertDept" parameterType="SysDept">
|
<insert id="insertDept" parameterType="com.ruoyi.system.api.domain.SysDept">
|
||||||
insert into sys_dept(
|
insert into sys_dept(
|
||||||
<if test="deptId != null and deptId != 0">dept_id,</if>
|
<if test="deptId != null and deptId != 0">dept_id,</if>
|
||||||
<if test="parentId != null and parentId != 0">parent_id,</if>
|
<if test="parentId != null and parentId != 0">parent_id,</if>
|
||||||
|
|
@ -113,7 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateDept" parameterType="SysDept">
|
<update id="updateDept" parameterType="com.ruoyi.system.api.domain.SysDept">
|
||||||
update sys_dept
|
update sys_dept
|
||||||
<set>
|
<set>
|
||||||
<if test="parentId != null and parentId != 0">parent_id = #{parentId},</if>
|
<if test="parentId != null and parentId != 0">parent_id = #{parentId},</if>
|
||||||
|
|
|
||||||
|
|
@ -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.ruoyi.system.mapper.SysDictDataMapper">
|
<mapper namespace="com.ruoyi.system.mapper.SysDictDataMapper">
|
||||||
|
|
||||||
<resultMap type="SysDictData" id="SysDictDataResult">
|
<resultMap type="com.ruoyi.system.api.domain.SysDictData" id="SysDictDataResult">
|
||||||
<id property="dictCode" column="dict_code" />
|
<id property="dictCode" column="dict_code" />
|
||||||
<result property="dictSort" column="dict_sort" />
|
<result property="dictSort" column="dict_sort" />
|
||||||
<result property="dictLabel" column="dict_label" />
|
<result property="dictLabel" column="dict_label" />
|
||||||
|
|
@ -25,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
from sys_dict_data
|
from sys_dict_data
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectDictDataList" parameterType="SysDictData" resultMap="SysDictDataResult">
|
<select id="selectDictDataList" parameterType="com.ruoyi.system.api.domain.SysDictData" resultMap="SysDictDataResult">
|
||||||
<include refid="selectDictDataVo"/>
|
<include refid="selectDictDataVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="dictType != null and dictType != ''">
|
<if test="dictType != null and dictType != ''">
|
||||||
|
|
@ -71,7 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<update id="updateDictData" parameterType="SysDictData">
|
<update id="updateDictData" parameterType="com.ruoyi.system.api.domain.SysDictData">
|
||||||
update sys_dict_data
|
update sys_dict_data
|
||||||
<set>
|
<set>
|
||||||
<if test="dictSort != null">dict_sort = #{dictSort},</if>
|
<if test="dictSort != null">dict_sort = #{dictSort},</if>
|
||||||
|
|
@ -93,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType}
|
update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<insert id="insertDictData" parameterType="SysDictData">
|
<insert id="insertDictData" parameterType="com.ruoyi.system.api.domain.SysDictData">
|
||||||
insert into sys_dict_data(
|
insert into sys_dict_data(
|
||||||
<if test="dictSort != null">dict_sort,</if>
|
<if test="dictSort != null">dict_sort,</if>
|
||||||
<if test="dictLabel != null and dictLabel != ''">dict_label,</if>
|
<if test="dictLabel != null and dictLabel != ''">dict_label,</if>
|
||||||
|
|
|
||||||
|
|
@ -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.ruoyi.system.mapper.SysDictTypeMapper">
|
<mapper namespace="com.ruoyi.system.mapper.SysDictTypeMapper">
|
||||||
|
|
||||||
<resultMap type="SysDictType" id="SysDictTypeResult">
|
<resultMap type="com.ruoyi.system.api.domain.SysDictType" id="SysDictTypeResult">
|
||||||
<id property="dictId" column="dict_id" />
|
<id property="dictId" column="dict_id" />
|
||||||
<result property="dictName" column="dict_name" />
|
<result property="dictName" column="dict_name" />
|
||||||
<result property="dictType" column="dict_type" />
|
<result property="dictType" column="dict_type" />
|
||||||
|
|
@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
from sys_dict_type
|
from sys_dict_type
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectDictTypeList" parameterType="SysDictType" resultMap="SysDictTypeResult">
|
<select id="selectDictTypeList" parameterType="com.ruoyi.system.api.domain.SysDictType" resultMap="SysDictTypeResult">
|
||||||
<include refid="selectDictTypeVo"/>
|
<include refid="selectDictTypeVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="dictName != null and dictName != ''">
|
<if test="dictName != null and dictName != ''">
|
||||||
|
|
@ -71,7 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<update id="updateDictType" parameterType="SysDictType">
|
<update id="updateDictType" parameterType="com.ruoyi.system.api.domain.SysDictType">
|
||||||
update sys_dict_type
|
update sys_dict_type
|
||||||
<set>
|
<set>
|
||||||
<if test="dictName != null and dictName != ''">dict_name = #{dictName},</if>
|
<if test="dictName != null and dictName != ''">dict_name = #{dictName},</if>
|
||||||
|
|
@ -84,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where dict_id = #{dictId}
|
where dict_id = #{dictId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<insert id="insertDictType" parameterType="SysDictType">
|
<insert id="insertDictType" parameterType="com.ruoyi.system.api.domain.SysDictType">
|
||||||
insert into sys_dict_type(
|
insert into sys_dict_type(
|
||||||
<if test="dictName != null and dictName != ''">dict_name,</if>
|
<if test="dictName != null and dictName != ''">dict_name,</if>
|
||||||
<if test="dictType != null and dictType != ''">dict_type,</if>
|
<if test="dictType != null and dictType != ''">dict_type,</if>
|
||||||
|
|
|
||||||
|
|
@ -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.ruoyi.system.mapper.SysLogininforMapper">
|
<mapper namespace="com.ruoyi.system.mapper.SysLogininforMapper">
|
||||||
|
|
||||||
<resultMap type="SysLogininfor" id="SysLogininforResult">
|
<resultMap type="com.ruoyi.system.api.domain.SysLogininfor" id="SysLogininforResult">
|
||||||
<id property="infoId" column="info_id" />
|
<id property="infoId" column="info_id" />
|
||||||
<result property="userName" column="user_name" />
|
<result property="userName" column="user_name" />
|
||||||
<result property="status" column="status" />
|
<result property="status" column="status" />
|
||||||
|
|
@ -13,12 +13,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="accessTime" column="access_time" />
|
<result property="accessTime" column="access_time" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<insert id="insertLogininfor" parameterType="SysLogininfor">
|
<insert id="insertLogininfor" parameterType="com.ruoyi.system.api.domain.SysLogininfor">
|
||||||
insert into sys_logininfor (user_name, status, ipaddr, msg, access_time)
|
insert into sys_logininfor (user_name, status, ipaddr, msg, access_time)
|
||||||
values (#{userName}, #{status}, #{ipaddr}, #{msg}, sysdate())
|
values (#{userName}, #{status}, #{ipaddr}, #{msg}, sysdate())
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<select id="selectLogininforList" parameterType="SysLogininfor" resultMap="SysLogininforResult">
|
<select id="selectLogininforList" parameterType="com.ruoyi.system.api.domain.SysLogininfor" resultMap="SysLogininforResult">
|
||||||
select info_id, user_name, ipaddr, status, msg, access_time from sys_logininfor
|
select info_id, user_name, ipaddr, status, msg, access_time from sys_logininfor
|
||||||
<where>
|
<where>
|
||||||
<if test="ipaddr != null and ipaddr != ''">
|
<if test="ipaddr != null and ipaddr != ''">
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.ruoyi.system.mapper.SysMenuMapper">
|
<mapper namespace="com.ruoyi.system.mapper.SysMenuMapper">
|
||||||
|
|
||||||
<resultMap type="SysMenu" id="SysMenuResult">
|
<resultMap type="com.ruoyi.system.domain.SysMenu" id="SysMenuResult">
|
||||||
<id property="menuId" column="menu_id" />
|
<id property="menuId" column="menu_id" />
|
||||||
<result property="menuName" column="menu_name" />
|
<result property="menuName" column="menu_name" />
|
||||||
<result property="parentName" column="parent_name" />
|
<result property="parentName" column="parent_name" />
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
from sys_menu
|
from sys_menu
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectMenuList" parameterType="SysMenu" resultMap="SysMenuResult">
|
<select id="selectMenuList" parameterType="com.ruoyi.system.domain.SysMenu" resultMap="SysMenuResult">
|
||||||
<include refid="selectMenuVo"/>
|
<include refid="selectMenuVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="menuName != null and menuName != ''">
|
<if test="menuName != null and menuName != ''">
|
||||||
|
|
@ -55,7 +55,7 @@
|
||||||
order by m.parent_id, m.order_num
|
order by m.parent_id, m.order_num
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectMenuListByUserId" parameterType="SysMenu" resultMap="SysMenuResult">
|
<select id="selectMenuListByUserId" parameterType="com.ruoyi.system.domain.SysMenu" resultMap="SysMenuResult">
|
||||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.route_name, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
|
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.route_name, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
|
||||||
from sys_menu m
|
from sys_menu m
|
||||||
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
||||||
|
|
@ -128,12 +128,12 @@
|
||||||
select count(1) from sys_menu where parent_id = #{menuId}
|
select count(1) from sys_menu where parent_id = #{menuId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="checkMenuNameUnique" parameterType="SysMenu" resultMap="SysMenuResult">
|
<select id="checkMenuNameUnique" parameterType="com.ruoyi.system.domain.SysMenu" resultMap="SysMenuResult">
|
||||||
<include refid="selectMenuVo"/>
|
<include refid="selectMenuVo"/>
|
||||||
where menu_name=#{menuName} and parent_id = #{parentId} limit 1
|
where menu_name=#{menuName} and parent_id = #{parentId} limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="updateMenu" parameterType="SysMenu">
|
<update id="updateMenu" parameterType="com.ruoyi.system.domain.SysMenu">
|
||||||
update sys_menu
|
update sys_menu
|
||||||
<set>
|
<set>
|
||||||
<if test="menuName != null and menuName != ''">menu_name = #{menuName},</if>
|
<if test="menuName != null and menuName != ''">menu_name = #{menuName},</if>
|
||||||
|
|
@ -157,7 +157,7 @@
|
||||||
where menu_id = #{menuId}
|
where menu_id = #{menuId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<insert id="insertMenu" parameterType="SysMenu">
|
<insert id="insertMenu" parameterType="com.ruoyi.system.domain.SysMenu">
|
||||||
insert into sys_menu(
|
insert into sys_menu(
|
||||||
<if test="menuId != null and menuId != 0">menu_id,</if>
|
<if test="menuId != null and menuId != 0">menu_id,</if>
|
||||||
<if test="parentId != null and parentId != 0">parent_id,</if>
|
<if test="parentId != null and parentId != 0">parent_id,</if>
|
||||||
|
|
|
||||||
|
|
@ -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.ruoyi.system.mapper.SysNoticeMapper">
|
<mapper namespace="com.ruoyi.system.mapper.SysNoticeMapper">
|
||||||
|
|
||||||
<resultMap type="SysNotice" id="SysNoticeResult">
|
<resultMap type="com.ruoyi.system.domain.SysNotice" id="SysNoticeResult">
|
||||||
<result property="noticeId" column="notice_id" />
|
<result property="noticeId" column="notice_id" />
|
||||||
<result property="noticeTitle" column="notice_title" />
|
<result property="noticeTitle" column="notice_title" />
|
||||||
<result property="noticeType" column="notice_type" />
|
<result property="noticeType" column="notice_type" />
|
||||||
|
|
@ -27,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where notice_id = #{noticeId}
|
where notice_id = #{noticeId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectNoticeList" parameterType="SysNotice" resultMap="SysNoticeResult">
|
<select id="selectNoticeList" parameterType="com.ruoyi.system.domain.SysNotice" resultMap="SysNoticeResult">
|
||||||
<include refid="selectNoticeVo"/>
|
<include refid="selectNoticeVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="noticeTitle != null and noticeTitle != ''">
|
<if test="noticeTitle != null and noticeTitle != ''">
|
||||||
|
|
@ -48,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
limit 1
|
limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertNotice" parameterType="SysNotice">
|
<insert id="insertNotice" parameterType="com.ruoyi.system.domain.SysNotice">
|
||||||
insert into sys_notice (
|
insert into sys_notice (
|
||||||
<if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if>
|
<if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if>
|
||||||
<if test="noticeType != null and noticeType != '' ">notice_type, </if>
|
<if test="noticeType != null and noticeType != '' ">notice_type, </if>
|
||||||
|
|
@ -68,7 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateNotice" parameterType="SysNotice">
|
<update id="updateNotice" parameterType="com.ruoyi.system.domain.SysNotice">
|
||||||
update sys_notice
|
update sys_notice
|
||||||
<set>
|
<set>
|
||||||
<if test="noticeTitle != null and noticeTitle != ''">notice_title = #{noticeTitle}, </if>
|
<if test="noticeTitle != null and noticeTitle != ''">notice_title = #{noticeTitle}, </if>
|
||||||
|
|
|
||||||
|
|
@ -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.ruoyi.system.mapper.SysOperLogMapper">
|
<mapper namespace="com.ruoyi.system.mapper.SysOperLogMapper">
|
||||||
|
|
||||||
<resultMap type="SysOperLog" id="SysOperLogResult">
|
<resultMap type="com.ruoyi.system.api.domain.SysOperLog" id="SysOperLogResult">
|
||||||
<id property="operId" column="oper_id" />
|
<id property="operId" column="oper_id" />
|
||||||
<result property="title" column="title" />
|
<result property="title" column="title" />
|
||||||
<result property="businessType" column="business_type" />
|
<result property="businessType" column="business_type" />
|
||||||
|
|
@ -28,12 +28,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
from sys_oper_log
|
from sys_oper_log
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<insert id="insertOperlog" parameterType="SysOperLog">
|
<insert id="insertOperlog" parameterType="com.ruoyi.system.api.domain.SysOperLog">
|
||||||
insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_param, json_result, status, error_msg, cost_time, oper_time)
|
insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_param, json_result, status, error_msg, cost_time, oper_time)
|
||||||
values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, #{costTime}, sysdate())
|
values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, #{costTime}, sysdate())
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<select id="selectOperLogList" parameterType="SysOperLog" resultMap="SysOperLogResult">
|
<select id="selectOperLogList" parameterType="com.ruoyi.system.api.domain.SysOperLog" resultMap="SysOperLogResult">
|
||||||
<include refid="selectOperLogVo"/>
|
<include refid="selectOperLogVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="operIp != null and operIp != ''">
|
<if test="operIp != null and operIp != ''">
|
||||||
|
|
|
||||||
|
|
@ -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.ruoyi.system.mapper.SysPostMapper">
|
<mapper namespace="com.ruoyi.system.mapper.SysPostMapper">
|
||||||
|
|
||||||
<resultMap type="SysPost" id="SysPostResult">
|
<resultMap type="com.ruoyi.system.domain.SysPost" id="SysPostResult">
|
||||||
<id property="postId" column="post_id" />
|
<id property="postId" column="post_id" />
|
||||||
<result property="postCode" column="post_code" />
|
<result property="postCode" column="post_code" />
|
||||||
<result property="postName" column="post_name" />
|
<result property="postName" column="post_name" />
|
||||||
|
|
@ -22,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
from sys_post
|
from sys_post
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectPostList" parameterType="SysPost" resultMap="SysPostResult">
|
<select id="selectPostList" parameterType="com.ruoyi.system.domain.SysPost" resultMap="SysPostResult">
|
||||||
<include refid="selectPostVo"/>
|
<include refid="selectPostVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="postCode != null and postCode != ''">
|
<if test="postCode != null and postCode != ''">
|
||||||
|
|
@ -72,7 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where post_code=#{postCode} limit 1
|
where post_code=#{postCode} limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="updatePost" parameterType="SysPost">
|
<update id="updatePost" parameterType="com.ruoyi.system.domain.SysPost">
|
||||||
update sys_post
|
update sys_post
|
||||||
<set>
|
<set>
|
||||||
<if test="postCode != null and postCode != ''">post_code = #{postCode},</if>
|
<if test="postCode != null and postCode != ''">post_code = #{postCode},</if>
|
||||||
|
|
@ -86,7 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where post_id = #{postId}
|
where post_id = #{postId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<insert id="insertPost" parameterType="SysPost" useGeneratedKeys="true" keyProperty="postId">
|
<insert id="insertPost" parameterType="com.ruoyi.system.domain.SysPost" useGeneratedKeys="true" keyProperty="postId">
|
||||||
insert into sys_post(
|
insert into sys_post(
|
||||||
<if test="postId != null and postId != 0">post_id,</if>
|
<if test="postId != null and postId != 0">post_id,</if>
|
||||||
<if test="postCode != null and postCode != ''">post_code,</if>
|
<if test="postCode != null and postCode != ''">post_code,</if>
|
||||||
|
|
|
||||||
|
|
@ -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.ruoyi.system.mapper.SysRoleDeptMapper">
|
<mapper namespace="com.ruoyi.system.mapper.SysRoleDeptMapper">
|
||||||
|
|
||||||
<resultMap type="SysRoleDept" id="SysRoleDeptResult">
|
<resultMap type="com.ruoyi.system.domain.SysRoleDept" id="SysRoleDeptResult">
|
||||||
<result property="roleId" column="role_id" />
|
<result property="roleId" column="role_id" />
|
||||||
<result property="deptId" column="dept_id" />
|
<result property="deptId" column="dept_id" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
|
||||||
|
|
@ -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.ruoyi.system.mapper.SysRoleMapper">
|
<mapper namespace="com.ruoyi.system.mapper.SysRoleMapper">
|
||||||
|
|
||||||
<resultMap type="SysRole" id="SysRoleResult">
|
<resultMap type="com.ruoyi.system.api.domain.SysRole" id="SysRoleResult">
|
||||||
<id property="roleId" column="role_id" />
|
<id property="roleId" column="role_id" />
|
||||||
<result property="roleName" column="role_name" />
|
<result property="roleName" column="role_name" />
|
||||||
<result property="roleKey" column="role_key" />
|
<result property="roleKey" column="role_key" />
|
||||||
|
|
@ -30,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
left join sys_dept d on u.dept_id = d.dept_id
|
left join sys_dept d on u.dept_id = d.dept_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectRoleList" parameterType="SysRole" resultMap="SysRoleResult">
|
<select id="selectRoleList" parameterType="com.ruoyi.system.api.domain.SysRole" resultMap="SysRoleResult">
|
||||||
<include refid="selectRoleVo"/>
|
<include refid="selectRoleVo"/>
|
||||||
where r.del_flag = '0'
|
where r.del_flag = '0'
|
||||||
<if test="roleId != null and roleId != 0">
|
<if test="roleId != null and roleId != 0">
|
||||||
|
|
@ -93,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where r.role_key=#{roleKey} and r.del_flag = '0' limit 1
|
where r.role_key=#{roleKey} and r.del_flag = '0' limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertRole" parameterType="SysRole" useGeneratedKeys="true" keyProperty="roleId">
|
<insert id="insertRole" parameterType="com.ruoyi.system.api.domain.SysRole" useGeneratedKeys="true" keyProperty="roleId">
|
||||||
insert into sys_role(
|
insert into sys_role(
|
||||||
<if test="roleId != null and roleId != 0">role_id,</if>
|
<if test="roleId != null and roleId != 0">role_id,</if>
|
||||||
<if test="roleName != null and roleName != ''">role_name,</if>
|
<if test="roleName != null and roleName != ''">role_name,</if>
|
||||||
|
|
@ -121,7 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateRole" parameterType="SysRole">
|
<update id="updateRole" parameterType="com.ruoyi.system.api.domain.SysRole">
|
||||||
update sys_role
|
update sys_role
|
||||||
<set>
|
<set>
|
||||||
<if test="roleName != null and roleName != ''">role_name = #{roleName},</if>
|
<if test="roleName != null and roleName != ''">role_name = #{roleName},</if>
|
||||||
|
|
|
||||||
|
|
@ -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.ruoyi.system.mapper.SysRoleMenuMapper">
|
<mapper namespace="com.ruoyi.system.mapper.SysRoleMenuMapper">
|
||||||
|
|
||||||
<resultMap type="SysRoleMenu" id="SysRoleMenuResult">
|
<resultMap type="com.ruoyi.system.domain.SysRoleMenu" id="SysRoleMenuResult">
|
||||||
<result property="roleId" column="role_id" />
|
<result property="roleId" column="role_id" />
|
||||||
<result property="menuId" column="menu_id" />
|
<result property="menuId" column="menu_id" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
|
||||||
|
|
@ -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.ruoyi.system.mapper.SysUserMapper">
|
<mapper namespace="com.ruoyi.system.mapper.SysUserMapper">
|
||||||
|
|
||||||
<resultMap type="SysUser" id="SysUserResult">
|
<resultMap type="com.ruoyi.system.api.domain.SysUser" id="SysUserResult">
|
||||||
<id property="userId" column="user_id" />
|
<id property="userId" column="user_id" />
|
||||||
<result property="deptId" column="dept_id" />
|
<result property="deptId" column="dept_id" />
|
||||||
<result property="userName" column="user_name" />
|
<result property="userName" column="user_name" />
|
||||||
|
|
@ -24,12 +24,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
<result property="remark" column="remark" />
|
<result property="remark" column="remark" />
|
||||||
<association property="sysUserAccount" javaType="KSysUserAccount" resultMap="sysUserAccountResult" />
|
<association property="sysUserAccount" javaType="com.ruoyi.system.api.domain.KSysUserAccount" resultMap="sysUserAccountResult" />
|
||||||
<association property="dept" javaType="SysDept" resultMap="deptResult" />
|
<association property="dept" javaType="com.ruoyi.system.api.domain.SysDept" resultMap="deptResult" />
|
||||||
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
|
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap id="deptResult" type="SysDept">
|
<resultMap id="deptResult" type="com.ruoyi.system.api.domain.SysDept">
|
||||||
<id property="deptId" column="dept_id" />
|
<id property="deptId" column="dept_id" />
|
||||||
<result property="parentId" column="parent_id" />
|
<result property="parentId" column="parent_id" />
|
||||||
<result property="deptName" column="dept_name" />
|
<result property="deptName" column="dept_name" />
|
||||||
|
|
@ -39,7 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="status" column="dept_status" />
|
<result property="status" column="dept_status" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap id="RoleResult" type="SysRole">
|
<resultMap id="RoleResult" type="com.ruoyi.system.api.domain.SysRole">
|
||||||
<id property="roleId" column="role_id" />
|
<id property="roleId" column="role_id" />
|
||||||
<result property="roleName" column="role_name" />
|
<result property="roleName" column="role_name" />
|
||||||
<result property="roleKey" column="role_key" />
|
<result property="roleKey" column="role_key" />
|
||||||
|
|
@ -48,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="status" column="role_status" />
|
<result property="status" column="role_status" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap id="sysUserAccountResult" type="KSysUserAccount">
|
<resultMap id="sysUserAccountResult" type="com.ruoyi.system.api.domain.KSysUserAccount">
|
||||||
<id property="userId" column="member_id" />
|
<id property="userId" column="member_id" />
|
||||||
<result property="wxUnionId" column="unionid" />
|
<result property="wxUnionId" column="unionid" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
@ -65,7 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
left join sys_role r on r.role_id = ur.role_id
|
left join sys_role r on r.role_id = ur.role_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
|
<select id="selectUserList" parameterType="com.ruoyi.system.api.domain.SysUser" resultMap="SysUserResult">
|
||||||
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
|
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
|
||||||
left join sys_dept d on u.dept_id = d.dept_id
|
left join sys_dept d on u.dept_id = d.dept_id
|
||||||
where u.del_flag = '0'
|
where u.del_flag = '0'
|
||||||
|
|
@ -94,7 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
${params.dataScope}
|
${params.dataScope}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
<select id="selectAllocatedList" parameterType="com.ruoyi.system.api.domain.SysUser" resultMap="SysUserResult">
|
||||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
||||||
from sys_user u
|
from sys_user u
|
||||||
left join sys_dept d on u.dept_id = d.dept_id
|
left join sys_dept d on u.dept_id = d.dept_id
|
||||||
|
|
@ -111,7 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
${params.dataScope}
|
${params.dataScope}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
<select id="selectUnallocatedList" parameterType="com.ruoyi.system.api.domain.SysUser" resultMap="SysUserResult">
|
||||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
||||||
from sys_user u
|
from sys_user u
|
||||||
left join sys_dept d on u.dept_id = d.dept_id
|
left join sys_dept d on u.dept_id = d.dept_id
|
||||||
|
|
@ -160,7 +160,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where u.phonenumber like CONCAT(#{phoneNumber},"%") and u.del_flag = '0'
|
where u.phonenumber like CONCAT(#{phoneNumber},"%") and u.del_flag = '0'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
|
<insert id="insertUser" parameterType="com.ruoyi.system.api.domain.SysUser" useGeneratedKeys="true" keyProperty="userId">
|
||||||
insert into sys_user(
|
insert into sys_user(
|
||||||
<if test="userId != null and userId != 0">user_id,</if>
|
<if test="userId != null and userId != 0">user_id,</if>
|
||||||
<if test="deptId != null and deptId != 0">dept_id,</if>
|
<if test="deptId != null and deptId != 0">dept_id,</if>
|
||||||
|
|
@ -192,7 +192,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateUser" parameterType="SysUser">
|
<update id="updateUser" parameterType="com.ruoyi.system.api.domain.SysUser">
|
||||||
update sys_user
|
update sys_user
|
||||||
<set>
|
<set>
|
||||||
<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
|
<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
|
||||||
|
|
@ -212,15 +212,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where user_id = #{userId}
|
where user_id = #{userId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="updateUserStatus" parameterType="SysUser">
|
<update id="updateUserStatus" parameterType="com.ruoyi.system.api.domain.SysUser">
|
||||||
update sys_user set status = #{status} where user_id = #{userId}
|
update sys_user set status = #{status} where user_id = #{userId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="updateUserAvatar" parameterType="SysUser">
|
<update id="updateUserAvatar" parameterType="com.ruoyi.system.api.domain.SysUser">
|
||||||
update sys_user set avatar = #{avatar} where user_name = #{userName}
|
update sys_user set avatar = #{avatar} where user_name = #{userName}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="resetUserPwd" parameterType="SysUser">
|
<update id="resetUserPwd" parameterType="com.ruoyi.system.api.domain.SysUser">
|
||||||
update sys_user set pwd_update_date = sysdate(), password = #{password} where user_name = #{userName}
|
update sys_user set pwd_update_date = sysdate(), password = #{password} where user_name = #{userName}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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.ruoyi.system.mapper.SysUserPostMapper">
|
<mapper namespace="com.ruoyi.system.mapper.SysUserPostMapper">
|
||||||
|
|
||||||
<resultMap type="SysUserPost" id="SysUserPostResult">
|
<resultMap type="com.ruoyi.system.domain.SysUserPost" id="SysUserPostResult">
|
||||||
<result property="userId" column="user_id" />
|
<result property="userId" column="user_id" />
|
||||||
<result property="postId" column="post_id" />
|
<result property="postId" column="post_id" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
|
||||||
|
|
@ -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.ruoyi.system.mapper.SysUserRoleMapper">
|
<mapper namespace="com.ruoyi.system.mapper.SysUserRoleMapper">
|
||||||
|
|
||||||
<resultMap type="SysUserRole" id="SysUserRoleResult">
|
<resultMap type="com.ruoyi.system.domain.SysUserRole" id="SysUserRoleResult">
|
||||||
<result property="userId" column="user_id" />
|
<result property="userId" column="user_id" />
|
||||||
<result property="roleId" column="role_id" />
|
<result property="roleId" column="role_id" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
@ -31,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<delete id="deleteUserRoleInfo" parameterType="SysUserRole">
|
<delete id="deleteUserRoleInfo" parameterType="com.ruoyi.system.domain.SysUserRole">
|
||||||
delete from sys_user_role where user_id=#{userId} and role_id=#{roleId}
|
delete from sys_user_role where user_id=#{userId} and role_id=#{roleId}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@
|
||||||
<span>更新日志</span>
|
<span>更新日志</span>
|
||||||
</div>
|
</div>
|
||||||
<el-collapse accordion>
|
<el-collapse accordion>
|
||||||
<el-collapse-item title="v3.6.5.0.8 - 2024-11-13">
|
<el-collapse-item title="v3.6.5.0.9 - 2024-11-13">
|
||||||
<ol>
|
<ol>
|
||||||
<li>使用SpringDoc代替Swagger</li>
|
<li>使用SpringDoc代替Swagger</li>
|
||||||
<li>菜单管理新增路由名称</li>
|
<li>菜单管理新增路由名称</li>
|
||||||
|
|
@ -909,7 +909,7 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 版本号
|
// 版本号
|
||||||
version: "3.6.5.0.8",
|
version: "3.6.5.0.9",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi</artifactId>
|
||||||
<version>3.6.5.0.8</version>
|
<version>3.6.5.0.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-visual</artifactId>
|
<artifactId>ruoyi-visual</artifactId>
|
||||||
<version>3.6.5.0.8</version>
|
<version>3.6.5.0.9</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue