[feat] 新增解绑微信api
parent
585d83d007
commit
26ec9c7423
|
|
@ -1,11 +1,11 @@
|
|||
<p align="center">
|
||||
<img alt="logo" src="https://oscimg.oschina.net/oscnet/up-b99b286755aef70355a7084753f89cdb7c9.png">
|
||||
</p>
|
||||
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">RuoYi v3.6.5.0.7</h1>
|
||||
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">RuoYi v3.6.5.0.8</h1>
|
||||
<h4 align="center">基于 Vue/Element UI 和 Spring Boot/Spring Cloud & Alibaba 前后端分离的分布式微服务架构</h4>
|
||||
<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"><img src="https://img.shields.io/badge/RuoYi-v3.6.5.0.7-brightgreen.svg"></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/blob/master/LICENSE"><img src="https://img.shields.io/github/license/mashape/apistatus.svg"></a>
|
||||
</p>
|
||||
|
||||
|
|
|
|||
4
pom.xml
4
pom.xml
|
|
@ -6,14 +6,14 @@
|
|||
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<version>3.6.5.0.7</version>
|
||||
<version>3.6.5.0.8</version>
|
||||
|
||||
<name>ruoyi</name>
|
||||
<url>http://www.ruoyi.vip</url>
|
||||
<description>若依微服务系统</description>
|
||||
|
||||
<properties>
|
||||
<ruoyi.version>3.6.5.0.7</ruoyi.version>
|
||||
<ruoyi.version>3.6.5.0.8</ruoyi.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<version>3.6.5.0.7</version>
|
||||
<version>3.6.5.0.8</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-api</artifactId>
|
||||
<version>3.6.5.0.7</version>
|
||||
<version>3.6.5.0.8</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -78,6 +78,11 @@ public class RemoteUserFallbackFactory implements FallbackFactory<RemoteUserServ
|
|||
public R<Boolean> registerUserBySysUserAccount_Inner(KSysUserAccount sysUserAccount, Long deptId, String source) {
|
||||
return R.fail("注册用户失败:" + throwable.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<Boolean> unbindWeixin_Inner(Long userId, String source) {
|
||||
return R.fail("解绑微信失败:" + throwable.getMessage());
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,5 +63,15 @@ public interface InnerRemoteUserService {
|
|||
* @return 结果
|
||||
*/
|
||||
@PostMapping("/inner/user/register/dept/{deptId}/wx/unionid")
|
||||
public R<Boolean> registerUserBySysUserAccount_Inner(@RequestBody KSysUserAccount sysUserAccount,@PathVariable("deptId") Long deptId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
R<Boolean> registerUserBySysUserAccount_Inner(@RequestBody KSysUserAccount sysUserAccount, @PathVariable("deptId") Long deptId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
|
||||
/**
|
||||
* 解绑微信
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @param source 请求来源
|
||||
* @return 结果
|
||||
*/
|
||||
@PutMapping("/inner/user/{userId}/unbind/weixin")
|
||||
R<Boolean> unbindWeixin_Inner(@PathVariable("userId") Long userId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
}
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<version>3.6.5.0.7</version>
|
||||
<version>3.6.5.0.8</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<version>3.6.5.0.7</version>
|
||||
<version>3.6.5.0.8</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common</artifactId>
|
||||
<version>3.6.5.0.7</version>
|
||||
<version>3.6.5.0.8</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common</artifactId>
|
||||
<version>3.6.5.0.7</version>
|
||||
<version>3.6.5.0.8</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common</artifactId>
|
||||
<version>3.6.5.0.7</version>
|
||||
<version>3.6.5.0.8</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common</artifactId>
|
||||
<version>3.6.5.0.7</version>
|
||||
<version>3.6.5.0.8</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common</artifactId>
|
||||
<version>3.6.5.0.7</version>
|
||||
<version>3.6.5.0.8</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common</artifactId>
|
||||
<version>3.6.5.0.7</version>
|
||||
<version>3.6.5.0.8</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common</artifactId>
|
||||
<version>3.6.5.0.7</version>
|
||||
<version>3.6.5.0.8</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common</artifactId>
|
||||
<version>3.6.5.0.7</version>
|
||||
<version>3.6.5.0.8</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common</artifactId>
|
||||
<version>3.6.5.0.7</version>
|
||||
<version>3.6.5.0.8</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<version>3.6.5.0.7</version>
|
||||
<version>3.6.5.0.8</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<version>3.6.5.0.7</version>
|
||||
<version>3.6.5.0.8</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-modules</artifactId>
|
||||
<version>3.6.5.0.7</version>
|
||||
<version>3.6.5.0.8</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-modules</artifactId>
|
||||
<version>3.6.5.0.7</version>
|
||||
<version>3.6.5.0.8</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-modules</artifactId>
|
||||
<version>3.6.5.0.7</version>
|
||||
<version>3.6.5.0.8</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-modules</artifactId>
|
||||
<version>3.6.5.0.7</version>
|
||||
<version>3.6.5.0.8</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -329,10 +329,9 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
userPostMapper.deleteUserPostByUserId(userId);
|
||||
// 新增用户与岗位管理
|
||||
insertUserPost(user);
|
||||
// 重绑定微信信息
|
||||
// 更新微信信息
|
||||
if (Objects.nonNull(user.getSysUserAccount())) {
|
||||
if (Objects.nonNull(user.getSysUserAccount().getWxUnionId())) {
|
||||
kSysUserService.unBindWxByUserId(userId);
|
||||
kSysUserService.updateSysUserAccount(user.getSysUserAccount());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import com.ruoyi.common.log.annotation.Log
|
|||
import com.ruoyi.common.log.enums.BusinessType
|
||||
import com.ruoyi.common.security.annotation.InnerAuth
|
||||
import com.ruoyi.common.security.service.TokenService
|
||||
import com.ruoyi.common.security.utils.SecurityUtils
|
||||
import com.ruoyi.system.api.domain.KSysUserAccount
|
||||
import com.ruoyi.system.api.domain.SysUser
|
||||
import com.ruoyi.system.api.model.LoginUser
|
||||
|
|
@ -81,7 +82,7 @@ open class InnerSysUserController : BaseController() {
|
|||
*/
|
||||
@InnerAuth
|
||||
@GetMapping("/detail/{userId}")
|
||||
fun infoById(@PathVariable("userId") userId: Long?): R<LoginUser> {
|
||||
fun infoById(@PathVariable("userId") userId: Long): R<LoginUser> {
|
||||
val sysUser: SysUser = userService.selectUserById(userId)
|
||||
// 角色集合
|
||||
val roles: Set<String> = permissionService.getRolePermission(sysUser)
|
||||
|
|
@ -162,4 +163,14 @@ open class InnerSysUserController : BaseController() {
|
|||
}
|
||||
return R.ok(kSysUserService.registerUserBySysUserAccount(sysUserAccount, deptId))
|
||||
}
|
||||
@InnerAuth
|
||||
@PutMapping("/{userId}/unbind/weixin")
|
||||
@Log(title = "解绑微信", businessType = BusinessType.UPDATE)
|
||||
fun unbindWeChat(@PathVariable("userId") userId: Long): AjaxResult {
|
||||
val loginUser = SecurityUtils.getLoginUser()
|
||||
kSysUserService.unBindWxByUserId(userId)
|
||||
// 更新缓存用户信息
|
||||
tokenService.loginUser = loginUser
|
||||
return success(loginUser)
|
||||
}
|
||||
}
|
||||
|
|
@ -108,7 +108,7 @@
|
|||
<span>更新日志</span>
|
||||
</div>
|
||||
<el-collapse accordion>
|
||||
<el-collapse-item title="v3.6.5.0.7 - 2024-11-13">
|
||||
<el-collapse-item title="v3.6.5.0.8 - 2024-11-13">
|
||||
<ol>
|
||||
<li>使用SpringDoc代替Swagger</li>
|
||||
<li>菜单管理新增路由名称</li>
|
||||
|
|
@ -909,7 +909,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
// 版本号
|
||||
version: "3.6.5.0.7",
|
||||
version: "3.6.5.0.8",
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<version>3.6.5.0.7</version>
|
||||
<version>3.6.5.0.8</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-visual</artifactId>
|
||||
<version>3.6.5.0.7</version>
|
||||
<version>3.6.5.0.8</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue