mirror of https://github.com/jeecgboot/jeecg-boot
修复几个bug
parent
6fe8f1d81a
commit
09614a0239
|
@ -145,7 +145,7 @@
|
||||||
<version>${postgresql.version}</version>
|
<version>${postgresql.version}</version>
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Quartz定时任务 -->
|
<!-- Quartz定时任务 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
|
|
@ -19,6 +19,8 @@ public class SysFilesModel {
|
||||||
private String storeType;
|
private String storeType;
|
||||||
/**文件大小(kb)*/
|
/**文件大小(kb)*/
|
||||||
private Double fileSize;
|
private Double fileSize;
|
||||||
|
/**租户id*/
|
||||||
|
private String tenantId;
|
||||||
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
return id;
|
return id;
|
||||||
|
@ -67,4 +69,12 @@ public class SysFilesModel {
|
||||||
public void setFileSize(Double fileSize) {
|
public void setFileSize(Double fileSize) {
|
||||||
this.fileSize = fileSize;
|
this.fileSize = fileSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getTenantId() {
|
||||||
|
return tenantId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTenantId(String tenantId) {
|
||||||
|
this.tenantId = tenantId;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -108,7 +108,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||||
* @return 部门 parentIds
|
* @return 部门 parentIds
|
||||||
*/
|
*/
|
||||||
@GetMapping("/sys/api/getDepartParentIdsByDepIds")
|
@GetMapping("/sys/api/getDepartParentIdsByDepIds")
|
||||||
Set<String> getDepartParentIdsByDepIds(@RequestParam("depIds") Set depIds);
|
Set<String> getDepartParentIdsByDepIds(@RequestParam("depIds") Set<String> depIds);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 9通过用户账号查询部门 name
|
* 9通过用户账号查询部门 name
|
||||||
|
@ -213,7 +213,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/sys/api/queryAllUser")
|
@GetMapping("/sys/api/queryAllUser")
|
||||||
public JSONObject queryAllUser(@RequestParam(name="userIds",required=false)String userIds, @RequestParam(name="pageNo",required=false) Integer pageNo,@RequestParam(name="pageSize",required=false) int pageSize);
|
public JSONObject queryAllUser(@RequestParam(name="userIds",required=false)String userIds, @RequestParam(name="pageNo",required=false) Integer pageNo,@RequestParam(name="pageSize",required=false) Integer pageSize);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -761,7 +761,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||||
@GetMapping("/sys/api/dictTableWhiteListCheckByDict")
|
@GetMapping("/sys/api/dictTableWhiteListCheckByDict")
|
||||||
boolean dictTableWhiteListCheckByDict(
|
boolean dictTableWhiteListCheckByDict(
|
||||||
@RequestParam("tableOrDictCode") String tableOrDictCode,
|
@RequestParam("tableOrDictCode") String tableOrDictCode,
|
||||||
@RequestParam(value = "fields", required = false) String[] fields
|
@RequestParam(value = "fields", required = false) String... fields
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,7 +133,7 @@ public class SysBaseAPIFallback implements ISysBaseAPI {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject queryAllUser(String userIds, Integer pageNo, int pageSize) {
|
public JSONObject queryAllUser(String userIds, Integer pageNo, Integer pageSize) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -446,7 +446,7 @@ public class SysBaseAPIFallback implements ISysBaseAPI {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean dictTableWhiteListCheckByDict(String tableOrDictCode, String[] fields) {
|
public boolean dictTableWhiteListCheckByDict(String tableOrDictCode, String... fields) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -347,7 +347,7 @@ public class SystemApiController {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/queryAllUser")
|
@GetMapping("/queryAllUser")
|
||||||
public JSONObject queryAllUser(@RequestParam(name="userIds",required=false)String userIds, @RequestParam(name="pageNo",required=false) Integer pageNo,@RequestParam(name="pageSize",required=false) int pageSize){
|
public JSONObject queryAllUser(@RequestParam(name="userIds",required=false)String userIds, @RequestParam(name="pageNo",required=false) Integer pageNo,@RequestParam(name="pageSize",required=false) Integer pageSize){
|
||||||
return sysBaseApi.queryAllUser(userIds, pageNo, pageSize);
|
return sysBaseApi.queryAllUser(userIds, pageNo, pageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -578,7 +578,7 @@ public class SystemApiController {
|
||||||
* @param tenantId 新的租户ID
|
* @param tenantId 新的租户ID
|
||||||
* @return Map<String, String> Map<原字典编码, 新字典编码>
|
* @return Map<String, String> Map<原字典编码, 新字典编码>
|
||||||
*/
|
*/
|
||||||
@GetMapping("/sys/api/copyLowAppDict")
|
@GetMapping("/copyLowAppDict")
|
||||||
Map<String, String> copyLowAppDict(@RequestParam("originalAppId") String originalAppId, @RequestParam("appId") String appId, @RequestParam("tenantId") String tenantId) {
|
Map<String, String> copyLowAppDict(@RequestParam("originalAppId") String originalAppId, @RequestParam("appId") String appId, @RequestParam("tenantId") String tenantId) {
|
||||||
return sysBaseApi.copyLowAppDict(originalAppId, appId, tenantId);
|
return sysBaseApi.copyLowAppDict(originalAppId, appId, tenantId);
|
||||||
}
|
}
|
||||||
|
@ -732,14 +732,6 @@ public class SystemApiController {
|
||||||
this.sysBaseApi.saveDataLog(dataLogDto);
|
this.sysBaseApi.saveDataLog(dataLogDto);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/addSysFiles")
|
|
||||||
public void addSysFiles(@RequestBody SysFilesModel sysFilesModel){this.sysBaseApi.addSysFiles(sysFilesModel);}
|
|
||||||
|
|
||||||
@GetMapping("/getFileUrl")
|
|
||||||
public String getFileUrl(@RequestParam(name="fileId") String fileId){
|
|
||||||
return this.sysBaseApi.getFileUrl(fileId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新头像
|
* 更新头像
|
||||||
* @param loginUser
|
* @param loginUser
|
||||||
|
@ -858,7 +850,7 @@ public class SystemApiController {
|
||||||
* @param deptIds
|
* @param deptIds
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/sys/api/queryUserIdsByDeptIds")
|
@GetMapping("/queryUserIdsByDeptIds")
|
||||||
public List<String> queryUserIdsByDeptIds(@RequestParam("deptIds") List<String> deptIds){
|
public List<String> queryUserIdsByDeptIds(@RequestParam("deptIds") List<String> deptIds){
|
||||||
return sysBaseApi.queryUserIdsByDeptIds(deptIds);
|
return sysBaseApi.queryUserIdsByDeptIds(deptIds);
|
||||||
}
|
}
|
||||||
|
@ -868,7 +860,7 @@ public class SystemApiController {
|
||||||
* @param deptIds
|
* @param deptIds
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/sys/api/queryUserAccountsByDeptIds")
|
@GetMapping("/queryUserAccountsByDeptIds")
|
||||||
public List<String> queryUserAccountsByDeptIds(@RequestParam("deptIds") List<String> deptIds){
|
public List<String> queryUserAccountsByDeptIds(@RequestParam("deptIds") List<String> deptIds){
|
||||||
return sysBaseApi.queryUserAccountsByDeptIds(deptIds);
|
return sysBaseApi.queryUserAccountsByDeptIds(deptIds);
|
||||||
}
|
}
|
||||||
|
@ -878,7 +870,7 @@ public class SystemApiController {
|
||||||
* @param roleCodes
|
* @param roleCodes
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/sys/api/queryUserIdsByRoleds")
|
@GetMapping("/queryUserIdsByRoleds")
|
||||||
public List<String> queryUserIdsByRoleds(@RequestParam("roleCodes") List<String> roleCodes){
|
public List<String> queryUserIdsByRoleds(@RequestParam("roleCodes") List<String> roleCodes){
|
||||||
return sysBaseApi.queryUserIdsByRoleds(roleCodes);
|
return sysBaseApi.queryUserIdsByRoleds(roleCodes);
|
||||||
}
|
}
|
||||||
|
@ -888,7 +880,7 @@ public class SystemApiController {
|
||||||
* @param positionIds
|
* @param positionIds
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/sys/api/queryUserIdsByPositionIds")
|
@GetMapping("/queryUserIdsByPositionIds")
|
||||||
public List<String> queryUserIdsByPositionIds(@RequestParam("positionIds") List<String> positionIds){
|
public List<String> queryUserIdsByPositionIds(@RequestParam("positionIds") List<String> positionIds){
|
||||||
return sysBaseApi.queryUserIdsByPositionIds(positionIds);
|
return sysBaseApi.queryUserIdsByPositionIds(positionIds);
|
||||||
}
|
}
|
||||||
|
@ -900,7 +892,7 @@ public class SystemApiController {
|
||||||
* @param orgCode 部门编码
|
* @param orgCode 部门编码
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/sys/api/getUserAccountsByDepCode")
|
@GetMapping("/getUserAccountsByDepCode")
|
||||||
public List<String> getUserAccountsByDepCode(String orgCode){
|
public List<String> getUserAccountsByDepCode(String orgCode){
|
||||||
return sysBaseApi.getUserAccountsByDepCode(orgCode);
|
return sysBaseApi.getUserAccountsByDepCode(orgCode);
|
||||||
}
|
}
|
||||||
|
@ -911,7 +903,7 @@ public class SystemApiController {
|
||||||
* @param selectSql
|
* @param selectSql
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/sys/api/dictTableWhiteListCheckBySql")
|
@GetMapping("/dictTableWhiteListCheckBySql")
|
||||||
public boolean dictTableWhiteListCheckBySql(@RequestParam("selectSql") String selectSql) {
|
public boolean dictTableWhiteListCheckBySql(@RequestParam("selectSql") String selectSql) {
|
||||||
return sysBaseApi.dictTableWhiteListCheckBySql(selectSql);
|
return sysBaseApi.dictTableWhiteListCheckBySql(selectSql);
|
||||||
}
|
}
|
||||||
|
@ -923,10 +915,10 @@ public class SystemApiController {
|
||||||
* @param fields 如果传的是dictCode,则该参数必须传null
|
* @param fields 如果传的是dictCode,则该参数必须传null
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/sys/api/dictTableWhiteListCheckByDict")
|
@GetMapping("/dictTableWhiteListCheckByDict")
|
||||||
public boolean dictTableWhiteListCheckByDict(
|
public boolean dictTableWhiteListCheckByDict(
|
||||||
@RequestParam("tableOrDictCode") String tableOrDictCode,
|
@RequestParam("tableOrDictCode") String tableOrDictCode,
|
||||||
@RequestParam(value = "fields", required = false) String[] fields
|
@RequestParam(value = "fields", required = false) String... fields
|
||||||
) {
|
) {
|
||||||
return sysBaseApi.dictTableWhiteListCheckByDict(tableOrDictCode, fields);
|
return sysBaseApi.dictTableWhiteListCheckByDict(tableOrDictCode, fields);
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ public class LoginController {
|
||||||
|
|
||||||
@ApiOperation("登录接口")
|
@ApiOperation("登录接口")
|
||||||
@RequestMapping(value = "/login", method = RequestMethod.POST)
|
@RequestMapping(value = "/login", method = RequestMethod.POST)
|
||||||
public Result<JSONObject> login(@RequestBody SysLoginModel sysLoginModel){
|
public Result<JSONObject> login(@RequestBody SysLoginModel sysLoginModel, HttpServletRequest request){
|
||||||
Result<JSONObject> result = new Result<JSONObject>();
|
Result<JSONObject> result = new Result<JSONObject>();
|
||||||
String username = sysLoginModel.getUsername();
|
String username = sysLoginModel.getUsername();
|
||||||
String password = sysLoginModel.getPassword();
|
String password = sysLoginModel.getPassword();
|
||||||
|
@ -132,7 +132,7 @@ public class LoginController {
|
||||||
}
|
}
|
||||||
|
|
||||||
//用户登录信息
|
//用户登录信息
|
||||||
userInfo(sysUser, result);
|
userInfo(sysUser, result, request);
|
||||||
//update-begin--Author:liusq Date:20210126 for:登录成功,删除redis中的验证码
|
//update-begin--Author:liusq Date:20210126 for:登录成功,删除redis中的验证码
|
||||||
redisUtil.del(realKey);
|
redisUtil.del(realKey);
|
||||||
//update-begin--Author:liusq Date:20210126 for:登录成功,删除redis中的验证码
|
//update-begin--Author:liusq Date:20210126 for:登录成功,删除redis中的验证码
|
||||||
|
@ -158,10 +158,10 @@ public class LoginController {
|
||||||
JSONObject obj=new JSONObject();
|
JSONObject obj=new JSONObject();
|
||||||
|
|
||||||
//update-begin---author:scott ---date:2022-06-20 for:vue3前端,支持自定义首页-----------
|
//update-begin---author:scott ---date:2022-06-20 for:vue3前端,支持自定义首页-----------
|
||||||
String version = request.getHeader(CommonConstant.VERSION);
|
String vue3Version = request.getHeader(CommonConstant.VERSION);
|
||||||
//update-begin---author:liusq ---date:2022-06-29 for:接口返回值修改,同步修改这里的判断逻辑-----------
|
//update-begin---author:liusq ---date:2022-06-29 for:接口返回值修改,同步修改这里的判断逻辑-----------
|
||||||
SysRoleIndex roleIndex = sysUserService.getDynamicIndexByUserRole(username, version);
|
SysRoleIndex roleIndex = sysUserService.getDynamicIndexByUserRole(username, vue3Version);
|
||||||
if (oConvertUtils.isNotEmpty(version) && roleIndex != null && oConvertUtils.isNotEmpty(roleIndex.getUrl())) {
|
if (oConvertUtils.isNotEmpty(vue3Version) && roleIndex != null && oConvertUtils.isNotEmpty(roleIndex.getUrl())) {
|
||||||
String homePath = roleIndex.getUrl();
|
String homePath = roleIndex.getUrl();
|
||||||
if (!homePath.startsWith(SymbolConstant.SINGLE_SLASH)) {
|
if (!homePath.startsWith(SymbolConstant.SINGLE_SLASH)) {
|
||||||
homePath = SymbolConstant.SINGLE_SLASH + homePath;
|
homePath = SymbolConstant.SINGLE_SLASH + homePath;
|
||||||
|
@ -173,6 +173,7 @@ public class LoginController {
|
||||||
|
|
||||||
obj.put("userInfo",sysUser);
|
obj.put("userInfo",sysUser);
|
||||||
obj.put("sysAllDictItems", sysDictService.queryAllDictItems());
|
obj.put("sysAllDictItems", sysDictService.queryAllDictItems());
|
||||||
|
|
||||||
result.setResult(obj);
|
result.setResult(obj);
|
||||||
result.success("");
|
result.success("");
|
||||||
}
|
}
|
||||||
|
@ -397,7 +398,7 @@ public class LoginController {
|
||||||
*/
|
*/
|
||||||
@ApiOperation("手机号登录接口")
|
@ApiOperation("手机号登录接口")
|
||||||
@PostMapping("/phoneLogin")
|
@PostMapping("/phoneLogin")
|
||||||
public Result<JSONObject> phoneLogin(@RequestBody JSONObject jsonObject) {
|
public Result<JSONObject> phoneLogin(@RequestBody JSONObject jsonObject, HttpServletRequest request) {
|
||||||
Result<JSONObject> result = new Result<JSONObject>();
|
Result<JSONObject> result = new Result<JSONObject>();
|
||||||
String phone = jsonObject.getString("mobile");
|
String phone = jsonObject.getString("mobile");
|
||||||
//update-begin-author:taoyan date:2022-11-7 for: issues/4109 平台用户登录失败锁定用户
|
//update-begin-author:taoyan date:2022-11-7 for: issues/4109 平台用户登录失败锁定用户
|
||||||
|
@ -427,7 +428,7 @@ public class LoginController {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
//用户信息
|
//用户信息
|
||||||
userInfo(sysUser, result);
|
userInfo(sysUser, result, request);
|
||||||
//添加日志
|
//添加日志
|
||||||
baseCommonService.addLog("用户名: " + sysUser.getUsername() + ",登录成功!", CommonConstant.LOG_TYPE_1, null);
|
baseCommonService.addLog("用户名: " + sysUser.getUsername() + ",登录成功!", CommonConstant.LOG_TYPE_1, null);
|
||||||
|
|
||||||
|
@ -442,7 +443,7 @@ public class LoginController {
|
||||||
* @param result
|
* @param result
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private Result<JSONObject> userInfo(SysUser sysUser, Result<JSONObject> result) {
|
private Result<JSONObject> userInfo(SysUser sysUser, Result<JSONObject> result, HttpServletRequest request) {
|
||||||
String username = sysUser.getUsername();
|
String username = sysUser.getUsername();
|
||||||
String syspassword = sysUser.getPassword();
|
String syspassword = sysUser.getPassword();
|
||||||
// 获取用户部门信息
|
// 获取用户部门信息
|
||||||
|
@ -482,7 +483,15 @@ public class LoginController {
|
||||||
// update-end--Author:wangshuai Date:20200805 for:如果用戶为选择部门,数据库为存在上一次登录部门,则取一条存进去
|
// update-end--Author:wangshuai Date:20200805 for:如果用戶为选择部门,数据库为存在上一次登录部门,则取一条存进去
|
||||||
obj.put("multi_depart", 2);
|
obj.put("multi_depart", 2);
|
||||||
}
|
}
|
||||||
obj.put("sysAllDictItems", sysDictService.queryAllDictItems());
|
|
||||||
|
//update-begin---author:scott ---date:2024-01-05 for:【QQYUN-7802】前端在登录时加载了两次数据字典,建议优化下,避免数据字典太多时可能产生的性能问题 #956---
|
||||||
|
// login接口,在vue3前端下不加载字典数据,vue2下加载字典
|
||||||
|
String vue3Version = request.getHeader(CommonConstant.VERSION);
|
||||||
|
if(oConvertUtils.isEmpty(vue3Version)){
|
||||||
|
obj.put("sysAllDictItems", sysDictService.queryAllDictItems());
|
||||||
|
}
|
||||||
|
//end-begin---author:scott ---date:2024-01-05 for:【QQYUN-7802】前端在登录时加载了两次数据字典,建议优化下,避免数据字典太多时可能产生的性能问题 #956---
|
||||||
|
|
||||||
result.setResult(obj);
|
result.setResult(obj);
|
||||||
result.success("登录成功");
|
result.success("登录成功");
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -1428,7 +1428,7 @@ public class SysUserController {
|
||||||
//------------------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------------------
|
||||||
//是否开启系统管理模块的多租户数据隔离【SAAS多租户模式】
|
//是否开启系统管理模块的多租户数据隔离【SAAS多租户模式】
|
||||||
if (MybatisPlusSaasConfig.OPEN_SYSTEM_TENANT_CONTROL) {
|
if (MybatisPlusSaasConfig.OPEN_SYSTEM_TENANT_CONTROL) {
|
||||||
String tenantId = TokenUtils.getTenantIdByRequest(request);
|
String tenantId = oConvertUtils.getString(TokenUtils.getTenantIdByRequest(request),"-1");
|
||||||
//update-begin---author:wangshuai ---date:20221223 for:[QQYUN-3371]租户逻辑改造,改成关系表------------
|
//update-begin---author:wangshuai ---date:20221223 for:[QQYUN-3371]租户逻辑改造,改成关系表------------
|
||||||
List<String> userIds = userTenantService.getUserIdsByTenantId(Integer.valueOf(tenantId));
|
List<String> userIds = userTenantService.getUserIdsByTenantId(Integer.valueOf(tenantId));
|
||||||
if (oConvertUtils.listIsNotEmpty(userIds)) {
|
if (oConvertUtils.listIsNotEmpty(userIds)) {
|
||||||
|
|
|
@ -14,6 +14,7 @@ import org.jeecg.common.constant.SymbolConstant;
|
||||||
import org.jeecg.common.constant.enums.MessageTypeEnum;
|
import org.jeecg.common.constant.enums.MessageTypeEnum;
|
||||||
import org.jeecg.common.system.util.JwtUtil;
|
import org.jeecg.common.system.util.JwtUtil;
|
||||||
import org.jeecg.common.system.vo.LoginUser;
|
import org.jeecg.common.system.vo.LoginUser;
|
||||||
|
import org.jeecg.common.util.TokenUtils;
|
||||||
import org.jeecg.common.util.oConvertUtils;
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
import org.jeecg.config.mybatis.MybatisPlusSaasConfig;
|
import org.jeecg.config.mybatis.MybatisPlusSaasConfig;
|
||||||
import org.jeecg.modules.system.entity.SysThirdAccount;
|
import org.jeecg.modules.system.entity.SysThirdAccount;
|
||||||
|
@ -22,6 +23,8 @@ import org.jeecg.modules.system.service.ISysThirdAccountService;
|
||||||
import org.jeecg.modules.system.service.ISysThirdAppConfigService;
|
import org.jeecg.modules.system.service.ISysThirdAppConfigService;
|
||||||
import org.jeecg.modules.system.service.impl.ThirdAppDingtalkServiceImpl;
|
import org.jeecg.modules.system.service.impl.ThirdAppDingtalkServiceImpl;
|
||||||
import org.jeecg.modules.system.service.impl.ThirdAppWechatEnterpriseServiceImpl;
|
import org.jeecg.modules.system.service.impl.ThirdAppWechatEnterpriseServiceImpl;
|
||||||
|
import org.jeecg.modules.system.vo.thirdapp.JwSysUserDepartVo;
|
||||||
|
import org.jeecg.modules.system.vo.thirdapp.JwUserDepartVo;
|
||||||
import org.jeecg.modules.system.vo.thirdapp.SyncInfoVo;
|
import org.jeecg.modules.system.vo.thirdapp.SyncInfoVo;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
@ -518,4 +521,46 @@ public class ThirdAppController {
|
||||||
return Result.ok("解绑成功");
|
return Result.ok("解绑成功");
|
||||||
}
|
}
|
||||||
//========================end 应用低代码账号设置第三方账号绑定 ================================
|
//========================end 应用低代码账号设置第三方账号绑定 ================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取企业微信绑定的用户信息
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/getThirdUserByWechat")
|
||||||
|
public Result<JwSysUserDepartVo> getThirdUserByWechat(HttpServletRequest request){
|
||||||
|
//获取企业微信配置
|
||||||
|
Integer tenantId = oConvertUtils.getInt(TokenUtils.getTenantIdByRequest(request),0);
|
||||||
|
SysThirdAppConfig config = appConfigService.getThirdConfigByThirdType(tenantId, MessageTypeEnum.QYWX.getType());
|
||||||
|
if (null != config) {
|
||||||
|
JwSysUserDepartVo list = wechatEnterpriseService.getThirdUserByWechat(tenantId);
|
||||||
|
return Result.ok(list);
|
||||||
|
}
|
||||||
|
return Result.error("企业微信尚未配置,请配置企业微信");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同步企业微信部门和用户到本地
|
||||||
|
* @param jwUserDepartJson
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/sync/wechatEnterprise/departAndUser/toLocal")
|
||||||
|
public Result<SyncInfoVo> syncWechatEnterpriseDepartAndUserToLocal(@RequestParam(name = "jwUserDepartJson") String jwUserDepartJson,HttpServletRequest request){
|
||||||
|
int tenantId = oConvertUtils.getInt(TokenUtils.getTenantIdByRequest(request), 0);
|
||||||
|
SyncInfoVo syncInfoVo = wechatEnterpriseService.syncWechatEnterpriseDepartAndUserToLocal(jwUserDepartJson,tenantId);
|
||||||
|
return Result.ok(syncInfoVo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询被绑定的企业微信用户
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/getThirdUserBindByWechat")
|
||||||
|
public Result<List<JwUserDepartVo>> getThirdUserBindByWechat(HttpServletRequest request){
|
||||||
|
int tenantId = oConvertUtils.getInt(TokenUtils.getTenantIdByRequest(request), 0);
|
||||||
|
List<JwUserDepartVo> jwSysUserDepartVos = wechatEnterpriseService.getThirdUserBindByWechat(tenantId);
|
||||||
|
return Result.ok(jwSysUserDepartVos);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -268,6 +268,7 @@ cas:
|
||||||
#Mybatis输出sql日志
|
#Mybatis输出sql日志
|
||||||
logging:
|
logging:
|
||||||
level:
|
level:
|
||||||
|
org.flywaydb: debug
|
||||||
org.jeecg.modules.system.mapper: info
|
org.jeecg.modules.system.mapper: info
|
||||||
#swagger
|
#swagger
|
||||||
knife4j:
|
knife4j:
|
||||||
|
|
|
@ -23,7 +23,7 @@ spring:
|
||||||
# flyway配置
|
# flyway配置
|
||||||
flyway:
|
flyway:
|
||||||
# 是否启用flyway
|
# 是否启用flyway
|
||||||
enabled: true
|
enabled: false
|
||||||
# 编码格式,默认UTF-8
|
# 编码格式,默认UTF-8
|
||||||
encoding: UTF-8
|
encoding: UTF-8
|
||||||
# 迁移sql脚本文件存放路径,官方默认db/migration
|
# 迁移sql脚本文件存放路径,官方默认db/migration
|
||||||
|
@ -134,7 +134,7 @@ spring:
|
||||||
# 初始化大小,最小,最大
|
# 初始化大小,最小,最大
|
||||||
initial-size: 5
|
initial-size: 5
|
||||||
min-idle: 5
|
min-idle: 5
|
||||||
maxActive: 20
|
maxActive: 1000
|
||||||
# 配置获取连接等待超时的时间
|
# 配置获取连接等待超时的时间
|
||||||
maxWait: 60000
|
maxWait: 60000
|
||||||
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
# 命名规范
|
||||||
|
V[年月日]_[序号]__[模块名缩写]_[操作类型]_[业务描述].sql
|
||||||
|
例如:
|
||||||
|
V20240104_1__easyoa_add_field_attendance.sql
|
Loading…
Reference in New Issue