调整
This commit is contained in:
parent
ea188d1702
commit
11d0576100
@ -17,6 +17,16 @@
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
<version>3.4.3.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>2.1.1</version>
|
||||
</dependency>
|
||||
<!-- spring-boot-devtools -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
@ -95,6 +105,7 @@
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- 自定义验证注解 -->
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.evo;
|
||||
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
@ -12,6 +13,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
*/
|
||||
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
|
||||
@EnableScheduling
|
||||
@MapperScan({"com.evo.**.mapper"})
|
||||
public class EvoApplication
|
||||
{
|
||||
public static void main(String[] args)
|
||||
|
||||
28
evo-admin/src/main/java/com/evo/common/config/WebConfig.java
Normal file
28
evo-admin/src/main/java/com/evo/common/config/WebConfig.java
Normal file
@ -0,0 +1,28 @@
|
||||
package com.evo.common.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
/**
|
||||
* 类
|
||||
*
|
||||
* @ClassName:WebConfig
|
||||
* @date: 2025年05月20日 13:24
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
|
||||
// 在Spring Boot的配置类中添加CORS配置
|
||||
@Configuration
|
||||
public class WebConfig implements WebMvcConfigurer {
|
||||
@Override
|
||||
public void addCorsMappings(CorsRegistry registry) {
|
||||
registry.addMapping("/**") // 匹配所有接口
|
||||
.allowedOrigins("localhost:8090") // 允许的前端域名
|
||||
.allowedMethods("GET", "POST", "PUT", "DELETE") // 允许的HTTP方法
|
||||
.allowedHeaders("*") // 允许的请求头
|
||||
.allowCredentials(true); // 允许携带凭证(如Cookie)
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
package com.evo.common.core.domain.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 类
|
||||
*
|
||||
* @ClassName:RzUpload
|
||||
* @date: 2025年05月20日 15:35
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Data
|
||||
public class RzUpload implements Serializable {
|
||||
|
||||
/***
|
||||
* id
|
||||
*/
|
||||
Long id;
|
||||
|
||||
/***
|
||||
* 类型
|
||||
*/
|
||||
String type;
|
||||
/***
|
||||
* 业务Id
|
||||
*/
|
||||
Long businessId;
|
||||
/***
|
||||
* 文件绝对路径
|
||||
*/
|
||||
String url;
|
||||
|
||||
/***
|
||||
* 文件相对路径
|
||||
*/
|
||||
String fileName;
|
||||
/***
|
||||
* 上传文件名称
|
||||
*/
|
||||
String newFileName;
|
||||
|
||||
/***
|
||||
* 文件原始名称
|
||||
*/
|
||||
String originalFileName;
|
||||
|
||||
/** 上传时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date uploadTime;
|
||||
|
||||
/***
|
||||
* 上传ip
|
||||
*/
|
||||
String uploadIp;
|
||||
/***
|
||||
* 标识
|
||||
* 有效: valid
|
||||
* 无效: Invalid
|
||||
*/
|
||||
String valid="valid";
|
||||
|
||||
}
|
||||
@ -47,25 +47,6 @@ public class FileUploadUtils
|
||||
return defaultBaseDir;
|
||||
}
|
||||
|
||||
/**
|
||||
* 以默认配置进行文件上传
|
||||
*
|
||||
* @param file 上传的文件
|
||||
* @return 文件名称
|
||||
* @throws Exception
|
||||
*/
|
||||
public static final String upload(MultipartFile file) throws IOException
|
||||
{
|
||||
try
|
||||
{
|
||||
return upload(getDefaultBaseDir(), file, MimeTypeUtils.DEFAULT_ALLOWED_EXTENSION);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new IOException(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据文件路径上传
|
||||
*
|
||||
@ -86,6 +67,25 @@ public class FileUploadUtils
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 以默认配置进行文件上传
|
||||
*
|
||||
* @param file 上传的文件
|
||||
* @return 文件名称
|
||||
* @throws Exception
|
||||
*/
|
||||
public static final String upload(MultipartFile file) throws IOException
|
||||
{
|
||||
try
|
||||
{
|
||||
return upload(getDefaultBaseDir(), file, MimeTypeUtils.DEFAULT_ALLOWED_EXTENSION);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new IOException(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 文件上传
|
||||
*
|
||||
|
||||
@ -228,6 +228,16 @@ public class IpUtils
|
||||
return "127.0.0.1";
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取服务的端口号
|
||||
*
|
||||
* @return IP地址
|
||||
*/
|
||||
public static String getServerUrl()
|
||||
{
|
||||
return ServletUtils.getRequest().getRequestURL().toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取主机名
|
||||
*
|
||||
|
||||
@ -2,6 +2,7 @@ package com.evo.equipment.service;
|
||||
|
||||
import com.evo.common.core.domain.AjaxResult;
|
||||
import com.evo.equipment.domain.EqButton;
|
||||
import com.evo.equipment.domain.EqSnDetail;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -60,4 +61,10 @@ public interface IEqButtonService
|
||||
* @return 按钮信息
|
||||
*/
|
||||
public EqButton selectEqButtonByName(String name);
|
||||
|
||||
/***
|
||||
* 照片下发
|
||||
* @param paramEqSnDetail
|
||||
*/
|
||||
void sendButton(EqSnDetail paramEqSnDetail);
|
||||
}
|
||||
|
||||
@ -205,4 +205,24 @@ public class EqButtonServiceImpl implements IEqButtonService
|
||||
return eqButtonMapper.selectEqButtonByName(name);
|
||||
}
|
||||
|
||||
public void sendButton(EqSnDetail snDetail) {
|
||||
List<EqButton> bt_list = this.eqButtonMapper.selectEqButtonList(null);
|
||||
CwButtonVo cbv = new CwButtonVo();
|
||||
CwButtonData cbd = new CwButtonData();
|
||||
cbv.setCmd("to_device");
|
||||
cbv.setForm("");
|
||||
cbv.setTo(snDetail.getSn());
|
||||
cbd.setCmd("setButtons");
|
||||
CwBottonDto cwBottonDto = null;
|
||||
List<CwBottonDto> list2 = new ArrayList<>();
|
||||
for (EqButton button : bt_list) {
|
||||
cwBottonDto = new CwBottonDto();
|
||||
cwBottonDto.setIcon(button.getImage());
|
||||
list2.add(cwBottonDto);
|
||||
}
|
||||
cbd.setValue(list2);
|
||||
cbv.setData(cbd);
|
||||
WebSocketUsers.sendMessageToUsersByText(JSONObject.toJSONString(cbv, new com.alibaba.fastjson2.JSONWriter.Feature[0]));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,132 +1,132 @@
|
||||
package com.evo.framework.config;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import javax.sql.DataSource;
|
||||
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.springframework.beans.factory.annotation.Autowired;
|
||||
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 com.evo.common.utils.StringUtils;
|
||||
|
||||
/**
|
||||
* Mybatis支持*匹配扫描包
|
||||
*
|
||||
* @author evo
|
||||
*/
|
||||
@Configuration
|
||||
public class MyBatisConfig
|
||||
{
|
||||
@Autowired
|
||||
private Environment env;
|
||||
|
||||
static final String DEFAULT_RESOURCE_PATTERN = "**/*.class";
|
||||
|
||||
public static String setTypeAliasesPackage(String typeAliasesPackage)
|
||||
{
|
||||
ResourcePatternResolver resolver = (ResourcePatternResolver) 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);
|
||||
try
|
||||
{
|
||||
result.add(Class.forName(metadataReader.getClassMetadata().getClassName()).getPackage().getName());
|
||||
}
|
||||
catch (ClassNotFoundException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (result.size() > 0)
|
||||
{
|
||||
HashSet<String> hashResult = new HashSet<String>(result);
|
||||
allResult.addAll(hashResult);
|
||||
}
|
||||
}
|
||||
if (allResult.size() > 0)
|
||||
{
|
||||
typeAliasesPackage = String.join(",", (String[]) allResult.toArray(new String[0]));
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new RuntimeException("mybatis typeAliasesPackage 路径扫描错误,参数typeAliasesPackage:" + typeAliasesPackage + "未找到任何包");
|
||||
}
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
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)
|
||||
{
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
return resources.toArray(new Resource[resources.size()]);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public SqlSessionFactory sqlSessionFactory(DataSource dataSource) 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(StringUtils.split(mapperLocations, ",")));
|
||||
sessionFactory.setConfigLocation(new DefaultResourceLoader().getResource(configLocation));
|
||||
return sessionFactory.getObject();
|
||||
}
|
||||
}
|
||||
//package com.evo.framework.config;
|
||||
//
|
||||
//import java.io.IOException;
|
||||
//import java.util.ArrayList;
|
||||
//import java.util.Arrays;
|
||||
//import java.util.HashSet;
|
||||
//import java.util.List;
|
||||
//import javax.sql.DataSource;
|
||||
//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.springframework.beans.factory.annotation.Autowired;
|
||||
//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 com.evo.common.utils.StringUtils;
|
||||
//
|
||||
///**
|
||||
// * Mybatis支持*匹配扫描包
|
||||
// *
|
||||
// * @author evo
|
||||
// */
|
||||
//@Configuration
|
||||
//public class MyBatisConfig
|
||||
//{
|
||||
// @Autowired
|
||||
// private Environment env;
|
||||
//
|
||||
// static final String DEFAULT_RESOURCE_PATTERN = "**/*.class";
|
||||
//
|
||||
// public static String setTypeAliasesPackage(String typeAliasesPackage)
|
||||
// {
|
||||
// ResourcePatternResolver resolver = (ResourcePatternResolver) 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);
|
||||
// try
|
||||
// {
|
||||
// result.add(Class.forName(metadataReader.getClassMetadata().getClassName()).getPackage().getName());
|
||||
// }
|
||||
// catch (ClassNotFoundException e)
|
||||
// {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// if (result.size() > 0)
|
||||
// {
|
||||
// HashSet<String> hashResult = new HashSet<String>(result);
|
||||
// allResult.addAll(hashResult);
|
||||
// }
|
||||
// }
|
||||
// if (allResult.size() > 0)
|
||||
// {
|
||||
// typeAliasesPackage = String.join(",", (String[]) allResult.toArray(new String[0]));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// throw new RuntimeException("mybatis typeAliasesPackage 路径扫描错误,参数typeAliasesPackage:" + typeAliasesPackage + "未找到任何包");
|
||||
// }
|
||||
// }
|
||||
// catch (IOException e)
|
||||
// {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// 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)
|
||||
// {
|
||||
// // ignore
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return resources.toArray(new Resource[resources.size()]);
|
||||
// }
|
||||
//
|
||||
// @Bean
|
||||
// public SqlSessionFactory sqlSessionFactory(DataSource dataSource) 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(StringUtils.split(mapperLocations, ",")));
|
||||
// sessionFactory.setConfigLocation(new DefaultResourceLoader().getResource(configLocation));
|
||||
// return sessionFactory.getObject();
|
||||
// }
|
||||
//}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.evo.framework.websocket;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.evo.common.constant.Constants;
|
||||
import com.evo.equipment.domain.EqSnDetail;
|
||||
import com.evo.equipment.service.IEqButtonService;
|
||||
import com.evo.equipment.service.IEqSnDetailService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@ -26,6 +27,8 @@ public class WebSocketServer{
|
||||
|
||||
private static IEqSnDetailService snDetailService;
|
||||
|
||||
private static IEqButtonService qButtonService;
|
||||
|
||||
@Autowired
|
||||
public void setBrandService(IEqSnDetailService snDetailService) {
|
||||
WebSocketServer.snDetailService = snDetailService;
|
||||
@ -112,6 +115,7 @@ public class WebSocketServer{
|
||||
String s = "{\"cmd\":\"pong\"}";
|
||||
//单发user 返回 pong
|
||||
WebSocketUsers.sendMessageToUserByText(session,s);
|
||||
return;
|
||||
}
|
||||
if(null != cmd&&cmd.equals("declare")){
|
||||
//客户端声明,判断设备信息表中是否有此设备的信息,如果有则修改,如果没有则新增
|
||||
@ -158,6 +162,7 @@ public class WebSocketServer{
|
||||
//添加
|
||||
snDetailService.insertEqSnDetail(snDetail);
|
||||
}
|
||||
qButtonService.sendButton(snDetail);
|
||||
}else{
|
||||
//接受设备端返回的数据,先不做处理
|
||||
System.out.println("设备返回信息:"+message);
|
||||
|
||||
@ -1,17 +1,23 @@
|
||||
package com.evo.system.controller;
|
||||
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.evo.common.annotation.Anonymous;
|
||||
import com.evo.common.core.domain.entity.RzUpload;
|
||||
import com.evo.common.utils.ip.IpUtils;
|
||||
import com.evo.system.service.RzUploadService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import com.evo.common.config.EvoConfig;
|
||||
import com.evo.common.constant.Constants;
|
||||
@ -34,6 +40,8 @@ public class CommonController
|
||||
|
||||
@Autowired
|
||||
private ServerConfig serverConfig;
|
||||
@Autowired
|
||||
private RzUploadService rzUploadService;
|
||||
|
||||
private static final String FILE_DELIMETER = ",";
|
||||
|
||||
@ -69,10 +77,45 @@ public class CommonController
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping("/upload/{type}")
|
||||
@ResponseBody
|
||||
@Anonymous
|
||||
public AjaxResult uploadPDF(@PathVariable("type") String type, @RequestParam("file") MultipartFile file){
|
||||
try
|
||||
{
|
||||
// 上传文件路径
|
||||
String filePath = EvoConfig.getUploadPath();
|
||||
// 上传并返回新文件名称
|
||||
String fileName = FileUploadUtils.upload(filePath, file);
|
||||
String url = serverConfig.getUrl() + fileName;
|
||||
RzUpload upload = new RzUpload();
|
||||
upload.setType(type);
|
||||
upload.setUrl(url);
|
||||
upload.setFileName(fileName);
|
||||
upload.setNewFileName(FileUtils.getName(fileName));
|
||||
upload.setOriginalFileName(file.getOriginalFilename());
|
||||
upload.setValid("valid");
|
||||
upload.setUploadIp(IpUtils.getIpAddr());
|
||||
rzUploadService.insertUpload(upload);
|
||||
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
ajax.put("fileId", upload.getId());
|
||||
ajax.put("url", upload.getUrl());
|
||||
ajax.put("fileName", upload.getFileName());
|
||||
ajax.put("newFileName", upload.getNewFileName());
|
||||
ajax.put("originalFilename", upload.getOriginalFileName());
|
||||
return ajax;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 通用上传请求(单个)
|
||||
*/
|
||||
@PostMapping("/upload")
|
||||
@Anonymous
|
||||
public AjaxResult uploadFile(MultipartFile file) throws Exception
|
||||
{
|
||||
try
|
||||
|
||||
@ -2,6 +2,7 @@ package com.evo.system.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.evo.common.annotation.Excel;
|
||||
@ -13,6 +14,7 @@ import com.evo.common.core.domain.BaseEntity;
|
||||
* @author evo
|
||||
* @date 2024-11-21
|
||||
*/
|
||||
@Data
|
||||
public class SysStaff extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -168,353 +170,18 @@ public class SysStaff extends BaseEntity
|
||||
|
||||
private String isLeader; //是领导
|
||||
|
||||
public String getSocialSubsidy() {
|
||||
return socialSubsidy;
|
||||
}
|
||||
|
||||
public void setSocialSubsidy(String socialSubsidy) {
|
||||
this.socialSubsidy = socialSubsidy;
|
||||
}
|
||||
|
||||
public String getIsLeader() {
|
||||
return isLeader;
|
||||
}
|
||||
|
||||
public void setIsLeader(String isLeader) {
|
||||
this.isLeader = isLeader;
|
||||
}
|
||||
|
||||
public String getCompanyName() {
|
||||
return companyName;
|
||||
}
|
||||
|
||||
public void setCompanyName(String companyName) {
|
||||
this.companyName = companyName;
|
||||
}
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setDeptId(Long deptId)
|
||||
{
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public Long getDeptId()
|
||||
{
|
||||
return deptId;
|
||||
}
|
||||
public void setCode(String code)
|
||||
{
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setIdCard(String idCard)
|
||||
{
|
||||
this.idCard = idCard;
|
||||
}
|
||||
|
||||
public String getIdCard()
|
||||
{
|
||||
return idCard;
|
||||
}
|
||||
public void setSex(String sex)
|
||||
{
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getSex()
|
||||
{
|
||||
return sex;
|
||||
}
|
||||
public void setAge(Long age)
|
||||
{
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
public Long getAge()
|
||||
{
|
||||
return age;
|
||||
}
|
||||
public void setPhone(String phone)
|
||||
{
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getPhone()
|
||||
{
|
||||
return phone;
|
||||
}
|
||||
public void setAddress(String address)
|
||||
{
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getAddress()
|
||||
{
|
||||
return address;
|
||||
}
|
||||
public void setLevel(String level)
|
||||
{
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public String getLevel()
|
||||
{
|
||||
return level;
|
||||
}
|
||||
public void setMajor(String major)
|
||||
{
|
||||
this.major = major;
|
||||
}
|
||||
|
||||
public String getMajor()
|
||||
{
|
||||
return major;
|
||||
}
|
||||
public void setSchool(String school)
|
||||
{
|
||||
this.school = school;
|
||||
}
|
||||
|
||||
public String getSchool()
|
||||
{
|
||||
return school;
|
||||
}
|
||||
public void setBankNumber(String bankNumber)
|
||||
{
|
||||
this.bankNumber = bankNumber;
|
||||
}
|
||||
|
||||
public String getBankNumber()
|
||||
{
|
||||
return bankNumber;
|
||||
}
|
||||
public void setBank(String bank)
|
||||
{
|
||||
this.bank = bank;
|
||||
}
|
||||
|
||||
public String getBank()
|
||||
{
|
||||
return bank;
|
||||
}
|
||||
public void setEmploymentDate(Date employmentDate)
|
||||
{
|
||||
this.employmentDate = employmentDate;
|
||||
}
|
||||
|
||||
public Date getEmploymentDate()
|
||||
{
|
||||
return employmentDate;
|
||||
}
|
||||
public void setExperience(String experience)
|
||||
{
|
||||
this.experience = experience;
|
||||
}
|
||||
|
||||
public String getExperience()
|
||||
{
|
||||
return experience;
|
||||
}
|
||||
public void setWorkerTerm(Long workerTerm)
|
||||
{
|
||||
this.workerTerm = workerTerm;
|
||||
}
|
||||
|
||||
public Long getWorkerTerm()
|
||||
{
|
||||
return workerTerm;
|
||||
}
|
||||
public void setRegularDate(Date regularDate)
|
||||
{
|
||||
this.regularDate = regularDate;
|
||||
}
|
||||
|
||||
public Date getRegularDate()
|
||||
{
|
||||
return regularDate;
|
||||
}
|
||||
public void setQuitDate(Date quitDate)
|
||||
{
|
||||
this.quitDate = quitDate;
|
||||
}
|
||||
|
||||
public Date getQuitDate()
|
||||
{
|
||||
return quitDate;
|
||||
}
|
||||
public void setContractStart(Date contractStart)
|
||||
{
|
||||
this.contractStart = contractStart;
|
||||
}
|
||||
|
||||
public Date getContractStart()
|
||||
{
|
||||
return contractStart;
|
||||
}
|
||||
public void setContractEnd(Date contractEnd)
|
||||
{
|
||||
this.contractEnd = contractEnd;
|
||||
}
|
||||
|
||||
public Date getContractEnd()
|
||||
{
|
||||
return contractEnd;
|
||||
}
|
||||
public void setContractType(String contractType)
|
||||
{
|
||||
this.contractType = contractType;
|
||||
}
|
||||
|
||||
public String getContractType()
|
||||
{
|
||||
return contractType;
|
||||
}
|
||||
public void setSocialType(String socialType)
|
||||
{
|
||||
this.socialType = socialType;
|
||||
}
|
||||
|
||||
public String getSocialType()
|
||||
{
|
||||
return socialType;
|
||||
}
|
||||
public void setSeniority(Long seniority)
|
||||
{
|
||||
this.seniority = seniority;
|
||||
}
|
||||
|
||||
public Long getSeniority()
|
||||
{
|
||||
return seniority;
|
||||
}
|
||||
public void setIsOvertimePay(String isOvertimePay)
|
||||
{
|
||||
this.isOvertimePay = isOvertimePay;
|
||||
}
|
||||
|
||||
public String getIsOvertimePay()
|
||||
{
|
||||
return isOvertimePay;
|
||||
}
|
||||
public void setZsFlag(String zsFlag)
|
||||
{
|
||||
this.zsFlag = zsFlag;
|
||||
}
|
||||
|
||||
public String getZsFlag()
|
||||
{
|
||||
return zsFlag;
|
||||
}
|
||||
public void setSecrecy(String secrecy)
|
||||
{
|
||||
this.secrecy = secrecy;
|
||||
}
|
||||
|
||||
public String getSecrecy()
|
||||
{
|
||||
return secrecy;
|
||||
}
|
||||
public void setInjury(String injury)
|
||||
{
|
||||
this.injury = injury;
|
||||
}
|
||||
|
||||
public String getInjury()
|
||||
{
|
||||
return injury;
|
||||
}
|
||||
public void setInsurance(String insurance)
|
||||
{
|
||||
this.insurance = insurance;
|
||||
}
|
||||
|
||||
public String getInsurance()
|
||||
{
|
||||
return insurance;
|
||||
}
|
||||
public void setIntroducer(String introducer)
|
||||
{
|
||||
this.introducer = introducer;
|
||||
}
|
||||
|
||||
public String getIntroducer()
|
||||
{
|
||||
return introducer;
|
||||
}
|
||||
public void setClockIn(String clockIn)
|
||||
{
|
||||
this.clockIn = clockIn;
|
||||
}
|
||||
|
||||
public String getClockIn()
|
||||
{
|
||||
return clockIn;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public Date getWagesRatioDate() {
|
||||
return wagesRatioDate;
|
||||
}
|
||||
|
||||
public void setWagesRatioDate(Date wagesRatioDate) {
|
||||
this.wagesRatioDate = wagesRatioDate;
|
||||
}
|
||||
|
||||
public void setRemarks(String remarks)
|
||||
{
|
||||
this.remarks = remarks;
|
||||
}
|
||||
|
||||
public String getRemarks()
|
||||
{
|
||||
return remarks;
|
||||
}
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
/***
|
||||
* 文件Id
|
||||
*/
|
||||
private Long fileId;
|
||||
/***
|
||||
* 文件位置
|
||||
*/
|
||||
private String imageUrl;
|
||||
/***
|
||||
* 打卡位置
|
||||
*/
|
||||
private String timeClock;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
@ -0,0 +1,38 @@
|
||||
package com.evo.system.mapper;
|
||||
|
||||
import com.evo.common.core.domain.entity.RzUpload;
|
||||
import com.evo.common.core.domain.entity.SysDept;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 部门管理 数据层
|
||||
*
|
||||
* @author evo
|
||||
*/
|
||||
public interface RzUploadMapper
|
||||
{
|
||||
/**
|
||||
* 新增文件信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUpload(RzUpload upload);
|
||||
/**
|
||||
* 修改文件的业务信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUploadBusinessId(RzUpload upload);
|
||||
/***
|
||||
* 修改标识
|
||||
* @param upload
|
||||
* @return
|
||||
*/
|
||||
public int updateUploadValidByBusinessId(RzUpload upload);
|
||||
/***
|
||||
* 根据id查询
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public RzUpload selectById(Long id);
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
package com.evo.system.service;
|
||||
|
||||
import com.evo.common.core.domain.TreeSelect;
|
||||
import com.evo.common.core.domain.entity.RzUpload;
|
||||
import com.evo.common.core.domain.entity.SysDept;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公共上传 服务层
|
||||
*
|
||||
* @author evo
|
||||
*/
|
||||
public interface RzUploadService
|
||||
{
|
||||
|
||||
/**
|
||||
* 查询文件信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public RzUpload selectById(Long id);
|
||||
|
||||
/**
|
||||
* 新增文件信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUpload(RzUpload upload);
|
||||
|
||||
/**
|
||||
* 修改保存文件信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUploadBusinessId(RzUpload upload);
|
||||
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
package com.evo.system.service.impl;
|
||||
|
||||
import com.evo.common.annotation.DataScope;
|
||||
import com.evo.common.constant.UserConstants;
|
||||
import com.evo.common.core.domain.TreeSelect;
|
||||
import com.evo.common.core.domain.entity.RzUpload;
|
||||
import com.evo.common.core.domain.entity.SysDept;
|
||||
import com.evo.common.core.domain.entity.SysRole;
|
||||
import com.evo.common.core.domain.entity.SysUser;
|
||||
import com.evo.common.core.text.Convert;
|
||||
import com.evo.common.exception.ServiceException;
|
||||
import com.evo.common.utils.SecurityUtils;
|
||||
import com.evo.common.utils.StringUtils;
|
||||
import com.evo.common.utils.spring.SpringUtils;
|
||||
import com.evo.system.mapper.RzUploadMapper;
|
||||
import com.evo.system.mapper.SysDeptMapper;
|
||||
import com.evo.system.mapper.SysRoleMapper;
|
||||
import com.evo.system.service.ISysDeptService;
|
||||
import com.evo.system.service.RzUploadService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 部门管理 服务实现
|
||||
*
|
||||
* @author evo
|
||||
*/
|
||||
@Service
|
||||
public class RzUploadServiceImpl implements RzUploadService
|
||||
{
|
||||
@Resource
|
||||
private RzUploadMapper rzUploadMapper;
|
||||
|
||||
@Override
|
||||
public RzUpload selectById(Long id) {
|
||||
return rzUploadMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存上传信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertUpload(RzUpload upload)
|
||||
{
|
||||
return rzUploadMapper.insertUpload(upload);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存上传信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateUploadBusinessId(RzUpload upload)
|
||||
{
|
||||
rzUploadMapper.updateUploadBusinessId(upload);
|
||||
upload.setValid("valid");
|
||||
rzUploadMapper.updateUploadValidByBusinessId(upload);
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
@ -10,6 +10,8 @@ import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.evo.attendance.domain.RzAttendance;
|
||||
import com.evo.attendance.domain.RzAttendanceStatistical;
|
||||
import com.evo.attendance.mapper.RzAttendanceMapper;
|
||||
@ -17,12 +19,17 @@ import com.evo.attendance.mapper.RzAttendanceStatisticalMapper;
|
||||
import com.evo.common.annotation.DataScope;
|
||||
import com.evo.common.constant.Constants;
|
||||
import com.evo.common.core.domain.AjaxResult;
|
||||
import com.evo.common.core.domain.entity.RzUpload;
|
||||
import com.evo.common.core.domain.entity.SysDept;
|
||||
import com.evo.common.core.domain.entity.SysDictData;
|
||||
import com.evo.common.utils.DateUtils;
|
||||
import com.evo.common.utils.SecurityUtils;
|
||||
import com.evo.common.utils.StringUtils;
|
||||
import com.evo.common.utils.bean.BeanUtils;
|
||||
import com.evo.common.utils.ip.IpUtils;
|
||||
import com.evo.equipment.domain.vo.StaffData;
|
||||
import com.evo.equipment.domain.vo.StaffDto;
|
||||
import com.evo.framework.websocket.WebSocketUsers;
|
||||
import com.evo.personnelMatters.domain.RzHoliday;
|
||||
import com.evo.personnelMatters.domain.RzSubsidy;
|
||||
import com.evo.personnelMatters.mapper.RzHolidayMapper;
|
||||
@ -37,7 +44,10 @@ import com.evo.system.mapper.SysDictDataMapper;
|
||||
import com.evo.system.mapper.SysStaffDetailMapper;
|
||||
import com.evo.system.mapper.SysStaffMapper;
|
||||
import com.evo.system.service.ISysStaffService;
|
||||
import com.evo.system.service.RzUploadService;
|
||||
import com.evo.utils.DateUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
@ -53,6 +63,7 @@ import javax.annotation.Resource;
|
||||
* @author evo
|
||||
* @date 2024-11-21
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class SysStaffServiceImpl implements ISysStaffService
|
||||
{
|
||||
@ -74,6 +85,8 @@ public class SysStaffServiceImpl implements ISysStaffService
|
||||
private RzHolidayMapper rzHolidayMapper; //假期
|
||||
@Resource
|
||||
private RzRestaurantStatisticsMapper rzRestaurantStatisticsMapper; //餐饮统计
|
||||
@Resource
|
||||
private RzUploadService rzUploadService; //餐饮统计
|
||||
/**
|
||||
* 查询员工管理
|
||||
*
|
||||
@ -124,18 +137,13 @@ public class SysStaffServiceImpl implements ISysStaffService
|
||||
sysDept.setLeader(sysStaff.getName());
|
||||
int i = deptMapper.updateDept(sysDept);
|
||||
if(i < 1){
|
||||
return AjaxResult.error();
|
||||
return AjaxResult.error("更新部门负责人失败");
|
||||
}
|
||||
}
|
||||
//根据省份证确定性别和年龄
|
||||
Long year = Long.parseLong(sysStaff.getIdCard().substring(6,10));
|
||||
Long age = Long.parseLong(new SimpleDateFormat("yyyy").format(new Date())) - year;
|
||||
sysStaff.setAge(age);
|
||||
if(Integer.parseInt(sysStaff.getIdCard().substring(16,17)) % 2 == 0){
|
||||
sysStaff.setSex("1");
|
||||
}else{
|
||||
sysStaff.setSex("0");
|
||||
}
|
||||
sysStaff.setAge(Long.parseLong(new SimpleDateFormat("yyyy").format(new Date())) - Long.parseLong(sysStaff.getIdCard().substring(6,10)));
|
||||
//性别
|
||||
sysStaff.setSex((Integer.parseInt(sysStaff.getIdCard().substring(16,17)) % 2 == 0) ? "1" : "0");
|
||||
//员工编码
|
||||
sysStaff.setCode(getCodeByCompanyName(sysStaff.getCompanyName()));
|
||||
sysStaff.setSeniority(0l);
|
||||
@ -145,16 +153,71 @@ public class SysStaffServiceImpl implements ISysStaffService
|
||||
sysStaff.setDelFlag(Constants.DELETE_FLAG_0);
|
||||
int i = sysStaffMapper.insertSysStaff(sysStaff);
|
||||
if(i < 1){
|
||||
return AjaxResult.error();
|
||||
return AjaxResult.error("员工添加失败");
|
||||
}
|
||||
|
||||
//员工详情
|
||||
createStaffDetail(sysStaff);
|
||||
//打卡统计,打卡详情
|
||||
createRzAttendance(sysStaff);
|
||||
//处理餐饮信息
|
||||
createRestaurantStatistics(sysStaff);
|
||||
|
||||
//处理考勤机相关信息
|
||||
initCheckDevice(sysStaff);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
||||
private void initCheckDevice(SysStaff sysStaff){
|
||||
//如果文件Id不为空, 则需要更新打卡设备信息, 完成后, 同步更新图片的业务Id数据
|
||||
if(ObjectUtils.isNotEmpty(sysStaff.getFileId())){
|
||||
RzUpload upload = null;
|
||||
try {
|
||||
upload = rzUploadService.selectById(sysStaff.getFileId());
|
||||
upload.setBusinessId(sysStaff.getUserId());
|
||||
rzUploadService.updateUploadBusinessId(upload);
|
||||
} catch (Exception e) {
|
||||
log.error("处理上传照片信息出现错误", e);
|
||||
}
|
||||
/** 上传打卡机 */
|
||||
//需要返回的对象
|
||||
StaffDto cau = new StaffDto();
|
||||
//发送的数据
|
||||
StaffData caud = new StaffData();
|
||||
//定义公共打卡机
|
||||
List<String> dkj_list = new ArrayList<String>();
|
||||
dkj_list.add(com.evo.equipment.constant.Constants.EQ_DEVICE_CODE); //食堂
|
||||
dkj_list.add(com.evo.equipment.constant.Constants.EQ_DEVICE_PUBLIC_CODE); //公共
|
||||
dkj_list.add(sysStaff.getTimeClock());
|
||||
|
||||
for (String s : dkj_list) {
|
||||
//该接口固定为to_device,发送给设备用于识别对应哪个指令
|
||||
cau.setCmd("to_device");
|
||||
//无用值,空串
|
||||
cau.setForm("");
|
||||
//设备号
|
||||
cau.setTo(s);
|
||||
//给服务端预留的补充字段,设备端不处理这个字段内容。设备在响应这条指令时原样返回
|
||||
cau.setExtra("");
|
||||
//发送的数据
|
||||
caud.setCmd("addUser");
|
||||
caud.setUser_id(sysStaff.getUserId()+"");
|
||||
caud.setName(sysStaff.getName());
|
||||
caud.setTts_name("");
|
||||
caud.setFace_template(IpUtils.getServerUrl()+ upload.getFileName());
|
||||
caud.setEffect_time("");
|
||||
caud.setId_valid("");
|
||||
caud.setIc("");
|
||||
caud.setPhone("");
|
||||
caud.setMode(0);
|
||||
cau.setData(caud);
|
||||
//调用websocket,推送给设备
|
||||
WebSocketUsers.sendMessageToUsersByText(JSONObject.toJSONString(cau));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 创建员工详情信息
|
||||
* @param sysStaff
|
||||
@ -165,34 +228,48 @@ public class SysStaffServiceImpl implements ISysStaffService
|
||||
if(StringUtils.isNull(sysStaffDetail)){
|
||||
sysStaffDetail = new SysStaffDetail();
|
||||
}
|
||||
//查询学历
|
||||
List<SysDictData> xl_list = sysDictDataMapper.selectDictDataByType(Constants.SYS_LEVEL);
|
||||
|
||||
//合同补助
|
||||
BigDecimal contractSubsidies = new BigDecimal(0);
|
||||
//学历补助
|
||||
for (SysDictData sysDictData : xl_list) {
|
||||
if(sysDictData.getDictValue().equals(sysStaff.getLevel())){
|
||||
RzSubsidy rzSubsidy = rzSubsidyMapper.selectRzSubsidyByName(sysDictData.getDictLabel());
|
||||
if(StringUtils.isNotNull(rzSubsidy)){
|
||||
sysStaffDetail.setLevelOfEducationSubsidies(rzSubsidy.getValue());
|
||||
}
|
||||
BigDecimal levelOfEducationSubsidies = new BigDecimal(0);
|
||||
//新农合补助
|
||||
BigDecimal socialSecuritySubsidies = new BigDecimal(0);
|
||||
//正式员工
|
||||
if("1".equals(sysStaff.getStatus())){
|
||||
//查询学历
|
||||
String dictLabel = sysDictDataMapper.selectDictLabel(Constants.SYS_LEVEL, sysStaff.getLevel());
|
||||
//学历补助
|
||||
if(org.apache.commons.lang3.StringUtils.isNotEmpty(dictLabel)){
|
||||
RzSubsidy rzSubsidy = rzSubsidyMapper.selectRzSubsidyByName(dictLabel);
|
||||
if(StringUtils.isNotNull(rzSubsidy)){
|
||||
levelOfEducationSubsidies= rzSubsidy.getValue();
|
||||
}
|
||||
}
|
||||
|
||||
//合同补助 1年期合同
|
||||
if("1".equals(sysStaff.getContractType())){
|
||||
contractSubsidies = new BigDecimal(Constants.SYS_CONTRACT_0);
|
||||
}else if("3".equals(sysStaff.getContractType())){ //3年期合同
|
||||
contractSubsidies = new BigDecimal(Constants.SYS_CONTRACT_1);
|
||||
}
|
||||
|
||||
//社保补助 判断是否是新农合 ,是社保补助400元
|
||||
if("新农合".equals(sysStaff.getSocialType()) && "是".equals(sysStaff.getSocialSubsidy())){
|
||||
socialSecuritySubsidies = new BigDecimal(Constants.SYS_SOCIAL_SUBSIDIES);
|
||||
}
|
||||
}
|
||||
//合同补助 1年期合同
|
||||
if("1".equals(sysStaff.getContractType())){
|
||||
sysStaffDetail.setContractSubsidies(new BigDecimal(Constants.SYS_CONTRACT_0));
|
||||
}else if("3".equals(sysStaff.getContractType())){ //3年期合同
|
||||
sysStaffDetail.setContractSubsidies(new BigDecimal(Constants.SYS_CONTRACT_1));
|
||||
}else {
|
||||
sysStaffDetail.setContractSubsidies(new BigDecimal("0.00"));
|
||||
}
|
||||
//社保补助 判断是否是新农合 ,是社保补助400元
|
||||
if("新农合".equals(sysStaff.getSocialType()) && "是".equals(sysStaff.getSocialSubsidy())){
|
||||
sysStaffDetail.setSocialSecuritySubsidies(new BigDecimal(Constants.SYS_SOCIAL_SUBSIDIES));
|
||||
}else{
|
||||
sysStaffDetail.setSocialSecuritySubsidies(new BigDecimal("0.00"));
|
||||
}
|
||||
|
||||
sysStaffDetail.setLevelOfEducationSubsidies(levelOfEducationSubsidies);
|
||||
sysStaffDetail.setContractSubsidies(contractSubsidies);
|
||||
sysStaffDetail.setSocialSecuritySubsidies(socialSecuritySubsidies);
|
||||
|
||||
|
||||
if(StringUtils.isNull(sysStaffDetail.getStaffId())){
|
||||
sysStaffDetail.setStaffId(sysStaff.getUserId());
|
||||
sysStaffDetail.setSenioritySubsidies(new BigDecimal(Constants.SYS_SENIORITY_SUBSIDIES));
|
||||
//sysStaffDetail.setSenioritySubsidies(new BigDecimal(Constants.SYS_SENIORITY_SUBSIDIES));
|
||||
//关于工龄补贴, 初始新增员工, 工龄补贴全部为0
|
||||
sysStaffDetail.setSenioritySubsidies(new BigDecimal(0));
|
||||
sysStaffDetail.setCreateBy(SecurityUtils.getUsername());
|
||||
sysStaffDetail.setCreateTime(DateUtils.getNowDate());
|
||||
sysStaffDetail.setDelFlag(Constants.DELETE_FLAG_0);
|
||||
@ -397,21 +474,19 @@ public class SysStaffServiceImpl implements ISysStaffService
|
||||
SysDept oldDept = deptMapper.selectDeptById(old_staff.getDeptId());
|
||||
//判断原来为领导,现在不是领导则把旧职位部门负责人反写
|
||||
if("是".equals(old_staff.getIsLeader())){
|
||||
oldDept.setPhone("");
|
||||
oldDept.setLeader("");
|
||||
}else{
|
||||
oldDept.setPhone(sysStaff.getPhone());
|
||||
oldDept.setLeader(sysStaff.getName());
|
||||
oldDept.setUpdateTime(DateUtils.getNowDate());
|
||||
oldDept.setUpdateBy(SecurityUtils.getUsername());
|
||||
int i = deptMapper.updateDeptForLeader(oldDept);
|
||||
if(i < 1){
|
||||
return AjaxResult.error();
|
||||
}
|
||||
}
|
||||
oldDept.setUpdateTime(DateUtils.getNowDate());
|
||||
oldDept.setUpdateBy(SecurityUtils.getUsername());
|
||||
int i = deptMapper.updateDeptForLeader(oldDept);
|
||||
if(i < 1){
|
||||
return AjaxResult.error();
|
||||
}
|
||||
|
||||
sysStaff.setUpdateTime(DateUtils.getNowDate());
|
||||
sysStaff.setUpdateBy(SecurityUtils.getUsername());
|
||||
i= sysStaffMapper.updateSysStaff(sysStaff);
|
||||
int i= sysStaffMapper.updateSysStaff(sysStaff);
|
||||
if(i < 1){
|
||||
return AjaxResult.error();
|
||||
}
|
||||
|
||||
89
evo-admin/src/main/resources/application-dev.yml
Normal file
89
evo-admin/src/main/resources/application-dev.yml
Normal file
@ -0,0 +1,89 @@
|
||||
# 数据源配置
|
||||
spring:
|
||||
# 服务模块
|
||||
devtools:
|
||||
restart:
|
||||
enabled: false
|
||||
# 热部署开关
|
||||
redis:
|
||||
# 地址
|
||||
host: 192.168.16.128
|
||||
# 端口,默认为6379
|
||||
port: 6379
|
||||
# 数据库索引
|
||||
database: 0
|
||||
# 密码
|
||||
password: hbyt2025
|
||||
# 连接超时时间
|
||||
timeout: 10s
|
||||
lettuce:
|
||||
pool:
|
||||
# 连接池中的最小空闲连接
|
||||
min-idle: 0
|
||||
# 连接池中的最大空闲连接
|
||||
max-idle: 8
|
||||
# 连接池的最大数据库连接数
|
||||
max-active: 8
|
||||
# #连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
max-wait: -1ms
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
url: jdbc:mysql://192.168.5.23:3306/dev_evo_cw_new?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password: yite
|
||||
#username: root
|
||||
#password: yj.chen@001
|
||||
# 从库数据源
|
||||
slave:
|
||||
# 从数据源开关/默认关闭
|
||||
enabled: false
|
||||
url:
|
||||
username:
|
||||
password:
|
||||
# 初始连接数
|
||||
initialSize: 5
|
||||
# 最小连接池数量
|
||||
minIdle: 10
|
||||
# 最大连接池数量
|
||||
maxActive: 20
|
||||
# 配置获取连接等待超时的时间
|
||||
maxWait: 60000
|
||||
# 配置连接超时时间
|
||||
connectTimeout: 30000
|
||||
# 配置网络超时时间
|
||||
socketTimeout: 60000
|
||||
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
||||
timeBetweenEvictionRunsMillis: 60000
|
||||
# 配置一个连接在池中最小生存的时间,单位是毫秒
|
||||
minEvictableIdleTimeMillis: 300000
|
||||
# 配置一个连接在池中最大生存的时间,单位是毫秒
|
||||
maxEvictableIdleTimeMillis: 900000
|
||||
# 配置检测连接是否有效
|
||||
validationQuery: SELECT 1 FROM DUAL
|
||||
testWhileIdle: true
|
||||
testOnBorrow: false
|
||||
testOnReturn: false
|
||||
webStatFilter:
|
||||
enabled: true
|
||||
statViewServlet:
|
||||
enabled: true
|
||||
# 设置白名单,不填则允许所有访问
|
||||
allow:
|
||||
url-pattern: /druid/*
|
||||
# 控制台管理用户名和密码
|
||||
login-username: evo
|
||||
login-password: 123456
|
||||
filter:
|
||||
stat:
|
||||
enabled: true
|
||||
# 慢SQL记录
|
||||
log-slow-sql: true
|
||||
slow-sql-millis: 1000
|
||||
merge-sql: true
|
||||
wall:
|
||||
config:
|
||||
multi-statement-allow: true
|
||||
@ -1,5 +1,32 @@
|
||||
# 数据源配置
|
||||
spring:
|
||||
# 服务模块
|
||||
devtools:
|
||||
restart:
|
||||
# 热部署开关
|
||||
enabled: true
|
||||
# redis 配置
|
||||
redis:
|
||||
# 地址
|
||||
host: localhost
|
||||
# 端口,默认为6379
|
||||
port: 6379
|
||||
# 数据库索引
|
||||
database: 0
|
||||
# 密码
|
||||
password:
|
||||
# 连接超时时间
|
||||
timeout: 10s
|
||||
lettuce:
|
||||
pool:
|
||||
# 连接池中的最小空闲连接
|
||||
min-idle: 0
|
||||
# 连接池中的最大空闲连接
|
||||
max-idle: 8
|
||||
# 连接池的最大数据库连接数
|
||||
max-active: 8
|
||||
# #连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
max-wait: -1ms
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
@ -60,4 +87,4 @@ spring:
|
||||
merge-sql: true
|
||||
wall:
|
||||
config:
|
||||
multi-statement-allow: true
|
||||
multi-statement-allow: true
|
||||
@ -50,7 +50,7 @@ spring:
|
||||
# 国际化资源文件路径
|
||||
basename: i18n/messages
|
||||
profiles:
|
||||
active: druid
|
||||
active: dev
|
||||
# 文件上传
|
||||
servlet:
|
||||
multipart:
|
||||
@ -58,34 +58,9 @@ spring:
|
||||
max-file-size: 20MB
|
||||
# 设置总上传的文件大小
|
||||
max-request-size: 300MB
|
||||
# 服务模块
|
||||
devtools:
|
||||
restart:
|
||||
# 热部署开关
|
||||
enabled: true
|
||||
# redis 配置
|
||||
redis:
|
||||
# 地址
|
||||
host: localhost
|
||||
# 端口,默认为6379
|
||||
port: 6379
|
||||
# 数据库索引
|
||||
database: 0
|
||||
# 密码
|
||||
password:
|
||||
# 连接超时时间
|
||||
timeout: 10s
|
||||
lettuce:
|
||||
pool:
|
||||
# 连接池中的最小空闲连接
|
||||
min-idle: 0
|
||||
# 连接池中的最大空闲连接
|
||||
max-idle: 8
|
||||
# 连接池的最大数据库连接数
|
||||
max-active: 8
|
||||
# #连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
max-wait: -1ms
|
||||
|
||||
mvc:
|
||||
pathmatch:
|
||||
matching-strategy: ant_path_matcher
|
||||
# token配置
|
||||
token:
|
||||
# 令牌自定义标识
|
||||
@ -96,13 +71,22 @@ token:
|
||||
expireTime: 480
|
||||
|
||||
# MyBatis配置
|
||||
mybatis:
|
||||
mybatis-plus:
|
||||
# 搜索指定包别名
|
||||
typeAliasesPackage: com.evo.**.domain
|
||||
# 配置mapper的扫描,找到所有的mapper.xml映射文件
|
||||
mapperLocations: classpath*:mapper/**/*Mapper.xml
|
||||
# 加载全局的配置文件
|
||||
configLocation: classpath:mybatis/mybatis-config.xml
|
||||
# configuration: classpath:mybatis/mybatis-config.xml
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
type-aliases-package: com.evo.**.domain
|
||||
mapper-locations: classpath*:mapper/**/*Mapper.xml
|
||||
global-config:
|
||||
db-config:
|
||||
id-type: auto
|
||||
logic-delete-value: 1
|
||||
logic-not-delete-value: 0
|
||||
check-config-location: false
|
||||
|
||||
# PageHelper分页插件
|
||||
pagehelper:
|
||||
|
||||
63
evo-admin/src/main/resources/mapper/common/UploadMapper.xml
Normal file
63
evo-admin/src/main/resources/mapper/common/UploadMapper.xml
Normal file
@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.evo.system.mapper.RzUploadMapper">
|
||||
|
||||
<resultMap type="RzUpload" id="uploadResult">
|
||||
<id property="id" column="id" />
|
||||
<result property="type" column="type" />
|
||||
<result property="businessId" column="business_id" />
|
||||
<result property="url" column="url" />
|
||||
<result property="fileName" column="file_name" />
|
||||
<result property="newFileName" column="new_file_name" />
|
||||
<result property="originalFilename" column="original_file_name" />
|
||||
<result property="uploadTime" column="upload_time" />
|
||||
<result property="uploadIp" column="upload_ip" />
|
||||
<result property="valid" column="valid" />
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertUpload" parameterType="RzUpload" useGeneratedKeys = "true" keyProperty ="id">
|
||||
insert into rz_upload(
|
||||
<if test="id != null and id != 0">id,</if>
|
||||
<if test="type != null and type != ''">type,</if>
|
||||
<if test="businessId != null and businessId != 0">business_id,</if>
|
||||
<if test="url != null and url != ''">url,</if>
|
||||
<if test="fileName != null and fileName != ''">file_name,</if>
|
||||
<if test="newFileName != null and newFileName != ''">new_file_name,</if>
|
||||
<if test="originalFileName != null and originalFileName != ''">original_file_name,</if>
|
||||
<if test="uploadIp != null and uploadIp != ''">upload_ip,</if>
|
||||
<if test="valid != null">valid,</if>
|
||||
upload_time
|
||||
)values(
|
||||
<if test="id != null and id != 0">#{id},</if>
|
||||
<if test="type != null and type != ''">#{type},</if>
|
||||
<if test="businessId != null and businessId != 0">#{businessId},</if>
|
||||
<if test="url != null and url != ''">#{url},</if>
|
||||
<if test="fileName != null and fileName != ''">#{fileName},</if>
|
||||
<if test="newFileName != null and newFileName != ''">#{newFileName},</if>
|
||||
<if test="originalFileName != null and originalFileName != ''">#{originalFileName},</if>
|
||||
<if test="uploadIp != null and uploadIp != ''">#{uploadIp},</if>
|
||||
<if test="valid != null">#{valid},</if>
|
||||
now()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateUploadBusinessId" parameterType="RzUpload">
|
||||
update rz_upload
|
||||
<set>
|
||||
<if test="businessId != null and businessId != 0">business_id = #{businessId},</if>
|
||||
</set>
|
||||
where id = #{id} and type=#{type}
|
||||
</update>
|
||||
|
||||
<update id="updateUploadValidByBusinessId" parameterType="RzUpload">
|
||||
update rz_upload
|
||||
<set>
|
||||
<if test="valid != null">valid = #{valid},</if>
|
||||
</set>
|
||||
where business_id = #{businessId} and type=#{type} and id != #{id}
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -47,6 +47,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="socialSubsidy" column="social_subsidy" />
|
||||
<result property="imageUrl" column="image_url" />
|
||||
<result property="timeClock" column="time_clock" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysStaffVo">
|
||||
@ -124,6 +126,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="socialSubsidy != null">social_subsidy,</if>
|
||||
<if test="imageUrl != null">image_url,</if>
|
||||
<if test="timeClock != null">time_clock,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="companyName != null">#{companyName},</if>
|
||||
@ -167,6 +171,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="socialSubsidy != null">#{socialSubsidy},</if>
|
||||
<if test="imageUrl != null">#{imageUrl},</if>
|
||||
<if test="timeClock != null">#{timeClock},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -214,6 +220,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="socialSubsidy != null">social_subsidy = #{socialSubsidy},</if>
|
||||
<if test="imageUrl != null">image_url = #{imageUrl},</if>
|
||||
<if test="timeClock != null">time_clock = #{timeClock},</if>
|
||||
</trim>
|
||||
where user_id = #{userId}
|
||||
</update>
|
||||
|
||||
@ -1,5 +1,32 @@
|
||||
# 数据源配置
|
||||
spring:
|
||||
# 服务模块
|
||||
devtools:
|
||||
restart:
|
||||
# 热部署开关
|
||||
enabled: true
|
||||
# redis 配置
|
||||
redis:
|
||||
# 地址
|
||||
host: localhost
|
||||
# 端口,默认为6379
|
||||
port: 6379
|
||||
# 数据库索引
|
||||
database: 0
|
||||
# 密码
|
||||
password:
|
||||
# 连接超时时间
|
||||
timeout: 10s
|
||||
lettuce:
|
||||
pool:
|
||||
# 连接池中的最小空闲连接
|
||||
min-idle: 0
|
||||
# 连接池中的最大空闲连接
|
||||
max-idle: 8
|
||||
# 连接池的最大数据库连接数
|
||||
max-active: 8
|
||||
# #连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
max-wait: -1ms
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
@ -60,4 +87,4 @@ spring:
|
||||
merge-sql: true
|
||||
wall:
|
||||
config:
|
||||
multi-statement-allow: true
|
||||
multi-statement-allow: true
|
||||
@ -50,7 +50,7 @@ spring:
|
||||
# 国际化资源文件路径
|
||||
basename: i18n/messages
|
||||
profiles:
|
||||
active: druid
|
||||
active: dev
|
||||
# 文件上传
|
||||
servlet:
|
||||
multipart:
|
||||
@ -58,34 +58,9 @@ spring:
|
||||
max-file-size: 20MB
|
||||
# 设置总上传的文件大小
|
||||
max-request-size: 300MB
|
||||
# 服务模块
|
||||
devtools:
|
||||
restart:
|
||||
# 热部署开关
|
||||
enabled: true
|
||||
# redis 配置
|
||||
redis:
|
||||
# 地址
|
||||
host: localhost
|
||||
# 端口,默认为6379
|
||||
port: 6379
|
||||
# 数据库索引
|
||||
database: 0
|
||||
# 密码
|
||||
password:
|
||||
# 连接超时时间
|
||||
timeout: 10s
|
||||
lettuce:
|
||||
pool:
|
||||
# 连接池中的最小空闲连接
|
||||
min-idle: 0
|
||||
# 连接池中的最大空闲连接
|
||||
max-idle: 8
|
||||
# 连接池的最大数据库连接数
|
||||
max-active: 8
|
||||
# #连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
max-wait: -1ms
|
||||
|
||||
mvc:
|
||||
pathmatch:
|
||||
matching-strategy: ant_path_matcher
|
||||
# token配置
|
||||
token:
|
||||
# 令牌自定义标识
|
||||
@ -96,13 +71,22 @@ token:
|
||||
expireTime: 480
|
||||
|
||||
# MyBatis配置
|
||||
mybatis:
|
||||
mybatis-plus:
|
||||
# 搜索指定包别名
|
||||
typeAliasesPackage: com.evo.**.domain
|
||||
# 配置mapper的扫描,找到所有的mapper.xml映射文件
|
||||
mapperLocations: classpath*:mapper/**/*Mapper.xml
|
||||
# 加载全局的配置文件
|
||||
configLocation: classpath:mybatis/mybatis-config.xml
|
||||
# configuration: classpath:mybatis/mybatis-config.xml
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
type-aliases-package: com.evo.**.domain
|
||||
mapper-locations: classpath*:mapper/**/*Mapper.xml
|
||||
global-config:
|
||||
db-config:
|
||||
id-type: auto
|
||||
logic-delete-value: 1
|
||||
logic-not-delete-value: 0
|
||||
check-config-location: false
|
||||
|
||||
# PageHelper分页插件
|
||||
pagehelper:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user