代码同步

main
sookdong 2024-12-24 18:38:55 +08:00
parent cc0c0f3578
commit e54c8e1f57
85 changed files with 2050 additions and 279 deletions

View File

@ -45,6 +45,11 @@
<groupId>org.jeecgframework.boot</groupId>
<artifactId>jeecg-boot-common</artifactId>
</dependency>
<!-- 分布式锁依赖 -->
<dependency>
<groupId>org.jeecgframework.boot</groupId>
<artifactId>jeecg-boot-starter-lock</artifactId>
</dependency>
<!--集成springmvc框架并实现自动配置 -->
<dependency>
<groupId>org.springframework.boot</groupId>

View File

@ -16,7 +16,6 @@
package com.baomidou.mybatisplus.core.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;

View File

@ -1,15 +1,17 @@
package org.jeecg.common.api.dto.message;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
/**
*
*
*
* @author: taoyan
* @date: 2022/8/17
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class BusMessageDTO extends MessageDTO implements Serializable {

View File

@ -25,7 +25,7 @@ public class ProvinceCityArea {
public String getText(String code){
this.initAreaList();
if(this.areaList!=null || this.areaList.size()>0){
if(this.areaList != null && !this.areaList.isEmpty()){
List<String> ls = new ArrayList<String>();
getAreaByCode(code,ls);
return String.join("/",ls);
@ -35,7 +35,7 @@ public class ProvinceCityArea {
public String getCode(String text){
this.initAreaList();
if(areaList!=null && areaList.size()>0){
if(areaList != null && !areaList.isEmpty()){
for(int i=areaList.size()-1;i>=0;i--){
//update-begin-author:taoyan date:2022-5-24 for:VUEN-1088 online 导入 省市区导入后 导入数据错乱 北京市/市辖区/西城区-->山西省/晋城市/城区
String areaText = areaList.get(i).getText();

View File

@ -41,7 +41,7 @@ public class PasswordUtil {
/**
* 使,使使. 8
*
*
* @return byte[]
* */
public static byte[] getSalt() throws Exception {
@ -58,7 +58,7 @@ public class PasswordUtil {
/**
* PBE
*
*
* @param password
* 使
* @return Key PBE
@ -84,7 +84,7 @@ public class PasswordUtil {
/**
*
*
*
* @param plaintext
*
* @param password
@ -113,7 +113,7 @@ public class PasswordUtil {
/**
*
*
*
* @param ciphertext
*
* @param password
@ -139,12 +139,12 @@ public class PasswordUtil {
catch (Exception e) {
// TODO: handle exception
}
return new String(passDec);
return passDec == null ? "" : new String(passDec);
}
/**
*
*
*
* @param src
*
* @return
@ -167,7 +167,7 @@ public class PasswordUtil {
/**
*
*
*
* @param hexString
*
* @return
@ -192,4 +192,4 @@ public class PasswordUtil {
}
}
}

View File

@ -25,7 +25,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
*
*
* @Author
*
*/
@ -43,7 +43,7 @@ public class oConvertUtils {
}
return (false);
}
public static boolean isNotEmpty(Object object) {
if (object != null && !"".equals(object) && !object.equals(CommonConstant.STRING_NULL)) {
return (true);
@ -170,7 +170,7 @@ public class oConvertUtils {
return (defval);
}
}
public static Integer getInt(Object object) {
if (isEmpty(object)) {
return null;
@ -214,7 +214,7 @@ public class oConvertUtils {
/*public static String escapeJava(Object s) {
return StringEscapeUtils.escapeJava(getString(s));
}*/
public static String getString(Object object) {
if (isEmpty(object)) {
return "";
@ -271,7 +271,7 @@ public class oConvertUtils {
/**
*
*
*
* @param clazz
*
* @return true
@ -339,7 +339,7 @@ public class oConvertUtils {
/**
* java
*
*
* @param str
* @return
*/
@ -357,7 +357,7 @@ public class oConvertUtils {
/**
*
*
*
* @param child
* @param all
* @return
@ -424,7 +424,7 @@ public class oConvertUtils {
/**
* SETMAP
*
*
* @param str
* @return
*/
@ -438,12 +438,12 @@ public class oConvertUtils {
}
public static boolean isInnerIp(String ipAddress) {
/*public static boolean isInnerIp(String ipAddress) {
boolean isInnerIp = false;
long ipNum = getIpNum(ipAddress);
/**
*//**
* IPA 10.0.0.0-10.255.255.255 B 172.16.0.0-172.31.255.255 C 192.168.0.0-192.168.255.255 127
**/
**//*
long aBegin = getIpNum("10.0.0.0");
long aEnd = getIpNum("10.255.255.255");
long bBegin = getIpNum("172.16.0.0");
@ -453,7 +453,7 @@ public class oConvertUtils {
String localIp = "127.0.0.1";
isInnerIp = isInner(ipNum, aBegin, aEnd) || isInner(ipNum, bBegin, bEnd) || isInner(ipNum, cBegin, cEnd) || localIp.equals(ipAddress);
return isInnerIp;
}
}*/
private static long getIpNum(String ipAddress) {
String[] ip = ipAddress.split("\\.");
@ -469,12 +469,12 @@ public class oConvertUtils {
private static boolean isInner(long userIp, long begin, long end) {
return (userIp >= begin) && (userIp <= end);
}
/**
* 线
* 线</br>
* hello_world->helloWorld
*
*
* @param name
* 线
* @return
@ -511,12 +511,12 @@ public class oConvertUtils {
}
return result.toString();
}
/**
* 线
* 线</br>
* hello_world,test_id->helloWorld,testId
*
*
* @param name
* 线
* @return
@ -534,13 +534,13 @@ public class oConvertUtils {
String result = sf.toString();
return result.substring(0, result.length() - 1);
}
//update-begin--Author:zhoujf Date:20180503 forTASK #2500 【代码生成器】代码生成器开发一通用模板生成功能
/**
* 线()
* 线</br>
* hello_world->HelloWorld
*
*
* @param name
* 线
* @return
@ -569,7 +569,7 @@ public class oConvertUtils {
return result.toString();
}
//update-end--Author:zhoujf Date:20180503 forTASK #2500 【代码生成器】代码生成器开发一通用模板生成功能
/**
* 线
* @param para
@ -578,19 +578,19 @@ public class oConvertUtils {
public static String camelToUnderline(String para){
int length = 3;
if(para.length()<length){
return para.toLowerCase();
return para.toLowerCase();
}
StringBuilder sb=new StringBuilder(para);
//定位
int temp=0;
//从第三个字符开始 避免命名不规范
//从第三个字符开始 避免命名不规范
for(int i=2;i<para.length();i++){
if(Character.isUpperCase(para.charAt(i))){
sb.insert(i+temp, "_");
temp+=1;
}
}
return sb.toString().toLowerCase();
return sb.toString().toLowerCase();
}
/**
@ -606,10 +606,10 @@ public class oConvertUtils {
}
return sb.toString();
}
/**
*
*
*
* @param object
* @return
*/
@ -624,7 +624,7 @@ public class oConvertUtils {
fieldList.toArray(fields);
return fields;
}
/**
* mapkey
* @param list
@ -634,10 +634,10 @@ public class oConvertUtils {
List<Map<String, Object>> select = new ArrayList<>();
for (Map<String, Object> row : list) {
Map<String, Object> resultMap = new HashMap<>(5);
Set<String> keySet = row.keySet();
for (String key : keySet) {
String newKey = key.toLowerCase();
resultMap.put(newKey, row.get(key));
Set<String> keySet = row.keySet();
for (String key : keySet) {
String newKey = key.toLowerCase();
resultMap.put(newKey, row.get(key));
}
select.add(resultMap);
}
@ -732,7 +732,7 @@ public class oConvertUtils {
}
return obj.getClass().isArray();
}
/**
*
*
@ -782,7 +782,7 @@ public class oConvertUtils {
// Integer b = 1;
// System.out.println(oConvertUtils.isEqual(a, b));
// }
/**
* list
*

View File

@ -0,0 +1,18 @@
package org.jeecg.common.util.store;
import org.jeecg.common.util.store.adapter.FileStoreAdapter;
import org.jeecg.common.util.store.adapter.SimpleFileStoreAdapter;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class FileStoreConfiguration {
@Bean
@ConditionalOnMissingBean
public FileStoreAdapter fileStoreAdapter() {
return new SimpleFileStoreAdapter();
}
}

View File

@ -0,0 +1,43 @@
package org.jeecg.common.util.store.adapter;
import cn.hutool.core.text.StrPool;
import cn.hutool.core.util.StrUtil;
import java.util.Map;
/**
*
*/
public interface FileStoreAdapter {
/**
* key bucketName
*
* @param fpxx
* @param ext .pdf
* @return
*/
String getObjectName(Map<String, Object> fpxx, String ext);
/**
*
*
* @param fpxx
* @param ext .pdf
* @return
*/
String getFileName(Map<String, Object> fpxx, String ext);
/**
*
*
* @param ext
* @return
*/
default String handleFileExtension(String ext) {
if (!StrUtil.startWith(ext, StrPool.DOT)) {
ext = StrPool.DOT + ext;
}
return ext;
}
}

View File

@ -0,0 +1,49 @@
package org.jeecg.common.util.store.adapter;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.StrUtil;
import lombok.extern.slf4j.Slf4j;
import java.util.Map;
@Slf4j
public class SimpleFileStoreAdapter implements FileStoreAdapter {
@Override
public String getObjectName(Map<String, Object> fpxx, String ext) {
String kprq = MapUtil.getStr(fpxx, "kprq");
String xsfnsrsbh = MapUtil.getStr(fpxx, "xsfNsrsbh");
DateTime date = DateUtil.parse(kprq, DatePattern.NORM_DATETIME_PATTERN);
String issueDate = DateUtil.format(date, DatePattern.PURE_DATE_PATTERN);
String fileName = this.getFileName(fpxx, ext);
//taxId + StrPool.SLASH + issueDate + StrPool.SLASH + fileName;
return StrUtil.format("{}/{}/{}", xsfnsrsbh, issueDate, fileName);
}
@Override
public String getFileName(Map<String, Object> fpxx, String ext) {
ext = this.handleFileExtension(ext);
String kprq = MapUtil.getStr(fpxx, "kprq");
String fphm = MapUtil.getStr(fpxx, "fpHm");
String gmfmc = MapUtil.getStr(fpxx, "gmfMc");
String sgfplx = MapUtil.getStr(fpxx, "sgfplxDm");
if (StrUtil.equals(sgfplx, "01")) {
gmfmc = MapUtil.getStr(fpxx, "xsfmc");
}
DateTime date = DateUtil.parse(kprq, DatePattern.NORM_DATETIME_PATTERN);
String issueDate = DateUtil.format(date, DatePattern.PURE_DATETIME_PATTERN);
// "dzfp" + StrPool.UNDERLINE + fphm + StrPool.UNDERLINE + gmfMc.trim() + StrPool.UNDERLINE + kprq + typeEnum.getCode() ;
return StrUtil.format("dzfp_{}_{}_{}{}", fphm, gmfmc, issueDate, ext);
}
}

View File

@ -0,0 +1,74 @@
package org.jeecg.config.mybatis;
import com.baomidou.mybatisplus.core.incrementer.DefaultIdentifierGenerator;
import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.boot.starter.lock.client.RedissonLockClient;
import org.redisson.api.RLock;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.RedisTemplate;
import java.util.concurrent.TimeUnit;
/**
* idworkeridredisworkeriddataCenterId
*/
@Slf4j
@Configuration
public class IdGeneratorConfig {
private static final String TMS_REDIS_LOCK_PREFIX = "idworker:lock";
private static final String TMS_WORK_INCREMENT = "idworker:workid";
private static final String TMS_DATA_INCREMENT = "idworker:datacenterid";
@Autowired
private RedisTemplate<String, String> redisTemplate;
@Autowired
RedissonLockClient redissonLock;
/**
* idWorker
*/
@Bean
public IdentifierGenerator defaultIdentifierGenerator() {
RLock lock = redissonLock.getLock(TMS_REDIS_LOCK_PREFIX);
try {
try {
lock.tryLock(15, 15, TimeUnit.SECONDS);
} catch (InterruptedException e) {
log.error("获取workerid锁出现问题", e);
}
long workerId = 0;
//redis中取值
String workerIdStr = redisTemplate.opsForValue().get(TMS_WORK_INCREMENT);
if (workerIdStr != null) {
workerId = Long.parseLong(workerIdStr);
} else {
workerId = redisTemplate.opsForValue().increment(TMS_WORK_INCREMENT, 1);
}
//判断值
Long dataCenterId = redisTemplate.opsForValue().increment(TMS_DATA_INCREMENT, 1);
if (dataCenterId > 31) {
dataCenterId = 0L;
redisTemplate.opsForValue().set(TMS_DATA_INCREMENT, String.valueOf(dataCenterId));
workerId = redisTemplate.opsForValue().increment(TMS_WORK_INCREMENT, 1);
if (workerId > 31) {
workerId = 0L;
redisTemplate.opsForValue().set(TMS_WORK_INCREMENT, String.valueOf(workerId));
}
}
log.info("Init IdentifierGenerator workId:{}, dataId:{}", workerId, dataCenterId);
return new DefaultIdentifierGenerator(workerId, dataCenterId);
} finally {
if (lock.isHeldByCurrentThread() && lock.isLocked()) {
lock.unlock();
}
}
}
}

View File

@ -54,13 +54,17 @@ public class MybatisPlusSaasConfig {
//1.需要租户隔离的表请在此配置
if (MybatisPlusSaasConfig.OPEN_SYSTEM_TENANT_CONTROL) {
//a.系统管理表
TENANT_TABLE.add("sys_role");
TENANT_TABLE.add("sys_user_role");
// TENANT_TABLE.add("sys_role");
// TENANT_TABLE.add("sys_user_role");
TENANT_TABLE.add("sys_depart");
TENANT_TABLE.add("sys_category");
//TENANT_TABLE.add("sys_data_source");
TENANT_TABLE.add("sys_position");
TENANT_TABLE.add("sys_announcement");
// 以下为乐企SAAS配置 20240805
TENANT_TABLE.add("lqfw_qdfp_nsrjbxx");
TENANT_TABLE.add("lqfw_qdfp_fpxx");
TENANT_TABLE.add("lqfw_qdfp_hzjgb");
}
//2.示例测试
@ -105,7 +109,7 @@ public class MybatisPlusSaasConfig {
return false;
}
/*所有以cx_开头的 都开启租户模式*/
if(tableName.indexOf("cs_pt_")>-1){//平台
if(tableName.indexOf("cs_pt_")>-1){//平台
if(tableName.equalsIgnoreCase("cs_pt_city")){//省市县行政区划表
return true;
}
@ -123,31 +127,31 @@ public class MybatisPlusSaasConfig {
}
return false;
}
if(tableName.indexOf("cs_yus_")>-1){//预算
if(tableName.startsWith("cs_yus_")){//预算
return false;
}
if(tableName.indexOf("cs_ht_")>-1){//合同
if(tableName.startsWith("cs_ht_")){//合同
return false;
}
if(tableName.indexOf("cs_xx_")>-1){//销项
if(tableName.startsWith("cs_xx_")){//销项
return false;
}
if(tableName.indexOf("cs_ys_")>-1){//应收
if(tableName.startsWith("cs_ys_")){//应收
return false;
}
if(tableName.indexOf("cs_jx_")>-1){//进项
if(tableName.startsWith("cs_jx_")){//进项
return false;
}
if(tableName.indexOf("cs_fk_")>-1){//费控
if(tableName.startsWith("cs_fk_")){//费控
return false;
}
if(tableName.indexOf("cs_ss_")>-1){//算税
if(tableName.startsWith("cs_ss_")){//算税
return false;
}
if(tableName.indexOf("cs_bs_")>-1){//报税
if(tableName.startsWith("cs_bs_")){//报税
return false;
}
if(tableName.indexOf("cs_da_")>-1){//档案
if(tableName.startsWith("cs_da_")){//档案
return false;
}
}

View File

@ -1,5 +1,6 @@
package org.jeecg.config.shiro;
import cn.hutool.core.util.StrUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.AuthenticationInfo;
@ -100,7 +101,7 @@ public class ShiroRealm extends AuthorizingRealm {
}
String username=JwtUtil.getUsername(token);
//通过username判断用户来源
if(username.startsWith(CommonConstant.API)){//api接口获取的token
if(StrUtil.startWith(username, CommonConstant.API)){//api接口获取的token
String cacheToken = String.valueOf(redisUtil.get(CommonConstant.PREFIX_USER_TOKEN + token));
if (oConvertUtils.isNotEmpty(cacheToken)) {
if(!cacheToken.equals(token)){
@ -137,7 +138,7 @@ public class ShiroRealm extends AuthorizingRealm {
}
// 查询用户信息
log.debug("———校验token是否有效————checkUserTokenIsEffect——————— "+ token);
log.debug("———校验token是否有效————checkUserTokenIsEffect——————— {}", token);
LoginUser loginUser = TokenUtils.getLoginUser(username, commonApi, redisUtil);
//LoginUser loginUser = commonApi.getUserByName(username);
if (loginUser == null) {
@ -155,8 +156,8 @@ public class ShiroRealm extends AuthorizingRealm {
String userTenantIds = loginUser.getRelTenantIds();
if(oConvertUtils.isNotEmpty(userTenantIds)){
String contextTenantId = TenantContext.getTenant();
log.debug("登录租户:" + contextTenantId);
log.debug("用户拥有那些租户:" + userTenantIds);
log.debug("登录租户:{}", contextTenantId);
log.debug("用户拥有那些租户:{}", userTenantIds);
//登录用户无租户前端header中租户ID值为 0
String str ="0";
if(oConvertUtils.isNotEmpty(contextTenantId) && !str.equals(contextTenantId)){
@ -179,8 +180,8 @@ public class ShiroRealm extends AuthorizingRealm {
//*********************************************
if(!isAuthorization){
log.info("租户异常——登录租户:" + contextTenantId);
log.info("租户异常——用户拥有租户组:" + userTenantIds);
log.info("租户异常——登录租户:{}", contextTenantId);
log.info("租户异常——用户拥有租户组:{}", userTenantIds);
throw new AuthenticationException("登录租户授权变更,请重新登陆!");
}
//*********************************************
@ -214,7 +215,7 @@ public class ShiroRealm extends AuthorizingRealm {
// 设置超时时间
redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, newAuthorization);
redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, JwtUtil.EXPIRE_TIME *2 / 1000);
log.debug("——————————用户在线操作更新token保证不掉线—————————jwtTokenRefresh——————— "+ token);
log.debug("——————————用户在线操作更新token保证不掉线—————————jwtTokenRefresh——————— {}", token);
}
//update-begin--Author:scott Date:20191005 for解决每次请求都重写redis中 token缓存问题
// else {

View File

@ -6,10 +6,8 @@ import org.apache.shiro.web.filter.authc.BasicHttpAuthenticationFilter;
import org.jeecg.common.config.TenantContext;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.system.util.JwtUtil;
import org.jeecg.common.util.RedisUtil;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.config.shiro.JwtToken;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Component;
@ -29,9 +27,6 @@ import javax.servlet.http.HttpServletResponse;
@Component
public class JwtFilter extends BasicHttpAuthenticationFilter {
@Autowired
private RedisUtil redisUtil;
/**
* 使
* false

View File

@ -17,6 +17,7 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<jeecgboot.version>3.5.3</jeecgboot.version>
<jeecg-nacos.version>2.2.3</jeecg-nacos.version>
<!-- 积木报表-->
<jimureport-spring-boot-starter.version>1.6.6</jimureport-spring-boot-starter.version>
<aviator.version>5.4.1</aviator.version>
@ -25,6 +26,39 @@
<dependencyManagement>
<dependencies>
<!-- jeecg nacos -->
<dependency>
<groupId>org.jeecgframework.nacos</groupId>
<artifactId>nacos-naming</artifactId>
<version>${jeecg-nacos.version}</version>
<exclusions>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jeecgframework.nacos</groupId>
<artifactId>nacos-istio</artifactId>
<version>${jeecg-nacos.version}</version>
</dependency>
<dependency>
<groupId>org.jeecgframework.nacos</groupId>
<artifactId>nacos-config</artifactId>
<version>${jeecg-nacos.version}</version>
<exclusions>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jeecgframework.nacos</groupId>
<artifactId>nacos-console</artifactId>
<version>${jeecg-nacos.version}</version>
</dependency>
<!-- jeecg tools -->
<dependency>
<groupId>org.jeecgframework.boot</groupId>

View File

@ -90,8 +90,9 @@
<qiniu-java-sdk.version>7.4.0</qiniu-java-sdk.version>
<!-- Log4j2爆雷漏洞 -->
<log4j.version>1.2.17</log4j.version>
<log4j2.version>2.17.2</log4j2.version>
<logback.version>1.2.12</logback.version>
<log4j2.version>2.24.2</log4j2.version>
<logback.version>1.3.14</logback.version>
<slf4j.version>1.7.36</slf4j.version>
<!-- 链路追踪 -->
<transmittable.version>2.14.2</transmittable.version>
@ -543,6 +544,16 @@
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>${logback.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
</dependency>
<!-- 接口文档依赖 begin -->
<!-- knife4j -->

View File

@ -1,5 +1,8 @@
package org.jeecg.modules.common.util;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.NumberUtil;
import java.math.BigDecimal;
/**
@ -89,4 +92,16 @@ public class MathUtil {
return b1.divide(b2,scale,BigDecimal.ROUND_HALF_UP).doubleValue();
}
public static boolean equalsAny(BigDecimal b1, BigDecimal... bigDecimals) {
if (ArrayUtil.isEmpty(bigDecimals)) {
return false;
} else {
for (BigDecimal bigDecimal : bigDecimals) {
if(NumberUtil.equals(b1, bigDecimal)) {
return true;
}
}
return false;
}
}
}

View File

@ -0,0 +1,178 @@
package org.jeecg.modules.cssz.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.cssz.entity.CsPtCssz;
import org.jeecg.modules.cssz.service.CsPtCsszService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.List;
/**
* @Description:
* @Author: jeecg-boot
* @Date: 2024-01-02
* @Version: V1.0
*/
@Api(tags = "系统设置表")
@RequiredArgsConstructor
@RestController
@RequestMapping("/pt/cssz/csPtCssz")
@Slf4j
public class CsPtCsszController extends JeecgController<CsPtCssz, CsPtCsszService> {
final CsPtCsszService csPtCsszService;
/**
*
*
* @param csPtCssz
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "系统设置表-分页列表查询")
@ApiOperation(value = "系统设置表-分页列表查询", notes = "系统设置表-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<CsPtCssz>> queryPageList(CsPtCssz csPtCssz,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<CsPtCssz> queryWrapper = QueryGenerator.initQueryWrapper(csPtCssz, req.getParameterMap());
Page<CsPtCssz> page = new Page<CsPtCssz>(pageNo, pageSize);
IPage<CsPtCssz> pageList = csPtCsszService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
*
*
* @param csPtCssz
* @return
*/
@AutoLog(value = "系统设置表-添加")
@ApiOperation(value = "系统设置表-添加", notes = "系统设置表-添加")
@RequiresPermissions("pt.cssz:cs_pt_cssz:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody CsPtCssz csPtCssz) {
csPtCsszService.save(csPtCssz);
return Result.OK("添加成功!");
}
@AutoLog(value = "系统设置表-批量添加")
@ApiOperation(value = "系统设置表-批量添加", notes = "系统设置表-批量添加")
@RequiresPermissions("pt.cssz:cs_pt_cssz:addall")
@PostMapping(value = "/addAll")
public Result<String> addAll(@RequestBody List<CsPtCssz> csPtCsszs) {
if (!csPtCsszs.isEmpty()) {
for (CsPtCssz csPtCssz : csPtCsszs) {
csPtCsszService.save(csPtCssz);
}
}
return Result.OK("批量添加成功!");
}
/**
*
*
* @param csPtCssz
* @return
*/
@AutoLog(value = "系统设置表-编辑")
@ApiOperation(value = "系统设置表-编辑", notes = "系统设置表-编辑")
@RequiresPermissions("pt.cssz:cs_pt_cssz:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody CsPtCssz csPtCssz) {
csPtCsszService.updateById(csPtCssz);
return Result.OK("编辑成功!");
}
/**
* id
*
* @param id
* @return
*/
@AutoLog(value = "系统设置表-通过id删除")
@ApiOperation(value = "系统设置表-通过id删除", notes = "系统设置表-通过id删除")
@RequiresPermissions("pt.cssz:cs_pt_cssz:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
csPtCsszService.removeById(id);
return Result.OK("删除成功!");
}
/**
*
*
* @param ids
* @return
*/
@AutoLog(value = "系统设置表-批量删除")
@ApiOperation(value = "系统设置表-批量删除", notes = "系统设置表-批量删除")
@RequiresPermissions("pt.cssz:cs_pt_cssz:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
this.csPtCsszService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* id
*
* @param id
* @return
*/
//@AutoLog(value = "系统设置表-通过id查询")
@ApiOperation(value = "系统设置表-通过id查询", notes = "系统设置表-通过id查询")
@GetMapping(value = "/queryById")
public Result<CsPtCssz> queryById(@RequestParam(name = "id", required = true) String id) {
CsPtCssz csPtCssz = csPtCsszService.getById(id);
if (csPtCssz == null) {
return Result.error("未找到对应数据");
}
return Result.OK(csPtCssz);
}
/**
* excel
*
* @param request
* @param csPtCssz
*/
@RequiresPermissions("pt.cssz:cs_pt_cssz:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, CsPtCssz csPtCssz) {
return super.exportXls(request, csPtCssz, CsPtCssz.class, "系统设置表");
}
/**
* excel
*
* @param request
* @param response
* @return
*/
@RequiresPermissions("pt.cssz:cs_pt_cssz:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, CsPtCssz.class);
}
}

View File

@ -0,0 +1,121 @@
package org.jeecg.modules.cssz.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
* @Description:
* @Author: jeecg-boot
* @Date: 2024-01-02
* @Version: V1.0
*/
@Data
@TableName("cs_pt_cssz")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "cs_pt_cssz对象", description = "系统设置表")
public class CsPtCssz implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "ID")
private String id;
/**
*
*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**
*
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**
*
*/
@ApiModelProperty(value = "更新人")
private String updateBy;
/**
*
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**
*
*/
@ApiModelProperty(value = "所属部门")
private String sysOrgCode;
/**
*
*/
@Excel(name = "租户编号", width = 15)
@ApiModelProperty(value = "租户编号")
private Integer tenantId;
/**
*
*/
@Excel(name = "参数类型", width = 15)
@ApiModelProperty(value = "参数类型")
private String cslx;
/**
*
*/
@Excel(name = "模块类型", width = 15)
@ApiModelProperty(value = "模块类型")
private String mklx;
/**
*
*/
@Excel(name = "参数名称", width = 15)
@ApiModelProperty(value = "参数名称")
private String csmc;
/**
*
*/
@Excel(name = "参数值", width = 15)
@ApiModelProperty(value = "参数值")
private String csz;
/**
*
*/
@Excel(name = "参数类型", width = 15)
@ApiModelProperty(value = "参数类型")
private String cstype;
/**
*
*/
@Excel(name = "参数描述", width = 15)
@ApiModelProperty(value = "参数描述")
private String csms;
}

View File

@ -0,0 +1,14 @@
package org.jeecg.modules.cssz.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.cssz.entity.CsPtCssz;
/**
* @Description:
* @Author: jeecg-boot
* @Date: 2024-01-02
* @Version: V1.0
*/
public interface CsPtCsszMapper extends BaseMapper<CsPtCssz> {
}

View File

@ -0,0 +1,14 @@
package org.jeecg.modules.cssz.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.cssz.entity.CsPtCssz;
/**
* @Description:
* @Author: jeecg-boot
* @Date: 2024-01-02
* @Version: V1.0
*/
public interface CsPtCsszService extends IService<CsPtCssz> {
}

View File

@ -0,0 +1,19 @@
package org.jeecg.modules.cssz.service.impl;
import org.jeecg.modules.cssz.entity.CsPtCssz;
import org.jeecg.modules.cssz.mapper.CsPtCsszMapper;
import org.jeecg.modules.cssz.service.CsPtCsszService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description:
* @Author: jeecg-boot
* @Date: 2024-01-02
* @Version: V1.0
*/
@Service
public class CsPtCsszServiceImpl extends ServiceImpl<CsPtCsszMapper, CsPtCssz> implements CsPtCsszService {
}

View File

@ -0,0 +1,61 @@
package org.jeecg.modules.tax.xxgx.spgl.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import java.io.Serializable;
/**
* @Description:
* @Author: jeecg-boot
* @Date: 2023-09-18
* @Version: V1.0
*/
@Data
@TableName("cs_pb_code")
@ApiModel(value="cs_pb_code对象", description="税收分类编码")
public class CsPbCode implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private String id;
/**分类编码*/
@Excel(name = "合并编码", width = 15)
@ApiModelProperty(value = "分类编码")
private String code;
/**上级*/
@Excel(name = "上级", width = 15)
@ApiModelProperty(value = "上级")
private String pid;
/**分类名称*/
@Excel(name = "货物和劳务名称", width = 15)
@ApiModelProperty(value = "分类名称")
private String name;
/**特殊项*/
@Excel(name = "增值税特殊管理", width = 15)
@ApiModelProperty(value = "特殊项")
private String special;
/**税率*/
@Excel(name = "增值税税率", width = 15)
@ApiModelProperty(value = "税率")
private String tax;
/**分类简称*/
@Excel(name = "商品和服务分类简称", width = 15)
@ApiModelProperty(value = "分类简称")
private String shortName;
/**是否有子节点*/
@Excel(name = "是否汇总项", width = 15)
@ApiModelProperty(value = "是否有子节点")
private String hasChild;
/** 编码说明 */
@Excel(name = "说明", width = 15)
@ApiModelProperty(value = "分类说明")
private String flsm;
}

View File

@ -0,0 +1,15 @@
package org.jeecg.modules.tax.xxgx.spgl.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.tax.xxgx.spgl.entity.CsPbCode;
/**
* @Description:
* @Author: jeecg-boot
* @Date: 2023-09-18
* @Version: V1.0
*/
public interface CsPbCodeMapper extends BaseMapper<CsPbCode> {
}

View File

@ -0,0 +1,13 @@
package org.jeecg.modules.tax.xxgx.spgl.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.tax.xxgx.spgl.entity.CsPbCode;
import java.util.List;
public interface CsPbCodeService extends IService<CsPbCode> {
void syncData(CsPbCode csPbCode);
void syncData(List<CsPbCode> list);
}

View File

@ -0,0 +1,62 @@
package org.jeecg.modules.tax.xxgx.spgl.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.IdUtil;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.modules.tax.xxgx.spgl.entity.CsPbCode;
import org.jeecg.modules.tax.xxgx.spgl.mapper.CsPbCodeMapper;
import org.jeecg.modules.tax.xxgx.spgl.service.CsPbCodeService;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
@Slf4j
@RequiredArgsConstructor
@Service
public class CsPbCodeServiceImpl extends ServiceImpl<CsPbCodeMapper, CsPbCode> implements CsPbCodeService {
@Override
@DS(CommonConstant.DS_CWGX)
public void syncData(CsPbCode csPbCode) {
List<CsPbCode> list = this.lambdaQuery()
.eq(CsPbCode::getCode, csPbCode.getCode())
.list();
for (CsPbCode item : list) {
csPbCode.setId(item.getId());
this.updateById(csPbCode);
}
}
@Override
@DS(CommonConstant.DS_CWGX)
public void syncData(List<CsPbCode> list) {
List<CsPbCode> updateList = new ArrayList<>();
List<CsPbCode> insertList = new ArrayList<>();
for (CsPbCode item : list) {
CsPbCode one = this.lambdaQuery()
.eq(CsPbCode::getCode, item.getCode())
.one();
if (one != null) {
item.setId(one.getId());
updateList.add(item);
} else {
item.setId(IdUtil.getSnowflakeNextIdStr());
insertList.add(item);
}
}
if (CollectionUtil.isNotEmpty(updateList)) {
this.updateBatchById(updateList);
}
if (CollectionUtil.isNotEmpty(insertList)) {
this.saveBatch(insertList);
}
}
}

View File

@ -0,0 +1,54 @@
package org.jeecg.modules.util;
import cn.hutool.core.util.StrUtil;
import org.jeecg.common.config.TenantContext;
import org.jeecg.common.util.SpringContextHolder;
import org.jeecg.modules.cssz.entity.CsPtCssz;
import org.jeecg.modules.cssz.service.CsPtCsszService;
/**
*
*/
public class XtcsUtil {
/**
*
*
* @param csmc
* @return
*/
public static String getCssz(String csmc) {
return getCssz(csmc, "");
}
/**
*
*
* @param csmc
* @param defaultValue
* @return
*/
public static String getCssz(String csmc, String defaultValue) {
String tenantId = TenantContext.getTenant();
boolean isSystem = StrUtil.isBlank(tenantId) || StrUtil.equals(tenantId, "0");
final CsPtCsszService csPtCsszService = SpringContextHolder.getBean(CsPtCsszService.class);
CsPtCssz csPtCssz = csPtCsszService.lambdaQuery().
eq(CsPtCssz::getCsmc, csmc)
.and(isSystem, i -> i
.eq(CsPtCssz::getTenantId, 0)
.or()
.isNull(CsPtCssz::getTenantId)
)
.one();
if (csPtCssz == null || StrUtil.isBlank(csPtCssz.getCsz())) {
return defaultValue;
}
return csPtCssz.getCsz();
}
}

View File

@ -0,0 +1,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jeecgframework.boot.lqfw</groupId>
<artifactId>jeecg-module-deliver</artifactId>
<version>3.5.3</version>
</parent>
<artifactId>jeecg-deliver-byd</artifactId>
</project>

View File

@ -0,0 +1,58 @@
package org.jeecg.modules.deliver.byd.adapter;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.text.StrPool;
import cn.hutool.core.util.StrUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.util.store.adapter.FileStoreAdapter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import java.util.Map;
@Slf4j
@RequiredArgsConstructor
@Component
public class BydFileStoreAdapter implements FileStoreAdapter {
@Value(value = "${jeecg.ossPrefix:}")
private String ossPrefix;
@Override
public String getObjectName(Map<String, Object> fpxx, String ext) {
// 环境prod/test/年月/xxfp/税号/业务类型_发票号码_时间.文件类型
DateTime now = DateUtil.date();
String yearMonth = DateUtil.format(now, DatePattern.SIMPLE_MONTH_PATTERN);
String xsfnsrsbh = MapUtil.getStr(fpxx, "xsfNsrsbh");
String fileName = this.getFileName(fpxx, ext);
String prefix = this.ossPrefix;
if (StrUtil.isNotBlank(prefix)){
prefix += StrPool.SLASH;
}
return StrUtil.format("{}{}/xxfp/{}/{}", prefix, yearMonth, xsfnsrsbh, fileName);
}
@Override
public String getFileName(Map<String, Object> fpxx, String ext) {
ext = this.handleFileExtension(ext);
// 业务类型_发票号码_时间.文件类型
String fplx = MapUtil.getStr(fpxx, "fplx");
String fphm = MapUtil.getStr(fpxx, "fpHm");
String kprq = MapUtil.getStr(fpxx, "kprq");
DateTime date = DateUtil.parse(kprq, DatePattern.NORM_DATETIME_PATTERN);
String issueDate = DateUtil.format(date, DatePattern.PURE_DATETIME_PATTERN);
return StrUtil.format("{}_{}_{}{}", fplx, fphm, issueDate, ext);
}
}

View File

@ -11,17 +11,4 @@
<artifactId>jeecg-deliver-zyzx</artifactId>
<dependencies>
<dependency>
<groupId>org.jeecgframework.boot.lqfw</groupId>
<artifactId>com.foresee.lqfw.sdk</artifactId>
<version>${jeecgboot.version}</version>
<scope>system</scope>
<systemPath>
${pom.basedir}/../../lib/com.foresee.lqfw.sdk-3.5.3.jar
</systemPath>
</dependency>
</dependencies>
</project>

View File

@ -51,4 +51,9 @@ public interface CmosConstants {
*
*/
String HZQRD_MXXZ = "hzqrdmxxz";
/**
*
*/
String FPHTSBCS = "fphtsbcs";
}

View File

@ -19,18 +19,17 @@ public class CmosTaskController {
* <p> /cmos/task/fpsc</p>
*
* @param type
* @param sn
* @return
*/
@GetMapping("{type}")
public CsfResponse execute(@PathVariable("type") String type, @RequestHeader(value = "sn", required = false) String sn) {
public CsfResponse execute(@PathVariable("type") String type) {
CsfResponse response = new CsfResponse();
response.setRtnCode(CsfResponse.RTN_CODE.SUCCESS);
response.setRtnMsg(CsfResponse.RTN_MSG.SUCCESS);
// 业务逻辑处理
this.cmosTaskService.execute(type, sn);
this.cmosTaskService.execute(type);
return response;
}

View File

@ -6,8 +6,7 @@ public interface CmosTaskService {
*
*
* @param type
* @param sn
*/
void execute(String type, String sn);
void execute(String type);
}

View File

@ -4,8 +4,8 @@ import cn.hutool.core.util.StrUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.common.util.ThreadExecutorsUtil;
import org.jeecg.modules.deliver.cmos.job.service.CmosTaskService;
import org.jeecg.modules.deliver.cmos.job.CmosTask;
import org.jeecg.modules.deliver.cmos.job.service.CmosTaskService;
import org.springframework.stereotype.Service;
import java.util.List;
@ -20,8 +20,8 @@ public class CmosTaskServiceImpl implements CmosTaskService {
final List<CmosTask> taskList;
@Override
public void execute(final String type, String sn) {
log.info("任务调度流水号:{}", sn);
public void execute(final String type) {
log.info("任务调度{}", type);
Optional<CmosTask> optional = this.taskList.stream()
.filter(it -> StrUtil.equals(it.getType(), type))
.findFirst();

View File

@ -14,6 +14,7 @@
<modules>
<module>jeecg-deliver-zyzx</module>
<module>jeecg-deliver-byd</module>
</modules>
<dependencies>
@ -26,6 +27,11 @@
<groupId>org.jeecgframework.boot.lqfw</groupId>
<artifactId>jeecg-system-biz</artifactId>
</dependency>
<dependency>
<groupId>org.jeecgframework.boot.lqfw</groupId>
<artifactId>jeecg-module-lqfw</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>

View File

@ -19,6 +19,6 @@ public interface SysMessageTemplateMapper extends BaseMapper<SysMessageTemplate>
* @param code CODE
* @return List<SysMessageTemplate>
*/
@Select("SELECT * FROM SYS_SMS_TEMPLATE WHERE TEMPLATE_CODE = #{code}")
@Select("select * from sys_sms_template where template_code = #{code}")
List<SysMessageTemplate> selectByCode(String code);
}

View File

@ -69,8 +69,8 @@ public class SysJobListener implements JobListener {
csPtJobLog.setMessage(message);
logService.save(csPtJobLog);
} catch (Exception ignored) {
} catch (Exception ex) {
log.error("调度执行记录插入失败:",ex);
}
}

View File

@ -0,0 +1,77 @@
package org.jeecg.modules.sync;
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.dynamic.datasource.DynamicRoutingDataSource;
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
import org.jeecg.common.util.SpringContextHolder;
import org.jeecg.modules.sync.service.CwgxSyncDataService;
import java.util.Map;
import java.util.function.Supplier;
public class CwgxDataHandler {
public static final String DS_NAME = "cwgx";
public static <T> T handle(Supplier<T> supplier) {
T result = null;
DynamicRoutingDataSource dataSource = SpringContextHolder.getBean(DynamicRoutingDataSource.class);
if (dataSource.getCurrentDataSources().containsKey(DS_NAME)) {
try {
DynamicDataSourceContextHolder.push(DS_NAME);
result = supplier.get();
} finally {
DynamicDataSourceContextHolder.clear();
}
}
return result;
}
public static <T> T handleAndSync(Supplier<T> supplier) {
T result = supplier.get();
if (isEmpty(result)) {
result = handle(supplier);
if (isNotEmpty(result)) {
CwgxSyncDataService cwgxSyncDataService = SpringContextHolder.getBean(CwgxSyncDataService.class);
cwgxSyncDataService.execute();
}
}
return result;
}
public static <T> T handleAndSync(String username, Supplier<T> supplier) {
T result = supplier.get();
if (isEmpty(result)) {
result = handle(supplier);
if (isNotEmpty(result)) {
CwgxSyncDataService cwgxSyncDataService = SpringContextHolder.getBean(CwgxSyncDataService.class);
cwgxSyncDataService.executeByUsername(username);
}
}
return result;
}
private static <T> boolean isEmpty(T val) {
if (val instanceof Iterable) {
return CollectionUtil.isEmpty((Iterable<?>) val);
} else if (val instanceof Map) {
return CollectionUtil.isEmpty((Map<?, ?>) val);
}
return val == null;
}
private static <T> boolean isNotEmpty(T val) {
if (val instanceof Iterable) {
return CollectionUtil.isNotEmpty((Iterable<?>) val);
} else if (val instanceof Map) {
return CollectionUtil.isNotEmpty((Map<?, ?>) val);
}
return val != null;
}
}

View File

@ -0,0 +1,34 @@
package org.jeecg.modules.sync.job;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.util.SpringContextHolder;
import org.jeecg.modules.common.util.ThreadExecutorsUtil;
import org.jeecg.modules.sync.service.SyncDataService;
import org.quartz.*;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
@Slf4j
@PersistJobDataAfterExecution
@DisallowConcurrentExecution
public class SyncDataTask implements Job {
@Override
public void execute(JobExecutionContext context) throws JobExecutionException {
final Map<String, SyncDataService> syncDataServices = SpringContextHolder.getApplicationContext()
.getBeansOfType(SyncDataService.class);
for(Map.Entry<String, SyncDataService> entry : syncDataServices.entrySet()){
SyncDataService syncDataService = entry.getValue();
CompletableFuture.runAsync(()->{
try {
syncDataService.execute();
} catch (Exception e) {
log.error("{}[{}]异常:{}", syncDataService.getName(), entry.getKey(), e.getMessage());
}
}, ThreadExecutorsUtil.executor);
}
}
}

View File

@ -0,0 +1,237 @@
package org.jeecg.modules.sync.service;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.util.SpringContextHolder;
import org.jeecg.modules.sync.CwgxDataHandler;
import org.jeecg.modules.system.entity.*;
import org.jeecg.modules.system.mapper.SysDepartMapper;
import org.jeecg.modules.system.mapper.SysTenantMapper;
import org.jeecg.modules.system.mapper.SysUserMapper;
import org.jeecg.modules.system.service.ISysRoleService;
import org.jeecg.modules.system.service.ISysUserDepartService;
import org.jeecg.modules.system.service.ISysUserRoleService;
import org.jeecg.modules.system.service.ISysUserTenantService;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.function.Consumer;
import java.util.stream.Collectors;
/**
*
*/
@Slf4j
@RequiredArgsConstructor
@Service
public class CwgxSyncDataService implements SyncDataService {
public static final Integer MAX_PAGE_SIZE = 500;
public static final String ROLE_ADMIN = "lqadmin";
public static final String ROLE_USER = "lquser";
@Override
public String getName() {
return "F7慧税组织架构数据同步";
}
@Override
public void execute() {
// 租户
this.syncTenant(entity -> {
});
// 部门
this.syncDepart(entity -> {
});
// 人员
List<SysUser> userList = this.syncUser(entity -> {
});
for (SysUser user : userList) {
// 人员部门
this.syncUserDepart(wrapper -> {
wrapper.eq(SysUserDepart::getUserId, user.getId());
});
// 人员租户
this.syncUserTenant(wrapper -> {
wrapper.eq(SysUserTenant::getUserId, user.getId());
});
}
}
public void executeByUsername(String username) {
if(StrUtil.isBlank(username)) return;
// 人员
List<SysUser> userList = this.syncUser(entity -> entity.setUsername(username));
for (SysUser user : userList) {
String userId = user.getId();
// 人员租户
List<SysUserTenant> userTenantList = this.syncUserTenant(wrapper -> wrapper.eq(SysUserTenant::getUserId, userId));
// 租户
if (CollectionUtil.isNotEmpty(userTenantList)) {
for (SysUserTenant userTenant : userTenantList) {
this.syncTenant(entity -> entity.setId(userTenant.getTenantId()));
}
}
// 人员部门
List<SysUserDepart> userDepartList = this.syncUserDepart(wrapper -> wrapper.eq(SysUserDepart::getUserId, userId));
// 部门
if (CollectionUtil.isNotEmpty(userDepartList)) {
for (SysUserDepart userDepart : userDepartList) {
this.syncDepart(entity -> entity.setId(userDepart.getDepId()));
}
}
}
}
private List<SysTenant> syncTenant(Consumer<SysTenant> consumer) {
SysTenantMapper tenantMapper = SpringContextHolder.getBean(SysTenantMapper.class);
SysTenant query = new SysTenant();
consumer.accept(query);
List<SysTenant> list = CwgxDataHandler.handle(() -> tenantMapper.selectIgnoreLogicDelete(query));
for (SysTenant item : list){
SysTenant one = tenantMapper.selectIgnoreLogicDeleteById(item.getId());
if (one != null) {
tenantMapper.updateIgnoreLogicDeleteById(item);
}else{
tenantMapper.insertIgnoreLogicDelete(item);
}
}
return list;
}
private List<SysDepart> syncDepart(Consumer<SysDepart> consumer) {
SysDepartMapper departMapper = SpringContextHolder.getBean(SysDepartMapper.class);
SysDepart query = new SysDepart();
consumer.accept(query);
List<SysDepart> list = CwgxDataHandler.handle(() -> departMapper.selectIgnoreLogicDelete(query));
for (SysDepart item : list){
SysDepart one = departMapper.selectIgnoreLogicDeleteById(item.getId());
if (one != null) {
departMapper.updateIgnoreLogicDeleteById(item);
}else{
departMapper.insertIgnoreLogicDelete(item);
}
}
return list;
}
private List<SysUser> syncUser(Consumer<SysUser> consumer) {
SysUserMapper userMapper = SpringContextHolder.getBean(SysUserMapper.class);
ISysRoleService roleService = SpringContextHolder.getBean(ISysRoleService.class);
ISysUserRoleService userRoleService = SpringContextHolder.getBean(ISysUserRoleService.class);
List<SysRole> roleList = roleService.lambdaQuery()
.in(SysRole::getRoleCode, ROLE_ADMIN, ROLE_USER)
.list();
Map<String, String> roleIds = roleList.stream().collect(Collectors.toMap(SysRole::getRoleCode, SysRole::getId, (k1, k2) -> k2));
final SysUser query = new SysUser();
consumer.accept(query);
List<SysUser> list = CwgxDataHandler.handle(() -> userMapper.selectIgnoreLogicDelete(query));
for (SysUser item : list){
SysUser queryByUsername = new SysUser();
queryByUsername.setUsername(item.getUsername());
List<SysUser> sysUsers = userMapper.selectIgnoreLogicDelete(queryByUsername);
SysUser one = null;
if (CollectionUtil.isNotEmpty(sysUsers)) {
one = sysUsers.get(0);
}
if (one == null) {
one = userMapper.selectIgnoreLogicDeleteById(item.getId());
}
String roleId = roleIds.get(ROLE_USER);
// 身份(-1=账套管理员0=超级管理员1=普通用户2=管理员)
if(item.getUserIdentity() != null && item.getUserIdentity() == 2){
roleId = roleIds.get(ROLE_ADMIN);
}
if (one != null) {
userMapper.updateIgnoreLogicDeleteById(item);
}else{
userMapper.insertIgnoreLogicDelete(item);
}
if (StrUtil.isNotBlank(roleId)){
boolean exists = userRoleService.lambdaQuery()
.eq(SysUserRole::getRoleId, roleId)
.eq(SysUserRole::getUserId, item.getId())
.exists();
if (!exists) {
SysUserRole userRole = new SysUserRole();
userRole.setUserId(item.getId());
userRole.setRoleId(roleId);
userRoleService.save(userRole);
}
}
}
return list;
}
private List<SysUserDepart> syncUserDepart(Consumer<LambdaQueryChainWrapper<SysUserDepart>> consumer) {
List<SysUserDepart> list = new ArrayList<>();
ISysUserDepartService userDepartService = SpringContextHolder.getBean(ISysUserDepartService.class);
LambdaQueryChainWrapper<SysUserDepart> wrapper = userDepartService.lambdaQuery();
consumer.accept(wrapper);
int current = 0;
while (true) {
IPage<SysUserDepart> page = new Page<>(++current, MAX_PAGE_SIZE);
// 先删除
List<SysUserDepart> deleteList = wrapper.page(page).getRecords();
userDepartService.removeBatchByIds(deleteList);
// 再保存
IPage<SysUserDepart> pageList = CwgxDataHandler.handle(() -> wrapper.page(page));
List<SysUserDepart> records = pageList.getRecords();
userDepartService.saveOrUpdateBatch(list);
list.addAll(records);
if (current > pageList.getPages()) break;
}
return list;
}
private List<SysUserTenant> syncUserTenant(Consumer<LambdaQueryChainWrapper<SysUserTenant>> consumer) {
List<SysUserTenant> list = new ArrayList<>();
ISysUserTenantService userTenantService = SpringContextHolder.getBean(ISysUserTenantService.class);
LambdaQueryChainWrapper<SysUserTenant> wrapper = userTenantService.lambdaQuery();
consumer.accept(wrapper);
int current = 0;
while (true) {
IPage<SysUserTenant> page = new Page<>(++current, MAX_PAGE_SIZE);
// 先删除
List<SysUserTenant> deleteList = wrapper.page(page).getRecords();
userTenantService.removeBatchByIds(deleteList);
// 再保存
IPage<SysUserTenant> pageList = CwgxDataHandler.handle(() -> wrapper.page(page));
List<SysUserTenant> records = pageList.getRecords();
userTenantService.saveOrUpdateBatch(records);
list.addAll(records);
if (current > pageList.getPages()) break;
}
return list;
}
}

View File

@ -0,0 +1,20 @@
package org.jeecg.modules.sync.service;
public interface SyncDataService {
/**
*
*
* @return
*/
default String getName(){
return "数据同步异常";
}
/**
*
*/
void execute();
}

View File

@ -32,6 +32,7 @@ import org.jeecg.config.thirdapp.ThirdAppConfig;
import org.jeecg.modules.base.service.BaseCommonService;
import org.jeecg.modules.qyxx.entity.CsPtQyxx;
import org.jeecg.modules.qyxx.service.ICsPtQyxxService;
import org.jeecg.modules.sync.CwgxDataHandler;
import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.entity.SysRoleIndex;
import org.jeecg.modules.system.entity.SysUser;
@ -153,7 +154,7 @@ public class LoginController {
//update-begin-author:wangshuai date:20200601 for: 登录代码验证用户是否注销bugif条件永远为false
LambdaQueryWrapper<SysUser> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(SysUser::getUsername, username);
SysUser sysUser = sysUserService.getOne(queryWrapper);
SysUser sysUser = CwgxDataHandler.handleAndSync(username, () -> sysUserService.getOne(queryWrapper));
//update-end-author:wangshuai date:20200601 for: 登录代码验证用户是否注销bugif条件永远为false
result = sysUserService.checkUserIsEffective(sysUser);
if (!result.isSuccess()) {

View File

@ -3,9 +3,6 @@ package org.jeecg.modules.system.controller;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.dynamic.datasource.DynamicRoutingDataSource;
import com.baomidou.dynamic.datasource.creator.DruidDataSourceCreator;
import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DataSourceProperty;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -13,8 +10,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.config.TenantContext;
@ -34,7 +29,6 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.sql.DataSource;
import java.util.Arrays;
import java.util.List;

View File

@ -0,0 +1,63 @@
package org.jeecg.modules.system.controller;
import cn.hutool.core.util.StrUtil;
import cn.hutool.db.Db;
import cn.hutool.db.Entity;
import cn.hutool.json.JSONUtil;
import com.baomidou.dynamic.datasource.DynamicRoutingDataSource;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.springframework.web.bind.annotation.*;
import javax.sql.DataSource;
import java.util.List;
import java.util.Map;
@Slf4j
@RequiredArgsConstructor
@RestController
@RequestMapping("sys/database")
public class SysDatabaseController {
final DynamicRoutingDataSource dataSource;
@PostMapping("execute")
public Result<Object> execute(@RequestBody Map<String, String> request) throws Exception {
String dsName = request.getOrDefault("ds", "master");
String qqrz = request.getOrDefault("qqrz", "");
if (StrUtil.isBlank(qqrz)){
return Result.error("请求日志为空");
}
if (StrUtil.endWith(qqrz, ";")){
qqrz = StrUtil.sub(qqrz, 0, qqrz.length() - 1);
}
DataSource ds = dataSource.getDataSource(dsName);
if (ds == null){
return Result.error("未获取到数据源:" + dsName);
}
log.info("数据源[{}],待执行脚本:{}", dsName, qqrz);
Db db = Db.use(ds);
Object result = "";
if (StrUtil.startWithIgnoreCase(qqrz, "select")){
List<Entity> list = db.query(qqrz);
result = JSONUtil.toJsonStr(list);
} else if (StrUtil.startWithIgnoreCase(qqrz, "insert")){
result = db.execute(qqrz);
} else if (StrUtil.startWithIgnoreCase(qqrz, "update")){
result = db.execute(qqrz);
} else if (StrUtil.startWithIgnoreCase(qqrz, "delete")){
result = db.execute(qqrz);
}
// alter
else {
result = db.execute(qqrz);
}
return Result.ok(result);
}
}

View File

@ -50,13 +50,13 @@ import java.util.*;
public class SysRoleController {
@Autowired
private ISysRoleService sysRoleService;
@Autowired
private ISysPermissionDataRuleService sysPermissionDataRuleService;
@Autowired
private ISysRolePermissionService sysRolePermissionService;
@Autowired
private ISysPermissionService sysPermissionService;
@ -77,13 +77,21 @@ public class SysRoleController {
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
Result<IPage<SysRole>> result = new Result<IPage<SysRole>>();
//------------------------------------------------------------------------------------------------
//是否开启系统管理模块的多租户数据隔离【SAAS多租户模式】
if(MybatisPlusSaasConfig.OPEN_SYSTEM_TENANT_CONTROL){
role.setTenantId(oConvertUtils.getInt(TenantContext.getTenant(),0));
Result<IPage<SysRole>> result = new Result<>();
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
if (user != null) {
Integer userIdentity = user.getUserIdentity();
// 非账套管理员
if (userIdentity != -1) {
//------------------------------------------------------------------------------------------------
//是否开启系统管理模块的多租户数据隔离【SAAS多租户模式】
if (MybatisPlusSaasConfig.OPEN_SYSTEM_TENANT_CONTROL) {
role.setTenantId(oConvertUtils.getInt(TenantContext.getTenant(), 0));
}
//------------------------------------------------------------------------------------------------
}
}
//------------------------------------------------------------------------------------------------
QueryWrapper<SysRole> queryWrapper = QueryGenerator.initQueryWrapper(role, req.getParameterMap());
Page<SysRole> page = new Page<SysRole>(pageNo, pageSize);
IPage<SysRole> pageList = sysRoleService.page(page, queryWrapper);
@ -91,7 +99,7 @@ public class SysRoleController {
result.setResult(pageList);
return result;
}
/**
*
* @param role
@ -119,7 +127,7 @@ public class SysRoleController {
result.setResult(pageList);
return result;
}
/**
*
* @param role
@ -139,7 +147,7 @@ public class SysRoleController {
}
return result;
}
/**
*
* @param role
@ -160,10 +168,10 @@ public class SysRoleController {
result.success("修改成功!");
}
}
return result;
}
/**
* id
* @param id
@ -175,7 +183,7 @@ public class SysRoleController {
sysRoleService.deleteRole(id);
return Result.ok("删除角色成功");
}
/**
*
* @param ids
@ -193,7 +201,7 @@ public class SysRoleController {
}
return result;
}
/**
* id
* @param id
@ -214,7 +222,7 @@ public class SysRoleController {
/**
*
*
*
* @return
*/
@RequestMapping(value = "/queryall", method = RequestMethod.GET)
@ -256,7 +264,7 @@ public class SysRoleController {
}
return result;
}
/**
*
*/
@ -308,7 +316,7 @@ public class SysRoleController {
sysRole.setTenantId(oConvertUtils.getInt(TenantContext.getTenant(), 0));
}
//------------------------------------------------------------------------------------------------
// Step.1 组装查询条件
QueryWrapper<SysRole> queryWrapper = QueryGenerator.initQueryWrapper(sysRole, request.getParameterMap());
//Step.2 AutoPoi 导出Excel
@ -355,7 +363,7 @@ public class SysRoleController {
}
return Result.error("文件导入失败!");
}
/**
*
*/
@ -384,7 +392,7 @@ public class SysRoleController {
//TODO 以后按钮权限的查询也走这个请求 无非在map中多加两个key
}
}
/**
*
*/
@ -411,8 +419,8 @@ public class SysRoleController {
}
return Result.ok("保存成功!");
}
/**
*
* @param request
@ -454,7 +462,7 @@ public class SysRoleController {
}
return result;
}
private void getTreeModelList(List<TreeModel> treeList, List<SysPermission> metaList, TreeModel temp) {
for (SysPermission permission : metaList) {
String tempPid = permission.getParentId();
@ -470,7 +478,7 @@ public class SysRoleController {
getTreeModelList(treeList, metaList, tree);
}
}
}
}

View File

@ -2,13 +2,13 @@ package org.jeecg.modules.system.controller;
import cn.hutool.core.util.RandomUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.PermissionData;
import org.jeecg.common.config.TenantContext;
@ -51,10 +51,10 @@ public class SysTenantController {
@Autowired
private ISysUserTenantService relationService;
@Autowired
private ISysTenantPackService sysTenantPackService;
@Autowired
private BaseCommonService baseCommonService;
@ -115,7 +115,7 @@ public class SysTenantController {
result.setResult(pageList);
return result;
}
/**
*
* @param
@ -125,10 +125,14 @@ public class SysTenantController {
@RequestMapping(value = "/add", method = RequestMethod.POST)
public Result<SysTenant> add(@RequestBody SysTenant sysTenant) {
Result<SysTenant> result = new Result();
if(sysTenantService.getById(sysTenant.getId())!=null){
return result.error500("该编号已存在!");
if (!StrUtil.isBlankIfStr(sysTenant.getId())){
SysTenant tenant = sysTenantService.getById(sysTenant.getId());
if(tenant != null){
return result.error500("该编号已存在!");
}
}
try {
sysTenant.setDelFlag(0);
sysTenantService.saveTenant(sysTenant);
result.success("添加成功!");
} catch (Exception e) {
@ -187,7 +191,7 @@ public class SysTenantController {
}
}
//------------------------------------------------------------------
sysTenantService.removeTenantById(id);
return Result.ok("删除成功");
}
@ -223,7 +227,7 @@ public class SysTenantController {
}
}
//------------------------------------------------------------------
Long userCount = sysTenantService.countUserLinkTenant(id);
if (userCount == 0) {
idList.add(Integer.parseInt(id));
@ -366,7 +370,7 @@ public class SysTenantController {
sysTenantPackService.deletePackPermissions(ids);
return Result.ok("删除租户产品包成功");
}
//===========【低代码应用,前端专用接口 —— 加入限制只能维护和查看自己拥有的租户】==========================================================
@ -483,7 +487,7 @@ public class SysTenantController {
}
return result;
}
/**
*
* @param sysTenant
@ -501,7 +505,7 @@ public class SysTenantController {
Set<String> roles = sysUserService.getUserRolesSet(sysUser.getUsername());
//创建一个付费角色 paymember
if (roles==null || (!roles.contains("paymember") && !roles.contains("admin"))) {
return result.error500("免费用户最多创建两个租户!");
return result.error500("免费用户最多创建两个租户!");
}
}
//---author:scott---date:20220111-----for: 限制免费用户只能创建两个租户--
@ -534,7 +538,7 @@ public class SysTenantController {
return result;
}
}
//update-begin---author:wangshuai ---date:20230107 for[QQYUN-3725]申请加入租户,审核中状态增加接口------------
/**
* (vue3)
@ -588,7 +592,7 @@ public class SysTenantController {
public Result<String> updateUserTenantStatus(@RequestBody SysUserTenant userTenant) {
String tenantId = TenantContext.getTenant();
if (oConvertUtils.isEmpty(tenantId)) {
return Result.error("未找到当前租户信息");
return Result.error("未找到当前租户信息");
}
relationService.updateUserTenantStatus(userTenant.getUserId(), tenantId, userTenant.getStatus());
return Result.ok("更新用户租户状态成功");

View File

@ -974,7 +974,7 @@ public class SysUserController {
List<SysDepart> list = this.sysDepartService.queryUserDeparts(sysUser.getId());
if (CollectionUtil.isNotEmpty(list)) {
list.forEach(item -> {
if (!item.getOrgCategory().equals("1")) {
if (!StrUtil.equalsAny(item.getOrgCategory(), "0", "1")) {
SysDepart compSysDepart = sysDepartService.getCompSysDepartByOrgCode(item.getOrgCode());
//上级公司+当前部门
item.setDepartName(compSysDepart.getDepartName() + ":" + item.getDepartName());

View File

@ -1,14 +1,13 @@
package org.jeecg.modules.system.mapper;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.model.SysDepartTreeModel;
import org.jeecg.modules.system.model.TreeModel;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -127,4 +126,12 @@ public interface SysDepartMapper extends BaseMapper<SysDepart> {
@Select("SELECT * FROM sys_depart where del_flag ='0' AND (parent_id = #{parentId,jdbcType=VARCHAR} or id = #{parentId,jdbcType=VARCHAR})")
List<SysDepart> queryDeptByPidNew(@Param("parentId")String parentId);
List<SysDepart> selectIgnoreLogicDelete(@Param("sysDepart") SysDepart sysDepart);
SysDepart selectIgnoreLogicDeleteById(@Param("id") String id);
Integer updateIgnoreLogicDeleteById(@Param("sysDepart") SysDepart sysDepart);
Integer insertIgnoreLogicDelete(@Param("sysDepart") SysDepart sysDepart);
}

View File

@ -1,10 +1,8 @@
package org.jeecg.modules.system.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.system.entity.SysDepartRoleUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.system.entity.SysDepartRoleUser;
/**
* @Description:

View File

@ -1,10 +1,8 @@
package org.jeecg.modules.system.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.system.entity.SysRoleIndex;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.system.entity.SysRoleIndex;
/**
* @Description:

View File

@ -1,5 +1,6 @@
package org.jeecg.modules.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
@ -101,4 +102,12 @@ public interface SysTenantMapper extends BaseMapper<SysTenant> {
* @return
*/
List<TenantPackUser> queryTenantPackUserList(@Param("page") Page<TenantPackUser> page, @Param("tenantId") String tenantId, @Param("packId") String packId, @Param("status") Integer status);
List<SysTenant> selectIgnoreLogicDelete(@Param("sysTenant") SysTenant sysTenant);
SysTenant selectIgnoreLogicDeleteById(@Param("id") Integer id);
Integer updateIgnoreLogicDeleteById(@Param("sysTenant") SysTenant sysTenant);
Integer insertIgnoreLogicDelete(@Param("sysTenant") SysTenant sysTenant);
}

View File

@ -1,10 +1,8 @@
package org.jeecg.modules.system.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.system.entity.SysUserAgent;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.system.entity.SysUserAgent;
/**
* @Description:

View File

@ -1,12 +1,12 @@
package org.jeecg.modules.system.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.system.entity.SysUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.system.model.SysUserSysDepartModel;
import org.jeecg.modules.system.vo.SysUserDepVo;
@ -181,4 +181,12 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
* @return
*/
List<SysUser> getTenantQuitList(@Param("tenantId") Integer tenantId);
List<SysUser> selectIgnoreLogicDelete(@Param("sysUser") SysUser sysUser);
SysUser selectIgnoreLogicDeleteById(@Param("id") String id);
Integer updateIgnoreLogicDeleteById(@Param("sysUser") SysUser sysUser);
Integer insertIgnoreLogicDelete(@Param("sysUser") SysUser sysUser);
}

View File

@ -1,14 +1,14 @@
package org.jeecg.modules.system.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.entity.SysUserTenant;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.system.vo.SysUserTenantVo;
import java.util.List;
/**
* @Description: sys_user_tenant_relation
* @Author: jeecg-boot

View File

@ -91,4 +91,58 @@
</choose>
ORDER BY org_code DESC
</select>
<select id="selectIgnoreLogicDelete" resultType="org.jeecg.modules.system.entity.SysDepart">
SELECT * FROM sys_depart
<where>
<if test="sysDepart.id != null and sysDepart.id != ''">
and id = #{sysDepart.id}
</if>
</where>
</select>
<select id="selectIgnoreLogicDeleteById" resultType="org.jeecg.modules.system.entity.SysDepart">
select * from sys_depart where id = #{id}
</select>
<update id="updateIgnoreLogicDeleteById">
UPDATE sys_depart
SET parent_id = #{sysDepart.parentId},
depart_name = #{sysDepart.departName},
depart_name_en = #{sysDepart.departNameEn},
depart_name_abbr = #{sysDepart.departNameAbbr},
depart_order = #{sysDepart.departOrder},
description = #{sysDepart.description},
org_category = #{sysDepart.orgCategory},
org_type = #{sysDepart.orgType},
org_code = #{sysDepart.orgCode},
company_id = #{sysDepart.companyId},
mobile = #{sysDepart.mobile},
fax = #{sysDepart.fax},
address = #{sysDepart.address},
memo = #{sysDepart.memo},
status = #{sysDepart.status},
del_flag = #{sysDepart.delFlag},
qywx_identifier = #{sysDepart.qywxIdentifier},
create_by = #{sysDepart.createBy},
create_time = #{sysDepart.createTime},
update_by = #{sysDepart.updateBy},
update_time = #{sysDepart.updateTime},
tenant_id = #{sysDepart.tenantId},
iz_leaf = #{sysDepart.izLeaf}
WHERE id = #{sysDepart.id}
</update>
<insert id="insertIgnoreLogicDelete">
INSERT INTO sys_depart(id, parent_id, depart_name, depart_name_en, depart_name_abbr, depart_order,
description, org_category, org_type, org_code, company_id, mobile, fax, address, memo,
status, del_flag, qywx_identifier, create_by, create_time, update_by, update_time,
tenant_id, iz_leaf)
VALUES (#{sysDepart.id}, #{sysDepart.parentId}, #{sysDepart.departName}, #{sysDepart.departNameEn}, #{sysDepart.departNameAbbr},
#{sysDepart.departOrder}, #{sysDepart.description}, #{sysDepart.orgCategory}, #{sysDepart.orgType}, #{sysDepart.orgCode},
#{sysDepart.companyId}, #{sysDepart.mobile}, #{sysDepart.fax}, #{sysDepart.address}, #{sysDepart.memo},
#{sysDepart.status}, #{sysDepart.delFlag}, #{sysDepart.qywxIdentifier}, #{sysDepart.createBy}, #{sysDepart.createTime},
#{sysDepart.updateBy}, #{sysDepart.updateTime}, #{sysDepart.tenantId}, #{sysDepart.izLeaf})
</insert>
</mapper>

View File

@ -122,4 +122,50 @@
</if>
</select>
<select id="selectIgnoreLogicDelete" resultType="org.jeecg.modules.system.entity.SysTenant">
select * from sys_tenant
</select>
<select id="selectIgnoreLogicDeleteById" resultType="org.jeecg.modules.system.entity.SysTenant">
select * from sys_tenant where id = #{id}
</select>
<update id="updateIgnoreLogicDeleteById">
UPDATE sys_tenant
SET name = #{sysTenant.name},
create_time = #{sysTenant.createTime},
create_by = #{sysTenant.createBy},
begin_date = #{sysTenant.beginDate},
end_date = #{sysTenant.endDate},
status = #{sysTenant.status},
trade = #{sysTenant.trade},
company_size = #{sysTenant.companySize},
company_address = #{sysTenant.companyAddress},
company_logo = #{sysTenant.companyLogo},
house_number = #{sysTenant.houseNumber},
work_place = #{sysTenant.workPlace},
secondary_domain = #{sysTenant.secondaryDomain},
login_bkgd_img = #{sysTenant.loginBkgdImg},
position = #{sysTenant.position},
department = #{sysTenant.department},
del_flag = #{sysTenant.delFlag},
update_by = #{sysTenant.updateBy},
update_time = #{sysTenant.updateTime},
apply_status = #{sysTenant.applyStatus}
WHERE id = #{sysTenant.id}
</update>
<insert id="insertIgnoreLogicDelete">
INSERT INTO sys_tenant(id, name, create_time, create_by, begin_date, end_date, status, trade, company_size,
company_address, company_logo, house_number, work_place, secondary_domain, login_bkgd_img,
position, department, del_flag, update_by, update_time, apply_status)
VALUES (
#{sysTenant.id}, #{sysTenant.name}, #{sysTenant.createTime}, #{sysTenant.createBy}, #{sysTenant.beginDate}, #{sysTenant.endDate}, #{sysTenant.status},
#{sysTenant.trade}, #{sysTenant.companySize}, #{sysTenant.companyAddress}, #{sysTenant.companyLogo},
#{sysTenant.houseNumber}, #{sysTenant.workPlace}, #{sysTenant.secondaryDomain}, #{sysTenant.loginBkgdImg},
#{sysTenant.position}, #{sysTenant.department}, #{sysTenant.delFlag}, #{sysTenant.updateBy}, #{sysTenant.updateTime}, #{sysTenant.applyStatus}
)
</insert>
</mapper>

View File

@ -258,4 +258,64 @@
#{userId}
</foreach>
</update>
<select id="selectIgnoreLogicDelete" resultType="org.jeecg.modules.system.entity.SysUser">
select * from sys_user
<where>
<if test="sysUser.id != null and sysUser.id != ''">
and id = #{sysUser.id}
</if>
<if test="sysUser.username != null and sysUser.username != ''">
and username = #{sysUser.username}
</if>
</where>
</select>
<select id="selectIgnoreLogicDeleteById" resultType="org.jeecg.modules.system.entity.SysUser">
select * from sys_user where id = #{id}
</select>
<update id="updateIgnoreLogicDeleteById">
UPDATE sys_user
SET username = #{sysUser.username},
realname = #{sysUser.realname},
password = #{sysUser.password},
salt = #{sysUser.salt},
avatar = #{sysUser.avatar},
birthday = #{sysUser.birthday},
sex = #{sysUser.sex},
email = #{sysUser.email},
phone = #{sysUser.phone},
org_code = #{sysUser.orgCode},
status = #{sysUser.status},
del_flag = #{sysUser.delFlag},
activiti_sync = #{sysUser.activitiSync},
work_no = #{sysUser.workNo},
post = #{sysUser.post},
telephone = #{sysUser.telephone},
create_by = #{sysUser.createBy},
create_time = #{sysUser.createTime},
update_by = #{sysUser.updateBy},
update_time = #{sysUser.updateTime},
user_identity = #{sysUser.userIdentity},
depart_ids = #{sysUser.departIds},
client_id = #{sysUser.clientId},
login_tenant_id = #{sysUser.loginTenantId},
bpm_status = #{sysUser.bpmStatus},
company_id = #{sysUser.companyId}
WHERE id = #{sysUser.id}
</update>
<insert id="insertIgnoreLogicDelete">
INSERT INTO sys_user(id, username, realname, password, salt, avatar, birthday, sex, email, phone, org_code,
status, del_flag, activiti_sync, work_no, post, telephone,
create_by, create_time, update_by, update_time, user_identity, depart_ids, client_id,
login_tenant_id, bpm_status, company_id)
VALUES (#{sysUser.id}, #{sysUser.username}, #{sysUser.realname}, #{sysUser.password}, #{sysUser.salt},
#{sysUser.avatar}, #{sysUser.birthday}, #{sysUser.sex}, #{sysUser.email}, #{sysUser.phone},
#{sysUser.orgCode}, #{sysUser.status}, #{sysUser.delFlag},
#{sysUser.activitiSync}, #{sysUser.workNo}, #{sysUser.post}, #{sysUser.telephone}, #{sysUser.createBy},
#{sysUser.createTime}, #{sysUser.updateBy}, #{sysUser.updateTime}, #{sysUser.userIdentity}, #{sysUser.departIds},
#{sysUser.clientId}, #{sysUser.loginTenantId}, #{sysUser.bpmStatus}, #{sysUser.companyId})
</insert>
</mapper>

View File

@ -2,6 +2,7 @@ package org.jeecg.modules.system.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.system.entity.SysDepartPermission;
import org.jeecg.modules.system.entity.SysDepartRole;
@ -13,8 +14,6 @@ import org.jeecg.modules.system.mapper.SysDepartRolePermissionMapper;
import org.jeecg.modules.system.mapper.SysPermissionDataRuleMapper;
import org.jeecg.modules.system.service.ISysDepartPermissionService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;

View File

@ -1,6 +1,7 @@
package org.jeecg.modules.system.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.common.util.IpUtils;
import org.jeecg.common.util.SpringContextUtils;
import org.jeecg.common.util.oConvertUtils;
@ -9,8 +10,6 @@ import org.jeecg.modules.system.mapper.SysDepartRolePermissionMapper;
import org.jeecg.modules.system.service.ISysDepartRolePermissionService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.servlet.http.HttpServletRequest;
import java.util.*;

View File

@ -1014,7 +1014,7 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
public SysDepart getCompSysDepartByOrgCode(String orgCode){
SysDepart depart =getDepartByOrgCode(orgCode);
if(depart!=null) {
if (StringUtils.equals(depart.getOrgCategory(), "1")) {
if (StrUtil.equalsAny(depart.getOrgCategory(), "0", "1")) {
return depart;
}
if (StrUtil.isBlank(depart.getParentId())){

View File

@ -1,9 +1,9 @@
package org.jeecg.modules.system.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.system.entity.SysDictItem;
import org.jeecg.modules.system.mapper.SysDictItemMapper;
import org.jeecg.modules.system.service.ISysDictItemService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

View File

@ -13,7 +13,6 @@ import org.jeecg.common.constant.DataBaseConstant;
import org.jeecg.common.constant.SymbolConstant;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.util.JwtUtil;
import org.jeecg.common.system.util.ResourceUtil;
import org.jeecg.common.system.vo.DictModel;
import org.jeecg.common.system.vo.DictModelMany;

View File

@ -8,7 +8,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.base.BaseMap;
import org.jeecg.common.constant.CacheConstant;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.constant.GlobalConstants;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.system.entity.SysGatewayRoute;
@ -19,9 +18,7 @@ import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Description: gateway

View File

@ -1,22 +1,17 @@
package org.jeecg.modules.system.service.impl;
import java.sql.SQLException;
import java.util.Date;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import com.baomidou.mybatisplus.annotation.DbType;
import org.jeecg.common.system.api.ISysBaseAPI;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.common.util.CommonUtils;
import org.jeecg.modules.system.entity.SysLog;
import org.jeecg.modules.system.mapper.SysLogMapper;
import org.jeecg.modules.system.service.ISysLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* <p>

View File

@ -1,12 +1,11 @@
package org.jeecg.modules.system.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.system.entity.SysPackPermission;
import org.jeecg.modules.system.mapper.SysPackPermissionMapper;
import org.jeecg.modules.system.service.ISysPackPermissionService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description:
* @Author: jeecg-boot

View File

@ -1,11 +1,8 @@
package org.jeecg.modules.system.service.impl;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.annotation.Resource;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
@ -17,9 +14,10 @@ import org.jeecg.modules.system.service.ISysPermissionDataRuleService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.annotation.Resource;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
* <p>

View File

@ -1,21 +1,18 @@
package org.jeecg.modules.system.service.impl;
import java.util.*;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.common.util.IpUtils;
import org.jeecg.common.util.SpringContextUtils;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.system.entity.SysRolePermission;
import org.jeecg.modules.system.mapper.SysRolePermissionMapper;
import org.jeecg.modules.system.service.ISysRolePermissionService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletRequest;
import java.util.*;
/**
* <p>

View File

@ -1,13 +1,9 @@
package org.jeecg.modules.system.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.poi.ss.formula.functions.T;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.util.ImportExcelUtil;
import org.jeecg.common.util.PmsUtil;
import org.jeecg.modules.quartz.service.IQuartzJobService;
import org.jeecg.modules.system.entity.SysRole;
import org.jeecg.modules.system.mapper.SysRoleMapper;
import org.jeecg.modules.system.mapper.SysUserMapper;
@ -19,7 +15,6 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

View File

@ -17,12 +17,10 @@ import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.SpringContextUtils;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.aop.TenantLog;
import org.jeecg.modules.sjly.service.ICsXxSjlyService;
import org.jeecg.modules.system.entity.*;
import org.jeecg.modules.system.mapper.SysTenantMapper;
import org.jeecg.modules.system.mapper.SysTenantPackUserMapper;
import org.jeecg.modules.system.mapper.SysUserTenantMapper;
import org.jeecg.modules.system.service.ISysCategoryService;
import org.jeecg.modules.system.service.ISysTenantPackService;
import org.jeecg.modules.system.service.ISysTenantService;
import org.jeecg.modules.system.service.ISysUserService;
@ -57,11 +55,6 @@ public class SysTenantServiceImpl extends ServiceImpl<SysTenantMapper, SysTenant
@Autowired
private SysTenantPackUserMapper sysTenantPackUserMapper;
@Autowired
private ICsXxSjlyService csXxSjlyService;
@Autowired
private ISysCategoryService categoryService;
@Override
public List<SysTenant> queryEffectiveTenant(Collection<Integer> idList) {
@ -160,11 +153,6 @@ public class SysTenantServiceImpl extends ServiceImpl<SysTenantMapper, SysTenant
sysTenant.setHouseNumber(RandomUtil.randomStringUpper(6));
sysTenant.setDelFlag(0);
this.save(sysTenant);
//添加租户时初试化相关配置信息
//1.初始化系统内置的数据类型
//csXxSjlyService.initSjly(sysTenant.getId());
//初始化分类字典
// categoryService.init(sysTenant.getId());
}
@Override

View File

@ -1,21 +1,11 @@
package org.jeecg.modules.system.service.impl;
import java.util.IdentityHashMap;
import java.util.List;
import java.util.Map;
import org.jeecg.modules.system.entity.SysRole;
import org.jeecg.modules.system.entity.SysUser;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.system.entity.SysUserRole;
import org.jeecg.modules.system.mapper.SysUserRoleMapper;
import org.jeecg.modules.system.service.ISysRoleService;
import org.jeecg.modules.system.service.ISysUserRoleService;
import org.jeecg.modules.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* <p>
*

View File

@ -1,6 +1,6 @@
package org.jeecg.modules.system.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@ -26,9 +26,13 @@ import org.jeecg.common.desensitization.annotation.SensitiveEncode;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.system.vo.SysUserCacheInfo;
import org.jeecg.common.util.*;
import org.jeecg.common.util.FillRuleUtil;
import org.jeecg.common.util.PasswordUtil;
import org.jeecg.common.util.UUIDGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.config.mybatis.MybatisPlusSaasConfig;
import org.jeecg.modules.base.service.BaseCommonService;
import org.jeecg.modules.sync.CwgxDataHandler;
import org.jeecg.modules.system.entity.*;
import org.jeecg.modules.system.mapper.*;
import org.jeecg.modules.system.model.SysUserSysDepartModel;
@ -39,11 +43,9 @@ import org.jeecg.modules.system.vo.lowapp.DepartAndUserInfo;
import org.jeecg.modules.system.vo.lowapp.DepartInfo;
import org.jeecg.modules.system.vo.lowapp.UpdateDepartInfo;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -729,9 +731,10 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
@Cacheable(cacheNames=CacheConstant.SYS_USERS_CACHE, key="#username")
@SensitiveEncode
public LoginUser getEncodeUserInfo(String username){
if(oConvertUtils.isEmpty(username)) {
if (StrUtil.isBlank(username)) {
return null;
}
return CwgxDataHandler.handleAndSync(username, () -> {
LoginUser loginUser = new LoginUser();
SysUser sysUser = userMapper.getUserByName(username);
//查询用户的租户ids
@ -741,6 +744,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
}
BeanUtils.copyProperties(sysUser, loginUser);
return loginUser;
});
}
@Override
@ -844,7 +848,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
private void setUserTenantIds(SysUser sysUser) {
if(ObjectUtils.isNotEmpty(sysUser)) {
List<Integer> list = relationMapper.getTenantIdsNoStatus(sysUser.getId());
if(null!=list && list.size()>0){
if (CollectionUtils.isEmpty(list)) {
sysUser.setRelTenantIds(StringUtils.join(list.toArray(), ","));
}else{
sysUser.setRelTenantIds("");

View File

@ -3,9 +3,9 @@ package org.jeecg.modules.system.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.commons.lang.StringUtils;
import org.jeecg.common.constant.CacheConstant;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.constant.SymbolConstant;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.common.util.oConvertUtils;
@ -19,7 +19,6 @@ import org.jeecg.modules.system.vo.SysUserTenantVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;

View File

@ -12,11 +12,19 @@
<artifactId>cwgx-lqfw-start</artifactId>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<!-- SYSTEM 系统管理模块 -->
<dependency>
<groupId>org.jeecgframework.boot.lqfw</groupId>
<artifactId>jeecg-system-biz</artifactId>
<version>${jeecgboot.version}</version>
</dependency>
<dependency>

View File

@ -36,7 +36,7 @@ spring:
job-store-type: jdbc
initialize-schema: embedded
#定时任务启动开关true-开 false-关
auto-startup: false
auto-startup: true
#延迟1秒启动定时任务
startup-delay: 1s
#启动时更新己存在的Job
@ -114,7 +114,7 @@ spring:
timeBetweenEvictionRunsMillis: 60000
# 配置一个连接在池中最小生存的时间,单位是毫秒
minEvictableIdleTimeMillis: 300000
validationQuery: SELECT 1
validationQuery: SELECT 1 FROM DUAL
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
@ -125,16 +125,14 @@ spring:
filters: stat,slf4j
datasource:
master:
url: jdbc:mysql://8.130.133.196:33306/cwgx_lqfw?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&allowMultiQueries=true&serverTimezone=Asia/Shanghai
url: jdbc:mysql://127.0.0.1:3306/cwgx_lqfw?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&allowMultiQueries=true&serverTimezone=Asia/Shanghai
username: root
password: swgx@Qwe123
driver-class-name: com.mysql.cj.jdbc.Driver
password: 1qaz@WSX
cwgx:
url: jdbc:mysql://8.130.133.196:33306/cwgx_dev?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&allowMultiQueries=true&serverTimezone=Asia/Shanghai
url: jdbc:mysql://127.0.0.1:3306/cwgx_dev?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&allowMultiQueries=true&serverTimezone=Asia/Shanghai
username: root
password: swgx@Qwe123
driver-class-name: com.mysql.cj.jdbc.Driver
password: 1qaz@WSX
#redis 配置
redis:
@ -179,12 +177,14 @@ fapiao:
digital:
f7:
url: http://maxkiddie.w1.luyouxia.net/taxshare
url: http://127.0.0.1:9000/taxshare
queue:
# 开启队列模式(发票上传、发票上传结果查询、版式文件生成等)
enable: true
max-thread-size: 3
max-retry-num: 3
# 线程超时回收时间单位s
thread-timeout: 300
leqi:
# 是否模拟环境 true模拟数据 false:调用接口
test_model: false
@ -194,11 +194,11 @@ digital:
#乐企正式服务url, 完整路径url/能力编码/服务编码
prod_url: https://lqpt.chinatax.gov.cn:8443/access/v2/invoke/
#乐企沙箱控制服务url完整路径url/服务编码
sandboxkzfw_url: http://61.150.109.66:8899/access/sandbox_kzfw/v1/
sandboxkzfw_url: http://10.24.10.8:8089/access/sandbox_kzfw/v1/
#乐企沙箱url完整路径url/能力编码/服务编码
sandbox_url: http://61.150.109.66:8899/access/newsandbox/v2/invoke/
sandbox_url: http://10.24.10.8:8089/access/newsandbox/v2/invoke/
#发票回填地址
callbackUrl: http://127.0.0.1:443/taxshare/leqi/fpht
callbackUrl: http://127.0.0.1:9000/taxshare/leqi/fpht
# 固定IP
ip: 127.0.0.1
# MAC码
@ -247,6 +247,7 @@ jeecg:
signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys
#local、minio、alioss、huaweiobs
uploadType: minio
ossPrefix: dev
# 前端访问地址
domainUrl:
pc: http://localhost:3100
@ -283,7 +284,7 @@ jeecg:
minio_url: http://8.130.133.196:9000
minio_name: admin
minio_pass: Qwe@1234
bucketName: cwgx-dev
bucketName: cwgx
staticDomain: http://8.130.133.196:8089/minio
#大屏报表参数设置
jmreport:
@ -303,8 +304,8 @@ jeecg:
logRetentionDays: 30
#分布式锁配置
redisson:
address: 127.0.0.1:6379
password: ''
address: ${spring.redis.host}:${spring.redis.port:6379}
password: ${spring.redis.password}
type: STANDALONE
enabled: true
#cas单点登录
@ -377,6 +378,8 @@ tax:
maxUpload: 1
#发票开具接口是否采用异步 true:异步 false:同步
fpkjIsAsync: true
# 开票结果回填时是否回填版式
tbhtbswj: true
liteflow:
print-banner: false

View File

@ -165,6 +165,8 @@ digital:
enable: ${ENV_DIGITAL_QUEUE:false}
max-thread-size: ${ENV_DIGITAL_THREADSIZE:3}
max-retry-num: ${ENV_DIGITAL_RETRYNUM:3}
# 线程超时回收时间单位s
thread-timeout: ${ENV_DIGITAL_TIMEOUT:300}
leqi:
# 是否模拟环境 true模拟数据 false:调用接口
test_model: false
@ -226,6 +228,7 @@ jeecg:
signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys
#local、minio、alioss、huaweiobs
uploadType: ${ENV_UPLOADTYPE}
ossPrefix: ${ENV_OSS_PREFIX:}
# 前端访问地址
domainUrl:
pc: http://localhost:3100
@ -357,6 +360,8 @@ tax:
maxUpload: 1
#发票开具接口是否采用异步 true:异步 false:同步
fpkjIsAsync: ${ENV_FPKJ_ISASYNC:true}
# 开票结果回填时是否回填版式
tbhtbswj: ${ENV_FPKJ_TBHTBSWJ:false}
liteflow:
#规则文件路径

View File

@ -203,6 +203,10 @@ digital:
queue:
# 开启队列模式(发票上传、发票上传结果查询、版式文件生成等)
enable: false
max-thread-size: 3
max-retry-num: 3
# 线程超时回收时间单位s
thread-timeout: 300
leqi:
# 是否模拟环境 true模拟数据 false:调用接口
test_model: false
@ -267,6 +271,7 @@ jeecg:
signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys
#local、minio、alioss、huaweiobs
uploadType: huaweiobs
ossPrefix:
# 前端访问地址
domainUrl:
pc: http://localhost:3100

View File

@ -1,14 +1,14 @@
${AnsiColor.BRIGHT_BLUE}
(_) | | | |
_ ___ ___ ___ __ _ ______| |__ ___ ___ | |_
_ ___ ___ ___ __ _ ______| |__ ___ ___ | |_
| |/ _ \/ _ \/ __/ _` |______| '_ \ / _ \ / _ \| __|
| | __/ __/ (_| (_| | | |_) | (_) | (_) | |_
| | __/ __/ (_| (_| | | |_) | (_) | (_) | |_
| |\___|\___|\___\__, | |_.__/ \___/ \___/ \__|
_/ | __/ |
_/ | __/ |
|__/ |___/
${AnsiColor.BRIGHT_GREEN}
Jeecg Boot Version: 3.5.3
Spring Boot Version: ${spring-boot.version}${spring-boot.formatted-version}
${AnsiColor.BLACK}
${AnsiColor.DEFAULT}

View File

@ -0,0 +1,17 @@
# 项目编码空为标准产品代码默认为空如广东中烟yc-gdzy
ENV_XMBM:
#--------------------------
# nacos 配置
# *必须* 使用nacos配置,true使用nacos配置false不使用nacos配置
ENV_NACOS_ENABLED: false
# *非必须* nacos配置服务url
ENV_NACOS_SERVER_ADDR: 127.0.0.1:8848
# *非必须* nacos用户
ENV_NACOS_USERNAME: nacos
# *非必须* nacos密码
ENV_NACOS_PASSWORD: nacos
# *非必须* nacos命名空间命名空间id
ENV_NACOS_NAMESPACE: 16f308b2-9885-499c-8f7d-4694200f0090
# *非必须* nacos分组默认DEFAULT_GROUP
ENV_NACOS_GROUP: DEFAULT_GROUP

View File

@ -0,0 +1,43 @@
spring:
application:
name: ${ENV_SPRING_APP_NAME:jeecg-system}
profiles:
active: '@profile.name@'
cloud:
nacos:
# discovery:
# enabled: false
config:
enabled: ${ENV_NACOS_ENABLED:false}
# timeout: 10000
file-extension: yml
# 配置对应的分组
group: ${ENV_NACOS_GROUP:DEFAULT_GROUP}
# group: fp
# 命名空间 常用场景之一是不同环境的配置的区分隔离,例如开发测试环境和生产环境的资源(如配置、服务)隔离等
namespace: ${ENV_NACOS_NAMESPACE:dev}
# Nacos 认证用户
username: ${ENV_NACOS_USERNAME:nacos}
# Nacos 认证密码
password: ${ENV_NACOS_PASSWORD:nacos}
# 配置中心地址
server-addr: ${ENV_NACOS_SERVER_ADDR:127.0.0.1:8848}
auto-refresh: true
max-retry: 3
config-retry-time: 2333
# 用于共享的配置文件
shared-configs:
- data-id: lqfw-common.yml
group: DEFAULT_GROUP
refresh: true
# 个性化配置文件
# 优先级大于 shared-configs在 shared-configs 之后加载
extension-configs:
# 区域个性化 配置文件,根据区域代码来配置
- data-id: lqfw-gxh-${ENV_XMBM:}.yml
# group: fp
refresh: true
# 个人开发者 配置文件,如本地开发希望替换配置,可以配置个人开发配置;如:cwgx-developer-jxw.yml
- data-id: lqfw-developer-${ENV_DEVELOPER_NAME:}.yml
# group: fp
refresh: true

View File

@ -0,0 +1,113 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!--变量配置-->
<Properties>
<!--
%d{yyyy-MM-dd HH:mm:ss, SSS} : 日志生产时间,输出到毫秒的时间
%-5level : 输出日志级别,-5表示左对齐并且固定输出5个字符如果不足在右边补0
%c : logger的名称(%logger)
%t : 输出当前线程名称
%p : 日志输出格式
%m : 日志内容,即 logger.info("message")
%n : 换行符
%C : Java类名(%F)
%L : 行号
%M : 方法名
%l : 输出语句所在的行数, 包括类名、方法名、文件名、行数
hostName : 本地机器名
hostAddress : 本地ip地址
-->
<property name="LOG_PATTERN" value="%date{yyyy-MM-dd HH:mm:ss.SSS} %-5level [%thread] %logger{50}:%L - %msg%n"/>
<!--日志编码-->
<property name="CHARSET" value="utf-8"/>
<!--单个日志文件大小-->
<property name="MAX_FILE_SIZE" value="200MB"/>
<!--日志保存时间-->
<property name="MAX_HISTORY" value="P30D"/>
<!-- 日志存储路径 -->
<property name="FILE_PATH" value="../logs"/>
<!--日志文件名,例如拼接完整的日志路径:/data/logs/app/app-info.log-->
<property name="FILE_NAME" value="lqfw"/>
</Properties>
<appenders>
<Console name="STDOUT" target="SYSTEM_OUT">
<!--设置日志格式及颜色-->
<PatternLayout
pattern="%style{%d{yyyy-MM-dd HH:mm:ss.SSS}}{bright,green} %highlight{%-5level} [%style{%t}{bright,blue}] %style{%C{50}}{bright,yellow}: %msg%n%style{%throwable}{red}"
disableAnsi="false" noConsoleNoAnsi="false"/>
</Console>
<RollingFile name="FILE" fileName="${FILE_PATH}/${FILE_NAME}.log"
filePattern="${FILE_PATH}/${FILE_NAME}-%d{yyyy-MM-dd}.%i.log.gz">
<PatternLayout pattern="${LOG_PATTERN}" charset="${CHARSET}"/>
<Policies>
<!--每天滚动一次-->
<TimeBasedTriggeringPolicy interval="1"/>
<!--或者日志达到10MB 滚动一次-->
<SizeBasedTriggeringPolicy size="10MB"/>
</Policies>
<!--日志删除策略-->
<!--DefaultRolloverStrategy 默认的max=7 代表的是dd最多产生7个文件多余自动删除但是我们会自己定义删除策略所以要屏蔽这个配置如果不屏蔽这个配置则当天日志最多只有7个 -->
<!--源码org.apache.logging.log4j.core.appender.rolling.DefaultRolloverStrategy.Builder.build 当fileIndex=nomax不在使用max变量 -->
<DefaultRolloverStrategy fileIndex="nomax">
<Delete basePath="${FILE_PATH}" maxDepth="2">
<!--删除,正则匹配到文件名-->
<IfFileName glob="${FILE_NAME}-*.html.gz"/>
<!--删除日志距离现在多长事件P1D代表是1天-->
<!--http://logging.apache.org/log4j/2.x/log4j-core/apidocs/org/apache/logging/log4j/core/appender/rolling/action/Duration.html-->
<IfLastModified age="P7D"/>
</Delete>
</DefaultRolloverStrategy>
</RollingFile>
<RollingFile name="HTML" fileName="${FILE_PATH}/error.html"
filePattern="${FILE_PATH}/error-%d{yyyy-MM-dd}.%i.html.gz">
<!--
minLevel最小日志级别
maxLevel最大日志级别
onMatch匹配成功接收
onMismatch匹配失败丢弃
-->
<!-- <LevelRangeFilter minLevel="WARN" maxLevel="DEBUG" onMatch="ACCEPT" onMismatch="DENY"/>-->
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
<HTMLLayout charset="${CHARSET}"/>
<Policies>
<!--每天滚动一次interval的单位 取决于filePattern 这里定义的是dd也就是每天会产生一个新的日志文件 -->
<TimeBasedTriggeringPolicy interval="1" />
</Policies>
<!--日志删除策略-->
<DefaultRolloverStrategy max="7" />
</RollingFile>
<RollingFile name="FILE_HTML" fileName="${FILE_PATH}/${FILE_NAME}.html"
filePattern="${FILE_PATH}/${FILE_NAME}-%d{yyyy-MM-dd}.%i.html.gz">
<HTMLLayout charset="${CHARSET}"/>
<Policies>
<!--每天滚动一次interval的单位 取决于filePattern 这里定义的是dd也就是每天会产生一个新的日志文件 -->
<TimeBasedTriggeringPolicy interval="1"/>
<SizeBasedTriggeringPolicy size="10MB"/>
</Policies>
<!--日志删除策略-->
<DefaultRolloverStrategy max="7" />
</RollingFile>
</appenders>
<loggers>
<!-- logger 用来设置某一个包或者具体的某一个类的日志打印级别、以及指定 -->
<!--myibatis log configure -->
<logger name="com.apache.ibatis" level="TRACE" />
<logger name="java.sql.Connection" level="DEBUG" />
<logger name="java.sql.Statement" level="DEBUG" />
<logger name="java.sql.PreparedStatement" level="DEBUG" />
<root level="info">
<appender-ref ref="STDOUT" level="info"/>
<appender-ref ref="FILE"/>
<appender-ref ref="HTML" />
<appender-ref ref="FILE_HTML" />
</root>
</loggers>
</configuration>

View File

@ -5,22 +5,18 @@
package org.jeecg.loader.repository;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.function.Function;
import java.util.function.Supplier;
import ch.qos.logback.classic.Logger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.gateway.route.RouteDefinition;
import org.springframework.cloud.gateway.route.RouteDefinitionRepository;
import org.springframework.cloud.gateway.support.NotFoundException;
import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* @author qinfeng
*/

View File

@ -8,10 +8,9 @@
<version>3.5.3</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.14</version>
<relativePath/>
<artifactId>jeecg-server-cloud</artifactId>
<groupId>org.jeecgframework.boot.lqfw</groupId>
<version>3.5.3</version>
</parent>
<repositories>
@ -45,17 +44,14 @@
<dependency>
<groupId>org.jeecgframework.nacos</groupId>
<artifactId>nacos-naming</artifactId>
<version>2.2.3</version>
</dependency>
<dependency>
<groupId>org.jeecgframework.nacos</groupId>
<artifactId>nacos-istio</artifactId>
<version>2.2.3</version>
</dependency>
<dependency>
<groupId>org.jeecgframework.nacos</groupId>
<artifactId>nacos-config</artifactId>
<version>2.2.3</version>
<exclusions>
<exclusion>
<groupId>org.apache.tomcat.embed</groupId>
@ -70,7 +66,6 @@
<dependency>
<groupId>org.jeecgframework.nacos</groupId>
<artifactId>nacos-console</artifactId>
<version>2.2.3</version>
</dependency>
</dependencies>

View File

@ -16,6 +16,13 @@
<dependency>
<groupId>org.jeecgframework.boot</groupId>
<artifactId>jeecg-boot-starter-cloud</artifactId>
<!-- 3.2版本号后可选择是否排除jeecg-system-cloud-api不排除会优先通过fegin调用接口
<exclusions>
<exclusion>
<groupId>org.jeecgframework.boot</groupId>
<artifactId>jeecg-system-cloud-api</artifactId>
</exclusion>
</exclusions>-->
<exclusions>
<exclusion>
<groupId>cn.hutool</groupId>
@ -31,16 +38,44 @@
<dependency>
<groupId>org.jeecgframework.boot.lqfw</groupId>
<artifactId>jeecg-system-biz</artifactId>
<!-- 排除demo模块demo模块采用微服务独立启动 -->
<!-- <exclusions>
<exclusion>
<groupId>org.jeecgframework.boot</groupId>
<artifactId>jeecg-module-demo</artifactId>
</exclusion>
</exclusions>-->
</dependency>
<!-- feign 熔断限流、分布式锁、xxljob示例
<dependency>
<groupId>org.jeecgframework.boot</groupId>
<artifactId>jeecg-cloud-test-more</artifactId>
<version>${jeecgboot.version}</version>
</dependency>-->
<!-- rabbitmq例子
<dependency>
<groupId>org.jeecgframework.boot</groupId>
<artifactId>jeecg-cloud-test-rabbitmq</artifactId>
<version>${jeecgboot.version}</version>
</dependency>-->
<!-- 分布式事务例子
<dependency>
<groupId>org.jeecgframework.boot</groupId>
<artifactId>jeecg-cloud-test-seata</artifactId>
<version>${jeecgboot.version}</version>
</dependency>-->
<!-- 分库分表例子
<dependency>
<groupId>org.jeecgframework.boot</groupId>
<artifactId>jeecg-cloud-test-shardingsphere</artifactId>
<version>${jeecgboot.version}</version>
</dependency>-->
<dependency>
<groupId>org.jeecgframework.boot.lqfw</groupId>
<artifactId>com.foresee.lqfw.sdk</artifactId>
<artifactId>jeecg-module-lqfw</artifactId>
<version>${jeecgboot.version}</version>
<scope>system</scope>
<systemPath>
${pom.basedir}/../../lib/com.foresee.lqfw.sdk-3.5.3.jar
</systemPath>
</dependency>
</dependencies>

View File

@ -11,7 +11,6 @@
<artifactId>jeecg-server-cloud</artifactId>
<packaging>pom</packaging>
<name>JEECG SERVER CLOUD</name>
<modules>
<module>jeecg-cloud-gateway</module>

Binary file not shown.

126
pom.xml
View File

@ -14,12 +14,6 @@
<relativePath/>
</parent>
<scm>
<connection>http://www.jeecg.com</connection>
<developerConnection>https://qiaoqiaoyun.com</developerConnection>
<url>http://www.jeecg.com/vip</url>
</scm>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
@ -28,6 +22,7 @@
<jeecgboot.version>3.5.3</jeecgboot.version>
<logback.version>1.3.14</logback.version>
<lombok.version>1.18.24</lombok.version>
<mapstruct.version>1.5.2.Final</mapstruct.version>
</properties>
@ -38,7 +33,6 @@
<module>jeecg-boot-base-core</module>
<module>jeecg-module-system</module>
<module>jeecg-module-cspt</module>
<module>jeecg-module-lqfw</module>
<module>jeecg-module-deliver</module>
<module>jeecg-server-cloud</module>
</modules>
@ -79,6 +73,27 @@
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- log4j2 begin -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
</dependency>
<!-- log4j2 end -->
<!-- <dependency>-->
<!-- <groupId>ch.qos.logback</groupId>-->
<!-- <artifactId>logback-classic</artifactId>-->
<!-- <version>${logback.version}</version>-->
<!-- </dependency>-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
@ -100,6 +115,99 @@
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpasyncclient</artifactId>
</dependency>
<dependency>
<groupId>com.github.ulisesbocchio</groupId>
<artifactId>jasypt-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.ofdrw</groupId>
<artifactId>ofdrw-full</artifactId>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</dependency>
<dependency>
<groupId>com.huaweicloud</groupId>
<artifactId>esdk-obs-java</artifactId>
</dependency>
<dependency>
<groupId>net.coobird</groupId>
<artifactId>thumbnailator</artifactId>
</dependency>
<dependency>
<groupId>net.javacrumbs.shedlock</groupId>
<artifactId>shedlock-spring</artifactId>
</dependency>
<!--每个外部存储实例所需依赖包不一样这里是jdbc-->
<dependency>
<groupId>net.javacrumbs.shedlock</groupId>
<artifactId>shedlock-provider-jdbc-template</artifactId>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
</dependency>
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
</dependency>
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>font-asian</artifactId>
</dependency>
<dependency>
<groupId>com.openhtmltopdf</groupId>
<artifactId>openhtmltopdf-core</artifactId>
</dependency>
<dependency>
<groupId>com.openhtmltopdf</groupId>
<artifactId>openhtmltopdf-pdfbox</artifactId>
</dependency>
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
</dependency>
<dependency>
<groupId>com.squareup.okio</groupId>
<artifactId>okio</artifactId>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
</dependency>
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper</artifactId>
</dependency>
<dependency>
<groupId>com.yomahub</groupId>
<artifactId>liteflow-spring-boot-starter</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
@ -164,6 +272,7 @@
<resource>
<directory>src/main/resources</directory>
<excludes>
<exclude>config/bootstrap*.yml</exclude>
<exclude>application*.yml</exclude>
</excludes>
</resource>
@ -171,6 +280,8 @@
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>config/bootstrap.yml</include>
<include>config/bootstrap-${profile.name}.yml</include>
<include>application.yml</include>
<include>application-${profile.name}.yml</include>
</includes>
@ -182,7 +293,6 @@
<include>**/*.json</include>
<include>**/*.ftl</include>
<include>**/*.yml</include>
</includes>
</resource>
</resources>