微服务后端空项目初始化
This commit is contained in:
220
demo-service/pom.xml
Normal file
220
demo-service/pom.xml
Normal file
@ -0,0 +1,220 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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>com.geg</groupId>
|
||||
<artifactId>ms-demo</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>demo-service</artifactId>
|
||||
<name>demo-service</name>
|
||||
<description>demo-service</description>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.geg</groupId>
|
||||
<artifactId>itc-ms-common-service</artifactId>
|
||||
<version>${framework.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.geg</groupId>-->
|
||||
<!-- <artifactId>itc-ms-system-api</artifactId>-->
|
||||
<!-- <version>${revision}</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- springCloud 整合的openFeign -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-loadbalancer</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>redis.clients</groupId>
|
||||
<artifactId>jedis</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--引入nacos依赖-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--引入spring-cloud-alibaba-nacos-config依赖-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--引入spring-cloud-alibaba-nacos-config bootstrap依赖-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-bootstrap</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--引入sentinel依赖-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||
<artifactId>jackson-dataformat-xml</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.csp</groupId>
|
||||
<artifactId>sentinel-datasource-nacos</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- mybatis-plus 多表关联 -->
|
||||
<dependency>
|
||||
<groupId>com.github.yulichang</groupId>
|
||||
<artifactId>mybatis-plus-join</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.cloud.govern</groupId>
|
||||
<artifactId>service-invoke-sdk</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.freemarker</groupId>
|
||||
<artifactId>freemarker</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.unfbx</groupId>
|
||||
<artifactId>chatgpt-java</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>tech.powerjob</groupId>
|
||||
<artifactId>powerjob-worker-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>me.zhyd.oauth</groupId>
|
||||
<artifactId>JustAuth</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-authz-client</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.microsoft.ews-java-api</groupId>
|
||||
<artifactId>ews-java-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>tech.powerjob</groupId>
|
||||
<artifactId>powerjob-official-processors</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>tech.powerjob</groupId>
|
||||
<artifactId>powerjob-worker</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.smallbun.screw</groupId>
|
||||
<artifactId>screw-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.github.openfeign</groupId>
|
||||
<artifactId>feign-okhttp</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.belerweb</groupId>
|
||||
<artifactId>pinyin4j</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.yml</include>
|
||||
<include>**/*.properties</include>
|
||||
<include>**/*.xml</include>
|
||||
</includes>
|
||||
<filtering>false</filtering>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*.yml</include>
|
||||
<include>**/*.properties</include>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.vm</include>
|
||||
<include>**/*.ftl</include>
|
||||
<include>**/*.jpg</include>
|
||||
<include>**/*.png</include>
|
||||
<include>**/*.xls</include>
|
||||
<include>**/*.xlsx</include>
|
||||
</includes>
|
||||
<filtering>false</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
</project>
|
||||
@ -1,21 +1,25 @@
|
||||
package com.xjrsoft.auth;
|
||||
package com.xjrsoft;
|
||||
|
||||
import com.xjrsoft.common.annotation.UniqueNameGenerator;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.EnableAspectJAutoProxy;
|
||||
|
||||
/**
|
||||
* 启动:Sa-SSO Server端
|
||||
* @author Zexy
|
||||
*/
|
||||
@SpringBootApplication
|
||||
@EnableAspectJAutoProxy(exposeProxy = true)
|
||||
@ComponentScan(nameGenerator = UniqueNameGenerator.class)
|
||||
@EnableFeignClients
|
||||
@EnableDiscoveryClient
|
||||
@EnableFeignClients(basePackages = "com.xjrsoft")
|
||||
@ComponentScan(value = "com.xjrsoft")
|
||||
public class AuthApplication {
|
||||
public class ITCDemoApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(AuthApplication.class, args);
|
||||
SpringApplication.run(ITCDemoApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package com.xjrsoft.common.schedule;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
@Component
|
||||
@ConditionalOnProperty(name = {"schedule.enabled","schedule.sync-xx.enabled"}, havingValue = "true")
|
||||
@Slf4j
|
||||
@EnableScheduling
|
||||
public class DemoSysncTask {
|
||||
@Scheduled(cron = "${schedule.sync-xx.cron:0 0/60 * * * *}") //60分钟跑一次
|
||||
public void sync(){
|
||||
log.info("同步XX数据 => " + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
|
||||
try{
|
||||
//todo 任务具体实现
|
||||
} catch (Exception e){
|
||||
log.error("同步XX数据失败:" + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package com.xjrsoft.common.util;
|
||||
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class SpringContextUtil implements ApplicationContextAware {
|
||||
|
||||
private static ApplicationContext context;
|
||||
|
||||
@Override
|
||||
public void setApplicationContext(ApplicationContext applicationContext) {
|
||||
SpringContextUtil.context = applicationContext;
|
||||
}
|
||||
|
||||
public static ApplicationContext getApplicationContext() {
|
||||
return context;
|
||||
}
|
||||
|
||||
public static <T> T getBean(Class<T> beanClass) {
|
||||
return context.getBean(beanClass);
|
||||
}
|
||||
|
||||
public static Object getBean(String beanName) {
|
||||
return context.getBean(beanName);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,98 @@
|
||||
package com.xjrsoft.module.prdManage.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.xjrsoft.common.model.result.R;
|
||||
import com.xjrsoft.common.page.ConventPage;
|
||||
import com.xjrsoft.common.page.PageOutput;
|
||||
import com.xjrsoft.common.utils.VoToColumnUtil;
|
||||
import com.xjrsoft.module.prdManage.dto.AddDemoApplianceDto;
|
||||
import com.xjrsoft.module.prdManage.dto.DemoAppliancePageDto;
|
||||
import com.xjrsoft.module.prdManage.dto.UpdateDemoApplianceDto;
|
||||
import com.xjrsoft.module.prdManage.entity.DemoAppliance;
|
||||
import com.xjrsoft.module.prdManage.service.IDemoApplianceService;
|
||||
import com.xjrsoft.module.prdManage.vo.DemoAppliancePageVo;
|
||||
import com.xjrsoft.module.prdManage.vo.DemoApplianceVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @title: 示例-家电管理
|
||||
* @Author 管理员
|
||||
* @Date: 2025-03-12
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/prdManage" + "/demoAppliance")
|
||||
@Api(value = "/prdManage" + "/demoAppliance",tags = "示例-家电管理代码")
|
||||
@AllArgsConstructor
|
||||
public class DemoApplianceController {
|
||||
|
||||
|
||||
private final IDemoApplianceService demoApplianceService;
|
||||
|
||||
@GetMapping(value = "/page")
|
||||
@ApiOperation(value="DemoAppliance列表(分页)")
|
||||
@SaCheckPermission("demoAppliance:list")
|
||||
public R page(@Valid DemoAppliancePageDto dto){
|
||||
|
||||
LambdaQueryWrapper<DemoAppliance> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper
|
||||
.like(StrUtil.isNotBlank(dto.getName()),DemoAppliance::getName,dto.getName())
|
||||
.like(StrUtil.isNotBlank(dto.getSerialNumber()),DemoAppliance::getSerialNumber,dto.getSerialNumber())
|
||||
.like(StrUtil.isNotBlank(dto.getCategory()),DemoAppliance::getCategory,dto.getCategory())
|
||||
.orderByDesc(DemoAppliance::getId)
|
||||
.select(DemoAppliance.class,x -> VoToColumnUtil.fieldsToColumns(DemoAppliancePageVo.class).contains(x.getProperty()));
|
||||
IPage<DemoAppliance> page = demoApplianceService.page(ConventPage.getPage(dto), queryWrapper);
|
||||
PageOutput<DemoAppliancePageVo> pageOutput = ConventPage.getPageOutput(page, DemoAppliancePageVo.class);
|
||||
return R.ok(pageOutput);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/info")
|
||||
@ApiOperation(value="根据id查询DemoAppliance信息")
|
||||
@SaCheckPermission("demoAppliance:detail")
|
||||
public R info(@RequestParam Integer id){
|
||||
DemoAppliance demoAppliance = demoApplianceService.getById(id);
|
||||
if (demoAppliance == null) {
|
||||
return R.error("找不到此数据!");
|
||||
}
|
||||
return R.ok(BeanUtil.toBean(demoAppliance, DemoApplianceVo.class));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation(value = "新增DemoAppliance")
|
||||
@SaCheckPermission("demoAppliance:add")
|
||||
public R add(@Valid @RequestBody AddDemoApplianceDto dto){
|
||||
DemoAppliance demoAppliance = BeanUtil.toBean(dto, DemoAppliance.class);
|
||||
boolean isSuccess = demoApplianceService.save(demoAppliance);
|
||||
return R.ok(demoAppliance.getId());
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation(value = "修改DemoAppliance")
|
||||
@SaCheckPermission("demoAppliance:edit")
|
||||
public R update(@Valid @RequestBody UpdateDemoApplianceDto dto){
|
||||
|
||||
DemoAppliance demoAppliance = BeanUtil.toBean(dto, DemoAppliance.class);
|
||||
return R.ok(demoApplianceService.updateById(demoAppliance));
|
||||
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除")
|
||||
@SaCheckPermission("demoAppliance:delete")
|
||||
public R delete(@Valid @RequestBody List<Integer> ids){
|
||||
return R.ok(demoApplianceService.removeBatchByIds(ids));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,67 @@
|
||||
package com.xjrsoft.module.prdManage.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
||||
/**
|
||||
* @title: 示例-家电管理
|
||||
* @Author 管理员
|
||||
* @Date: 2025-03-12
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class AddDemoApplianceDto implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String name;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String serialNumber;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String category;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private LocalDateTime purchaseDate;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private Integer warrantyPeriod;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private Integer powerRating;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String brand;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private Double sellingPrice;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String status;
|
||||
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
package com.xjrsoft.module.prdManage.dto;
|
||||
|
||||
import com.xjrsoft.common.page.PageInput;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
||||
/**
|
||||
* @title: 分页查询入参
|
||||
* @Author 管理员
|
||||
* @Date: 2025-03-12
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class DemoAppliancePageDto extends PageInput {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String name;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String serialNumber;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String category;
|
||||
|
||||
}
|
||||
@ -0,0 +1,72 @@
|
||||
package com.xjrsoft.module.prdManage.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
||||
/**
|
||||
* @title: 示例-家电管理
|
||||
* @Author 管理员
|
||||
* @Date: 2025-03-12
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class UpdateDemoApplianceDto implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private Integer id;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String name;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String serialNumber;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String category;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private LocalDateTime purchaseDate;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private Integer warrantyPeriod;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private Integer powerRating;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String brand;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private Double sellingPrice;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String status;
|
||||
|
||||
}
|
||||
@ -0,0 +1,79 @@
|
||||
package com.xjrsoft.module.prdManage.entity;
|
||||
|
||||
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 java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
||||
/**
|
||||
* @title: 示例-家电管理
|
||||
* @Author 管理员
|
||||
* @Date: 2025-03-12
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("demo_appliance")
|
||||
@ApiModel(value = "示例-家电管理对象", description = "示例-家电管理")
|
||||
public class DemoAppliance implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
@TableId
|
||||
private Integer id;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String name;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String serialNumber;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String category;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private LocalDateTime purchaseDate;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private Integer warrantyPeriod;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private Integer powerRating;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String brand;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private Double sellingPrice;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String status;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.xjrsoft.module.prdManage.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.xjrsoft.module.prdManage.entity.DemoAppliance;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
* @Author 管理员
|
||||
* @Date: 2025-03-12
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface DemoApplianceMapper extends BaseMapper<DemoAppliance> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.xjrsoft.module.prdManage.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.xjrsoft.module.prdManage.entity.DemoAppliance;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
* @Date: 2025-03-12
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
public interface IDemoApplianceService extends IService<DemoAppliance> {
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.xjrsoft.module.prdManage.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.xjrsoft.module.prdManage.entity.DemoAppliance;
|
||||
import com.xjrsoft.module.prdManage.mapper.DemoApplianceMapper;
|
||||
import com.xjrsoft.module.prdManage.service.IDemoApplianceService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
* @Date: 2025-03-12
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class DemoApplianceServiceImpl extends ServiceImpl<DemoApplianceMapper, DemoAppliance> implements IDemoApplianceService {
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
package com.xjrsoft.module.prdManage.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @title: 分页列表出参
|
||||
* @Author 管理员
|
||||
* @Date: 2025-03-12
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class DemoAppliancePageVo {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String id;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String name;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String serialNumber;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String category;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private LocalDateTime purchaseDate;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private Integer warrantyPeriod;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private Integer powerRating;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String brand;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private Double sellingPrice;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String status;
|
||||
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package com.xjrsoft.module.prdManage.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @title: 表单出参
|
||||
* @Author 管理员
|
||||
* @Date: 2025-03-12
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class DemoApplianceVo {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private Integer id;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String name;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String serialNumber;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String category;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private LocalDateTime purchaseDate;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private Integer warrantyPeriod;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private Integer powerRating;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String brand;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private Double sellingPrice;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String status;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
package com.xjrsoft.module.relationManage.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.xjrsoft.common.model.result.R;
|
||||
import com.xjrsoft.common.page.ConventPage;
|
||||
import com.xjrsoft.common.page.PageOutput;
|
||||
import com.xjrsoft.common.utils.VoToColumnUtil;
|
||||
import com.xjrsoft.module.relationManage.dto.AddDemoCustomerDto;
|
||||
import com.xjrsoft.module.relationManage.dto.DemoCustomerPageDto;
|
||||
import com.xjrsoft.module.relationManage.dto.UpdateDemoCustomerDto;
|
||||
import com.xjrsoft.module.relationManage.entity.DemoCustomer;
|
||||
import com.xjrsoft.module.relationManage.service.IDemoCustomerManageService;
|
||||
import com.xjrsoft.module.relationManage.vo.DemoCustomerPageVo;
|
||||
import com.xjrsoft.module.relationManage.vo.DemoCustomerVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @title: demo_客户管理
|
||||
* @Author 管理员
|
||||
* @Date: 2025-03-11
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/relationManage" + "/demoCustomerManage")
|
||||
@Api(value = "/relationManage" + "/demoCustomerManage",tags = "demo_客户管理代码")
|
||||
@AllArgsConstructor
|
||||
public class DemoCustomerManageController {
|
||||
|
||||
|
||||
private final IDemoCustomerManageService demoCustomerManageService;
|
||||
|
||||
@GetMapping(value = "/page")
|
||||
@ApiOperation(value="DemoCustomer列表(分页)")
|
||||
@SaCheckPermission("demoCustomerManage:list")
|
||||
public R page(@Valid DemoCustomerPageDto dto){
|
||||
|
||||
LambdaQueryWrapper<DemoCustomer> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper
|
||||
.like(StrUtil.isNotBlank(dto.getName()),DemoCustomer::getName,dto.getName())
|
||||
.like(StrUtil.isNotBlank(dto.getGender()),DemoCustomer::getGender,dto.getGender())
|
||||
.like(StrUtil.isNotBlank(dto.getPhone()),DemoCustomer::getPhone,dto.getPhone())
|
||||
.like(StrUtil.isNotBlank(dto.getEmail()),DemoCustomer::getEmail,dto.getEmail())
|
||||
.orderByDesc(DemoCustomer::getId)
|
||||
.select(DemoCustomer.class,x -> VoToColumnUtil.fieldsToColumns(DemoCustomerPageVo.class).contains(x.getProperty()));
|
||||
IPage<DemoCustomer> page = demoCustomerManageService.page(ConventPage.getPage(dto), queryWrapper);
|
||||
PageOutput<DemoCustomerPageVo> pageOutput = ConventPage.getPageOutput(page, DemoCustomerPageVo.class);
|
||||
return R.ok(pageOutput);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/info")
|
||||
@ApiOperation(value="根据id查询DemoCustomer信息")
|
||||
@SaCheckPermission("demoCustomerManage:detail")
|
||||
public R info(@RequestParam Long id){
|
||||
DemoCustomer demoCustomer = demoCustomerManageService.getById(id);
|
||||
if (demoCustomer == null) {
|
||||
return R.error("找不到此数据!");
|
||||
}
|
||||
return R.ok(BeanUtil.toBean(demoCustomer, DemoCustomerVo.class));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation(value = "新增DemoCustomer")
|
||||
@SaCheckPermission("demoCustomerManage:add")
|
||||
public R add(@Valid @RequestBody AddDemoCustomerDto dto){
|
||||
DemoCustomer demoCustomer = BeanUtil.toBean(dto, DemoCustomer.class);
|
||||
boolean isSuccess = demoCustomerManageService.save(demoCustomer);
|
||||
return R.ok(demoCustomer.getId());
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation(value = "修改DemoCustomer")
|
||||
@SaCheckPermission("demoCustomerManage:edit")
|
||||
public R update(@Valid @RequestBody UpdateDemoCustomerDto dto){
|
||||
|
||||
DemoCustomer demoCustomer = BeanUtil.toBean(dto, DemoCustomer.class);
|
||||
return R.ok(demoCustomerManageService.updateById(demoCustomer));
|
||||
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除")
|
||||
@SaCheckPermission("demoCustomerManage:delete")
|
||||
public R delete(@Valid @RequestBody List<Long> ids){
|
||||
return R.ok(demoCustomerManageService.removeBatchByIds(ids));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
package com.xjrsoft.module.relationManage.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
||||
/**
|
||||
* @title: demo_客户管理
|
||||
* @Author 管理员
|
||||
* @Date: 2025-03-11
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class AddDemoCustomerDto implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String name;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String gender;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String phone;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String email;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String address;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String company;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String position;
|
||||
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package com.xjrsoft.module.relationManage.dto;
|
||||
|
||||
import com.xjrsoft.common.page.PageInput;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
||||
/**
|
||||
* @title: 分页查询入参
|
||||
* @Author 管理员
|
||||
* @Date: 2025-03-11
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class DemoCustomerPageDto extends PageInput {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String name;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String gender;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String phone;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String email;
|
||||
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.xjrsoft.module.relationManage.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
||||
/**
|
||||
* @title: demo_客户管理
|
||||
* @Author 管理员
|
||||
* @Date: 2025-03-11
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class UpdateDemoCustomerDto implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private Long id;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String name;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String gender;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String phone;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String email;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String address;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String company;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String position;
|
||||
}
|
||||
@ -0,0 +1,90 @@
|
||||
package com.xjrsoft.module.relationManage.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
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 java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
||||
/**
|
||||
* @title: demo_客户管理
|
||||
* @Author 管理员
|
||||
* @Date: 2025-03-11
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("demo_customer")
|
||||
@ApiModel(value = "demo_客户管理对象", description = "demo_客户管理")
|
||||
public class DemoCustomer implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String name;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String gender;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String phone;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String email;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String address;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String company;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String position;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private LocalDateTime createDate;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long deptId;
|
||||
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.xjrsoft.module.relationManage.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.xjrsoft.module.relationManage.entity.DemoCustomer;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
* @Author 管理员
|
||||
* @Date: 2025-03-11
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface DemoCustomerMapper extends BaseMapper<DemoCustomer> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.xjrsoft.module.relationManage.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.xjrsoft.module.relationManage.entity.DemoCustomer;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
* @Date: 2025-03-11
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
public interface IDemoCustomerManageService extends IService<DemoCustomer> {
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.xjrsoft.module.relationManage.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.xjrsoft.module.relationManage.entity.DemoCustomer;
|
||||
import com.xjrsoft.module.relationManage.mapper.DemoCustomerMapper;
|
||||
import com.xjrsoft.module.relationManage.service.IDemoCustomerManageService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
* @Date: 2025-03-11
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class DemoCustomerManageServiceImpl extends ServiceImpl<DemoCustomerMapper, DemoCustomer> implements IDemoCustomerManageService {
|
||||
}
|
||||
@ -0,0 +1,56 @@
|
||||
package com.xjrsoft.module.relationManage.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @title: 分页列表出参
|
||||
* @Author 管理员
|
||||
* @Date: 2025-03-11
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class DemoCustomerPageVo {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String id;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String name;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String gender;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String phone;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String email;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String address;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String company;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String position;
|
||||
|
||||
}
|
||||
@ -0,0 +1,74 @@
|
||||
package com.xjrsoft.module.relationManage.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @title: 表单出参
|
||||
* @Author 管理员
|
||||
* @Date: 2025-03-11
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class DemoCustomerVo {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private Long id;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String name;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String gender;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String phone;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String email;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String address;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String company;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String position;
|
||||
|
||||
@ApiModelProperty("")
|
||||
private LocalDateTime createDate;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private Long deptId;
|
||||
|
||||
|
||||
}
|
||||
@ -1,3 +1,3 @@
|
||||
spring:
|
||||
profiles:
|
||||
active: public
|
||||
active: dev
|
||||
6
demo-service/src/main/resources/banner.txt
Normal file
6
demo-service/src/main/resources/banner.txt
Normal file
@ -0,0 +1,6 @@
|
||||
██╗ ██╗ ██╗██████╗ ███████╗ ██████╗ ███████╗████████╗
|
||||
╚██╗██╔╝ ██║██╔══██╗██╔════╝██╔═══██╗██╔════╝╚══██╔══╝
|
||||
╚███╔╝ ██║██████╔╝███████╗██║ ██║█████╗ ██║
|
||||
██╔██╗ ██ ██║██╔══██╗╚════██║██║ ██║██╔══╝ ██║
|
||||
██╔╝ ██╗╚█████╔╝██║ ██║███████║╚██████╔╝██║ ██║
|
||||
╚═╝ ╚═╝ ╚════╝ ╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝
|
||||
@ -1,60 +1,50 @@
|
||||
server:
|
||||
port: 1024
|
||||
port: 9001
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: auth-service
|
||||
name: demo-service
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://10.0.252.7:3306/fcd2-msat-init?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true
|
||||
username: learun4dev
|
||||
password: ABcd1234@
|
||||
# autoconfigure:
|
||||
# #自动化配置 例外处理
|
||||
# exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
|
||||
|
||||
cloud:
|
||||
nacos: #nacos监控
|
||||
discovery:
|
||||
server-addr: 10.0.252.1:8848
|
||||
namespace: ITC
|
||||
namespace: ITC-MS
|
||||
group: DNE
|
||||
username: nacos
|
||||
password: ABcd1234@
|
||||
config:
|
||||
server-addr: 10.0.252.1:8848 # nacos 配置中心地址
|
||||
namespace: ITC
|
||||
namespace: ITC-MS
|
||||
group: DNE
|
||||
username: nacos
|
||||
password: ABcd1234@
|
||||
file-extension: yml # 指定格式 xjrsoft-auth-service-dev.yml
|
||||
file-extension: yml # 默认配置 ${spring.application.name}-${spring.profiles.active}.${file-extension}
|
||||
extension-configs:
|
||||
- data-id: global-config.yml
|
||||
refresh: true
|
||||
group: DNE
|
||||
- data-id: redis-config.yml
|
||||
refresh: true
|
||||
group: DNE
|
||||
- data-id: sa-token-client-config.yml
|
||||
refresh: true
|
||||
group: DNE
|
||||
- data-id: redis-config.yml
|
||||
refresh: true
|
||||
group: DNE
|
||||
- data-id: datasource-config.yml
|
||||
refresh: true
|
||||
group: DNE
|
||||
- data-id: camunda-config.yml
|
||||
refresh: true
|
||||
group: DNE
|
||||
- data-id: demo-config.yml
|
||||
refresh: true
|
||||
group: DNE
|
||||
sentinel:
|
||||
transport:
|
||||
dashboard: localhost:8080 #sentinel dashboard 地址
|
||||
port: 8719 #默认端口, 如果 被占用,会一直+1 直到未被占用为止
|
||||
|
||||
springdoc:
|
||||
swagger-ui:
|
||||
path: /swagger-ui.html
|
||||
tags-sorter: alpha
|
||||
operations-sorter: alpha
|
||||
show-extensions: true
|
||||
api-docs:
|
||||
path: '/sso/v3/api-docs'
|
||||
group-configs:
|
||||
- group: 'default'
|
||||
paths-to-match: '/sso/**'
|
||||
packages-to-scan: com.xjrsoft.auth
|
||||
default-flat-param-object: false
|
||||
237
facade-service/pom.xml
Normal file
237
facade-service/pom.xml
Normal file
@ -0,0 +1,237 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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>com.geg</groupId>
|
||||
<artifactId>ms-demo</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>facade-service</artifactId>
|
||||
<name>facade-service</name>
|
||||
<description>facade-service</description>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.geg</groupId>
|
||||
<artifactId>itc-ms-common-service</artifactId>
|
||||
<version>${framework.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.geg</groupId>
|
||||
<artifactId>itc-ms-facade-api</artifactId>
|
||||
<version>${framework.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- springCloud 整合的openFeign -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-loadbalancer</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>redis.clients</groupId>
|
||||
<artifactId>jedis</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--引入nacos依赖-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--引入spring-cloud-alibaba-nacos-config依赖-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--引入spring-cloud-alibaba-nacos-config bootstrap依赖-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-bootstrap</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--引入sentinel依赖-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||
<artifactId>jackson-dataformat-xml</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.csp</groupId>
|
||||
<artifactId>sentinel-datasource-nacos</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- mybatis-plus 多表关联 -->
|
||||
<dependency>
|
||||
<groupId>com.github.yulichang</groupId>
|
||||
<artifactId>mybatis-plus-join</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.cloud.govern</groupId>
|
||||
<artifactId>service-invoke-sdk</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.freemarker</groupId>
|
||||
<artifactId>freemarker</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.unfbx</groupId>
|
||||
<artifactId>chatgpt-java</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>tech.powerjob</groupId>
|
||||
<artifactId>powerjob-worker-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>me.zhyd.oauth</groupId>
|
||||
<artifactId>JustAuth</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-authz-client</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.microsoft.ews-java-api</groupId>
|
||||
<artifactId>ews-java-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>tech.powerjob</groupId>
|
||||
<artifactId>powerjob-official-processors</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>tech.powerjob</groupId>
|
||||
<artifactId>powerjob-worker</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.smallbun.screw</groupId>
|
||||
<artifactId>screw-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.github.openfeign</groupId>
|
||||
<artifactId>feign-okhttp</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.belerweb</groupId>
|
||||
<artifactId>pinyin4j</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>2.7.6</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<!--<classifier>classes</classifier>-->
|
||||
<attach>false</attach>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.yml</include>
|
||||
<include>**/*.properties</include>
|
||||
<include>**/*.xml</include>
|
||||
</includes>
|
||||
<filtering>false</filtering>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*.yml</include>
|
||||
<include>**/*.properties</include>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.vm</include>
|
||||
<include>**/*.ftl</include>
|
||||
<include>**/*.jpg</include>
|
||||
<include>**/*.png</include>
|
||||
<include>**/*.xls</include>
|
||||
<include>**/*.xlsx</include>
|
||||
</includes>
|
||||
<filtering>false</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
</project>
|
||||
@ -1,25 +1,25 @@
|
||||
package com.xjrsoft.generate;
|
||||
package com.xjrsoft;
|
||||
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import com.xjrsoft.common.annotation.UniqueNameGenerator;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
|
||||
import org.springframework.context.annotation.EnableAspectJAutoProxy;
|
||||
|
||||
/**
|
||||
* @Author: tzx
|
||||
* @Date: 2023/10/10 17:16
|
||||
* @author Zexy
|
||||
*/
|
||||
|
||||
@SpringBootApplication
|
||||
@EnableAspectJAutoProxy(exposeProxy = true)
|
||||
@ComponentScan(nameGenerator = UniqueNameGenerator.class)
|
||||
@EnableFeignClients
|
||||
@EnableDiscoveryClient
|
||||
@EnableFeignClients(basePackages = "com.xjrsoft")
|
||||
@MapperScan(value = "com.xjrsoft.**.mapper")
|
||||
@ComponentScan(value = "com.xjrsoft")
|
||||
public class GenerateApplication {
|
||||
public class ITCFacadeApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(GenerateApplication.class, args);
|
||||
SpringApplication.run(ITCFacadeApplication.class, args);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,42 @@
|
||||
package com.xjrsoft.module.magicapi.client;
|
||||
|
||||
import com.xjrsoft.common.constant.GlobalConstant;
|
||||
import com.xjrsoft.module.magicapi.dto.ExecuteWorkflowApiDto;
|
||||
import com.xjrsoft.module.magicapi.vo.MagicApiInfoVo;
|
||||
import com.xjrsoft.module.magicapi.service.IMagicApiService;
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* @Author: tzx
|
||||
* @Date: 2023/10/10 17:43
|
||||
*/
|
||||
@Api(hidden = true)
|
||||
@RestController
|
||||
@RequestMapping(GlobalConstant.CLIENT_API_PRE + GlobalConstant.MAGICAPI_MODULE_PREFIX + "/magic-api")
|
||||
@AllArgsConstructor
|
||||
public class MagicApiClientImpl implements IMagicApiClient {
|
||||
|
||||
private IMagicApiService magicApiService;
|
||||
|
||||
|
||||
@Override
|
||||
@GetMapping("/executeApi")
|
||||
public Object executeApi(@RequestParam("id") String id) {
|
||||
return magicApiService.executeApi(id);
|
||||
}
|
||||
|
||||
@PostMapping("/executeWorkflowApi")
|
||||
@Override
|
||||
public Object executeWorkflowApi(@RequestBody ExecuteWorkflowApiDto dto) {
|
||||
return magicApiService.executeWorkflowApi(dto.getApiConfig(), dto.getProcessParam(), dto.getVarMap(), dto.getProcessInstId(), dto.getExecutionId());
|
||||
}
|
||||
|
||||
@GetMapping("/info")
|
||||
@Override
|
||||
public MagicApiInfoVo info(@RequestParam("id") String id) {
|
||||
return magicApiService.info(id);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,12 +1,13 @@
|
||||
package com.xjrsoft.magicapi.controller;
|
||||
package com.xjrsoft.module.magicapi.controller;
|
||||
|
||||
|
||||
import com.xjrsoft.common.core.constant.GlobalConstant;
|
||||
import com.xjrsoft.common.core.domain.result.R;
|
||||
import com.xjrsoft.magicapi.service.IMagicApiService;
|
||||
import com.xjrsoft.magicapi.vo.MagicApiTreeVo;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import com.xjrsoft.common.annotation.XjrLog;
|
||||
import com.xjrsoft.common.constant.GlobalConstant;
|
||||
import com.xjrsoft.common.model.result.R;
|
||||
import com.xjrsoft.module.magicapi.vo.MagicApiTreeVo;
|
||||
import com.xjrsoft.module.magicapi.service.IMagicApiService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@ -25,33 +26,37 @@ import java.util.List;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(GlobalConstant.MAGICAPI_MODULE_PREFIX)
|
||||
@Tag(name = GlobalConstant.MAGICAPI_MODULE_PREFIX, description = "magic-api模块接口")
|
||||
@Api(value = GlobalConstant.MAGICAPI_MODULE_PREFIX, tags = "magic-api模块接口")
|
||||
@AllArgsConstructor
|
||||
public class MagicApiController {
|
||||
|
||||
private final IMagicApiService magicApiService;
|
||||
|
||||
@GetMapping(value = "/tree")
|
||||
@Operation(summary = "查询所有分组以及api 树结构")
|
||||
@ApiOperation("查询所有分组以及api 树结构")
|
||||
@XjrLog(value = "查询所有分组以及api 树结构")
|
||||
public R tree(@RequestParam(required = false) String keyword ) {
|
||||
List<MagicApiTreeVo> tree = magicApiService.tree(keyword);
|
||||
return R.ok(tree);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/group/tree")
|
||||
@Operation(summary = "查询所有树结构分组")
|
||||
@ApiOperation("查询所有树结构分组")
|
||||
@XjrLog(value = "查询所有树结构分组")
|
||||
public R groupTree(){
|
||||
return R.ok(magicApiService.groupTree());
|
||||
}
|
||||
|
||||
@GetMapping(value = "/info")
|
||||
@Operation(summary = "查询api详情")
|
||||
@ApiOperation("查询api详情")
|
||||
@XjrLog(value = "查询api详情")
|
||||
public R info(@RequestParam String id){
|
||||
return R.ok(magicApiService.info(id));
|
||||
}
|
||||
|
||||
@GetMapping(value = "/list")
|
||||
@Operation(summary = "根据分组id 查询所有api")
|
||||
@ApiOperation("根据分组id 查询所有api")
|
||||
@XjrLog(value = "根据分组id 查询所有api")
|
||||
public R list(@RequestParam String groupId){
|
||||
return R.ok(magicApiService.list(groupId));
|
||||
}
|
||||
@ -1,10 +1,12 @@
|
||||
package com.xjrsoft.magicapi.service;
|
||||
package com.xjrsoft.module.magicapi.service;
|
||||
|
||||
import com.xjrsoft.magicapi.vo.MagicApiGroupTreeVo;
|
||||
import com.xjrsoft.magicapi.vo.MagicApiInfoVo;
|
||||
import com.xjrsoft.magicapi.vo.MagicApiTreeVo;
|
||||
import com.xjrsoft.module.magicapi.vo.MagicApiGroupTreeVo;
|
||||
import com.xjrsoft.module.magicapi.vo.MagicApiInfoVo;
|
||||
import com.xjrsoft.module.magicapi.vo.MagicApiTreeVo;
|
||||
import com.xjrsoft.module.workflow.model.ApiConfig;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface IMagicApiService {
|
||||
|
||||
@ -41,4 +43,13 @@ public interface IMagicApiService {
|
||||
* @return
|
||||
*/
|
||||
<T> T executeApi(String id);
|
||||
|
||||
/**
|
||||
* 执行工作流api
|
||||
* @param apiConfig
|
||||
* @param processParam
|
||||
* @param varMap
|
||||
* @return
|
||||
*/
|
||||
Object executeWorkflowApi(ApiConfig apiConfig, Map<String, Object> processParam, Map<String, Object> varMap,String processInstId,String executionId);
|
||||
}
|
||||
@ -1,12 +1,15 @@
|
||||
package com.xjrsoft.magicapi.service.impl;
|
||||
package com.xjrsoft.module.magicapi.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringPool;
|
||||
import com.xjrsoft.common.core.uitls.TreeUtil;
|
||||
import com.xjrsoft.magicapi.service.IMagicApiService;
|
||||
import com.xjrsoft.magicapi.vo.MagicApiGroupTreeVo;
|
||||
import com.xjrsoft.magicapi.vo.MagicApiInfoVo;
|
||||
import com.xjrsoft.magicapi.vo.MagicApiTreeVo;
|
||||
import com.xjrsoft.common.utils.TreeUtil;
|
||||
import com.xjrsoft.module.magicapi.vo.MagicApiGroupTreeVo;
|
||||
import com.xjrsoft.module.magicapi.vo.MagicApiInfoVo;
|
||||
import com.xjrsoft.module.magicapi.vo.MagicApiTreeVo;
|
||||
import com.xjrsoft.module.workflow.model.ApiConfig;
|
||||
import com.xjrsoft.module.workflow.model.ApiRequestParamsConfig;
|
||||
import com.xjrsoft.module.magicapi.service.IMagicApiService;
|
||||
import com.xjrsoft.module.magicapi.utils.MagicApiUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@ -18,6 +21,7 @@ import org.ssssssss.magicapi.core.service.MagicResourceService;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* magic-api服务
|
||||
@ -84,6 +88,26 @@ public class MagicApiServiceImpl implements IMagicApiService {
|
||||
return magicAPIService.execute(info.getMethod(), info.getPath(), new HashMap<>());
|
||||
}
|
||||
|
||||
public Object executeWorkflowApi(ApiConfig apiConfig, Map<String, Object> processParam, Map<String, Object> varMap,String processInstId,String executionId){
|
||||
MagicApiInfoVo info = info(apiConfig.getId());
|
||||
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
for(List<ApiRequestParamsConfig>requestParamsConfigs:new List[]{
|
||||
apiConfig.getRequestParamsConfigs(),
|
||||
apiConfig.getRequestHeaderConfigs(),
|
||||
apiConfig.getRequestBodyConfigs()
|
||||
}){
|
||||
for (ApiRequestParamsConfig requestParamsConfig : requestParamsConfigs) {
|
||||
MagicApiUtil.initApiParams(processParam,varMap,params,requestParamsConfig);
|
||||
}
|
||||
}
|
||||
//补充流程参数
|
||||
params.put("processInstId",processInstId);
|
||||
params.put("executionId",executionId);
|
||||
|
||||
Object result = magicAPIService.execute(info.getMethod(), info.getPath(), params);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分组以及api 树结构
|
||||
@ -0,0 +1,77 @@
|
||||
package com.xjrsoft.module.magicapi.utils;
|
||||
|
||||
import cn.dev33.satoken.session.SaSession;
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import cn.hutool.core.lang.TypeReference;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.extra.spring.SpringUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringPool;
|
||||
import com.xjrsoft.common.constant.GlobalConstant;
|
||||
import com.xjrsoft.common.utils.RedisUtil;
|
||||
import com.xjrsoft.module.organization.dto.DepartmentDto;
|
||||
import com.xjrsoft.module.organization.dto.UserDeptRelationDto;
|
||||
import com.xjrsoft.module.organization.dto.UserDto;
|
||||
import com.xjrsoft.module.workflow.constant.WorkflowConstant;
|
||||
import com.xjrsoft.module.workflow.model.ApiRequestParamsConfig;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author: yjw
|
||||
* @since: 2025/3/17
|
||||
*/
|
||||
public class MagicApiUtil {
|
||||
|
||||
public static void initApiParams(Map<String, Object> processParam, Map<String, Object> varMap, Map<String, Object> params, ApiRequestParamsConfig requestParamsConfig) {
|
||||
if (Objects.equals(requestParamsConfig.getAssignmentType(), "value")) { //值
|
||||
params.put(requestParamsConfig.getName(), requestParamsConfig.getValue());
|
||||
} else if (Objects.equals(requestParamsConfig.getAssignmentType(), "processParameter")) { //流程参数
|
||||
params.put(requestParamsConfig.getName(), processParam.get(requestParamsConfig.getConfig()));
|
||||
} else if (Objects.equals(requestParamsConfig.getAssignmentType(), "originator")) {//发起人信息
|
||||
dealApiParam(requestParamsConfig,params,varMap);
|
||||
} else {//表单数据
|
||||
//使用3下划线切割
|
||||
String[] split = requestParamsConfig.getConfig().split(StringPool.UNDERSCORE + StringPool.UNDERSCORE + StringPool.UNDERSCORE);
|
||||
String formKey = split[1];
|
||||
Map<String, Object> formData = MapUtil.get(varMap, formKey, new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
Object fieldValue = MapUtil.get(formData, split[2], Object.class);
|
||||
params.put(requestParamsConfig.getName(), fieldValue);
|
||||
}
|
||||
}
|
||||
|
||||
private static void dealApiParam(ApiRequestParamsConfig requestParamsConfig, Map<String, Object> params, Map<String, Object> varMap){
|
||||
Long startUserId;
|
||||
if (CollectionUtils.isEmpty(varMap)) {//为空就是发起时的数据
|
||||
//如果是拿发起人的数据,作为流程参数,发起和重新发起赋值,使用当前登录人的信息,如果是其它节点,使用流程的发起人数据信息
|
||||
SaSession tokenSession = StpUtil.getTokenSession();
|
||||
UserDto user = tokenSession.get(GlobalConstant.LOGIN_USER_INFO_KEY, new UserDto());
|
||||
startUserId = user.getId();
|
||||
}else {
|
||||
startUserId = MapUtil.get(varMap, WorkflowConstant.PROCESS_START_USER_ID_KEY, Long.class);
|
||||
}
|
||||
//如果是设置的发起人
|
||||
if (requestParamsConfig.getConfig().contains("initiator_id")) {
|
||||
params.put(requestParamsConfig.getName(), startUserId);
|
||||
}
|
||||
//组织架构名称
|
||||
if (requestParamsConfig.getConfig().contains("initiator_dept_name")) {
|
||||
RedisUtil redisUtil = SpringUtil.getBean(RedisUtil.class);
|
||||
List<UserDeptRelationDto> userDeptRelations = redisUtil.get(GlobalConstant.USER_DEPT_RELATION_CACHE_KEY, new TypeReference<List<UserDeptRelationDto>>() {
|
||||
});
|
||||
List<DepartmentDto> departmentList = redisUtil.get(GlobalConstant.DEP_CACHE_KEY, new TypeReference<List<DepartmentDto>>() {
|
||||
});
|
||||
List<UserDeptRelationDto> startUserDeptRelation = userDeptRelations.stream().filter(x -> x.getUserId().equals(startUserId)).collect(Collectors.toList());
|
||||
|
||||
List<Long> allDeptIds = startUserDeptRelation.stream().map(UserDeptRelationDto::getDeptId).collect(Collectors.toList());
|
||||
|
||||
List<DepartmentDto> allDept = departmentList.stream().filter(x -> allDeptIds.contains(x.getId())).collect(Collectors.toList());
|
||||
|
||||
params.put(requestParamsConfig.getName(), allDept.stream().map(DepartmentDto::getName).collect(Collectors.joining(",")));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,87 @@
|
||||
package com.xjrsoft.module.workflow.client;
|
||||
|
||||
import cn.hutool.extra.spring.SpringUtil;
|
||||
import com.xjrsoft.common.constant.GlobalConstant;
|
||||
import com.xjrsoft.module.workflow.dto.WorkflowBusinessInvokeDto;
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author: tzx
|
||||
* @Date: 2023/10/10 17:43
|
||||
*/
|
||||
@Api(hidden = true)
|
||||
@RestController
|
||||
@RequestMapping(GlobalConstant.CLIENT_API_PRE + GlobalConstant.MAGICAPI_MODULE_PREFIX + "/invoke")
|
||||
@AllArgsConstructor
|
||||
public class WorkflowBusinessClientImpl implements IWorkflowBusinessClient {
|
||||
|
||||
/**
|
||||
* 统一调用方法
|
||||
*
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@PostMapping("/invoke")
|
||||
@Override
|
||||
public Boolean invoke(@RequestBody @Valid WorkflowBusinessInvokeDto dto) {
|
||||
String classNameAndMethodName = dto.getClassNameAndMethodName();
|
||||
try {
|
||||
// 分割类名和方法名
|
||||
String[] parts = classNameAndMethodName.split("\\.");
|
||||
if (parts.length < 2) {
|
||||
throw new IllegalArgumentException("Invalid format: className.methodName");
|
||||
}
|
||||
String className = String.join(".", java.util.Arrays.copyOf(parts, parts.length - 1));
|
||||
String methodName = parts[parts.length - 1];
|
||||
|
||||
// 动态加载类
|
||||
Class<?> clazz = Class.forName(className);
|
||||
|
||||
// 获取方法的参数类型
|
||||
List<Object> args = dto.getArgs();
|
||||
Class<?>[] parameterTypes = new Class[args.size()];
|
||||
for (int i = 0; i < dto.getArgs().size(); i++) {
|
||||
if (dto.getArgs().get(i) instanceof HashMap) {
|
||||
parameterTypes[i] = Map.class;
|
||||
} else {
|
||||
parameterTypes[i] = args.get(i).getClass();
|
||||
}
|
||||
}
|
||||
|
||||
// 获取方法对象
|
||||
Method method = clazz.getDeclaredMethod(methodName, parameterTypes);
|
||||
method.setAccessible(true); // 确保可以访问私有方法
|
||||
|
||||
// 判断是否为静态方法
|
||||
boolean isStatic = java.lang.reflect.Modifier.isStatic(method.getModifiers());
|
||||
|
||||
// 调用方法
|
||||
if (isStatic) {
|
||||
return (Boolean) method.invoke(null, args.toArray()); // 静态方法,传入 null
|
||||
} else {
|
||||
Object bean = SpringUtil.getBean(className);
|
||||
if (bean != null) {
|
||||
Method methodBean = bean.getClass().getMethod(methodName, parameterTypes);
|
||||
return (Boolean) methodBean.invoke(bean, args.toArray());
|
||||
} else {
|
||||
Object instance = clazz.getDeclaredConstructor().newInstance(); // 创建实例
|
||||
return (Boolean) method.invoke(instance, args.toArray()); // 实例方法,传入实例
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("Failed to invoke method: " + classNameAndMethodName, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,3 +1,3 @@
|
||||
spring:
|
||||
profiles:
|
||||
active: public
|
||||
active: dev
|
||||
6
facade-service/src/main/resources/banner.txt
Normal file
6
facade-service/src/main/resources/banner.txt
Normal file
@ -0,0 +1,6 @@
|
||||
██╗ ██╗ ██╗██████╗ ███████╗ ██████╗ ███████╗████████╗
|
||||
╚██╗██╔╝ ██║██╔══██╗██╔════╝██╔═══██╗██╔════╝╚══██╔══╝
|
||||
╚███╔╝ ██║██████╔╝███████╗██║ ██║█████╗ ██║
|
||||
██╔██╗ ██ ██║██╔══██╗╚════██║██║ ██║██╔══╝ ██║
|
||||
██╔╝ ██╗╚█████╔╝██║ ██║███████║╚██████╔╝██║ ██║
|
||||
╚═╝ ╚═╝ ╚════╝ ╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝
|
||||
70
facade-service/src/main/resources/bootstrap.yml
Normal file
70
facade-service/src/main/resources/bootstrap.yml
Normal file
@ -0,0 +1,70 @@
|
||||
server:
|
||||
port: 8094
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: facade-service
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
# autoconfigure:
|
||||
# #自动化配置 例外处理
|
||||
# exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
|
||||
|
||||
cloud:
|
||||
nacos: #nacos监控
|
||||
discovery:
|
||||
server-addr: 10.0.252.1:8848
|
||||
namespace: ITC-MS
|
||||
group: DNE
|
||||
username: nacos
|
||||
password: ABcd1234@
|
||||
config:
|
||||
server-addr: 10.0.252.1:8848 # nacos 配置中心地址
|
||||
namespace: ITC-MS
|
||||
group: DNE
|
||||
username: nacos
|
||||
password: ABcd1234@
|
||||
file-extension: yml # 默认配置 ${spring.application.name}-${spring.profiles.active}.${file-extension}
|
||||
extension-configs:
|
||||
- data-id: magicapi-config.yml
|
||||
refresh: true
|
||||
group: DNE
|
||||
- data-id: global-config.yml
|
||||
refresh: true
|
||||
group: DNE
|
||||
- data-id: sa-token-client-config.yml
|
||||
refresh: true
|
||||
group: DNE
|
||||
- data-id: redis-config.yml
|
||||
refresh: true
|
||||
group: DNE
|
||||
- data-id: datasource-config.yml
|
||||
refresh: true
|
||||
group: DNE
|
||||
- data-id: seata-config.yml
|
||||
refresh: true
|
||||
group: DNE
|
||||
- data-id: camunda-config.yml
|
||||
refresh: true
|
||||
group: DNE
|
||||
- data-id: system-config.yml
|
||||
refresh: true
|
||||
group: DNE
|
||||
sentinel:
|
||||
transport:
|
||||
dashboard: localhost:8080 #sentinel dashboard 地址
|
||||
port: 8719 #默认端口, 如果 被占用,会一直+1 直到未被占用为止
|
||||
|
||||
#springdoc:
|
||||
# swagger-ui:
|
||||
# path: /swagger-ui.html
|
||||
# tags-sorter: alpha
|
||||
# operations-sorter: alpha
|
||||
# show-extensions: true
|
||||
# api-docs:
|
||||
# path: /system/v3/api-docs
|
||||
# group-configs:
|
||||
# - group: 'default'
|
||||
# paths-to-match: '/system/**'
|
||||
# packages-to-scan: com.xjrsoft.system
|
||||
# default-flat-param-object: false
|
||||
108
facade-service/src/main/resources/logback.xml
Normal file
108
facade-service/src/main/resources/logback.xml
Normal file
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<!--<include resource="org/springframework/boot/logging/logback/base.xml" />-->
|
||||
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="./logs" />
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="[%d{yyyy-MM-dd HH:mm:ss.SSS}][fcd2-ma][%-5p][%t][%c.%M:%L] %msg%xEx%n" />
|
||||
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 系统日志输出 -->
|
||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/sys-info.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/sys-info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>INFO</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/sys-error.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/sys-error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>ERROR</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- 用户访问日志输出 -->
|
||||
<appender name="sys-user" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/sys-user.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 按天回滚 daily -->
|
||||
<fileNamePattern>${log.path}/sys-user.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!--系统操作日志-->
|
||||
<root level="info">
|
||||
<appender-ref ref="console" />
|
||||
<appender-ref ref="file_info" />
|
||||
<appender-ref ref="file_error" />
|
||||
</root>
|
||||
|
||||
<!--系统用户操作日志-->
|
||||
<logger name="sys-user" level="info">
|
||||
<appender-ref ref="sys-user"/>
|
||||
</logger>
|
||||
<!-- 系统模块日志级别控制 -->
|
||||
<!--<logger name="com.xjrsoft" level="info" />-->
|
||||
<!-- Spring日志级别控制 -->
|
||||
<!--<logger name="org.springframework" level="info" />
|
||||
<logger name="org.springframework.web" level="INFO"/>
|
||||
<logger name="org.springboot.sample" level="TRACE" />-->
|
||||
|
||||
<!-- 开发、测试环境 -->
|
||||
<springProfile name="dev,test">
|
||||
<logger name="org.springframework.web" level="INFO"/>
|
||||
<logger name="org.springboot.sample" level="INFO" />
|
||||
<logger name="com.xjrsoft" level="DEBUG" />
|
||||
</springProfile>
|
||||
|
||||
<!-- 生产环境 -->
|
||||
<springProfile name="prod">
|
||||
<logger name="org.springframework.web" level="ERROR"/>
|
||||
<logger name="org.springboot.sample" level="ERROR" />
|
||||
<logger name="com.xjrsoft" level="ERROR" />
|
||||
</springProfile>
|
||||
|
||||
</configuration>
|
||||
4
facade-service/src/main/resources/spy.properties
Normal file
4
facade-service/src/main/resources/spy.properties
Normal file
@ -0,0 +1,4 @@
|
||||
# spy.properties
|
||||
driverlist=com.kingbase8.Driver
|
||||
appender=com.p6spy.engine.spy.appender.Slf4JLogger
|
||||
logMessageFormat=com.xjrsoft.common.handler.P6spySqlLogHandler
|
||||
743
pom.xml
743
pom.xml
@ -1,735 +1,34 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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>
|
||||
|
||||
<groupId>com.xjrsoft</groupId>
|
||||
<artifactId>xjrsoft-cloud</artifactId>
|
||||
<parent>
|
||||
<groupId>com.geg</groupId>
|
||||
<artifactId>itc-framework-ms</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ms-demo</artifactId>
|
||||
<name>ms-demo</name>
|
||||
<description>ms-demo</description>
|
||||
<packaging>pom</packaging>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<version>${revision}</version>
|
||||
|
||||
<modules>
|
||||
<module>xjrsoft-auth</module>
|
||||
<module>xjrsoft-admin</module>
|
||||
<module>xjrsoft-common</module>
|
||||
<module>xjrsoft-gateway</module>
|
||||
<module>xjrsoft-service</module>
|
||||
<module>xjrsoft-service-api</module>
|
||||
<module>facade-service</module>
|
||||
<module>demo-service</module>
|
||||
</modules>
|
||||
<name>xjrsoft-cloud</name>
|
||||
<description>xjrsoft-cloud</description>
|
||||
|
||||
<properties>
|
||||
<revision>2.0.0</revision>
|
||||
<framework.version>2.0.0</framework.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
|
||||
<java.version>8</java.version>
|
||||
<maven.plugin.version>3.8.1</maven.plugin.version>
|
||||
|
||||
<spring.cloud.version>2021.0.5</spring.cloud.version>
|
||||
<spring.cloud.alibaba.version>2021.0.5.0</spring.cloud.alibaba.version>
|
||||
<spring.boot.version>2.7.5</spring.boot.version>
|
||||
<spring.cloud.starter.bootstrap>3.0.2</spring.cloud.starter.bootstrap>
|
||||
<sentinel.datasource.nacos>1.7.1</sentinel.datasource.nacos>
|
||||
|
||||
<xjrsoft.framework.version>1.0.0-SNAPSHOT</xjrsoft.framework.version>
|
||||
<commons.lang.version>2.6</commons.lang.version>
|
||||
<commons.fileupload.version>1.2.2</commons.fileupload.version>
|
||||
<commons.io.version>2.11.0</commons.io.version>
|
||||
<commons.codec.version>1.10</commons.codec.version>
|
||||
<commons.configuration.version>1.10</commons.configuration.version>
|
||||
<hutool.version>5.8.20</hutool.version>
|
||||
<satoken.version>1.29.0</satoken.version>
|
||||
<lombok.version>1.18.30</lombok.version>
|
||||
<okhttp.version>3.1.1</okhttp.version>
|
||||
<fastjson.version>1.2.83</fastjson.version>
|
||||
<joda.time.version>2.9.9</joda.time.version>
|
||||
<gson.version>2.8.5</gson.version>
|
||||
<mybatisplus.join.version>1.4.2.2</mybatisplus.join.version>
|
||||
<mybatisplus.version>3.5.1</mybatisplus.version>
|
||||
<mybatisplus.generator.version>3.5.2</mybatisplus.generator.version>
|
||||
<mybatisplus.dynamic.version>3.5.1</mybatisplus.dynamic.version>
|
||||
<druid.version>1.2.22</druid.version>
|
||||
<knife4j.version>4.3.0</knife4j.version>
|
||||
<freemarker.version>2.3.30</freemarker.version>
|
||||
<hibernatevalidator.version>6.0.13.Final</hibernatevalidator.version>
|
||||
<qiniu.version>7.2.23</qiniu.version>
|
||||
<aliyun.oss.version>2.8.3</aliyun.oss.version>
|
||||
<qcloud.cos.version>4.4</qcloud.cos.version>
|
||||
<huawei.obs.version>3.19.7</huawei.obs.version>
|
||||
<minio.oss.version>7.1.0</minio.oss.version>
|
||||
<jaxb.api.version>2.3.0</jaxb.api.version>
|
||||
<log4j.core.version>2.17.2</log4j.core.version>
|
||||
<xxl.job.version>2.4.0</xxl.job.version>
|
||||
<screw.version>1.0.5</screw.version>
|
||||
<ureport.version>2.2.9</ureport.version>
|
||||
<camunda.version>7.18.0</camunda.version>
|
||||
<groovy.version>3.0.17</groovy.version>
|
||||
<javax.mail.version>1.6.2</javax.mail.version>
|
||||
<magic.api.version>2.1.1</magic.api.version>
|
||||
<keycloak.version>20.0.1</keycloak.version>
|
||||
<aliyun.core.version>4.5.1</aliyun.core.version>
|
||||
<tencentcloud.version>3.1.62</tencentcloud.version>
|
||||
<chatgpt.java.version>1.0.6</chatgpt.java.version>
|
||||
<okio.version>3.3.0</okio.version>
|
||||
<easyexcel.version>3.1.4</easyexcel.version>
|
||||
<poi.version>5.2.2</poi.version>
|
||||
<ooxml.schemas.version>4.1.2</ooxml.schemas.version>
|
||||
<javassist.version>3.29.2-GA</javassist.version>
|
||||
<liteflow.version>2.10.1</liteflow.version>
|
||||
<microsoft.version>8.4.1.jre8</microsoft.version>
|
||||
<pinyin4j.version>2.5.1</pinyin4j.version>
|
||||
<sms4j.version>2.1.0</sms4j.version>
|
||||
<powerjob.version>4.3.2</powerjob.version>
|
||||
<license.version>2.0</license.version>
|
||||
<justauth.version>1.16.5</justauth.version>
|
||||
<dingtalk.version>2.0.26</dingtalk.version>
|
||||
<mysql.connector.version>8.0.26</mysql.connector.version>
|
||||
<spring.boot.redis.version>2.7.5</spring.boot.redis.version>
|
||||
<spring.boot.admin.version>2.6.11</spring.boot.admin.version>
|
||||
<microsoft.version>8.4.1.jre8</microsoft.version>
|
||||
<kingbase.vesion>8.6.0</kingbase.vesion>
|
||||
<dm.version>8.1.2.192</dm.version>
|
||||
<dingtalk.version>2.0.26</dingtalk.version>
|
||||
<oracle7.verion>12.1.0.1.0</oracle7.verion>
|
||||
<knife4j.version>4.3.0</knife4j.version>
|
||||
<db2.version>11.5.9.0</db2.version>
|
||||
<cloud.govern.version>3.1.0</cloud.govern.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<!-- https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-dependencies</artifactId>
|
||||
<version>${spring.cloud.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
<!--引入spring boot依赖-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<version>${spring.boot.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
<version>${spring.boot.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!--引入spring cloud alibaba依赖-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
|
||||
<version>${spring.cloud.alibaba.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!--引入nacos依赖-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
<version>${spring.cloud.alibaba.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- <!– 引入seata以来 –>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.alibaba.cloud</groupId>-->
|
||||
<!-- <artifactId>spring-cloud-starter-alibaba-seata</artifactId>-->
|
||||
<!-- <version>${spring.cloud.alibaba.version}</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
|
||||
<!-- <!–引入负载均衡依赖–>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.springframework.cloud</groupId>-->
|
||||
<!-- <artifactId>spring-cloud-loadbalancer</artifactId>-->
|
||||
<!-- <version>${spring.cloud.alibaba.version}</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!--引入spring-cloud-alibaba-nacos-config依赖-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
<version>${spring.cloud.alibaba.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!--引入spring-cloud-alibaba-nacos-config bootstrap依赖-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-bootstrap</artifactId>
|
||||
<version>${spring.cloud.starter.bootstrap}</version>
|
||||
</dependency>
|
||||
|
||||
<!--引入sentinel依赖-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||
<version>${spring.cloud.alibaba.version}</version>
|
||||
|
||||
</dependency>
|
||||
|
||||
<!--引入sentinel-datasource-nacos依赖-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.csp</groupId>
|
||||
<artifactId>sentinel-datasource-nacos</artifactId>
|
||||
<version>${sentinel.datasource.nacos}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<version>${spring.boot.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
<version>${spring.boot.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
<version>${spring.boot.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||||
<version>${spring.boot.redis.version} </version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.xjrsoft</groupId>-->
|
||||
<!-- <artifactId>xjrsoft-common</artifactId>-->
|
||||
<!-- <version>${xjrsoft.framework.version}</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
|
||||
<!--引入MySql依赖-->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>${mysql.connector.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!--引入oracle依赖-->
|
||||
<dependency>
|
||||
<groupId>com.oracle</groupId>
|
||||
<artifactId>ojdbc7</artifactId>
|
||||
<version>${oracle7.verion}</version>
|
||||
</dependency>
|
||||
|
||||
<!--引入sqlserver依赖-->
|
||||
<dependency>
|
||||
<groupId>com.microsoft.sqlserver</groupId>
|
||||
<artifactId>mssql-jdbc</artifactId>
|
||||
<version>${microsoft.version}</version>
|
||||
</dependency>
|
||||
<!-- 引入kingbase依赖 -->
|
||||
<dependency>
|
||||
<groupId>kingbase</groupId>
|
||||
<artifactId>kingbase</artifactId>
|
||||
<version>${kingbase.vesion}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!--引入达梦依赖-->
|
||||
<dependency>
|
||||
<groupId>com.dm</groupId>
|
||||
<artifactId>DmJdbcDriver</artifactId>
|
||||
<version>${dm.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!--引入hutool依赖-->
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>${hutool.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!--引入hutool依赖 邮件依赖-->
|
||||
<dependency>
|
||||
<groupId>com.sun.mail</groupId>
|
||||
<artifactId>javax.mail</artifactId>
|
||||
<version>${javax.mail.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Sa-Token 权限认证, 在线文档:http://sa-token.dev33.cn/ -->
|
||||
<dependency>
|
||||
<groupId>cn.dev33</groupId>
|
||||
<artifactId>sa-token-spring-boot-starter</artifactId>
|
||||
<version>${satoken.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Sa-Token 整合 Redis (使用jdk默认序列化方式) -->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>cn.dev33</groupId>-->
|
||||
<!-- <artifactId>sa-token-dao-redis</artifactId>-->
|
||||
<!-- <version>${satoken.version}</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.dev33</groupId>
|
||||
<artifactId>sa-token-temp-jwt</artifactId>
|
||||
<version>${satoken.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Sa-Token 整合 Redis (使用 jackson 序列化方式) -->
|
||||
<dependency>
|
||||
<groupId>cn.dev33</groupId>
|
||||
<artifactId>sa-token-dao-redis-jackson</artifactId>
|
||||
<version>${satoken.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Sa-Token插件:权限缓存与业务缓存分离 -->
|
||||
<dependency>
|
||||
<groupId>cn.dev33</groupId>
|
||||
<artifactId>sa-token-alone-redis</artifactId>
|
||||
<version>${satoken.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Sa-Token 权限认证(Reactor响应式集成), 在线文档:http://sa-token.dev33.cn/ -->
|
||||
<dependency>
|
||||
<groupId>cn.dev33</groupId>
|
||||
<artifactId>sa-token-reactor-spring-boot-starter</artifactId>
|
||||
<version>${satoken.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid-spring-boot-starter</artifactId>
|
||||
<version>${druid.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
|
||||
<!--引入Lombok依赖-->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>${lombok.version}</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!--引入mybatis-plus依赖-->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
<version>${mybatisplus.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-generator</artifactId>
|
||||
<version>${mybatisplus.generator.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-gateway-spring-boot-starter</artifactId>
|
||||
<version>${knife4j.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-openapi3-spring-boot-starter</artifactId>
|
||||
<version>${knife4j.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!--引入fastjson依赖-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>${fastjson.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
<version>${commons.lang.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
<version>${commons.fileupload.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>${commons.io.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>${commons.codec.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-configuration</groupId>
|
||||
<artifactId>commons-configuration</artifactId>
|
||||
<version>${commons.configuration.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>joda-time</groupId>
|
||||
<artifactId>joda-time</artifactId>
|
||||
<version>${joda.time.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>${gson.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
<!--引入模板依赖-->
|
||||
<dependency>
|
||||
<groupId>org.freemarker</groupId>
|
||||
<artifactId>freemarker</artifactId>
|
||||
<version>${freemarker.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!--引入注解验证依赖-->
|
||||
<dependency>
|
||||
<groupId>org.hibernate.validator</groupId>
|
||||
<artifactId>hibernate-validator</artifactId>
|
||||
<version>${hibernatevalidator.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 动态数据源 -->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
|
||||
<version>${mybatisplus.dynamic.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.qiniu</groupId>
|
||||
<artifactId>qiniu-java-sdk</artifactId>
|
||||
<version>${qiniu.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.aliyun.oss</groupId>
|
||||
<artifactId>aliyun-sdk-oss</artifactId>
|
||||
<version>${aliyun.oss.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.huaweicloud</groupId>
|
||||
<artifactId>esdk-obs-java</artifactId>
|
||||
<version>${huawei.obs.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.qcloud</groupId>
|
||||
<artifactId>cos_api</artifactId>
|
||||
<version>${qcloud.cos.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.minio</groupId>
|
||||
<artifactId>minio</artifactId>
|
||||
<version>${minio.oss.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||
<!-- <artifactId>spring-boot-configuration-processor</artifactId>-->
|
||||
<!-- <optional>true</optional>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!--jdk8 可以不需要-->
|
||||
<dependency>
|
||||
<groupId>javax.xml.bind</groupId>
|
||||
<artifactId>jaxb-api</artifactId>
|
||||
<version>${jaxb.api.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>${log4j.core.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- mybatis-plus 多表关联 -->
|
||||
<dependency>
|
||||
<groupId>com.github.yulichang</groupId>
|
||||
<artifactId>mybatis-plus-join</artifactId>
|
||||
<version>${mybatisplus.join.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.xuxueli</groupId>
|
||||
<artifactId>xxl-job-core</artifactId>
|
||||
<version>${xxl.job.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.smallbun.screw</groupId>
|
||||
<artifactId>screw-core</artifactId>
|
||||
<version>${screw.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.syyai.spring.boot</groupId>
|
||||
<artifactId>ureport-spring-boot-starter</artifactId>
|
||||
<version>${ureport.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.camunda.bpm.springboot</groupId>
|
||||
<artifactId>camunda-bpm-spring-boot-starter</artifactId>
|
||||
<version>${camunda.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.camunda.bpm.springboot</groupId>
|
||||
<artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
|
||||
<version>${camunda.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-all</artifactId>
|
||||
<version>${groovy.version}</version>
|
||||
<classifier>sources</classifier>
|
||||
<type>java-source</type>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.ssssssss</groupId>
|
||||
<artifactId>magic-api-spring-boot-starter</artifactId>
|
||||
<version>${magic.api.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 腾讯云短信 -->
|
||||
<dependency>
|
||||
<groupId>com.tencentcloudapi</groupId>
|
||||
<artifactId>tencentcloud-sdk-java</artifactId>
|
||||
<version>${tencentcloud.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 阿里云短信 -->
|
||||
<dependency>
|
||||
<groupId>com.aliyun</groupId>
|
||||
<artifactId>aliyun-java-sdk-core</artifactId>
|
||||
<version>${aliyun.core.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- keycloak -->
|
||||
<dependency>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-authz-client</artifactId>
|
||||
<version>${keycloak.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.unfbx</groupId>
|
||||
<artifactId>chatgpt-java</artifactId>
|
||||
<version>${chatgpt.java.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.squareup.okio</groupId>
|
||||
<artifactId>okio</artifactId>
|
||||
<version>${okio.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- excel导入导出 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>easyexcel</artifactId>
|
||||
<version>${easyexcel.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi</artifactId>
|
||||
<version>${poi.version}</version>
|
||||
<!-- <scope>provided</scope>-->
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
<version>${poi.version}</version>
|
||||
<!-- <scope>provided</scope>-->
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml-schemas</artifactId>
|
||||
<version>${ooxml.schemas.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!--动态给类新增属性 的工具-->
|
||||
<dependency>
|
||||
<groupId>org.javassist</groupId>
|
||||
<artifactId>javassist</artifactId>
|
||||
<version>${javassist.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 规则引擎-->
|
||||
<dependency>
|
||||
<groupId>com.yomahub</groupId>
|
||||
<artifactId>liteflow-spring-boot-starter</artifactId>
|
||||
<version>${liteflow.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 第三方拼音依赖包,配合 hutool-all 包中的 PinyinUtil 拼音工具使用 start -->
|
||||
<dependency>
|
||||
<groupId>com.belerweb</groupId>
|
||||
<artifactId>pinyin4j</artifactId>
|
||||
<version>${pinyin4j.version}</version>
|
||||
</dependency>
|
||||
<!-- 第三方拼音依赖包,配合 hutool-all 包中的 PinyinUtil 拼音工具使用 start -->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara.sms4j</groupId>
|
||||
<artifactId>sms4j-spring-boot-starter</artifactId>
|
||||
<version>${sms4j.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>tech.powerjob</groupId>
|
||||
<artifactId>powerjob-worker-spring-boot-starter</artifactId>
|
||||
<version>${powerjob.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>tech.powerjob</groupId>
|
||||
<artifactId>powerjob-official-processors</artifactId>
|
||||
<version>${powerjob.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>tech.powerjob</groupId>
|
||||
<artifactId>powerjob-worker</artifactId>
|
||||
<version>${powerjob.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.smartboot.license</groupId>
|
||||
<artifactId>license-client</artifactId>
|
||||
<version>${license.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>me.zhyd.oauth</groupId>
|
||||
<artifactId>JustAuth</artifactId>
|
||||
<version>${justauth.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.aliyun</groupId>
|
||||
<artifactId>dingtalk</artifactId>
|
||||
<version>${dingtalk.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- Http请求工具 -->
|
||||
<dependency>
|
||||
<groupId>com.ejlchina</groupId>
|
||||
<artifactId>okhttps</artifactId>
|
||||
<version>${okhttp.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Admin 服务 -->
|
||||
<dependency>
|
||||
<groupId>de.codecentric</groupId>
|
||||
<artifactId>spring-boot-admin-starter-server</artifactId>
|
||||
<version>${spring.boot.admin.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Admin 界面 -->
|
||||
<dependency>
|
||||
<groupId>de.codecentric</groupId>
|
||||
<artifactId>spring-boot-admin-server-ui</artifactId>
|
||||
<version>${spring.boot.admin.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>de.codecentric</groupId>
|
||||
<artifactId>spring-boot-admin-starter-client</artifactId>
|
||||
<version>${spring.boot.admin.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 钉钉用到的jar包 -->
|
||||
<dependency>
|
||||
<groupId>taobao-sdk-java-auto</groupId>
|
||||
<artifactId>taobao-sdk-java-auto</artifactId>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 引入db2依赖 -->
|
||||
<dependency>
|
||||
<groupId>com.ibm.db2</groupId>
|
||||
<artifactId>db2jcc</artifactId>
|
||||
<version>${db2.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.cloud.govern</groupId>
|
||||
<artifactId>service-invoke-sdk</artifactId>
|
||||
<version>${cloud.govern.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</dependencyManagement>
|
||||
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${spring.boot.version}</version>
|
||||
<configuration>
|
||||
<includeSystemScope>true</includeSystemScope>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
</project>
|
||||
@ -1,48 +0,0 @@
|
||||
/*
|
||||
Navicat Premium Data Transfer
|
||||
|
||||
Source Server : 124root
|
||||
Source Server Type : MySQL
|
||||
Source Server Version : 80023
|
||||
Source Host : 192.168.0.124:3306
|
||||
Source Schema : h_test
|
||||
|
||||
Target Server Type : MySQL
|
||||
Target Server Version : 80023
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 27/02/2024 16:17:13
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for xjr_file
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `xjr_file`;
|
||||
CREATE TABLE `xjr_file` (
|
||||
`id` bigint NOT NULL COMMENT '文件主键',
|
||||
`folder_id` bigint NULL DEFAULT NULL COMMENT '附件夹主键',
|
||||
`file_name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '文件名称',
|
||||
`file_url` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '文件路径',
|
||||
`file_size` bigint NULL DEFAULT NULL COMMENT '文件大小',
|
||||
`file_suffiex` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '文件后缀',
|
||||
`file_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '文件类型',
|
||||
`download_count` int NULL DEFAULT NULL COMMENT '下载次数',
|
||||
`process_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '关联的流程id',
|
||||
`remark` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
|
||||
`create_user_id` bigint NULL DEFAULT NULL,
|
||||
`create_date` datetime(3) NULL DEFAULT NULL,
|
||||
`modify_user_id` bigint NULL DEFAULT NULL,
|
||||
`modify_date` datetime(3) NULL DEFAULT NULL,
|
||||
`delete_mark` int NULL DEFAULT NULL,
|
||||
`enabled_mark` int NULL DEFAULT NULL,
|
||||
`th_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '缩略图路径',
|
||||
`th_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '缩略图名称',
|
||||
`th_size` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '缩略图大小',
|
||||
`th_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '缩略图mini类型',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '文件关联关系表' ROW_FORMAT = Dynamic;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
@ -1,21 +0,0 @@
|
||||
ALTER TABLE xjr_department ADD COLUMN is_sync VARCHAR(1) NOT NULL DEFAULT 'Y'
|
||||
COMMENT '是否同步';
|
||||
|
||||
ALTER TABLE xjr_user ADD COLUMN is_sync VARCHAR(1) NOT NULL DEFAULT 'Y'
|
||||
COMMENT '是否同步';
|
||||
|
||||
ALTER TABLE xjr_user_dept_relation ADD COLUMN is_sync VARCHAR(1) NOT NULL DEFAULT 'Y'
|
||||
COMMENT '是否同步';
|
||||
|
||||
COMMENT ON
|
||||
COLUMN "xjr_department"."department_type" IS '部门类型:2:板块,1:公司,0:部门';
|
||||
|
||||
ALTER TABLE xjr_user_dept_relation ADD COLUMN is_main VARCHAR(1) NOT NULL DEFAULT 'Y'
|
||||
COMMENT '是否主职/默认部门';
|
||||
|
||||
ALTER TABLE xjr_user_dept_relation ADD COLUMN sort_code integer
|
||||
COMMENT '在该部门内的排序';
|
||||
|
||||
-- Auto-generated SQL script #202403261200
|
||||
INSERT INTO xjr_menu_button (id,name,menu_id,code,url,method)
|
||||
VALUES (1664153798119171151,'同步组织人员',1419276797568356352,'user:syncOrgAndUser','syncOrgAndUser',1);
|
||||
@ -1,51 +0,0 @@
|
||||
ALTER TABLE "xjr_department" ADD COLUMN is_sync CHARACTER VARYING(
|
||||
1 char
|
||||
) NOT NULL DEFAULT 'Y';
|
||||
COMMENT ON
|
||||
COLUMN "xjr_department".is_sync IS '是否同步';
|
||||
|
||||
ALTER TABLE "xjr_user" ADD COLUMN is_sync CHARACTER VARYING(
|
||||
1 char
|
||||
) NOT NULL DEFAULT 'Y';
|
||||
COMMENT ON
|
||||
COLUMN "xjr_user".is_sync IS '是否同步';
|
||||
|
||||
ALTER TABLE "xjr_user_dept_relation" ADD COLUMN is_sync CHARACTER VARYING(
|
||||
1 char
|
||||
) NOT NULL DEFAULT 'Y';
|
||||
COMMENT ON
|
||||
COLUMN "xjr_user_dept_relation".is_sync IS '是否同步';
|
||||
|
||||
COMMENT ON
|
||||
COLUMN "xjr_department"."department_type" IS '部门类型:2:板块,1:公司,0:部门';
|
||||
|
||||
ALTER TABLE "xjr_user_dept_relation" ADD COLUMN is_main CHARACTER VARYING(
|
||||
1 char
|
||||
) NOT NULL DEFAULT 'Y'::varchar;
|
||||
|
||||
COMMENT ON
|
||||
COLUMN "xjr_user_dept_relation".is_main IS '是否主职/默认部门';
|
||||
|
||||
ALTER TABLE "xjr_user_dept_relation" ADD COLUMN sort_code integer;
|
||||
|
||||
COMMENT ON
|
||||
COLUMN "xjr_user_dept_relation".sort_code IS '在该部门内的排序';
|
||||
|
||||
-- Auto-generated SQL script #202403261200
|
||||
INSERT INTO "xjr_menu_button" ("id","name","menu_id","code","url","method")
|
||||
VALUES (1664153798119171151,'同步组织人员',1419276797568356352,'user:syncOrgAndUser','syncOrgAndUser',1);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
ALTER TABLE xjr_workflow_schema MODIFY COLUMN code VARCHAR(150);
|
||||
|
||||
ALTER TABLE xjr_workflow_schema MODIFY COLUMN name VARCHAR(200);
|
||||
|
||||
ALTER TABLE xjr_workflow_schema_draft MODIFY COLUMN code VARCHAR(150);
|
||||
|
||||
ALTER TABLE xjr_workflow_schema_draft MODIFY COLUMN name VARCHAR(200);
|
||||
@ -1,15 +0,0 @@
|
||||
ALTER TABLE "xjr_workflow_schema" ALTER COLUMN "code" TYPE CHARACTER VARYING(
|
||||
150 char
|
||||
);
|
||||
|
||||
ALTER TABLE "xjr_workflow_schema" ALTER COLUMN "name" TYPE CHARACTER VARYING(
|
||||
200 char
|
||||
);
|
||||
|
||||
ALTER TABLE "xjr_workflow_schema_draft" ALTER COLUMN "code" TYPE CHARACTER VARYING(
|
||||
150 char
|
||||
);
|
||||
|
||||
ALTER TABLE "xjr_workflow_schema_draft" ALTER COLUMN "name" TYPE CHARACTER VARYING(
|
||||
200 char
|
||||
);
|
||||
@ -1,164 +0,0 @@
|
||||
INSERT INTO xjr_menu (id, parent_id, name, title, code, icon, path, component, component_type, iframe_src, menu_type, display, allow_modify, allow_delete, out_link, keep_alive, sort_code, remark, create_user_id, create_date, modify_user_id, modify_date, delete_mark, enabled_mark, system_id, form_id) VALUES (1589823150509592578, 1419273666632498176, 'BI', '数据大屏', '30009', 'ant-design:dot-chart-outlined', 'http://localhost:4100', 'IFrame', NULL, '1111', 1, 1, 1, 1, 1, 0, 9, '111', 1, '2022-11-08 11:32:31', 1000000000000000000, '2023-05-31 11:01:15', 0, 1, 1, NULL);
|
||||
INSERT INTO xjr_menu (id, parent_id, name, title, code, icon, path, component, component_type, iframe_src, menu_type, display, allow_modify, allow_delete, out_link, keep_alive, sort_code, remark, create_user_id, create_date, modify_user_id, modify_date, delete_mark, enabled_mark, system_id, form_id) VALUES (1625770113225646082, 0, 'chatGPT', 'chatGPT', 'chatGPT', 'ant-design:bar-chart-outlined', '/chat-gpt', '/demo/chatgpt/index', NULL, NULL, 1, 1, 1, 1, 0, 0, 22, NULL, 1, '2023-02-15 16:12:55', NULL, NULL, 0, 1, 1, NULL);
|
||||
INSERT INTO xjr_menu (id, parent_id, name, title, code, icon, path, component, component_type, iframe_src, menu_type, display, allow_modify, allow_delete, out_link, keep_alive, sort_code, remark, create_user_id, create_date, modify_user_id, modify_date, delete_mark, enabled_mark, system_id, form_id) VALUES (1672802215783436290, 0, '计划任务', '计划任务', 'job', NULL, 'http://192.168.0.124:7700/#/welcome?appName=xjrsoft-boot&password=123456', 'IFrame', 0, '', 1, 1, 1, 1, 1, NULL, 11, '', 1000000000000000000, '2023-06-25 11:01:42', NULL, NULL, 0, 1, 1, NULL);
|
||||
INSERT INTO xjr_menu (id, parent_id, name, title, code, icon, path, component, component_type, iframe_src, menu_type, display, allow_modify, allow_delete, out_link, keep_alive, sort_code, remark, create_user_id, create_date, modify_user_id, modify_date, delete_mark, enabled_mark, system_id, form_id) VALUES (1700041673784094722, 1419276797351038976, '租户管理', '租户管理', 'tenant', 'ant-design:idcard-outlined', '/tenant', '/system/tenant/index', 0, NULL, 1, 1, 1, 1, 0, NULL, 11, NULL, 3000000000000000000, '2023-09-08 15:01:35', NULL, NULL, 0, 1, 1, NULL);
|
||||
|
||||
ALTER TABLE xjr_dictionary_item
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_login_config
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_logo_config
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_menu_button
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_menu
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_menu_column
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_menu_form
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_subsystem
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_desktop_relation
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_department MODIFY COLUMN `department_type` int NULL COMMENT '部门类型:3:总部,2:板块,1:公司,0:部门';
|
||||
|
||||
ALTER TABLE xjr_workflow_schema
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_workflow_schema_auth
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_workflow_schema_draft
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_workflow_schema_history
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
|
||||
ALTER TABLE xjr_app_authorize
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_app_func_design
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_app_menu
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_app_menu_button
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_app_menu_column
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_app_menu_form
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_app_page_design
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
|
||||
ALTER TABLE xjr_code_schema
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
|
||||
ALTER TABLE xjr_databaselink
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_datasource
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
|
||||
ALTER TABLE xjr_file
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
|
||||
ALTER TABLE xjr_form_history
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_form_release
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_form_template
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
|
||||
ALTER TABLE xjr_professional_report
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_report
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_report_relation
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
|
||||
ALTER TABLE xjr_visual
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_visual_category
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_visual_config
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_visual_db
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_visual_homerelation
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_visual_map
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_visual_release
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_visual_releaserelation
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
|
||||
ALTER TABLE xjr_workflow_approve_record
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_workflow_circulated
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_workflow_delegate
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_workflow_draft
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_workflow_extra
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_workflow_form_relation
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_workflow_record
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_workflow_special_menu
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
|
||||
ALTER TABLE xjr_liteflow_chain
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
ALTER TABLE xjr_liteflow_script
|
||||
ADD COLUMN tenant_id bigint COMMENT '租户id';
|
||||
|
||||
|
||||
|
||||
ALTER TABLE xjr_tenant
|
||||
ADD COLUMN root_department_id bigint COMMENT '租户根部门id';
|
||||
@ -1,214 +0,0 @@
|
||||
INSERT INTO xjr_menu (id, parent_id, name, title, code, icon, path, component, component_type, iframe_src, menu_type, display, allow_modify, allow_delete, out_link, keep_alive, sort_code, remark, create_user_id, create_date, modify_user_id, modify_date, delete_mark, enabled_mark, system_id, form_id) VALUES (1589823150509592578, 1419273666632498176, 'BI', '数据大屏', '30009', 'ant-design:dot-chart-outlined', 'http://localhost:4100', 'IFrame', NULL, '1111', 1, 1, 1, 1, 1, 0, 9, '111', 1, '2022-11-08 11:32:31', 1000000000000000000, '2023-05-31 11:01:15', 0, 1, 1, NULL);
|
||||
INSERT INTO xjr_menu (id, parent_id, name, title, code, icon, path, component, component_type, iframe_src, menu_type, display, allow_modify, allow_delete, out_link, keep_alive, sort_code, remark, create_user_id, create_date, modify_user_id, modify_date, delete_mark, enabled_mark, system_id, form_id) VALUES (1625770113225646082, 0, 'chatGPT', 'chatGPT', 'chatGPT', 'ant-design:bar-chart-outlined', '/chat-gpt', '/demo/chatgpt/index', NULL, NULL, 1, 1, 1, 1, 0, 0, 22, NULL, 1, '2023-02-15 16:12:55', NULL, NULL, 0, 1, 1, NULL);
|
||||
INSERT INTO xjr_menu (id, parent_id, name, title, code, icon, path, component, component_type, iframe_src, menu_type, display, allow_modify, allow_delete, out_link, keep_alive, sort_code, remark, create_user_id, create_date, modify_user_id, modify_date, delete_mark, enabled_mark, system_id, form_id) VALUES (1672802215783436290, 0, '计划任务', '计划任务', 'job', NULL, 'http://192.168.0.124:7700/#/welcome?appName=xjrsoft-boot&password=123456', 'IFrame', 0, '', 1, 1, 1, 1, 1, NULL, 11, '', 1000000000000000000, '2023-06-25 11:01:42', NULL, NULL, 0, 1, 1, NULL);
|
||||
INSERT INTO xjr_menu (id, parent_id, name, title, code, icon, path, component, component_type, iframe_src, menu_type, display, allow_modify, allow_delete, out_link, keep_alive, sort_code, remark, create_user_id, create_date, modify_user_id, modify_date, delete_mark, enabled_mark, system_id, form_id) VALUES (1700041673784094722, 1419276797351038976, '租户管理', '租户管理', 'tenant', 'ant-design:idcard-outlined', '/tenant', '/system/tenant/index', 0, NULL, 1, 1, 1, 1, 0, NULL, 11, NULL, 3000000000000000000, '2023-09-08 15:01:35', NULL, NULL, 0, 1, 1, NULL);
|
||||
|
||||
ALTER TABLE xjr_dictionary_item
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_dictionary_item."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_login_config
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_login_config."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_logo_config
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_logo_config."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_menu_button
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_menu_button."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_menu
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_menu."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_menu_column
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_menu_column."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_menu_form
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_menu_form."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_subsystem
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_subsystem."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_desktop_relation
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_desktop_relation."tenant_id" IS '租户id';
|
||||
|
||||
COMMENT ON
|
||||
COLUMN xjr_department."department_type" IS '部门类型:3:总部,2:板块,1:公司,0:部门';
|
||||
|
||||
ALTER TABLE xjr_workflow_schema
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_workflow_schema."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_workflow_schema_auth
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_workflow_schema_auth."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_workflow_schema_draft
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_workflow_schema_draft."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_workflow_schema_history
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_workflow_schema_history."tenant_id" IS '租户id';
|
||||
|
||||
|
||||
ALTER TABLE xjr_app_authorize
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_app_authorize."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_app_func_design
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_app_func_design."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_app_menu
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_app_menu."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_app_menu_button
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_app_menu_button."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_app_menu_column
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_app_menu_column."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_app_menu_form
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_app_menu_form."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_app_page_design
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_app_page_design."tenant_id" IS '租户id';
|
||||
|
||||
|
||||
ALTER TABLE xjr_code_schema
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_code_schema."tenant_id" IS '租户id';
|
||||
|
||||
|
||||
ALTER TABLE xjr_databaselink
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_databaselink."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_datasource
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_datasource."tenant_id" IS '租户id';
|
||||
|
||||
|
||||
ALTER TABLE xjr_file
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_file."tenant_id" IS '租户id';
|
||||
|
||||
|
||||
ALTER TABLE xjr_form_history
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_form_history."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_form_release
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_form_release."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_form_template
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_form_template."tenant_id" IS '租户id';
|
||||
|
||||
|
||||
ALTER TABLE xjr_professional_report
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_professional_report."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_report
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_report."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_report_relation
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_report_relation."tenant_id" IS '租户id';
|
||||
|
||||
|
||||
ALTER TABLE xjr_visual
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_visual."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_visual_category
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_visual_category."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_visual_config
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_visual_config."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_visual_db
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_visual_db."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_visual_homerelation
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_visual_homerelation."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_visual_map
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_visual_map."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_visual_release
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_visual_release."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_visual_releaserelation
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_visual_releaserelation."tenant_id" IS '租户id';
|
||||
|
||||
|
||||
ALTER TABLE xjr_workflow_approve_record
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_workflow_approve_record."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_workflow_circulated
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_workflow_circulated."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_workflow_delegate
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_workflow_delegate."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_workflow_draft
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_workflow_draft."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_workflow_extra
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_workflow_extra."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_workflow_form_relation
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_workflow_form_relation."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_workflow_record
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_workflow_record."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_workflow_special_menu
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_workflow_special_menu."tenant_id" IS '租户id';
|
||||
|
||||
|
||||
ALTER TABLE xjr_liteflow_chain
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_liteflow_chain."tenant_id" IS '租户id';
|
||||
|
||||
ALTER TABLE xjr_liteflow_script
|
||||
ADD COLUMN "tenant_id" int8;
|
||||
COMMENT ON COLUMN xjr_liteflow_script."tenant_id" IS '租户id';
|
||||
|
||||
|
||||
|
||||
ALTER TABLE xjr_tenant
|
||||
ADD COLUMN "root_department_id" int8;
|
||||
COMMENT ON COLUMN xjr_tenant."root_department_id" IS '租户根部门id';
|
||||
@ -1,779 +0,0 @@
|
||||
UPDATE act_ge_bytearray
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_ge_property
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE act_ge_schema_log
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE act_hi_actinst
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_attachment
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_batch
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_caseactinst
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_caseinst
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_comment
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_dec_in
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_dec_out
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_decinst
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_detail
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_ext_task_log
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_identitylink
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_incident
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_job_log
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_op_log
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_procinst
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_taskinst
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_varinst
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_id_group
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE act_id_info
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE act_id_membership
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE act_id_tenant
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE act_id_tenant_member
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_id_user
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE act_re_camformdef
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_re_case_def
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_re_decision_def
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_re_decision_req_def
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_re_deployment
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_re_procdef
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_ru_authorization
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE act_ru_batch
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_ru_case_execution
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_ru_case_sentry_part
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_ru_event_subscr
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_ru_execution
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_ru_ext_task
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_ru_filter
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE act_ru_identitylink
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_ru_incident
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_ru_job
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_ru_jobdef
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_ru_meter_log
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE act_ru_task
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_ru_task_meter_log
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE act_ru_variable
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE base_data_scope
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE base_data_scope_detail
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_apply
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_apply_detail
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_bom
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_cus_gather_detail
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_customer
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_customer_contacts
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_customer_follow
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_customer_gather
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_device_info
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_device_inspect
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_device_warn
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_instore_log
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_log
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_material
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_material_classes
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_material_property
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_outstore_log
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_purchase
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_purchase_detail
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_sale
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_sale_detail
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_store_receipt
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_store_receipt_detail
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_supplier
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_supplier_formal
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_supplier_risk
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_supply_material
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_unit
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_unit_convert
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_unit_convert_detail
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_unit_type
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE crm_business_opportunity
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE crm_contract_info
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE crm_custom_info
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE crm_custom_user
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE crm_follow_contacts
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE crm_follow_participants
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE crm_follow_record
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE crm_price_sheet
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE crm_replay_record
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE dpm_cost_time
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE dpm_expense
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE dpm_expense_apply
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE dpm_expense_else
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE dpm_members
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE dpm_project_info
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE dpm_science_result
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE high_risk_operation
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE high_risk_operation_person
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE high_risk_operation_step
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE magic_api_backup
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE magic_api_file
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_centralized_procure
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_contract
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_contract_change
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_contract_guarantee
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_contract_invoice
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_contract_other
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_contract_pay
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_contract_pay_detail
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_emergent_tenders
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_file
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_financial_contract
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_financial_estimates
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_financial_estimates_version
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_lot_divide
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_lot_divide_item
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_procure_approval
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_procure_dismantle
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_procure_dismantle_item
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_procure_lot
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_supplier_info
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_supplier_tenders
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_tenders_file
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_tenders_group
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_tenders_plan
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_tenders_plan_approval
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_tenders_result
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_tenders_result_item
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE project_bid
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE project_bid_bidder
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE project_bid_member
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE project_bid_result
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE project_bid_result_detail
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE project_contract
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE project_contract_acceptance
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE project_contract_acceptance_other
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE project_contract_other
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE project_initiation
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE project_pay
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE supplier_bank
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE supplier_contact
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE supplier_info
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE t_order
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE t_order_product
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE t_product
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE table_17561
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE table_29210
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE table_29210_child_1263
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE table_29210_child_9674
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE table_70961
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE tb_mcq_daily
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE tb_station
|
||||
SET tenant_id=1
|
||||
UPDATE test
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE test_01
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE test_gen_gao
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE test_permission
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_app_authorize
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_app_func_design
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_app_menu
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_app_menu_button
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_app_menu_column
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_app_menu_form
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_app_page_design
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_area
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_assco_selection_data
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_authorize
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_bi_project
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_brand_commodity_test
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_brand_series_test
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_brand_test
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_child
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_child_table
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_code_rule
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_code_rule_seed
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_code_schema
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_data_auth
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_data_auth_config
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_data_auth_relation
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_data_auth_table_relation
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_data_display
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_databaselink
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_datasource
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_demo
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_department
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_desktop_history
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_desktop_relation
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_desktop_schema
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_dictionary_detail
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_dictionary_item
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_file
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_form_history
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_form_release
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_form_template
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_interface_auth
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_interface_category
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_interface_info
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_interface_output
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_interface_params
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_interface_schema
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_language
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_language_type
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_liteflow_chain
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_liteflow_script
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_log
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_login_config
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_logo_config
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_menu
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_menu_button
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_menu_column
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_menu_form
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_message
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_multi
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_multi_child
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_multi_child_two
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_oa_news
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_oa_news_relation
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_oa_schedule
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_parent
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_parent_table
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_post
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_print_config
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_print_schema
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_professional_report
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_report
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_report_relation
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_role
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_selection_data
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_stamp
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_subsystem
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_sync_datacenter_org_user
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_tenant
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_tenant_authorize
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_user
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_user_charge_dept
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_user_dept_relation
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_user_desktop_relation
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_user_post_relation
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_user_role_relation
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_visual
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_visual_category
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_visual_config
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_visual_db
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_visual_homerelation
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_visual_map
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_visual_release
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_visual_releaserelation
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_workflow_approve_record
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_workflow_circulated
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_workflow_delegate
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_workflow_draft
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_workflow_extra
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_workflow_form_relation
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_workflow_record
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_workflow_schema
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_workflow_schema_auth
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_workflow_schema_draft
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_workflow_schema_history
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_workflow_special_menu
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
@ -1,779 +0,0 @@
|
||||
UPDATE act_ge_bytearray
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_ge_property
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE act_ge_schema_log
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE act_hi_actinst
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_attachment
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_batch
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_caseactinst
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_caseinst
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_comment
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_dec_in
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_dec_out
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_decinst
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_detail
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_ext_task_log
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_identitylink
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_incident
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_job_log
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_op_log
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_procinst
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_taskinst
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_hi_varinst
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_id_group
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE act_id_info
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE act_id_membership
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE act_id_tenant
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE act_id_tenant_member
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_id_user
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE act_re_camformdef
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_re_case_def
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_re_decision_def
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_re_decision_req_def
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_re_deployment
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_re_procdef
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_ru_authorization
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE act_ru_batch
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_ru_case_execution
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_ru_case_sentry_part
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_ru_event_subscr
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_ru_execution
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_ru_ext_task
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_ru_filter
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE act_ru_identitylink
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_ru_incident
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_ru_job
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_ru_jobdef
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_ru_meter_log
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE act_ru_task
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE act_ru_task_meter_log
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE act_ru_variable
|
||||
SET tenant_id_=1
|
||||
WHERE tenant_id_ is null;
|
||||
UPDATE base_data_scope
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE base_data_scope_detail
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_apply
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_apply_detail
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_bom
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_cus_gather_detail
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_customer
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_customer_contacts
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_customer_follow
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_customer_gather
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_device_info
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_device_inspect
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_device_warn
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_instore_log
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_log
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_material
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_material_classes
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_material_property
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_outstore_log
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_purchase
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_purchase_detail
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_sale
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_sale_detail
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_store_receipt
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_store_receipt_detail
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_supplier
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_supplier_formal
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_supplier_risk
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_supply_material
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_unit
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_unit_convert
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_unit_convert_detail
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE case_erp_unit_type
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE crm_business_opportunity
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE crm_contract_info
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE crm_custom_info
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE crm_custom_user
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE crm_follow_contacts
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE crm_follow_participants
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE crm_follow_record
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE crm_price_sheet
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE crm_replay_record
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE dpm_cost_time
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE dpm_expense
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE dpm_expense_apply
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE dpm_expense_else
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE dpm_members
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE dpm_project_info
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE dpm_science_result
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE high_risk_operation
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE high_risk_operation_person
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE high_risk_operation_step
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE magic_api_backup
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE magic_api_file
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_centralized_procure
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_contract
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_contract_change
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_contract_guarantee
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_contract_invoice
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_contract_other
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_contract_pay
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_contract_pay_detail
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_emergent_tenders
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_file
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_financial_contract
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_financial_estimates
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_financial_estimates_version
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_lot_divide
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_lot_divide_item
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_procure_approval
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_procure_dismantle
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_procure_dismantle_item
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_procure_lot
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_supplier_info
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_supplier_tenders
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_tenders_file
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_tenders_group
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_tenders_plan
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_tenders_plan_approval
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_tenders_result
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE pm_tenders_result_item
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE project_bid
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE project_bid_bidder
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE project_bid_member
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE project_bid_result
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE project_bid_result_detail
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE project_contract
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE project_contract_acceptance
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE project_contract_acceptance_other
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE project_contract_other
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE project_initiation
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE project_pay
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE supplier_bank
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE supplier_contact
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE supplier_info
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE t_order
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE t_order_product
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE t_product
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE table_17561
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE table_29210
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE table_29210_child_1263
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE table_29210_child_9674
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE table_70961
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE tb_mcq_daily
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE tb_station
|
||||
SET tenant_id=1
|
||||
UPDATE test
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE test_01
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE test_gen_gao
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE test_permission
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_app_authorize
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_app_func_design
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_app_menu
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_app_menu_button
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_app_menu_column
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_app_menu_form
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_app_page_design
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_area
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_assco_selection_data
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_authorize
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_bi_project
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_brand_commodity_test
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_brand_series_test
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_brand_test
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_child
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_child_table
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_code_rule
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_code_rule_seed
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_code_schema
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_data_auth
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_data_auth_config
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_data_auth_relation
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_data_auth_table_relation
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_data_display
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_databaselink
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_datasource
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_demo
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_department
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_desktop_history
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_desktop_relation
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_desktop_schema
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_dictionary_detail
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_dictionary_item
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_file
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_form_history
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_form_release
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_form_template
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_interface_auth
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_interface_category
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_interface_info
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_interface_output
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_interface_params
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_interface_schema
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_language
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_language_type
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_liteflow_chain
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_liteflow_script
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_log
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_login_config
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_logo_config
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_menu
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_menu_button
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_menu_column
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_menu_form
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_message
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_multi
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_multi_child
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_multi_child_two
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_oa_news
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_oa_news_relation
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_oa_schedule
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_parent
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_parent_table
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_post
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_print_config
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_print_schema
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_professional_report
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_report
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_report_relation
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_role
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_selection_data
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_stamp
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_subsystem
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_sync_datacenter_org_user
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_tenant
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_tenant_authorize
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_user
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_user_charge_dept
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_user_dept_relation
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_user_desktop_relation
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_user_post_relation
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_user_role_relation
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_visual
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_visual_category
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_visual_config
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_visual_db
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_visual_homerelation
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_visual_map
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_visual_release
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_visual_releaserelation
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_workflow_approve_record
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_workflow_circulated
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_workflow_delegate
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_workflow_draft
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_workflow_extra
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_workflow_form_relation
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_workflow_record
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_workflow_schema
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_workflow_schema_auth
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_workflow_schema_draft
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_workflow_schema_history
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
UPDATE xjr_workflow_special_menu
|
||||
SET tenant_id=1
|
||||
WHERE tenant_id is null;
|
||||
@ -1,42 +0,0 @@
|
||||
|
||||
|
||||
CREATE TABLE xjr_system_config (
|
||||
id bigint NOT NULL COMMENT '主键',
|
||||
code VARCHAR(255) NOT NULL COMMENT '配置编码',
|
||||
name VARCHAR(255) NOT NULL COMMENT '配置名称',
|
||||
value VARCHAR(1000) NULL COMMENT '配置值',
|
||||
remark VARCHAR(255) NULL COMMENT '备注',
|
||||
create_date timestamp(3) NULL COMMENT '创建时间',
|
||||
create_user_id bigint NULL COMMENT '创建人id',
|
||||
modify_date timestamp(3) NULL COMMENT '修改时间',
|
||||
modify_user_id bigint NULL COMMENT '修改人id',
|
||||
delete_mark integer NOT NULL COMMENT '删除标记',
|
||||
enabled_mark integer NOT NULL COMMENT '启用标记',
|
||||
tenant_id bigint NULL COMMENT '租户id',
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
ALTER TABLE xjr_system_config COMMENT '系统配置项';
|
||||
|
||||
INSERT INTO xjr_menu (id, parent_id, name, title, code, icon, path, component, component_type, iframe_src, menu_type, display, allow_modify, allow_delete, out_link, keep_alive, sort_code, remark, create_user_id, create_date, modify_user_id, modify_date, delete_mark, enabled_mark, system_id, form_id, tenant_id) VALUES (1817773926602588161, 1419276797351038976, '系统配置6845', '系统配置', 'systemConfig', 'ant-design:build-outlined', 'xitongpeizhi', '/system/systemConfig/index', 0, NULL, 1, 1, 1, 1, 0, 0, 100, NULL, 1000000000000000000, '2024-07-29 12:07:31.389', 1000000000000000000, '2024-07-31 11:48:41.812', 0, 1, 1, 1817773926321569792, NULL);
|
||||
|
||||
INSERT INTO xjr_menu_button (id, name, menu_id, icon, code, url, method, tenant_id) VALUES (1817815698301071361, '新增', 1817773926602588161, 'ant-design:plus-outlined', 'systemconfig:add', NULL, NULL, NULL);
|
||||
INSERT INTO xjr_menu_button (id, name, menu_id, icon, code, url, method, tenant_id) VALUES (1817815698301071362, '编辑', 1817773926602588161, 'ant-design:form-outlined', 'systemconfig:edit', NULL, NULL, NULL);
|
||||
INSERT INTO xjr_menu_button (id, name, menu_id, icon, code, url, method, tenant_id) VALUES (1817815698301071363, '刷新', 1817773926602588161, 'ant-design:reload-outlined', 'systemconfig:refresh', NULL, NULL, NULL);
|
||||
INSERT INTO xjr_menu_button (id, name, menu_id, icon, code, url, method, tenant_id) VALUES (1817815698301071364, '查看', 1817773926602588161, 'ant-design:eye-outlined', 'systemconfig:view', NULL, NULL, NULL);
|
||||
INSERT INTO xjr_menu_button (id, name, menu_id, icon, code, url, method, tenant_id) VALUES (1817815698301071365, '批量删除', 1817773926602588161, 'ant-design:delete-outlined', 'systemconfig:batchdelete', NULL, NULL, NULL);
|
||||
INSERT INTO xjr_menu_button (id, name, menu_id, icon, code, url, method, tenant_id) VALUES (1817815698301071366, '复制数据', 1817773926602588161, 'ant-design:copy-outlined', 'systemconfig:copyData', NULL, NULL, NULL);
|
||||
INSERT INTO xjr_menu_button (id, name, menu_id, icon, code, url, method, tenant_id) VALUES (1817815698301071367, '快速导入', 1817773926602588161, 'ant-design:import-outlined', 'systemconfig:import', NULL, NULL, NULL);
|
||||
INSERT INTO xjr_menu_button (id, name, menu_id, icon, code, url, method, tenant_id) VALUES (1817815698301071368, '快速导出', 1817773926602588161, 'ant-design:export-outlined', 'systemconfig:export', NULL, NULL, NULL);
|
||||
INSERT INTO xjr_menu_button (id, name, menu_id, icon, code, url, method, tenant_id) VALUES (1817815698301071369, '删除', 1817773926602588161, 'ant-design:delete-outlined', 'systemconfig:delete', NULL, NULL, NULL);
|
||||
|
||||
INSERT INTO xjr_menu_column (id, menu_id, code, name, sort_code, description, tenant_id) VALUES (1818484158651789314, 1817773926602588161, 'code', '编码', NULL, NULL, NULL);
|
||||
INSERT INTO xjr_menu_column (id, menu_id, code, name, sort_code, description, tenant_id) VALUES (1818484158651789315, 1817773926602588161, 'name', '名称', NULL, NULL, NULL);
|
||||
INSERT INTO xjr_menu_column (id, menu_id, code, name, sort_code, description, tenant_id) VALUES (1818484158651789316, 1817773926602588161, 'value', '配置值', NULL, NULL, NULL);
|
||||
INSERT INTO xjr_menu_column (id, menu_id, code, name, sort_code, description, tenant_id) VALUES (1818484158651789317, 1817773926602588161, 'remark', '备注', NULL, NULL, NULL);
|
||||
|
||||
INSERT INTO xjr_menu_form (id, menu_id, code, name, sort_code, is_required, parent_id, tenant_id) VALUES (1818493964993261569, 1817773926602588161, '8318dab17ae34a13bd6a3838bb5b57f1', '标题', NULL, 0, 0, NULL);
|
||||
INSERT INTO xjr_menu_form (id, menu_id, code, name, sort_code, is_required, parent_id, tenant_id) VALUES (1818493964993261570, 1817773926602588161, 'code', '编码', NULL, 1, 0, NULL);
|
||||
INSERT INTO xjr_menu_form (id, menu_id, code, name, sort_code, is_required, parent_id, tenant_id) VALUES (1818493964993261571, 1817773926602588161, 'name', '名称', NULL, 1, 0, NULL);
|
||||
INSERT INTO xjr_menu_form (id, menu_id, code, name, sort_code, is_required, parent_id, tenant_id) VALUES (1818493964993261572, 1817773926602588161, 'value', '配置值', NULL, 0, 0, NULL);
|
||||
INSERT INTO xjr_menu_form (id, menu_id, code, name, sort_code, is_required, parent_id, tenant_id) VALUES (1818493964993261573, 1817773926602588161, 'remark', '备注', NULL, 0, 0, NULL);
|
||||
|
||||
@ -1,62 +0,0 @@
|
||||
-- "xjr_system_config" definition
|
||||
|
||||
-- Drop table
|
||||
|
||||
-- DROP TABLE "xjr_system_config";
|
||||
|
||||
CREATE TABLE "xjr_system_config" (
|
||||
"id" bigint NOT NULL,
|
||||
"code" character varying(255 char) NOT NULL,
|
||||
"name" character varying(255 char) NOT NULL,
|
||||
"value" character varying(1000 char) NULL,
|
||||
"remark" character varying(255 char) NULL,
|
||||
"create_date" timestamp(3) without time zone NULL,
|
||||
"create_user_id" bigint NULL,
|
||||
"modify_date" timestamp(3) without time zone NULL,
|
||||
"modify_user_id" bigint NULL,
|
||||
"delete_mark" integer NOT NULL,
|
||||
"enabled_mark" integer NOT NULL,
|
||||
"tenant_id" bigint NULL,
|
||||
PRIMARY KEY ("id")
|
||||
);
|
||||
COMMENT ON TABLE "xjr_system_config" IS '系统配置项';
|
||||
|
||||
-- Column comments
|
||||
|
||||
COMMENT ON COLUMN "xjr_system_config"."id" IS '主键';
|
||||
COMMENT ON COLUMN "xjr_system_config"."code" IS '配置编码';
|
||||
COMMENT ON COLUMN "xjr_system_config"."name" IS '配置名称';
|
||||
COMMENT ON COLUMN "xjr_system_config"."value" IS '配置值';
|
||||
COMMENT ON COLUMN "xjr_system_config"."remark" IS '备注';
|
||||
COMMENT ON COLUMN "xjr_system_config"."create_date" IS '创建时间';
|
||||
COMMENT ON COLUMN "xjr_system_config"."create_user_id" IS '创建人id';
|
||||
COMMENT ON COLUMN "xjr_system_config"."modify_date" IS '修改时间';
|
||||
COMMENT ON COLUMN "xjr_system_config"."modify_user_id" IS '修改人id';
|
||||
COMMENT ON COLUMN "xjr_system_config"."delete_mark" IS '删除标记';
|
||||
COMMENT ON COLUMN "xjr_system_config"."enabled_mark" IS '启用标记';
|
||||
COMMENT ON COLUMN "xjr_system_config"."tenant_id" IS '租户id';
|
||||
|
||||
|
||||
INSERT INTO "xjr_menu" ("id", "parent_id", "name", "title", "code", "icon", "path", "component", "component_type", "iframe_src", "menu_type", "display", "allow_modify", "allow_delete", "out_link", "keep_alive", "sort_code", "remark", "create_user_id", "create_date", "modify_user_id", "modify_date", "delete_mark", "enabled_mark", "system_id", "form_id", "tenant_id") VALUES (1817773926602588161, 1419276797351038976, '系统配置6845', '系统配置', 'systemConfig', 'ant-design:build-outlined', 'xitongpeizhi', '/system/systemConfig/index', 0, NULL, 1, 1, 1, 1, 0, 0, 100, NULL, 1000000000000000000, '2024-07-29 12:07:31.389', 1000000000000000000, '2024-07-31 11:48:41.812', 0, 1, 1, 1817773926321569792, NULL);
|
||||
|
||||
INSERT INTO "xjr_menu_button" ("id", "name", "menu_id", "icon", "code", "url", "method", "tenant_id") VALUES (1817815698301071361, '新增', 1817773926602588161, 'ant-design:plus-outlined', 'systemconfig:add', NULL, NULL, NULL);
|
||||
INSERT INTO "xjr_menu_button" ("id", "name", "menu_id", "icon", "code", "url", "method", "tenant_id") VALUES (1817815698301071362, '编辑', 1817773926602588161, 'ant-design:form-outlined', 'systemconfig:edit', NULL, NULL, NULL);
|
||||
INSERT INTO "xjr_menu_button" ("id", "name", "menu_id", "icon", "code", "url", "method", "tenant_id") VALUES (1817815698301071363, '刷新', 1817773926602588161, 'ant-design:reload-outlined', 'systemconfig:refresh', NULL, NULL, NULL);
|
||||
INSERT INTO "xjr_menu_button" ("id", "name", "menu_id", "icon", "code", "url", "method", "tenant_id") VALUES (1817815698301071364, '查看', 1817773926602588161, 'ant-design:eye-outlined', 'systemconfig:view', NULL, NULL, NULL);
|
||||
INSERT INTO "xjr_menu_button" ("id", "name", "menu_id", "icon", "code", "url", "method", "tenant_id") VALUES (1817815698301071365, '批量删除', 1817773926602588161, 'ant-design:delete-outlined', 'systemconfig:batchdelete', NULL, NULL, NULL);
|
||||
INSERT INTO "xjr_menu_button" ("id", "name", "menu_id", "icon", "code", "url", "method", "tenant_id") VALUES (1817815698301071366, '复制数据', 1817773926602588161, 'ant-design:copy-outlined', 'systemconfig:copyData', NULL, NULL, NULL);
|
||||
INSERT INTO "xjr_menu_button" ("id", "name", "menu_id", "icon", "code", "url", "method", "tenant_id") VALUES (1817815698301071367, '快速导入', 1817773926602588161, 'ant-design:import-outlined', 'systemconfig:import', NULL, NULL, NULL);
|
||||
INSERT INTO "xjr_menu_button" ("id", "name", "menu_id", "icon", "code", "url", "method", "tenant_id") VALUES (1817815698301071368, '快速导出', 1817773926602588161, 'ant-design:export-outlined', 'systemconfig:export', NULL, NULL, NULL);
|
||||
INSERT INTO "xjr_menu_button" ("id", "name", "menu_id", "icon", "code", "url", "method", "tenant_id") VALUES (1817815698301071369, '删除', 1817773926602588161, 'ant-design:delete-outlined', 'systemconfig:delete', NULL, NULL, NULL);
|
||||
|
||||
INSERT INTO "xjr_menu_column" ("id", "menu_id", "code", "name", "sort_code", "description", "tenant_id") VALUES (1818484158651789314, 1817773926602588161, 'code', '编码', NULL, NULL, NULL);
|
||||
INSERT INTO "xjr_menu_column" ("id", "menu_id", "code", "name", "sort_code", "description", "tenant_id") VALUES (1818484158651789315, 1817773926602588161, 'name', '名称', NULL, NULL, NULL);
|
||||
INSERT INTO "xjr_menu_column" ("id", "menu_id", "code", "name", "sort_code", "description", "tenant_id") VALUES (1818484158651789316, 1817773926602588161, 'value', '配置值', NULL, NULL, NULL);
|
||||
INSERT INTO "xjr_menu_column" ("id", "menu_id", "code", "name", "sort_code", "description", "tenant_id") VALUES (1818484158651789317, 1817773926602588161, 'remark', '备注', NULL, NULL, NULL);
|
||||
|
||||
INSERT INTO "xjr_menu_form" ("id", "menu_id", "code", "name", "sort_code", "is_required", "parent_id", "tenant_id") VALUES (1818493964993261569, 1817773926602588161, '8318dab17ae34a13bd6a3838bb5b57f1', '标题', NULL, 0, 0, NULL);
|
||||
INSERT INTO "xjr_menu_form" ("id", "menu_id", "code", "name", "sort_code", "is_required", "parent_id", "tenant_id") VALUES (1818493964993261570, 1817773926602588161, 'code', '编码', NULL, 1, 0, NULL);
|
||||
INSERT INTO "xjr_menu_form" ("id", "menu_id", "code", "name", "sort_code", "is_required", "parent_id", "tenant_id") VALUES (1818493964993261571, 1817773926602588161, 'name', '名称', NULL, 1, 0, NULL);
|
||||
INSERT INTO "xjr_menu_form" ("id", "menu_id", "code", "name", "sort_code", "is_required", "parent_id", "tenant_id") VALUES (1818493964993261572, 1817773926602588161, 'value', '配置值', NULL, 0, 0, NULL);
|
||||
INSERT INTO "xjr_menu_form" ("id", "menu_id", "code", "name", "sort_code", "is_required", "parent_id", "tenant_id") VALUES (1818493964993261573, 1817773926602588161, 'remark', '备注', NULL, 0, 0, NULL);
|
||||
|
||||
@ -1,52 +0,0 @@
|
||||
CREATE TABLE xjr_notice (
|
||||
id bigint NOT NULL,
|
||||
title varchar(500) NOT NULL COMMENT '标题',
|
||||
TYPE bigint NOT NULL COMMENT '类型,枚举id',
|
||||
type_name varchar(100) COMMENT '类型字面值',
|
||||
publisher bigint COMMENT '发布主体id',
|
||||
publisher_type integer COMMENT '发布主体类型,0用户/1组织',
|
||||
publisher_name integer COMMENT '发布主体名称',
|
||||
CONTENT TEXT COMMENT '发布内容',
|
||||
attachs bigint COMMENT '附件组id',
|
||||
status integer COMMENT '状态,0草稿/1已发布/2已结束',
|
||||
create_user_id bigint NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
modify_user_id bigint,
|
||||
modify_date timestamp,
|
||||
delete_mark integer NOT NULL DEFAULT 0,
|
||||
enabled_mark integer NOT NULL DEFAULT 1,
|
||||
dept_id bigint,
|
||||
tenant_id bigint,
|
||||
rule_user_id bigint
|
||||
)COMMENT '通知、手动待办';
|
||||
|
||||
ALTER TABLE xjr_notice ADD CONSTRAINT con_incident_dev_xjr_notice_constraint_1 PRIMARY KEY (id);
|
||||
|
||||
|
||||
|
||||
CREATE TABLE xjr_notice_user (
|
||||
id bigint NOT NULL,
|
||||
notice_id bigint NOT NULL COMMENT '关联通知id',
|
||||
user_id bigint NOT NULL,
|
||||
is_read integer NOT NULL DEFAULT 0 COMMENT '是否已读1',
|
||||
reply varchar(1000) COMMENT '回复',
|
||||
create_user_id bigint NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
modify_user_id bigint,
|
||||
modify_date timestamp,
|
||||
delete_mark integer NOT NULL DEFAULT 0,
|
||||
enabled_mark integer NOT NULL DEFAULT 1,
|
||||
dept_id bigint,
|
||||
tenant_id bigint
|
||||
)COMMENT '通知用户表';
|
||||
|
||||
ALTER TABLE xjr_notice_user ADD CONSTRAINT con_incident_dev_xjr_notice_user_constraint_1 PRIMARY KEY (id);
|
||||
|
||||
ALTER TABLE xjr_notice ADD COLUMN `RANGE` integer NOT NULL DEFAULT 1 COMMENT '通知范围,0公开/1指定用户';
|
||||
|
||||
ALTER TABLE xjr_department ADD COLUMN area_id bigint COMMENT '所在区域id,区域表id';
|
||||
|
||||
|
||||
ALTER TABLE xjr_notice ADD COLUMN params_json varchar(5000) COMMENT 'json 参数';
|
||||
|
||||
ALTER TABLE xjr_notice ADD COLUMN path varchar(500) COMMENT '路径';
|
||||
@ -1,114 +0,0 @@
|
||||
CREATE TABLE xjr_notice (
|
||||
id bigint NOT NULL,
|
||||
title varchar(500) NOT NULL,
|
||||
TYPE bigint NOT NULL,
|
||||
type_name varchar(100),
|
||||
publisher bigint,
|
||||
publisher_type integer,
|
||||
publisher_name integer,
|
||||
CONTENT TEXT,
|
||||
attachs bigint,
|
||||
status integer,
|
||||
create_user_id bigint NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
modify_user_id bigint,
|
||||
modify_date timestamp,
|
||||
delete_mark integer NOT NULL DEFAULT 0,
|
||||
enabled_mark integer NOT NULL DEFAULT 1,
|
||||
dept_id bigint,
|
||||
tenant_id bigint,
|
||||
rule_user_id bigint
|
||||
);
|
||||
|
||||
ALTER TABLE xjr_notice SET
|
||||
TABLESPACE "sys_default";
|
||||
|
||||
COMMENT ON
|
||||
TABLE xjr_notice IS '通知、手动待办';
|
||||
|
||||
COMMENT ON
|
||||
COLUMN xjr_notice.title IS '标题';
|
||||
|
||||
COMMENT ON
|
||||
COLUMN xjr_notice.type IS '类型,枚举id';
|
||||
|
||||
COMMENT ON
|
||||
COLUMN xjr_notice.type_name IS '类型字面值';
|
||||
|
||||
COMMENT ON
|
||||
COLUMN xjr_notice.publisher IS '发布主体id';
|
||||
|
||||
COMMENT ON
|
||||
COLUMN xjr_notice.publisher_type IS '发布主体类型,0用户/1组织';
|
||||
|
||||
COMMENT ON
|
||||
COLUMN xjr_notice.publisher_name IS '发布主体名称';
|
||||
|
||||
COMMENT ON
|
||||
COLUMN xjr_notice.content IS '发布内容';
|
||||
|
||||
COMMENT ON
|
||||
COLUMN xjr_notice.attachs IS '附件组id';
|
||||
|
||||
COMMENT ON
|
||||
COLUMN xjr_notice.status IS '状态,0草稿/1已发布/2已结束';
|
||||
|
||||
ALTER TABLE xjr_notice ADD CONSTRAINT con_incident_dev_xjr_notice_constraint_1 PRIMARY KEY (id) ENABLE VALIDATE;
|
||||
|
||||
|
||||
|
||||
CREATE TABLE xjr_notice_user (
|
||||
id bigint NOT NULL,
|
||||
notice_id bigint NOT NULL,
|
||||
user_id bigint NOT NULL,
|
||||
is_read integer NOT NULL DEFAULT 0,
|
||||
reply varchar(1000),
|
||||
create_user_id bigint NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
modify_user_id bigint,
|
||||
modify_date timestamp,
|
||||
delete_mark integer NOT NULL DEFAULT 0,
|
||||
enabled_mark integer NOT NULL DEFAULT 1,
|
||||
dept_id bigint,
|
||||
tenant_id bigint
|
||||
);
|
||||
|
||||
ALTER TABLE xjr_notice_user SET
|
||||
TABLESPACE "sys_default";
|
||||
|
||||
COMMENT ON
|
||||
TABLE xjr_notice_user IS '通知用户表';
|
||||
|
||||
COMMENT ON
|
||||
COLUMN xjr_notice_user.notice_id IS '关联通知id';
|
||||
|
||||
COMMENT ON
|
||||
COLUMN xjr_notice_user.is_read IS '是否已读1';
|
||||
|
||||
COMMENT ON
|
||||
COLUMN xjr_notice_user.reply IS '回复';
|
||||
|
||||
ALTER TABLE xjr_notice_user ADD CONSTRAINT con_incident_dev_xjr_notice_user_constraint_1 PRIMARY KEY (id) ENABLE VALIDATE;
|
||||
|
||||
|
||||
|
||||
ALTER TABLE xjr_notice ADD COLUMN RANGE integer NOT NULL DEFAULT 1;
|
||||
|
||||
COMMENT ON
|
||||
COLUMN xjr_notice.RANGE IS '通知范围,0公开/1指定用户';
|
||||
|
||||
|
||||
|
||||
ALTER TABLE xjr_department ADD COLUMN area_id bigint;
|
||||
|
||||
COMMENT ON
|
||||
COLUMN xjr_department.area_id IS '所在区域id,区域表id';
|
||||
|
||||
|
||||
ALTER TABLE xjr_notice ADD COLUMN params_json varchar(5000);
|
||||
COMMENT ON
|
||||
COLUMN xjr_notice.params_json IS 'json 参数';
|
||||
|
||||
ALTER TABLE xjr_notice ADD COLUMN path varchar(500);
|
||||
COMMENT ON
|
||||
COLUMN xjr_notice.path IS '路径';
|
||||
@ -1 +0,0 @@
|
||||
ALTER TABLE xjr_data_auth_table_relation MODIFY COLUMN table_name varchar(100);
|
||||
@ -1 +0,0 @@
|
||||
ALTER TABLE "xjr_data_auth_table_relation" ALTER COLUMN "table_name" TYPE CHARACTER VARYING(100 char);
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,51 +0,0 @@
|
||||
ALTER TABLE xjr_department ADD COLUMN equal_dept_id bigint COMMENT '等同部门id,对平台公司是所管理板块,注意造成死循环';
|
||||
|
||||
|
||||
UPDATE xjr_department
|
||||
SET equal_dept_id=432451392312531611
|
||||
WHERE id=230227214110393142;
|
||||
UPDATE xjr_department
|
||||
SET equal_dept_id=301091911701601041
|
||||
WHERE id=181164254207252249;
|
||||
UPDATE xjr_department
|
||||
SET equal_dept_id=231832551822043153
|
||||
WHERE id=102549941291661721;
|
||||
UPDATE xjr_department
|
||||
SET equal_dept_id=233150193761041949
|
||||
WHERE id=175215222631309485;
|
||||
UPDATE xjr_department
|
||||
SET equal_dept_id=206761142156213912
|
||||
WHERE id=232179249126164255;
|
||||
UPDATE xjr_department
|
||||
SET equal_dept_id=106255231556925120
|
||||
WHERE id=142518200832281161;
|
||||
UPDATE xjr_department
|
||||
SET equal_dept_id=189174211117302364
|
||||
WHERE id=117221186201183246;
|
||||
UPDATE xjr_department
|
||||
SET equal_dept_id=181164254207252249
|
||||
WHERE id=301091911701601041;
|
||||
UPDATE xjr_department
|
||||
SET equal_dept_id=102549941291661721
|
||||
WHERE id=231832551822043153;
|
||||
UPDATE xjr_department
|
||||
SET equal_dept_id=232179249126164255
|
||||
WHERE id=206761142156213912;
|
||||
UPDATE xjr_department
|
||||
SET equal_dept_id=142518200832281161
|
||||
WHERE id=106255231556925120;
|
||||
UPDATE xjr_department
|
||||
SET equal_dept_id=230227214110393142
|
||||
WHERE id=432451392312531611;
|
||||
UPDATE xjr_department
|
||||
SET equal_dept_id=175215222631309485
|
||||
WHERE id=233150193761041949;
|
||||
UPDATE xjr_department
|
||||
SET equal_dept_id=117221186201183246
|
||||
WHERE id=189174211117302364;
|
||||
|
||||
|
||||
ALTER TABLE xjr_department ADD COLUMN company_lvl integer COMMENT '如果是公司,记录所在层级';
|
||||
|
||||
|
||||
ALTER TABLE xjr_department MODIFY COLUMN area_id varchar(100) COMMENT '所在区域id字符串,区域表id';
|
||||
@ -1,60 +0,0 @@
|
||||
ALTER TABLE "xjr_department" ADD COLUMN equal_dept_id bigint;
|
||||
|
||||
COMMENT ON
|
||||
COLUMN "xjr_department".equal_dept_id IS '等同部门id,对平台公司是所管理板块,注意造成死循环';
|
||||
|
||||
|
||||
UPDATE "xjr_department"
|
||||
SET "equal_dept_id"=432451392312531611
|
||||
WHERE "id"=230227214110393142;
|
||||
UPDATE "xjr_department"
|
||||
SET "equal_dept_id"=301091911701601041
|
||||
WHERE "id"=181164254207252249;
|
||||
UPDATE "xjr_department"
|
||||
SET "equal_dept_id"=231832551822043153
|
||||
WHERE "id"=102549941291661721;
|
||||
UPDATE "xjr_department"
|
||||
SET "equal_dept_id"=233150193761041949
|
||||
WHERE "id"=175215222631309485;
|
||||
UPDATE "xjr_department"
|
||||
SET "equal_dept_id"=206761142156213912
|
||||
WHERE "id"=232179249126164255;
|
||||
UPDATE "xjr_department"
|
||||
SET "equal_dept_id"=106255231556925120
|
||||
WHERE "id"=142518200832281161;
|
||||
UPDATE "xjr_department"
|
||||
SET "equal_dept_id"=189174211117302364
|
||||
WHERE "id"=117221186201183246;
|
||||
UPDATE "xjr_department"
|
||||
SET "equal_dept_id"=181164254207252249
|
||||
WHERE "id"=301091911701601041;
|
||||
UPDATE "xjr_department"
|
||||
SET "equal_dept_id"=102549941291661721
|
||||
WHERE "id"=231832551822043153;
|
||||
UPDATE "xjr_department"
|
||||
SET "equal_dept_id"=232179249126164255
|
||||
WHERE "id"=206761142156213912;
|
||||
UPDATE "xjr_department"
|
||||
SET "equal_dept_id"=142518200832281161
|
||||
WHERE "id"=106255231556925120;
|
||||
UPDATE "xjr_department"
|
||||
SET "equal_dept_id"=230227214110393142
|
||||
WHERE "id"=432451392312531611;
|
||||
UPDATE "xjr_department"
|
||||
SET "equal_dept_id"=175215222631309485
|
||||
WHERE "id"=233150193761041949;
|
||||
UPDATE "xjr_department"
|
||||
SET "equal_dept_id"=117221186201183246
|
||||
WHERE "id"=189174211117302364;
|
||||
|
||||
|
||||
ALTER TABLE "xjr_department" ADD COLUMN company_lvl integer;
|
||||
|
||||
COMMENT ON
|
||||
COLUMN "xjr_department".company_lvl IS '如果是公司,记录所在层级';
|
||||
|
||||
|
||||
ALTER TABLE "xjr_department" ALTER COLUMN "area_id" TYPE varchar(100);
|
||||
|
||||
COMMENT ON
|
||||
COLUMN "xjr_department"."area_id" IS '所在区域id字符串,区域表id';
|
||||
@ -1 +0,0 @@
|
||||
ALTER TABLE xjr_workflow_draft ADD COLUMN draft_name varchar(255) COMMENT '草稿标题';
|
||||
@ -1,2 +0,0 @@
|
||||
ALTER TABLE xjr_workflow_draft ADD "draft_name" varchar(255);
|
||||
COMMENT ON COLUMN "xjr_workflow_draft"."draft_name" IS '草稿标题';
|
||||
@ -1,10 +0,0 @@
|
||||
/** 人员同步逻辑中设置为是,其他情况下为用户手动创建,应默认为否 **/
|
||||
|
||||
ALTER TABLE xjr_department MODIFY COLUMN is_sync varchar(1) NOT NULL DEFAULT 'N';
|
||||
|
||||
ALTER TABLE xjr_user_dept_relation
|
||||
MODIFY COLUMN is_sync varchar(1) NOT NULL DEFAULT 'N',
|
||||
MODIFY COLUMN is_main varchar(1) NOT NULL DEFAULT 'N';
|
||||
|
||||
ALTER TABLE xjr_user MODIFY COLUMN is_sync varchar(1) NOT NULL DEFAULT 'N';
|
||||
|
||||
@ -1,9 +0,0 @@
|
||||
/** 人员同步逻辑中设置为是,其他情况下为用户手动创建,应默认为否 **/
|
||||
|
||||
ALTER TABLE "xjr_department" ALTER COLUMN "is_sync" SET DEFAULT 'N';
|
||||
|
||||
ALTER TABLE "xjr_user_dept_relation"
|
||||
ALTER COLUMN "is_sync" SET DEFAULT 'N',
|
||||
ALTER COLUMN "is_main" SET DEFAULT 'N';
|
||||
|
||||
ALTER TABLE "xjr_user" ALTER COLUMN "is_sync" SET DEFAULT 'N';
|
||||
@ -1,54 +0,0 @@
|
||||
CREATE TABLE xjr_comment (
|
||||
id bigint NOT NULL,
|
||||
business_code varchar(100) NOT NULL COMMENT '评论对象的业务编码',
|
||||
business_id bigint NOT NULL COMMENT '评论对象的业务id',
|
||||
content varchar(5000) NOT NULL COMMENT '评论内容',
|
||||
attachs bigint NULL COMMENT '附件组id',
|
||||
status integer NOT NULL DEFAULT 1 COMMENT '状态,0草稿/1已发布/2已结束',
|
||||
create_user_id bigint NOT NULL,
|
||||
create_date timestamp(6) NOT NULL,
|
||||
modify_user_id bigint NULL,
|
||||
modify_date timestamp(6) NULL,
|
||||
delete_mark integer NOT NULL,
|
||||
enabled_mark integer NOT NULL,
|
||||
dept_id bigint NULL,
|
||||
tenant_id bigint NULL,
|
||||
rule_user_id bigint NULL,
|
||||
`range` integer NOT NULL DEFAULT 0 COMMENT '通知范围,0公开/1指定用户',
|
||||
PRIMARY KEY (id)
|
||||
)COMMENT '评论、批注、督办表';
|
||||
|
||||
|
||||
CREATE INDEX idx_comment_code ON
|
||||
xjr_comment(business_code);
|
||||
|
||||
CREATE INDEX idx_comment_id ON
|
||||
xjr_comment(
|
||||
business_code,
|
||||
business_id
|
||||
);
|
||||
|
||||
|
||||
|
||||
INSERT INTO xjr_menu (id, parent_id, name, title, code, icon, path, component, component_type, iframe_src, menu_type, display, allow_modify, allow_delete, out_link, keep_alive, sort_code, remark, create_user_id, create_date, modify_user_id, modify_date, delete_mark, enabled_mark, system_id, form_id, tenant_id) VALUES (1847182551917883394, 1541225702878281730, '通用评论0939', '通用评论', 'comment', 'ant-design:pushpin-outlined', 'tongyongpinglun', '/system/comment/index', 0, NULL, 1, 1, 1, 1, 0, 0, 100, NULL, 1000000000000000000, '2024-10-18 15:46:54.040', NULL, NULL, 0, 1, 1, 1847182551611699200, NULL);
|
||||
INSERT INTO xjr_menu_column (id, menu_id, code, name, sort_code, description, tenant_id) VALUES (1847182673942769665, 1847182551917883394, 'businessCode', '评论对象编码', NULL, NULL, NULL);
|
||||
INSERT INTO xjr_menu_column (id, menu_id, code, name, sort_code, description, tenant_id) VALUES (1847182673942769666, 1847182551917883394, 'businessId', '评论对象ID', NULL, NULL, NULL);
|
||||
INSERT INTO xjr_menu_column (id, menu_id, code, name, sort_code, description, tenant_id) VALUES (1847182673942769667, 1847182551917883394, 'content', '评论内容', NULL, NULL, NULL);
|
||||
INSERT INTO xjr_menu_column (id, menu_id, code, name, sort_code, description, tenant_id) VALUES (1847182673942769668, 1847182551917883394, 'createUserId', '评论人', NULL, NULL, NULL);
|
||||
INSERT INTO xjr_menu_column (id, menu_id, code, name, sort_code, description, tenant_id) VALUES (1847182673942769669, 1847182551917883394, 'createDate', '评论时间', NULL, NULL, NULL);
|
||||
INSERT INTO xjr_menu_button (id, name, menu_id, icon, code, url, method, tenant_id) VALUES (1847182673892438017, '新增', 1847182551917883394, 'ant-design:plus-outlined', 'comment:add', NULL, NULL, NULL);
|
||||
INSERT INTO xjr_menu_button (id, name, menu_id, icon, code, url, method, tenant_id) VALUES (1847182673892438018, '编辑', 1847182551917883394, 'ant-design:form-outlined', 'comment:edit', NULL, NULL, NULL);
|
||||
INSERT INTO xjr_menu_button (id, name, menu_id, icon, code, url, method, tenant_id) VALUES (1847182673892438019, '刷新', 1847182551917883394, 'ant-design:reload-outlined', 'comment:refresh', NULL, NULL, NULL);
|
||||
INSERT INTO xjr_menu_button (id, name, menu_id, icon, code, url, method, tenant_id) VALUES (1847182673892438020, '查看', 1847182551917883394, 'ant-design:eye-outlined', 'comment:view', NULL, NULL, NULL);
|
||||
INSERT INTO xjr_menu_button (id, name, menu_id, icon, code, url, method, tenant_id) VALUES (1847182673892438021, '批量删除', 1847182551917883394, 'ant-design:delete-outlined', 'comment:batchdelete', NULL, NULL, NULL);
|
||||
INSERT INTO xjr_menu_button (id, name, menu_id, icon, code, url, method, tenant_id) VALUES (1847182673892438022, '复制数据', 1847182551917883394, 'ant-design:copy-outlined', 'comment:copyData', NULL, NULL, NULL);
|
||||
INSERT INTO xjr_menu_button (id, name, menu_id, icon, code, url, method, tenant_id) VALUES (1847182673892438023, '快速导入', 1847182551917883394, 'ant-design:import-outlined', 'comment:import', NULL, NULL, NULL);
|
||||
INSERT INTO xjr_menu_button (id, name, menu_id, icon, code, url, method, tenant_id) VALUES (1847182673892438024, '快速导出', 1847182551917883394, 'ant-design:export-outlined', 'comment:export', NULL, NULL, NULL);
|
||||
INSERT INTO xjr_menu_button (id, name, menu_id, icon, code, url, method, tenant_id) VALUES (1847182673892438025, '删除', 1847182551917883394, 'ant-design:delete-outlined', 'comment:delete', NULL, NULL, NULL);
|
||||
INSERT INTO xjr_menu_form (id, menu_id, code, name, sort_code, is_required, parent_id, tenant_id) VALUES (1847182673942769670, 1847182551917883394, '12e79f0dec5844aaa838379519fb6f53', '标题', NULL, 0, 0, NULL);
|
||||
INSERT INTO xjr_menu_form (id, menu_id, code, name, sort_code, is_required, parent_id, tenant_id) VALUES (1847182673942769671, 1847182551917883394, 'businessCode', '评论对象编码', NULL, 0, 0, NULL);
|
||||
INSERT INTO xjr_menu_form (id, menu_id, code, name, sort_code, is_required, parent_id, tenant_id) VALUES (1847182673942769672, 1847182551917883394, 'businessId', '评论对象ID', NULL, 0, 0, NULL);
|
||||
INSERT INTO xjr_menu_form (id, menu_id, code, name, sort_code, is_required, parent_id, tenant_id) VALUES (1847182673942769673, 1847182551917883394, 'content', '评论内容', NULL, 1, 0, NULL);
|
||||
INSERT INTO xjr_menu_form (id, menu_id, code, name, sort_code, is_required, parent_id, tenant_id) VALUES (1847182673942769674, 1847182551917883394, 'attachs', '附件', NULL, 0, 0, NULL);
|
||||
INSERT INTO xjr_menu_form (id, menu_id, code, name, sort_code, is_required, parent_id, tenant_id) VALUES (1847182673942769675, 1847182551917883394, 'createUserId', '评论人', NULL, 0, 0, NULL);
|
||||
INSERT INTO xjr_menu_form (id, menu_id, code, name, sort_code, is_required, parent_id, tenant_id) VALUES (1847182673942769676, 1847182551917883394, 'createDate', '评论时间', NULL, 0, 0, NULL);
|
||||
@ -1,66 +0,0 @@
|
||||
CREATE TABLE xjr_comment (
|
||||
id bigint NOT NULL,
|
||||
business_code varchar(100) NOT NULL,
|
||||
business_id bigint NOT NULL,
|
||||
content character varying(5000 char) NOT NULL,
|
||||
attachs bigint NULL,
|
||||
status integer NOT NULL DEFAULT 1,
|
||||
create_user_id bigint NOT NULL,
|
||||
create_date timestamp(6) without time zone NOT NULL,
|
||||
modify_user_id bigint NULL,
|
||||
modify_date timestamp(6) without time zone NULL,
|
||||
delete_mark integer NOT NULL,
|
||||
enabled_mark integer NOT NULL,
|
||||
dept_id bigint NULL,
|
||||
tenant_id bigint NULL,
|
||||
rule_user_id bigint NULL,
|
||||
range integer NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE xjr_comment IS '评论、批注、督办表';
|
||||
COMMENT ON COLUMN xjr_comment.business_code IS '评论对象的业务编码';
|
||||
COMMENT ON COLUMN xjr_comment.business_id IS '评论对象的业务id';
|
||||
COMMENT ON COLUMN xjr_comment.content IS '评论内容';
|
||||
COMMENT ON COLUMN xjr_comment.attachs IS '附件组id';
|
||||
COMMENT ON COLUMN xjr_comment.status IS '状态,0草稿/1已发布/2已结束';
|
||||
COMMENT ON COLUMN xjr_comment.range IS '通知范围,0公开/1指定用户';
|
||||
|
||||
|
||||
|
||||
|
||||
CREATE INDEX idx_comment_code ON
|
||||
"xjr_comment"
|
||||
USING BTREE ("business_code");
|
||||
|
||||
CREATE INDEX idx_comment_id ON
|
||||
"xjr_comment"
|
||||
USING BTREE (
|
||||
"business_code",
|
||||
"business_id"
|
||||
);
|
||||
|
||||
|
||||
|
||||
INSERT INTO "xjr_menu" ("id", "parent_id", "name", "title", "code", "icon", "path", "component", "component_type", "iframe_src", "menu_type", "display", "allow_modify", "allow_delete", "out_link", "keep_alive", "sort_code", "remark", "create_user_id", "create_date", "modify_user_id", "modify_date", "delete_mark", "enabled_mark", "system_id", "form_id", "tenant_id") VALUES (1847182551917883394, 1541225702878281730, '通用评论0939', '通用评论', 'comment', 'ant-design:pushpin-outlined', 'tongyongpinglun', '/system/comment/index', 0, NULL, 1, 1, 1, 1, 0, 0, 100, NULL, 1000000000000000000, '2024-10-18 15:46:54.040', NULL, NULL, 0, 1, 1, 1847182551611699200, NULL);
|
||||
INSERT INTO "xjr_menu_column" ("id", "menu_id", "code", "name", "sort_code", "description", "tenant_id") VALUES (1847182673942769665, 1847182551917883394, 'businessCode', '评论对象编码', NULL, NULL, NULL);
|
||||
INSERT INTO "xjr_menu_column" ("id", "menu_id", "code", "name", "sort_code", "description", "tenant_id") VALUES (1847182673942769666, 1847182551917883394, 'businessId', '评论对象ID', NULL, NULL, NULL);
|
||||
INSERT INTO "xjr_menu_column" ("id", "menu_id", "code", "name", "sort_code", "description", "tenant_id") VALUES (1847182673942769667, 1847182551917883394, 'content', '评论内容', NULL, NULL, NULL);
|
||||
INSERT INTO "xjr_menu_column" ("id", "menu_id", "code", "name", "sort_code", "description", "tenant_id") VALUES (1847182673942769668, 1847182551917883394, 'createUserId', '评论人', NULL, NULL, NULL);
|
||||
INSERT INTO "xjr_menu_column" ("id", "menu_id", "code", "name", "sort_code", "description", "tenant_id") VALUES (1847182673942769669, 1847182551917883394, 'createDate', '评论时间', NULL, NULL, NULL);
|
||||
INSERT INTO "xjr_menu_button" ("id", "name", "menu_id", "icon", "code", "url", "method", "tenant_id") VALUES (1847182673892438017, '新增', 1847182551917883394, 'ant-design:plus-outlined', 'comment:add', NULL, NULL, NULL);
|
||||
INSERT INTO "xjr_menu_button" ("id", "name", "menu_id", "icon", "code", "url", "method", "tenant_id") VALUES (1847182673892438018, '编辑', 1847182551917883394, 'ant-design:form-outlined', 'comment:edit', NULL, NULL, NULL);
|
||||
INSERT INTO "xjr_menu_button" ("id", "name", "menu_id", "icon", "code", "url", "method", "tenant_id") VALUES (1847182673892438019, '刷新', 1847182551917883394, 'ant-design:reload-outlined', 'comment:refresh', NULL, NULL, NULL);
|
||||
INSERT INTO "xjr_menu_button" ("id", "name", "menu_id", "icon", "code", "url", "method", "tenant_id") VALUES (1847182673892438020, '查看', 1847182551917883394, 'ant-design:eye-outlined', 'comment:view', NULL, NULL, NULL);
|
||||
INSERT INTO "xjr_menu_button" ("id", "name", "menu_id", "icon", "code", "url", "method", "tenant_id") VALUES (1847182673892438021, '批量删除', 1847182551917883394, 'ant-design:delete-outlined', 'comment:batchdelete', NULL, NULL, NULL);
|
||||
INSERT INTO "xjr_menu_button" ("id", "name", "menu_id", "icon", "code", "url", "method", "tenant_id") VALUES (1847182673892438022, '复制数据', 1847182551917883394, 'ant-design:copy-outlined', 'comment:copyData', NULL, NULL, NULL);
|
||||
INSERT INTO "xjr_menu_button" ("id", "name", "menu_id", "icon", "code", "url", "method", "tenant_id") VALUES (1847182673892438023, '快速导入', 1847182551917883394, 'ant-design:import-outlined', 'comment:import', NULL, NULL, NULL);
|
||||
INSERT INTO "xjr_menu_button" ("id", "name", "menu_id", "icon", "code", "url", "method", "tenant_id") VALUES (1847182673892438024, '快速导出', 1847182551917883394, 'ant-design:export-outlined', 'comment:export', NULL, NULL, NULL);
|
||||
INSERT INTO "xjr_menu_button" ("id", "name", "menu_id", "icon", "code", "url", "method", "tenant_id") VALUES (1847182673892438025, '删除', 1847182551917883394, 'ant-design:delete-outlined', 'comment:delete', NULL, NULL, NULL);
|
||||
INSERT INTO "xjr_menu_form" ("id", "menu_id", "code", "name", "sort_code", "is_required", "parent_id", "tenant_id") VALUES (1847182673942769670, 1847182551917883394, '12e79f0dec5844aaa838379519fb6f53', '标题', NULL, 0, 0, NULL);
|
||||
INSERT INTO "xjr_menu_form" ("id", "menu_id", "code", "name", "sort_code", "is_required", "parent_id", "tenant_id") VALUES (1847182673942769671, 1847182551917883394, 'businessCode', '评论对象编码', NULL, 0, 0, NULL);
|
||||
INSERT INTO "xjr_menu_form" ("id", "menu_id", "code", "name", "sort_code", "is_required", "parent_id", "tenant_id") VALUES (1847182673942769672, 1847182551917883394, 'businessId', '评论对象ID', NULL, 0, 0, NULL);
|
||||
INSERT INTO "xjr_menu_form" ("id", "menu_id", "code", "name", "sort_code", "is_required", "parent_id", "tenant_id") VALUES (1847182673942769673, 1847182551917883394, 'content', '评论内容', NULL, 1, 0, NULL);
|
||||
INSERT INTO "xjr_menu_form" ("id", "menu_id", "code", "name", "sort_code", "is_required", "parent_id", "tenant_id") VALUES (1847182673942769674, 1847182551917883394, 'attachs', '附件', NULL, 0, 0, NULL);
|
||||
INSERT INTO "xjr_menu_form" ("id", "menu_id", "code", "name", "sort_code", "is_required", "parent_id", "tenant_id") VALUES (1847182673942769675, 1847182551917883394, 'createUserId', '评论人', NULL, 0, 0, NULL);
|
||||
INSERT INTO "xjr_menu_form" ("id", "menu_id", "code", "name", "sort_code", "is_required", "parent_id", "tenant_id") VALUES (1847182673942769676, 1847182551917883394, 'createDate', '评论时间', NULL, 0, 0, NULL);
|
||||
@ -1 +0,0 @@
|
||||
ALTER TABLE xjr_user ADD COLUMN duty_post varchar(500) COMMENT '岗位职务';
|
||||
@ -1,4 +0,0 @@
|
||||
ALTER TABLE xjr_user ADD COLUMN duty_post varchar(500);
|
||||
|
||||
COMMENT ON
|
||||
COLUMN xjr_user.duty_post IS '岗位职务';
|
||||
@ -1,85 +0,0 @@
|
||||
-- user表添加detail 添加edit
|
||||
INSERT INTO xjr_menu_button
|
||||
(id, "name", menu_id, icon, code, url)
|
||||
VALUES(1881969306155782197, '编辑', 1419276797568356352, 'ant-design:form-outlined', 'user:edit', NULL);
|
||||
INSERT INTO xjr_menu_button
|
||||
(id, "name", menu_id, icon, code, url)
|
||||
VALUES(1881969306155782196, '查看详情', 1419276797568356352, 'ant-design:form-outlined', 'user:detail', NULL);
|
||||
|
||||
-- role 表添加detail
|
||||
INSERT INTO xjr_menu_button
|
||||
(id, "name", menu_id, icon, code, url, "method", tenant_id)
|
||||
VALUES(1881969306155782153, '查看详情', 1419276797849243648, NULL, 'role:detail', NULL, NULL, NULL);
|
||||
INSERT INTO xjr_menu_button
|
||||
(id, "name", menu_id, icon, code, url, "method", tenant_id)
|
||||
VALUES(1887694727659397122, '角色登出', 1419276797849243648, NULL, 'role:logoutRole', 'logoutRole', 1, NULL);
|
||||
|
||||
-- department 表添加detail
|
||||
INSERT INTO xjr_menu_button
|
||||
(id, "name", menu_id, icon, code, url)
|
||||
VALUES(1881969306155782198, '查看详情', 1419276797720137728, 'ant-design:form-outlined', 'department:detail', NULL);
|
||||
|
||||
-- post 表添加detail
|
||||
INSERT INTO xjr_menu_button
|
||||
(id, "name", menu_id, icon, code, url)
|
||||
VALUES(1881969306155782199, '查看详情', 1419276797978742784, 'ant-design:form-outlined', 'post:detail', NULL);
|
||||
|
||||
-- 数据权限
|
||||
INSERT INTO xjr_menu_button
|
||||
(id, "name", menu_id, icon, code, url, "method", tenant_id)
|
||||
VALUES(1881969306155782154, '查看详情', 1635086300032897025, NULL, 'dataAuth:detail', NULL, NULL, NULL);
|
||||
UPDATE xjr_menu_button
|
||||
SET "name"='新增', menu_id=1635086300032897025, icon=NULL, code='dataAuth:add', url='add', "method"=1, tenant_id=NULL
|
||||
WHERE code='index:add';
|
||||
UPDATE xjr_menu_button
|
||||
SET "name"='编辑', menu_id=1635086300032897025, icon=NULL, code='dataAuth:edit', url='edit', "method"=2, tenant_id=NULL
|
||||
WHERE code='index:edit';
|
||||
UPDATE xjr_menu_button
|
||||
SET "name"='删除', menu_id=1635086300032897025, icon=NULL, code='dataAuth:delete', url='delete', "method"=3, tenant_id=NULL
|
||||
WHERE code='index:delete';
|
||||
UPDATE xjr_menu_button
|
||||
SET "name"='查看授权对象', menu_id=1635086300032897025, icon=NULL, code='dataAuth:view', url='view', "method"=0, tenant_id=NULL
|
||||
WHERE code='index:view';
|
||||
UPDATE xjr_menu_button
|
||||
SET "name"='查看详情', menu_id=1635086300032897025, icon=NULL, code='dataAuth:detail', url='detail', "method"=0, tenant_id=NULL
|
||||
WHERE code='index:detail';
|
||||
|
||||
-- 系统配置
|
||||
INSERT INTO xjr_menu_button
|
||||
(id, "name", menu_id, icon, code, url, "method", tenant_id)
|
||||
VALUES(1887312945902624773, '查看详情', 1817773926602588161, NULL, 'systemConfig:detail', 'detail', 0, NULL);
|
||||
UPDATE xjr_menu_button
|
||||
SET "name"='新增', menu_id=1817773926602588161, icon='ant-design:plus-outlined', code='systemConfig:add', url=NULL, "method"=NULL, tenant_id=NULL
|
||||
WHERE code='systemconfig:add';
|
||||
UPDATE xjr_menu_button
|
||||
SET "name"='编辑', menu_id=1817773926602588161, icon='ant-design:form-outlined', code='systemConfig:edit', url=NULL, "method"=NULL, tenant_id=NULL
|
||||
WHERE code='systemconfig:edit';
|
||||
UPDATE xjr_menu_button
|
||||
SET "name"='刷新', menu_id=1817773926602588161, icon='ant-design:reload-outlined', code='systemConfig:refresh', url=NULL, "method"=NULL, tenant_id=NULL
|
||||
WHERE code='systemconfig:refresh';
|
||||
UPDATE xjr_menu_button
|
||||
SET "name"='查看', menu_id=1817773926602588161, icon='ant-design:eye-outlined', code='systemConfig:view', url=NULL, "method"=NULL, tenant_id=NULL
|
||||
WHERE code='systemconfig:view';
|
||||
UPDATE xjr_menu_button
|
||||
SET "name"='批量删除', menu_id=1817773926602588161, icon='ant-design:delete-outlined', code='systemConfig:batchdelete', url=NULL, "method"=NULL, tenant_id=NULL
|
||||
WHERE code='systemconfig:batchdelete';
|
||||
UPDATE xjr_menu_button
|
||||
SET "name"='复制数据', menu_id=1817773926602588161, icon='ant-design:copy-outlined', code='systemConfig:copyData', url=NULL, "method"=NULL, tenant_id=NULL
|
||||
WHERE code='systemconfig:copyData';
|
||||
UPDATE xjr_menu_button
|
||||
SET "name"='快速导入', menu_id=1817773926602588161, icon='ant-design:import-outlined', code='systemConfig:import', url=NULL, "method"=NULL, tenant_id=NULL
|
||||
WHERE code='systemconfig:import';
|
||||
UPDATE xjr_menu_button
|
||||
SET "name"='快速导出', menu_id=1817773926602588161, icon='ant-design:export-outlined', code='systemConfig:export', url=NULL, "method"=NULL, tenant_id=NULL
|
||||
WHERE code='systemconfig:export';
|
||||
UPDATE xjr_menu_button
|
||||
SET "name"='删除', menu_id=1817773926602588161, icon='ant-design:delete-outlined', code='systemConfig:delete', url=NULL, "method"=NULL, tenant_id=NULL
|
||||
WHERE code='systemconfig:delete';
|
||||
UPDATE xjr_menu_button
|
||||
SET "name"='查看详情', menu_id=1817773926602588161, icon=NULL, code='systemConfig:detail', url='detail', "method"=0, tenant_id=NULL
|
||||
WHERE code='systemconfig:detail';
|
||||
|
||||
-- 系统配置 登出设置
|
||||
INSERT INTO xjr_system_config
|
||||
(id, code, "name", value, remark, create_date, create_user_id, modify_date, modify_user_id, delete_mark, enabled_mark, tenant_id)
|
||||
VALUES(1887684370031206402, 'logoutUserWhileModifyRolePriv', '修改权限用户登出设置', 'false', '修改权限后用户登出设置,现有配置权限/app权限会有登出得功能,该系统配置是为其设置默认值。设置值为 true 或者 false。只有设置了true,才会统一执行自动登出。没配置或者配置为其他都不默认登出。', '2025-02-07 10:06:39.968', 1000000000000000000, '2025-02-07 10:34:28.255', 1000000000000000000, 0, 1, NULL);
|
||||
@ -1,5 +0,0 @@
|
||||
ALTER TABLE xjr_sync_datacenter_org_user
|
||||
ADD COLUMN hcm_status varchar(10);
|
||||
|
||||
ALTER TABLE xjr_user
|
||||
ADD COLUMN hcm_status varchar(10) COMMENT 'hcm中的人员状态,为1标识是集团内正式员工';
|
||||
@ -1,7 +0,0 @@
|
||||
ALTER TABLE xjr_sync_datacenter_org_user
|
||||
ADD COLUMN "hcm_status" varchar(10);
|
||||
|
||||
ALTER TABLE xjr_user
|
||||
ADD COLUMN "hcm_status" varchar(10);
|
||||
|
||||
COMMENT ON COLUMN xjr_user."hcm_status" IS 'hcm中的人员状态,为1标识是集团内正式员工';
|
||||
6
script/20250410/新增配置验证码和blockIp的系统配置项的sql.sql
Normal file
6
script/20250410/新增配置验证码和blockIp的系统配置项的sql.sql
Normal file
@ -0,0 +1,6 @@
|
||||
INSERT INTO xjr_system_config
|
||||
(id, code, "name", value, remark, create_date, create_user_id, modify_date, modify_user_id, delete_mark, enabled_mark, tenant_id)
|
||||
VALUES(1909523692669673474, 'checkErrorLoginCaptchaPriv', '登录验证码配置', '{"checkErrorLoginCaptcha":"Y","checkErrorLoginCaptchaCount":3}', '登录验证码开启配置,true 为打开,主要功能是如果checkErrorLoginCaptchaCount=0 每次登录都需要验证码。如果checkErrorLoginCaptchaCount>0 既失败多少次后需要验证码', '2025-04-08 16:28:20.249', 1000000000000000000, '2025-04-10 10:33:18.426', 1000000000000000000, 0, 1, NULL);
|
||||
INSERT INTO xjr_system_config
|
||||
(id, code, "name", value, remark, create_date, create_user_id, modify_date, modify_user_id, delete_mark, enabled_mark, tenant_id)
|
||||
VALUES(1910134795422154754, 'checkErrorLoginBlockIpPriv', '登录错误开启ip拦截开关', '{"checkErrorLoginBlockIp":"N","checkErrorLoginBlockIpCount":20,"checkErrorLoginBlockIpRestoreTime":1}', '登录错误开启ip拦截开关checkErrorLoginBlockIp 配置Y为打开,N为关闭, checkErrorLoginBlockIpCount为最大次数, checkErrorLoginBlockIpRestoreTime为ip拦截的恢复时间(小时)使用', '2025-04-10 08:56:38.477', 1000000000000000000, '2025-04-10 14:51:58.972', 1000000000000000000, 0, 1, NULL);
|
||||
5
script/20250422/草稿表加字段.sql
Normal file
5
script/20250422/草稿表加字段.sql
Normal file
@ -0,0 +1,5 @@
|
||||
ALTER TABLE xjr_workflow_draft
|
||||
ADD COLUMN process_id VARCHAR(50);
|
||||
|
||||
COMMENT ON COLUMN xjr_workflow_draft.process_id
|
||||
IS '流程id';
|
||||
106629
script/mysql全库20240401.sql
106629
script/mysql全库20240401.sql
File diff suppressed because one or more lines are too long
106566
script/mysql全库20250109.sql
106566
script/mysql全库20250109.sql
File diff suppressed because one or more lines are too long
Binary file not shown.
BIN
script/nacos_config_export_20250428101111.zip
Normal file
BIN
script/nacos_config_export_20250428101111.zip
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
@ -1,89 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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">
|
||||
<parent>
|
||||
<artifactId>xjrsoft-cloud</artifactId>
|
||||
<groupId>com.xjrsoft</groupId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>xjrsoft-admin</artifactId>
|
||||
<name>${project.artifactId}</name>
|
||||
<version>${xjrsoft.framework.version}</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
|
||||
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<!-- Admin 服务 -->
|
||||
<dependency>
|
||||
<groupId>de.codecentric</groupId>
|
||||
<artifactId>spring-boot-admin-starter-server</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Admin 界面 -->
|
||||
<dependency>
|
||||
<groupId>de.codecentric</groupId>
|
||||
<artifactId>spring-boot-admin-server-ui</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-mail</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!--引入nacos依赖-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!--引入openFeigh 所需要的负载均衡依赖-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-loadbalancer</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@ -1,17 +0,0 @@
|
||||
package com.xjrsoft.admin;
|
||||
|
||||
import de.codecentric.boot.admin.server.config.EnableAdminServer;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* @Author: tzx
|
||||
* @Date: 2023/11/2 16:15
|
||||
*/
|
||||
@EnableAdminServer
|
||||
@SpringBootApplication
|
||||
public class AdminApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(AdminApplication.class, args);
|
||||
}
|
||||
}
|
||||
@ -1,3 +0,0 @@
|
||||
spring:
|
||||
profiles:
|
||||
active: public
|
||||
@ -1,62 +0,0 @@
|
||||
server:
|
||||
port: 3000
|
||||
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: admin-service
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
|
||||
cloud:
|
||||
nacos: #nacos监控
|
||||
discovery:
|
||||
server-addr: 10.0.252.1:8848
|
||||
namespace: ITC
|
||||
group: DNE
|
||||
username: nacos
|
||||
password: ABcd1234@
|
||||
config:
|
||||
server-addr: 10.0.252.1:8848 # nacos 配置中心地址
|
||||
namespace: ITC
|
||||
group: DNE
|
||||
username: nacos
|
||||
password: ABcd1234@
|
||||
file-extension: yml # 指定格式 xjrsoft-demo-service-dev.yml
|
||||
extension-configs:
|
||||
- data-id: global-config.yml #导入全局配置
|
||||
refresh: true
|
||||
group: DNE
|
||||
- data-id: mybatis-plus-config.yml #导入mybatisplus 配置
|
||||
refresh: true
|
||||
group: DNE
|
||||
- data-id: sa-token-client-config.yml #导入sa-token配置
|
||||
refresh: true
|
||||
group: DNE
|
||||
- data-id: redis-config.yml #导入redis配置
|
||||
refresh: true
|
||||
group: DNE
|
||||
sentinel:
|
||||
transport:
|
||||
dashboard: localhost:8080 #sentinel dashboard 地址
|
||||
port: 8719 #默认端口, 如果 被占用,会一直+1 直到未被占用为止
|
||||
#使用注册中心后,他admin也可以监控自身服务状况
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
#开放所有页面节点 默认只开启了health、info两个节点
|
||||
include: '*'
|
||||
endpoint:
|
||||
health:
|
||||
#显示健康具体信息 默认不会显示详细信息
|
||||
show-details: always
|
||||
# 利用info端点,加入版本等信息
|
||||
info:
|
||||
version: 1.0.0
|
||||
name: xjrsoft
|
||||
group: com.xjrsoft
|
||||
description: xxxxxx
|
||||
#还可以自定义信息
|
||||
author: Coding Farmer
|
||||
blog: http://www.xjrsoft.com
|
||||
@ -1,15 +0,0 @@
|
||||
# 基础镜像
|
||||
FROM nexus.gdyditc.com:8082/openjdk:11-arm64
|
||||
# author
|
||||
MAINTAINER xjrsoft
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/xjrsoft
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/xjrsoft
|
||||
# 指定路径
|
||||
WORKDIR /home/xjrsoft
|
||||
# 复制jar文件到路径
|
||||
COPY ./xjrsoft-auth/target/xjrsoft-auth.jar /home/xjrsoft/xjrsoft-auth.jar
|
||||
# 启动认证服务
|
||||
ENTRYPOINT ["java","-jar","xjrsoft-auth.jar","-Dfile.encoding=UTF-8"]
|
||||
@ -1,256 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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">
|
||||
<parent>
|
||||
<artifactId>xjrsoft-cloud</artifactId>
|
||||
<groupId>com.xjrsoft</groupId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>xjrsoft-auth</artifactId>
|
||||
<name>${project.artifactId}</name>
|
||||
<version>${xjrsoft.framework.version}</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
|
||||
<dependencies>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Sa-Token 权限认证, 在线文档:http://sa-token.dev33.cn/ -->
|
||||
<dependency>
|
||||
<groupId>cn.dev33</groupId>
|
||||
<artifactId>sa-token-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Sa-Token 整合 Redis (使用 jackson 序列化方式) -->
|
||||
<dependency>
|
||||
<groupId>cn.dev33</groupId>
|
||||
<artifactId>sa-token-dao-redis-jackson</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-pool2</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Sa-Token插件:权限缓存与业务缓存分离 -->
|
||||
<dependency>
|
||||
<groupId>cn.dev33</groupId>
|
||||
<artifactId>sa-token-alone-redis</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Http请求工具 -->
|
||||
<dependency>
|
||||
<groupId>com.ejlchina</groupId>
|
||||
<artifactId>okhttps</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/cn.hutool/hutool-all -->
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>com.xjrsoft</groupId>
|
||||
<artifactId>xjrsoft-service-system-api</artifactId>
|
||||
<version>${xjrsoft.framework.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.xjrsoft</groupId>
|
||||
<artifactId>xjrsoft-service-organization-api</artifactId>
|
||||
<version>${xjrsoft.framework.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!--引入nacos依赖-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!--引入spring-cloud-alibaba-nacos-config依赖-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--引入spring-cloud-alibaba-nacos-config bootstrap依赖-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-bootstrap</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--引入sentinel依赖-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--引入sentinel-datasource-nacos依赖-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.csp</groupId>
|
||||
<artifactId>sentinel-datasource-nacos</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-openapi3-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>${lombok.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.xjrsoft</groupId>
|
||||
<artifactId>xjrsoft-common-core</artifactId>
|
||||
<version>${xjrsoft.framework.version}</version>
|
||||
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>com.xjrsoft</groupId>
|
||||
<artifactId>xjrsoft-service-organization-api</artifactId>
|
||||
<version>${xjrsoft.framework.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.xjrsoft</groupId>
|
||||
<artifactId>xjrsoft-common-tenant</artifactId>
|
||||
<version>${xjrsoft.framework.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.xjrsoft</groupId>
|
||||
<artifactId>xjrsoft-common-redis</artifactId>
|
||||
<version>${xjrsoft.framework.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.hibernate.validator</groupId>
|
||||
<artifactId>hibernate-validator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.xjrsoft</groupId>
|
||||
<artifactId>xjrsoft-common-redis</artifactId>
|
||||
<version>${xjrsoft.framework.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.xjrsoft</groupId>
|
||||
<artifactId>xjrsoft-service-workflow-api</artifactId>
|
||||
<version>${xjrsoft.framework.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-loadbalancer</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.xjrsoft</groupId>-->
|
||||
<!-- <artifactId>xjrsoft-common-mybatis</artifactId>-->
|
||||
<!-- <version>${xjrsoft.framework.version}</version>-->
|
||||
<!-- <exclusions>-->
|
||||
<!-- <exclusion>-->
|
||||
<!-- <groupId>com.baomidou</groupId>-->
|
||||
<!-- <artifactId>dynamic-datasource-spring-boot-starter</artifactId>-->
|
||||
<!-- </exclusion>-->
|
||||
<!-- </exclusions>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-authz-client</artifactId>
|
||||
<version>${keycloak.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>me.zhyd.oauth</groupId>
|
||||
<artifactId>JustAuth</artifactId>
|
||||
<version>${justauth.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.xjrsoft</groupId>
|
||||
<artifactId>xjrsoft-service-organization-api</artifactId>
|
||||
<version>${xjrsoft.framework.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>kingbase</groupId>
|
||||
<artifactId>kingbase</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@ -1,155 +0,0 @@
|
||||
package com.xjrsoft.auth.config;
|
||||
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
import cn.hutool.core.util.ReflectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.PropertyAccessor;
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import com.fasterxml.jackson.databind.JsonDeserializer;
|
||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializerBase;
|
||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
|
||||
import lombok.SneakyThrows;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.convert.converter.Converter;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Field;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
/**
|
||||
* @Author: tzx
|
||||
* @Date: 2022/8/2 16:54
|
||||
*/
|
||||
@Configuration
|
||||
public class JacksonConfig {
|
||||
|
||||
@Value("${spring.jackson.date-format}")
|
||||
private String pattern;
|
||||
|
||||
/**
|
||||
* 默认设置所有long类型 序列化返回前端 全变成string
|
||||
* 所有LocalDatetime 序列号返回前端 全部格式化
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer() {
|
||||
return builder -> {
|
||||
builder.serializerByType(Long.class, ToStringSerializer.instance);
|
||||
builder.serializerByType(Long.TYPE, ToStringSerializer.instance);
|
||||
builder.serializerByType(BigDecimal.class, bigDecimalSerializer());
|
||||
builder.serializerByType(LocalDateTime.class, localDateTimeSerializer());
|
||||
builder.deserializerByType(LocalDateTime.class, localDateTimeDeserializer());
|
||||
builder.featuresToEnable(JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN);
|
||||
builder.visibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY);
|
||||
builder.visibility(PropertyAccessor.GETTER, JsonAutoDetect.Visibility.NONE);
|
||||
builder.visibility(PropertyAccessor.SETTER, JsonAutoDetect.Visibility.NONE);
|
||||
builder.visibility(PropertyAccessor.CREATOR, JsonAutoDetect.Visibility.NONE);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Jackson格式化BigDecimal类型数据
|
||||
* @return
|
||||
*/
|
||||
public ToStringSerializerBase bigDecimalSerializer() {
|
||||
return new ToStringSerializerBase(BigDecimal.class) {
|
||||
protected final static int MAX_BIG_DECIMAL_SCALE = 9999;
|
||||
@Override
|
||||
public String valueToString(Object value) {
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(Object value, JsonGenerator gen, SerializerProvider provider) throws IOException {
|
||||
if (gen.isEnabled(JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN)) {
|
||||
final BigDecimal bd = (BigDecimal) value;
|
||||
// 24-Aug-2016, tatu: [core#315] prevent possible DoS vector, so we need this
|
||||
if (!_verifyBigDecimalRange(gen, bd)) {
|
||||
// ... but wouldn't it be nice to trigger error via generator? Alas,
|
||||
// no method to do that. So we'll do...
|
||||
final String errorMsg = String.format(
|
||||
"Attempt to write plain `java.math.BigDecimal` (see JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN) with illegal scale (%d): needs to be between [-%d, %d]",
|
||||
bd.scale(), MAX_BIG_DECIMAL_SCALE, MAX_BIG_DECIMAL_SCALE);
|
||||
provider.reportMappingProblem(errorMsg);
|
||||
}
|
||||
// text = bd.toPlainString();
|
||||
gen.writeNumber(bd);
|
||||
} else {
|
||||
gen.writeString(value.toString());
|
||||
}
|
||||
}
|
||||
// 24-Aug-2016, tatu: [core#315] prevent possible DoS vector, so we need this
|
||||
protected boolean _verifyBigDecimalRange(JsonGenerator gen, BigDecimal value) throws IOException {
|
||||
int scale = value.scale();
|
||||
return ((scale >= -MAX_BIG_DECIMAL_SCALE) && (scale <= MAX_BIG_DECIMAL_SCALE));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* localDatetime格式化
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
public LocalDateTimeSerializer localDateTimeSerializer(){
|
||||
return new LocalDateTimeSerializer(DateTimeFormatter.ofPattern(pattern));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* localDatetime格式化
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
public JsonDeserializer<LocalDateTime> localDateTimeDeserializer(){
|
||||
final String pattern = this.pattern;
|
||||
return new JsonDeserializer<LocalDateTime>(){
|
||||
@SneakyThrows
|
||||
@Override
|
||||
public LocalDateTime deserialize(JsonParser p, DeserializationContext context) throws IOException {
|
||||
String value = p.getText();
|
||||
if (StrUtil.isEmpty(value)) {
|
||||
return null;
|
||||
}
|
||||
Class<?> aClass = p.getCurrentValue().getClass();
|
||||
Field field = ReflectUtil.getField(aClass, p.getCurrentName());
|
||||
String format = pattern;
|
||||
JsonFormat annotation = field.getAnnotation(JsonFormat.class);
|
||||
if (annotation != null) {
|
||||
format = StringUtils.defaultIfEmpty(annotation.pattern(), pattern);
|
||||
}
|
||||
return LocalDateTimeUtil.parse(value, format);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Bean
|
||||
public Converter<String, LocalTime> stringToLocalTimeConverter() {
|
||||
return new Converter<String, LocalTime>(){
|
||||
|
||||
@Override
|
||||
public LocalTime convert(String value) {
|
||||
if (StrUtil.isNotBlank(value)) {
|
||||
return LocalTime.parse(value);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -1,8 +0,0 @@
|
||||
package com.xjrsoft.auth.constant;
|
||||
|
||||
/**
|
||||
* @Author: tzx
|
||||
* @Date: 2023/9/20 14:50
|
||||
*/
|
||||
public interface AuthConstant {
|
||||
}
|
||||
@ -1,263 +0,0 @@
|
||||
package com.xjrsoft.auth.controller;
|
||||
|
||||
import cn.dev33.satoken.SaManager;
|
||||
import cn.dev33.satoken.config.SaTokenConfig;
|
||||
import cn.dev33.satoken.session.SaSession;
|
||||
import cn.dev33.satoken.stp.SaLoginModel;
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.jwt.JWT;
|
||||
import cn.hutool.jwt.JWTUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringPool;
|
||||
import com.xjrsoft.auth.dto.LoginDto;
|
||||
import com.xjrsoft.auth.service.ILoginService;
|
||||
import com.xjrsoft.auth.service.SsoService;
|
||||
import com.xjrsoft.common.core.annotation.XjrLog;
|
||||
import com.xjrsoft.common.core.config.KeyCloakConfig;
|
||||
import com.xjrsoft.common.core.config.XjrSmsConfig;
|
||||
import com.xjrsoft.common.core.constant.GlobalConstant;
|
||||
import com.xjrsoft.common.core.domain.result.R;
|
||||
import com.xjrsoft.common.core.enums.EnabledMark;
|
||||
import com.xjrsoft.common.core.enums.YesOrNoEnum;
|
||||
import com.xjrsoft.common.core.exception.MyException;
|
||||
import com.xjrsoft.common.core.uitls.SmsSender;
|
||||
import com.xjrsoft.common.redis.service.RedisUtil;
|
||||
import com.xjrsoft.organization.client.IOauthClient;
|
||||
import com.xjrsoft.organization.client.IUserClient;
|
||||
import com.xjrsoft.organization.entity.User;
|
||||
import com.xjrsoft.system.client.ILoginConfigClient;
|
||||
import com.xjrsoft.system.dto.*;
|
||||
import com.xjrsoft.system.entity.LoginConfig;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import me.zhyd.oauth.request.AuthRequest;
|
||||
import me.zhyd.oauth.utils.AuthStateUtils;
|
||||
import org.apache.commons.lang3.RandomUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import org.keycloak.authorization.client.AuthzClient;
|
||||
import org.keycloak.authorization.client.Configuration;
|
||||
import org.keycloak.representations.AccessTokenResponse;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author: tzx
|
||||
* @Date: 2023/10/12 15:39
|
||||
*/
|
||||
@RestController
|
||||
@Tag(name = "登录模块")
|
||||
@RequestMapping(GlobalConstant.SYSTEM_MODULE_PREFIX)
|
||||
@RequiredArgsConstructor
|
||||
public class LoginController {
|
||||
|
||||
private final ILoginService loginService;
|
||||
|
||||
private final IUserClient userClient;
|
||||
|
||||
private final RedisUtil redisUtil;
|
||||
|
||||
private KeyCloakConfig keyCloakConfig;
|
||||
|
||||
private SmsSender smsSender;
|
||||
|
||||
private XjrSmsConfig smsConfig;
|
||||
|
||||
private IOauthClient oauthClient;
|
||||
|
||||
private final ILoginConfigClient loginConfigClient;
|
||||
|
||||
private SsoService ssoService;
|
||||
|
||||
|
||||
@PostMapping(value = {"/login/{ltpasToken}", "/login"})
|
||||
@Operation(summary = "登录", description = "传入账号:account,密码:password")
|
||||
@XjrLog(value = "账号密码登录成功")
|
||||
public R login(@RequestBody @Valid LoginDto dto, @PathVariable(required = false) String ltpasToken) {
|
||||
if(StrUtil.isNotBlank (ltpasToken)) {
|
||||
String userName = ssoService.auth(ltpasToken);
|
||||
if(StrUtil.isNotBlank(userName)) {
|
||||
dto.setUserName(userName);
|
||||
User user = loginService.getUserInfoByName(userName);
|
||||
dto.setPassword(user.getPassword());
|
||||
return R.ok(loginService.login(dto));
|
||||
} else {
|
||||
return R.error("秘钥登录失败");
|
||||
}
|
||||
}
|
||||
return R.ok(loginService.login(dto));
|
||||
}
|
||||
|
||||
@PostMapping("/create-token")
|
||||
@Operation(summary = "创建token", description = "传入账号:account,密码:password")
|
||||
@XjrLog(value = "账号密码登录成功")
|
||||
public R createToken(@RequestBody @Valid CreateTokenDto dto) {
|
||||
return R.ok(loginService.createToken(dto));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 发送验证码
|
||||
*/
|
||||
@GetMapping("/captcha")
|
||||
@XjrLog(value = "发送验证码")
|
||||
@Operation(summary = "发送验证码", description = "传入账号:mobile")
|
||||
public R captcha(@RequestParam String mobile) {
|
||||
// 验证短信限时发送次数验证
|
||||
// 获取该号码短信的发送次数
|
||||
Object o = redisUtil.get(GlobalConstant.CACHE_COUNT_SMS_CODE_PREFIX + mobile);
|
||||
int sendCount = NumberUtils.toInt(String.valueOf(o));
|
||||
if (o == null) {
|
||||
// 未发送过验证码,初始化
|
||||
redisUtil.set(GlobalConstant.CACHE_COUNT_SMS_CODE_PREFIX + mobile, 1, smsConfig.getLimitTime() * 3600);
|
||||
} else if (sendCount > smsConfig.getLimitCount()) {
|
||||
// 发送次数超过限制
|
||||
return R.error("发送验证码次数达上限,请稍后再试!");
|
||||
} else {
|
||||
// 更新发送次数
|
||||
long expire = redisUtil.getExpire(GlobalConstant.CACHE_COUNT_SMS_CODE_PREFIX + mobile);
|
||||
redisUtil.set(GlobalConstant.CACHE_COUNT_SMS_CODE_PREFIX + mobile, sendCount + 1, expire);
|
||||
}
|
||||
//生成六位数的字符串
|
||||
String code = RandomUtils.nextInt(100000, 999999) + StringPool.EMPTY;
|
||||
|
||||
smsSender.sendCaptcha(mobile, code);
|
||||
|
||||
redisUtil.set(GlobalConstant.CAPTCHA + StringPool.UNDERSCORE + mobile, code, 60L);
|
||||
return R.ok(Boolean.TRUE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证码
|
||||
*/
|
||||
@PostMapping("/captcha")
|
||||
@XjrLog(value = "验证码登录")
|
||||
public R loginByCaptcha(@RequestBody LoginCaptchaDto loginCaptchaDto) {
|
||||
String mobile = loginCaptchaDto.getMobile();
|
||||
String code = redisUtil.get(GlobalConstant.CAPTCHA + StringPool.UNDERSCORE + mobile);
|
||||
if (code != null && StringUtils.equals(code, loginCaptchaDto.getCode())) {
|
||||
User user = userClient.getUserByMobileFeign(mobile);
|
||||
if (user == null) {
|
||||
return R.error("用户不存在!");
|
||||
}
|
||||
if (user.getEnabledMark() == EnabledMark.DISABLED.getCode()) {
|
||||
return R.error("账户未启用");
|
||||
}
|
||||
//此登录接口登录web端
|
||||
StpUtil.login(user.getId(), "PC");
|
||||
|
||||
SaSession tokenSession = StpUtil.getTokenSession();
|
||||
tokenSession.set(GlobalConstant.LOGIN_USER_INFO_KEY, user);
|
||||
|
||||
Map<String, Object> vo = new HashMap<>(1);
|
||||
vo.put(GlobalConstant.TOKEN_KEY, StpUtil.getTokenValue());
|
||||
|
||||
return R.ok(vo);
|
||||
}
|
||||
return R.error("验证码不存在!");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 退出
|
||||
*/
|
||||
@PostMapping("/logout")
|
||||
public R logout() {
|
||||
StpUtil.logout();
|
||||
return R.ok("登出成功!");
|
||||
}
|
||||
|
||||
@PostMapping("/token")
|
||||
@Operation(summary = "根据keycloak-token 登录", description = "传入keycloak-token")
|
||||
@XjrLog(value = "keycloak-token登录成功")
|
||||
public R loginByToken(@RequestBody KeyCloakLoginInfoDto dto) {
|
||||
Map<String, Object> credentialsMap = new HashMap<>(1);
|
||||
credentialsMap.put("secret", keyCloakConfig.getSecret());
|
||||
Configuration configuration = new Configuration(keyCloakConfig.getUrl(), keyCloakConfig.getRealm(), keyCloakConfig.getClientId(), credentialsMap, null);
|
||||
AuthzClient authzClient = AuthzClient.create(configuration);
|
||||
AccessTokenResponse response = authzClient.obtainAccessToken(keyCloakConfig.getUserName(), keyCloakConfig.getPassword());
|
||||
|
||||
if (StrUtil.isNotBlank(response.getError())) {
|
||||
return R.error(response.getError());
|
||||
}
|
||||
//TODO keycloak 登陆过 解析token获取数据 做框架登录操作
|
||||
JWT jwt = JWTUtil.parseToken(dto.getToken());
|
||||
Object code = jwt.getPayload(keyCloakConfig.getPayload());
|
||||
|
||||
User user = userClient.getUserByCodeFeign(String.valueOf(code));
|
||||
|
||||
List<LoginConfig> list = loginConfigClient.getAllListFeign();
|
||||
if (list.size() == 0){//如果没有,则设置为默认配置,并进行保存
|
||||
LoginConfig loginConfig = new LoginConfig();
|
||||
loginConfig.setId(1L);
|
||||
loginConfig.setMulLogin("0,1");
|
||||
loginConfig.setMutualExclusion(YesOrNoEnum.YES.getCode());
|
||||
loginConfig.setWithoutLogin(YesOrNoEnum.YES.getCode());
|
||||
loginConfig.setPasswordStrategy(YesOrNoEnum.YES.getCode());
|
||||
loginConfig.setStrategyMaxNumber(7);
|
||||
list.add(loginConfig);
|
||||
loginConfigClient.addLoginConfigFeign(loginConfig);
|
||||
}
|
||||
LoginConfig loginConfig = list.get(0);
|
||||
|
||||
if (user == null) {
|
||||
return R.error("帐号密码错误!");
|
||||
} else if (!Integer.valueOf(1).equals(user.getEnabledMark())) {
|
||||
return R.error("当前账号已被锁定,请联系管理员!");
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(dto.getDevice()) && dto.getDevice() == "PC" && !loginConfig.getMulLogin().contains("0")){
|
||||
throw new MyException("当前Web端登录未授权,请联系管理员!");
|
||||
}else if (StrUtil.isNotBlank(dto.getDevice()) && dto.getDevice() == "APP" && !loginConfig.getMulLogin().contains("1")){
|
||||
throw new MyException("当前APP端登录未授权,请联系管理员!");
|
||||
}else {
|
||||
if (StrUtil.isBlank(loginConfig.getMulLogin()) || !loginConfig.getMulLogin().contains("0")){
|
||||
throw new MyException("当前Web端登录未授权,请联系管理员!");
|
||||
}
|
||||
}
|
||||
|
||||
SaTokenConfig oldConfig = SaManager.getConfig();
|
||||
|
||||
if (loginConfig.getMutualExclusion() == YesOrNoEnum.NO.getCode()){
|
||||
//不开启同端互斥
|
||||
oldConfig.setIsConcurrent(true);
|
||||
}else {
|
||||
//开启同端互斥
|
||||
oldConfig.setIsConcurrent(false);
|
||||
}
|
||||
// 注入到 SaManager 中
|
||||
SaManager.setConfig(oldConfig);
|
||||
|
||||
if (loginConfig.getWithoutLogin() == YesOrNoEnum.YES.getCode()){//开启就设置为7天免登录
|
||||
StpUtil.login(user.getId(),new SaLoginModel().setDevice(dto.getDevice()).setTimeout(60 * 60 * 24 * 7));
|
||||
}else {
|
||||
//此登录接口登录web端,IsLastingCookie设置为false,也就是关闭浏览器后再次打开需要重新登录
|
||||
StpUtil.login(user.getId(), new SaLoginModel().setDevice(dto.getDevice()).setIsLastingCookie(false));
|
||||
}
|
||||
|
||||
SaSession tokenSession = StpUtil.getTokenSession();
|
||||
tokenSession.set(GlobalConstant.LOGIN_USER_INFO_KEY, user);
|
||||
|
||||
Map<String, Object> vo = new HashMap<>(1);
|
||||
vo.put(GlobalConstant.TOKEN_KEY, StpUtil.getTokenValue());
|
||||
|
||||
return R.ok("登录成功!", vo);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@PostMapping("/qrcode-login")
|
||||
@Operation(summary = "oauth 扫码登录", description = "oauth 扫码登录")
|
||||
@XjrLog(value = "oauth 扫码登录")
|
||||
public R createAuthorizeUrl(@Valid @RequestBody CreateAuthorizeUrlDto dto){
|
||||
AuthRequest authRequest = oauthClient.getAuthRequest(dto.getSource());
|
||||
String authorizeUrl = authRequest.authorize(AuthStateUtils.createState());
|
||||
return R.ok(authorizeUrl);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,97 +0,0 @@
|
||||
package com.xjrsoft.auth.controller;
|
||||
|
||||
import cn.dev33.satoken.config.SaTokenConfig;
|
||||
import cn.dev33.satoken.context.SaHolder;
|
||||
import cn.dev33.satoken.context.model.SaRequest;
|
||||
import cn.dev33.satoken.secure.SaSecureUtil;
|
||||
import cn.dev33.satoken.sso.SaSsoHandle;
|
||||
import com.ejlchina.okhttps.OkHttps;
|
||||
import com.xjrsoft.common.core.constant.GlobalConstant;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* Sa-Token-SSO Server端 Controller
|
||||
* @author Zexy
|
||||
*/
|
||||
@RestController
|
||||
@Tag(name = "授权中心")
|
||||
public class SsoServerController {
|
||||
|
||||
/**
|
||||
* SSO-Server:统一认证地址
|
||||
*/
|
||||
|
||||
@RequestMapping(GlobalConstant.AUTH_CENTER)
|
||||
@Operation(summary = "统一认证地址")
|
||||
public Object ssoAuth() {
|
||||
return SaSsoHandle.ssoAuth();
|
||||
}
|
||||
|
||||
/**
|
||||
* SSO-Server:RestAPI 登录接口
|
||||
*/
|
||||
|
||||
@RequestMapping(GlobalConstant.AUTH_LOGIN)
|
||||
@Operation(summary = "SSO-Server:RestAPI 登录接口")
|
||||
public Object ssoDoLogin() {
|
||||
return SaSsoHandle.ssoDoLogin();
|
||||
}
|
||||
|
||||
/**
|
||||
* SSO-Server:校验ticket 获取账号id
|
||||
*/
|
||||
|
||||
@RequestMapping(GlobalConstant.AUTH_CHECK_TICKET)
|
||||
@Operation(summary = "SSO-Server:校验ticket 获取账号id")
|
||||
public Object ssoCheckTicket() {
|
||||
return SaSsoHandle.ssoCheckTicket();
|
||||
}
|
||||
|
||||
/**
|
||||
* 注销单点登录
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(GlobalConstant.AUTH_LOGOUT)
|
||||
@Operation(summary = "SSO-Server:注销单点登录")
|
||||
|
||||
public Object ssoLogout() {
|
||||
return SaSsoHandle.ssoServerLogout();
|
||||
}
|
||||
|
||||
/**
|
||||
* 配置SSO相关参数
|
||||
*
|
||||
* @param cfg
|
||||
*/
|
||||
@Autowired
|
||||
private void configSso(SaTokenConfig cfg) {
|
||||
cfg.sso
|
||||
// 配置:未登录时返回的View
|
||||
.setNotLoginView(() -> "当前会话在SSO-Server端尚未登录,请先访问"
|
||||
+ "<a href='/sso/doLogin?name=sa&pwd=123456' target='_blank'> doLogin登录 </a>"
|
||||
+ "进行登录之后,刷新页面开始授权")
|
||||
// 配置:登录处理函数
|
||||
.setDoLoginHandle((name, pwd) -> {
|
||||
|
||||
|
||||
SaRequest request = SaHolder.getRequest();
|
||||
name = request.getParam("username");
|
||||
pwd = request.getParam("password");
|
||||
|
||||
String s = SaSecureUtil.md5BySalt(pwd, GlobalConstant.SECRET_KEY);
|
||||
|
||||
|
||||
return null;
|
||||
})// 配置Http请求处理器
|
||||
.setSendHttp(url -> {
|
||||
// 此处为了提高响应速度这里可将sync换为async
|
||||
return OkHttps.async(url).get();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -1,32 +0,0 @@
|
||||
package com.xjrsoft.auth.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
|
||||
/**
|
||||
* @author Zexy
|
||||
*/
|
||||
@Data
|
||||
public class LoginDto {
|
||||
|
||||
@NotBlank(message = "账号不能为空!")
|
||||
private String userName;
|
||||
|
||||
@Schema(name = "密码")
|
||||
// @NotBlank(message = "密码不能为空!")
|
||||
// @Length(min = 6,max = 32,message = "密码长度不得小于6个字符,不得大于32个字符!")
|
||||
private String password;
|
||||
|
||||
@Schema(name = "租户码")
|
||||
private String tenantCode;
|
||||
|
||||
@Schema(name = "设备类型-默认为PC,pc为0,app为1")
|
||||
private Integer deviceType;
|
||||
|
||||
@Schema(name = "互信token")
|
||||
private String token;
|
||||
}
|
||||
@ -1,22 +0,0 @@
|
||||
package com.xjrsoft.auth.handler;
|
||||
|
||||
import com.xjrsoft.common.core.domain.result.R;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.ControllerAdvice;
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
@ControllerAdvice
|
||||
@Slf4j
|
||||
public class MyExceptionHandler {
|
||||
|
||||
// @ResponseBody
|
||||
// @ExceptionHandler(value =Exception.class)
|
||||
// public R exceptionHandler(Exception e){
|
||||
// e.printStackTrace();
|
||||
// return R.error("认证中心错误,请联系管理员!");
|
||||
// }
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -1,22 +0,0 @@
|
||||
package com.xjrsoft.auth.service;
|
||||
|
||||
import com.xjrsoft.auth.dto.LoginDto;
|
||||
import com.xjrsoft.organization.entity.User;
|
||||
import com.xjrsoft.system.dto.CreateTokenDto;
|
||||
import com.xjrsoft.system.entity.LoginConfig;
|
||||
import com.xjrsoft.system.vo.CreateTokenVo;
|
||||
import com.xjrsoft.system.vo.LoginVo;
|
||||
|
||||
/**
|
||||
* @Author: tzx
|
||||
* @Date: 2023/4/21 14:20
|
||||
*/
|
||||
public interface ILoginService {
|
||||
|
||||
User getUserInfoByName(String userName);
|
||||
|
||||
LoginVo login(LoginDto dto);
|
||||
|
||||
CreateTokenVo createToken(CreateTokenDto dto);
|
||||
|
||||
}
|
||||
@ -1,20 +0,0 @@
|
||||
package com.xjrsoft.auth.service;
|
||||
|
||||
import com.xjrsoft.auth.vo.ResponseVo;
|
||||
import com.xjrsoft.common.core.result.Response;
|
||||
import com.xjrsoft.organization.vo.LoginVo;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
public interface SsoService {
|
||||
|
||||
void auth(String redirect, String ltpasToken, String method,HttpServletResponse response);
|
||||
|
||||
String auth(String ltpasToken);
|
||||
|
||||
Response<LoginVo> getUser();
|
||||
|
||||
ResponseVo getTodoTask(String type, String ltpasToken);
|
||||
|
||||
String getLtpasToken(String username);
|
||||
}
|
||||
@ -1,332 +0,0 @@
|
||||
package com.xjrsoft.auth.service.impl;
|
||||
|
||||
import cn.dev33.satoken.SaManager;
|
||||
import cn.dev33.satoken.config.SaTokenConfig;
|
||||
import cn.dev33.satoken.secure.SaSecureUtil;
|
||||
import cn.dev33.satoken.session.SaSession;
|
||||
import cn.dev33.satoken.stp.SaLoginModel;
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import cn.dev33.satoken.temp.SaTempUtil;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.nacos.common.utils.CollectionUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.xjrsoft.auth.dto.LoginDto;
|
||||
import com.xjrsoft.auth.service.ILoginService;
|
||||
import com.xjrsoft.common.core.config.LicenseConfig;
|
||||
import com.xjrsoft.common.core.constant.GlobalConstant;
|
||||
import com.xjrsoft.common.core.constant.StringPool;
|
||||
import com.xjrsoft.common.core.enums.EnabledMark;
|
||||
import com.xjrsoft.common.core.enums.YesOrNoEnum;
|
||||
import com.xjrsoft.common.core.exception.MyException;
|
||||
import com.xjrsoft.common.core.exception.ValidationException;
|
||||
import com.xjrsoft.common.redis.service.RedisUtil;
|
||||
import com.xjrsoft.organization.client.*;
|
||||
import com.xjrsoft.organization.entity.*;
|
||||
import com.xjrsoft.system.client.ILoginConfigClient;
|
||||
import com.xjrsoft.system.client.ITenantClient;
|
||||
import com.xjrsoft.system.dto.CreateTokenDto;
|
||||
import com.xjrsoft.system.entity.LoginConfig;
|
||||
import com.xjrsoft.system.entity.Tenant;
|
||||
import com.xjrsoft.system.vo.CreateTokenVo;
|
||||
import com.xjrsoft.system.vo.LoginVo;
|
||||
import com.xjrsoft.tenant.config.TenantConfig;
|
||||
import com.xjrsoft.tenant.util.SecureUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author: tzx
|
||||
* @Date: 2023/4/21 14:22
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class LoginServiceImpl implements ILoginService {
|
||||
|
||||
private final IUserClient userClient;
|
||||
|
||||
private final IUserDeptRelationClient userDeptRelationClient;
|
||||
|
||||
private final IUserPostRelationClient userPostRelationClient;
|
||||
|
||||
private final IPostClient postClient;
|
||||
|
||||
private final IDepartmentClient departmentClient;
|
||||
|
||||
private final ITenantClient tenantClient;
|
||||
|
||||
private final RedisUtil redisUtil;
|
||||
|
||||
private final LicenseConfig licenseConfig;
|
||||
|
||||
private final TenantConfig tenantConfig;
|
||||
|
||||
private final ILoginConfigClient loginConfigClient;
|
||||
|
||||
private final IUserRoleRelationClient userRoleRelationClient;
|
||||
|
||||
@Override
|
||||
public User getUserInfoByName(String userName) {
|
||||
User loginUser = userClient.getUserByUserNameFeign(userName);
|
||||
return loginUser;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LoginVo login(@RequestBody(required = false) LoginDto dto) {
|
||||
LoginVo result = new LoginVo();
|
||||
|
||||
if (licenseConfig.getEnabled()) {
|
||||
//查出所有在线用户
|
||||
List<String> onlineUser = StpUtil.searchSessionId("", 0, Integer.MAX_VALUE);
|
||||
|
||||
//如果已经登录人数超过授权人数 不允许登录
|
||||
if (onlineUser.size() >= licenseConfig.getLoginMax()) {
|
||||
throw new MyException("登录人数超过授权人数,无法登录,请联系管理员!");
|
||||
}
|
||||
}
|
||||
User loginUser = getUserInfoByName(dto.getUserName());
|
||||
|
||||
List<LoginConfig> list = loginConfigClient.getAllListFeign();
|
||||
if (list.size() == 0){//如果没有,则设置为默认配置,并进行保存
|
||||
LoginConfig loginConfig = new LoginConfig();
|
||||
loginConfig.setId(1L);
|
||||
loginConfig.setMulLogin("0,1");
|
||||
loginConfig.setMutualExclusion(YesOrNoEnum.YES.getCode());
|
||||
loginConfig.setWithoutLogin(YesOrNoEnum.YES.getCode());
|
||||
loginConfig.setPasswordStrategy(YesOrNoEnum.YES.getCode());
|
||||
loginConfig.setStrategyMaxNumber(7);
|
||||
list.add(loginConfig);
|
||||
loginConfigClient.addLoginConfigFeign(loginConfig);
|
||||
}
|
||||
LoginConfig loginConfig = list.get(0);
|
||||
|
||||
if (StrUtil.isNotBlank(loginConfig.getMulLogin())){
|
||||
if (ObjectUtil.isNotEmpty(dto.getDeviceType()) && dto.getDeviceType() == 0 && !loginConfig.getMulLogin().contains("0")){
|
||||
throw new MyException("当前Web端登录未授权,请联系管理员!");
|
||||
}else if (ObjectUtil.isNotEmpty(dto.getDeviceType()) && dto.getDeviceType() == 1 && !loginConfig.getMulLogin().contains("1")){
|
||||
throw new MyException("当前APP端登录未授权,请联系管理员!");
|
||||
}
|
||||
}else {
|
||||
throw new MyException("当前Web端、app端登录未授权,请联系管理员!");
|
||||
}
|
||||
|
||||
//if (loginUser == null || !StrUtil.equals(loginUser.getPassword(), SaSecureUtil.md5BySalt(dto.getPassword(), GlobalConstant.SECRET_KEY))) {
|
||||
if(checkPassword(loginUser,dto)){
|
||||
if (loginUser.getEnabledMark() == EnabledMark.DISABLED.getCode()) {
|
||||
throw new MyException("当前账号已被锁定,请联系管理员!");
|
||||
}
|
||||
if (loginConfig.getPasswordStrategy() == YesOrNoEnum.YES.getCode()){ // 如果开启了密码策略,密码错误次数超过最大次数就锁定
|
||||
Integer number = 1;
|
||||
String value = redisUtil.get(GlobalConstant.LOGIN_ERROR_NUMBER + loginUser.getId());
|
||||
if (StrUtil.isNotBlank(value)){
|
||||
if (loginConfig.getStrategyMaxNumber() - 1 > Integer.valueOf(value)){
|
||||
redisUtil.set(GlobalConstant.LOGIN_ERROR_NUMBER + loginUser.getId() , Integer.valueOf(value) + 1);
|
||||
}else {
|
||||
loginUser.setEnabledMark(EnabledMark.DISABLED.getCode());
|
||||
userClient.updateUserInfoFeign(loginUser);
|
||||
throw new MyException("当前账号已被锁定,请联系管理员");
|
||||
}
|
||||
}else {
|
||||
if (loginConfig.getStrategyMaxNumber() == 1){
|
||||
loginUser.setEnabledMark(EnabledMark.DISABLED.getCode());
|
||||
userClient.updateUserInfoFeign(loginUser);
|
||||
throw new MyException("当前账号已被锁定,请联系管理员");
|
||||
}else {
|
||||
redisUtil.set(GlobalConstant.LOGIN_ERROR_NUMBER + loginUser.getId() , number);
|
||||
}
|
||||
}
|
||||
}
|
||||
throw new MyException("账号或密码不正确");
|
||||
}
|
||||
//登录成功之后将对应的密码错误次数给删除掉
|
||||
redisUtil.delete(GlobalConstant.LOGIN_ERROR_NUMBER + loginUser.getId());
|
||||
|
||||
SaTokenConfig oldConfig = SaManager.getConfig();
|
||||
|
||||
if (loginConfig.getMutualExclusion() == YesOrNoEnum.NO.getCode()){
|
||||
//不开启同端互斥
|
||||
oldConfig.setIsConcurrent(true);
|
||||
}else {
|
||||
//开启同端互斥
|
||||
oldConfig.setIsConcurrent(false);
|
||||
}
|
||||
// 注入到 SaManager 中
|
||||
SaManager.setConfig(oldConfig);
|
||||
|
||||
//此登录接口
|
||||
if (loginConfig.getWithoutLogin() == YesOrNoEnum.YES.getCode()){//开启就设置为7天免登录
|
||||
if (ObjectUtil.isNotEmpty(dto.getDeviceType()) && dto.getDeviceType() == 1){
|
||||
StpUtil.login(loginUser.getId(),new SaLoginModel().setDevice("APP").setTimeout(60 * 60 * 24 * 7));
|
||||
} else {//默认为PC端登录
|
||||
StpUtil.login(loginUser.getId(),new SaLoginModel().setDevice("PC").setTimeout(60 * 60 * 24 * 7));
|
||||
}
|
||||
}else {
|
||||
//此登录接口登录web端,IsLastingCookie设置为false,也就是关闭浏览器后再次打开需要重新登录
|
||||
if (ObjectUtil.isNotEmpty(dto.getDeviceType()) && dto.getDeviceType() == 1){
|
||||
StpUtil.login(loginUser.getId(), new SaLoginModel().setDevice("APP").setIsLastingCookie(false));
|
||||
} else {//默认为PC端登录
|
||||
StpUtil.login(loginUser.getId(), new SaLoginModel().setDevice("PC").setIsLastingCookie(false));
|
||||
}
|
||||
}
|
||||
// StpUtil.login(loginUser.getId(),"PC");
|
||||
|
||||
SaSession tokenSession = StpUtil.getTokenSession();
|
||||
|
||||
List<UserDeptRelation> userDeptRelations = userDeptRelationClient.getUserDeptRelationListFeign(StpUtil.getLoginIdAsLong());
|
||||
|
||||
List<UserPostRelation> userPostRelations = userPostRelationClient.getUserPostRelationListFeign(StpUtil.getLoginIdAsLong());
|
||||
|
||||
//获取登陆人所选择的身份缓存
|
||||
String postId = redisUtil.get(GlobalConstant.LOGIN_IDENTITY_CACHE_PREFIX + loginUser.getId());
|
||||
|
||||
Post post = new Post();
|
||||
if (StrUtil.isNotBlank(postId) && !postId.equals("null")) {
|
||||
post = postClient.getPostByIdFeign(Long.valueOf(postId));
|
||||
}
|
||||
|
||||
if (userPostRelations.size() > 0) {
|
||||
List<Long> postIds = userPostRelations.stream().map(UserPostRelation::getPostId).collect(Collectors.toList());
|
||||
|
||||
List<Post> postList = postClient.getPostListByIdsFeign(postIds);
|
||||
if ((post == null || StrUtil.isBlank(postId)) && com.baomidou.mybatisplus.core.toolkit.CollectionUtils.isNotEmpty(postList)) {
|
||||
post = postList.get(0);
|
||||
}
|
||||
tokenSession.set(GlobalConstant.LOGIN_USER_POST_INFO_KEY, post);
|
||||
tokenSession.set(GlobalConstant.LOGIN_USER_POST_LIST_KEY, postList);
|
||||
loginUser.setPostId(post.getId());
|
||||
|
||||
//将登陆人所选择的身份缓存起来
|
||||
//切换身份的时候 会一起修改
|
||||
//redisUtil.set(GlobalConstant.LOGIN_IDENTITY_CACHE_PREFIX + loginUser.getId(), post.getId());
|
||||
}
|
||||
|
||||
if (userDeptRelations.size() > 0) {
|
||||
// 存当前用户所有部门到缓存
|
||||
List<Long> departmentIds = userDeptRelations.stream().map(UserDeptRelation::getDeptId).collect(Collectors.toList());
|
||||
List<Department> departmentList = departmentClient.getDepartmentListByIdsFeign(departmentIds);
|
||||
departmentClient.queryPathFromRoot(departmentList);
|
||||
tokenSession.set(GlobalConstant.LOGIN_USER_DEPT_LIST_KEY, departmentList);
|
||||
|
||||
//主部门
|
||||
List<Long> mainDepartmentIds = userDeptRelations.stream().filter(x->YesOrNoEnum.YES.getTextCode().equals(x.getIsMain()))
|
||||
.map(UserDeptRelation::getDeptId).collect(Collectors.toList());
|
||||
tokenSession.set(GlobalConstant.LOGIN_USER_MAIN_DEPT_ID_KEY, mainDepartmentIds);
|
||||
|
||||
Department department = departmentList.get(0);
|
||||
//如果此人有岗位 使用岗位的deptId 找到当前组织机构
|
||||
if (ObjectUtil.isNotNull(post.getId())) {
|
||||
department = departmentClient.getDepartmentByIdFeign(post.getDeptId());
|
||||
}else if(ObjectUtil.isNotEmpty(mainDepartmentIds)){
|
||||
//找一个主部门
|
||||
department=departmentList.stream().filter(x->mainDepartmentIds.contains(x.getId())).findFirst().get();
|
||||
}
|
||||
tokenSession.set(GlobalConstant.LOGIN_USER_DEPT_INFO_KEY, department);
|
||||
loginUser.setDepartmentId(department.getId());
|
||||
}
|
||||
|
||||
//根据登录信息 将post 和 department 信息存入用户信息中
|
||||
tokenSession.set(GlobalConstant.LOGIN_USER_INFO_KEY, loginUser);
|
||||
|
||||
result.setToken(StpUtil.getTokenValue());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 判断用户名和密码是否正确,有2中情况,1:账号密码登录,2:互信token登录,
|
||||
* 方式1是传入的未加密的密码,方式2传入的是通过md5已加密的密码,所以通过判断密码的长度来判断是否已加密
|
||||
* */
|
||||
public boolean checkPassword(User loginUser,LoginDto dto)
|
||||
{
|
||||
//如果长度是32,即传入的是密文
|
||||
if(dto.getPassword().length() == 32){
|
||||
return (loginUser == null || !StrUtil.equals(loginUser.getPassword(), dto.getPassword()));
|
||||
}
|
||||
else {
|
||||
return (loginUser == null || !StrUtil.equals(loginUser.getPassword(), SaSecureUtil.md5BySalt(dto.getPassword(), GlobalConstant.SECRET_KEY)));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public CreateTokenVo createToken(CreateTokenDto dto) {
|
||||
CreateTokenVo vo = new CreateTokenVo();
|
||||
|
||||
if(dto.getExpire() == -1){
|
||||
String token = SaTempUtil.createToken(IdUtil.fastSimpleUUID() + StringPool.UNDERSCORE + GlobalConstant.SECRET_KEY, Integer.MAX_VALUE);
|
||||
vo.setToken(token);
|
||||
return vo;
|
||||
}
|
||||
else {
|
||||
String token = SaTempUtil.createToken(IdUtil.fastSimpleUUID() + StringPool.UNDERSCORE + GlobalConstant.SECRET_KEY, dto.getExpire());
|
||||
vo.setToken(token);
|
||||
return vo;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验登录的配置是否满足
|
||||
* @param deviceType
|
||||
* @return
|
||||
*/
|
||||
/*@Override
|
||||
public LoginConfig validateLoginConfig(Integer deviceType) {
|
||||
if (licenseConfig.getEnabled()) {
|
||||
//查出所有在线用户
|
||||
List<String> onlineUser = StpUtil.searchSessionId("", 0, Integer.MAX_VALUE);
|
||||
|
||||
//如果已经登录人数超过授权人数 不允许登录
|
||||
if (onlineUser.size() >= licenseConfig.getLoginMax()) {
|
||||
throw new MyException("登录人数超过授权人数,无法登录,请联系管理员!");
|
||||
}
|
||||
}
|
||||
|
||||
List<LoginConfig> list = loginConfigClient.getAllListFeign();
|
||||
if (list.size() == 0){//如果没有,则设置为默认配置,并进行保存
|
||||
LoginConfig loginConfig = new LoginConfig();
|
||||
loginConfig.setMulLogin("0,1");
|
||||
loginConfig.setMutualExclusion(YesOrNoEnum.YES.getCode());
|
||||
loginConfig.setWithoutLogin(YesOrNoEnum.YES.getCode());
|
||||
loginConfig.setPasswordStrategy(YesOrNoEnum.YES.getCode());
|
||||
loginConfig.setStrategyMaxNumber(7);
|
||||
list.add(loginConfig);
|
||||
loginConfigClient.addLoginConfigFeign(loginConfig);
|
||||
}
|
||||
LoginConfig loginConfig = list.get(0);
|
||||
|
||||
if (StrUtil.isNotBlank(loginConfig.getMulLogin())){
|
||||
if (ObjectUtil.isNotEmpty(deviceType) && deviceType == 0 && !loginConfig.getMulLogin().contains("0")){
|
||||
throw new MyException("当前Web端登录未授权,请联系管理员!");
|
||||
}else if (ObjectUtil.isNotEmpty(deviceType) && deviceType == 1 && !loginConfig.getMulLogin().contains("1")){
|
||||
throw new MyException("当前APP端登录未授权,请联系管理员!");
|
||||
}
|
||||
}else {
|
||||
throw new MyException("当前Web端、app端登录未授权,请联系管理员!");
|
||||
}
|
||||
|
||||
SaTokenConfig oldConfig = SaManager.getConfig();
|
||||
if (loginConfig.getMutualExclusion() == YesOrNoEnum.NO.getCode()){
|
||||
//不开启同端互斥
|
||||
oldConfig.setIsConcurrent(true);
|
||||
}else {
|
||||
//开启同端互斥
|
||||
oldConfig.setIsConcurrent(false);
|
||||
}
|
||||
// 注入到 SaManager 中
|
||||
SaManager.setConfig(oldConfig);
|
||||
|
||||
return loginConfig;
|
||||
}*/
|
||||
|
||||
}
|
||||
@ -1,501 +0,0 @@
|
||||
package com.xjrsoft.auth.service.impl;
|
||||
|
||||
import cn.dev33.satoken.exception.NotLoginException;
|
||||
import cn.dev33.satoken.session.SaSession;
|
||||
import cn.dev33.satoken.stp.SaLoginModel;
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.xjrsoft.auth.vo.ResponseVo;
|
||||
import com.xjrsoft.auth.vo.TodoItem;
|
||||
import com.xjrsoft.auth.service.SsoService;
|
||||
import com.xjrsoft.common.core.constant.GlobalConstant;
|
||||
import com.xjrsoft.common.core.result.Response;
|
||||
import com.xjrsoft.common.core.uitls.BeanUtil;
|
||||
import com.xjrsoft.common.core.uitls.DateUtil;
|
||||
import com.xjrsoft.common.redis.service.RedisUtil;
|
||||
import com.xjrsoft.organization.client.IDepartmentClient;
|
||||
import com.xjrsoft.organization.client.IUserClient;
|
||||
import com.xjrsoft.organization.entity.Department;
|
||||
import com.xjrsoft.organization.entity.User;
|
||||
import com.xjrsoft.organization.vo.UserDeptVo;
|
||||
import com.xjrsoft.organization.vo.UserInfoVo;
|
||||
import com.xjrsoft.organization.vo.UserRoleVo;
|
||||
import com.xjrsoft.organization.vo.UserVo;
|
||||
import com.xjrsoft.organization.vo.LoginVo;
|
||||
import com.xjrsoft.workflow.client.IWorkflowExecuteClient;
|
||||
import com.xjrsoft.workflow.dto.PendingTaskDto;
|
||||
import com.xjrsoft.workflow.vo.PendingTaskVo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.apache.commons.lang.StringEscapeUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.PrintWriter;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.time.ZoneOffset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Base64;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
public class SsoServiceImpl implements SsoService {
|
||||
|
||||
@Value("${xjrsoft.token_secret_key:}")
|
||||
private String secretKey;
|
||||
|
||||
@Value("${xjrsoft.dist.pc_url:}")
|
||||
private String pcUrl;
|
||||
|
||||
@Value("${xjrsoft.dist.mobile_url:}")
|
||||
private String mobileUrl;
|
||||
|
||||
@Value("${xjrsoft.dist.config:}")
|
||||
private String config;
|
||||
|
||||
@Value("${xjrsoft.dist.pc_config:}")
|
||||
private String pc_config;
|
||||
|
||||
@Value("${xjrsoft.dist.type_name:}")
|
||||
private String type_name;
|
||||
|
||||
@Value("${xjrsoft.dist.url:}")
|
||||
private String url;
|
||||
|
||||
@Value("${xjrsoft.openLoginLog: false}")
|
||||
private boolean openLoginLog;
|
||||
|
||||
private String pcPath = "/flow/%s/%s/approveFlow?taskId=%s";
|
||||
|
||||
private String mobilePath = "/pages/workflow/approval?taskId=%s&processId=%s&type=todo";
|
||||
|
||||
@Autowired
|
||||
private IUserClient userClient;
|
||||
|
||||
@Autowired
|
||||
private IDepartmentClient departmentClient;
|
||||
|
||||
@Autowired
|
||||
private IWorkflowExecuteClient iWorkflowExecuteClient;
|
||||
|
||||
@Autowired
|
||||
private RedisUtil redisUtil;
|
||||
|
||||
@Value("${xjrsoft.dist.tenant_code_name:}")
|
||||
private String tenantCodeName;
|
||||
|
||||
@Override
|
||||
public String getLtpasToken(String username) {
|
||||
String token = encodeToken(username);
|
||||
return token;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Response<LoginVo> getUser() {
|
||||
SaSession tokenSession = StpUtil.getTokenSession();
|
||||
User user = tokenSession.get("user", new User());
|
||||
UserInfoVo userInfoVo = BeanUtil.copy(user, UserInfoVo.class);
|
||||
List<Department> departments = userClient.queryDepartmentsOfUserIdFeign(user.getId());
|
||||
Department companies = departmentClient.getDepartmentByIdFeign(user.getDepartmentId());
|
||||
List<UserRoleVo> role = userClient.queryRolesOfUserFeign(user.getId());
|
||||
|
||||
if (departments != null) {
|
||||
userInfoVo.setDepartments(BeanUtil.copyList(departments, UserDeptVo.class));
|
||||
}
|
||||
if (role != null) {
|
||||
userInfoVo.setRoles(BeanUtil.copyList(role, UserRoleVo.class));
|
||||
}
|
||||
|
||||
LoginVo loginVo = new LoginVo();
|
||||
loginVo.setUserInfoVo(userInfoVo);
|
||||
loginVo.setToken(StpUtil.getTokenValue());
|
||||
return Response.ok(loginVo, "操作成功!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseVo getTodoTask(String type, String ltpasToken) {
|
||||
ResponseVo responseVo = new ResponseVo();
|
||||
if(StringUtils.isEmpty(type) || !("pc".equals(type) || "app".equals(type))){
|
||||
responseVo.setMsg("传参有误!");
|
||||
return responseVo;
|
||||
}
|
||||
List<TodoItem> list = new ArrayList<>();
|
||||
|
||||
|
||||
/* SaSession tokenSession = StpUtil.getTokenSession();
|
||||
User user = tokenSession.get(GlobalConstant.LOGIN_USER_INFO_KEY, new User());
|
||||
String userId = String.valueOf(user.getId());*/
|
||||
String loginId = this.decodeToken(ltpasToken);
|
||||
UserVo user = BeanUtil.copy(userClient.getUserByUserNameFeign(loginId), UserVo.class);
|
||||
getToken(user);
|
||||
|
||||
log.info("开始查询待办列表");
|
||||
List<TodoItem> tasks = this.findTask(type);
|
||||
log.info("查询待办列表结束");
|
||||
list.addAll(tasks);
|
||||
|
||||
//时间倒序
|
||||
if(list.size() != 0){
|
||||
list.sort(Comparator.comparing(TodoItem::getTs).reversed());
|
||||
}
|
||||
responseVo.setMsg("操作成功");
|
||||
responseVo.setTotalCount(list.size());
|
||||
responseVo.setItems(list);
|
||||
return responseVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询待办任务信息
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
private List<TodoItem> findTask(String type){
|
||||
List<TodoItem> list = new ArrayList<>();
|
||||
|
||||
//获取用户信息
|
||||
PendingTaskDto dt = new PendingTaskDto();
|
||||
//dt.setOriginator(userId);
|
||||
long time= System.currentTimeMillis();
|
||||
log.info("查询待办pengding方法开始执行{}",time);
|
||||
List<PendingTaskVo> taskVos = iWorkflowExecuteClient.getPendingListFeign(dt);
|
||||
log.info("查询待办pengding方法执行结束,总耗时:{}ms",(System.currentTimeMillis()-time));
|
||||
|
||||
if(taskVos == null || taskVos.isEmpty()){
|
||||
return list;
|
||||
}
|
||||
for (PendingTaskVo taskVo : taskVos) {
|
||||
TodoItem item = new TodoItem();
|
||||
item.setTs(taskVo.getStartTime().toInstant(ZoneOffset.ofHours(8)).toEpochMilli());
|
||||
item.setSubtitle("工作待办");
|
||||
item.setTitle(taskVo.getSchemaName()+ "-" + taskVo.getStartUserName());
|
||||
if("pc".equals(type)){
|
||||
item.setType(type_name);
|
||||
item.setUrl(url +"?config="+pc_config);// "url": "data/gdyd/trust/redirect2?config=gdyd-fcd-xfj",
|
||||
JSONObject params = new JSONObject();
|
||||
params.put("config",pc_config);
|
||||
//item.setParams(params);
|
||||
String dateTime = DateUtil.formatDateTime(taskVo.getStartTime());
|
||||
String targetURL = String.format(pcPath,taskVo.getSchemaId(),taskVo.getProcessId(),taskVo.getTaskId());
|
||||
item.setTargetURL(targetURL);
|
||||
|
||||
|
||||
}else{
|
||||
item.setType(type_name);
|
||||
item.setSrc("api/"+url +"?config="+config);
|
||||
item.setRoute("/route/std/iframe");
|
||||
String targetURL = String.format(mobilePath,taskVo.getTaskId(),taskVo.getProcessId());
|
||||
item.setTargetURL(targetURL);
|
||||
}
|
||||
list.add(item);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String auth(String ltpasToken){
|
||||
|
||||
String loginid = this.decodeToken(ltpasToken);
|
||||
if(openLoginLog){
|
||||
log.info("秘钥 {} 解码后的用户名是:{}",ltpasToken,loginid);
|
||||
}
|
||||
if(StringUtils.isNotBlank(loginid)){
|
||||
return loginid;
|
||||
}
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void auth(String redirect, String ltpasToken, String method, HttpServletResponse response) {
|
||||
redirect = StringEscapeUtils.unescapeHtml(redirect);
|
||||
String loginid = this.decodeToken(ltpasToken);
|
||||
|
||||
|
||||
if(StringUtils.isEmpty(loginid)){
|
||||
toResponse(response,Response.notOk(-1, "ltpasToken已失效"),null);
|
||||
return;
|
||||
}
|
||||
|
||||
User userByUserNameFeign = userClient.getUserByUserNameFeign(loginid);
|
||||
|
||||
UserVo user = BeanUtil.copy(userByUserNameFeign, UserVo.class);
|
||||
if (userByUserNameFeign == null) {
|
||||
toResponse(response,Response.notOk(-1, "该账号不存在!"),null);
|
||||
return;
|
||||
} else if (!Integer.valueOf(1).equals(user.getEnabledMark())) {
|
||||
toResponse(response,Response.notOk(-1, "该账号已被禁用!"),null);
|
||||
return;
|
||||
}
|
||||
|
||||
String token = getToken(user);
|
||||
|
||||
|
||||
String tokenName = StpUtil.stpLogic.getConfig().getTokenName();
|
||||
String tokenPrefix = StpUtil.stpLogic.getConfig().getTokenPrefix();
|
||||
log.info("method->"+method);
|
||||
if(StringUtils.isEmpty(method)){
|
||||
//跳转到页面
|
||||
try {
|
||||
String url = makeUrl(redirect);
|
||||
response.addHeader(HttpHeaders.SET_COOKIE, "Authorization".concat("=").concat(token)/*.concat("; SameSite=None ;Max-Age=3600; Path=/; Secure; HttpOnly")*/);
|
||||
response.sendRedirect(url);
|
||||
}catch (Exception e){
|
||||
log.error("failed to redirect->"+redirect,e);
|
||||
toResponse(response,Response.notOk(-1, "出现异常,页面鉴权跳转失败"),null);
|
||||
}
|
||||
}else {
|
||||
//调用接口
|
||||
String data = null;
|
||||
if("get".equals(method)){
|
||||
data = HttpRequest.get(redirect)
|
||||
.header(tokenName,tokenPrefix + " " + token)
|
||||
.execute().body();
|
||||
}else if("post".equals(method)){
|
||||
String[] paramsStrs = redirect.split("\\?params=");
|
||||
redirect = paramsStrs[0];
|
||||
if(paramsStrs.length > 1) {
|
||||
JSONObject params = JSON.parseObject(paramsStrs[1]);
|
||||
data = HttpRequest.post(redirect)
|
||||
.header(tokenName,tokenPrefix + " " + ltpasToken)
|
||||
.header("Cookie",tokenName + "=" + ltpasToken)
|
||||
.form(params)
|
||||
.execute().body();
|
||||
}
|
||||
}
|
||||
toResponse(response,Response.ok(JSON.parseObject(data)),token);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取平台token,已登录,则从缓存获取,否则进行登录操作
|
||||
* @param user
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
private String getToken(UserVo user){
|
||||
|
||||
SaSession tokenSession = null;
|
||||
String token = null;
|
||||
User userInfo = null;
|
||||
try
|
||||
{
|
||||
tokenSession = StpUtil.getTokenSession();
|
||||
}
|
||||
catch (NotLoginException e)
|
||||
{
|
||||
//如果没有登陆,直接调用登陆接口
|
||||
StpUtil.login(user.getId(), new SaLoginModel().setDevice("PC").setIsLastingCookie(false));
|
||||
|
||||
tokenSession = StpUtil.getTokenSession();
|
||||
|
||||
token = StpUtil.getTokenValue();
|
||||
userInfo = tokenSession.get(GlobalConstant.LOGIN_USER_INFO_KEY, new User());
|
||||
userInfo.setId(user.getId());
|
||||
userInfo.setUserName(user.getUserName());
|
||||
|
||||
tokenSession.set(GlobalConstant.LOGIN_USER_INFO_KEY, userInfo);
|
||||
return token;
|
||||
}
|
||||
|
||||
|
||||
token = (String)tokenSession.get(GlobalConstant.TOKEN_KEY);
|
||||
|
||||
if(StringUtils.isNotEmpty(token)){
|
||||
StpUtil.setTokenValue(token);
|
||||
}
|
||||
|
||||
|
||||
userInfo = tokenSession.get(GlobalConstant.LOGIN_USER_INFO_KEY, new User());
|
||||
String userId = String.valueOf(userInfo.getId());
|
||||
|
||||
if(StringUtils.isEmpty(token) || !user.getId().equals(userId)){
|
||||
//此登录接口登录web端
|
||||
//StpUtil.login(user.getId(), "pc");
|
||||
StpUtil.login(user.getId(), new SaLoginModel().setDevice("PC").setIsLastingCookie(false));
|
||||
tokenSession = StpUtil.getTokenSession();
|
||||
//tokenSession.set("user", user);
|
||||
token = StpUtil.getTokenValue();
|
||||
userInfo.setId(user.getId());
|
||||
userInfo.setUserName(user.getUserName());
|
||||
tokenSession.set(GlobalConstant.LOGIN_USER_INFO_KEY, userInfo);
|
||||
//todo 把获取用户信息的代码都注释了,要分析为什么之前要写这个,现在不写是可以获取待办的
|
||||
//List<Department> departments = userService.queryDepartmentsOfUser(user.getId());
|
||||
//XjrBaseCompany companies = companyService.getById(user.getCompanyId());
|
||||
|
||||
//List<UserRoleVo> role = userService.queryRolesOfUser(user.getId());
|
||||
// 设置返回数据
|
||||
// UserInfoVo userInfoVo = BeanUtil.copy(user, UserInfoVo.class);
|
||||
/* if (companies != null) {
|
||||
userInfoVo.setCompany(BeanUtil.copy(companies, CompanyPageListVo.class));
|
||||
tokenSession.set("company", companyService.getById(user.getCompanyId()));
|
||||
}*/
|
||||
/* if (departments != null) {
|
||||
|
||||
userInfoVo.setDepartments(BeanUtil.copyList(departments, UserDeptVo.class));
|
||||
tokenSession.set("dept", userService.queryDepartmentsOfUser(user.getId()));
|
||||
}*/
|
||||
/* if (role != null) {
|
||||
userInfoVo.setRoles(BeanUtil.copyList(role, UserRoleVo.class));
|
||||
tokenSession.set(GlobalConstant.LOGIN_USER_ROLE_CODE_KEY, role.stream().map(UserRoleVo::getCode).collect(Collectors.toList()));
|
||||
tokenSession.set("role", userService.queryRolesOfUser(user.getId()));
|
||||
}*/
|
||||
//如果开启了多租户 需要把租户信息也要存储一份
|
||||
/* if(properties.getEnabledTenant()) {
|
||||
tokenSession.set("tenant",tenant);
|
||||
userInfoVo.setTenantId(tenant.getId());
|
||||
userInfoVo.setTenantName(tenant.getName());
|
||||
}*/
|
||||
// tokenSession.set("userInfoVo",userInfoVo);
|
||||
}
|
||||
return token;
|
||||
}
|
||||
|
||||
private void toResponse(HttpServletResponse response, Response result, String token){
|
||||
PrintWriter writer = null;
|
||||
try {
|
||||
response.setContentType("application/json;charset=UTF-8");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
if (StringUtils.isNotEmpty(token)) {
|
||||
response.addHeader(HttpHeaders.SET_COOKIE, "Authorization".concat("=").concat(token).concat("; SameSite=None ;Max-Age=3600; Path=/; Secure; HttpOnly"));
|
||||
}
|
||||
writer = response.getWriter();
|
||||
writer.write(JSON.toJSONString(result));
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}finally {
|
||||
if (writer != null){
|
||||
writer.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String decodeToken(String ltpasToken) {
|
||||
if(openLoginLog){
|
||||
log.info("登录秘钥是:{} ",ltpasToken);
|
||||
}
|
||||
if (StringUtils.isEmpty(ltpasToken)) {
|
||||
return null;
|
||||
}
|
||||
Long now = System.currentTimeMillis() / 1000;
|
||||
String ltpasTokenDecode = new String(Base64.getDecoder().decode(ltpasToken), StandardCharsets.UTF_8);
|
||||
String[] ltpasTokenInfo = ltpasTokenDecode.split("%");
|
||||
String eIN = ltpasTokenInfo[0];
|
||||
String sign = ltpasTokenInfo[3];
|
||||
ltpasTokenInfo[3] = secretKey;
|
||||
String ltpasTokenPlain = StringUtils.join(ltpasTokenInfo, "%");
|
||||
if(!sign.equals(DigestUtils.sha1Hex(ltpasTokenPlain))) {
|
||||
return null;
|
||||
}
|
||||
Long begin = Long.parseLong(ltpasTokenInfo[1]);
|
||||
Long end = Long.parseLong(ltpasTokenInfo[2]);
|
||||
|
||||
if(openLoginLog){
|
||||
log.info("互信秘钥解密过程参数:now:{},ltpasTokenDecode:{},secretKey:{}",now,ltpasTokenDecode,secretKey);
|
||||
}
|
||||
|
||||
if(now >= begin && now <= end) {
|
||||
return eIN;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过登录账号username,等到加密后的互信token
|
||||
* @param username
|
||||
* @return
|
||||
*/
|
||||
public String encodeToken(String username) {
|
||||
//过期时间
|
||||
Long cycle = 24 * 60L * 60L;
|
||||
Long begin = System.currentTimeMillis() /1000;
|
||||
Long end = begin + cycle;
|
||||
String[] ltpasTokenPlainInfo = new String[4];
|
||||
ltpasTokenPlainInfo[0] = username;
|
||||
ltpasTokenPlainInfo[1] = begin.toString();
|
||||
ltpasTokenPlainInfo[2] = end.toString();
|
||||
ltpasTokenPlainInfo[3] = secretKey;
|
||||
String sign = DigestUtils.sha1Hex(StringUtils.join(ltpasTokenPlainInfo, "%"));
|
||||
ltpasTokenPlainInfo[3] = sign;
|
||||
String token = Base64.getEncoder().encodeToString(StringUtils.join(ltpasTokenPlainInfo, "%").getBytes(StandardCharsets.UTF_8));
|
||||
return token;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 对重定向的url进行解析,中文乱码处理
|
||||
* @param url
|
||||
* @return
|
||||
*/
|
||||
private String makeUrl(String url){
|
||||
String[] urlStrs = url.split("\\?");
|
||||
if(urlStrs.length == 1){
|
||||
return url;
|
||||
}
|
||||
String domain = url.split("\\?")[0];
|
||||
StringBuffer urlBuff = new StringBuffer();
|
||||
urlBuff.append(domain).append("?");
|
||||
String paramStrs = url.substring(url.indexOf("?") + 1);
|
||||
String[] params = paramStrs.split("&");
|
||||
if(params.length == 1){
|
||||
makeUrlParams(0,params,urlBuff);
|
||||
return urlBuff.toString();
|
||||
}
|
||||
makeUrlParams(0,params,urlBuff);
|
||||
urlBuff.append("&");
|
||||
for (int i = 1; i < params.length; i++) {
|
||||
makeUrlParams(i,params,urlBuff);
|
||||
urlBuff.append("&");
|
||||
}
|
||||
return urlBuff.substring(0, urlBuff.length() - 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析url参数,将参数值进行编码转换
|
||||
* @param index
|
||||
* @param params
|
||||
* @param urlBuff
|
||||
*/
|
||||
private void makeUrlParams(Integer index,String[] params,StringBuffer urlBuff){
|
||||
String[] kv = params[index].split("=");
|
||||
if(kv.length == 1 || StringUtils.isEmpty(kv[1])){
|
||||
urlBuff.append(kv[0]).append("=").append("");
|
||||
}else {
|
||||
try {
|
||||
urlBuff.append(kv[0]).append("=").append(URLEncoder.encode(kv[1], "utf-8"));
|
||||
}catch (Exception e){
|
||||
urlBuff.append(kv[0]).append("=").append("");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取请求地址url中获取某个参数值
|
||||
* @param url
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
private String getParamByUrl(String url, String name) {
|
||||
url += "&";
|
||||
String pattern = "(\\?|&){1}#{0,1}" + name + "=[a-zA-Z0-9]*(&{1})";
|
||||
Pattern r = Pattern.compile(pattern);
|
||||
Matcher matcher = r.matcher(url);
|
||||
if (matcher.find()) {
|
||||
return matcher.group(0).split("=")[1].replace("&", "");
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,13 +0,0 @@
|
||||
package com.xjrsoft.auth.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ResponseVo {
|
||||
private Integer retcode = 1;
|
||||
private Integer totalCount = 0;
|
||||
private String msg;
|
||||
private List<TodoItem> items;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user