Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
cf68964a0d
35 files changed
+347
-348
No files matched your search
+3
-11
@@ -56,30 +56,22 @@ public interface RemoteUserService {
|
||||
|
||||
/**
|
||||
* 通过用户id查询用户、角色信息
|
||||
*
|
||||
* @param userId 用户名
|
||||
* @return R
|
||||
*/
|
||||
@NoToken
|
||||
@GetMapping("/user/inner/get-by-user-id")
|
||||
R<UserInfo> getInnerByUserId(@RequestParam("userId") Long userId);
|
||||
|
||||
@GetMapping("/user/get-by-user-id")
|
||||
R<UserInfo> getByUserId(@RequestParam("userId") Long userId);
|
||||
|
||||
/**
|
||||
* 通过姓名和手机号查询用户、角色信息
|
||||
*
|
||||
* @param name
|
||||
* @param mobile
|
||||
* @return
|
||||
*/
|
||||
@NoToken
|
||||
@GetMapping("/user/get-name-and-mobile")
|
||||
R<UserInfo> getUserByNameAndMobile(@RequestParam("name") String name, @RequestParam("mobile") String mobile);
|
||||
|
||||
/**
|
||||
* 根据用户ID获取用户
|
||||
*
|
||||
* @param userIds ID
|
||||
* @return SysUser
|
||||
*/
|
||||
@PostMapping("/user/list")
|
||||
R<List<SysUser>> getUserById(@RequestBody List<Long> userIds);
|
||||
|
||||
+1
@@ -25,6 +25,7 @@ import com.bsd.pjcloud.admin.api.vo.DeptExcelVO;
|
||||
import com.bsd.pjcloud.admin.mapper.SysDeptMapper;
|
||||
import com.bsd.pjcloud.admin.service.SysDeptService;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.data.tenant.TenantContextHolder;
|
||||
import com.bsd.pjcloud.common.excel.annotation.RequestExcel;
|
||||
import com.bsd.pjcloud.common.excel.annotation.ResponseExcel;
|
||||
import com.bsd.pjcloud.common.log.annotation.SysLog;
|
||||
|
||||
+11
-9
@@ -101,7 +101,6 @@ public class SysUserController {
|
||||
return R.ok(userService.findUserInfo(user));
|
||||
}
|
||||
|
||||
@Inner
|
||||
@GetMapping("/get-name-and-mobile")
|
||||
public R<UserInfo> getUserByNameAndMobile(@RequestParam("name") String name, @RequestParam("mobile") String mobile) {
|
||||
SysUser user = userService.getOne(Wrappers.<SysUser>query().lambda().eq(SysUser::getName, name).eq(SysUser::getPhone, mobile));
|
||||
@@ -113,16 +112,19 @@ public class SysUserController {
|
||||
|
||||
/**
|
||||
* 获取指定用户全部信息
|
||||
*
|
||||
* @return 用户信息
|
||||
*/
|
||||
@Inner
|
||||
@GetMapping("/inner/get-by-user-id")
|
||||
public R getInnerByUserId(@RequestParam Long userId) {
|
||||
SysUser user = userService.getOne(Wrappers.<SysUser>query().lambda().eq(SysUser::getUserId, userId));
|
||||
if (user == null) return R.failed(MsgUtils.getMessage(ErrorCodes.SYS_USER_USERINFO_EMPTY, userId));
|
||||
return R.ok(userService.findUserInfo(user));
|
||||
}
|
||||
|
||||
@GetMapping("/get-by-user-id")
|
||||
public R getByUserId(@RequestParam Long userId) {
|
||||
SysUser user = userService.getOne(Wrappers.<SysUser>query().lambda().eq(SysUser::getUserId, userId));
|
||||
if (user == null) {
|
||||
return R.failed(MsgUtils.getMessage(ErrorCodes.SYS_USER_USERINFO_EMPTY, userId));
|
||||
}
|
||||
if (user == null) return R.failed(MsgUtils.getMessage(ErrorCodes.SYS_USER_USERINFO_EMPTY, userId));
|
||||
return R.ok(userService.findUserInfo(user));
|
||||
}
|
||||
|
||||
@@ -405,8 +407,8 @@ public class SysUserController {
|
||||
*/
|
||||
@GetMapping("/getUserByMobileOrEmployeeCode")
|
||||
@Inner
|
||||
public R<List<SysUser>> getUserByMobileOrEmployeeCode(@RequestParam(value = "employeeCode",required = false) String employeeCode, @RequestParam("mobile") String mobile) {
|
||||
return R.ok(userService.list(Wrappers.<SysUser>lambdaQuery().eq(StringUtils.isNotBlank(employeeCode),SysUser::getDingtalkEmployeeCode, employeeCode).or().eq(SysUser::getPhone, mobile)));
|
||||
public R<List<SysUser>> getUserByMobileOrEmployeeCode(@RequestParam(value = "employeeCode", required = false) String employeeCode, @RequestParam("mobile") String mobile) {
|
||||
return R.ok(userService.list(Wrappers.<SysUser>lambdaQuery().eq(StringUtils.isNotBlank(employeeCode), SysUser::getDingtalkEmployeeCode, employeeCode).or().eq(SysUser::getPhone, mobile)));
|
||||
}
|
||||
|
||||
@GetMapping("/getUserByMobile")
|
||||
@@ -461,7 +463,7 @@ public class SysUserController {
|
||||
public R<Boolean> checkUsername(@RequestParam("username") String username) {
|
||||
List<SysUser> list = userService.list(Wrappers.<SysUser>lambdaQuery().like(SysUser::getUsername, username));
|
||||
if (!CollUtil.isEmpty(list)) {
|
||||
return R.ok(false);
|
||||
return R.ok(false);
|
||||
}
|
||||
return R.ok(true);
|
||||
}
|
||||
|
||||
+1
@@ -18,6 +18,7 @@ package com.bsd.pjcloud.admin.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.CharUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.ReflectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
|
||||
+6
-8
@@ -199,9 +199,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||
getSelf().applyFlow(sysUser);
|
||||
} else {
|
||||
// 创建用户默认钱包
|
||||
CompletableFuture.runAsync(() -> {
|
||||
remoteWalletService.createWallet(sysUser.getUserId());
|
||||
});
|
||||
remoteWalletService.createWallet(sysUser.getUserId());
|
||||
remoteWalletService.userChange(sysUser.getUserId(), Boolean.FALSE);
|
||||
}
|
||||
|
||||
@@ -407,9 +405,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||
}
|
||||
|
||||
// 创建用户默认钱包
|
||||
CompletableFuture.runAsync(() -> {
|
||||
remoteWalletService.createWallet(userDto.getUserId());
|
||||
});
|
||||
remoteWalletService.createWallet(userDto.getUserId());
|
||||
remoteWalletService.userChange(userDto.getUserId(), Boolean.FALSE);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
@@ -870,8 +866,10 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||
updateUser.setProcessStatus(processStatus);
|
||||
updateUser.setProcessTime(LocalDateTime.now());
|
||||
baseMapper.updateById(updateUser);
|
||||
// 创建用户默认钱包
|
||||
remoteWalletService.createWallet(detail.getUserId());
|
||||
if (isConsent) {
|
||||
// 创建用户默认钱包
|
||||
remoteWalletService.createWallet(detail.getUserId());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error("|{}|审批回调意外的错误,dto:|{}|error:|{}|", TAG, JSON.toJSONString(dto), e.getMessage());
|
||||
|
||||
Reference in new issue
Block a user