20240315更新

master
RENCHAO 8 months ago
parent 9b2733c0e9
commit 596717b85a

@ -0,0 +1,63 @@
package com.renchao.test;
import java.util.Arrays;
public class DynamicProgramming {
public static void main(String[] args) {
int[] bv = {0, 1500, 3000, 2000}; // 物品价值0表示没有商品为了商品标号从1开始
int[] bw = {0, 1, 4, 3}; // 物品重量。0表示没有商品也是为了与table表对齐
int volume = 4; // 背包容量
knapsack(bv, bw, volume);
}
/**
*
* @param bv
* @param bw
* @param volume
*/
private static void knapsack(int[] bv, int[] bw, int volume) {
int n = bv.length; // 物品数量
// table[i][w]记录前i个物品能够装入容量为w的背包中的最大价值。
int[][] table = new int[n][volume + 1];
// 记录物品放入背包的情况。
int[][] record = new int[n][volume + 1];
// 循环每个商品从1号商品开始0表示没有商品。
for (int i = 1; i < n; i++) {
// 循环每个容量这里直接使用w表示容量
for (int w = 1; w < table[i].length; w++) {
if (w >= bw[i]) { // 容量w大于第i号商品的重量时
// bv[i]当前商品的价值
// table[i-1][w-bw[i]]装完当前商品剩余容量在上一个商品时可以装下的最大价值w-bw[i]表示剩余容量
// table[i-1][w]上一个商品在当前容量下的最大价值
if (bv[i] + table[i - 1][w - bw[i]] > table[i - 1][w]) {
table[i][w] = bv[i] + table[i - 1][w - bw[i]];
record[i][w] = 1;// 记录商品放入
} else {
table[i][w] = table[i - 1][w];
}
} else {
table[i][w] = table[i - 1][w];
}
}
}
System.out.println("======商品价值表======");
for (int[] arr : table) {
System.out.println(Arrays.toString(arr));
}
System.out.println("======商品放入情况======");
for (int[] arr : record) {
System.out.println(Arrays.toString(arr));
}
// 在最大化情况下,背包可放的物品
int w = volume; // 可放入的最大容量
// 从最后一个商品开始循环
for (int i = n - 1; i > 0 && w > 0; i--) {
if (record[i][w] == 1) {
System.out.println(i + "放入背包。");
w = w - bw[i]; // 减去该商品重量
}
}
}
}

@ -0,0 +1,65 @@
package com.renchao.test;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
/**
*
*/
public class Greedy {
public static void main(String[] args) {
// 获取电台
HashMap<String, String[]> ks = getK();
// 用于收集所有地区,并且去重
HashSet<String> kk = new HashSet<>();
// 保存符合要求的电台
ArrayList<String> selects = new ArrayList<>();
String maxK = null; // 记录覆盖地区最多的电台
int max;
int num;
// 收集所有的电台,并且去重
for (Map.Entry<String,String[]> entry : ks.entrySet()) {
kk.addAll(Arrays.asList(entry.getValue()));
}
while (kk.size() > 0) {
max = 0;
for (Map.Entry<String,String[]> k : ks.entrySet()) {
num = 0;
//获取当前电台覆盖数
for (String s : k.getValue()) {
if (kk.contains(s))
num++;
}
// 与最大覆盖数比较
if (num > max) {
max = num;
maxK = k.getKey();
}
}
selects.add(maxK);
// 删除已经覆盖的地区,然后进行下一轮比较
for (String s : ks.get(maxK)) {
kk.remove(s);
}
}
// 输出结果
for (String strings : selects) {
System.out.println(strings);
}
}
// 获取电台
public static HashMap<String, String[]> getK() {
HashMap<String, String[]> ks = new HashMap<>();
ks.put("k1", new String[]{"北京", "上海", "天津"});
ks.put("k2", new String[]{"广州", "北京", "深圳"});
ks.put("k3", new String[]{"成都", "上海", "杭州"});
ks.put("k4", new String[]{"上海", "天津"});
ks.put("k5", new String[]{"杭州", "大连"});
return ks;
}
}

@ -0,0 +1,21 @@
package com.renchao.test;
import org.apache.commons.lang3.StringUtils;
/**
* @author ren_chao
*/
public class StringTest {
public static void main(String[] args) {
String str = "1234567890a";
System.out.println(StringUtils.abbreviate(str, "***",-1,6));
System.out.println(StringUtils.abbreviate(str, "***",1,6));
System.out.println(StringUtils.abbreviate(str, "***",2,6));
System.out.println(StringUtils.abbreviate(str, "***",3,6));
System.out.println(StringUtils.abbreviate(str, "***",4,6));
System.out.println(StringUtils.abbreviate(str, "***",4,7));
System.out.println(StringUtils.abbreviate(str, "***",4,8));
System.out.println(StringUtils.abbreviate(str, "*",4,5));
System.out.println(StringUtils.abbreviate(str, "***", 6) + str.substring(str.length() - 3));
}
}

@ -333,13 +333,17 @@ public class Test01 {
public void test16() { public void test16() {
// System.out.println(isMatch("abcdef", "a*ef")); // System.out.println(isMatch("abcdef", "a*ef"));
// System.out.println(isMatch("abcdefghi", "a*ef*i")); // System.out.println(isMatch("aaaef", "a*ef"));
// System.out.println(isMatch("abcdefghi", ".*")); // System.out.println(isMatch("abcdefghi", ".*"));
System.out.println(isMatch("aa", "a")); // System.out.println(isMatch("aa", "a"));
System.out.println(isMatch("aa", "a*b*")); System.out.println(isMatch("aa", "a*"));
System.out.println(isMatch("aab", "c*a*b")); // System.out.println(isMatch("aa", "a*b*"));
// System.out.println(isMatch("aab", "c*a*b"));
System.out.println(isMatch("aab", ".*")); System.out.println(isMatch("aab", ".*"));
System.out.println(isMatch("abcde", ".*de")); // System.out.println(isMatch("abcde", ".*de"));
// System.out.println(isMatch("mississippi", "mis*is*ip*."));
// System.out.println(isMatch("mississippi", "mis*is*p*."));
// System.out.println(isMatch("issippi", "is*p*."));
// System.out.println("abcd".substring(1)); // System.out.println("abcd".substring(1));
@ -348,96 +352,79 @@ public class Test01 {
public boolean isMatch(String s, String p) { public boolean isMatch(String s, String p) {
if (p.length() == 0 && s.length() != 0) { int row = s.length();
return false; int col = p.length();
} boolean[][] dp = new boolean[row + 1][col + 1];
if (s.length() == 0) { // 初始化首行
if (p.length() == 0) { dp[0][0] = true;
return true; for (int j = 2; j <= col; j += 2) {
} if (dp[0][j - 2] && p.charAt(j - 1) == '*') {
if (p.length() == 1) { dp[0][j] = true;
return false;
} }
if (p.charAt(1) == '*') {
return isMatch(s, p.substring(2));
}
return false;
} }
if (p.charAt(0) == '.') { // 状态转移
if (p.length() == 1 || ) { for (int i = 1; i <= row; i++) {
return isMatch(s.substring(1), p.substring(1)); for (int j = 1; j <= col; j++) {
if (p.charAt(j - 1) == '*') {
if (dp[i][j - 2] || (dp[i - 1][j] && (s.charAt(i - 1) == p.charAt(j - 2) || p.charAt(j - 2) == '.'))) {
dp[i][j] = true;
}
} else {
if (dp[i - 1][j - 1] && (s.charAt(i - 1) == p.charAt(j - 1) || p.charAt(j - 1) == '.')) {
dp[i][j] = true;
}
}
} }
if ()
} }
return dp[row][col];
}
public boolean isMatch4(String s, String p) {
if (s.charAt(0) != p.charAt(0)) { if (s.isEmpty() && p.isEmpty()) {
if (p.length() < 2 || p.charAt(1) != '*') { return true;
return false;
}
if (p.charAt(1) == '*') {
return isMatch(s, p.substring(2));
}
} }
if (s.charAt(0) == p.charAt(0)) { if (s.isEmpty() || p.isEmpty()) {
if (p.length() == 1 || p.charAt(1) != '*') { return false;
return isMatch(s.substring(1), p.substring(1));
}
return isMatch(s.substring(1), p);
} }
return false;
}
public boolean isMatch3(String s, String p) { if (p.length() > 1 && p.charAt(1) == '*') {
int sIndex = 0; if (p.charAt(0) == '.') {
int pIndex = 0; return true;
int tem = -1;
while (sIndex < s.length() && pIndex < p.length()) {
char c1 = s.charAt(sIndex++);
char c2 = p.charAt(pIndex);
if (c1 == c2 || c2 == '.') {
pIndex++;
continue;
}
if (c2 == '*') {
tem = pIndex++;
}
if (tem == p.length() - 1) {
sIndex = s.length();
break;
}
if (pIndex < p.length() && (c1 == p.charAt(pIndex) || '.' == p.charAt(pIndex))) {
pIndex++;
} else if (tem != -1) {
pIndex = tem;
} }
int i = 0;
if (tem != -1 && pIndex == p.length() && sIndex < s.length()) { while (i < s.length() && s.charAt(i) == p.charAt(0)) {
pIndex = tem; i++;
} }
return isMatch4(s.substring(i), p.substring(2));
} else if (p.charAt(0) == s.charAt(0) || p.charAt(0) == '.') {
return isMatch4(s.substring(1), p.substring(1));
} else {
return false;
} }
return pIndex == p.length() && sIndex == s.length(); }
@Test
public void test21() {
System.out.println(isMatch22("aa", "a*"));
} }
public boolean isMatch2(String s, String p) { public boolean isMatch22(String s, String p) {
int pIndex = 0; int m = s.length() + 1, n = p.length() + 1;
for (int i = 0; i < s.length(); i++) { boolean[][] dp = new boolean[m][n];
if (pIndex >= p.length()) { dp[0][0] = true;
return false; for (int j = 2; j < n; j += 2)
} dp[0][j] = dp[0][j - 2] && p.charAt(j - 1) == '*';
char c1 = s.charAt(i); for (int i = 1; i < m; i++) {
char c2 = p.charAt(pIndex); for (int j = 1; j < n; j++) {
if (c1 == c2 || c2 == '.') { dp[i][j] = p.charAt(j - 1) == '*' ?
pIndex++; dp[i][j - 2] || dp[i - 1][j] && (s.charAt(i - 1) == p.charAt(j - 2) || p.charAt(j - 2) == '.') :
} else if (c2 == '*') { dp[i - 1][j - 1] && (p.charAt(j - 1) == '.' || s.charAt(i - 1) == p.charAt(j - 1));
} else {
return false;
} }
} }
return true; return dp[m - 1][n - 1];
} }

@ -3,7 +3,7 @@
<parent> <parent>
<artifactId>agile-bacth</artifactId> <artifactId>agile-bacth</artifactId>
<groupId>com.jiuyv.sptcc.agile.batch</groupId> <groupId>com.jiuyv.sptcc.agile.batch</groupId>
<version>1.0.5-SNAPSHOT</version> <version>1.0.6-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -3,7 +3,7 @@
<parent> <parent>
<artifactId>agile-bacth</artifactId> <artifactId>agile-bacth</artifactId>
<groupId>com.jiuyv.sptcc.agile.batch</groupId> <groupId>com.jiuyv.sptcc.agile.batch</groupId>
<version>1.0.5-SNAPSHOT</version> <version>1.0.6-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -0,0 +1,29 @@
package com.jiuyv.sptcc.agile.batch.controller;
import com.jiuyv.sptcc.agile.batch.service.IDataSyncService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.sql.SQLException;
@RestController
@RequestMapping("/public/agile-batch-data")
public class DateSyncController {
private static final Logger LOGGER = LoggerFactory.getLogger(DateSyncController.class);
@Resource
private IDataSyncService dataSyncService;
@PostMapping("/migrationFile")
public void migrationFile(){
try {
dataSyncService.migrationFile();
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
}

@ -116,6 +116,14 @@ public class PostgreDAO {
} }
} }
public boolean updateRecord(String path , Long id) throws SQLException {
String sql = String.format("update tbl_prd_sync_record set path = '%s', data_status = '88' WHERE id = %s",path,id);
try (Connection connection = dataSource.getConnection();
Statement statement = connection.createStatement()) {
return statement.execute(sql);
}
}
public void deleteDayFile(List<Long> ids) throws SQLException { public void deleteDayFile(List<Long> ids) throws SQLException {
if (CollectionUtils.isEmpty(ids)) { if (CollectionUtils.isEmpty(ids)) {
return; return;

@ -0,0 +1,31 @@
package com.jiuyv.sptcc.agile.batch.dao.file;
import com.jiuyv.sptcc.agile.batch.domain.file.SyncRecord;
import java.util.List;
/**
* Mapper
*
* @author shu_kai
* @date 2023-09-26
*/
// @Mapper
public interface SyncRecordMapper {
/**
*
*
* @param syncRecord
* @return
*/
List<SyncRecord> selectSyncRecordList(SyncRecord syncRecord);
/**
*
* @param record
* @return
*/
int updateSyncRecord(SyncRecord record);
}

@ -0,0 +1,130 @@
package com.jiuyv.sptcc.agile.batch.domain;
import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/**
* Entity
*
* @author admin
*/
public class BaseEntity implements Serializable {
private static final long serialVersionUID = 1L;
/** 创建者姓名 */
private String createByName;
/** 创建时间 */
private Date createTime;
/** 创建者id(或账户) */
private String createBy;
/** 更新者姓名 */
private String updateByName;
/** 更新者id(或账户) */
private String updateBy;
/** 更新时间 */
private Date updateTime;
/** 搜索值 */
private String searchValue;
/** 备注 */
private String remark;
/** 请求参数 */
private Map<String, Object> params;
/**
* @return the createByName
*/
public String getCreateByName() {
return createByName;
}
/**
* @param createByName the createByName to set
*/
public void setCreateByName(String createByName) {
this.createByName = createByName;
}
/**
* @return the updateByName
*/
public String getUpdateByName() {
return updateByName;
}
/**
* @param updateByName the updateByName to set
*/
public void setUpdateByName(String updateByName) {
this.updateByName = updateByName;
}
public String getSearchValue() {
return searchValue == null ? "" : searchValue;
}
public void setSearchValue(String searchValue) {
this.searchValue = searchValue;
}
public String getCreateBy() {
return createBy == null ? "" : createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy == null ? "" : updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getRemark() {
return remark == null ? "" : remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public Map<String, Object> getParams() {
if (params == null) {
params = new HashMap<>();
}
return params;
}
public void setParams(Map<String, Object> params) {
this.params = params;
}
}

@ -0,0 +1,97 @@
package com.jiuyv.sptcc.agile.batch.domain.file;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
* tbl_prd_sync_record
*
* @author shu_kai
* @date 2023-09-26
*/
public class SyncRecord {
private static final long serialVersionUID = 1L;
/**
* ID
*/
private Long id;
/**
* -
*/
private String path;
/**
* hive
*/
private String tableName;
/**
*
*/
private Long count;
private LocalDate txnData;
private String dataStatus;
private LocalDateTime createTime;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName = tableName;
}
public Long getCount() {
return count;
}
public void setCount(Long count) {
this.count = count;
}
public LocalDate getTxnData() {
return txnData;
}
public void setTxnData(LocalDate txnData) {
this.txnData = txnData;
}
public String getDataStatus() {
return dataStatus;
}
public void setDataStatus(String dataStatus) {
this.dataStatus = dataStatus;
}
public LocalDateTime getCreateTime() {
return createTime;
}
public void setCreateTime(LocalDateTime createTime) {
this.createTime = createTime;
}
}

@ -0,0 +1,17 @@
package com.jiuyv.sptcc.agile.batch.service;
import java.sql.SQLException;
public interface IDataSyncService {
/**
*
*/
void fileFullSyncBatch();
/**
*
*/
void migrationFile() throws SQLException;
}

@ -0,0 +1,131 @@
package com.jiuyv.sptcc.agile.batch.service.impl;
import com.jcraft.jsch.ChannelSftp;
import com.jcraft.jsch.SftpException;
import com.jiuyv.sptcc.agile.batch.config.sftp.SftpChannelPool;
import com.jiuyv.sptcc.agile.batch.config.sftp.SftpProperties;
import com.jiuyv.sptcc.agile.batch.dao.PostgreDAO;
import com.jiuyv.sptcc.agile.batch.domain.file.SyncRecord;
import com.jiuyv.sptcc.agile.batch.service.IDataSyncService;
import com.jiuyv.sptcc.agile.batch.util.SftpUtils;
import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.sql.SQLException;
import java.time.LocalDate;
import java.util.List;
import java.util.Map;
@Service
public class DataSyncServiceImpl implements IDataSyncService {
private static final String SEPARATOR = "/";
private static final Logger LOGGER = LoggerFactory.getLogger(DataSyncServiceImpl.class);
@Resource
private PostgreDAO postgreDAO;
@Resource
private SftpChannelPool sftpChannelPool;
@Resource
private SftpProperties sftpProperties;
@Override
public void fileFullSyncBatch() {
}
@Override
public void migrationFile() throws SQLException {
// SyncRecord syncRecord1 = new SyncRecord();
// syncRecord1.setDataStatus("00");
List<Map<String, Object>> syncRecords = postgreDAO.selectAllSyncRecord();
ChannelSftp sftpChannel = sftpChannelPool.getSftpChannel();
// 迁移文件位置
for (Map<String, Object> map : syncRecords) {
SyncRecord syncRecord = new SyncRecord();
syncRecord.setId(MapUtils.getLong(map,"id"));
syncRecord.setPath(MapUtils.getString(map,"path"));
syncRecord.setTableName(MapUtils.getString(map,"table_name"));
syncRecord.setCount(MapUtils.getLong(map,"count"));
String txnDate = MapUtils.getString(map, "txn_date");
if(StringUtils.isNotBlank(txnDate)){
syncRecord.setTxnData(LocalDate.parse(txnDate));
}
syncRecord.setDataStatus(MapUtils.getString(map,"data_status"));
fileChange(syncRecord,sftpChannel);
}
sftpChannelPool.closeChannel(sftpChannel);
//修改文件目录
}
private void fileChange(SyncRecord record,ChannelSftp sftpChannel) throws SQLException {
String path = record.getPath();
String tableName = record.getTableName();
//新文件路径
StringBuilder stringBuilder = new StringBuilder();
String uploadPath = sftpProperties.getUploadPath();
int length = uploadPath.length();
String prePath = path.substring(0,length);
String fileName = path.substring(path.lastIndexOf("/")+1);
String[] split1 = fileName.split("\\.");
String newFileName = split1[0].concat("_").concat(record.getTxnData().toString()).concat(".").concat(split1[1]);
if(fileName.toLowerCase().contains("month")){
newFileName = fileName;
}
String afterPath = path.substring(length);
String[] split = afterPath.split("/");
//新文件目录
stringBuilder.append(prePath)
.append(SEPARATOR)
.append(tableName)
.append(SEPARATOR)
.append(split[1]);
String newPath = stringBuilder.toString();
LOGGER.info("newPath: {}" , newPath);
//新文件完整地址
stringBuilder.append(SEPARATOR)
.append(newFileName);
String newFilePath = stringBuilder.toString();
LOGGER.info("newFilePath: {}" , newFilePath);
try {
SftpUtils.createDir(newPath,sftpChannel);
sftpChannel.rename(path,newFilePath);
//增加文件目录
SyncRecord update = new SyncRecord();
update.setId(record.getId());
update.setPath(newFilePath);
update.setDataStatus("88");
boolean success = postgreDAO.updateRecord(newFilePath,record.getId());
if(!success ){
LOGGER.warn("{} update fail ",record.getPath());
}
}catch (SftpException e){
LOGGER.error("mv file [{}] fail, exception message : [{}] ",record.getPath(),e.getMessage());
}
}
}

@ -0,0 +1,58 @@
package com.jiuyv.sptcc.agile.batch.util;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Arrays;
import java.util.List;
public class PathUtils {
private static final Logger LOGGER = LoggerFactory.getLogger(PathUtils.class);
private static final String SEPARATOR = "/";
public static String getPath(String path ,String tableName,String uploadPath){
// String tableName = record.getTableName();
//新文件路径
StringBuilder stringBuilder = new StringBuilder();
// String uploadPath = sftpProperties.getUploadPath();
List<String> list = Arrays.asList(path.split(SEPARATOR));
String txnDate = null;
if(list.size()>6){
//按日统计
txnDate = list.get(4);
}
// String txn_date = path
int length = uploadPath.length();
String prePath = path.substring(0,length);
String fileName = path.substring(path.lastIndexOf("/")+1);
String[] split1 = fileName.split("\\.");
String newFileName = null;
if(StringUtils.isEmpty(txnDate)){
newFileName = fileName;
}else{
newFileName = split1[0].concat("_").concat(txnDate).concat(".").concat(split1[1]);
}
String afterPath = path.substring(length);
String[] split = afterPath.split("/");
//新文件目录
stringBuilder.append(prePath)
.append(SEPARATOR)
.append(tableName)
.append(SEPARATOR)
.append(split[1]);
String newPath = stringBuilder.toString();
LOGGER.info("newPath: {}" , newPath);
//新文件完整地址
stringBuilder.append(SEPARATOR)
.append(newFileName);
String newFilePath = stringBuilder.toString();
LOGGER.info("newFilePath: {}" , newFilePath);
return newFilePath;
}
}

@ -0,0 +1,69 @@
package com.jiuyv.sptcc.agile.batch.util;
import com.jcraft.jsch.ChannelSftp;
import com.jcraft.jsch.SftpATTRS;
import com.jcraft.jsch.SftpException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class SftpUtils {
private static final Logger LOGGER = LoggerFactory.getLogger(SftpUtils.class);
/**
*
*
* @param createpath
* @return
*/
public static boolean createDir(String createpath, ChannelSftp sftp) {
try {
if (isDirExist(createpath, sftp)) {
sftp.cd(createpath);
return true;
}
String[] pathArray = createpath.split("/");
StringBuilder filePath = new StringBuilder("/");
for (String path : pathArray) {
if (path.isEmpty()) {
continue;
}
filePath.append(path).append("/");
if (isDirExist(filePath.toString(), sftp)) {
sftp.cd(filePath.toString());
} else {
// 建立目录
sftp.mkdir(filePath.toString());
// 进入并设置为当前目录
sftp.cd(filePath.toString());
}
}
sftp.cd(createpath);
return true;
} catch (SftpException e) {
LOGGER.error("文件创建失败: {}", e.getMessage());
}
return false;
}
/**
*
*
* @param directory
* @return
*/
public static boolean isDirExist(String directory, ChannelSftp sftp) {
boolean isDirExistFlag = false;
try {
SftpATTRS sftpATTRS = sftp.lstat(directory);
isDirExistFlag = true;
return sftpATTRS.isDir();
} catch (Exception e) {
if (e.getMessage().equalsIgnoreCase("no such file")) {
isDirExistFlag = false;
}
}
return isDirExistFlag;
}
}

@ -0,0 +1,44 @@
spring:
datasource: #数据源配置
driver-class-name: org.postgresql.Driver
url: jdbc:postgresql://172.16.12.105:5432/keliubao
username: postgres
password: postgres
mybatis:
type-aliases-super-type:
mapper-locations: classpath:mapper/**/*.xml
# 加载全局的配置文件
configLocation: classpath:mybatis/mybatis-config.xml
sftp:
host: 172.16.12.108
port: 22
username: flink
password: flink123 # 不要加密如果需要加密后面全部交给spring cloud config来处理
# 连接池最大实例数
maxTotal: 20
# 连接池最大空闲数
maxIdle: 10
# 连接池最小空闲数
minIdle: 5
# 文件上传目录
uploadPath: /home/flink/dws-file
hiveDataSource:
jdbcUrl: jdbc:hive2://172.16.12.101:10000/sptcc_agile_test;socketTimeout=12000;
user: flink
password: flink
driverClass: org.apache.hive.jdbc.HiveDriver
initialPoolSize: 15
minPoolSize: 15
maxPoolSize: 25
pgDataSource:
jdbcUrl: jdbc:postgresql://172.16.12.105:5432/keliubao
user: postgres
password: postgres
driverClass: org.postgresql.Driver
initialPoolSize: 15
minPoolSize: 15

@ -0,0 +1,68 @@
import com.jcraft.jsch.ChannelSftp;
import com.jcraft.jsch.SftpATTRS;
import com.jcraft.jsch.SftpException;
public class sd {
/**
*
* @param createpath
* @return
*/
public static boolean createDir(String createpath, ChannelSftp sftp) {
try
{
if (isDirExist(createpath,sftp)) {
sftp.cd(createpath);
return true;
}
String pathArry[] = createpath.split("/");
StringBuffer filePath = new StringBuffer("/");
for (String path : pathArry) {
if (path.equals("")) {
continue;
}
filePath.append(path + "/");
if (isDirExist(filePath.toString(),sftp)) {
sftp.cd(filePath.toString());
} else {
// 建立目录
sftp.mkdir(filePath.toString());
// 进入并设置为当前目录
sftp.cd(filePath.toString());
}
}
sftp.cd(createpath);
return true;
}
catch (SftpException e) {
e.printStackTrace();
}
return false;
}
/**
*
* @param directory
* @return
*/
public static boolean isDirExist(String directory, ChannelSftp sftp)
{
boolean isDirExistFlag = false;
try
{
SftpATTRS sftpATTRS = sftp.lstat(directory);
isDirExistFlag = true;
return sftpATTRS.isDir();
}
catch (Exception e)
{
if (e.getMessage().toLowerCase().equals("no such file"))
{
isDirExistFlag = false;
}
}
return isDirExistFlag;
}
}

@ -4,12 +4,12 @@
<parent> <parent>
<artifactId>agile-bacth</artifactId> <artifactId>agile-bacth</artifactId>
<groupId>com.jiuyv.sptcc.agile.batch</groupId> <groupId>com.jiuyv.sptcc.agile.batch</groupId>
<version>1.0.5-SNAPSHOT</version> <version>1.0.6-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>agile-batch-service</artifactId> <artifactId>agile-batch-service</artifactId>
<version>1.0.5-SNAPSHOT</version> <version>1.0.6-SNAPSHOT</version>
<name>agile-batch-service</name> <name>agile-batch-service</name>
<description>agile-batch-service</description> <description>agile-batch-service</description>

@ -10,7 +10,7 @@
<groupId>com.jiuyv.sptcc.agile.batch</groupId> <groupId>com.jiuyv.sptcc.agile.batch</groupId>
<artifactId>agile-bacth</artifactId> <artifactId>agile-bacth</artifactId>
<version>1.0.5-SNAPSHOT</version> <version>1.0.6-SNAPSHOT</version>
<modules> <modules>
<module>agile-batch-api</module> <module>agile-batch-api</module>
<module>agile-batch-service</module> <module>agile-batch-service</module>

@ -1,7 +1,10 @@
package com.jiuyv.sptccc.agile.framework.config; package com.jiuyv.sptccc.agile.framework.config;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.apache.tomcat.util.http.Rfc6265CookieProcessor;
import org.apache.tomcat.util.http.SameSiteCookies;
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer; import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
import org.springframework.boot.web.embedded.tomcat.TomcatContextCustomizer;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
@ -23,4 +26,14 @@ public class ApplicationConfig {
.serializerByType(Long.class, ToStringSerializer.instance) .serializerByType(Long.class, ToStringSerializer.instance)
.serializerByType(Long.TYPE, ToStringSerializer.instance); .serializerByType(Long.TYPE, ToStringSerializer.instance);
} }
@Bean
public TomcatContextCustomizer sameSiteCookiesConfig() {
return context -> {
Rfc6265CookieProcessor cookieProcessor = new Rfc6265CookieProcessor();
cookieProcessor.setSameSiteCookies(SameSiteCookies.LAX.getValue());
context.setCookieProcessor(cookieProcessor);
};
}
} }

@ -69,7 +69,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Override @Override
protected void configure(HttpSecurity httpSecurity) throws Exception { protected void configure(HttpSecurity httpSecurity) throws Exception {
CookieCsrfTokenRepository csrfTokenRepository = CookieCsrfTokenRepository.withHttpOnlyFalse(); CookieCsrfTokenRepository csrfTokenRepository = CookieCsrfTokenRepository.withHttpOnlyFalse();
csrfTokenRepository.setCookiePath("/"); csrfTokenRepository.setSecure(true);
httpSecurity httpSecurity
.addFilterBefore(loginFilter, UsernamePasswordAuthenticationFilter.class) .addFilterBefore(loginFilter, UsernamePasswordAuthenticationFilter.class)
.exceptionHandling() .exceptionHandling()

@ -132,7 +132,7 @@ public class ContentController extends BaseController {
public void wordDownload(HttpServletResponse response) throws IOException { public void wordDownload(HttpServletResponse response) throws IOException {
Response feignResponse = portalContentFeign.wordDownload(); Response feignResponse = portalContentFeign.wordDownload();
response.addHeader("Content-Length", getResponseHeader(feignResponse,"content-length")); response.addHeader("Content-Length", getResponseHeader(feignResponse,"content-length"));
String fileName = URLEncoder.encode("(用户版)实验室使用说明.docx", "UTF-8"); String fileName = URLEncoder.encode("(用户版)实验室使用说明.pdf", "UTF-8");
response.addHeader("Content-Disposition", "attachment;filename=" + fileName); response.addHeader("Content-Disposition", "attachment;filename=" + fileName);
IOUtils.copy(feignResponse.body().asInputStream(), response.getOutputStream()); IOUtils.copy(feignResponse.body().asInputStream(), response.getOutputStream());
} }

@ -5,6 +5,8 @@ server:
# session超时时间 # session超时时间
session: session:
timeout: 1800 timeout: 1800
cookie:
secure: true
tomcat: tomcat:
# tomcat的URI编码 # tomcat的URI编码
uri-encoding: UTF-8 uri-encoding: UTF-8
@ -50,11 +52,7 @@ spring:
cache: cache:
type: caffeine type: caffeine
caffeine.spec: maximumSize=2000,expireAfterWrite=1h caffeine.spec: maximumSize=2000,expireAfterWrite=1h
cloud:
sentinel:
transport:
dashboard: 172.16.12.107:8080
port: 8719
feign: feign:
okhttp: okhttp:

@ -30,4 +30,4 @@ eureka:
register-with-eureka: true register-with-eureka: true
fetch-registry: true fetch-registry: true
service-url: service-url:
defaultZone: http://172.16.12.107:8761/eureka/ defaultZone: http://172.16.12.104:8761/eureka/

@ -22,6 +22,16 @@ public class ConsoleProperties {
*/ */
private String uploadPath; private String uploadPath;
/**
*
*/
private String wordFileName = "word.docx";
/**
* sdk
*/
private String sdkFileName = "sdk.rar";
/** /**
* *
@ -50,6 +60,22 @@ public class ConsoleProperties {
this.uploadPath = uploadPath; this.uploadPath = uploadPath;
} }
public String getWordFileName() {
return wordFileName;
}
public void setWordFileName(String wordFileName) {
this.wordFileName = wordFileName;
}
public String getSdkFileName() {
return sdkFileName;
}
public void setSdkFileName(String sdkFileName) {
this.sdkFileName = sdkFileName;
}
public String getDockerDataPath() { public String getDockerDataPath() {
return dockerDataPath; return dockerDataPath;
} }

@ -2,6 +2,7 @@ package com.jiuyv.sptccc.agile.portal.service.impl;
import com.github.pagehelper.Page; import com.github.pagehelper.Page;
import com.jiuyv.sptccc.agile.common.exception.ServiceException; import com.jiuyv.sptccc.agile.common.exception.ServiceException;
import com.jiuyv.sptccc.agile.framework.config.ConsoleProperties;
import com.jiuyv.sptccc.agile.portal.domain.TblPortalContent; import com.jiuyv.sptccc.agile.portal.domain.TblPortalContent;
import com.jiuyv.sptccc.agile.portal.mapper.PortalContentMapper; import com.jiuyv.sptccc.agile.portal.mapper.PortalContentMapper;
import com.jiuyv.sptccc.agile.portal.service.IFileService; import com.jiuyv.sptccc.agile.portal.service.IFileService;
@ -26,10 +27,15 @@ public class PortalContentServiceImpl implements IPortalContentService {
private final PortalContentMapper portalContentMapper; private final PortalContentMapper portalContentMapper;
private final IFileService fileService; private final IFileService fileService;
private final String wordFileName;
private final String sdkFileName;
public PortalContentServiceImpl(PortalContentMapper portalContentMapper, IFileService fileService) { public PortalContentServiceImpl(PortalContentMapper portalContentMapper, IFileService fileService,
ConsoleProperties consoleProperties) {
this.portalContentMapper = portalContentMapper; this.portalContentMapper = portalContentMapper;
this.fileService = fileService; this.fileService = fileService;
this.wordFileName = consoleProperties.getWordFileName();
this.sdkFileName = consoleProperties.getSdkFileName();
} }
/** /**
@ -69,12 +75,12 @@ public class PortalContentServiceImpl implements IPortalContentService {
@Override @Override
public void wordDownload(HttpServletResponse response) { public void wordDownload(HttpServletResponse response) {
fileService.downloadPublicFile("word.docx", response); fileService.downloadPublicFile(wordFileName, response);
} }
@Override @Override
public void sdkDownload(HttpServletResponse response) { public void sdkDownload(HttpServletResponse response) {
fileService.downloadPublicFile("sdk.rar", response); fileService.downloadPublicFile(sdkFileName, response);
} }
/** /**

@ -20,4 +20,4 @@ eureka:
register-with-eureka: true register-with-eureka: true
fetchRegistry: true fetchRegistry: true
service-url: service-url:
defaultZone: http://172.16.12.107:8761/eureka/ defaultZone: http://172.16.12.104:8761/eureka/

@ -299,7 +299,7 @@ public class CarInspectInfoServiceImpl implements CarInspectInfoService {
detailInfo.setCheckType(CarConstants.INSPECT_TYPE_01); detailInfo.setCheckType(CarConstants.INSPECT_TYPE_01);
bodyInspectData = tblCarInspectDetailInfoMapper.queryInspectDetailPage(detailInfo); bodyInspectData = tblCarInspectDetailInfoMapper.queryInspectDetailPage(detailInfo);
//查询车辆检查清单 底盘 //查询车辆检查清单 底盘
detailInfo.setCheckType(CarConstants.INSPECT_TYPE_00); detailInfo.setCheckType(CarConstants.INSPECT_TYPE_00);
chassisInspectData = tblCarInspectDetailInfoMapper.queryInspectDetailPage(detailInfo); chassisInspectData = tblCarInspectDetailInfoMapper.queryInspectDetailPage(detailInfo);

@ -0,0 +1,247 @@
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.3.RELEASE</version>
<relativePath />
</parent>
<groupId>com.jiuyv</groupId>
<artifactId>carcheck-appgate</artifactId>
<version>1.0.1-SNAPSHOT</version>
<name>carcheck-appgate</name>
<description>carcheck-appgate</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
<mybatis-spring-boot.version>2.2.2</mybatis-spring-boot.version>
<pagehelper.boot.version>1.4.1</pagehelper.boot.version>
<commons.io.version>2.11.0</commons.io.version>
<commons.fileupload.version>1.4</commons.fileupload.version>
<commons.collections.version>3.2.2</commons.collections.version>
<druid.version>1.2.11</druid.version>
</properties>
<distributionManagement>
<repository>
<id>nexus-releases</id>
<name>Internal Releases</name>
<url>http://172.16.12.11:8082/repository/maven-releases/</url>
</repository>
<snapshotRepository>
<id>nexus-snapshots</id>
<name>Internal Snapshots</name>
<url>http://172.16.12.11:8082/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>
<dependencies>
<!-- SpringBoot的依赖配置 -->
<!--<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.5.14</version>
<type>pom</type>
<scope>import</scope>
</dependency>-->
<!-- redis 缓存操作 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<!-- pool 对象池 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- 阿里数据库连接池 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>${druid.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- SpringBoot集成mybatis框架 -->
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>${mybatis-spring-boot.version}</version>
</dependency>
<!-- pagehelper 分页插件 -->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>${pagehelper.boot.version}</version>
</dependency>
<!-- 自定义验证注解 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.69</version>
</dependency>
<!-- io常用工具类 -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons.io.version}</version>
</dependency>
<!-- 文件上传工具类 -->
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>${commons.fileupload.version}</version>
</dependency>
<!-- collections工具类 -->
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>${commons.collections.version}</version>
</dependency>
<!--常用工具类 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
<!-- JSON工具类 -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<!-- json logstash encoder -->
<dependency>
<groupId>net.logstash.logback</groupId>
<artifactId>logstash-logback-encoder</artifactId>
<version>6.4</version>
</dependency>
<!-- https://mvnrepository.com/artifact/cn.hutool/hutool-all -->
<!-- <dependency>-->
<!-- <groupId>cn.hutool</groupId>-->
<!-- <artifactId>hutool-all</artifactId>-->
<!-- <version>5.8.20</version>-->
<!-- </dependency>-->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>28.1-jre</version>
</dependency>
<dependency>
<groupId>com.jiuyv</groupId>
<artifactId>smtools</artifactId>
<version>1.1.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp -->
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.10.0</version>
</dependency>
<dependency>
<groupId>eu.bitwalker</groupId>
<artifactId>UserAgentUtils</artifactId>
<version>1.21</version>
</dependency>
<dependency>
<groupId>com.alibaba.fastjson2</groupId>
<artifactId>fastjson2</artifactId>
<version>2.0.8</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<scm>
<connection>scm:svn:http://172.16.12.10/svn/carcheck/code/carcheck-appgate/trunk/</connection>
<developerConnection>scm:svn:http://172.16.12.10/svn/carcheck/code/carcheck-appgate/trunk/
</developerConnection>
</scm>
<repositories>
<repository>
<id>jiuyv</id>
<name>jiuyv</name>
<url>http://172.16.12.11:8082/repository/maven-public/</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>jiuyv</id>
<name>jiuyv Plugin Repository</name>
<url>http://172.16.12.11:8082/repository/maven-public/</url>
</pluginRepository>
<pluginRepository>
<id>central</id>
<name>Maven Plugin Repository</name>
<url>http://repo1.maven.org/maven2/</url>
</pluginRepository>
</pluginRepositories>
</project>

@ -0,0 +1,15 @@
package com.jiuyv.appgate;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;
@EnableScheduling
@SpringBootApplication
public class CarcheckAppgateApplication {
public static void main(String[] args) {
SpringApplication.run(CarcheckAppgateApplication.class, args);
}
}

@ -0,0 +1,152 @@
package com.jiuyv.appgate.api;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.jiuyv.appgate.common.AjaxResult;
import com.jiuyv.appgate.common.page.PageDomain;
import com.jiuyv.appgate.common.page.TableDataInfo;
import com.jiuyv.appgate.common.page.TableSupport;
import com.jiuyv.appgate.common.utils.CarcheckDateUtils;
import com.jiuyv.appgate.common.utils.CarcheckStringUtils;
import com.jiuyv.appgate.common.utils.PageUtils;
import com.jiuyv.appgate.common.utils.sql.SqlUtil;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;
import java.beans.PropertyEditorSupport;
import java.util.Date;
import java.util.List;
/**
* web
*
* @author admin
*/
public class BaseController
{
/**
* Date
*/
@InitBinder
public void initBinder(WebDataBinder binder)
{
// Date 类型转换
binder.registerCustomEditor(Date.class, new PropertyEditorSupport()
{
@Override
public void setAsText(String text)
{
setValue(CarcheckDateUtils.parseDate(text));
}
});
}
/**
*
*/
protected void startPage()
{
PageUtils.startPage();
}
/**
*
*/
protected void startOrderBy()
{
PageDomain pageDomain = TableSupport.buildPageRequest();
if (CarcheckStringUtils.isNotEmpty(pageDomain.getOrderBy()))
{
String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
PageHelper.orderBy(orderBy);
}
}
/**
* 线
*/
protected void clearPage()
{
PageUtils.clearPage();
}
/**
*
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
protected TableDataInfo getDataTable(List<?> list)
{
TableDataInfo rspData = new TableDataInfo();
rspData.setCode(HttpStatus.OK.value());
rspData.setMsg("查询成功");
rspData.setRows(list);
rspData.setTotal(new PageInfo(list).getTotal());
return rspData;
}
/**
*
*/
public AjaxResult success()
{
return AjaxResult.success();
}
/**
*
*/
public AjaxResult error()
{
return AjaxResult.error();
}
/**
*
*/
public AjaxResult success(String message)
{
return AjaxResult.success(message);
}
/**
*
*/
public AjaxResult error(String message)
{
return AjaxResult.error(message);
}
/**
*
*
* @param rows
* @return
*/
protected AjaxResult toAjax(int rows)
{
return rows > 0 ? AjaxResult.success() : AjaxResult.error();
}
/**
*
*
* @param result
* @return
*/
protected AjaxResult toAjax(boolean result)
{
return result ? success() : error();
}
/**
*
*/
public String redirect(String url)
{
return CarcheckStringUtils.format("redirect:{}", url);
}
}

@ -0,0 +1,47 @@
package com.jiuyv.appgate.api;
import com.jiuyv.appgate.common.AjaxResult;
import com.jiuyv.appgate.service.IFileService;
import com.jiuyv.appgate.vo.file.ReqFileDeleteVO;
import com.jiuyv.appgate.vo.file.ResFileUploadVO;
import org.springframework.beans.factory.annotation.Autowired;
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
@RestController
@RequestMapping("/app/img")
public class FileController {
@Autowired
private IFileService fileService;
/**
*
*
* @param file
* @return
*/
@PostMapping("/upload")
public AjaxResult fileUpload(@RequestParam("file") MultipartFile file,
@RequestParam("orderId") String orderId,
@RequestParam("carVin") String carVin) {
ResFileUploadVO result = fileService.fileUpload(file, orderId, carVin);
return AjaxResult.success(result);
}
/**
*
*
* @param req
* @return
*/
@PostMapping("/delete")
public AjaxResult fileDelete(@RequestBody ReqFileDeleteVO req) {
fileService.fileDelete(req);
return AjaxResult.success();
}
}

@ -0,0 +1,46 @@
package com.jiuyv.appgate.api;
import com.jiuyv.appgate.common.AjaxResult;
import com.jiuyv.appgate.common.page.TableDataInfo;
import com.jiuyv.appgate.service.IIndexService;
import com.jiuyv.appgate.vo.index.ReqOrderDetailVO;
import com.jiuyv.appgate.vo.index.ReqQueryOrderPageVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/app/index")
public class IndexController extends BaseController {
@Autowired
private IIndexService iIndexService;
/**
*
*/
@GetMapping("/queryOrderPage")
public TableDataInfo queryOrderPage(ReqQueryOrderPageVO req) {
TableDataInfo dataTable = iIndexService.queryOrderPageV2(req);
return dataTable;
}
/**
*
*/
@GetMapping("/queryOrderDetailPage")
public TableDataInfo queryOrderDetailPage(ReqOrderDetailVO req) {
TableDataInfo dataTable = iIndexService.queryOrderDetailPageV2(req);
return dataTable;
}
/**
*
*/
@GetMapping("/countOrderDetailPage")
public AjaxResult countOrderDetailPage(ReqOrderDetailVO req) {
AjaxResult result = iIndexService.countOrderDetailPage(req);
return result;
}
}

@ -0,0 +1,83 @@
package com.jiuyv.appgate.api;
import com.jiuyv.appgate.common.AjaxResult;
import com.jiuyv.appgate.common.annotation.Log;
import com.jiuyv.appgate.enums.BusinessType;
import com.jiuyv.appgate.enums.OperatorType;
import com.jiuyv.appgate.service.IInspectService;
import com.jiuyv.appgate.vo.inspect.ReqDeleteResultVO;
import com.jiuyv.appgate.vo.inspect.ReqQueryInspectListVO;
import com.jiuyv.appgate.vo.inspect.ReqQueryInspectParamVO;
import com.jiuyv.appgate.vo.inspect.ReqSaveResultVO;
import com.jiuyv.appgate.vo.inspect.ReqUpdateResultVO;
import com.jiuyv.appgate.vo.inspect.ReqViewResultVO;
import org.springframework.beans.factory.annotation.Autowired;
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;
@RestController
@RequestMapping("/app/inspect")
public class InspectController {
@Autowired
private IInspectService iInspectService;
/**
*
*/
@PostMapping("/queryInspectList")
public AjaxResult queryInspectList(@RequestBody ReqQueryInspectListVO req) {
AjaxResult result = iInspectService.queryInspectListV2(req);
return result;
}
/**
* NG
*/
@PostMapping("/queryInspectParam")
public AjaxResult queryInspectParam(@RequestBody ReqQueryInspectParamVO req) {
AjaxResult result = iInspectService.queryInspectParamV2(req);
return result;
}
/**
*
*/
@Log(title = "app端保存污染物记录", businessType = BusinessType.INSERT, operatorType = OperatorType.MOBILE)
@PostMapping("/saveResult")
public AjaxResult saveResult(@RequestBody ReqSaveResultVO req) {
AjaxResult result = iInspectService.saveResultV2(req);
return result;
}
/**
*
*/
@PostMapping("/viewResult")
public AjaxResult viewResult(@RequestBody ReqViewResultVO req) {
AjaxResult result = iInspectService.viewResultV2(req);
return result;
}
/**
*
*/
@Log(title = "app端修改污染物记录", businessType = BusinessType.UPDATE, operatorType = OperatorType.MOBILE)
@PostMapping("/updateResult")
public AjaxResult updateResult(@RequestBody ReqUpdateResultVO req) {
AjaxResult result = iInspectService.updateResultV2(req);
return result;
}
/**
*
*/
@Log(title = "app端删除污染物记录", businessType = BusinessType.DELETE, operatorType = OperatorType.MOBILE)
@PostMapping("/deleteResult")
public AjaxResult deleteResult(@RequestBody ReqDeleteResultVO req) {
AjaxResult result = iInspectService.deleteResultV2(req);
return result;
}
}

@ -0,0 +1,106 @@
package com.jiuyv.appgate.api;
import com.jiuyv.appgate.common.AjaxResult;
import com.jiuyv.appgate.common.annotation.Log;
import com.jiuyv.appgate.enums.BusinessType;
import com.jiuyv.appgate.enums.OperatorType;
import com.jiuyv.appgate.service.ILoginService;
import com.jiuyv.appgate.vo.login.ReqLoginVO;
import com.jiuyv.appgate.vo.login.ReqUpdatePwdVO;
import com.jiuyv.appgate.vo.login.ResGetLoginParamVO;
import com.jiuyv.appgate.vo.login.ResGetUserVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.Valid;
/**
* @author he_jiebing@jiuyv.com
* @create 2023-07-18 14:42
*/
@RestController
@RequestMapping("/app")
public class LoginController {
@Autowired
private ILoginService loginService;
/**
*
*
* @return
*/
@GetMapping("/queryLoginParam")
public AjaxResult getOrgList() {
ResGetLoginParamVO result = loginService.getOrgList();
return AjaxResult.success(result);
}
/**
*
*
* @param orgId
* @return
*/
@GetMapping("/querySiteList")
public AjaxResult getSiteList(@RequestParam("orgId") String orgId) {
ResGetLoginParamVO result = loginService.getSiteList(orgId);
return AjaxResult.success(result);
}
/**
*
*
* @param
* @return
*/
@PostMapping("/login")
public AjaxResult login(@RequestBody @Valid ReqLoginVO req) {
AjaxResult result = loginService.login(req);
return result;
}
/**
*
*
* @param
* @return
*/
@Log(title = "app端修改登录密码", businessType = BusinessType.UPDATE, operatorType = OperatorType.MOBILE)
@PostMapping("/updatePwd")
public AjaxResult updatePwd(@RequestBody @Valid ReqUpdatePwdVO req) {
loginService.updatePwd(req);
return AjaxResult.success();
}
/**
*
*
* @param
* @return
*/
@PostMapping("/logout")
public AjaxResult logout() {
loginService.logout();
return AjaxResult.success();
}
/**
*
*
* @param
* @return
*/
@GetMapping("/getUserInfo")
public AjaxResult getUserInfo() {
ResGetUserVO userInfo = loginService.getUserInfo();
return AjaxResult.success(userInfo);
}
}

@ -0,0 +1,33 @@
package com.jiuyv.appgate.api;
import com.jiuyv.appgate.service.IFileService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
/**
* @author he_jiebing@jiuyv.com
* @create 2023-08-21 17:29
*/
@Component
public class ScheduledTasks {
private static final Logger LOGGER = LoggerFactory.getLogger(ScheduledTasks.class);
@Autowired
private IFileService fileService;
@Value("${carcheck.app.task.cron}") // 从配置文件中读取定时任务的 cron 表达式
private String taskCron;
@Scheduled(cron = "${carcheck.app.task.cron}") // 使用配置文件中的 cron 表达式
//@Scheduled(cron = "0 0 3 * * ?") // 每天凌晨 3 点执行
public void performTask() {
// 在这里编写你要执行的任务逻辑
LOGGER.info(">>>>>>>>>>>>开始执行删除无用照片定时任务");
fileService.deleteUnUsedImgs();
LOGGER.info(">>>>>>>>>>>>结束执行删除无用照片定时任务");
}
}

@ -0,0 +1,85 @@
package com.jiuyv.appgate.aspect;
/**
* @Author
* @Create 2023-06-01 15:28
* @Version 1.0
*/
import com.jiuyv.appgate.common.utils.JsonUtil;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
/**
* @author YuWenJing
* @Title: LogAspect
* @date 2019-03-27 17:06
*/
@Aspect
@Component
public class AppLogAspect {
@Pointcut("(execution(public * com.jiuyv.appgate.api.*Controller.*(..)))")
public void controllerReqResAspect() {
// 切点
}
// 不能使用before,会出现数据无法脱敏
@Around(value = "controllerReqResAspect()")
public Object printReq(ProceedingJoinPoint proceedingJoinPoint) throws Throwable {
Object[] args = proceedingJoinPoint.getArgs();
String name = proceedingJoinPoint.getSignature().getName();
if ("fileUpload".equals(name) || "initBinder".equals(name)) {
Object returnValue = proceedingJoinPoint.proceed(); // 执行连接点方法object方法返回值
return returnValue;
}
if (args.length > 0) {
LoggerFactory.getLogger(proceedingJoinPoint.getTarget().getClass()).info("method:{},req:{}",
proceedingJoinPoint.getSignature().getName(), JsonUtil.toJSONString(proceedingJoinPoint.getArgs()[0]));
} else {
LoggerFactory.getLogger(proceedingJoinPoint.getTarget().getClass()).info("method:{},req:{}",
proceedingJoinPoint.getSignature().getName());
}
Object returnValue = proceedingJoinPoint.proceed(); // 执行连接点方法object方法返回值
return returnValue;
}
@AfterReturning(value = "controllerReqResAspect()", returning = "res")
public void printRes(JoinPoint joinPoint, Object res) {
String name = joinPoint.getSignature().getName();
if ("orgList".equals(name) || "lockOrg".equals(name)) {
return;
}
// 过滤指定接口,不打印消息体
LoggerFactory.getLogger(joinPoint.getTarget().getClass()).info("method:{},res:{}",
joinPoint.getSignature().getName(), JsonUtil.toJSONString(res));
}
@AfterThrowing(pointcut = "controllerReqResAspect()", throwing = "e") // 切点在webpointCut()
public void handleThrowing(JoinPoint joinPoint, Exception e) {// controller类抛出的异常在这边捕获
Object[] args = joinPoint.getArgs();
if (args.length > 0) {
LoggerFactory.getLogger(joinPoint.getTarget().getClass()).info("method:{},res:{}",
joinPoint.getSignature().getName(), JsonUtil.toJSONString(joinPoint.getArgs()[0]));
} else {
LoggerFactory.getLogger(joinPoint.getTarget().getClass()).info("method:{},res:{}",
joinPoint.getSignature().getName());
}
}
}

@ -0,0 +1,184 @@
package com.jiuyv.appgate.aspect;
import com.alibaba.fastjson2.JSON;
import com.jiuyv.appgate.common.annotation.Log;
import com.jiuyv.appgate.common.utils.CarcheckStringUtils;
import com.jiuyv.appgate.common.utils.ServletUtils;
import com.jiuyv.appgate.common.utils.ip.IpUtils;
import com.jiuyv.appgate.domain.SysOperLog;
import com.jiuyv.appgate.dto.RedisUserDTO;
import com.jiuyv.appgate.enums.BusinessStatus;
import com.jiuyv.appgate.interceptor.LoginInterceptor;
import com.jiuyv.appgate.thread.AsyncManager;
import com.jiuyv.appgate.thread.factory.AsyncFactory;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.http.HttpMethod;
import org.springframework.stereotype.Component;
import org.springframework.validation.BindingResult;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.HandlerMapping;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Collection;
import java.util.Map;
/**
*
*
* @author admin
*/
@Aspect
@Component
public class LogAspect {
/**
*
*
* @param joinPoint
*/
@AfterReturning(pointcut = "@annotation(controllerLog)", returning = "jsonResult")
public void doAfterReturning(JoinPoint joinPoint, Log controllerLog, Object jsonResult) {
handleLog(joinPoint, controllerLog, null, jsonResult);
}
/**
*
*
* @param joinPoint
* @param e
*/
@AfterThrowing(value = "@annotation(controllerLog)", throwing = "e")
public void doAfterThrowing(JoinPoint joinPoint, Log controllerLog, Exception e) {
handleLog(joinPoint, controllerLog, e, null);
}
protected void handleLog(final JoinPoint joinPoint, Log controllerLog, final Exception e, Object jsonResult) {
// 获取当前的用户
// LoginUser loginUser = SecurityUtils.getLoginUser();
RedisUserDTO loginUser = LoginInterceptor.threadLocalOuter.get();
// *========数据库日志=========*//
SysOperLog operLog = new SysOperLog();
operLog.setStatus(BusinessStatus.SUCCESS.ordinal());
// 请求的地址
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
operLog.setOperIp(ip);
operLog.setOperUrl(ServletUtils.getRequest().getRequestURI());
if (loginUser != null) {
operLog.setOperName(loginUser.getUsername());
}
if (e != null) {
operLog.setStatus(BusinessStatus.FAIL.ordinal());
operLog.setErrorMsg(CarcheckStringUtils.substring(e.getMessage(), 0, 2000));
}
// 设置方法名称
String className = joinPoint.getTarget().getClass().getName();
String methodName = joinPoint.getSignature().getName();
operLog.setMethod(className + "." + methodName + "()");
// 设置请求方式
operLog.setRequestMethod(ServletUtils.getRequest().getMethod());
// 处理设置注解上的参数
getControllerMethodDescription(joinPoint, controllerLog, operLog, jsonResult);
// 保存数据库
AsyncManager.me().execute(AsyncFactory.recordOper(operLog));
}
/**
* Controller
*
* @param log
* @param operLog
* @throws Exception
*/
public void getControllerMethodDescription(JoinPoint joinPoint, Log log, SysOperLog operLog, Object jsonResult) {
// 设置action动作
operLog.setBusinessType(log.businessType().ordinal());
// 设置标题
operLog.setTitle(log.title());
// 设置操作人类别
operLog.setOperatorType(log.operatorType().ordinal());
// 是否需要保存request参数和值
if (log.isSaveRequestData()) {
// 获取参数的信息,传入到数据库中。
setRequestValue(joinPoint, operLog);
}
// 是否需要保存response参数和值
if (log.isSaveResponseData() && CarcheckStringUtils.isNotNull(jsonResult)) {
operLog.setJsonResult(CarcheckStringUtils.substring(JSON.toJSONString(jsonResult), 0, 2000));
}
}
/**
* log
*
* @param operLog
* @throws Exception
*/
private void setRequestValue(JoinPoint joinPoint, SysOperLog operLog) {
String requestMethod = operLog.getRequestMethod();
if (HttpMethod.PUT.name().equals(requestMethod) || HttpMethod.POST.name().equals(requestMethod)) {
String params = argsArrayToString(joinPoint.getArgs());
operLog.setOperParam(CarcheckStringUtils.substring(params, 0, 2000));
} else {
Map<?, ?> paramsMap = (Map<?, ?>) ServletUtils.getRequest().getAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE);
operLog.setOperParam(CarcheckStringUtils.substring(paramsMap.toString(), 0, 2000));
}
}
/**
*
*/
private String argsArrayToString(Object[] paramsArray) {
StringBuilder params = new StringBuilder();
if (paramsArray != null && paramsArray.length > 0) {
for (Object o : paramsArray) {
if (CarcheckStringUtils.isNotNull(o) && !isFilterObject(o)) {
Object jsonObj = JSON.toJSON(o);
params.append(jsonObj.toString()).append(" ");
}
}
}
return params.toString().trim();
}
/**
*
*
* @param o
* @return truefalse
*/
@SuppressWarnings("rawtypes")
public boolean isFilterObject(final Object o) {
Class<?> clazz = o.getClass();
if (clazz.isArray()) {
return clazz.getComponentType().isAssignableFrom(MultipartFile.class);
}
if (Collection.class.isAssignableFrom(clazz)) {
Collection collection = (Collection) o;
for (Object value : collection) {
if (value instanceof MultipartFile) {
return true;
}
}
return false;
}
if (Map.class.isAssignableFrom(clazz)) {
Map map = (Map) o;
for (Object value : map.entrySet()) {
Map.Entry entry = (Map.Entry) value;
if (entry.getValue() instanceof MultipartFile) {
return true;
}
}
return false;
}
return o instanceof MultipartFile || o instanceof HttpServletRequest || o instanceof HttpServletResponse
|| o instanceof BindingResult;
}
}

@ -0,0 +1,216 @@
package com.jiuyv.appgate.common;
import com.jiuyv.appgate.common.utils.CarcheckStringUtils;
import com.jiuyv.appgate.common.utils.JsonUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.HashMap;
/**
*
*
* @author admin
*/
public class AjaxResult extends HashMap<String, Object> {
private static final Logger LOGGER = LoggerFactory.getLogger(AjaxResult.class);
private static final long serialVersionUID = 1L;
/**
*
*/
public static final String CODE_TAG = "code";
/**
*
*/
public static final String MSG_TAG = "msg";
/**
*
*/
public static final String DATA_TAG = "data";
/**
* AjaxResult 使
*/
public AjaxResult() {
}
/**
* AjaxResult
*
* @param code
* @param msg
*/
public AjaxResult(int code, String msg) {
super.put(CODE_TAG, code);
super.put(MSG_TAG, msg);
}
/**
* AjaxResult
*
* @param code
* @param msg
* @param data
*/
public AjaxResult(int code, String msg, Object data) {
super.put(CODE_TAG, code);
super.put(MSG_TAG, msg);
if (CarcheckStringUtils.isNotNull(data)) {
super.put(DATA_TAG, data);
}
}
/**
*
*
* @return
*/
public static AjaxResult success() {
return AjaxResult.success("操作成功");
}
/**
*
*
* @return
*/
public static AjaxResult success(Object data) {
return AjaxResult.success("操作成功", data);
}
/**
*
*
* @param msg
* @return
*/
public static AjaxResult success(String msg) {
return AjaxResult.success(msg, null);
}
/**
*
*
* @param msg
* @param data
* @return
*/
public static AjaxResult success(String msg, Object data) {
return new AjaxResult(HttpStatus.OK.value(), msg, data);
}
/**
* HttpServletResponse success
*
*/
public static void success(HttpServletResponse response, String message) throws IOException {
responseResult(response, success(message));
}
/**
* HttpServletResponse success
*
*/
public static void success(HttpServletResponse response) throws IOException {
responseResult(response, success());
}
/**
*
*
* @return
*/
public static AjaxResult error() {
return AjaxResult.error("操作失败");
}
/**
*
*
* @param msg
* @return
*/
public static AjaxResult error(String msg) {
return AjaxResult.error(msg, null);
}
/**
*
*
* @param msg
* @param data
* @return
*/
public static AjaxResult error(String msg, Object data) {
LOGGER.error("服务报错:{}", msg);
if (msg.contains("Exception")) {
return new AjaxResult(HttpStatus.INTERNAL_SERVER_ERROR.value(), "系统内部错误", data);
}
if (msg.contains("script")) {
return new AjaxResult(HttpStatus.INTERNAL_SERVER_ERROR.value(), "系统参数错误", data);
}
return new AjaxResult(HttpStatus.INTERNAL_SERVER_ERROR.value(), msg, data);
}
/**
*
*
* @param code
* @param msg
* @return
*/
public static AjaxResult error(int code, String msg) {
return new AjaxResult(code, msg, null);
}
/**
* HttpServletResponse error
*
*/
public static void error(HttpServletResponse response, String message) throws IOException {
responseResult(response, error(message));
}
/**
* HttpServletResponse error
*
*/
public static void error(HttpServletResponse response, int code, String msg) throws IOException {
responseResult(response, error(code, msg));
}
/**
* HttpServletResponse
*
*/
public static void responseResult(HttpServletResponse response, AjaxResult result) throws IOException {
response.setContentType("application/json;charset=utf-8");
String responseJson = JsonUtil.toJSONString(result);
response.getWriter().print(responseJson);
}
/**
* 便
*
* @param key
* @param value
* @return
*/
@Override
public AjaxResult put(String key, Object value) {
super.put(key, value);
return this;
}
}

@ -0,0 +1,159 @@
package com.jiuyv.appgate.common;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
/**
*
*
* @author admin
*/
@Component
@ConfigurationProperties(prefix = "carcheck")
public class CarcheckConfig {
/**
*
*/
private String name;
/**
*
*/
private String version;
/**
*
*/
private String copyrightYear;
/**
*
*/
private boolean demoEnabled;
/**
*
*/
private static String profile;
/**
*
*/
private static boolean addressEnabled;
/**
*
*/
private static String captchaType;
// db存储密钥
private static String dbEncryptKey;
public static String getDbEncryptKey() {
return dbEncryptKey;
}
public void setDbEncryptKey(String dbEncryptKey) {
setDbEncryptKey2(dbEncryptKey);
}
public static void setDbEncryptKey2(String dbEncryptKey) {
CarcheckConfig.dbEncryptKey = dbEncryptKey;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getCopyrightYear() {
return copyrightYear;
}
public void setCopyrightYear(String copyrightYear) {
this.copyrightYear = copyrightYear;
}
public boolean isDemoEnabled() {
return demoEnabled;
}
public void setDemoEnabled(boolean demoEnabled) {
this.demoEnabled = demoEnabled;
}
public static String getProfile() {
return profile;
}
public void setProfile(String profile) {
setProfile2(profile);
}
private static void setProfile2(String profile) {
CarcheckConfig.profile = profile;
}
public static boolean isAddressEnabled() {
return addressEnabled;
}
public void setAddressEnabled(boolean addressEnabled) {
setAddressEnabled2(addressEnabled);
}
private static void setAddressEnabled2(boolean addressEnabled) {
CarcheckConfig.addressEnabled = addressEnabled;
}
public static String getCaptchaType() {
return captchaType;
}
public void setCaptchaType(String captchaType) {
setCaptchaType2(captchaType);
}
private static void setCaptchaType2(String captchaType) {
CarcheckConfig.captchaType = captchaType;
}
/**
*
*/
public static String getImportPath() {
return getProfile() + "/import";
}
/**
*
*/
public static String getAvatarPath() {
return getProfile() + "/avatar";
}
/**
*
*/
public static String getDownloadPath() {
return getProfile() + "/download/";
}
/**
*
*/
public static String getUploadPath() {
return getProfile() + "/upload";
}
}

@ -0,0 +1,47 @@
package com.jiuyv.appgate.common.annotation;
import com.jiuyv.appgate.enums.BusinessType;
import com.jiuyv.appgate.enums.OperatorType;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
*
*
* @author admin
*/
@Target({ElementType.PARAMETER, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Log
{
/**
*
*/
public String title() default "";
/**
*
*/
public BusinessType businessType() default BusinessType.OTHER;
/**
*
*/
public OperatorType operatorType() default OperatorType.MANAGE;
/**
*
*/
public boolean isSaveRequestData() default true;
/**
*
*/
public boolean isSaveResponseData() default true;
}

@ -0,0 +1,173 @@
package com.jiuyv.appgate.common.constant;
/**
*
*
* @author admin
*/
public final class Constants {
private Constants() {
}
/**
* UTF-8
*/
public static final String UTF8 = "UTF-8";
/**
* GBK
*/
public static final String GBK = "GBK";
/**
* http
*/
public static final String HTTP = "http://";
/**
* https
*/
public static final String HTTPS = "https://";
/**
*
*/
public static final String SUCCESS = "0";
/**
*
*/
public static final String FAIL = "1";
/**
*
*/
public static final String LOGIN_SUCCESS = "Success";
/**
*
*/
public static final String LOGOUT = "Logout";
/**
*
*/
public static final String REGISTER = "Register";
/**
*
*/
public static final String LOGIN_FAIL = "Error";
/**
*
*/
public static final Integer CAPTCHA_EXPIRATION = 2;
/**
*
*/
public static final String TOKEN = "token";
/**
*
*/
public static final String TOKEN_PREFIX = "Bearer ";
/**
*
*/
public static final String LOGIN_USER_KEY = "login_user_key";
/**
* ID
*/
public static final String JWT_USERID = "userid";
/**
*
*/
public static final String JWT_AVATAR = "avatar";
/**
*
*/
public static final String JWT_CREATED = "created";
/**
*
*/
public static final String JWT_AUTHORITIES = "authorities";
/**
*
*/
public static final String RESOURCE_PREFIX = "/profile";
/**
* RMI
*/
public static final String LOOKUP_RMI = "rmi:";
/**
* LDAP
*/
public static final String LOOKUP_LDAP = "ldap:";
/**
* LDAPS
*/
public static final String LOOKUP_LDAPS = "ldaps:";
/**
*
*/
public static final int PASSWORD_ERROR_MAX_COUNT = 5;
/**
*
*/
public static final String LOGIN_USER_CACHE_PREFIX = "app:user:";
/**
* token
*/
public static final int TOKEN_EXPIRE_MINIUTE = 60 * 24;
/**
* header token value
*/
public static final String HEADER_TOKEN = "appToken";
/**
* header token value
*/
public static final String HEADER_FINGERPRINT = "fingerprint";
/**
* ng
*/
public static final String NG_PART_CACHE_PREFIX = "ngPart:";
/**
*
*/
public static final String POLLUTANT_CACHE_PREFIX = "pollutant";
/**
*
*/
public static final String IMG_TYPE = "jpg,jpeg,png,bmp";
/**
* 10M
*/
public static final long APP_IMG_MAX_SIZE = 1024 * 1024 * 10L;
/**
*
*/
public static final int INIT_VERSION = 1;
}

@ -0,0 +1,144 @@
package com.jiuyv.appgate.common.exception;
import com.jiuyv.appgate.common.AjaxResult;
import com.jiuyv.appgate.common.utils.CarcheckStringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.validation.BindException;
import org.springframework.web.HttpRequestMethodNotSupportedException;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Objects;
/**
*
*
* @author admin
*/
@RestControllerAdvice
public class GlobalExceptionHandler
{
private static final Logger LOGGER = LoggerFactory.getLogger(GlobalExceptionHandler.class);
/**
*
* token
* @param e
* @param request
* @param response
* @return
*/
@ExceptionHandler(TokenException.class)
public AjaxResult handleTokenException(TokenException e, HttpServletRequest request, HttpServletResponse response)
{
//response.setStatus(HttpStatus.MOVED_PERMANENTLY.value());
LOGGER.error(e.getMessage(), e);
Integer code = e.getCode();
return AjaxResult.error(HttpStatus.FORBIDDEN.value(), e.getMessage());
//return CarcheckStringUtils.isNotNull(code) ? AjaxResult.error(code, e.getMessage()) : AjaxResult.error(e.getMessage());
}
@ExceptionHandler(SqlInjectException.class)
public AjaxResult handleSqlInjectException(SqlInjectException e, HttpServletRequest request, HttpServletResponse response)
{
response.setStatus(HttpStatus.MOVED_PERMANENTLY.value());
LOGGER.error(e.getMessage(), e);
Integer code = e.getCode();
return AjaxResult.error(HttpStatus.FORBIDDEN.value(), e.getMessage());
//return CarcheckStringUtils.isNotNull(code) ? AjaxResult.error(code, e.getMessage()) : AjaxResult.error(e.getMessage());
}
/**
*
*/
@ExceptionHandler(HttpRequestMethodNotSupportedException.class)
public AjaxResult handleHttpRequestMethodNotSupported(HttpRequestMethodNotSupportedException e,
HttpServletRequest request, HttpServletResponse response)
{
//response.setStatus(HttpStatus.MOVED_PERMANENTLY.value());
String requestURI = request.getRequestURI();
LOGGER.error("请求地址'{}',不支持'{}'请求", requestURI, e.getMethod());
return AjaxResult.error(e.getMessage());
}
/**
*
*/
@ExceptionHandler(ServiceException.class)
public AjaxResult handleServiceException(ServiceException e, HttpServletRequest request, HttpServletResponse response)
{
LOGGER.error(e.getMessage(), e);
Integer code = e.getCode();
return CarcheckStringUtils.isNotNull(code) ? AjaxResult.error(code, e.getMessage()) : AjaxResult.error(e.getMessage());
}
/**
*
*/
@ExceptionHandler(RuntimeException.class)
public AjaxResult handleRuntimeException(RuntimeException e, HttpServletRequest request, HttpServletResponse response)
{
String requestURI = request.getRequestURI();
LOGGER.error("请求地址'{}',发生未知异常.", requestURI, e);
return AjaxResult.error(e.getMessage());
}
/**
*
*/
@ExceptionHandler(Exception.class)
public AjaxResult handleException(Exception e, HttpServletRequest request, HttpServletResponse response)
{
//response.setStatus(HttpStatus.MOVED_PERMANENTLY.value());
String requestURI = request.getRequestURI();
LOGGER.error("请求地址'{}',发生系统异常.", requestURI, e);
return AjaxResult.error(e.getMessage());
}
/**
*
*/
@ExceptionHandler(BindException.class)
public AjaxResult handleBindException(BindException e)
{
LOGGER.error(e.getMessage(), e);
String message = e.getAllErrors().get(0).getDefaultMessage();
return AjaxResult.error(message);
}
/**
*
*/
@ExceptionHandler(MethodArgumentNotValidException.class)
public Object handleMethodArgumentNotValidException(MethodArgumentNotValidException e)
{
LOGGER.error(e.getMessage(), e);
String message = Objects.requireNonNull(e.getBindingResult().getFieldError()).getDefaultMessage();
return AjaxResult.error(message);
}
}

@ -0,0 +1,73 @@
package com.jiuyv.appgate.common.exception;
/**
*
*
* @author admin
*/
public final class ServiceException extends RuntimeException
{
private static final long serialVersionUID = 1L;
/**
*
*/
private Integer code;
/**
*
*/
private String message;
/**
*
*
* {@link CommonResult#getDetailMessage()}
*/
private String detailMessage;
/**
*
*/
public ServiceException()
{
}
public ServiceException(String message)
{
this.message = message;
}
public ServiceException(String message, Integer code)
{
this.message = message;
this.code = code;
}
public String getDetailMessage()
{
return detailMessage;
}
public String getMessage()
{
return message;
}
public Integer getCode()
{
return code;
}
public ServiceException setMessage(String message)
{
this.message = message;
return this;
}
public ServiceException setDetailMessage(String detailMessage)
{
this.detailMessage = detailMessage;
return this;
}
}

@ -0,0 +1,73 @@
package com.jiuyv.appgate.common.exception;
/**
*
*
* @author admin
*/
public final class SqlInjectException extends RuntimeException
{
private static final long serialVersionUID = 1L;
/**
*
*/
private Integer code;
/**
*
*/
private String message;
/**
*
*
* {@link CommonResult#getDetailMessage()}
*/
private String detailMessage;
/**
*
*/
public SqlInjectException()
{
}
public SqlInjectException(String message)
{
this.message = message;
}
public SqlInjectException(String message, Integer code)
{
this.message = message;
this.code = code;
}
public String getDetailMessage()
{
return detailMessage;
}
public String getMessage()
{
return message;
}
public Integer getCode()
{
return code;
}
public SqlInjectException setMessage(String message)
{
this.message = message;
return this;
}
public SqlInjectException setDetailMessage(String detailMessage)
{
this.detailMessage = detailMessage;
return this;
}
}

@ -0,0 +1,73 @@
package com.jiuyv.appgate.common.exception;
/**
*
*
* @author admin
*/
public final class TokenException extends RuntimeException
{
private static final long serialVersionUID = 1L;
/**
*
*/
private Integer code;
/**
*
*/
private String message;
/**
*
*
* {@link CommonResult#getDetailMessage()}
*/
private String detailMessage;
/**
*
*/
public TokenException()
{
}
public TokenException(String message)
{
this.message = message;
}
public TokenException(String message, Integer code)
{
this.message = message;
this.code = code;
}
public String getDetailMessage()
{
return detailMessage;
}
public String getMessage()
{
return message;
}
public Integer getCode()
{
return code;
}
public TokenException setMessage(String message)
{
this.message = message;
return this;
}
public TokenException setDetailMessage(String detailMessage)
{
this.detailMessage = detailMessage;
return this;
}
}

@ -0,0 +1,26 @@
package com.jiuyv.appgate.common.exception;
/**
*
*
* @author admin
*/
public class UtilException extends RuntimeException
{
private static final long serialVersionUID = 8247610319171014183L;
public UtilException(Throwable e)
{
super(e.getMessage(), e);
}
public UtilException(String message)
{
super(message);
}
public UtilException(String message, Throwable throwable)
{
super(message, throwable);
}
}

@ -0,0 +1,104 @@
package com.jiuyv.appgate.common.page;
import com.jiuyv.appgate.common.utils.CarcheckStringUtils;
/**
*
*
* @author admin
*/
public class PageDomain
{
/** 当前记录起始索引 */
private Integer pageNum;
/** 每页显示记录数 */
private Integer pageSize;
/** 排序列 */
private String orderByColumn;
/** 排序的方向desc或者asc */
private String isAsc = "asc";
/** 分页参数合理化 */
private Boolean reasonable = true;
//public PageDomain() {}
public String getOrderBy()
{
if (CarcheckStringUtils.isEmpty(orderByColumn))
{
return "";
}
return CarcheckStringUtils.toUnderScoreCase(orderByColumn) + " " + isAsc;
}
public Integer getPageNum()
{
return pageNum;
}
public void setPageNum(Integer pageNum)
{
this.pageNum = pageNum;
}
public Integer getPageSize()
{
return pageSize;
}
public void setPageSize(Integer pageSize)
{
this.pageSize = pageSize;
}
public String getOrderByColumn()
{
return orderByColumn;
}
public void setOrderByColumn(String orderByColumn)
{
this.orderByColumn = orderByColumn;
}
public String getIsAsc()
{
return isAsc;
}
public void setIsAsc(String isAsc)
{
if (CarcheckStringUtils.isNotEmpty(isAsc))
{
// 兼容前端排序类型
if ("ascending".equals(isAsc))
{
isAsc = "asc";
}
if ("descending".equals(isAsc))
{
isAsc = "desc";
}
this.isAsc = isAsc;
}
}
public Boolean getReasonable()
{
if (CarcheckStringUtils.isNull(reasonable))
{
return Boolean.TRUE;
}
return reasonable;
}
public void setReasonable(Boolean reasonable)
{
this.reasonable = reasonable;
}
}

@ -0,0 +1,85 @@
package com.jiuyv.appgate.common.page;
import java.io.Serializable;
import java.util.List;
/**
*
*
* @author admin
*/
public class TableDataInfo<T> implements Serializable
{
private static final long serialVersionUID = 1L;
/** 总记录数 */
private long total;
/** 列表数据 */
private List<T> rows;
/** 消息状态码 */
private int code;
/** 消息内容 */
private String msg;
/**
*
*/
public TableDataInfo()
{
}
/**
*
*
* @param list
* @param total
*/
public TableDataInfo(List<T> list, int total)
{
this.rows = list;
this.total = total;
}
public long getTotal()
{
return total;
}
public void setTotal(long total)
{
this.total = total;
}
public List<T> getRows()
{
return rows;
}
public void setRows(List<T> rows)
{
this.rows = rows;
}
public int getCode()
{
return code;
}
public void setCode(int code)
{
this.code = code;
}
public String getMsg()
{
return msg;
}
public void setMsg(String msg)
{
this.msg = msg;
}
}

@ -0,0 +1,59 @@
package com.jiuyv.appgate.common.page;
import com.jiuyv.appgate.common.text.Convert;
import com.jiuyv.appgate.common.utils.ServletUtils;
/**
*
*
* @author admin
*/
public final class TableSupport
{
/**
*
*/
public static final String PAGE_NUM = "pageNum";
/**
*
*/
public static final String PAGE_SIZE = "pageSize";
/**
*
*/
public static final String ORDER_BY_COLUMN = "orderByColumn";
/**
* "desc" "asc".
*/
public static final String IS_ASC = "isAsc";
/**
*
*/
public static final String REASONABLE = "reasonable";
private TableSupport() {}
/**
*
*/
public static PageDomain getPageDomain()
{
PageDomain pageDomain = new PageDomain();
pageDomain.setPageNum(Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1));
pageDomain.setPageSize(Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10));
pageDomain.setOrderByColumn(ServletUtils.getParameter(ORDER_BY_COLUMN));
pageDomain.setIsAsc(ServletUtils.getParameter(IS_ASC));
pageDomain.setReasonable(ServletUtils.getParameterToBool(REASONABLE));
return pageDomain;
}
public static PageDomain buildPageRequest()
{
return getPageDomain();
}
}

@ -0,0 +1,91 @@
package com.jiuyv.appgate.common.text;
import com.jiuyv.appgate.common.utils.CarcheckStringUtils;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
/**
*
*
* @author admin
*/
public final class CharsetKit
{
/** ISO-8859-1 */
public static final String ISO_8859_1 = "ISO-8859-1";
/** UTF-8 */
public static final String UTF_8 = "UTF-8";
/** GBK */
public static final String GBK = "GBK";
/** ISO-8859-1 */
public static final Charset CHARSET_ISO_8859_1 = Charset.forName(ISO_8859_1);
/** UTF-8 */
public static final Charset CHARSET_UTF_8 = Charset.forName(UTF_8);
/** GBK */
public static final Charset CHARSET_GBK = Charset.forName(GBK);
private CharsetKit() {}
/**
* Charset
*
* @param charset
* @return Charset
*/
public static Charset charset(String charset)
{
return CarcheckStringUtils.isEmpty(charset) ? Charset.defaultCharset() : Charset.forName(charset);
}
/**
*
*
* @param source
* @param srcCharset ISO-8859-1
* @param destCharset UTF-8
* @return
*/
public static String convert(String source, String srcCharset, String destCharset)
{
return convert(source, Charset.forName(srcCharset), Charset.forName(destCharset));
}
/**
*
*
* @param source
* @param srcCharset ISO-8859-1
* @param destCharset UTF-8
* @return
*/
public static String convert(String source, Charset srcCharset, Charset destCharset)
{
if (null == srcCharset)
{
srcCharset = StandardCharsets.ISO_8859_1;
}
if (null == destCharset)
{
destCharset = StandardCharsets.UTF_8;
}
if (CarcheckStringUtils.isEmpty(source) || srcCharset.equals(destCharset))
{
return source;
}
return new String(source.getBytes(srcCharset), destCharset);
}
/**
* @return
*/
public static String systemCharset()
{
return Charset.defaultCharset().name();
}
}

@ -0,0 +1,96 @@
package com.jiuyv.appgate.common.text;
import com.jiuyv.appgate.common.utils.CarcheckStringUtils;
/**
*
*
* @author admin
*/
public final class StrFormatter
{
public static final String EMPTY_JSON = "{}";
public static final char C_BACKSLASH = '\\';
public static final char C_DELIM_START = '{';
public static final char C_DELIM_END = '}';
private StrFormatter() {}
/**
* <br>
* {} <br>
* {} 使 \\ { {} \ 使 \\\\ <br>
* <br>
* 使format("this is {} for {}", "a", "b") -> this is a for b<br>
* {} format("this is \\{} for {}", "a", "b") -> this is \{} for a<br>
* \ format("this is \\\\{} for {}", "a", "b") -> this is \a for b<br>
*
* @param strPattern
* @param argArray
* @return
*/
public static String format(final String strPattern, final Object... argArray)
{
if (CarcheckStringUtils.isEmpty(strPattern) || CarcheckStringUtils.isEmpty(argArray))
{
return strPattern;
}
final int strPatternLength = strPattern.length();
// 初始化定义好的长度以获得更好的性能
StringBuilder sbuf = new StringBuilder(strPatternLength + 50);
int handledPosition = 0;
int delimIndex;// 占位符所在位置
int argIndex = 0;
while (argIndex < argArray.length) {
delimIndex = strPattern.indexOf(EMPTY_JSON, handledPosition);
if (delimIndex == -1)
{
if (handledPosition == 0)
{
return strPattern;
}
else
{ // 字符串模板剩余部分不再包含占位符,加入剩余部分后返回结果
sbuf.append(strPattern, handledPosition, strPatternLength);
return sbuf.toString();
}
}
else
{
if (delimIndex > 0 && strPattern.charAt(delimIndex - 1) == C_BACKSLASH)
{
if (delimIndex > 1 && strPattern.charAt(delimIndex - 2) == C_BACKSLASH)
{
// 转义符之前还有一个转义符,占位符依旧有效
sbuf.append(strPattern, handledPosition, delimIndex - 1);
sbuf.append(Convert.utf8Str(argArray[argIndex]));
handledPosition = delimIndex + 2;
}
else
{
// 占位符被转义
argIndex--;
sbuf.append(strPattern, handledPosition, delimIndex - 1);
sbuf.append(C_DELIM_START);
handledPosition = delimIndex + 1;
}
}
else
{
// 正常占位符
sbuf.append(strPattern, handledPosition, delimIndex);
sbuf.append(Convert.utf8Str(argArray[argIndex]));
handledPosition = delimIndex + 2;
}
}
argIndex++;
}
// 加入最后一个占位符后所有的字符
sbuf.append(strPattern, handledPosition, strPattern.length());
return sbuf.toString();
}
}

@ -0,0 +1,193 @@
package com.jiuyv.appgate.common.utils;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils;
import java.lang.management.ManagementFactory;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.ZoneId;
import java.time.ZoneOffset;
import java.time.ZonedDateTime;
import java.util.Date;
/**
*
*
* @author admin
*/
public class CarcheckDateUtils extends DateUtils
{
public static final String YYYY = "yyyy";
public static final String YYYY_MM = "yyyy-MM";
public static final String YYYY_MM_DD = "yyyy-MM-dd";
public static final String YYYYMMDDHHMMSS = "yyyyMMddHHmmss";
public static final String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss";
// private static final String[] parsePatterns = {
// "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM",
// "yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM",
// "yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm", "yyyy.MM"};
private static final String[] parsePatterns = {
YYYY_MM_DD, YYYY_MM_DD_HH_MM_SS, "yyyy-MM-dd HH:mm", YYYY_MM,
"yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM",
"yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm", "yyyy.MM"};
/**
* Date
*
* @return Date()
*/
public static Date getNowDate()
{
return Date.from(LocalDateTime.now().atZone(ZoneId.systemDefault()).toInstant());
}
/**
* , yyyy-MM-dd
*
* @return String
*/
public static String getDate()
{
return dateTimeNow(YYYY_MM_DD);
}
public static final String getTime()
{
return dateTimeNow(YYYY_MM_DD_HH_MM_SS);
}
public static final String dateTimeNow()
{
return dateTimeNow(YYYYMMDDHHMMSS);
}
public static final String dateTimeNow(final String format)
{
return parseDateToStr(format, getNowDate());
}
public static final String dateTime(final Date date)
{
return parseDateToStr(YYYY_MM_DD, date);
}
public static final String parseDateToStr(final String format, final Date date)
{
return new SimpleDateFormat(format).format(date);
}
public static final Date dateTime(final String format, final String ts)
{
try
{
return new SimpleDateFormat(format).parse(ts);
}
catch (ParseException e)
{
throw new RuntimeException(e);
}
}
/**
* // 2018/08/08
*/
public static String datePath()
{
return DateFormatUtils.format(getNowDate(), "yyyy/MM/dd");
}
/**
* // 20180808
*/
public static String dateTime()
{
return DateFormatUtils.format(getNowDate(), "yyyyMMdd");
}
/**
*
*/
public static Date parseDate(Object str)
{
if (str == null)
{
return null;
}
try
{
return parseDate(str.toString(), parsePatterns);
}
catch (ParseException e)
{
return null;
}
}
/**
*
*/
public static Date getServerStartDate()
{
long time = ManagementFactory.getRuntimeMXBean().getStartTime();
LocalDateTime localDateTime = LocalDateTime.ofEpochSecond(time/1000, 0, ZoneOffset.ofHours(8));
return Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant());
}
/**
*
*/
public static int differentDaysByMillisecond(Date date1, Date date2)
{
return Math.abs((int) ((date2.getTime() - date1.getTime()) / (1000 * 3600 * 24)));
}
/**
*
*/
public static String getDatePoor(Date endDate, Date nowDate)
{
long nd = 1000L * 24 * 60 * 60;
long nh = 1000L * 60 * 60;
long nm = 1000L * 60;
// 获得两个时间的毫秒时间差异
long diff = endDate.getTime() - nowDate.getTime();
// 计算差多少天
long day = diff / nd;
// 计算差多少小时
long hour = diff % nd / nh;
// 计算差多少分钟
long min = diff % nd % nh / nm;
// 计算差多少秒//输出结果
return day + "天" + hour + "小时" + min + "分钟";
}
/**
* LocalDateTime ==> Date
*/
public static Date toDate(LocalDateTime temporalAccessor)
{
ZonedDateTime zdt = temporalAccessor.atZone(ZoneId.systemDefault());
return Date.from(zdt.toInstant());
}
/**
* LocalDate ==> Date
*/
public static Date toDate(LocalDate temporalAccessor)
{
LocalDateTime localDateTime = LocalDateTime.of(temporalAccessor, LocalTime.of(0, 0, 0));
ZonedDateTime zdt = localDateTime.atZone(ZoneId.systemDefault());
return Date.from(zdt.toInstant());
}
}

@ -0,0 +1,616 @@
package com.jiuyv.appgate.common.utils;
import com.jiuyv.appgate.common.constant.Constants;
import com.jiuyv.appgate.common.text.StrFormatter;
import org.apache.commons.lang3.StringUtils;
import org.springframework.util.AntPathMatcher;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
*
*
* @author admin
*/
public final class CarcheckStringUtils extends StringUtils
{
/** 空字符串 */
private static final String NULLSTR = "";
/** 下划线 */
private static final char SEPARATOR = '_';
private CarcheckStringUtils() {
}
/**
*
*
* @param value defaultValue value
* @return value
*/
public static <T> T nvl(T value, T defaultValue)
{
return value != null ? value : defaultValue;
}
/**
* * Collection ListSetQueue
*
* @param coll Collection
* @return true false
*/
public static boolean isEmpty(Collection<?> coll)
{
return isNull(coll) || coll.isEmpty();
}
/**
* * CollectionListSetQueue
*
* @param coll Collection
* @return true false
*/
public static boolean isNotEmpty(Collection<?> coll)
{
return !isEmpty(coll);
}
/**
* *
*
* @param objects
** @return true false
*/
public static boolean isEmpty(Object[] objects)
{
return isNull(objects) || (objects.length == 0);
}
/**
* *
*
* @param objects
* @return true false
*/
public static boolean isNotEmpty(Object[] objects)
{
return !isEmpty(objects);
}
/**
* * Map
*
* @param map Map
* @return true false
*/
public static boolean isEmpty(Map<?, ?> map)
{
return isNull(map) || map.isEmpty();
}
/**
* * Map
*
* @param map Map
* @return true false
*/
public static boolean isNotEmpty(Map<?, ?> map)
{
return !isEmpty(map);
}
/**
* *
*
* @param str String
* @return true false
*/
public static boolean isEmpty(String str)
{
return isNull(str) || NULLSTR.equals(str.trim());
}
/**
* *
*
* @param str String
* @return true false
*/
public static boolean isNotEmpty(String str)
{
return !isEmpty(str);
}
/**
* *
*
* @param object Object
* @return true false
*/
public static boolean isNull(Object object)
{
return object == null;
}
/**
* *
*
* @param object Object
* @return true false
*/
public static boolean isNotNull(Object object)
{
return !isNull(object);
}
/**
* * Java
*
* @param object
* @return true false
*/
public static boolean isArray(Object object)
{
return isNotNull(object) && object.getClass().isArray();
}
/**
*
*/
public static String trim(String str)
{
return (str == null ? "" : str.trim());
}
/**
*
*
* @param str
* @param start
* @return
*/
public static String substring(final String str, int start)
{
if (str == null)
{
return NULLSTR;
}
if (start < 0)
{
start = str.length() + start;
}
if (start < 0)
{
start = 0;
}
if (start > str.length())
{
return NULLSTR;
}
return str.substring(start);
}
/**
*
*
* @param str
* @param start
* @param end
* @return
*/
public static String substring(final String str, int start, int end)
{
if (str == null)
{
return NULLSTR;
}
if (end < 0)
{
end = str.length() + end;
}
if (start < 0)
{
start = str.length() + start;
}
if (end > str.length())
{
end = str.length();
}
if (start > end)
{
return NULLSTR;
}
if (start < 0)
{
start = 0;
}
if (end < 0)
{
end = 0;
}
return str.substring(start, end);
}
/**
* , {} <br>
* {} <br>
* {} 使 \\ { {} \ 使 \\\\ <br>
* <br>
* 使format("this is {} for {}", "a", "b") -> this is a for b<br>
* {} format("this is \\{} for {}", "a", "b") -> this is \{} for a<br>
* \ format("this is \\\\{} for {}", "a", "b") -> this is \a for b<br>
*
* @param template {}
* @param params
* @return
*/
public static String format(String template, Object... params)
{
if (isEmpty(params) || isEmpty(template))
{
return template;
}
return StrFormatter.format(template, params);
}
/**
* http(s)://开头
*
* @param link
* @return
*/
public static boolean ishttp(String link)
{
return CarcheckStringUtils.startsWithAny(link, Constants.HTTP, Constants.HTTPS);
}
/**
* set
*
* @param str
* @param sep
* @return set
*/
public static Set<String> str2Set(String str, String sep)
{
return new HashSet<String>(str2List(str, sep, true, false));
}
/**
* list
*
* @param str
* @param sep
* @param filterBlank
* @param trim
* @return list
*/
public static List<String> str2List(String str, String sep, boolean filterBlank, boolean trim)
{
List<String> list = new ArrayList<String>();
if (CarcheckStringUtils.isEmpty(str))
{
return list;
}
// 过滤空白字符串
if (filterBlank && CarcheckStringUtils.isBlank(str))
{
return list;
}
String[] split = str.split(sep);
for (String string : split)
{
if (filterBlank && CarcheckStringUtils.isBlank(string))
{
continue;
}
if (trim)
{
string = string.trim();
}
list.add(string);
}
return list;
}
/**
*
*
* @param cs
* @param searchCharSequences
* @return
*/
public static boolean containsAnyIgnoreCase(CharSequence cs, CharSequence... searchCharSequences)
{
if (isEmpty(cs) || isEmpty(searchCharSequences))
{
return false;
}
for (CharSequence testStr : searchCharSequences)
{
if (containsIgnoreCase(cs, testStr))
{
return true;
}
}
return false;
}
/**
* 线
*/
public static String toUnderScoreCase(String str)
{
if (str == null)
{
return null;
}
StringBuilder sb = new StringBuilder();
// 前置字符是否大写
boolean preCharIsUpperCase = true;
// 当前字符是否大写
boolean curreCharIsUpperCase = true;
// 下一字符是否大写
boolean nexteCharIsUpperCase = true;
for (int i = 0; i < str.length(); i++)
{
char c = str.charAt(i);
if (i > 0)
{
preCharIsUpperCase = Character.isUpperCase(str.charAt(i - 1));
}
else
{
preCharIsUpperCase = false;
}
curreCharIsUpperCase = Character.isUpperCase(c);
if (i < (str.length() - 1))
{
nexteCharIsUpperCase = Character.isUpperCase(str.charAt(i + 1));
}
if (preCharIsUpperCase && curreCharIsUpperCase && !nexteCharIsUpperCase)
{
sb.append(SEPARATOR);
}
if ((i != 0 && !preCharIsUpperCase) && curreCharIsUpperCase)
{
sb.append(SEPARATOR);
}
sb.append(Character.toLowerCase(c));
}
return sb.toString();
}
/**
*
*
* @param str
* @param strs
* @return true
*/
public static boolean inStringIgnoreCase(String str, String... strs)
{
if (str != null && strs != null)
{
for (String s : strs)
{
if (str.equalsIgnoreCase(trim(s)))
{
return true;
}
}
}
return false;
}
/**
* 线线 HELLO_WORLD->HelloWorld
*
* @param name 线
* @return
*/
public static String convertToCamelCase(String name)
{
StringBuilder result = new StringBuilder();
// 快速检查
if (name == null || name.isEmpty())
{
// 没必要转换
return "";
}
if (!name.contains("_"))
{
// 不含下划线,仅将首字母大写
return name.substring(0, 1).toUpperCase() + name.substring(1);
}
// 用下划线将原始字符串分割
String[] camels = name.split("_");
for (String camel : camels)
{
// 跳过原始字符串中开头、结尾的下换线或双重下划线
if (camel.isEmpty())
{
continue;
}
// 首字母大写
result.append(camel.substring(0, 1).toUpperCase());
result.append(camel.substring(1).toLowerCase());
}
return result.toString();
}
/**
* user_name->userName
*/
public static String toCamelCase(String s)
{
if (s == null)
{
return null;
}
s = s.toLowerCase();
StringBuilder sb = new StringBuilder(s.length());
boolean upperCase = false;
for (int i = 0; i < s.length(); i++)
{
char c = s.charAt(i);
if (c == SEPARATOR)
{
upperCase = true;
}
else if (upperCase)
{
sb.append(Character.toUpperCase(c));
upperCase = false;
}
else
{
sb.append(c);
}
}
return sb.toString();
}
/**
*
*
* @param str
* @param strs
* @return
*/
public static boolean matches(String str, List<String> strs)
{
if (isEmpty(str) || isEmpty(strs))
{
return false;
}
for (String pattern : strs)
{
if (isMatch(pattern, str))
{
return true;
}
}
return false;
}
/**
* url:
* ? ;
* * ;
* ** ;
*
* @param pattern
* @param url url
* @return
*/
public static boolean isMatch(String pattern, String url)
{
AntPathMatcher matcher = new AntPathMatcher();
return matcher.match(pattern, url);
}
@SuppressWarnings("unchecked")
public static <T> T cast(Object obj)
{
return (T) obj;
}
/**
* 0使size size
*
* @param num
* @param size
* @return
*/
public static String padl(final Number num, final int size)
{
return padl(num.toString(), size, '0');
}
/**
* ssizesize
*
* @param s
* @param size
* @param c
* @return
*/
public static String padl(final String s, final int size, final char c)
{
final StringBuilder sb = new StringBuilder(size);
if (s != null)
{
final int len = s.length();
if (s.length() <= size)
{
for (int i = size - len; i > 0; i--)
{
sb.append(c);
}
sb.append(s);
}
else
{
return s.substring(len - size, len);
}
}
else
{
for (int i = size; i > 0; i--)
{
sb.append(c);
}
}
return sb.toString();
}
/**
*
* @param str
* @return
*/
public static boolean isNumStart(String str) {
int chr = str.charAt(0);
return chr >= 48 && chr <= 57;
}
/**
* string date
*/
public static Date toDate(String str) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
String dateStr = str.replace("年","-").replace("月","-").replace("日","");
Date date = null;
try {
date = simpleDateFormat.parse(dateStr);
} catch (ParseException e) {
e.printStackTrace();
}
return date;
}
}

@ -0,0 +1,114 @@
// package com.jiuyv.appgate.common.utils;
//
// import java.io.ByteArrayOutputStream;
// import java.io.IOException;
//
// import javax.annotation.PostConstruct;
//
// import org.slf4j.Logger;
// import org.slf4j.LoggerFactory;
// import org.springframework.beans.factory.annotation.Value;
// import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
// import org.springframework.stereotype.Service;
//
// import com.jiuyv.smhelper.SM4Util;
//
//
// @ConditionalOnProperty(value = "ciper.soft.enabled", havingValue="true",matchIfMissing = true)
// @Service
// public class EncryptorSoftService implements IEncryptor{
// private static final Logger LOG = LoggerFactory.getLogger(EncryptorSoftService.class);
//
// @Value("${local.dbKey}")
// private String dbKey;
//
// private byte[] dbKeyBytes;
//
// @PostConstruct
// private void init() {
// dbKeyBytes=ByteTools.hexStringToByte(dbKey);
// }
//
// @Override
// public byte[] encrypt_ECB_Padding(byte[] value, byte[] encryptKey) throws Exception {
// return SM4Util.encrypt_ECB_Padding(encryptKey, value);
// }
//
// @Override
// public byte[] decrypt_ECB_Padding(byte[] value, byte[] encryptKey) throws Exception{
// return SM4Util.decrypt_ECB_Padding(encryptKey, value);
// }
//
// @Override
// public byte[] encrypt_ECB_NoPadding(byte[] value, byte[] encryptKey) throws Exception{
// return SM4Util.encrypt_ECB_NoPadding(encryptKey, value);
// }
//
// @Override
// public byte[] decrypt_ECB_NoPadding(byte[] value, byte[] encryptKey) throws Exception{
// return SM4Util.decrypt_ECB_NoPadding(encryptKey, value);
// }
//
// @Override
// public WKDto generateKey(WKDto wkDto, byte[] tmk,byte[] dbkey) throws Exception{
// byte[] pik= SM4Util.generateKey();
// byte[] mak= SM4Util.generateKey();
// byte[] tdk= SM4Util.generateKey();
// byte[] pikCheckvalueTotle= SM4Util.encrypt_ECB_NoPadding(pik, AppCode.getCHKVALSRC());
// byte[] makCheckvalueTotle= SM4Util.encrypt_ECB_NoPadding(mak, AppCode.getCHKVALSRC());
// byte[] tdkCheckvalueTotle= SM4Util.encrypt_ECB_NoPadding(tdk, AppCode.getCHKVALSRC());
// byte[] pikCheckvalue = new byte[4];
// System.arraycopy(pikCheckvalueTotle, 0, pikCheckvalue, 0, 4);
// byte[] makCheckvalue = new byte[4];
// System.arraycopy(makCheckvalueTotle, 0, makCheckvalue, 0, 4);
// byte[] tdkCheckvalue = new byte[4];
// System.arraycopy(tdkCheckvalueTotle, 0, tdkCheckvalue, 0, 4);
// wkDto.setPik(pik);
// wkDto.setMak(mak);
// wkDto.setTdk(tdk);
// wkDto.setPikCheckvalue(pikCheckvalue);
// wkDto.setMakCheckvalue(makCheckvalue);
// wkDto.setTdkCheckvalue(tdkCheckvalue);
// wkDto.setPikEncryptedByDbkey(pikCheckvalue);
// wkDto.setPikEncryptedByTmk(SM4Util.encrypt_ECB_NoPadding(tmk, pik));
// wkDto.setPikEncryptedByDbkey(SM4Util.encrypt_ECB_NoPadding(dbkey, pik));
// wkDto.setMakEncryptedByTmk(SM4Util.encrypt_ECB_NoPadding(tmk, mak));
// wkDto.setMakEncryptedByDbkey(SM4Util.encrypt_ECB_NoPadding(dbkey, mak));
// wkDto.setTdkEncryptedByTmk(SM4Util.encrypt_ECB_NoPadding(tmk, tdk));
// wkDto.setTdkEncryptedByDbkey(SM4Util.encrypt_ECB_NoPadding(dbkey, tdk));
//
// //F62
// try (ByteArrayOutputStream bos = new ByteArrayOutputStream()) {
// bos.write(wkDto.getPikEncryptedByTmk());
// bos.write(wkDto.getPikCheckvalue());
//
// bos.write(wkDto.getMakEncryptedByTmk());
// bos.write(wkDto.getMakCheckvalue());
//
// bos.write(wkDto.getTdkEncryptedByTmk());
// bos.write(wkDto.getTdkCheckvalue());
//
// wkDto.setTotalF62Data(bos.toByteArray());
//
// } catch (IOException e) {
// throw new BaseException("generateKey error", e);
// }
//
// wkDto.setRespCode(RespCode.T_RSP_00);
// wkDto.setRespMsg(RespCode.getErrorCodeString(RespCode.T_RSP_00));
// return wkDto;
//
// }
//
// @Override
// public byte[] getCupWorkKeyDecode(byte[] workKeyEncryptedByCupMainKey,byte[] tmkEncryptedByDbkey) throws BaseException {
// try {
// byte[] tmk = this.decrypt_ECB_NoPadding(tmkEncryptedByDbkey, dbKeyBytes);
// return this.decrypt_ECB_NoPadding(workKeyEncryptedByCupMainKey, tmk);
// } catch (Exception e) {
// LOG.error("getCupWorkKeyEncryptedByDbkey error", e);
// throw new BaseException(RespCode.T_RSP_A7,RespCode.getErrorCodeString(RespCode.T_RSP_A7));
// }
// }
//
// }

@ -0,0 +1,137 @@
package com.jiuyv.appgate.common.utils;
import com.jiuyv.appgate.common.constant.Constants;
import okhttp3.HttpUrl;
import okhttp3.MediaType;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.ConnectException;
import java.net.SocketTimeoutException;
import java.net.URL;
import java.net.URLConnection;
import java.util.Map;
/**
* @author he_jiebing@jiuyv.com
* @create 2023-08-15 15:49
*/
@Component
public class HttpUtil {
private static final Logger LOGGER = LoggerFactory.getLogger(HttpUtil.class);
private OkHttpClient client;
public HttpUtil() {
this.client = new OkHttpClient();
}
public String sendGetRequest(String url) throws IOException {
Request request = new Request.Builder()
.url(url)
.build();
try (Response response = client.newCall(request).execute()) {
return response.body().string();
}
}
public String sendGetRequestWithBeanParams(String url, Map<String,Object> params) throws IOException {
//Map<String, Object> params = BeanUtils.convertBeanToMap(bean);
HttpUrl.Builder urlBuilder = HttpUrl.parse(url).newBuilder();
for (Map.Entry<String, Object> entry : params.entrySet()) {
if(StringUtils.isNotBlank( entry.getValue().toString())){
urlBuilder.addQueryParameter(entry.getKey(),entry.getValue().toString());
}
}
String fullUrl = urlBuilder.build().toString();
Request request = new Request.Builder()
.url(fullUrl)
.build();
try (Response response = client.newCall(request).execute()) {
return response.body().string();
}
}
public String sendPostRequest(String url, String jsonBody) throws IOException {
MediaType JSON = MediaType.parse("application/json; charset=utf-8");
RequestBody requestBody = RequestBody.create(JSON, jsonBody);
Request request = new Request.Builder()
.url(url)
.post(requestBody)
.build();
try (Response response = client.newCall(request).execute()) {
return response.body().string();
}
}
public static String sendGet(String url, String param)
{
return sendGet(url, param, Constants.UTF8);
}
/**
* URL GET
*
* @param url URL
* @param param name1=value1&name2=value2
* @param contentType
* @return
*/
public static String sendGet(String url, String param, String contentType)
{
StringBuilder result = new StringBuilder();
try
{
String urlNameString = CarcheckStringUtils.isNotBlank(param) ? (url + "?" + param) : url;
LOGGER.info("sendGet - {}", urlNameString);
URL realUrl = new URL(urlNameString);
URLConnection connection = realUrl.openConnection();
connection.setRequestProperty("accept", "*/*");
connection.setRequestProperty("connection", "Keep-Alive");
connection.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
connection.connect();
try(BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream(), contentType))) {
String line;
while ((line = in.readLine()) != null)
{
result.append(line);
}
LOGGER.info("recv - {}", result);
}
}
catch (ConnectException e)
{
LOGGER.error("调用HttpUtils.sendGet ConnectException, url=" + url + ",param=" + param, e);
}
catch (SocketTimeoutException e)
{
LOGGER.error("调用HttpUtils.sendGet SocketTimeoutException, url=" + url + ",param=" + param, e);
}
catch (IOException e)
{
LOGGER.error("调用HttpUtils.sendGet IOException, url=" + url + ",param=" + param, e);
}
return result.toString();
}
}

@ -0,0 +1,223 @@
package com.jiuyv.appgate.common.utils;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.core.JsonGenerator.Feature;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.lang.reflect.Field;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*
* @author zhouliang
*
*/
public abstract class JsonUtil {
/**
* The Constant LOGGER.
*/
private static final Logger LOGGER = LoggerFactory.getLogger(JsonUtil.class);
private JsonUtil() {
throw new IllegalStateException("Utility class");
}
/**
* The object mapper.
*/
private static final ObjectMapper objectMapper = new ObjectMapper();
static {
objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
objectMapper.setSerializationInclusion(Include.NON_NULL);
objectMapper.configure(Feature.WRITE_BIGDECIMAL_AS_PLAIN, true);
objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
}
public static ObjectMapper JsonMapper(){
return objectMapper;
}
/**
* json
*
* @param object the object
* @return the string
*/
public static String toJSONString(Object object) {
try {
return objectMapper.writeValueAsString(object);
} catch (Exception e) {
LOGGER.error("convert failed", e);
return "";
}
}
/**
* json
* @param <T>
* @param json
* @param clz
* @return
*/
public static <T> T json2Bean(String json, Class<T> clz) {
try {
return objectMapper.readValue(json, clz);
} catch (Exception e) {
LOGGER.error("convert failed", e);
return null;
}
}
/**
* json
* @param <T>
* @param json
* @param clz
* @return
*/
public static <T> T json2Bean(String json, JavaType clz) {
try {
return objectMapper.readValue(json, clz);
} catch (Exception e) {
LOGGER.error("convert failed", e);
return null;
}
}
/**
*
* @param <T>
* @param json
* @param clz
* @return
*/
public static <T> List<T> json2List(String json, Class<T> clz) {
try {
JavaType javaType = getCollectionType(ArrayList.class, clz);
return objectMapper.readValue(json, javaType);
} catch (Exception e) {
LOGGER.error("convert failed", e);
return new ArrayList<>();
}
}
/**
* Collection Type
*
* @param collectionClass Collection
* @param elementClasses
* @return JavaType Java
* @since 1.0
*/
public static JavaType getCollectionType(Class<?> collectionClass, Class<?>... elementClasses) {
return objectMapper.getTypeFactory().constructParametricType(collectionClass, elementClasses);
}
/**
* jsonArrayNode
* @param json
* @return
*/
public static ArrayNode parseArray(String json) {
try {
return (ArrayNode) objectMapper.readTree(json);
} catch (Exception e) {
LOGGER.error("convert failed", e);
return null;
}
}
/**
* jsonObjectNode
* @param json
* @return
*/
public static ObjectNode parseObject(String json) {
try {
return (ObjectNode) objectMapper.readTree(json);
} catch (Exception e) {
LOGGER.error("convert failed", e);
return null;
}
}
/**
* ArrayNode
* @param json
* @return
*/
public static ArrayNode createArray() {
return objectMapper.createArrayNode();
}
/**
* ObjectNode
* @param json
* @return
*/
public static ObjectNode createObject() {
return objectMapper.createObjectNode();
}
/**
* ArrayNode
* @param json
* @return
*/
public static ArrayNode toArray(Object obj) {
try {
return objectMapper.valueToTree(obj);
} catch (Exception e) {
LOGGER.error("convert failed", e);
return createArray();
}
}
/**
* ObjectNode
* @param json
* @return
*/
public static ObjectNode toObject(Object obj) {
try {
return objectMapper.valueToTree(obj);
} catch (Exception e) {
LOGGER.error("convert failed", e);
return createObject();
}
}
/**
* Node
* */
public static <K,V> void copyProperties(K source, V target) {
try {
objectMapper.updateValue(target,source);
} catch (Exception e) {
LOGGER.error("convert failed", e);
}
}
public static Map<String, Object> convertBeanToMap(Object bean) {
Map<String, Object> map = new HashMap<>();
Class<?> clazz = bean.getClass();
for (Field field : clazz.getDeclaredFields()) {
field.setAccessible(true);
try {
Object value = field.get(bean);
if (value != null) {
map.put(field.getName(), value);
}
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
return map;
}
}

@ -0,0 +1,20 @@
package com.jiuyv.appgate.common.utils;
/**
*
*
* @author admin
*/
public final class LogUtils
{
private LogUtils() {}
public static String getBlock(Object msg)
{
if (msg == null)
{
msg = "";
}
return "[" + msg.toString() + "]";
}
}

@ -0,0 +1,40 @@
package com.jiuyv.appgate.common.utils;
import com.github.pagehelper.PageHelper;
import com.jiuyv.appgate.common.page.PageDomain;
import com.jiuyv.appgate.common.page.TableSupport;
import com.jiuyv.appgate.common.utils.sql.SqlUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
*
* @author admin
*/
public class PageUtils extends PageHelper {
private static final Logger LOGGER = LoggerFactory.getLogger(PageUtils.class);
/**
*
*/
public static void startPage()
{
PageDomain pageDomain = TableSupport.buildPageRequest();
Integer pageNum = pageDomain.getPageNum();
Integer pageSize = pageDomain.getPageSize();
LOGGER.info("页码:>>{},每页大小:>>{}",pageNum,pageSize);
String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
Boolean reasonable = pageDomain.getReasonable();
PageHelper.startPage(pageNum, pageSize, orderBy).setReasonable(reasonable);
}
/**
* 线
*/
public static void clearPage()
{
PageHelper.clearPage();
}
}

@ -0,0 +1,176 @@
package com.jiuyv.appgate.common.utils;
import com.jiuyv.appgate.common.constant.Constants;
import com.jiuyv.appgate.common.exception.ServiceException;
import com.jiuyv.appgate.common.text.Convert;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.net.URLEncoder;
/**
*
*
* @author admin
*/
public final class ServletUtils {
private static final Logger LOGGER = LoggerFactory.getLogger(ServletUtils.class);
private ServletUtils() {
}
/**
* String
*/
public static String getParameter(String name) {
return getRequest().getParameter(name);
}
/**
* String
*/
public static String getParameter(String name, String defaultValue) {
return Convert.toStr(getRequest().getParameter(name), defaultValue);
}
/**
* Integer
*/
public static Integer getParameterToInt(String name) {
return Convert.toInt(getRequest().getParameter(name));
}
/**
* Integer
*/
public static Integer getParameterToInt(String name, Integer defaultValue) {
return Convert.toInt(getRequest().getParameter(name), defaultValue);
}
/**
* Boolean
*/
public static Boolean getParameterToBool(String name) {
return Convert.toBool(getRequest().getParameter(name));
}
/**
* Boolean
*/
public static Boolean getParameterToBool(String name, Boolean defaultValue) {
return Convert.toBool(getRequest().getParameter(name), defaultValue);
}
/**
* request
*/
public static HttpServletRequest getRequest() {
return getRequestAttributes().getRequest();
}
/**
* response
*/
public static HttpServletResponse getResponse() {
return getRequestAttributes().getResponse();
}
/**
* session
*/
public static HttpSession getSession() {
return getRequest().getSession();
}
public static ServletRequestAttributes getRequestAttributes() {
RequestAttributes attributes = RequestContextHolder.getRequestAttributes();
if (attributes == null) {
throw new ServiceException("获取Session失败");
}
return (ServletRequestAttributes) attributes;
}
/**
*
*
* @param response
* @param string
*/
public static void renderString(HttpServletResponse response, String string) {
try {
response.setStatus(HttpStatus.OK.value());
response.setContentType("application/json");
response.setCharacterEncoding("utf-8");
response.getWriter().print(string);
} catch (IOException e) {
LOGGER.error("将字符串渲染到客户端错误", e);
e.printStackTrace();
}
}
/**
* Ajax
*
* @param request
*/
public static boolean isAjaxRequest(HttpServletRequest request) {
String accept = request.getHeader("accept");
if (accept != null && accept.contains("application/json")) {
return true;
}
String xRequestedWith = request.getHeader("X-Requested-With");
if (xRequestedWith != null && xRequestedWith.contains("XMLHttpRequest")) {
return true;
}
String uri = request.getRequestURI();
if (CarcheckStringUtils.inStringIgnoreCase(uri, ".json", ".xml")) {
return true;
}
String ajax = request.getParameter("__ajax");
return CarcheckStringUtils.inStringIgnoreCase(ajax, "json", "xml");
}
/**
*
*
* @param str
* @return
*/
public static String urlEncode(String str) {
try {
return URLEncoder.encode(str, Constants.UTF8);
} catch (UnsupportedEncodingException e) {
LOGGER.error("内容编码异常", e);
return CarcheckStringUtils.EMPTY;
}
}
/**
*
*
* @param str
* @return
*/
public static String urlDecode(String str) {
try {
return URLDecoder.decode(str, Constants.UTF8);
} catch (UnsupportedEncodingException e) {
LOGGER.error("内容解码异常", e);
return CarcheckStringUtils.EMPTY;
}
}
}

@ -0,0 +1,148 @@
package com.jiuyv.appgate.common.utils;
import org.springframework.aop.framework.AopContext;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;
/**
* spring 便springbean
*
* @author admin
*/
@Component
public final class SpringUtils implements BeanFactoryPostProcessor, ApplicationContextAware {
/**
* Spring
*/
private static ConfigurableListableBeanFactory beanFactory;
private static ApplicationContext applicationContext;
@Override
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
postProcessBeanFactory2(beanFactory);
}
public static void postProcessBeanFactory2(ConfigurableListableBeanFactory beanFactory) throws BeansException {
SpringUtils.beanFactory = beanFactory;
}
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
setApplicationContext2(applicationContext);
}
public static void setApplicationContext2(ApplicationContext applicationContext) throws BeansException {
SpringUtils.applicationContext = applicationContext;
}
/**
*
*
* @param name
* @return Object bean
* @throws BeansException
*/
@SuppressWarnings("unchecked")
public static <T> T getBean(String name) throws BeansException {
return (T) beanFactory.getBean(name);
}
/**
* requiredType
*
* @param clz
* @return
* @throws BeansException
*/
public static <T> T getBean(Class<T> clz) throws BeansException {
T result = (T) beanFactory.getBean(clz);
return result;
}
/**
* BeanFactorybeantrue
*
* @param name
* @return boolean
*/
public static boolean containsBean(String name) {
return beanFactory.containsBean(name);
}
/**
* beansingletonprototype beanNoSuchBeanDefinitionException
*
* @param name
* @return boolean
* @throws NoSuchBeanDefinitionException
*/
public static boolean isSingleton(String name) throws NoSuchBeanDefinitionException {
return beanFactory.isSingleton(name);
}
/**
* @param name
* @return Class
* @throws NoSuchBeanDefinitionException
*/
public static Class<?> getType(String name) throws NoSuchBeanDefinitionException {
return beanFactory.getType(name);
}
/**
* beanbean
*
* @param name
* @return
* @throws NoSuchBeanDefinitionException
*/
public static String[] getAliases(String name) throws NoSuchBeanDefinitionException {
return beanFactory.getAliases(name);
}
/**
* aop
*
* @param invoker
* @return
*/
@SuppressWarnings("unchecked")
public static <T> T getAopProxy(T invoker) {
return (T) AopContext.currentProxy();
}
/**
* null
*
* @return
*/
public static String[] getActiveProfiles() {
return applicationContext.getEnvironment().getActiveProfiles();
}
/**
*
*
* @return
*/
public static String getActiveProfile() {
final String[] activeProfiles = getActiveProfiles();
return CarcheckStringUtils.isNotEmpty(activeProfiles) ? activeProfiles[0] : null;
}
/**
*
*
* @param key key
* @return
*/
public static String getRequiredProperty(String key) {
return applicationContext.getEnvironment().getRequiredProperty(key);
}
}

@ -0,0 +1,54 @@
package com.jiuyv.appgate.common.utils.ip;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.jiuyv.appgate.common.CarcheckConfig;
import com.jiuyv.appgate.common.constant.Constants;
import com.jiuyv.appgate.common.utils.CarcheckStringUtils;
import com.jiuyv.appgate.common.utils.HttpUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.IllegalFormatException;
/**
*
*
* @author admin
*/
public final class AddressUtils {
private static final Logger LOGGER = LoggerFactory.getLogger(AddressUtils.class);
// IP地址查询
public static final String IP_URL = "http://whois.pconline.com.cn/ipJson.jsp";
// 未知地址
public static final String UNKNOWN = "XX XX";
private AddressUtils() {
}
public static String getRealAddressByIP(String ip) {
// 内网不查询
if (IpUtils.internalIp(ip)) {
return "内网IP";
}
if (CarcheckConfig.isAddressEnabled()) {
try {
String rspStr = HttpUtil.sendGet(IP_URL, "ip=" + ip + "&json=true", Constants.GBK);
if (CarcheckStringUtils.isEmpty(rspStr)) {
LOGGER.error("获取地理位置异常 {}", ip);
return UNKNOWN;
}
JSONObject obj = JSON.parseObject(rspStr);
String region = obj.getString("pro");
String city = obj.getString("city");
return String.format("%s %s", region, city);
} catch (IllegalFormatException e) {
LOGGER.error("获取地理位置异常 {}", ip, e);
}
}
return UNKNOWN;
}
}

@ -0,0 +1,228 @@
package com.jiuyv.appgate.common.utils.ip;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.servlet.http.HttpServletRequest;
import java.net.InetAddress;
import java.net.UnknownHostException;
/**
* IP
*
* @author admin
*/
public final class IpUtils {
private static final Logger LOGGER = LoggerFactory.getLogger(IpUtils.class);
private IpUtils() {
}
/**
* IP
*
* @param request
* @return IP
*/
public static String getIpAddr(HttpServletRequest request) {
if (request == null) {
return "unknown";
}
String ip = request.getHeader("x-forwarded-for");
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("Proxy-Client-IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("X-Forwarded-For");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("WL-Proxy-Client-IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("X-Real-IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getRemoteAddr();
}
return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : getMultistageReverseProxyIp(ip);
}
/**
* IP
*
* @param ip IP
* @return
*/
public static boolean internalIp(String ip) {
byte[] addr = textToNumericFormatV4(ip);
return internalIp(addr) || "127.0.0.1".equals(ip);
}
/**
* IP
*
* @param addr byte
* @return
*/
private static boolean internalIp(byte[] addr) {
if (StringUtils.isBlank(new String(addr)) || addr.length < 2) {
return true;
}
final byte b0 = addr[0];
final byte b1 = addr[1];
// 10.x.x.x/8
final byte SECTION_1 = 0x0A;
// 172.16.x.x/12
final byte SECTION_2 = (byte) 0xAC;
final byte SECTION_3 = (byte) 0x10;
final byte SECTION_4 = (byte) 0x1F;
// 192.168.x.x/16
final byte SECTION_5 = (byte) 0xC0;
final byte SECTION_6 = (byte) 0xA8;
switch (b0) {
case SECTION_1:
return true;
case SECTION_2:
return b1 >= SECTION_3 && b1 <= SECTION_4;
case SECTION_5:
return b1 == SECTION_6;
default:
return false;
}
}
/**
* IPv4
*
* @param text IPv4
* @return byte
*/
public static byte[] textToNumericFormatV4(String text) {
if (text.length() == 0) {
return new byte[0];
}
byte[] bytes = new byte[4];
String[] elements = text.split("\\.", -1);
try {
long l;
int i;
switch (elements.length) {
case 1:
l = Long.parseLong(elements[0]);
if ((l < 0L) || (l > 4294967295L)) {
return new byte[0];
}
bytes[0] = (byte) (int) ((l >> 24) & 0xFF);
bytes[1] = (byte) (int) (((l & 0xFFFFFF) >> 16) & 0xFF);
bytes[2] = (byte) (int) (((l & 0xFFFF) >> 8) & 0xFF);
bytes[3] = (byte) (int) (l & 0xFF);
break;
case 2:
l = Integer.parseInt(elements[0]);
if ((l < 0L) || (l > 255L)) {
return new byte[0];
}
bytes[0] = (byte) (int) (l & 0xFF);
l = Integer.parseInt(elements[1]);
if ((l < 0L) || (l > 16777215L)) {
return new byte[0];
}
bytes[1] = (byte) (int) ((l >> 16) & 0xFF);
bytes[2] = (byte) (int) (((l & 0xFFFF) >> 8) & 0xFF);
bytes[3] = (byte) (int) (l & 0xFF);
break;
case 3:
for (i = 0; i < 2; ++i) {
l = Integer.parseInt(elements[i]);
if ((l < 0L) || (l > 255L)) {
return new byte[0];
}
bytes[i] = (byte) (int) (l & 0xFF);
}
l = Integer.parseInt(elements[2]);
if ((l < 0L) || (l > 65535L)) {
return new byte[0];
}
bytes[2] = (byte) (int) ((l >> 8) & 0xFF);
bytes[3] = (byte) (int) (l & 0xFF);
break;
case 4:
for (i = 0; i < 4; ++i) {
l = Integer.parseInt(elements[i]);
if ((l < 0L) || (l > 255L)) {
return new byte[0];
}
bytes[i] = (byte) (int) (l & 0xFF);
}
break;
default:
return new byte[0];
}
} catch (NumberFormatException e) {
return new byte[0];
}
return bytes;
}
/**
* IP
*
* @return IP
*/
public static String getHostIp() {
try {
return InetAddress.getLocalHost().getHostAddress();
} catch (UnknownHostException e) {
LOGGER.error(e.getMessage(), e);
}
return "127.0.0.1";
}
/**
*
*
* @return
*/
public static String getHostName() {
try {
return InetAddress.getLocalHost().getHostName();
} catch (UnknownHostException e) {
LOGGER.error(e.getMessage(), e);
}
return "未知";
}
/**
* unknown IP
*
* @param ip IP
* @return unknown IP
*/
public static String getMultistageReverseProxyIp(String ip) {
// 多级反向代理检测
if (ip != null && ip.contains(",")) {
final String[] ips = ip.trim().split(",");
for (String subIp : ips) {
if (!isUnknown(subIp)) {
ip = subIp;
break;
}
}
}
return ip;
}
/**
* HTTP
*
* @param checkString
* @return
*/
public static boolean isUnknown(String checkString) {
return StringUtils.isBlank(checkString) || "unknown".equalsIgnoreCase(checkString);
}
}

@ -0,0 +1,68 @@
package com.jiuyv.appgate.common.utils.sql;
import com.jiuyv.appgate.common.exception.UtilException;
import com.jiuyv.appgate.common.utils.CarcheckStringUtils;
import java.util.regex.Pattern;
/**
* sql
*
* @author admin
*/
public final class SqlUtil
{
/**
* sql
*/
public static final String SQL_REGEX = "select |insert |delete |update |drop |count |exec |chr |mid |master |truncate |char |and |declare ";
/**
* 线
*/
public static final Pattern SQL_PATTERN = Pattern.compile("[a-zA-Z0-9_\\ \\,\\.]+");
private SqlUtil() {
}
/**
*
*/
public static String escapeOrderBySql(String value)
{
if (CarcheckStringUtils.isNotEmpty(value) && !isValidOrderBySql(value))
{
throw new UtilException("参数不符合规范,不能进行查询");
}
return value;
}
/**
* order by
*/
public static boolean isValidOrderBySql(String value)
{
return SQL_PATTERN.matcher(value).matches();
}
/**
* SQL
*/
public static void filterKeyword(String value)
{
if (CarcheckStringUtils.isEmpty(value))
{
return;
}
String[] sqlKeywords = CarcheckStringUtils.split(SQL_REGEX, "\\|");
for (String sqlKeyword : sqlKeywords)
{
if (CarcheckStringUtils.indexOfIgnoreCase(value, sqlKeyword) > -1)
{
throw new UtilException("参数存在SQL注入风险");
}
}
}
}

@ -0,0 +1,52 @@
package com.jiuyv.appgate.common.uuid;
/**
* ID
*
* @author admin
*/
public final class IdUtils
{
private IdUtils() {
}
/**
* UUID
*
* @return UUID
*/
public static String randomUUID()
{
return UUID.randomUUID().toString();
}
/**
* UUID线
*
* @return UUID线
*/
public static String simpleUUID()
{
return UUID.randomUUID().toString(true);
}
/**
* UUID使ThreadLocalRandomUUID
*
* @return UUID
*/
public static String fastUUID()
{
return UUID.fastUUID().toString();
}
/**
* UUID线使ThreadLocalRandomUUID
*
* @return UUID线
*/
public static String fastSimpleUUID()
{
return UUID.fastUUID().toString(true);
}
}

@ -0,0 +1,91 @@
package com.jiuyv.appgate.common.uuid;
import com.jiuyv.appgate.common.utils.CarcheckDateUtils;
import com.jiuyv.appgate.common.utils.CarcheckStringUtils;
import java.util.concurrent.atomic.AtomicInteger;
/**
* @author admin
*/
public final class Seq {
// 通用序列类型
public static final String COMM_SEQ_TYPE = "COMMON";
// 上传序列类型
public static final String UPLOAD_SEQ_TYPE = "UPLOAD";
// 通用接口序列数
private static final AtomicInteger COMM_SEQ = new AtomicInteger(1);
// 上传接口序列数
private static final AtomicInteger UPLOAD_SEQ = new AtomicInteger(1);
// 机器标识
private static final String MACHINE_CODE = "A";
private Seq() {
}
/**
*
*
* @return
*/
public static String getId()
{
return getId(COMM_SEQ_TYPE);
}
/**
* 16 yyMMddHHmmss + + 3
*
* @return
*/
public static String getId(String type)
{
AtomicInteger atomicInt = COMM_SEQ;
if (UPLOAD_SEQ_TYPE.equals(type))
{
atomicInt = UPLOAD_SEQ;
}
return getId(atomicInt, 3);
}
/**
* yyMMddHHmmss + + length
*
* @param atomicInt
* @param length
* @return
*/
public static String getId(AtomicInteger atomicInt, int length)
{
String result = CarcheckDateUtils.dateTimeNow();
result += MACHINE_CODE;
result += getSeq(atomicInt, length);
return result;
}
/**
* [1, 10 (length)), 0length
*
* @return
*/
private static synchronized String getSeq(AtomicInteger atomicInt, int length)
{
// 先取值再+1
int value = atomicInt.getAndIncrement();
// 如果更新后值>=10 的 (length)幂次方则重置为1
int maxSeq = (int) Math.pow(10, length);
if (atomicInt.get() >= maxSeq)
{
atomicInt.set(1);
}
// 转字符串用0左补齐
return CarcheckStringUtils.padl(value, length);
}
}

@ -0,0 +1,498 @@
package com.jiuyv.appgate.common.uuid;
import com.jiuyv.appgate.common.exception.UtilException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.util.Random;
import java.util.concurrent.ThreadLocalRandom;
/**
* universally unique identifierUUID
*
* @author admin
*/
public final class UUID implements java.io.Serializable, Comparable<UUID>
{
private static final long serialVersionUID = -1185015143654744140L;
private static final Logger LOGGER = LoggerFactory.getLogger(UUID.class);
/**
* SecureRandom
*
*/
private static class Holder
{
static final SecureRandom numberGenerator = getSecureRandom();
}
/** 此UUID的最高64有效位 */
private final long mostSigBits;
/** 此UUID的最低64有效位 */
private final long leastSigBits;
/**
*
*
* @param data
*/
private UUID(byte[] data)
{
long msb = 0;
long lsb = 0;
assert data.length == 16 : "data must be 16 bytes in length";
for (int i = 0; i < 8; i++)
{
msb = (msb << 8) | (data[i] & 0xff);
}
for (int i = 8; i < 16; i++)
{
lsb = (lsb << 8) | (data[i] & 0xff);
}
this.mostSigBits = msb;
this.leastSigBits = lsb;
}
/**
* 使 UUID
*
* @param mostSigBits {@code UUID} 64
* @param leastSigBits {@code UUID} 64
*/
public UUID(long mostSigBits, long leastSigBits)
{
this.mostSigBits = mostSigBits;
this.leastSigBits = leastSigBits;
}
/**
* 4UUID 使线 UUID
*
* @return {@code UUID}
*/
public static UUID fastUUID()
{
return randomUUID(false);
}
/**
* 4UUID 使 UUID
*
* @return {@code UUID}
*/
public static UUID randomUUID()
{
return randomUUID(true);
}
/**
* 4UUID 使 UUID
*
* @param isSecure 使{@link SecureRandom}
* @return {@code UUID}
*/
public static UUID randomUUID(boolean isSecure)
{
final Random ng = isSecure ? Holder.numberGenerator : getRandom();
byte[] randomBytes = new byte[16];
ng.nextBytes(randomBytes);
randomBytes[6] &= 0x0f; /* clear version */
randomBytes[6] |= 0x40; /* set to version 4 */
randomBytes[8] &= 0x3f; /* clear variant */
randomBytes[8] |= 0x80; /* set to IETF variant */
return new UUID(randomBytes);
}
/**
* 3UUID
*
* @param name UUID
*
* @return {@code UUID}
*/
public static UUID nameUUIDFromBytes(byte[] name)
{
MessageDigest md;
try
{
md = MessageDigest.getInstance("MD5");
}
catch (NoSuchAlgorithmException nsae)
{
LOGGER.error(nsae.getMessage(), nsae);
throw new InternalError("MD5 not supported");
}
byte[] md5Bytes = md.digest(name);
md5Bytes[6] &= 0x0f; /* clear version */
md5Bytes[6] |= 0x30; /* set to version 3 */
md5Bytes[8] &= 0x3f; /* clear variant */
md5Bytes[8] |= 0x80; /* set to IETF variant */
return new UUID(md5Bytes);
}
/**
* {@link #toString()} {@code UUID}
*
* @param name {@code UUID}
* @return {@code UUID}
* @throws IllegalArgumentException name {@link #toString}
*
*/
public static UUID fromString(String name)
{
String[] components = name.split("-");
if (components.length != 5)
{
throw new IllegalArgumentException("Invalid UUID string: " + name);
}
for (int i = 0; i < 5; i++)
{
components[i] = "0x" + components[i];
}
long mostSigBits = Long.decode(components[0]).longValue();
mostSigBits <<= 16;
mostSigBits |= Long.decode(components[1]).longValue();
mostSigBits <<= 16;
mostSigBits |= Long.decode(components[2]).longValue();
long leastSigBits = Long.decode(components[3]).longValue();
leastSigBits <<= 48;
leastSigBits |= Long.decode(components[4]).longValue();
return new UUID(mostSigBits, leastSigBits);
}
/**
* UUID 128 64
*
* @return UUID 128 64
*/
public long getLeastSignificantBits()
{
return leastSigBits;
}
/**
* UUID 128 64
*
* @return UUID 128 64
*/
public long getMostSignificantBits()
{
return mostSigBits;
}
/**
* {@code UUID} . {@code UUID}
* <p>
* :
* <ul>
* <li>1 UUID
* <li>2 DCE UUID
* <li>3 UUID
* <li>4 UUID
* </ul>
*
* @return {@code UUID}
*/
public int version()
{
// Version is bits masked by 0x000000000000F000 in MS long
return (int) ((mostSigBits >> 12) & 0x0f);
}
/**
* {@code UUID} {@code UUID}
* <p>
*
* <ul>
* <li>0 NCS
* <li>2 <a href="http://www.ietf.org/rfc/rfc4122.txt">IETF&nbsp;RFC&nbsp;4122</a>(Leach-Salz),
* <li>6
* <li>7 使
* </ul>
*
* @return {@code UUID}
*/
public int variant()
{
// This field is composed of a varying number of bits.
// 0 - - Reserved for NCS backward compatibility
// 1 0 - The IETF aka Leach-Salz variant (used by this class)
// 1 1 0 Reserved, Microsoft backward compatibility
// 1 1 1 Reserved for future definition.
return (int) ((leastSigBits >>> (64 - (leastSigBits >>> 62))) & (leastSigBits >> 63));
}
/**
* UUID
*
* <p>
* 60 {@code UUID} time_lowtime_mid time_hi <br>
* 100 UTC 1582 10 15
*
* <p>
* UUID version 1<br>
* {@code UUID} UUID UnsupportedOperationException
*
* @throws UnsupportedOperationException {@code UUID} version 1 UUID
*/
public long timestamp() throws UnsupportedOperationException
{
checkTimeBase();
return ((mostSigBits & 0x0FFFL) << 48)
| (((mostSigBits >> 16) & 0x0FFFFL) << 32)
| (mostSigBits >>> 32);
}
/**
* UUID
*
* <p>
* 14 UUID clock_seq clock_seq UUID
* <p>
* {@code clockSequence} UUID version 1 UUID UUID
* UnsupportedOperationException
*
* @return {@code UUID}
*
* @throws UnsupportedOperationException UUID version 1
*/
public int clockSequence() throws UnsupportedOperationException
{
checkTimeBase();
return (int) ((leastSigBits & 0x3FFF000000000000L) >>> 48);
}
/**
* UUID
*
* <p>
* 48 UUID node IEEE 802 UUID
* <p>
* UUID version 1<br>
* UUID UUID UnsupportedOperationException
*
* @return {@code UUID}
*
* @throws UnsupportedOperationException UUID version 1
*/
public long node() throws UnsupportedOperationException
{
checkTimeBase();
return leastSigBits & 0x0000FFFFFFFFFFFFL;
}
/**
* {@code UUID}
*
* <p>
* UUID BNF
*
* <pre>
* {@code
* UUID = <time_low>-<time_mid>-<time_high_and_version>-<variant_and_sequence>-<node>
* time_low = 4*<hexOctet>
* time_mid = 2*<hexOctet>
* time_high_and_version = 2*<hexOctet>
* variant_and_sequence = 2*<hexOctet>
* node = 6*<hexOctet>
* hexOctet = <hexDigit><hexDigit>
* hexDigit = [0-9a-fA-F]
* }
* </pre>
*
* </blockquote>
*
* @return {@code UUID}
* @see #toString(boolean)
*/
@Override
public String toString()
{
return toString(false);
}
/**
* {@code UUID}
*
* <p>
* UUID BNF
*
* <pre>
* {@code
* UUID = <time_low>-<time_mid>-<time_high_and_version>-<variant_and_sequence>-<node>
* time_low = 4*<hexOctet>
* time_mid = 2*<hexOctet>
* time_high_and_version = 2*<hexOctet>
* variant_and_sequence = 2*<hexOctet>
* node = 6*<hexOctet>
* hexOctet = <hexDigit><hexDigit>
* hexDigit = [0-9a-fA-F]
* }
* </pre>
*
* </blockquote>
*
* @param isSimple '-'UUID
* @return {@code UUID}
*/
public String toString(boolean isSimple)
{
final StringBuilder builder = new StringBuilder(isSimple ? 32 : 36);
// time_low
builder.append(digits(mostSigBits >> 32, 8));
if (!isSimple)
{
builder.append('-');
}
// time_mid
builder.append(digits(mostSigBits >> 16, 4));
if (!isSimple)
{
builder.append('-');
}
// time_high_and_version
builder.append(digits(mostSigBits, 4));
if (!isSimple)
{
builder.append('-');
}
// variant_and_sequence
builder.append(digits(leastSigBits >> 48, 4));
if (!isSimple)
{
builder.append('-');
}
// node
builder.append(digits(leastSigBits, 12));
return builder.toString();
}
/**
* UUID
*
* @return UUID
*/
@Override
public int hashCode()
{
long hilo = mostSigBits ^ leastSigBits;
return ((int) (hilo >> 32)) ^ (int) hilo;
}
/**
*
* <p>
* {@code null} UUID UUID varriant {@code true}
*
* @param obj
*
* @return {@code true} {@code false}
*/
@Override
public boolean equals(Object obj)
{
if ((null == obj) || (obj.getClass() != UUID.class))
{
return false;
}
UUID id = (UUID) obj;
return (mostSigBits == id.mostSigBits && leastSigBits == id.leastSigBits);
}
// Comparison Operations
/**
* UUID UUID
*
* <p>
* UUID UUID UUID UUID UUID
*
* @param val UUID UUID
*
* @return UUID val -10 1
*
*/
@Override
public int compareTo(UUID val)
{
// The ordering is intentionally set up so that the UUIDs
// can simply be numerically compared as two numbers
if (this.mostSigBits < val.mostSigBits) {
return -1;
}
if (this.mostSigBits > val.mostSigBits) {
return 1;
}
if (this.leastSigBits < val.leastSigBits) {
return -1;
}
if (this.leastSigBits > val.leastSigBits) {
return 1;
}
return 0;
}
// -------------------------------------------------------------------------------------------------------------------
// Private method start
/**
* hex
*
* @param val
* @param digits
* @return
*/
private static String digits(long val, int digits)
{
long hi = 1L << (digits * 4);
return Long.toHexString(hi | (val & (hi - 1))).substring(1);
}
/**
* time-basedUUID
*/
private void checkTimeBase()
{
if (version() != 1)
{
throw new UnsupportedOperationException("Not a time-based UUID");
}
}
/**
* {@link SecureRandom} (RNG)
*
* @return {@link SecureRandom}
*/
public static SecureRandom getSecureRandom()
{
try
{
return SecureRandom.getInstance("SHA1PRNG");
}
catch (NoSuchAlgorithmException e)
{
throw new UtilException(e);
}
}
/**
* <br>
* ThreadLocalRandomJDK 7线
*
* @return {@link ThreadLocalRandom}
*/
public static ThreadLocalRandom getRandom()
{
return ThreadLocalRandom.current();
}
}

@ -0,0 +1,110 @@
package com.jiuyv.appgate.config;
import com.jiuyv.appgate.common.utils.CarcheckStringUtils;
import org.apache.ibatis.io.VFS;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.mybatis.spring.boot.autoconfigure.SpringBootVFS;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.core.io.DefaultResourceLoader;
import org.springframework.core.io.Resource;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.io.support.ResourcePatternResolver;
import org.springframework.core.type.classreading.CachingMetadataReaderFactory;
import org.springframework.core.type.classreading.MetadataReader;
import org.springframework.core.type.classreading.MetadataReaderFactory;
import org.springframework.util.ClassUtils;
import javax.sql.DataSource;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
/**
* Mybatis*
*
* @author admin
*/
@Configuration
public class MyBatisConfig {
private static final Logger LOGGER = LoggerFactory.getLogger(MyBatisConfig.class);
static final String DEFAULT_RESOURCE_PATTERN = "**/*.class";
public static String setTypeAliasesPackage(String typeAliasesPackage) {
ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
MetadataReaderFactory metadataReaderFactory = new CachingMetadataReaderFactory(resolver);
List<String> allResult = new ArrayList<String>();
try {
for (String aliasesPackage : typeAliasesPackage.split(",")) {
List<String> result = new ArrayList<String>();
aliasesPackage = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX
+ ClassUtils.convertClassNameToResourcePath(aliasesPackage.trim()) + "/" + DEFAULT_RESOURCE_PATTERN;
Resource[] resources = resolver.getResources(aliasesPackage);
if (resources != null && resources.length > 0) {
MetadataReader metadataReader = null;
for (Resource resource : resources) {
if (resource.isReadable()) {
metadataReader = metadataReaderFactory.getMetadataReader(resource);
result.add(Class.forName(metadataReader.getClassMetadata().getClassName()).getPackage().getName());
}
}
}
if (!result.isEmpty()) {
HashSet<String> hashResult = new HashSet<String>(result);
allResult.addAll(hashResult);
}
}
if (!allResult.isEmpty()) {
typeAliasesPackage = String.join(",", allResult.toArray(new String[0]));
} else {
throw new RuntimeException("mybatis typeAliasesPackage 路径扫描错误,参数typeAliasesPackage:" + typeAliasesPackage + "未找到任何包");
}
} catch (IOException | ClassNotFoundException e) {
LOGGER.error(e.getMessage(), e);
}
return typeAliasesPackage;
}
public Resource[] resolveMapperLocations(String[] mapperLocations) {
ResourcePatternResolver resourceResolver = new PathMatchingResourcePatternResolver();
List<Resource> resources = new ArrayList<Resource>();
if (mapperLocations != null) {
for (String mapperLocation : mapperLocations) {
try {
Resource[] mappers = resourceResolver.getResources(mapperLocation);
resources.addAll(Arrays.asList(mappers));
} catch (IOException e) {
LOGGER.error(e.getMessage(), e);
// ignore
}
}
}
return resources.toArray(new Resource[resources.size()]);
}
@Bean
public SqlSessionFactory sqlSessionFactory(DataSource dataSource, Environment env) throws Exception {
String typeAliasesPackage = env.getProperty("mybatis.typeAliasesPackage");
String mapperLocations = env.getProperty("mybatis.mapperLocations");
String configLocation = env.getProperty("mybatis.configLocation");
typeAliasesPackage = setTypeAliasesPackage(typeAliasesPackage);
VFS.addImplClass(SpringBootVFS.class);
final SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
sessionFactory.setDataSource(dataSource);
sessionFactory.setTypeAliasesPackage(typeAliasesPackage);
sessionFactory.setMapperLocations(resolveMapperLocations(CarcheckStringUtils.split(mapperLocations, ",")));
assert configLocation != null;
sessionFactory.setConfigLocation(new DefaultResourceLoader().getResource(configLocation));
return sessionFactory.getObject();
}
}

@ -0,0 +1,100 @@
package com.jiuyv.appgate.config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cache.annotation.CachingConfigurerSupport;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.script.DefaultRedisScript;
import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;
import java.nio.charset.StandardCharsets;
/**
* redis
*
* @author admin
*/
@Configuration
@EnableCaching
public class RedisConfig extends CachingConfigurerSupport {
@Value("${carcheck.redisPrefix}")
private String redisPrefix;
class RedisKeySerializer extends StringRedisSerializer {
@Override
public byte[] serialize(String s) {
if (s == null) {
return null;
}
// 这里加上你需要加上的key前缀
String realKey = redisPrefix + s;
return super.serialize(realKey);
}
@Override
public String deserialize(byte[] bytes) {
if (bytes == null) {
return null;
}
String s = new String(bytes, StandardCharsets.UTF_8);
int index = s.indexOf(redisPrefix);
if (index != -1) {
return s.substring(index + 2);
}
return s;
}
}
@Bean
@SuppressWarnings(value = {"unchecked", "rawtypes"})
public RedisTemplate<Object, Object> redisTemplate(RedisConnectionFactory connectionFactory) {
RedisTemplate<Object, Object> template = new RedisTemplate<>();
template.setConnectionFactory(connectionFactory);
Jackson2JsonRedisSerializer serializer = new Jackson2JsonRedisSerializer(Object.class);
// 使用StringRedisSerializer来序列化和反序列化redis的key值
template.setKeySerializer(new StringRedisSerializer());
template.setValueSerializer(serializer);
// Hash的key也采用StringRedisSerializer的序列化方式
template.setHashKeySerializer(new StringRedisSerializer());
template.setHashValueSerializer(serializer);
template.afterPropertiesSet();
return template;
}
@Bean
public DefaultRedisScript<Long> limitScript()
{
DefaultRedisScript<Long> redisScript = new DefaultRedisScript<>();
redisScript.setScriptText(limitScriptText());
redisScript.setResultType(Long.class);
return redisScript;
}
/**
*
*/
private String limitScriptText()
{
return "local key = KEYS[1]\n" +
"local count = tonumber(ARGV[1])\n" +
"local time = tonumber(ARGV[2])\n" +
"local current = redis.call('get', key);\n" +
"if current and tonumber(current) > count then\n" +
" return tonumber(current);\n" +
"end\n" +
"current = redis.call('incr', key)\n" +
"if tonumber(current) == 1 then\n" +
" redis.call('expire', key, time)\n" +
"end\n" +
"return tonumber(current);";
}
}

@ -0,0 +1,60 @@
package com.jiuyv.appgate.config;
import com.jiuyv.appgate.thread.Threads;
import org.apache.commons.lang3.concurrent.BasicThreadFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.ThreadPoolExecutor;
/**
* 线
*
* @author admin
**/
@Configuration
public class ThreadPoolConfig {
// 核心线程池大小
private int corePoolSize = 50;
// 最大可创建的线程数
private int maxPoolSize = 200;
// 队列最大长度
private int queueCapacity = 1000;
// 线程池维护线程所允许的空闲时间
private int keepAliveSeconds = 300;
@Bean(name = "threadPoolTaskExecutor")
public ThreadPoolTaskExecutor threadPoolTaskExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setMaxPoolSize(maxPoolSize);
executor.setCorePoolSize(corePoolSize);
executor.setQueueCapacity(queueCapacity);
executor.setKeepAliveSeconds(keepAliveSeconds);
// 线程池对拒绝任务(无线程可用)的处理策略
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
return executor;
}
/**
*
*/
@Bean(name = "scheduledExecutorService")
protected ScheduledExecutorService scheduledExecutorService() {
return new ScheduledThreadPoolExecutor(corePoolSize,
new BasicThreadFactory.Builder().namingPattern("schedule-pool-%d").daemon(true).build(),
new ThreadPoolExecutor.CallerRunsPolicy()) {
@Override
protected void afterExecute(Runnable r, Throwable t) {
super.afterExecute(r, t);
Threads.printException(r, t);
}
};
}
}

@ -0,0 +1,85 @@
package com.jiuyv.appgate.config;
import com.jiuyv.appgate.interceptor.LoginInterceptor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import java.util.List;
/**
* <p>
* Title: WebMvcConfig
* </p>
* <p>
* Description:
* </p>
*
* @author he_jiebing@jiuyv.com
* @date 202176 5:32:38
*/
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {
@Value("${carcheck.app.ignoreTokenVerifyUrlList}")
private List<String> ignoreVerifyUrlList;
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/**").addResourceLocations("classpath:/META-INF/resources/")
.addResourceLocations("file:/workspaces/images/");
}
@Bean
public LoginInterceptor loginInterceptor() {
return new LoginInterceptor();
}
// @Bean
// public SqlInjectionInterceptor sqlInjectionInterceptor() {
// return new SqlInjectionInterceptor();
// }
@Bean
public RestTemplate restTemplate(RestTemplateBuilder builder) {
return builder.build();
}
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(loginInterceptor()).addPathPatterns("/app/**").excludePathPatterns(ignoreVerifyUrlList).order(2);
//registry.addInterceptor(sqlInjectionInterceptor()).addPathPatterns("/app/**").excludePathPatterns(ignoreVerifyUrlList).order(1);
}
/**
*
*/
// @Bean
// public CorsFilter corsFilter()
// {
// CorsConfiguration config = new CorsConfiguration();
// config.setAllowCredentials(true);
// // 设置访问源地址
// //config.addAllowedOriginPattern("*");
// config.addAllowedOrigin("*");
// // 设置访问源请求头
// config.addAllowedHeader("*");
// // 设置访问源请求方法
// config.addAllowedMethod("*");
// // 有效期 1800秒
// config.setMaxAge(1800L*2*24);
// // 添加映射路径,拦截一切请求
// UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
// source.registerCorsConfiguration("/**", config);
// // 返回新的CorsFilter
// return new CorsFilter(source);
// }
}

@ -0,0 +1,194 @@
package com.jiuyv.appgate.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/**
* Entity
*
* @author admin
*/
public abstract class BaseEntity implements Serializable
{
/**
* id
*/
private Long id;
/** 搜索值 */
private String searchValue;
/** 创建者 */
private String createBy;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/** 更新者 */
private String updateBy;
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/** 备注 */
private String remark;
/** 请求参数 */
private Map<String, Object> params;
/** 创建者 */
private String createId;
/** 修改者 */
private String updateId;
/** 版本号 */
private Long version;
/** 保留域1 */
private String rsv1;
/** 保留域2 */
private String rsv2;
/** 保留域3 */
private String rsv3;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getSearchValue()
{
return searchValue == null ? "" : searchValue;
}
public void setSearchValue(String searchValue)
{
this.searchValue = searchValue;
}
public String getCreateBy()
{
return createBy == null ? "" : createBy;
}
public void setCreateBy(String createBy)
{
this.createBy = createBy;
}
public Date getCreateTime()
{
return createTime;
}
public void setCreateTime(Date createTime)
{
this.createTime = createTime;
}
public String getUpdateBy()
{
return updateBy == null ? "" : updateBy;
}
public void setUpdateBy(String updateBy)
{
this.updateBy = updateBy;
}
public Date getUpdateTime()
{
return updateTime;
}
public void setUpdateTime(Date updateTime)
{
this.updateTime = updateTime;
}
public String getRemark()
{
return remark == null ? "" : remark;
}
public void setRemark(String remark)
{
this.remark = remark;
}
public Map<String, Object> getParams()
{
if (params == null)
{
params = new HashMap<>();
}
return params;
}
public void setParams(Map<String, Object> params)
{
this.params = params;
}
public String getCreateId() {
return createId;
}
public void setCreateId(String createId) {
this.createId = createId;
}
public String getUpdateId() {
return updateId;
}
public void setUpdateId(String updateId) {
this.updateId = updateId;
}
public Long getVersion() {
return version;
}
public void setVersion(Long version) {
this.version = version;
}
public String getRsv1() {
return rsv1;
}
public void setRsv1(String rsv1) {
this.rsv1 = rsv1;
}
public String getRsv2() {
return rsv2;
}
public void setRsv2(String rsv2) {
this.rsv2 = rsv2;
}
public String getRsv3() {
return rsv3;
}
public void setRsv3(String rsv3) {
this.rsv3 = rsv3;
}
}

@ -0,0 +1,191 @@
package com.jiuyv.appgate.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* sys_dept
*
* @author admin
*/
public class SysDept extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 部门ID */
private Long deptId;
/** 父部门ID */
private Long parentId;
/** 祖级列表 */
private String ancestors;
/** 部门名称 */
private String deptName;
/** 显示顺序 */
private Integer orderNum;
/** 负责人 */
private String leader;
/** 联系电话 */
private String phone;
/** 邮箱 */
private String email;
/** 部门状态:0正常,1停用 */
private String status;
/** 删除标志0代表存在 2代表删除 */
private String delFlag;
/** 父部门名称 */
private String parentName;
/** 子部门 */
private List<SysDept> children = new ArrayList<SysDept>();
public Long getDeptId()
{
return deptId;
}
public void setDeptId(Long deptId)
{
this.deptId = deptId;
}
public Long getParentId()
{
return parentId;
}
public void setParentId(Long parentId)
{
this.parentId = parentId;
}
public String getAncestors()
{
return ancestors;
}
public void setAncestors(String ancestors)
{
this.ancestors = ancestors;
}
@NotBlank(message = "部门名称不能为空")
@Size(min = 0, max = 30, message = "部门名称长度不能超过30个字符")
public String getDeptName()
{
return deptName;
}
public void setDeptName(String deptName)
{
this.deptName = deptName;
}
@NotNull(message = "显示顺序不能为空")
public Integer getOrderNum()
{
return orderNum;
}
public void setOrderNum(Integer orderNum)
{
this.orderNum = orderNum;
}
public String getLeader()
{
return leader;
}
public void setLeader(String leader)
{
this.leader = leader;
}
@Size(min = 0, max = 11, message = "联系电话长度不能超过11个字符")
public String getPhone()
{
return phone;
}
public void setPhone(String phone)
{
this.phone = phone;
}
@Email(message = "邮箱格式不正确")
@Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
public String getEmail()
{
return email;
}
public void setEmail(String email)
{
this.email = email;
}
public String getStatus()
{
return status;
}
public void setStatus(String status)
{
this.status = status;
}
public String getDelFlag()
{
return delFlag;
}
public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
}
public String getParentName()
{
return parentName;
}
public void setParentName(String parentName)
{
this.parentName = parentName;
}
public List<SysDept> getChildren()
{
return children;
}
public void setChildren(List<SysDept> children)
{
this.children = children;
}
}

@ -0,0 +1,149 @@
package com.jiuyv.appgate.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
/**
* 访 sys_logininfor
*
* @author admin
*/
public class SysLogininfor extends BaseEntity {
private static final long serialVersionUID = 1L;
/** ID */
private Long infoId;
/** 用户账号 */
private String userName;
/** 登录状态 0成功 1失败 */
private String status;
/** 登录IP地址 */
private String ipaddr;
/** 登录地点 */
private String loginLocation;
/** 浏览器类型 */
private String browser;
/** 操作系统 */
private String os;
/** 提示消息 */
private String msg;
/** 访问时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date loginTime;
/** 操作类别0其它 1后台用户 2手机端用户 */
private Integer operatorType;
public Integer getOperatorType() {
return operatorType;
}
public void setOperatorType(Integer operatorType) {
this.operatorType = operatorType;
}
public Long getInfoId()
{
return infoId;
}
public void setInfoId(Long infoId)
{
this.infoId = infoId;
}
public String getUserName()
{
return userName;
}
public void setUserName(String userName)
{
this.userName = userName;
}
public String getStatus()
{
return status;
}
public void setStatus(String status)
{
this.status = status;
}
public String getIpaddr()
{
return ipaddr;
}
public void setIpaddr(String ipaddr)
{
this.ipaddr = ipaddr;
}
public String getLoginLocation()
{
return loginLocation;
}
public void setLoginLocation(String loginLocation)
{
this.loginLocation = loginLocation;
}
public String getBrowser()
{
return browser;
}
public void setBrowser(String browser)
{
this.browser = browser;
}
public String getOs()
{
return os;
}
public void setOs(String os)
{
this.os = os;
}
public String getMsg()
{
return msg;
}
public void setMsg(String msg)
{
this.msg = msg;
}
public Date getLoginTime()
{
return loginTime;
}
public void setLoginTime(Date loginTime)
{
this.loginTime = loginTime;
}
}

@ -0,0 +1,240 @@
package com.jiuyv.appgate.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
/**
* oper_log
*
* @author admin
*/
public class SysOperLog extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 日志主键 */
private Long operId;
/** 操作模块 */
private String title;
/** 业务类型0其它 1新增 2修改 3删除 */
private Integer businessType;
/** 业务类型数组 */
private Integer[] businessTypes;
/** 请求方法 */
private String method;
/** 请求方式 */
private String requestMethod;
/** 操作类别0其它 1后台用户 2手机端用户 */
private Integer operatorType;
/** 操作人员 */
private String operName;
/** 部门名称 */
private String deptName;
/** 请求url */
private String operUrl;
/** 操作地址 */
private String operIp;
/** 操作地点 */
private String operLocation;
/** 请求参数 */
private String operParam;
/** 返回参数 */
private String jsonResult;
/** 操作状态0正常 1异常 */
private Integer status;
/** 错误消息 */
private String errorMsg;
/** 操作时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date operTime;
public Long getOperId()
{
return operId;
}
public void setOperId(Long operId)
{
this.operId = operId;
}
public String getTitle()
{
return title;
}
public void setTitle(String title)
{
this.title = title;
}
public Integer getBusinessType()
{
return businessType;
}
public void setBusinessType(Integer businessType)
{
this.businessType = businessType;
}
public Integer[] getBusinessTypes()
{
return businessTypes;
}
public void setBusinessTypes(Integer[] businessTypes)
{
this.businessTypes = businessTypes;
}
public String getMethod()
{
return method;
}
public void setMethod(String method)
{
this.method = method;
}
public String getRequestMethod()
{
return requestMethod;
}
public void setRequestMethod(String requestMethod)
{
this.requestMethod = requestMethod;
}
public Integer getOperatorType()
{
return operatorType;
}
public void setOperatorType(Integer operatorType)
{
this.operatorType = operatorType;
}
public String getOperName()
{
return operName;
}
public void setOperName(String operName)
{
this.operName = operName;
}
public String getDeptName()
{
return deptName;
}
public void setDeptName(String deptName)
{
this.deptName = deptName;
}
public String getOperUrl()
{
return operUrl;
}
public void setOperUrl(String operUrl)
{
this.operUrl = operUrl;
}
public String getOperIp()
{
return operIp;
}
public void setOperIp(String operIp)
{
this.operIp = operIp;
}
public String getOperLocation()
{
return operLocation;
}
public void setOperLocation(String operLocation)
{
this.operLocation = operLocation;
}
public String getOperParam()
{
return operParam;
}
public void setOperParam(String operParam)
{
this.operParam = operParam;
}
public String getJsonResult()
{
return jsonResult;
}
public void setJsonResult(String jsonResult)
{
this.jsonResult = jsonResult;
}
public Integer getStatus()
{
return status;
}
public void setStatus(Integer status)
{
this.status = status;
}
public String getErrorMsg()
{
return errorMsg;
}
public void setErrorMsg(String errorMsg)
{
this.errorMsg = errorMsg;
}
public Date getOperTime()
{
return operTime;
}
public void setOperTime(Date operTime)
{
this.operTime = operTime;
}
}

@ -0,0 +1,440 @@
package com.jiuyv.appgate.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
/**
* tbl_car_inspect_detail_his_info
*
* @author jiuyv
* @date 2023-07-18
*/
public class TblCarInspectDetailHisInfo {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
* version
*/
private Integer version;
/**
* id
*/
private String mainId;
/**
* id
*/
private String orgId;
/**
* id
*/
private String inspectOrgId;
/**
*
*/
private String orderId;
/**
*
*/
private String companyId;
/**
*
*/
private String shipName;
/**
*
*/
private String carVin;
/**
* 00 01
*/
private String checkType;
/**
*
*/
private String inspectPartFirst;
/**
*
*/
private String inspectPartSecond;
/**
*
*/
private String inspectSite;
/**
*
*/
private String pollutantType;
/**
*
*/
private String pollutantDetailType;
/**
*
*/
private String pollutantDetailDesc;
/**
* id list json
*/
private String checkImg;
/**
* 00 01
*/
private String pollutantFlag;
/**
* 00 01
*/
private String cleanFlag;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd")
private Date inspectTime;
/**
* id
*/
private String inspectUserId;
/**
*
*/
private String createUserId;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
/**
*
*/
private String updateUserId;
/**
* 1
*/
private String rsv1;
/**
* 2
*/
private String rsv2;
/**
* 3
*/
private String rsv3;
/**
*
*/
private String partComment;
/**
*
*/
private String pollutantComment;
/**
* 00 99
*/
private String dataStatus;
public String getDataStatus() {
return dataStatus;
}
public void setDataStatus(String dataStatus) {
this.dataStatus = dataStatus;
}
public String getPartComment() {
return partComment;
}
public void setPartComment(String partComment) {
this.partComment = partComment;
}
public String getPollutantComment() {
return pollutantComment;
}
public void setPollutantComment(String pollutantComment) {
this.pollutantComment = pollutantComment;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Integer getVersion() {
return version;
}
public void setVersion(Integer version) {
this.version = version;
}
public String getMainId() {
return mainId;
}
public void setMainId(String mainId) {
this.mainId = mainId;
}
public String getOrgId() {
return orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public String getInspectOrgId() {
return inspectOrgId;
}
public void setInspectOrgId(String inspectOrgId) {
this.inspectOrgId = inspectOrgId;
}
public String getOrderId() {
return orderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
public String getCompanyId() {
return companyId;
}
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
public String getShipName() {
return shipName;
}
public void setShipName(String shipName) {
this.shipName = shipName;
}
public String getCarVin() {
return carVin;
}
public void setCarVin(String carVin) {
this.carVin = carVin;
}
public String getCheckType() {
return checkType;
}
public void setCheckType(String checkType) {
this.checkType = checkType;
}
public String getInspectPartFirst() {
return inspectPartFirst;
}
public void setInspectPartFirst(String inspectPartFirst) {
this.inspectPartFirst = inspectPartFirst;
}
public String getInspectPartSecond() {
return inspectPartSecond;
}
public void setInspectPartSecond(String inspectPartSecond) {
this.inspectPartSecond = inspectPartSecond;
}
public String getInspectSite() {
return inspectSite;
}
public void setInspectSite(String inspectSite) {
this.inspectSite = inspectSite;
}
public String getPollutantType() {
return pollutantType;
}
public void setPollutantType(String pollutantType) {
this.pollutantType = pollutantType;
}
public String getPollutantDetailType() {
return pollutantDetailType;
}
public void setPollutantDetailType(String pollutantDetailType) {
this.pollutantDetailType = pollutantDetailType;
}
public String getPollutantDetailDesc() {
return pollutantDetailDesc;
}
public void setPollutantDetailDesc(String pollutantDetailDesc) {
this.pollutantDetailDesc = pollutantDetailDesc;
}
public String getCheckImg() {
return checkImg;
}
public void setCheckImg(String checkImg) {
this.checkImg = checkImg;
}
public String getPollutantFlag() {
return pollutantFlag;
}
public void setPollutantFlag(String pollutantFlag) {
this.pollutantFlag = pollutantFlag;
}
public String getCleanFlag() {
return cleanFlag;
}
public void setCleanFlag(String cleanFlag) {
this.cleanFlag = cleanFlag;
}
public Date getInspectTime() {
return inspectTime;
}
public void setInspectTime(Date inspectTime) {
this.inspectTime = inspectTime;
}
public String getInspectUserId() {
return inspectUserId;
}
public void setInspectUserId(String inspectUserId) {
this.inspectUserId = inspectUserId;
}
public String getCreateUserId() {
return createUserId;
}
public void setCreateUserId(String createUserId) {
this.createUserId = createUserId;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getUpdateUserId() {
return updateUserId;
}
public void setUpdateUserId(String updateUserId) {
this.updateUserId = updateUserId;
}
public String getRsv1() {
return rsv1;
}
public void setRsv1(String rsv1) {
this.rsv1 = rsv1;
}
public String getRsv2() {
return rsv2;
}
public void setRsv2(String rsv2) {
this.rsv2 = rsv2;
}
public String getRsv3() {
return rsv3;
}
public void setRsv3(String rsv3) {
this.rsv3 = rsv3;
}
}

@ -0,0 +1,447 @@
package com.jiuyv.appgate.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
/**
* tbl_car_inspect_detail_info
*
* @author jiuyv
* @date 2023-07-18
*/
public class TblCarInspectDetailInfo {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
* version
*/
private Integer version;
/**
* id
*/
private String mainId;
/**
* id
*/
private String orgId;
/**
* id
*/
private String inspectOrgId;
/**
*
*/
private String orderId;
/**
*
*/
private String companyId;
/**
*
*/
private String shipName;
/**
*
*/
private String carVin;
/**
* 00 01
*/
private String checkType;
/**
*
*/
private String inspectPartFirst;
/**
*
*/
private String inspectPartSecond;
/**
*
*/
private String inspectSite;
/**
*
*/
private String pollutantType;
/**
*
*/
private String pollutantDetailType;
/**
*
*/
private String pollutantDetailDesc;
/**
* id list json
*/
private String checkImg;
/**
* 00 01
*/
private String pollutantFlag;
/**
* 00 01
*/
private String cleanFlag;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd")
private Date inspectTime;
/**
* id
*/
private String inspectUserId;
/**
*
*/
private String createUserId;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
/**
*
*/
private String updateUserId;
/**
* 1
*/
private String rsv1;
/**
* 2
*/
private String rsv2;
/**
* 3
*/
private String rsv3;
/**
*
*/
private String partComment;
/**
*
*/
private String pollutantComment;
/**
* 00 99
*/
private String dataStatus;
public String getDataStatus() {
return dataStatus;
}
public void setDataStatus(String dataStatus) {
this.dataStatus = dataStatus;
}
public String getPartComment() {
return partComment;
}
public void setPartComment(String partComment) {
this.partComment = partComment;
}
public String getPollutantComment() {
return pollutantComment;
}
public void setPollutantComment(String pollutantComment) {
this.pollutantComment = pollutantComment;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Integer getVersion() {
return version;
}
public void setVersion(Integer version) {
this.version = version;
}
public String getMainId() {
return mainId;
}
public void setMainId(String mainId) {
this.mainId = mainId;
}
public String getOrgId() {
return orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public String getInspectOrgId() {
return inspectOrgId;
}
public void setInspectOrgId(String inspectOrgId) {
this.inspectOrgId = inspectOrgId;
}
public String getOrderId() {
return orderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
public String getCompanyId() {
return companyId;
}
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
public String getShipName() {
return shipName;
}
public void setShipName(String shipName) {
this.shipName = shipName;
}
public String getCarVin() {
return carVin;
}
public void setCarVin(String carVin) {
this.carVin = carVin;
}
public String getCheckType() {
return checkType;
}
public void setCheckType(String checkType) {
this.checkType = checkType;
}
public String getInspectPartFirst() {
return inspectPartFirst;
}
public void setInspectPartFirst(String inspectPartFirst) {
this.inspectPartFirst = inspectPartFirst;
}
public String getInspectPartSecond() {
return inspectPartSecond;
}
public void setInspectPartSecond(String inspectPartSecond) {
this.inspectPartSecond = inspectPartSecond;
}
public String getInspectSite() {
return inspectSite;
}
public void setInspectSite(String inspectSite) {
this.inspectSite = inspectSite;
}
public String getPollutantType() {
return pollutantType;
}
public void setPollutantType(String pollutantType) {
this.pollutantType = pollutantType;
}
public String getPollutantDetailType() {
return pollutantDetailType;
}
public void setPollutantDetailType(String pollutantDetailType) {
this.pollutantDetailType = pollutantDetailType;
}
public String getPollutantDetailDesc() {
return pollutantDetailDesc;
}
public void setPollutantDetailDesc(String pollutantDetailDesc) {
this.pollutantDetailDesc = pollutantDetailDesc;
}
public String getCheckImg() {
return checkImg;
}
public void setCheckImg(String checkImg) {
this.checkImg = checkImg;
}
public String getPollutantFlag() {
return pollutantFlag;
}
public void setPollutantFlag(String pollutantFlag) {
this.pollutantFlag = pollutantFlag;
}
public String getCleanFlag() {
return cleanFlag;
}
public void setCleanFlag(String cleanFlag) {
this.cleanFlag = cleanFlag;
}
public Date getInspectTime() {
return inspectTime;
}
public void setInspectTime(Date inspectTime) {
this.inspectTime = inspectTime;
}
public String getInspectUserId() {
return inspectUserId;
}
public void setInspectUserId(String inspectUserId) {
this.inspectUserId = inspectUserId;
}
public String getCreateUserId() {
return createUserId;
}
public void setCreateUserId(String createUserId) {
this.createUserId = createUserId;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getUpdateUserId() {
return updateUserId;
}
public void setUpdateUserId(String updateUserId) {
this.updateUserId = updateUserId;
}
public String getRsv1() {
return rsv1;
}
public void setRsv1(String rsv1) {
this.rsv1 = rsv1;
}
public String getRsv2() {
return rsv2;
}
public void setRsv2(String rsv2) {
this.rsv2 = rsv2;
}
public String getRsv3() {
return rsv3;
}
public void setRsv3(String rsv3) {
this.rsv3 = rsv3;
}
}

@ -0,0 +1,349 @@
package com.jiuyv.appgate.domain;
import java.util.Date;
/**
* tbl_car_inspect_his_info
*
* @author jiuyv
* @date 2023-07-18
*/
public class TblCarInspectHisInfo {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
* version
*/
private Integer version;
/**
* d
*/
private String orgId;
/**
* id
*/
private String inspectOrgId;
/**
*
*/
private String orderId;
/**
*
*/
private String companyId;
/**
*
*/
private String shipName;
/**
*
*/
private String carVin;
/**
*
*/
private String chassisInspectSite;
/**
*
*/
private String carBodyInspectSite;
/**
*
*/
private String chassisInspectStatus;
/**
*
*/
private String carBodyInspectStatus;
/**
*
*/
private String carModel;
/**
*
*/
private Integer carNumber;
/**
* 00 01
*/
private String status;
/**
*
*/
private Date createTime;
/**
*
*/
private String createUserId;
/**
*
*/
private Date updateTime;
/**
*
*/
private String updateUserId;
/**
* 1
*/
private String rsv1;
/**
* 2
*/
private String rsv2;
/**
* 3
*/
private String rsv3;
/**
*
*/
private Date carBodyInspectTime;
/**
*
*/
private Date chassisInspectTime;
public Date getCarBodyInspectTime() {
return carBodyInspectTime;
}
public void setCarBodyInspectTime(Date carBodyInspectTime) {
this.carBodyInspectTime = carBodyInspectTime;
}
public Date getChassisInspectTime() {
return chassisInspectTime;
}
public void setChassisInspectTime(Date chassisInspectTime) {
this.chassisInspectTime = chassisInspectTime;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Integer getVersion() {
return version;
}
public void setVersion(Integer version) {
this.version = version;
}
public String getOrgId() {
return orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public String getInspectOrgId() {
return inspectOrgId;
}
public void setInspectOrgId(String inspectOrgId) {
this.inspectOrgId = inspectOrgId;
}
public String getOrderId() {
return orderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
public String getCompanyId() {
return companyId;
}
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
public String getShipName() {
return shipName;
}
public void setShipName(String shipName) {
this.shipName = shipName;
}
public String getCarVin() {
return carVin;
}
public void setCarVin(String carVin) {
this.carVin = carVin;
}
public String getChassisInspectSite() {
return chassisInspectSite;
}
public void setChassisInspectSite(String chassisInspectSite) {
this.chassisInspectSite = chassisInspectSite;
}
public String getCarBodyInspectSite() {
return carBodyInspectSite;
}
public void setCarBodyInspectSite(String carBodyInspectSite) {
this.carBodyInspectSite = carBodyInspectSite;
}
public String getChassisInspectStatus() {
return chassisInspectStatus;
}
public void setChassisInspectStatus(String chassisInspectStatus) {
this.chassisInspectStatus = chassisInspectStatus;
}
public String getCarBodyInspectStatus() {
return carBodyInspectStatus;
}
public void setCarBodyInspectStatus(String carBodyInspectStatus) {
this.carBodyInspectStatus = carBodyInspectStatus;
}
public String getCarModel() {
return carModel;
}
public void setCarModel(String carModel) {
this.carModel = carModel;
}
public Integer getCarNumber() {
return carNumber;
}
public void setCarNumber(Integer carNumber) {
this.carNumber = carNumber;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getCreateUserId() {
return createUserId;
}
public void setCreateUserId(String createUserId) {
this.createUserId = createUserId;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getUpdateUserId() {
return updateUserId;
}
public void setUpdateUserId(String updateUserId) {
this.updateUserId = updateUserId;
}
public String getRsv1() {
return rsv1;
}
public void setRsv1(String rsv1) {
this.rsv1 = rsv1;
}
public String getRsv2() {
return rsv2;
}
public void setRsv2(String rsv2) {
this.rsv2 = rsv2;
}
public String getRsv3() {
return rsv3;
}
public void setRsv3(String rsv3) {
this.rsv3 = rsv3;
}
}

@ -0,0 +1,364 @@
package com.jiuyv.appgate.domain;
import java.util.Date;
/**
* tbl_car_inspect_info
*
* @author jiuyv
* @date 2023-07-18
*/
public class TblCarInspectInfo {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
* version
*/
private Integer version;
/**
* d
*/
private String orgId;
/**
* id
*/
private String inspectOrgId;
/**
*
*/
private String orderId;
/**
*
*/
private String companyId;
/**
*
*/
private String shipName;
/**
*
*/
private String carVin;
/**
*
*/
private String chassisInspectSite;
/**
*
*/
private String carBodyInspectSite;
/**
*
*/
private String chassisInspectStatus;
/**
*
*/
private String carBodyInspectStatus;
/**
*
*/
private String carModel;
/**
*
*/
private Integer carNumber;
/**
* 00 01
*/
private String status;
/**
*
*/
private Date createTime;
/**
*
*/
private String createUserId;
/**
*
*/
private Date updateTime;
/**
*
*/
private String updateUserId;
/**
* 1
*/
private String rsv1;
/**
* 2
*/
private String rsv2;
/**
* 3
*/
private String rsv3;
/**
*
*/
private Date carBodyInspectTime;
/**
*
*/
private Date chassisInspectTime;
private String checkType;
/**
* 00 excel 01 app
*/
private String srcType;
public String getSrcType() {
return srcType;
}
public void setSrcType(String srcType) {
this.srcType = srcType;
}
public String getCheckType() {
return checkType;
}
public void setCheckType(String checkType) {
this.checkType = checkType;
}
public Date getCarBodyInspectTime() {
return carBodyInspectTime;
}
public void setCarBodyInspectTime(Date carBodyInspectTime) {
this.carBodyInspectTime = carBodyInspectTime;
}
public Date getChassisInspectTime() {
return chassisInspectTime;
}
public void setChassisInspectTime(Date chassisInspectTime) {
this.chassisInspectTime = chassisInspectTime;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Integer getVersion() {
return version;
}
public void setVersion(Integer version) {
this.version = version;
}
public String getOrgId() {
return orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public String getInspectOrgId() {
return inspectOrgId;
}
public void setInspectOrgId(String inspectOrgId) {
this.inspectOrgId = inspectOrgId;
}
public String getOrderId() {
return orderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
public String getCompanyId() {
return companyId;
}
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
public String getShipName() {
return shipName;
}
public void setShipName(String shipName) {
this.shipName = shipName;
}
public String getCarVin() {
return carVin;
}
public void setCarVin(String carVin) {
this.carVin = carVin;
}
public String getChassisInspectSite() {
return chassisInspectSite;
}
public void setChassisInspectSite(String chassisInspectSite) {
this.chassisInspectSite = chassisInspectSite;
}
public String getCarBodyInspectSite() {
return carBodyInspectSite;
}
public void setCarBodyInspectSite(String carBodyInspectSite) {
this.carBodyInspectSite = carBodyInspectSite;
}
public String getChassisInspectStatus() {
return chassisInspectStatus;
}
public void setChassisInspectStatus(String chassisInspectStatus) {
this.chassisInspectStatus = chassisInspectStatus;
}
public String getCarBodyInspectStatus() {
return carBodyInspectStatus;
}
public void setCarBodyInspectStatus(String carBodyInspectStatus) {
this.carBodyInspectStatus = carBodyInspectStatus;
}
public String getCarModel() {
return carModel;
}
public void setCarModel(String carModel) {
this.carModel = carModel;
}
public Integer getCarNumber() {
return carNumber;
}
public void setCarNumber(Integer carNumber) {
this.carNumber = carNumber;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getCreateUserId() {
return createUserId;
}
public void setCreateUserId(String createUserId) {
this.createUserId = createUserId;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getUpdateUserId() {
return updateUserId;
}
public void setUpdateUserId(String updateUserId) {
this.updateUserId = updateUserId;
}
public String getRsv1() {
return rsv1;
}
public void setRsv1(String rsv1) {
this.rsv1 = rsv1;
}
public String getRsv2() {
return rsv2;
}
public void setRsv2(String rsv2) {
this.rsv2 = rsv2;
}
public String getRsv3() {
return rsv3;
}
public void setRsv3(String rsv3) {
this.rsv3 = rsv3;
}
}

@ -0,0 +1,378 @@
package com.jiuyv.appgate.domain;
import java.util.Date;
/**
* tbl_car_order_formal_detail_his_info
*
* @author jiuyv
* @date 2023-07-18
*/
public class TblCarOrderFormalDetailHisInfo {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
*
*/
private Integer version;
/**
* id
*/
private String orgId;
/**
* id
*/
private String inspectOrgId;
/**
*
*/
private String preOrderId;
/**
*
*/
private String orderId;
/**
*
*/
private String companyId;
/**
*
*/
private String carVin;
/**
*
*/
private String shipName;
/**
*
*/
private String chassisInspectSite;
/**
*
*/
private String carBodyInspectSite;
/**
*
*/
private String waybillNumber;
/**
* 00 excel 01
*/
private String srcType;
/**
*
*/
private String departPort;
/**
*
*/
private Integer carNumber;
/**
*
*/
private String carModel;
/**
*
*/
private String destinationPort;
/**
*
*/
private String destinationCountry;
/**
* 00 01
*/
private String status;
/**
*
*/
private Date createTime;
/**
*
*/
private String createUserId;
/**
*
*/
private Date updateTime;
/**
*
*/
private String updateUserId;
/**
* 1
*/
private String rsv1;
/**
* 2
*/
private String rsv2;
/**
* 3
*/
private String rsv3;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Integer getVersion() {
return version;
}
public void setVersion(Integer version) {
this.version = version;
}
public String getOrgId() {
return orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public String getInspectOrgId() {
return inspectOrgId;
}
public void setInspectOrgId(String inspectOrgId) {
this.inspectOrgId = inspectOrgId;
}
public String getPreOrderId() {
return preOrderId;
}
public void setPreOrderId(String preOrderId) {
this.preOrderId = preOrderId;
}
public String getOrderId() {
return orderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
public String getCompanyId() {
return companyId;
}
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
public String getCarVin() {
return carVin;
}
public void setCarVin(String carVin) {
this.carVin = carVin;
}
public String getShipName() {
return shipName;
}
public void setShipName(String shipName) {
this.shipName = shipName;
}
public String getChassisInspectSite() {
return chassisInspectSite;
}
public void setChassisInspectSite(String chassisInspectSite) {
this.chassisInspectSite = chassisInspectSite;
}
public String getCarBodyInspectSite() {
return carBodyInspectSite;
}
public void setCarBodyInspectSite(String carBodyInspectSite) {
this.carBodyInspectSite = carBodyInspectSite;
}
public String getWaybillNumber() {
return waybillNumber;
}
public void setWaybillNumber(String waybillNumber) {
this.waybillNumber = waybillNumber;
}
public String getSrcType() {
return srcType;
}
public void setSrcType(String srcType) {
this.srcType = srcType;
}
public String getDepartPort() {
return departPort;
}
public void setDepartPort(String departPort) {
this.departPort = departPort;
}
public Integer getCarNumber() {
return carNumber;
}
public void setCarNumber(Integer carNumber) {
this.carNumber = carNumber;
}
public String getCarModel() {
return carModel;
}
public void setCarModel(String carModel) {
this.carModel = carModel;
}
public String getDestinationPort() {
return destinationPort;
}
public void setDestinationPort(String destinationPort) {
this.destinationPort = destinationPort;
}
public String getDestinationCountry() {
return destinationCountry;
}
public void setDestinationCountry(String destinationCountry) {
this.destinationCountry = destinationCountry;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getCreateUserId() {
return createUserId;
}
public void setCreateUserId(String createUserId) {
this.createUserId = createUserId;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getUpdateUserId() {
return updateUserId;
}
public void setUpdateUserId(String updateUserId) {
this.updateUserId = updateUserId;
}
public String getRsv1() {
return rsv1;
}
public void setRsv1(String rsv1) {
this.rsv1 = rsv1;
}
public String getRsv2() {
return rsv2;
}
public void setRsv2(String rsv2) {
this.rsv2 = rsv2;
}
public String getRsv3() {
return rsv3;
}
public void setRsv3(String rsv3) {
this.rsv3 = rsv3;
}
}

@ -0,0 +1,377 @@
package com.jiuyv.appgate.domain;
import java.util.Date;
/**
* tbl_car_order_formal_detail_info
*
* @author jiuyv
* @date 2023-07-18
*/
public class TblCarOrderFormalDetailInfo {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
*
*/
private Integer version;
/**
* id
*/
private String orgId;
/**
* id
*/
private String inspectOrgId;
/**
*
*/
private String preOrderId;
/**
*
*/
private String orderId;
/**
*
*/
private String companyId;
/**
*
*/
private String carVin;
/**
*
*/
private String shipName;
/**
*
*/
private String chassisInspectSite;
/**
*
*/
private String carBodyInspectSite;
/**
*
*/
private String waybillNumber;
/**
* 00 excel 01
*/
private String srcType;
/**
*
*/
private String departPort;
/**
*
*/
private Integer carNumber;
/**
*
*/
private String carModel;
/**
*
*/
private String destinationPort;
/**
*
*/
private String destinationCountry;
/**
* 00 01
*/
private String status;
/**
*
*/
private Date createTime;
/**
*
*/
private String createUserId;
/**
*
*/
private Date updateTime;
/**
*
*/
private String updateUserId;
/**
* 1
*/
private String rsv1;
/**
* 2
*/
private String rsv2;
/**
* 3
*/
private String rsv3;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Integer getVersion() {
return version;
}
public void setVersion(Integer version) {
this.version = version;
}
public String getOrgId() {
return orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public String getInspectOrgId() {
return inspectOrgId;
}
public void setInspectOrgId(String inspectOrgId) {
this.inspectOrgId = inspectOrgId;
}
public String getPreOrderId() {
return preOrderId;
}
public void setPreOrderId(String preOrderId) {
this.preOrderId = preOrderId;
}
public String getOrderId() {
return orderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
public String getCompanyId() {
return companyId;
}
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
public String getCarVin() {
return carVin;
}
public void setCarVin(String carVin) {
this.carVin = carVin;
}
public String getShipName() {
return shipName;
}
public void setShipName(String shipName) {
this.shipName = shipName;
}
public String getChassisInspectSite() {
return chassisInspectSite;
}
public void setChassisInspectSite(String chassisInspectSite) {
this.chassisInspectSite = chassisInspectSite;
}
public String getCarBodyInspectSite() {
return carBodyInspectSite;
}
public void setCarBodyInspectSite(String carBodyInspectSite) {
this.carBodyInspectSite = carBodyInspectSite;
}
public String getWaybillNumber() {
return waybillNumber;
}
public void setWaybillNumber(String waybillNumber) {
this.waybillNumber = waybillNumber;
}
public String getSrcType() {
return srcType;
}
public void setSrcType(String srcType) {
this.srcType = srcType;
}
public String getDepartPort() {
return departPort;
}
public void setDepartPort(String departPort) {
this.departPort = departPort;
}
public Integer getCarNumber() {
return carNumber;
}
public void setCarNumber(Integer carNumber) {
this.carNumber = carNumber;
}
public String getCarModel() {
return carModel;
}
public void setCarModel(String carModel) {
this.carModel = carModel;
}
public String getDestinationPort() {
return destinationPort;
}
public void setDestinationPort(String destinationPort) {
this.destinationPort = destinationPort;
}
public String getDestinationCountry() {
return destinationCountry;
}
public void setDestinationCountry(String destinationCountry) {
this.destinationCountry = destinationCountry;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getCreateUserId() {
return createUserId;
}
public void setCreateUserId(String createUserId) {
this.createUserId = createUserId;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getUpdateUserId() {
return updateUserId;
}
public void setUpdateUserId(String updateUserId) {
this.updateUserId = updateUserId;
}
public String getRsv1() {
return rsv1;
}
public void setRsv1(String rsv1) {
this.rsv1 = rsv1;
}
public String getRsv2() {
return rsv2;
}
public void setRsv2(String rsv2) {
this.rsv2 = rsv2;
}
public String getRsv3() {
return rsv3;
}
public void setRsv3(String rsv3) {
this.rsv3 = rsv3;
}
}

@ -0,0 +1,278 @@
package com.jiuyv.appgate.domain;
import java.util.Date;
/**
* tbl_car_order_formal_his_info
*
* @author jiuyv
* @date 2023-07-18
*/
public class TblCarOrderFormalHisInfo {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
*
*/
private Integer version;
/**
* id
*/
private String orgId;
/**
* id
*/
private String inspectOrgId;
/**
*
*/
private String preOrderId;
/**
*
*/
private String orderId;
/**
*
*/
private String companyId;
/**
*
*/
private String shipName;
/**
* 00 01
*/
private String status;
/**
* id
*/
private String fileId;
/**
*
*/
private String fileName;
/**
*
*/
private Integer carCount;
/**
*
*/
private Date createTime;
/**
*
*/
private String createUserId;
/**
*
*/
private Date updateTime;
/**
*
*/
private String updateUserId;
/**
* 1
*/
private String rsv1;
/**
* 2
*/
private String rsv2;
/**
* 3
*/
private String rsv3;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Integer getVersion() {
return version;
}
public void setVersion(Integer version) {
this.version = version;
}
public String getOrgId() {
return orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public String getInspectOrgId() {
return inspectOrgId;
}
public void setInspectOrgId(String inspectOrgId) {
this.inspectOrgId = inspectOrgId;
}
public String getPreOrderId() {
return preOrderId;
}
public void setPreOrderId(String preOrderId) {
this.preOrderId = preOrderId;
}
public String getOrderId() {
return orderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
public String getCompanyId() {
return companyId;
}
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
public String getShipName() {
return shipName;
}
public void setShipName(String shipName) {
this.shipName = shipName;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getFileId() {
return fileId;
}
public void setFileId(String fileId) {
this.fileId = fileId;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public Integer getCarCount() {
return carCount;
}
public void setCarCount(Integer carCount) {
this.carCount = carCount;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getCreateUserId() {
return createUserId;
}
public void setCreateUserId(String createUserId) {
this.createUserId = createUserId;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getUpdateUserId() {
return updateUserId;
}
public void setUpdateUserId(String updateUserId) {
this.updateUserId = updateUserId;
}
public String getRsv1() {
return rsv1;
}
public void setRsv1(String rsv1) {
this.rsv1 = rsv1;
}
public String getRsv2() {
return rsv2;
}
public void setRsv2(String rsv2) {
this.rsv2 = rsv2;
}
public String getRsv3() {
return rsv3;
}
public void setRsv3(String rsv3) {
this.rsv3 = rsv3;
}
}

@ -0,0 +1,288 @@
package com.jiuyv.appgate.domain;
import java.util.Date;
/**
* tbl_car_order_formal_info
*
* @author jiuyv
* @date 2023-07-18
*/
public class TblCarOrderFormalInfo {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
*
*/
private Integer version;
/**
* id
*/
private String orgId;
/**
* id
*/
private String inspectOrgId;
/**
*
*/
private String preOrderId;
/**
*
*/
private String orderId;
/**
*
*/
private String companyId;
/**
*
*/
private String shipName;
/**
* 00 01
*/
private String status;
/**
* id
*/
private String fileId;
/**
*
*/
private String fileName;
/**
*
*/
private Integer carCount;
/**
*
*/
private Date createTime;
/**
*
*/
private String createUserId;
/**
*
*/
private Date updateTime;
/**
*
*/
private String updateUserId;
/**
* 1
*/
private String rsv1;
/**
* 2
*/
private String rsv2;
/**
* 3
*/
private String rsv3;
private String companyName;
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Integer getVersion() {
return version;
}
public void setVersion(Integer version) {
this.version = version;
}
public String getOrgId() {
return orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public String getInspectOrgId() {
return inspectOrgId;
}
public void setInspectOrgId(String inspectOrgId) {
this.inspectOrgId = inspectOrgId;
}
public String getPreOrderId() {
return preOrderId;
}
public void setPreOrderId(String preOrderId) {
this.preOrderId = preOrderId;
}
public String getOrderId() {
return orderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
public String getCompanyId() {
return companyId;
}
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
public String getShipName() {
return shipName;
}
public void setShipName(String shipName) {
this.shipName = shipName;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getFileId() {
return fileId;
}
public void setFileId(String fileId) {
this.fileId = fileId;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public Integer getCarCount() {
return carCount;
}
public void setCarCount(Integer carCount) {
this.carCount = carCount;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getCreateUserId() {
return createUserId;
}
public void setCreateUserId(String createUserId) {
this.createUserId = createUserId;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getUpdateUserId() {
return updateUserId;
}
public void setUpdateUserId(String updateUserId) {
this.updateUserId = updateUserId;
}
public String getRsv1() {
return rsv1;
}
public void setRsv1(String rsv1) {
this.rsv1 = rsv1;
}
public String getRsv2() {
return rsv2;
}
public void setRsv2(String rsv2) {
this.rsv2 = rsv2;
}
public String getRsv3() {
return rsv3;
}
public void setRsv3(String rsv3) {
this.rsv3 = rsv3;
}
}

@ -0,0 +1,321 @@
package com.jiuyv.appgate.domain;
import java.util.Date;
/**
* tbl_car_pre_record_detail_info
*
* @author jiuyv
* @date 2023-07-18
*/
public class TblCarPreRecordDetailInfo {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
*
*/
private String version;
/**
* id
*/
private String orgId;
/**
*
*/
private String preOrderId;
/**
*
*/
private String companyId;
/**
*
*/
private String carVin;
/**
*
*/
private String shipName;
/**
*
*/
private String chassisInspectSite;
/**
*
*/
private String carBodyInspectSite;
/**
*
*/
private String waybillNumber;
/**
*
*/
private String departPort;
/**
*
*/
private String carNumber;
/**
*
*/
private String carModel;
/**
*
*/
private String destinationPort;
/**
*
*/
private String destinationCountry;
/**
*
*/
private Date createTime;
/**
*
*/
private String createUserId;
/**
*
*/
private Date updateTime;
/**
*
*/
private String updateUserId;
/**
* 1
*/
private String rsv1;
/**
* 2
*/
private String rsv2;
/**
* 3
*/
private String rsv3;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getOrgId() {
return orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public String getPreOrderId() {
return preOrderId;
}
public void setPreOrderId(String preOrderId) {
this.preOrderId = preOrderId;
}
public String getCompanyId() {
return companyId;
}
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
public String getCarVin() {
return carVin;
}
public void setCarVin(String carVin) {
this.carVin = carVin;
}
public String getShipName() {
return shipName;
}
public void setShipName(String shipName) {
this.shipName = shipName;
}
public String getChassisInspectSite() {
return chassisInspectSite;
}
public void setChassisInspectSite(String chassisInspectSite) {
this.chassisInspectSite = chassisInspectSite;
}
public String getCarBodyInspectSite() {
return carBodyInspectSite;
}
public void setCarBodyInspectSite(String carBodyInspectSite) {
this.carBodyInspectSite = carBodyInspectSite;
}
public String getWaybillNumber() {
return waybillNumber;
}
public void setWaybillNumber(String waybillNumber) {
this.waybillNumber = waybillNumber;
}
public String getDepartPort() {
return departPort;
}
public void setDepartPort(String departPort) {
this.departPort = departPort;
}
public String getCarNumber() {
return carNumber;
}
public void setCarNumber(String carNumber) {
this.carNumber = carNumber;
}
public String getCarModel() {
return carModel;
}
public void setCarModel(String carModel) {
this.carModel = carModel;
}
public String getDestinationPort() {
return destinationPort;
}
public void setDestinationPort(String destinationPort) {
this.destinationPort = destinationPort;
}
public String getDestinationCountry() {
return destinationCountry;
}
public void setDestinationCountry(String destinationCountry) {
this.destinationCountry = destinationCountry;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getCreateUserId() {
return createUserId;
}
public void setCreateUserId(String createUserId) {
this.createUserId = createUserId;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getUpdateUserId() {
return updateUserId;
}
public void setUpdateUserId(String updateUserId) {
this.updateUserId = updateUserId;
}
public String getRsv1() {
return rsv1;
}
public void setRsv1(String rsv1) {
this.rsv1 = rsv1;
}
public String getRsv2() {
return rsv2;
}
public void setRsv2(String rsv2) {
this.rsv2 = rsv2;
}
public String getRsv3() {
return rsv3;
}
public void setRsv3(String rsv3) {
this.rsv3 = rsv3;
}
}

@ -0,0 +1,251 @@
package com.jiuyv.appgate.domain;
import java.util.Date;
/**
* tbl_car_pre_record_info
*
* @author jiuyv
* @date 2023-07-18
*/
public class TblCarPreRecordInfo {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
*
*/
private String version;
/**
* id
*/
private String orgId;
/**
*
*/
private String preOrderId;
/**
*
*/
private String companyId;
/**
*
*/
private String shipName;
/**
* 00 01
*/
private String status;
/**
* id
*/
private String fileId;
/**
*
*/
private String fileName;
/**
*
*/
private String carCount;
/**
*
*/
private Date createTime;
/**
*
*/
private String createUserId;
/**
*
*/
private Date updateTime;
/**
*
*/
private String updateUserId;
/**
* 1
*/
private String rsv1;
/**
* 2
*/
private String rsv2;
/**
* 3
*/
private String rsv3;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getOrgId() {
return orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public String getPreOrderId() {
return preOrderId;
}
public void setPreOrderId(String preOrderId) {
this.preOrderId = preOrderId;
}
public String getCompanyId() {
return companyId;
}
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
public String getShipName() {
return shipName;
}
public void setShipName(String shipName) {
this.shipName = shipName;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getFileId() {
return fileId;
}
public void setFileId(String fileId) {
this.fileId = fileId;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public String getCarCount() {
return carCount;
}
public void setCarCount(String carCount) {
this.carCount = carCount;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getCreateUserId() {
return createUserId;
}
public void setCreateUserId(String createUserId) {
this.createUserId = createUserId;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getUpdateUserId() {
return updateUserId;
}
public void setUpdateUserId(String updateUserId) {
this.updateUserId = updateUserId;
}
public String getRsv1() {
return rsv1;
}
public void setRsv1(String rsv1) {
this.rsv1 = rsv1;
}
public String getRsv2() {
return rsv2;
}
public void setRsv2(String rsv2) {
this.rsv2 = rsv2;
}
public String getRsv3() {
return rsv3;
}
public void setRsv3(String rsv3) {
this.rsv3 = rsv3;
}
}

@ -0,0 +1,205 @@
package com.jiuyv.appgate.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
/**
* tbl_company_info
*
* @author jiuyv
* @date 2023-07-18
*/
public class TblCompanyInfo {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
*
*/
private String companyName;
/**
* id
*/
private String orgId;
/**
*
*/
private String contactName;
/**
*
*/
private String contactPhone;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd")
private Date createTime;
/**
*
*/
private String createUserId;
/**
*
*/
private Date updateTime;
/**
*
*/
private String updateUserId;
/**
* 00 01
*/
private String status;
/**
* 00 99
*/
private String dataStatus;
/**
* 1
*/
private String rsv1;
/**
* 2
*/
private String rsv2;
/**
* 3
*/
private String rsv3;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public String getOrgId() {
return orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public String getContactName() {
return contactName;
}
public void setContactName(String contactName) {
this.contactName = contactName;
}
public String getContactPhone() {
return contactPhone;
}
public void setContactPhone(String contactPhone) {
this.contactPhone = contactPhone;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getCreateUserId() {
return createUserId;
}
public void setCreateUserId(String createUserId) {
this.createUserId = createUserId;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getUpdateUserId() {
return updateUserId;
}
public void setUpdateUserId(String updateUserId) {
this.updateUserId = updateUserId;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getDataStatus() {
return dataStatus;
}
public void setDataStatus(String dataStatus) {
this.dataStatus = dataStatus;
}
public String getRsv1() {
return rsv1;
}
public void setRsv1(String rsv1) {
this.rsv1 = rsv1;
}
public String getRsv2() {
return rsv2;
}
public void setRsv2(String rsv2) {
this.rsv2 = rsv2;
}
public String getRsv3() {
return rsv3;
}
public void setRsv3(String rsv3) {
this.rsv3 = rsv3;
}
}

@ -0,0 +1,209 @@
package com.jiuyv.appgate.domain;
import java.util.Date;
/**
* tbl_file_info
*
* @author jiuyv
* @date 2023-07-18
*/
public class TblFileInfo {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
*
*/
private String businessId;
/**
* 00 excel 01
*/
private String fileType;
/**
*
*/
private String fileName;
/**
*
*/
private String filePath;
/**
* 访:
*/
private String fileUrl;
/**
* 00 99
*/
private String status;
/**
* id
*/
private String createUserId;
/**
*
*/
private Date createTime;
/**
* id
*/
private String updateUserId;
/**
*
*/
private Date updateTime;
/**
* 1
*/
private String rsv1;
/**
* 2
*/
private String rsv2;
/**
* 3
*/
private String rsv3;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getBusinessId() {
return businessId;
}
public void setBusinessId(String businessId) {
this.businessId = businessId;
}
public String getFileType() {
return fileType;
}
public void setFileType(String fileType) {
this.fileType = fileType;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public String getFilePath() {
return filePath;
}
public void setFilePath(String filePath) {
this.filePath = filePath;
}
public String getFileUrl() {
return fileUrl;
}
public void setFileUrl(String fileUrl) {
this.fileUrl = fileUrl;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getCreateUserId() {
return createUserId;
}
public void setCreateUserId(String createUserId) {
this.createUserId = createUserId;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getUpdateUserId() {
return updateUserId;
}
public void setUpdateUserId(String updateUserId) {
this.updateUserId = updateUserId;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getRsv1() {
return rsv1;
}
public void setRsv1(String rsv1) {
this.rsv1 = rsv1;
}
public String getRsv2() {
return rsv2;
}
public void setRsv2(String rsv2) {
this.rsv2 = rsv2;
}
public String getRsv3() {
return rsv3;
}
public void setRsv3(String rsv3) {
this.rsv3 = rsv3;
}
}

@ -0,0 +1,362 @@
package com.jiuyv.appgate.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
/**
* tbl_inspect_record_info
*
* @author jiuyv
* @date 2023-07-18
*/
public class TblInspectRecordInfo {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
* version
*/
private Integer version;
/**
* id
*/
private String orgId;
/**
* id
*/
private String inspectOrgId;
/**
*
*/
private String orderId;
/**
*
*/
private String companyId;
/**
*
*/
private String shipName;
/**
*
*/
private String carVin;
/**
*
*/
private String chassisInspectSite;
/**
*
*/
private String carBodyInspectSite;
/**
*
*/
private String chassisInspectStatus;
/**
*
*/
private String carBodyInspectStatus;
/**
*
*/
private String carBodyInspectUserId;
/**
*
*/
private String chassisInspectUserId;
/**
*
*/
//@JsonFormat(pattern = "yyyy-MM-dd")
private Date carBodyInspectStartTime;
/**
*
*/
//@JsonFormat(pattern = "yyyy-MM-dd")
private Date carBodyInspectFinishTime;
/**
*
*/
//@JsonFormat(pattern = "yyyy-MM-dd")
private Date chassisInspectStartTime;
/**
*
*/
//@JsonFormat(pattern = "yyyy-MM-dd")
private Date chassisInspectFinishTime;
/**
*
*/
private String createUserId;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
/**
*
*/
private String updateUserId;
/**
* 1
*/
private String rsv1;
/**
* 2
*/
private String rsv2;
/**
* 3
*/
private String rsv3;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Integer getVersion() {
return version;
}
public void setVersion(Integer version) {
this.version = version;
}
public String getOrgId() {
return orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public String getInspectOrgId() {
return inspectOrgId;
}
public void setInspectOrgId(String inspectOrgId) {
this.inspectOrgId = inspectOrgId;
}
public String getOrderId() {
return orderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
public String getCompanyId() {
return companyId;
}
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
public String getShipName() {
return shipName;
}
public void setShipName(String shipName) {
this.shipName = shipName;
}
public String getCarVin() {
return carVin;
}
public void setCarVin(String carVin) {
this.carVin = carVin;
}
public String getChassisInspectSite() {
return chassisInspectSite;
}
public void setChassisInspectSite(String chassisInspectSite) {
this.chassisInspectSite = chassisInspectSite;
}
public String getCarBodyInspectSite() {
return carBodyInspectSite;
}
public void setCarBodyInspectSite(String carBodyInspectSite) {
this.carBodyInspectSite = carBodyInspectSite;
}
public String getChassisInspectStatus() {
return chassisInspectStatus;
}
public void setChassisInspectStatus(String chassisInspectStatus) {
this.chassisInspectStatus = chassisInspectStatus;
}
public String getCarBodyInspectStatus() {
return carBodyInspectStatus;
}
public void setCarBodyInspectStatus(String carBodyInspectStatus) {
this.carBodyInspectStatus = carBodyInspectStatus;
}
public String getCarBodyInspectUserId() {
return carBodyInspectUserId;
}
public void setCarBodyInspectUserId(String carBodyInspectUserId) {
this.carBodyInspectUserId = carBodyInspectUserId;
}
public String getChassisInspectUserId() {
return chassisInspectUserId;
}
public void setChassisInspectUserId(String chassisInspectUserId) {
this.chassisInspectUserId = chassisInspectUserId;
}
public Date getCarBodyInspectStartTime() {
return carBodyInspectStartTime;
}
public void setCarBodyInspectStartTime(Date carBodyInspectStartTime) {
this.carBodyInspectStartTime = carBodyInspectStartTime;
}
public Date getCarBodyInspectFinishTime() {
return carBodyInspectFinishTime;
}
public void setCarBodyInspectFinishTime(Date carBodyInspectFinishTime) {
this.carBodyInspectFinishTime = carBodyInspectFinishTime;
}
public Date getChassisInspectStartTime() {
return chassisInspectStartTime;
}
public void setChassisInspectStartTime(Date chassisInspectStartTime) {
this.chassisInspectStartTime = chassisInspectStartTime;
}
public Date getChassisInspectFinishTime() {
return chassisInspectFinishTime;
}
public void setChassisInspectFinishTime(Date chassisInspectFinishTime) {
this.chassisInspectFinishTime = chassisInspectFinishTime;
}
public String getCreateUserId() {
return createUserId;
}
public void setCreateUserId(String createUserId) {
this.createUserId = createUserId;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getUpdateUserId() {
return updateUserId;
}
public void setUpdateUserId(String updateUserId) {
this.updateUserId = updateUserId;
}
public String getRsv1() {
return rsv1;
}
public void setRsv1(String rsv1) {
this.rsv1 = rsv1;
}
public String getRsv2() {
return rsv2;
}
public void setRsv2(String rsv2) {
this.rsv2 = rsv2;
}
public String getRsv3() {
return rsv3;
}
public void setRsv3(String rsv3) {
this.rsv3 = rsv3;
}
}

@ -0,0 +1,201 @@
package com.jiuyv.appgate.domain;
import java.util.Date;
/**
* tbl_inspect_site_his_info
*
* @author jiuyv
* @date 2023-07-18
*/
public class TblInspectSiteHisInfo {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
*
*/
private String version;
/**
*
*/
private String siteName;
/**
* id
*/
private String orgId;
/**
*
*/
private String remarks;
/**
* 00 01
*/
private String status;
/**
* 00 99
*/
private String dataStatus;
/**
*
*/
private Date createTime;
/**
*
*/
private String createUserId;
/**
*
*/
private Date updateTime;
/**
*
*/
private String updateUserId;
/**
* 1
*/
private String rsv1;
/**
* 2
*/
private String rsv2;
/**
* 3
*/
private String rsv3;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getSiteName() {
return siteName;
}
public void setSiteName(String siteName) {
this.siteName = siteName;
}
public String getOrgId() {
return orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public String getRemarks() {
return remarks;
}
public void setRemarks(String remarks) {
this.remarks = remarks;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getDataStatus() {
return dataStatus;
}
public void setDataStatus(String dataStatus) {
this.dataStatus = dataStatus;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getCreateUserId() {
return createUserId;
}
public void setCreateUserId(String createUserId) {
this.createUserId = createUserId;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getUpdateUserId() {
return updateUserId;
}
public void setUpdateUserId(String updateUserId) {
this.updateUserId = updateUserId;
}
public String getRsv1() {
return rsv1;
}
public void setRsv1(String rsv1) {
this.rsv1 = rsv1;
}
public String getRsv2() {
return rsv2;
}
public void setRsv2(String rsv2) {
this.rsv2 = rsv2;
}
public String getRsv3() {
return rsv3;
}
public void setRsv3(String rsv3) {
this.rsv3 = rsv3;
}
}

@ -0,0 +1,201 @@
package com.jiuyv.appgate.domain;
import java.util.Date;
/**
* tbl_inspect_site_info
*
* @author jiuyv
* @date 2023-07-18
*/
public class TblInspectSiteInfo {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
*
*/
private String version;
/**
*
*/
private String siteName;
/**
* id
*/
private String orgId;
/**
*
*/
private String remarks;
/**
* 00 01
*/
private String status;
/**
* 00 99
*/
private String dataStatus;
/**
*
*/
private Date createTime;
/**
*
*/
private String createUserId;
/**
*
*/
private Date updateTime;
/**
*
*/
private String updateUserId;
/**
* 1
*/
private String rsv1;
/**
* 2
*/
private String rsv2;
/**
* 3
*/
private String rsv3;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getSiteName() {
return siteName;
}
public void setSiteName(String siteName) {
this.siteName = siteName;
}
public String getOrgId() {
return orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public String getRemarks() {
return remarks;
}
public void setRemarks(String remarks) {
this.remarks = remarks;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getDataStatus() {
return dataStatus;
}
public void setDataStatus(String dataStatus) {
this.dataStatus = dataStatus;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getCreateUserId() {
return createUserId;
}
public void setCreateUserId(String createUserId) {
this.createUserId = createUserId;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getUpdateUserId() {
return updateUserId;
}
public void setUpdateUserId(String updateUserId) {
this.updateUserId = updateUserId;
}
public String getRsv1() {
return rsv1;
}
public void setRsv1(String rsv1) {
this.rsv1 = rsv1;
}
public String getRsv2() {
return rsv2;
}
public void setRsv2(String rsv2) {
this.rsv2 = rsv2;
}
public String getRsv3() {
return rsv3;
}
public void setRsv3(String rsv3) {
this.rsv3 = rsv3;
}
}

@ -0,0 +1,264 @@
package com.jiuyv.appgate.domain;
import java.util.Date;
/**
* tbl_inspector_info
*
* @author jiuyv
* @date 2023-07-18
*/
public class TblInspectorInfo {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
*
*/
private String username;
/**
*
*/
private String realname;
/**
*
*/
private String password;
/**
*
*/
private String phone;
/**
* id
*/
private String orgId;
/**
* 00 01 02
*/
private String status;
/**
* 00 99
*/
private String dataStatus;
/**
*
*/
private Date createTime;
/**
* id
*/
private String createUserId;
/**
*
*/
private Date updateTime;
/**
* id
*/
private String updateUserId;
/**
* 00 01
*/
private String firstLoginFlag;
/**
* 5
*/
private Integer pwdErrCnt;
/**
*
*/
private Date lastLoginTime;
/**
* 1
*/
private String rsv1;
/**
* 2
*/
private String rsv2;
/**
* 3
*/
private String rsv3;
private String deptName;
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getRealname() {
return realname;
}
public void setRealname(String realname) {
this.realname = realname;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getOrgId() {
return orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getDataStatus() {
return dataStatus;
}
public void setDataStatus(String dataStatus) {
this.dataStatus = dataStatus;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getCreateUserId() {
return createUserId;
}
public void setCreateUserId(String createUserId) {
this.createUserId = createUserId;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getUpdateUserId() {
return updateUserId;
}
public void setUpdateUserId(String updateUserId) {
this.updateUserId = updateUserId;
}
public String getFirstLoginFlag() {
return firstLoginFlag;
}
public void setFirstLoginFlag(String firstLoginFlag) {
this.firstLoginFlag = firstLoginFlag;
}
public Integer getPwdErrCnt() {
return pwdErrCnt;
}
public void setPwdErrCnt(Integer pwdErrCnt) {
this.pwdErrCnt = pwdErrCnt;
}
public Date getLastLoginTime() {
return lastLoginTime;
}
public void setLastLoginTime(Date lastLoginTime) {
this.lastLoginTime = lastLoginTime;
}
public String getRsv1() {
return rsv1;
}
public void setRsv1(String rsv1) {
this.rsv1 = rsv1;
}
public String getRsv2() {
return rsv2;
}
public void setRsv2(String rsv2) {
this.rsv2 = rsv2;
}
public String getRsv3() {
return rsv3;
}
public void setRsv3(String rsv3) {
this.rsv3 = rsv3;
}
}

@ -0,0 +1,242 @@
package com.jiuyv.appgate.domain;
import java.util.Date;
/**
* NG tbl_ng_part_info
*
* @author jiuyv
* @date 2023-07-18
*/
public class TblNgPartInfo {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
* NG
*/
private String ngPartName;
/**
* NG
*/
private String ngPartEnName;
/**
* NG
*/
private String ngPartType;
/**
* id
*/
private String parentId;
/**
*
*/
private String sort;
/**
* 00 01
*/
private String status;
/**
* 00 99
*/
private String dataStatus;
/**
*
*/
private Date createTime;
/**
*
*/
private String createUserId;
/**
*
*/
private Date updateTime;
/**
*
*/
private String updateUserId;
/**
* 1
*/
private String rsv1;
/**
* 2
*/
private String rsv2;
/**
* 3
*/
private String rsv3;
private String partType;
private String handFill;
public String getHandFill() {
return handFill;
}
public void setHandFill(String handFill) {
this.handFill = handFill;
}
public String getPartType() {
return partType;
}
public void setPartType(String partType) {
this.partType = partType;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getNgPartName() {
return ngPartName;
}
public void setNgPartName(String ngPartName) {
this.ngPartName = ngPartName;
}
public String getNgPartEnName() {
return ngPartEnName;
}
public void setNgPartEnName(String ngPartEnName) {
this.ngPartEnName = ngPartEnName;
}
public String getNgPartType() {
return ngPartType;
}
public void setNgPartType(String ngPartType) {
this.ngPartType = ngPartType;
}
public String getParentId() {
return parentId;
}
public void setParentId(String parentId) {
this.parentId = parentId;
}
public String getSort() {
return sort;
}
public void setSort(String sort) {
this.sort = sort;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getDataStatus() {
return dataStatus;
}
public void setDataStatus(String dataStatus) {
this.dataStatus = dataStatus;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getCreateUserId() {
return createUserId;
}
public void setCreateUserId(String createUserId) {
this.createUserId = createUserId;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getUpdateUserId() {
return updateUserId;
}
public void setUpdateUserId(String updateUserId) {
this.updateUserId = updateUserId;
}
public String getRsv1() {
return rsv1;
}
public void setRsv1(String rsv1) {
this.rsv1 = rsv1;
}
public String getRsv2() {
return rsv2;
}
public void setRsv2(String rsv2) {
this.rsv2 = rsv2;
}
public String getRsv3() {
return rsv3;
}
public void setRsv3(String rsv3) {
this.rsv3 = rsv3;
}
}

@ -0,0 +1,238 @@
package com.jiuyv.appgate.domain;
import java.util.Date;
/**
* tbl_pollutant_info
*
* @author jiuyv
* @date 2023-07-18
*/
public class TblPollutantInfo {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
*
*/
private String pollutantName;
/**
*
*/
private String pollutantEnName;
/**
*
*/
private String pollutantType;
/**
* id
*/
private String parentId;
/**
*
*/
private String sort;
/**
* 00 01
*/
private String status;
/**
* 00 99
*/
private String dataStatus;
/**
*
*/
private Date createTime;
/**
*
*/
private String createUserId;
/**
*
*/
private Date updateTime;
/**
*
*/
private String updateUserId;
/**
* 1
*/
private String rsv1;
/**
* 2
*/
private String rsv2;
/**
* 3
*/
private String rsv3;
/**
* 00 01
*/
private String handFill;
public String getHandFill() {
return handFill;
}
public void setHandFill(String handFill) {
this.handFill = handFill;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getPollutantName() {
return pollutantName;
}
public void setPollutantName(String pollutantName) {
this.pollutantName = pollutantName;
}
public String getPollutantEnName() {
return pollutantEnName;
}
public void setPollutantEnName(String pollutantEnName) {
this.pollutantEnName = pollutantEnName;
}
public String getPollutantType() {
return pollutantType;
}
public void setPollutantType(String pollutantType) {
this.pollutantType = pollutantType;
}
public String getParentId() {
return parentId;
}
public void setParentId(String parentId) {
this.parentId = parentId;
}
public String getSort() {
return sort;
}
public void setSort(String sort) {
this.sort = sort;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getDataStatus() {
return dataStatus;
}
public void setDataStatus(String dataStatus) {
this.dataStatus = dataStatus;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getCreateUserId() {
return createUserId;
}
public void setCreateUserId(String createUserId) {
this.createUserId = createUserId;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getUpdateUserId() {
return updateUserId;
}
public void setUpdateUserId(String updateUserId) {
this.updateUserId = updateUserId;
}
public String getRsv1() {
return rsv1;
}
public void setRsv1(String rsv1) {
this.rsv1 = rsv1;
}
public String getRsv2() {
return rsv2;
}
public void setRsv2(String rsv2) {
this.rsv2 = rsv2;
}
public String getRsv3() {
return rsv3;
}
public void setRsv3(String rsv3) {
this.rsv3 = rsv3;
}
}

@ -0,0 +1,51 @@
package com.jiuyv.appgate.dto;
import java.io.Serializable;
/**
* @author he_jiebing@jiuyv.com
* @create 2023-07-26 17:20
*/
public class NgPartDTO implements Serializable {
private static final long serialVersionUID = -587293547402781609L;
private String level1Id;
private String level1Name;
private String level2Id;
private String level2Name;
public String getLevel1Id() {
return level1Id;
}
public void setLevel1Id(String level1Id) {
this.level1Id = level1Id;
}
public String getLevel1Name() {
return level1Name;
}
public void setLevel1Name(String level1Name) {
this.level1Name = level1Name;
}
public String getLevel2Id() {
return level2Id;
}
public void setLevel2Id(String level2Id) {
this.level2Id = level2Id;
}
public String getLevel2Name() {
return level2Name;
}
public void setLevel2Name(String level2Name) {
this.level2Name = level2Name;
}
}

@ -0,0 +1,71 @@
package com.jiuyv.appgate.dto;
import java.io.Serializable;
/**
* @author he_jiebing@jiuyv.com
* @create 2023-07-26 17:25
*/
public class PollutantDTO implements Serializable {
private static final long serialVersionUID = 1534453080125002859L;
private String level1Id;
private String level1Name;
private String level2Id;
private String level2Name;
private String level3Id;
private String level3Name;
public String getLevel1Id() {
return level1Id;
}
public void setLevel1Id(String level1Id) {
this.level1Id = level1Id;
}
public String getLevel1Name() {
return level1Name;
}
public void setLevel1Name(String level1Name) {
this.level1Name = level1Name;
}
public String getLevel2Id() {
return level2Id;
}
public void setLevel2Id(String level2Id) {
this.level2Id = level2Id;
}
public String getLevel2Name() {
return level2Name;
}
public void setLevel2Name(String level2Name) {
this.level2Name = level2Name;
}
public String getLevel3Id() {
return level3Id;
}
public void setLevel3Id(String level3Id) {
this.level3Id = level3Id;
}
public String getLevel3Name() {
return level3Name;
}
public void setLevel3Name(String level3Name) {
this.level3Name = level3Name;
}
}

@ -0,0 +1,285 @@
package com.jiuyv.appgate.dto;
import java.io.Serializable;
import java.util.Date;
/**
* @author he_jiebing@jiuyv.com
* @create 2023-07-20 10:24
*/
public class RedisUserDTO implements Serializable {
private static final long serialVersionUID = -1333175617103590029L;
/**
*
*/
private String id;
/**
*
*/
private String username;
/**
*
*/
private String realname;
/**
*
*/
private String password;
/**
*
*/
private String phone;
/**
* id
*/
private String orgId;
/**
* 00 01 02
*/
private String status;
/**
* 00 99
*/
private String dataStatus;
/**
*
*/
private Date createTime;
/**
* id
*/
private String createUserId;
/**
*
*/
private Date updateTime;
/**
* id
*/
private String updateUserId;
/**
* 00 01
*/
private String firstLoginFlag;
/**
* 5
*/
private Integer pwdErrCnt;
/**
*
*/
private Date lastLoginTime;
/**
* 1
*/
private String rsv1;
/**
* 2
*/
private String rsv2;
/**
* 3
*/
private String rsv3;
private String deptName;
private String token;
private String fingerprint;
public String getToken() {
return token;
}
public void setToken(String token) {
this.token = token;
}
public String getFingerprint() {
return fingerprint;
}
public void setFingerprint(String fingerprint) {
this.fingerprint = fingerprint;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getRealname() {
return realname;
}
public void setRealname(String realname) {
this.realname = realname;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getOrgId() {
return orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getDataStatus() {
return dataStatus;
}
public void setDataStatus(String dataStatus) {
this.dataStatus = dataStatus;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getCreateUserId() {
return createUserId;
}
public void setCreateUserId(String createUserId) {
this.createUserId = createUserId;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getUpdateUserId() {
return updateUserId;
}
public void setUpdateUserId(String updateUserId) {
this.updateUserId = updateUserId;
}
public String getFirstLoginFlag() {
return firstLoginFlag;
}
public void setFirstLoginFlag(String firstLoginFlag) {
this.firstLoginFlag = firstLoginFlag;
}
public Integer getPwdErrCnt() {
return pwdErrCnt;
}
public void setPwdErrCnt(Integer pwdErrCnt) {
this.pwdErrCnt = pwdErrCnt;
}
public Date getLastLoginTime() {
return lastLoginTime;
}
public void setLastLoginTime(Date lastLoginTime) {
this.lastLoginTime = lastLoginTime;
}
public String getRsv1() {
return rsv1;
}
public void setRsv1(String rsv1) {
this.rsv1 = rsv1;
}
public String getRsv2() {
return rsv2;
}
public void setRsv2(String rsv2) {
this.rsv2 = rsv2;
}
public String getRsv3() {
return rsv3;
}
public void setRsv3(String rsv3) {
this.rsv3 = rsv3;
}
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
}

@ -0,0 +1,20 @@
package com.jiuyv.appgate.enums;
/**
*
*
* @author admin
*
*/
public enum BusinessStatus
{
/**
*
*/
SUCCESS,
/**
*
*/
FAIL,
}

@ -0,0 +1,59 @@
package com.jiuyv.appgate.enums;
/**
*
*
* @author admin
*/
public enum BusinessType
{
/**
*
*/
OTHER,
/**
*
*/
INSERT,
/**
*
*/
UPDATE,
/**
*
*/
DELETE,
/**
*
*/
GRANT,
/**
*
*/
EXPORT,
/**
*
*/
IMPORT,
/**
* 退
*/
FORCE,
/**
*
*/
GENCODE,
/**
*
*/
CLEAN,
}

@ -0,0 +1,30 @@
package com.jiuyv.appgate.enums;
/**
* @author he_jiebing@jiuyv.com
* @create 2023-07-19 14:32
*/
public enum CheckStatusEnum {
UN_CHECK("00","未检查"),
CHECKED_UNCLEAN("02","已检查未清理"),
CHECKED_CLEANED("01","已检查已清理"),
SELF_CHECK("03","当前用户检查");
private String code;
private String desc;
private CheckStatusEnum(String code, String desc){
this.code = code;
this.desc = desc;
}
public String getCode() {
return code;
}
public String getDesc() {
return desc;
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save