同步框架更新
This commit is contained in:
@ -243,10 +243,10 @@ public class LoginServiceImpl implements ILoginService {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 判断用户名和密码是否正确,有2中情况,1:账号密码登录,2:互信token登录,
|
||||
* 方式1是传入的未加密的密码,方式2传入的是通过md5已加密的密码,所以通过判断密码的长度来判断是否已加密
|
||||
* */
|
||||
/**
|
||||
* 判断用户名和密码是否正确,有2中情况,1:账号密码登录,2:互信token登录,
|
||||
* 方式1是传入的未加密的密码,方式2传入的是通过md5已加密的密码,所以通过判断密码的长度来判断是否已加密
|
||||
* */
|
||||
public boolean checkPassword(User loginUser,LoginDto dto)
|
||||
{
|
||||
//如果长度是32,即传入的是密文
|
||||
@ -254,7 +254,7 @@ public class LoginServiceImpl implements ILoginService {
|
||||
return (loginUser == null || !StrUtil.equals(loginUser.getPassword(), dto.getPassword()));
|
||||
}
|
||||
else {
|
||||
return (loginUser == null || !StrUtil.equals(loginUser.getPassword(), SaSecureUtil.md5BySalt(dto.getPassword(), GlobalConstant.SECRET_KEY)));
|
||||
return (loginUser == null || !StrUtil.equals(loginUser.getPassword(), SaSecureUtil.md5BySalt(dto.getPassword(), GlobalConstant.SECRET_KEY)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -204,7 +204,11 @@ public class SsoServiceImpl implements SsoService {
|
||||
|
||||
@Override
|
||||
public String auth(String ltpasToken){
|
||||
|
||||
String loginid = this.decodeToken(ltpasToken);
|
||||
if(openLoginLog){
|
||||
log.info("秘钥 {} 解码后的用户名是:{}",ltpasToken,loginid);
|
||||
}
|
||||
if(StringUtils.isNotBlank(loginid)){
|
||||
return loginid;
|
||||
}
|
||||
@ -377,6 +381,9 @@ public class SsoServiceImpl implements SsoService {
|
||||
}
|
||||
|
||||
private String decodeToken(String ltpasToken) {
|
||||
if(openLoginLog){
|
||||
log.info("登录秘钥是:{} ",ltpasToken);
|
||||
}
|
||||
if (StringUtils.isEmpty(ltpasToken)) {
|
||||
return null;
|
||||
}
|
||||
@ -392,6 +399,11 @@ public class SsoServiceImpl implements SsoService {
|
||||
}
|
||||
Long begin = Long.parseLong(ltpasTokenInfo[1]);
|
||||
Long end = Long.parseLong(ltpasTokenInfo[2]);
|
||||
|
||||
if(openLoginLog){
|
||||
log.info("互信秘钥解密过程参数:now:{},ltpasTokenDecode:{},secretKey:{}",now,ltpasTokenDecode,secretKey);
|
||||
}
|
||||
|
||||
if(now >= begin && now <= end) {
|
||||
return eIN;
|
||||
}
|
||||
|
||||
@ -36,6 +36,7 @@ public class R extends HashMap<String, Object> {
|
||||
public static R error(int code, String msg) {
|
||||
R r = new R();
|
||||
r.put("code", code);
|
||||
r.put("retcode", -1);
|
||||
r.put("msg", msg);
|
||||
r.put("data",null);
|
||||
return r;
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
package com.xjrsoft.form.client;
|
||||
|
||||
import com.xjrsoft.common.core.constant.GlobalConstant;
|
||||
import com.xjrsoft.desktop.dto.AddDeskComplexDto;
|
||||
import com.xjrsoft.form.entity.FormRelease;
|
||||
import com.xjrsoft.form.fallback.FormExecuteClientFallBack;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: zn
|
||||
* @Date: 2025/02/13 16:19
|
||||
*/
|
||||
@FeignClient(value = GlobalConstant.CLIENT_FORM_NAME,fallback = FormExecuteClientFallBack.class)
|
||||
public interface IFormReleaseClient {
|
||||
|
||||
/**
|
||||
* 查询单个接口
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(GlobalConstant.CLIENT_API_PRE + GlobalConstant.MODULE_FORM_NAME + "/selectByIdFeign")
|
||||
FormRelease selectByIdFeign(@RequestParam("id")Long id);
|
||||
|
||||
/**
|
||||
* 查询单条数据
|
||||
* @param formRelease
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(GlobalConstant.CLIENT_API_PRE + GlobalConstant.MODULE_FORM_NAME + "/selectByFormReleaseFeign")
|
||||
FormRelease selectByFormReleaseFeign(FormRelease formRelease);
|
||||
|
||||
/**
|
||||
* 查询List
|
||||
* @param formRelease
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(GlobalConstant.CLIENT_API_PRE + GlobalConstant.MODULE_FORM_NAME + "/selectListFeign")
|
||||
List<FormRelease> selectListFeign(FormRelease formRelease);
|
||||
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package com.xjrsoft.form.fallback;
|
||||
|
||||
import com.xjrsoft.form.client.IFormReleaseClient;
|
||||
import com.xjrsoft.form.entity.FormRelease;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: zn
|
||||
* @Date: 2025/02/13 9:35
|
||||
*/
|
||||
@Component
|
||||
public class IFormReleaseClientFallBack implements IFormReleaseClient {
|
||||
@Override
|
||||
public FormRelease selectByIdFeign(Long id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FormRelease selectByFormReleaseFeign(FormRelease formRelease) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FormRelease> selectListFeign(FormRelease formRelease) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@ -44,16 +44,20 @@
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>com.xjrsoft</groupId>
|
||||
<artifactId>xjrsoft-common-generate</artifactId>
|
||||
<version>${xjrsoft.framework.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>com.xjrsoft</groupId>
|
||||
<artifactId>xjrsoft-common-mybatis</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
<version>${xjrsoft.framework.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@ -6,6 +6,7 @@ import com.xjrsoft.organization.fallback.DepartmentClientFallBack;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
@ -56,6 +57,7 @@ public interface IDepartmentClient {
|
||||
/**
|
||||
* 获取root部门
|
||||
*/
|
||||
@GetMapping(GlobalConstant.CLIENT_API_PRE + GlobalConstant.MODULE_ORGANIZATION_NAME + "/queryPathFromRootFeign")
|
||||
List<Department> queryPathFromRoot(List<Department> list);
|
||||
@PostMapping(value = GlobalConstant.CLIENT_API_PRE + GlobalConstant.MODULE_ORGANIZATION_NAME + "/queryPathFromRootFeign")
|
||||
List<Department> queryPathFromRoot(@RequestBody List<Department> list);
|
||||
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.xjrsoft.organization.fallback;
|
||||
import com.xjrsoft.organization.client.IDepartmentClient;
|
||||
import com.xjrsoft.organization.entity.Department;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -33,8 +34,7 @@ public class DepartmentClientFallBack implements IDepartmentClient {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Department> queryPathFromRoot(List<Department> list) {
|
||||
public List<Department> queryPathFromRoot(@RequestBody List<Department> list) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,12 +1,16 @@
|
||||
package com.xjrsoft.system.client;
|
||||
|
||||
import com.xjrsoft.common.core.constant.GlobalConstant;
|
||||
import com.xjrsoft.system.entity.Message;
|
||||
import com.xjrsoft.system.fallback.MessageClientFallBack;
|
||||
import com.xjrsoft.system.model.MessageNoticePolicyParam;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: tzx
|
||||
* @Date: 2023/10/18 15:09
|
||||
@ -56,4 +60,12 @@ public interface IMessageClient {
|
||||
@PostMapping(GlobalConstant.CLIENT_API_PRE + GlobalConstant.MODULE_SYSTEM_NAME + "/sendWorkflowTimeoutDingtalkFeign")
|
||||
void sendWorkflowTimeoutDingtalkFeign(@RequestBody MessageNoticePolicyParam param);
|
||||
|
||||
/**
|
||||
* 获取消息列表
|
||||
* @param message
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(GlobalConstant.CLIENT_API_PRE + GlobalConstant.MODULE_SYSTEM_NAME + "/selectListFeign")
|
||||
List<Message> selectListFeign(Message message);
|
||||
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ import com.xjrsoft.system.entity.XjrSystemConfig;
|
||||
import com.xjrsoft.system.fallback.SystemConfigClientFallBack;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
/**
|
||||
* @author yjw
|
||||
@ -19,5 +20,5 @@ public interface ISystemConfigClient {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(GlobalConstant.CLIENT_API_PRE + GlobalConstant.MODULE_SYSTEM_NAME + "/queryByCode")
|
||||
XjrSystemConfig queryByCode(String code);
|
||||
XjrSystemConfig queryByCode(@RequestParam("code") String code);
|
||||
}
|
||||
|
||||
@ -1,9 +1,12 @@
|
||||
package com.xjrsoft.system.fallback;
|
||||
|
||||
import com.xjrsoft.system.client.IMessageClient;
|
||||
import com.xjrsoft.system.entity.Message;
|
||||
import com.xjrsoft.system.model.MessageNoticePolicyParam;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: tzx
|
||||
* @Date: 2023/10/18 15:13
|
||||
@ -60,4 +63,10 @@ public class MessageClientFallBack implements IMessageClient {
|
||||
public void sendWorkflowTimeoutDingtalkFeign(MessageNoticePolicyParam param) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Message> selectListFeign(Message message) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.xjrsoft.system.fallback;
|
||||
|
||||
import com.xjrsoft.system.client.ISystemConfigClient;
|
||||
import com.xjrsoft.system.entity.XjrSystemConfig;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
/**
|
||||
* @author yjw
|
||||
@ -9,7 +10,7 @@ import com.xjrsoft.system.entity.XjrSystemConfig;
|
||||
*/
|
||||
public class SystemConfigClientFallBack implements ISystemConfigClient {
|
||||
@Override
|
||||
public XjrSystemConfig queryByCode(String code) {
|
||||
public XjrSystemConfig queryByCode(@RequestParam("code")String code) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -50,12 +50,14 @@
|
||||
<artifactId>xjrsoft-service-magicapi-api</artifactId>
|
||||
<version>${xjrsoft.framework.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.xjrsoft</groupId>
|
||||
<artifactId>xjrsoft-service-generate-api</artifactId>
|
||||
<version>${xjrsoft.framework.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>com.xjrsoft</groupId>
|
||||
<artifactId>xjrsoft-service-app-api</artifactId>
|
||||
|
||||
@ -0,0 +1,68 @@
|
||||
package com.xjrsoft.form.client;
|
||||
|
||||
import com.github.yulichang.toolkit.MPJWrappers;
|
||||
import com.xjrsoft.common.core.constant.GlobalConstant;
|
||||
import com.xjrsoft.form.entity.FormRelease;
|
||||
import com.xjrsoft.form.service.IFormReleaseService;
|
||||
import io.swagger.v3.oas.annotations.Hidden;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: zn
|
||||
* @Date: 2025/02/13 16:19
|
||||
*/
|
||||
@Hidden
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
public class FormReleaseClient implements IFormReleaseClient{
|
||||
|
||||
private final IFormReleaseService formReleaseService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询单个接口
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@GetMapping(GlobalConstant.CLIENT_API_PRE + GlobalConstant.MODULE_FORM_NAME + "/selectByIdFeign")
|
||||
public FormRelease selectByIdFeign(Long id) {
|
||||
return formReleaseService.getById(id);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询单条数据
|
||||
* @param formRelease
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@GetMapping(GlobalConstant.CLIENT_API_PRE + GlobalConstant.MODULE_FORM_NAME + "/selectByFormReleaseFeign")
|
||||
public FormRelease selectByFormReleaseFeign(FormRelease formRelease) {
|
||||
FormRelease release = formReleaseService.getOne(MPJWrappers.<FormRelease>lambdaJoin()
|
||||
.eq(ObjectUtils.isNotEmpty(formRelease.getFormId()), FormRelease::getFormId, formRelease.getFormId())
|
||||
.orderByDesc(FormRelease::getCreateDate));
|
||||
return release;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询List
|
||||
* @param formRelease
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@GetMapping(GlobalConstant.CLIENT_API_PRE + GlobalConstant.MODULE_FORM_NAME + "/selectListFeign")
|
||||
public List<FormRelease> selectListFeign(FormRelease formRelease) {
|
||||
List<FormRelease> releaseList = formReleaseService.list(MPJWrappers.<FormRelease>lambdaJoin()
|
||||
.eq(ObjectUtils.isNotEmpty(formRelease.getFormId()), FormRelease::getFormId, formRelease.getFormId())
|
||||
.orderByDesc(FormRelease::getCreateDate));
|
||||
return releaseList;
|
||||
}
|
||||
|
||||
}
|
||||
@ -59,7 +59,6 @@ import com.xjrsoft.generate.utils.GeneratorUtil;
|
||||
import com.xjrsoft.system.client.ICodeRuleClient;
|
||||
import com.xjrsoft.system.entity.Menu;
|
||||
import com.xjrsoft.tenant.config.TenantConfig;
|
||||
import com.xjrsoft.tenant.util.SecureUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.SneakyThrows;
|
||||
import net.sf.jsqlparser.expression.*;
|
||||
@ -1814,6 +1813,7 @@ public class FormExecuteServiceImpl implements IFormExecuteService {
|
||||
queryExpression = new AndExpression(queryExpression, dataAuthExpression);
|
||||
}
|
||||
}
|
||||
|
||||
plainSelect.setWhere(queryExpression);
|
||||
Db use = Db.use(datasource);
|
||||
use.setRunner(new XjrSqlConnRunner(DialectFactory.getDialect(datasource)));
|
||||
|
||||
@ -6,8 +6,6 @@ import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.db.Db;
|
||||
import cn.hutool.db.DbUtil;
|
||||
import cn.hutool.db.meta.MetaUtil;
|
||||
import cn.hutool.json.JSONConfig;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.baomidou.mybatisplus.annotation.DbType;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
package com.xjrsoft.magicapi.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.xjrsoft.magicapi.service.IInterfaceAuthService;
|
||||
import com.xjrsoft.system.entity.InterfaceAuth;
|
||||
import com.xjrsoft.system.mapper.InterfaceAuthMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 接口权限表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zlf
|
||||
* @since 2022-11-03
|
||||
*/
|
||||
@Service
|
||||
public class InterfaceAuthServiceImpl extends ServiceImpl<InterfaceAuthMapper, InterfaceAuth> implements IInterfaceAuthService {
|
||||
|
||||
@Override
|
||||
public List<String> loadAuthInterfaceIdsOfUser(Long userId) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -52,11 +52,13 @@
|
||||
<groupId>com.cloud.govern</groupId>
|
||||
<artifactId>service-invoke-sdk</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.xjrsoft</groupId>
|
||||
<artifactId>xjrsoft-service-system-api</artifactId>
|
||||
<version>${xjrsoft.framework.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.xjrsoft.organization.client;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.xjrsoft.common.core.constant.GlobalConstant;
|
||||
import com.xjrsoft.common.redis.service.RedisUtil;
|
||||
import com.xjrsoft.organization.entity.Department;
|
||||
@ -65,8 +66,8 @@ public class DepartmentClient implements IDepartmentClient {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Department> queryPathFromRoot(List<Department> list) {
|
||||
@PostMapping(value = GlobalConstant.CLIENT_API_PRE + GlobalConstant.MODULE_ORGANIZATION_NAME + "/queryPathFromRootFeign")
|
||||
public List<Department> queryPathFromRoot(@RequestBody List<Department> list) {
|
||||
return departmentService.queryPathFromRoot(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -123,9 +123,9 @@ public class UserController {
|
||||
SaSession tokenSession = StpUtil.getTokenSession();
|
||||
User user = tokenSession.get(GlobalConstant.LOGIN_USER_INFO_KEY, new User());
|
||||
UserInfoVo currentInfo = userService.getCurrentInfo(user);
|
||||
// currentInfo.setTenantId(SecureUtil.getCurrentTenantId());
|
||||
// currentInfo.setTenantCode(SecureUtil.getCurrentTenantCode());
|
||||
// currentInfo.setTenantName(SecureUtil.getCurrentTenantName());
|
||||
/*currentInfo.setTenantId(SecureUtil.getCurrentTenantId());
|
||||
currentInfo.setTenantCode(SecureUtil.getCurrentTenantCode());
|
||||
currentInfo.setTenantName(SecureUtil.getCurrentTenantName());*/
|
||||
return R.ok(currentInfo);
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,145 @@
|
||||
<?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.xjrsoft.module.organization.mapper.UserMapper">
|
||||
|
||||
<resultMap id="userVoResultMap" type="com.xjrsoft.module.organization.vo.UserVo">
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="user_name" jdbcType="VARCHAR" property="enCode" />
|
||||
<result column="name" jdbcType="VARCHAR" property="account" />
|
||||
<result column="code" jdbcType="VARCHAR" property="password" />
|
||||
<result column="nick_name" jdbcType="VARCHAR" property="secretkey" />
|
||||
<result column="password" jdbcType="VARCHAR" property="realName" />
|
||||
<result column="gender" jdbcType="VARCHAR" property="nickName" />
|
||||
<result column="mobile" jdbcType="VARCHAR" property="headIcon" />
|
||||
<result column="avatar" jdbcType="VARCHAR" property="quickQuery" />
|
||||
<result column="email" jdbcType="VARCHAR" property="simpleSpelling" />
|
||||
<result column="address" jdbcType="INTEGER" property="gender" />
|
||||
<result column="F_Birthday" jdbcType="TIMESTAMP" property="birthday" />
|
||||
<result column="F_Mobile" jdbcType="VARCHAR" property="mobile" />
|
||||
<result column="F_Telephone" jdbcType="VARCHAR" property="telephone" />
|
||||
<result column="F_Email" jdbcType="VARCHAR" property="email" />
|
||||
<result column="F_OICQ" jdbcType="VARCHAR" property="oicq" />
|
||||
<result column="F_WeChat" jdbcType="VARCHAR" property="weChat" />
|
||||
<result column="F_MSN" jdbcType="VARCHAR" property="msn" />
|
||||
<result column="F_CompanyId" jdbcType="VARCHAR" property="companyId" />
|
||||
<result column="F_SecurityLevel" jdbcType="INTEGER" property="securityLevel" />
|
||||
<result column="F_OpenId" jdbcType="INTEGER" property="openId" />
|
||||
<result column="F_Question" jdbcType="VARCHAR" property="question" />
|
||||
<result column="F_AnswerQuestion" jdbcType="VARCHAR" property="answerQuestion" />
|
||||
<result column="F_CheckOnLine" jdbcType="INTEGER" property="checkOnLine" />
|
||||
<result column="F_AllowStartTime" jdbcType="TIMESTAMP" property="allowStartTime" />
|
||||
<result column="F_AllowEndTime" jdbcType="TIMESTAMP" property="allowEndTime" />
|
||||
<result column="F_LockStartDate" jdbcType="TIMESTAMP" property="lockStartDate" />
|
||||
<result column="F_LockEndDate" jdbcType="TIMESTAMP" property="lockEndDate" />
|
||||
<result column="F_SortCode" jdbcType="INTEGER" property="sortCode" />
|
||||
<result column="F_DeleteMark" jdbcType="INTEGER" property="deleteMark" />
|
||||
<result column="F_EnabledMark" jdbcType="INTEGER" property="enabledMark" />
|
||||
<result column="F_Description" jdbcType="VARCHAR" property="description" />
|
||||
<result column="f_titletechpost" jdbcType="VARCHAR" property="titleTechPost" />
|
||||
<!-- <result column="F_CreateDate" jdbcType="TIMESTAMP" property="createDate" />-->
|
||||
<result column="F_CreateUserId" jdbcType="VARCHAR" property="createUserId" />
|
||||
<!-- <result column="F_CreateUserName" jdbcType="VARCHAR" property="createUserName" />-->
|
||||
<!-- <result column="F_ModifyDate" jdbcType="TIMESTAMP" property="modifyDate" />-->
|
||||
<!-- <result column="F_ModifyUserId" jdbcType="VARCHAR" property="modifyUserId" />-->
|
||||
<!-- <result column="F_ModifyUserName" jdbcType="VARCHAR" property="modifyUserName" />-->
|
||||
<result column="F_Token" jdbcType="VARCHAR" property="token" />
|
||||
<collection property="departmentSimpleVoList" column="F_UserId" select="getDepartmentSimpleVo"
|
||||
javaType="ArrayList" ofType="com.xjrsoft.module.base.vo.DepartmentSimpleVo" >
|
||||
</collection>
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
||||
<resultMap id="departmentResultMap" type="com.xjrsoft.module.organization.entity.Department">
|
||||
<id column="F_DepartmentId" jdbcType="VARCHAR" property="id" />
|
||||
<result column="F_CompanyId" jdbcType="VARCHAR" property="name" />
|
||||
<result column="F_ParentId" jdbcType="VARCHAR" property="parentId" />
|
||||
<result column="F_EnCode" jdbcType="VARCHAR" property="code" />
|
||||
<!--<result column="F_FullName" jdbcType="VARCHAR" property="fullName" />
|
||||
<result column="F_ShortName" jdbcType="VARCHAR" property="shortName" />
|
||||
<result column="F_Nature" jdbcType="VARCHAR" property="nature" />
|
||||
<result column="F_Manager" jdbcType="VARCHAR" property="manager" />
|
||||
<result column="F_OuterPhone" jdbcType="VARCHAR" property="outerPhone" />
|
||||
<result column="F_InnerPhone" jdbcType="VARCHAR" property="innerPhone" />
|
||||
<result column="F_Email" jdbcType="VARCHAR" property="email" />
|
||||
<result column="F_Fax" jdbcType="VARCHAR" property="fax" />
|
||||
<result column="F_SortCode" jdbcType="INTEGER" property="sortCode" />
|
||||
<result column="F_DeleteMark" jdbcType="INTEGER" property="deleteMark" />
|
||||
<result column="F_EnabledMark" jdbcType="INTEGER" property="enabledMark" />
|
||||
<result column="F_CreateDate" jdbcType="TIMESTAMP" property="createDate" />
|
||||
<result column="F_CreateUserId" jdbcType="VARCHAR" property="createUserId" />
|
||||
<result column="F_CreateUserName" jdbcType="VARCHAR" property="createUserName" />
|
||||
<result column="F_ModifyDate" jdbcType="TIMESTAMP" property="modifyDate" />
|
||||
<result column="F_ModifyUserId" jdbcType="VARCHAR" property="modifyUserId" />
|
||||
<result column="F_ModifyUserName" jdbcType="VARCHAR" property="modifyUserName" />
|
||||
<result column="F_DingTalkId" jdbcType="VARCHAR" property="dingTalkId" />-->
|
||||
</resultMap>
|
||||
|
||||
|
||||
<resultMap id="roleBaseResultMap" type="com.xjrsoft.module.organization.entity.Role">
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="code" jdbcType="VARCHAR" property="code" />
|
||||
<result column="sort_code" jdbcType="VARCHAR" property="sortCode" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<!--<result column="F_FullName" jdbcType="VARCHAR" property="fullName" />
|
||||
<result column="F_ShortName" jdbcType="VARCHAR" property="shortName" />
|
||||
<result column="F_Nature" jdbcType="VARCHAR" property="nature" />
|
||||
<result column="F_Manager" jdbcType="VARCHAR" property="manager" />
|
||||
<result column="F_OuterPhone" jdbcType="VARCHAR" property="outerPhone" />
|
||||
<result column="F_InnerPhone" jdbcType="VARCHAR" property="innerPhone" />
|
||||
<result column="F_Email" jdbcType="VARCHAR" property="email" />
|
||||
<result column="F_Fax" jdbcType="VARCHAR" property="fax" />
|
||||
<result column="F_SortCode" jdbcType="INTEGER" property="sortCode" />
|
||||
<result column="F_DeleteMark" jdbcType="INTEGER" property="deleteMark" />
|
||||
<result column="F_EnabledMark" jdbcType="INTEGER" property="enabledMark" />
|
||||
<result column="F_CreateDate" jdbcType="TIMESTAMP" property="createDate" />
|
||||
<result column="F_CreateUserId" jdbcType="VARCHAR" property="createUserId" />
|
||||
<result column="F_CreateUserName" jdbcType="VARCHAR" property="createUserName" />
|
||||
<result column="F_ModifyDate" jdbcType="TIMESTAMP" property="modifyDate" />
|
||||
<result column="F_ModifyUserId" jdbcType="VARCHAR" property="modifyUserId" />
|
||||
<result column="F_ModifyUserName" jdbcType="VARCHAR" property="modifyUserName" />
|
||||
<result column="F_DingTalkId" jdbcType="VARCHAR" property="dingTalkId" />-->
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="queryRolesOfUser" resultMap="roleBaseResultMap">
|
||||
select
|
||||
xbr.*
|
||||
from
|
||||
xjr_base_role xbr
|
||||
left join xjr_base_userrelation xbu on
|
||||
xbr.F_RoleId = xbu.F_ObjectId
|
||||
and xbu.F_Category = 1
|
||||
where
|
||||
xbu.F_UserId = #{param1}
|
||||
and xbr.F_DeleteMark = 0
|
||||
and xbr.F_EnabledMark = 1
|
||||
</select>
|
||||
|
||||
<select id="queryDepartmentsOfUser" resultMap="departmentResultMap">
|
||||
select
|
||||
xbd.id,xbd.name,xbd.code,xbd.parent_id
|
||||
from
|
||||
xjr_department xbd
|
||||
left join xjr_user_dept_relation xbu on
|
||||
xbd.id = xbu.dept_id
|
||||
where
|
||||
xbu.user_id = #{param1}
|
||||
and xbd.delete_mark = 0
|
||||
and xbd.enabled_mark = 1
|
||||
order by xbd.sort_code
|
||||
</select>
|
||||
|
||||
<select id="queryWithLogicDel" parameterType="map" resultType="com.xjrsoft.module.organization.entity.User">
|
||||
select *
|
||||
FROM xjr_user
|
||||
WHERE
|
||||
<if test="params.ids != null and params.ids.length>0 ">
|
||||
id in
|
||||
<foreach item="item" collection="params.ids" index="i" open="(" separator="," close=")">
|
||||
#{params.ids[${i}]}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,123 @@
|
||||
<?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.xjrsoft.organization.mapper.DepartmentMapper">
|
||||
<sql id="DEPT_TREE">
|
||||
WITH RECURSIVE DEPT_TREE AS (
|
||||
SELECT id,name,parent_id,code,sort_code,enabled_mark,department_type,equal_dept_id,company_lvl,id as start_id,1 as lvl
|
||||
FROM xjr_department
|
||||
WHERE
|
||||
<if test="params.startIds != null and params.startIds.length>0 ">
|
||||
id in
|
||||
<foreach item="item" collection="params.startIds" index="i" open="(" separator="," close=")">
|
||||
#{params.startIds[${i}]}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="params.startParentIds != null and params.startParentIds.length>0 ">
|
||||
parent_id in
|
||||
<foreach item="item" collection="params.startParentIds" index="i" open="(" separator="," close=")">
|
||||
#{params.startParentIds[${i}]}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="params.startChildIds != null and params.startChildIds.length>0 ">
|
||||
id in (
|
||||
select a.parent_id from xjr_department a where a.id in
|
||||
<foreach item="item" collection="params.startChildIds" index="i" open="(" separator="," close=")">
|
||||
#{params.startChildIds[${i}]}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
UNION ALL
|
||||
SELECT c.id,c.name,c.parent_id,c.code,c.sort_code,c.enabled_mark,c.department_type,c.equal_dept_id,c.company_lvl,t.start_id,t.lvl+1 as lvl
|
||||
FROM xjr_department c
|
||||
inner JOIN DEPT_TREE t ON
|
||||
<if test="params.queryType != null and params.queryType == 'parent'.toString()">
|
||||
c.id = t.parent_id
|
||||
</if>
|
||||
<if test="params.queryType != null and params.queryType == 'children'.toString()">
|
||||
c.parent_id = t.id
|
||||
</if>
|
||||
<if test="params.enabled != null">
|
||||
and c.enabled_mark = #{params.enabled}
|
||||
</if>
|
||||
<if test="params.stopIds != null and params.stopIds.length>0 ">
|
||||
and c.id not in
|
||||
<foreach item="item" collection="params.stopIds" index="i" open="(" separator="," close=")">
|
||||
#{params.stopIds[${i}]}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="params.stopParentIds != null and params.stopParentIds.length>0 ">
|
||||
and t.id not in
|
||||
<foreach item="item" collection="params.stopParentIds" index="i" open="(" separator="," close=")">
|
||||
#{params.stopParentIds[${i}]}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="params.stopDeptTypes != null and params.stopDeptTypes.length>0 ">
|
||||
and c.department_type not in
|
||||
<foreach item="item" collection="params.stopDeptTypes" index="i" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
)
|
||||
</sql>
|
||||
|
||||
<select id="queryDeepOrgs" parameterType="map" resultType="com.xjrsoft.organization.entity.Department">
|
||||
<include refid="DEPT_TREE"/>
|
||||
SELECT * FROM DEPT_TREE
|
||||
<where>
|
||||
<if test="params.includeDeptTypes != null and params.includeDeptTypes.length>0">
|
||||
department_type in
|
||||
<foreach item="item" collection="params.includeDeptTypes" index="i" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="params.excludeDeptTypes != null and params.excludeDeptTypes.length>0">
|
||||
and department_type not in
|
||||
<foreach item="item" collection="params.excludeDeptTypes" index="i" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="queryDeptPath" parameterType="map" resultType="Map">
|
||||
<include refid="DEPT_TREE"/>
|
||||
select start_id as flag,group_concat(
|
||||
<choose>
|
||||
<when test="params.isQueryIdPath != null and params.isQueryIdPath == 'Y'.toString()">id </when>
|
||||
<otherwise>name </otherwise>
|
||||
</choose>
|
||||
order by lvl
|
||||
<choose>
|
||||
<when test="params.isQueryOrderDesc != null and params.isQueryOrderDesc == 'Y'.toString()"/>
|
||||
<otherwise>desc </otherwise>
|
||||
</choose>
|
||||
SEPARATOR
|
||||
<choose>
|
||||
<when test="params.pathSeparator != null">#{params.pathSeparator} </when>
|
||||
<otherwise>'/' </otherwise>
|
||||
</choose>
|
||||
) as path from DEPT_TREE
|
||||
group by start_id
|
||||
</select>
|
||||
|
||||
<!--获取公司通过组织ids-->
|
||||
<select id="queryCompanies" parameterType="map" resultType="com.xjrsoft.organization.entity.Department">
|
||||
<include refid="DEPT_TREE"/>
|
||||
select * from (
|
||||
select row_number() over(partition by start_id order by lvl) as row_number,* from DEPT_TREE where department_type not in(0)
|
||||
) where row_number = 1
|
||||
</select>
|
||||
|
||||
<select id="queryWithLogicDel" parameterType="map" resultType="com.xjrsoft.organization.entity.Department">
|
||||
select *
|
||||
FROM xjr_department
|
||||
WHERE
|
||||
<if test="params.ids != null and params.ids.length>0 ">
|
||||
id in
|
||||
<foreach item="item" collection="params.ids" index="i" open="(" separator="," close=")">
|
||||
#{params.ids[${i}]}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@ -1,6 +1,5 @@
|
||||
package com.xjrsoft.system.client;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.github.yulichang.toolkit.MPJWrappers;
|
||||
@ -11,7 +10,6 @@ import com.xjrsoft.system.mapper.MenuMapper;
|
||||
import com.xjrsoft.system.service.IMenuService;
|
||||
import io.swagger.v3.oas.annotations.Hidden;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -1,14 +1,20 @@
|
||||
package com.xjrsoft.system.client;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.xjrsoft.common.core.constant.GlobalConstant;
|
||||
import com.xjrsoft.system.entity.Message;
|
||||
import com.xjrsoft.system.model.MessageNoticePolicyParam;
|
||||
import com.xjrsoft.system.service.IMessageService;
|
||||
import com.xjrsoft.system.utils.SendMessageUtil;
|
||||
import io.swagger.v3.oas.annotations.Hidden;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: tzx
|
||||
* @Date: 2023/10/18 15:13
|
||||
@ -18,6 +24,8 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@AllArgsConstructor
|
||||
public class MessageClient implements IMessageClient {
|
||||
|
||||
public final IMessageService messageService;
|
||||
|
||||
@Override
|
||||
@PostMapping(GlobalConstant.CLIENT_API_PRE + GlobalConstant.MODULE_SYSTEM_NAME + "/sendWorkflowTimeoutMessageFeign")
|
||||
public void sendWorkflowTimeoutMessageFeign(@RequestBody MessageNoticePolicyParam param) {
|
||||
@ -78,4 +86,11 @@ public class MessageClient implements IMessageClient {
|
||||
public void sendWorkflowTimeoutDingtalkFeign(@RequestBody MessageNoticePolicyParam param) {
|
||||
SendMessageUtil.sendWorkflowTimeoutDingtalk(param);
|
||||
}
|
||||
|
||||
@Override
|
||||
@GetMapping(GlobalConstant.CLIENT_API_PRE + GlobalConstant.MODULE_SYSTEM_NAME + "/selectListFeign")
|
||||
public List<Message> selectListFeign(Message message) {
|
||||
return messageService.selectList(message);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ import com.xjrsoft.system.service.ISystemConfigService;
|
||||
import io.swagger.v3.oas.annotations.Hidden;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
@ -21,7 +22,7 @@ public class SystemConfigClient implements ISystemConfigClient {
|
||||
|
||||
@Override
|
||||
@GetMapping(GlobalConstant.CLIENT_API_PRE + GlobalConstant.MODULE_SYSTEM_NAME + "/queryByCode")
|
||||
public XjrSystemConfig queryByCode(String code) {
|
||||
public XjrSystemConfig queryByCode(@RequestParam("code")String code) {
|
||||
return systemConfigService.queryByCode(code);
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user