parent
6315245009
commit
508214d07e
@ -0,0 +1,8 @@
|
||||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# 基于编辑器的 HTTP 客户端请求
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<annotationProcessing>
|
||||
<profile name="Maven default annotation processors profile" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="kuaidizhan" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="corretto-1.8" project-jdk-type="JavaSDK" />
|
||||
</project>
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,296 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.jlwl</groupId>
|
||||
<artifactId>kuaidizhan</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<spring.version>5.0.0.RELEASE</spring.version>
|
||||
<junit.version>4.12</junit.version>
|
||||
<druid.version>1.1.0</druid.version>
|
||||
<fastjson.version>1.2.8</fastjson.version>
|
||||
<mybaitsplus.version>2.3</mybaitsplus.version>
|
||||
<mysql.version>5.1.38</mysql.version>
|
||||
<log4j.version>1.2.17</log4j.version>
|
||||
<slf4j.version>1.7.19</slf4j.version>
|
||||
<aspectjweaver.version>1.8.8</aspectjweaver.version>
|
||||
<fileupload.version>1.3.1</fileupload.version>
|
||||
<jstl.version>1.2</jstl.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!-- JUnit -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>${junit.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Spring -->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-core</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context-support</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-tx</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-aop</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-beans</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-jdbc</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Spring MVC -->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-web</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-webmvc</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- AOP -->
|
||||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
<artifactId>aspectjweaver</artifactId>
|
||||
<version>${aspectjweaver.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- FileUpload -->
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
<version>${fileupload.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>jstl</artifactId>
|
||||
<version>${jstl.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Mybatis-Plus -->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus</artifactId>
|
||||
<version>${mybaitsplus.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Mysql -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>${mysql.version}</version>
|
||||
</dependency>
|
||||
<!-- Druid -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid</artifactId>
|
||||
<version>${druid.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- FastJson -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>${fastjson.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Log -->
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>${log4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-test</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.validation</groupId>
|
||||
<artifactId>validation-api</artifactId>
|
||||
<version>2.0.1.Final</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.5</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>4.0.12</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.tomcat.embed/tomcat-embed-core -->
|
||||
<dependency>
|
||||
<groupId>org.apache.tomcat.embed</groupId>
|
||||
<artifactId>tomcat-embed-core</artifactId>
|
||||
<version>9.0.29</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/commons-beanutils/commons-beanutils -->
|
||||
<dependency>
|
||||
<groupId>commons-beanutils</groupId>
|
||||
<artifactId>commons-beanutils</artifactId>
|
||||
<version>1.8.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-annotations -->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
<version>2.10.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>2.10.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.codehaus.jackson</groupId>
|
||||
<artifactId>jackson-mapper-asl</artifactId>
|
||||
<version>1.9.13</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/javax.servlet.jsp/jsp-api -->
|
||||
<dependency>
|
||||
<groupId>javax.servlet.jsp</groupId>
|
||||
<artifactId>jsp-api</artifactId>
|
||||
<version>2.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- 百度人工智能 -->
|
||||
<dependency>
|
||||
<groupId>com.baidu.aip</groupId>
|
||||
<artifactId>java-sdk</artifactId>
|
||||
<version>4.4.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.tomcat.embed/tomcat-embed-jasper -->
|
||||
<dependency>
|
||||
<groupId>org.apache.tomcat.embed</groupId>
|
||||
<artifactId>tomcat-embed-jasper</artifactId>
|
||||
<version>9.0.27</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<artifactId>hibernate-validator</artifactId>
|
||||
<version>5.2.4.Final</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 导入导出excel -->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-scratchpad</artifactId>
|
||||
<version>3.11-beta2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
<version>3.11-beta2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml-schemas</artifactId>
|
||||
<version>3.11-beta2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-excelant</artifactId>
|
||||
<version>3.11-beta2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
<build>
|
||||
<!-- 项目访问名称 -->
|
||||
<finalName>kuaidizhan</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.7</source>
|
||||
<target>1.7</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
@ -0,0 +1,15 @@
|
||||
package com.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* 登录用户信息
|
||||
*/
|
||||
@Target(ElementType.PARAMETER)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface APPLoginUser {
|
||||
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* 忽略Token验证
|
||||
*/
|
||||
@Target(ElementType.METHOD)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
public @interface IgnoreAuth {
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* 登录用户信息
|
||||
*/
|
||||
@Target(ElementType.PARAMETER)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface LoginUser {
|
||||
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.config;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.apache.ibatis.reflection.MetaObject;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.MetaObjectHandler;
|
||||
|
||||
/**
|
||||
* 自定义填充处理器
|
||||
*/
|
||||
public class MyMetaObjectHandler extends MetaObjectHandler {
|
||||
|
||||
@Override
|
||||
public void insertFill(MetaObject metaObject) {
|
||||
this.setFieldValByName("ctime", new Date(), metaObject);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean openUpdateFill() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateFill(MetaObject metaObject) {
|
||||
// 关闭更新填充、这里不执行
|
||||
}
|
||||
}
|
@ -0,0 +1,110 @@
|
||||
|
||||
package com.controller;
|
||||
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.entity.ConfigEntity;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
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 com.annotation.IgnoreAuth;
|
||||
import com.service.ConfigService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
|
||||
/**
|
||||
* 登录相关
|
||||
*/
|
||||
@RequestMapping("config")
|
||||
@RestController
|
||||
public class ConfigController{
|
||||
|
||||
@Autowired
|
||||
private ConfigService configService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,ConfigEntity config){
|
||||
EntityWrapper<ConfigEntity> ew = new EntityWrapper<ConfigEntity>();
|
||||
PageUtils page = configService.queryPage(params);
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,ConfigEntity config){
|
||||
EntityWrapper<ConfigEntity> ew = new EntityWrapper<ConfigEntity>();
|
||||
PageUtils page = configService.queryPage(params);
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") String id){
|
||||
ConfigEntity config = configService.selectById(id);
|
||||
return R.ok().put("data", config);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") String id){
|
||||
ConfigEntity config = configService.selectById(id);
|
||||
return R.ok().put("data", config);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据name获取信息
|
||||
*/
|
||||
@RequestMapping("/info")
|
||||
public R infoByName(@RequestParam String name){
|
||||
ConfigEntity config = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));
|
||||
return R.ok().put("data", config);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
public R save(@RequestBody ConfigEntity config){
|
||||
// ValidatorUtils.validateEntity(config);
|
||||
configService.insert(config);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody ConfigEntity config){
|
||||
// ValidatorUtils.validateEntity(config);
|
||||
configService.updateById(config);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
configService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
}
|
@ -0,0 +1,244 @@
|
||||
package com.controller;
|
||||
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import java.util.*;
|
||||
|
||||
import com.entity.JiedanEntity;
|
||||
import com.service.*;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import org.springframework.web.context.ContextLoader;
|
||||
import javax.servlet.ServletContext;
|
||||
|
||||
import com.utils.StringUtil;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import com.annotation.IgnoreAuth;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
|
||||
import com.entity.DaiquEntity;
|
||||
|
||||
import com.entity.view.DaiquView;
|
||||
import com.entity.YonghuEntity;
|
||||
import com.entity.ZhandianEntity;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
|
||||
/**
|
||||
* 待取件表
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-11
|
||||
*/
|
||||
@RestController
|
||||
@Controller
|
||||
@RequestMapping("/daiqu")
|
||||
public class DaiquController {
|
||||
private static final Logger logger = LoggerFactory.getLogger(DaiquController.class);
|
||||
|
||||
@Autowired
|
||||
private DaiquService daiquService;
|
||||
|
||||
@Autowired
|
||||
private JiedanService jiedanService;
|
||||
|
||||
@Autowired
|
||||
private TokenService tokenService;
|
||||
@Autowired
|
||||
private DictionaryService dictionaryService;
|
||||
|
||||
|
||||
//级联表service
|
||||
@Autowired
|
||||
private YonghuService yonghuService;
|
||||
@Autowired
|
||||
private ZhandianService zhandianService;
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
|
||||
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
|
||||
String role = String.valueOf(request.getSession().getAttribute("role"));
|
||||
if(StringUtil.isNotEmpty(role) && "用户".equals(role)){
|
||||
params.put("yonghuId",request.getSession().getAttribute("userId"));
|
||||
}
|
||||
PageUtils page = daiquService.queryPage(params);
|
||||
|
||||
//字典表数据转换
|
||||
List<DaiquView> list =(List<DaiquView>)page.getList();
|
||||
for(DaiquView c:list){
|
||||
//修改对应字典表字段
|
||||
dictionaryService.dictionaryConvert(c);
|
||||
}
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
|
||||
DaiquEntity daiqu = daiquService.selectById(id);
|
||||
if(daiqu !=null){
|
||||
//entity转view
|
||||
DaiquView view = new DaiquView();
|
||||
BeanUtils.copyProperties( daiqu , view );//把实体数据重构到view中
|
||||
|
||||
//级联表
|
||||
YonghuEntity yonghu = yonghuService.selectById(daiqu.getYonghuId());
|
||||
if(yonghu != null){
|
||||
BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段
|
||||
view.setYonghuId(yonghu.getId());
|
||||
}
|
||||
//级联表
|
||||
ZhandianEntity zhandian = zhandianService.selectById(daiqu.getZhandianId());
|
||||
if(zhandian != null){
|
||||
BeanUtils.copyProperties( zhandian , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段
|
||||
view.setZhandianId(zhandian.getId());
|
||||
}
|
||||
//修改对应字典表字段
|
||||
dictionaryService.dictionaryConvert(view);
|
||||
return R.ok().put("data", view);
|
||||
}else {
|
||||
return R.error(511,"查不到数据");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody DaiquEntity daiqu, HttpServletRequest request){
|
||||
logger.debug("save方法:,,Controller:{},,daiqu:{}",this.getClass().getName(),daiqu.toString());
|
||||
daiqu.setKdztTypes(1);
|
||||
daiqu.setTakecode(UUID.randomUUID().toString().toString().replace("-","").substring(0,6));
|
||||
Wrapper<DaiquEntity> queryWrapper = new EntityWrapper<DaiquEntity>()
|
||||
.eq("dqname", daiqu.getDqname())
|
||||
.eq("zhandian_id", daiqu.getZhandianId())
|
||||
.eq("yonghu_id", daiqu.getYonghuId())
|
||||
.eq("takecode", daiqu.getTakecode())
|
||||
;
|
||||
logger.info("sql语句:"+queryWrapper.getSqlSegment());
|
||||
DaiquEntity daiquEntity = daiquService.selectOne(queryWrapper);
|
||||
if(daiquEntity==null){
|
||||
daiquService.insert(daiqu);
|
||||
return R.ok();
|
||||
}else {
|
||||
return R.error(511,"表中有相同数据");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody DaiquEntity daiqu, HttpServletRequest request){
|
||||
logger.debug("update方法:,,Controller:{},,daiqu:{}",this.getClass().getName(),daiqu.toString());
|
||||
//根据字段查询是否有相同数据
|
||||
Wrapper<DaiquEntity> queryWrapper = new EntityWrapper<DaiquEntity>()
|
||||
.notIn("id",daiqu.getId())
|
||||
.eq("dqname", daiqu.getDqname())
|
||||
.eq("zhandian_id", daiqu.getZhandianId())
|
||||
.eq("yonghu_id", daiqu.getYonghuId())
|
||||
.eq("kddx_types", daiqu.getKddxTypes())
|
||||
.eq("dqphone", daiqu.getDqphone())
|
||||
.eq("takecode", daiqu.getTakecode())
|
||||
.eq("kdzt_types", daiqu.getKdztTypes())
|
||||
;
|
||||
logger.info("sql语句:"+queryWrapper.getSqlSegment());
|
||||
DaiquEntity daiquEntity = daiquService.selectOne(queryWrapper);
|
||||
daiqu.setPickupTime(new Date());
|
||||
if(daiquEntity==null){
|
||||
daiquService.updateById(daiqu);//根据id更新
|
||||
return R.ok();
|
||||
}else {
|
||||
return R.error(511,"表中有相同数据");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 代取订单
|
||||
*/
|
||||
@RequestMapping("/replaceExpress")
|
||||
public R replaceExpress(@RequestBody Integer ids){
|
||||
DaiquEntity daiqu = daiquService.selectById(ids);
|
||||
if(daiqu == null){
|
||||
return R.error("数据不存在");
|
||||
}
|
||||
YonghuEntity yonghu = yonghuService.selectById(daiqu.getYonghuId());
|
||||
if(yonghu == null){
|
||||
return R.error("数据不存在");
|
||||
}
|
||||
JiedanEntity jiedan = new JiedanEntity();
|
||||
jiedan.setInitiateTime(new Date());
|
||||
jiedan.setJdyonghuId(daiqu.getYonghuId());
|
||||
jiedan.setJdphone(daiqu.getDqphone());
|
||||
jiedan.setAddresseename(yonghu.getName());
|
||||
jiedan.setJdaddressee("住宿楼栋:"+yonghu.getDormitory()+" ,寝室号:"+yonghu.getDormitory());
|
||||
jiedan.setJdtakecode(daiqu.getTakecode());
|
||||
jiedan.setDaiqukuaidimc(daiqu.getDqname());
|
||||
jiedan.setJdztTypes(1);//1未接
|
||||
jiedan.setKdlxTypes(1);//1取件
|
||||
jiedan.setOdd(String.valueOf(new Date().getTime()));
|
||||
Wrapper<JiedanEntity> queryWrapper = new EntityWrapper<JiedanEntity>()
|
||||
.eq("jdyonghu_id", jiedan.getJdyonghuId())
|
||||
.eq("jdtakecode", jiedan.getJdtakecode())
|
||||
;
|
||||
logger.info("sql语句:"+queryWrapper.getSqlSegment());
|
||||
JiedanEntity jiedanEntity = jiedanService.selectOne(queryWrapper);
|
||||
if(jiedanEntity==null){
|
||||
daiqu.setKdztTypes(3);
|
||||
daiquService.updateById(daiqu);
|
||||
jiedanService.insert(jiedan);
|
||||
return R.ok();
|
||||
}else {
|
||||
return R.error(511,"你已经发布过这件快递的代取订单了");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 取件
|
||||
*/
|
||||
@RequestMapping("/pickUp")
|
||||
public R pickUp(@RequestBody Integer ids){
|
||||
DaiquEntity daiqu = daiquService.selectById(ids);
|
||||
if(daiqu == null){
|
||||
return R.error("数据不存在");
|
||||
}
|
||||
daiqu.setKdztTypes(2);
|
||||
daiqu.setPickupTime(new Date());
|
||||
daiquService.updateById(daiqu);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Integer[] ids){
|
||||
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
|
||||
daiquService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,225 @@
|
||||
package com.controller;
|
||||
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import java.util.*;
|
||||
|
||||
import com.entity.DaiqurenEntity;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import org.springframework.web.context.ContextLoader;
|
||||
import javax.servlet.ServletContext;
|
||||
import com.service.TokenService;
|
||||
import com.utils.StringUtil;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
import com.service.DictionaryService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import com.annotation.IgnoreAuth;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
|
||||
import com.entity.DaiqurenEntity;
|
||||
|
||||
import com.service.DaiqurenService;
|
||||
import com.entity.view.DaiqurenView;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
|
||||
/**
|
||||
*
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-11
|
||||
*/
|
||||
@RestController
|
||||
@Controller
|
||||
@RequestMapping("/daiquren")
|
||||
public class DaiqurenController {
|
||||
private static final Logger logger = LoggerFactory.getLogger(DaiqurenController.class);
|
||||
|
||||
@Autowired
|
||||
private DaiqurenService daiqurenService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private TokenService tokenService;
|
||||
@Autowired
|
||||
private DictionaryService dictionaryService;
|
||||
|
||||
|
||||
//级联表service
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
|
||||
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
|
||||
String role = String.valueOf(request.getSession().getAttribute("role"));
|
||||
if(StringUtil.isNotEmpty(role) && "代取人".equals(role)){
|
||||
params.put("yonghuId",request.getSession().getAttribute("userId"));
|
||||
}
|
||||
PageUtils page = daiqurenService.queryPage(params);
|
||||
|
||||
//字典表数据转换
|
||||
List<DaiqurenView> list =(List<DaiqurenView>)page.getList();
|
||||
for(DaiqurenView c:list){
|
||||
//修改对应字典表字段
|
||||
dictionaryService.dictionaryConvert(c);
|
||||
}
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
|
||||
DaiqurenEntity daiquren = daiqurenService.selectById(id);
|
||||
if(daiquren !=null){
|
||||
//entity转view
|
||||
DaiqurenView view = new DaiqurenView();
|
||||
BeanUtils.copyProperties( daiquren , view );//把实体数据重构到view中
|
||||
|
||||
//修改对应字典表字段
|
||||
dictionaryService.dictionaryConvert(view);
|
||||
return R.ok().put("data", view);
|
||||
}else {
|
||||
return R.error(511,"查不到数据");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody DaiqurenEntity daiquren, HttpServletRequest request){
|
||||
logger.debug("save方法:,,Controller:{},,daiquren:{}",this.getClass().getName(),daiquren.toString());
|
||||
Wrapper<DaiqurenEntity> queryWrapper = new EntityWrapper<DaiqurenEntity>()
|
||||
.eq("name", daiquren.getName())
|
||||
.eq("username", daiquren.getUsername())
|
||||
.eq("password", daiquren.getPassword())
|
||||
.eq("sex_types", daiquren.getSexTypes())
|
||||
.eq("phone", daiquren.getPhone())
|
||||
.eq("role", daiquren.getRole())
|
||||
;
|
||||
logger.info("sql语句:"+queryWrapper.getSqlSegment());
|
||||
DaiqurenEntity daiqurenEntity = daiqurenService.selectOne(queryWrapper);
|
||||
if(daiqurenEntity==null){
|
||||
daiquren.setRole("代取人");
|
||||
daiqurenService.insert(daiquren);
|
||||
return R.ok();
|
||||
}else {
|
||||
return R.error(511,"表中有相同数据");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody DaiqurenEntity daiquren, HttpServletRequest request){
|
||||
logger.debug("update方法:,,Controller:{},,daiquren:{}",this.getClass().getName(),daiquren.toString());
|
||||
//根据字段查询是否有相同数据
|
||||
Wrapper<DaiqurenEntity> queryWrapper = new EntityWrapper<DaiqurenEntity>()
|
||||
.notIn("id",daiquren.getId())
|
||||
.eq("name", daiquren.getName())
|
||||
.eq("username", daiquren.getUsername())
|
||||
.eq("password", daiquren.getPassword())
|
||||
.eq("sex_types", daiquren.getSexTypes())
|
||||
.eq("phone", daiquren.getPhone())
|
||||
.eq("role", daiquren.getRole())
|
||||
;
|
||||
logger.info("sql语句:"+queryWrapper.getSqlSegment());
|
||||
DaiqurenEntity daiqurenEntity = daiqurenService.selectOne(queryWrapper);
|
||||
if("".equals(daiquren.getImgPhoto()) || "null".equals(daiquren.getImgPhoto())){
|
||||
daiquren.setImgPhoto(null);
|
||||
}
|
||||
if(daiqurenEntity==null){
|
||||
daiqurenService.updateById(daiquren);//根据id更新
|
||||
return R.ok();
|
||||
}else {
|
||||
return R.error(511,"表中有相同数据");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Integer[] ids){
|
||||
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
|
||||
daiqurenService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 登录
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@PostMapping(value = "/login")
|
||||
public R login(String username, String password, String role, HttpServletRequest request) {
|
||||
DaiqurenEntity yonghu = daiqurenService.selectOne(new EntityWrapper<DaiqurenEntity>().eq("username", username));
|
||||
if(yonghu==null || !yonghu.getPassword().equals(password)) {
|
||||
return R.error("账号或密码不正确");
|
||||
}
|
||||
if(!role.equals(yonghu.getRole())){
|
||||
return R.error("权限不正确");
|
||||
}
|
||||
String token = tokenService.generateToken(yonghu.getId(),username, "yonghu", "代取人");
|
||||
R r = R.ok();
|
||||
r.put("token", token);
|
||||
r.put("role","代取人");
|
||||
r.put("userId",yonghu.getId());
|
||||
return r;
|
||||
}
|
||||
|
||||
/**
|
||||
* 注册
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@PostMapping(value = "/register")
|
||||
public R register(@RequestBody DaiqurenEntity yonghu){
|
||||
// ValidatorUtils.validateEntity(user);
|
||||
if(daiqurenService.selectOne(new EntityWrapper<DaiqurenEntity>().eq("username", yonghu.getUsername()).orNew().eq("phone",yonghu.getPhone())) !=null) {
|
||||
return R.error("代取人已存在或手机号身份证号已经被使用");
|
||||
}
|
||||
daiqurenService.insert(yonghu);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取代取人的session代取人信息
|
||||
*/
|
||||
@RequestMapping("/session")
|
||||
public R getCurrYonghu(HttpServletRequest request){
|
||||
Integer id = (Integer)request.getSession().getAttribute("userId");
|
||||
DaiqurenEntity yonghu = daiqurenService.selectById(id);
|
||||
return R.ok().put("data", yonghu);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 退出
|
||||
*/
|
||||
@GetMapping(value = "logout")
|
||||
public R logout(HttpServletRequest request) {
|
||||
request.getSession().invalidate();
|
||||
return R.ok("退出成功");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,188 @@
|
||||
package com.controller;
|
||||
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import java.util.*;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import org.springframework.web.context.ContextLoader;
|
||||
import javax.servlet.ServletContext;
|
||||
import com.service.TokenService;
|
||||
import com.utils.StringUtil;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
import com.service.DictionaryService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import com.annotation.IgnoreAuth;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
|
||||
import com.entity.DictionaryEntity;
|
||||
|
||||
import com.service.DictionaryService;
|
||||
import com.entity.view.DictionaryView;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
|
||||
/**
|
||||
* 字典表
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-11
|
||||
*/
|
||||
@RestController
|
||||
@Controller
|
||||
@RequestMapping("/dictionary")
|
||||
public class DictionaryController {
|
||||
private static final Logger logger = LoggerFactory.getLogger(DictionaryController.class);
|
||||
|
||||
@Autowired
|
||||
private DictionaryService dictionaryService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private TokenService tokenService;
|
||||
|
||||
|
||||
//级联表service
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
|
||||
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
|
||||
String role = String.valueOf(request.getSession().getAttribute("role"));
|
||||
if(StringUtil.isNotEmpty(role) && "用户".equals(role)){
|
||||
params.put("yonghuId",request.getSession().getAttribute("userId"));
|
||||
}
|
||||
PageUtils page = dictionaryService.queryPage(params);
|
||||
|
||||
//字典表数据转换
|
||||
List<DictionaryView> list =(List<DictionaryView>)page.getList();
|
||||
for(DictionaryView c:list){
|
||||
//修改对应字典表字段
|
||||
dictionaryService.dictionaryConvert(c);
|
||||
}
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
|
||||
DictionaryEntity dictionary = dictionaryService.selectById(id);
|
||||
if(dictionary !=null){
|
||||
//entity转view
|
||||
DictionaryView view = new DictionaryView();
|
||||
BeanUtils.copyProperties( dictionary , view );//把实体数据重构到view中
|
||||
|
||||
//修改对应字典表字段
|
||||
dictionaryService.dictionaryConvert(view);
|
||||
return R.ok().put("data", view);
|
||||
}else {
|
||||
return R.error(511,"查不到数据");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody DictionaryEntity dictionary, HttpServletRequest request){
|
||||
logger.debug("save方法:,,Controller:{},,dictionary:{}",this.getClass().getName(),dictionary.toString());
|
||||
Wrapper<DictionaryEntity> queryWrapper = new EntityWrapper<DictionaryEntity>()
|
||||
.eq("dic_code", dictionary.getDicCode())
|
||||
.eq("code_index", dictionary.getCodeIndex())
|
||||
;
|
||||
logger.info("sql语句:"+queryWrapper.getSqlSegment());
|
||||
DictionaryEntity dictionaryEntity = dictionaryService.selectOne(queryWrapper);
|
||||
if(dictionaryEntity==null){
|
||||
dictionary.setCreateTime(new Date());
|
||||
// String role = String.valueOf(request.getSession().getAttribute("role"));
|
||||
// if("".equals(role)){
|
||||
// dictionary.set
|
||||
// }
|
||||
dictionaryService.insert(dictionary);
|
||||
//如果字典表新增数据的话,把数据再重新查出,放入监听器中
|
||||
List<DictionaryEntity> dictionaryEntities = dictionaryService.selectList(new EntityWrapper<DictionaryEntity>());
|
||||
ServletContext servletContext = ContextLoader.getCurrentWebApplicationContext().getServletContext();
|
||||
Map<String, Map<Integer,String>> map = new HashMap<>();
|
||||
for(DictionaryEntity d :dictionaryEntities){
|
||||
Map<Integer, String> m = map.get(d.getDicCode());
|
||||
if(m ==null || m.isEmpty()){
|
||||
m = new HashMap<>();
|
||||
}
|
||||
m.put(d.getCodeIndex(),d.getIndexName());
|
||||
map.put(d.getDicCode(),m);
|
||||
}
|
||||
servletContext.setAttribute("dictionaryMap",map);
|
||||
return R.ok();
|
||||
}else {
|
||||
return R.error(511,"表中有相同数据");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody DictionaryEntity dictionary, HttpServletRequest request){
|
||||
logger.debug("update方法:,,Controller:{},,dictionary:{}",this.getClass().getName(),dictionary.toString());
|
||||
//根据字段查询是否有相同数据
|
||||
Wrapper<DictionaryEntity> queryWrapper = new EntityWrapper<DictionaryEntity>()
|
||||
.notIn("id",dictionary.getId())
|
||||
.eq("dic_code", dictionary.getDicCode())
|
||||
.eq("code_index", dictionary.getCodeIndex())
|
||||
;
|
||||
logger.info("sql语句:"+queryWrapper.getSqlSegment());
|
||||
DictionaryEntity dictionaryEntity = dictionaryService.selectOne(queryWrapper);
|
||||
if(dictionaryEntity==null){
|
||||
// String role = String.valueOf(request.getSession().getAttribute("role"));
|
||||
// if("".equals(role)){
|
||||
// dictionary.set
|
||||
// }
|
||||
dictionaryService.updateById(dictionary);//根据id更新
|
||||
//如果字典表修改数据的话,把数据再重新查出,放入监听器中
|
||||
List<DictionaryEntity> dictionaryEntities = dictionaryService.selectList(new EntityWrapper<DictionaryEntity>());
|
||||
ServletContext servletContext = ContextLoader.getCurrentWebApplicationContext().getServletContext();
|
||||
Map<String, Map<Integer,String>> map = new HashMap<>();
|
||||
for(DictionaryEntity d :dictionaryEntities){
|
||||
Map<Integer, String> m = map.get(d.getDicCode());
|
||||
if(m ==null || m.isEmpty()){
|
||||
m = new HashMap<>();
|
||||
}
|
||||
m.put(d.getCodeIndex(),d.getIndexName());
|
||||
map.put(d.getDicCode(),m);
|
||||
}
|
||||
servletContext.setAttribute("dictionaryMap",map);
|
||||
return R.ok();
|
||||
}else {
|
||||
return R.error(511,"表中有相同数据");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Integer[] ids){
|
||||
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
|
||||
dictionaryService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,83 @@
|
||||
package com.controller;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.entity.ConfigEntity;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
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;
|
||||
|
||||
import com.annotation.IgnoreAuth;
|
||||
import com.entity.EIException;
|
||||
import com.service.ConfigService;
|
||||
import com.utils.R;
|
||||
|
||||
/**
|
||||
* 上传文件映射表
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("file")
|
||||
@SuppressWarnings({"unchecked","rawtypes"})
|
||||
public class FileController{
|
||||
@Autowired
|
||||
private ConfigService configService;
|
||||
/**
|
||||
* 上传文件
|
||||
*/
|
||||
@RequestMapping("/upload")
|
||||
public R upload(@RequestParam("file") MultipartFile file, String type,HttpServletRequest request) throws Exception {
|
||||
if (file.isEmpty()) {
|
||||
throw new EIException("上传文件不能为空");
|
||||
}
|
||||
String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);
|
||||
String fileName = new Date().getTime()+"."+fileExt;
|
||||
File dest = new File(request.getSession().getServletContext().getRealPath("/upload")+"/"+fileName);
|
||||
file.transferTo(dest);
|
||||
if(StringUtils.isNotBlank(type) && type.equals("1")) {
|
||||
ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));
|
||||
if(configEntity==null) {
|
||||
configEntity = new ConfigEntity();
|
||||
configEntity.setName("faceFile");
|
||||
configEntity.setValue(fileName);
|
||||
} else {
|
||||
configEntity.setValue(fileName);
|
||||
}
|
||||
configService.insertOrUpdate(configEntity);
|
||||
}
|
||||
return R.ok().put("file", fileName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载文件
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/download")
|
||||
public void download(@RequestParam String fileName, HttpServletRequest request, HttpServletResponse response) {
|
||||
try {
|
||||
File file = new File(request.getSession().getServletContext().getRealPath("/upload")+"/"+fileName);
|
||||
if (file.exists()) {
|
||||
response.reset();
|
||||
response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName+"\"");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
response.setHeader("Access-Control-Allow-Credentials", "true");
|
||||
response.setContentType("application/octet-stream; charset=UTF-8");
|
||||
IOUtils.write(FileUtils.readFileToByteArray(file), response.getOutputStream());
|
||||
}
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,259 @@
|
||||
package com.controller;
|
||||
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import java.util.*;
|
||||
|
||||
import com.entity.DaiqurenEntity;
|
||||
import com.entity.YijiedanEntity;
|
||||
import com.entity.YonghuEntity;
|
||||
import com.service.*;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import org.springframework.web.context.ContextLoader;
|
||||
import javax.servlet.ServletContext;
|
||||
|
||||
import com.utils.StringUtil;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import com.annotation.IgnoreAuth;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
|
||||
import com.entity.JiedanEntity;
|
||||
|
||||
import com.entity.view.JiedanView;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
|
||||
/**
|
||||
* 快递接单表
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-11
|
||||
*/
|
||||
@RestController
|
||||
@Controller
|
||||
@RequestMapping("/jiedan")
|
||||
public class JiedanController {
|
||||
private static final Logger logger = LoggerFactory.getLogger(JiedanController.class);
|
||||
|
||||
@Autowired
|
||||
private YijiedanService yijiedanService;
|
||||
|
||||
@Autowired
|
||||
private JiedanService jiedanService;
|
||||
|
||||
@Autowired
|
||||
private DaiqurenService daiqurenService;
|
||||
|
||||
@Autowired
|
||||
private YonghuService yonghuService;
|
||||
|
||||
@Autowired
|
||||
private DictionaryService dictionaryService;
|
||||
|
||||
|
||||
//级联表service
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
|
||||
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
|
||||
String role = String.valueOf(request.getSession().getAttribute("role"));
|
||||
PageUtils page = null;
|
||||
if(StringUtil.isNotEmpty(role) && "用户".equals(role)){
|
||||
params.put("yonghuId",request.getSession().getAttribute("userId"));
|
||||
page = jiedanService.queryPage(params);
|
||||
}
|
||||
page = jiedanService.queryPage(params);
|
||||
//字典表数据转换
|
||||
List<JiedanView> list =(List<JiedanView>)page.getList();
|
||||
for(JiedanView c:list){
|
||||
//修改对应字典表字段
|
||||
dictionaryService.dictionaryConvert(c);
|
||||
}
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
|
||||
JiedanEntity jiedan = jiedanService.selectById(id);
|
||||
if(jiedan !=null){
|
||||
//entity转view
|
||||
JiedanView view = new JiedanView();
|
||||
BeanUtils.copyProperties( jiedan , view );//把实体数据重构到view中
|
||||
//修改对应字典表字段
|
||||
dictionaryService.dictionaryConvert(view);
|
||||
return R.ok().put("data", view);
|
||||
}else {
|
||||
return R.error(511,"查不到数据");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody JiedanEntity jiedan, HttpServletRequest request){
|
||||
logger.debug("save方法:,,Controller:{},,jiedan:{}",this.getClass().getName(),jiedan.toString());
|
||||
Wrapper<JiedanEntity> queryWrapper = new EntityWrapper<JiedanEntity>()
|
||||
.eq("addresseename", jiedan.getAddresseename())
|
||||
.eq("jdphone", jiedan.getJdphone())
|
||||
.eq("jdaddressee", jiedan.getJdaddressee())
|
||||
;
|
||||
logger.info("sql语句:"+queryWrapper.getSqlSegment());
|
||||
JiedanEntity jiedanEntity = jiedanService.selectOne(queryWrapper);
|
||||
if(jiedanEntity==null){
|
||||
jiedanService.insert(jiedan);
|
||||
return R.ok();
|
||||
}else {
|
||||
return R.error(511,"表中有相同数据");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody JiedanEntity jiedan, HttpServletRequest request){
|
||||
logger.debug("update方法:,,Controller:{},,jiedan:{}",this.getClass().getName(),jiedan.toString());
|
||||
//根据字段查询是否有相同数据
|
||||
Wrapper<JiedanEntity> queryWrapper = new EntityWrapper<JiedanEntity>()
|
||||
.notIn("id",jiedan.getId())
|
||||
.eq("odd", jiedan.getOdd())
|
||||
.eq("daiqukuaidimc", jiedan.getDaiqukuaidimc())
|
||||
.eq("jdyonghu_id", jiedan.getJdyonghuId())
|
||||
.eq("addresseename", jiedan.getAddresseename())
|
||||
.eq("jdphone", jiedan.getJdphone())
|
||||
.eq("jdaddressee", jiedan.getJdaddressee())
|
||||
.eq("jdtakecode", jiedan.getJdtakecode())
|
||||
.eq("jdzt_types", jiedan.getJdztTypes())
|
||||
.eq("kdlx_types", jiedan.getKdlxTypes())
|
||||
;
|
||||
logger.info("sql语句:"+queryWrapper.getSqlSegment());
|
||||
JiedanEntity jiedanEntity = jiedanService.selectOne(queryWrapper);
|
||||
jiedan.setInitiateTime(new Date());
|
||||
if(jiedanEntity==null){
|
||||
jiedanService.updateById(jiedan);//根据id更新
|
||||
return R.ok();
|
||||
}else {
|
||||
return R.error(511,"表中有相同数据");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 接单
|
||||
*/
|
||||
@RequestMapping("/receiving")
|
||||
public R receiving(@RequestBody Integer ids, HttpServletRequest request){
|
||||
JiedanEntity jiedan = jiedanService.selectById(ids);
|
||||
if(jiedan == null){
|
||||
return R.error();
|
||||
}
|
||||
if(request.getSession().getAttribute("role").equals("代取人")){
|
||||
DaiqurenEntity userId = daiqurenService.selectById((Integer) request.getSession().getAttribute("userId"));
|
||||
|
||||
jiedan.setJdztTypes(2);//以接
|
||||
YijiedanEntity yijiedan = new YijiedanEntity();
|
||||
yijiedan.setOdd(jiedan.getOdd());
|
||||
yijiedan.setYonghuId(jiedan.getJdyonghuId());
|
||||
yijiedan.setFbphone(jiedan.getJdphone());
|
||||
yijiedan.setDaiqurenId(userId.getId());
|
||||
yijiedan.setJdphone(userId.getPhone());
|
||||
yijiedan.setInitiateTime(new Date());
|
||||
yijiedan.setDdztTypes(1);//1正在路上
|
||||
|
||||
Wrapper<YijiedanEntity> queryWrapper = new EntityWrapper<YijiedanEntity>()
|
||||
.eq("odd", yijiedan.getOdd())
|
||||
;
|
||||
logger.info("sql语句:"+queryWrapper.getSqlSegment());
|
||||
YijiedanEntity yijiedanEntity = yijiedanService.selectOne(queryWrapper);
|
||||
if(yijiedanEntity==null){
|
||||
jiedanService.updateById(jiedan);
|
||||
yijiedanService.insert(yijiedan);
|
||||
return R.ok();
|
||||
}else {
|
||||
return R.error(511,"表中有相同数据");
|
||||
}
|
||||
}
|
||||
return R.error("***");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/ship")
|
||||
public R ship(String name, Integer yh, Integer dx, HttpServletRequest request){
|
||||
if(name == null && name == "null" && name == ""){
|
||||
return R.error("快递名称不能为空");
|
||||
}
|
||||
if(yh == null && yh == 0){
|
||||
return R.error("收件人不能为空");
|
||||
}
|
||||
|
||||
YonghuEntity yonghu = yonghuService.selectById(yh);
|
||||
if(yonghu == null){
|
||||
return R.error();
|
||||
}
|
||||
if(yonghu.getId() == (Integer)request.getSession().getAttribute("userId")){
|
||||
return R.error("发件人和收件人不能相同");
|
||||
}
|
||||
JiedanEntity jiedan = new JiedanEntity();
|
||||
jiedan.setOdd(String.valueOf(new Date().getTime()));
|
||||
jiedan.setDaiqukuaidimc(name);
|
||||
jiedan.setDx(dx);
|
||||
jiedan.setJdyonghuId((Integer)request.getSession().getAttribute("userId"));
|
||||
jiedan.setJdphone(yonghu.getPhone());
|
||||
jiedan.setInitiateTime(new Date());
|
||||
jiedan.setAddresseename(yonghu.getName());
|
||||
jiedan.setJdaddressee("住宿楼栋:"+yonghu.getDormitory()+" ,寝室号:"+yonghu.getDormitory());
|
||||
jiedan.setJdtakecode(UUID.randomUUID().toString().toString().replace("-","").substring(0,6));
|
||||
jiedan.setJdztTypes(1);//1未接
|
||||
jiedan.setKdlxTypes(2);//2寄件
|
||||
Wrapper<JiedanEntity> queryWrapper = new EntityWrapper<JiedanEntity>()
|
||||
.eq("addresseename", jiedan.getAddresseename())
|
||||
.eq("jdphone", jiedan.getJdphone())
|
||||
.eq("jdaddressee", jiedan.getJdaddressee())
|
||||
;
|
||||
logger.info("sql语句:"+queryWrapper.getSqlSegment());
|
||||
JiedanEntity jiedanEntity = jiedanService.selectOne(queryWrapper);
|
||||
if(jiedanEntity==null){
|
||||
jiedanService.insert(jiedan);
|
||||
return R.ok();
|
||||
}else {
|
||||
return R.error(511,"已经有相同的数据了");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Integer[] ids){
|
||||
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
|
||||
jiedanService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,246 @@
|
||||
package com.controller;
|
||||
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import java.util.*;
|
||||
|
||||
import com.entity.*;
|
||||
import com.service.*;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import org.springframework.web.context.ContextLoader;
|
||||
import javax.servlet.ServletContext;
|
||||
|
||||
import com.utils.StringUtil;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import com.annotation.IgnoreAuth;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
|
||||
import com.entity.view.YijiedanView;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
|
||||
/**
|
||||
* 已接单表
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-11
|
||||
*/
|
||||
@RestController
|
||||
@Controller
|
||||
@RequestMapping("/yijiedan")
|
||||
public class YijiedanController {
|
||||
private static final Logger logger = LoggerFactory.getLogger(YijiedanController.class);
|
||||
|
||||
@Autowired
|
||||
private YijiedanService yijiedanService;
|
||||
|
||||
@Autowired
|
||||
private JiedanService jiedanService;
|
||||
|
||||
@Autowired
|
||||
private DictionaryService dictionaryService;
|
||||
|
||||
@Autowired
|
||||
private DaiquService daiquService;
|
||||
|
||||
//级联表service
|
||||
@Autowired
|
||||
private DaiqurenService daiqurenService;
|
||||
|
||||
@Autowired
|
||||
private YonghuService yonghuService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private ZhandianService zhandianService;
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
|
||||
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
|
||||
String role = String.valueOf(request.getSession().getAttribute("role"));
|
||||
PageUtils page = null;
|
||||
if(StringUtil.isNotEmpty(role) && "用户".equals(role)){
|
||||
params.put("yonghuId",request.getSession().getAttribute("userId"));
|
||||
page = yijiedanService.queryPage(params);
|
||||
}else if(StringUtil.isNotEmpty(role) && "代取人".equals(role)){
|
||||
params.put("daiqurenId",request.getSession().getAttribute("userId"));
|
||||
page = yijiedanService.queryPage(params);
|
||||
}
|
||||
page = yijiedanService.queryPage(params);
|
||||
|
||||
//字典表数据转换
|
||||
List<YijiedanView> list =(List<YijiedanView>)page.getList();
|
||||
for(YijiedanView c:list){
|
||||
//修改对应字典表字段
|
||||
dictionaryService.dictionaryConvert(c);
|
||||
}
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
|
||||
YijiedanEntity yijiedan = yijiedanService.selectById(id);
|
||||
if(yijiedan !=null){
|
||||
//entity转view
|
||||
YijiedanView view = new YijiedanView();
|
||||
BeanUtils.copyProperties( yijiedan , view );//把实体数据重构到view中
|
||||
|
||||
//级联表
|
||||
DaiqurenEntity daiquren = daiqurenService.selectById(yijiedan.getDaiqurenId());
|
||||
if(daiquren != null){
|
||||
view.setDaiqurenId(daiquren.getId());
|
||||
view.setYhname(daiquren.getName());
|
||||
}
|
||||
//级联表
|
||||
YonghuEntity yonghu = yonghuService.selectById(yijiedan.getYonghuId());
|
||||
if(yonghu != null){
|
||||
BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段
|
||||
view.setYonghuId(yonghu.getId());
|
||||
}
|
||||
//修改对应字典表字段
|
||||
dictionaryService.dictionaryConvert(view);
|
||||
return R.ok().put("data", view);
|
||||
}else {
|
||||
return R.error(511,"查不到数据");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody YijiedanEntity yijiedan, HttpServletRequest request){
|
||||
logger.debug("save方法:,,Controller:{},,yijiedan:{}",this.getClass().getName(),yijiedan.toString());
|
||||
Wrapper<YijiedanEntity> queryWrapper = new EntityWrapper<YijiedanEntity>()
|
||||
.eq("odd", yijiedan.getOdd())
|
||||
.eq("yonghu_id", yijiedan.getYonghuId())
|
||||
.eq("fbphone", yijiedan.getFbphone())
|
||||
.eq("daiquren_id", yijiedan.getDaiqurenId())
|
||||
.eq("jdphone", yijiedan.getJdphone())
|
||||
.eq("ddzt_types", yijiedan.getDdztTypes())
|
||||
;
|
||||
logger.info("sql语句:"+queryWrapper.getSqlSegment());
|
||||
YijiedanEntity yijiedanEntity = yijiedanService.selectOne(queryWrapper);
|
||||
if(yijiedanEntity==null){
|
||||
// String role = String.valueOf(request.getSession().getAttribute("role"));
|
||||
// if("".equals(role)){
|
||||
// yijiedan.set
|
||||
// }
|
||||
yijiedanService.insert(yijiedan);
|
||||
return R.ok();
|
||||
}else {
|
||||
return R.error(511,"表中有相同数据");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody YijiedanEntity yijiedan, HttpServletRequest request){
|
||||
logger.debug("update方法:,,Controller:{},,yijiedan:{}",this.getClass().getName(),yijiedan.toString());
|
||||
//根据字段查询是否有相同数据
|
||||
Wrapper<YijiedanEntity> queryWrapper = new EntityWrapper<YijiedanEntity>()
|
||||
.notIn("id",yijiedan.getId())
|
||||
.eq("odd", yijiedan.getOdd())
|
||||
.eq("yonghu_id", yijiedan.getYonghuId())
|
||||
.eq("fbphone", yijiedan.getFbphone())
|
||||
.eq("daiquren_id", yijiedan.getDaiqurenId())
|
||||
.eq("jdphone", yijiedan.getJdphone())
|
||||
.eq("ddzt_types", yijiedan.getDdztTypes())
|
||||
;
|
||||
logger.info("sql语句:"+queryWrapper.getSqlSegment());
|
||||
YijiedanEntity yijiedanEntity = yijiedanService.selectOne(queryWrapper);
|
||||
yijiedan.setInitiateTime(new Date());
|
||||
if(yijiedanEntity==null){
|
||||
// String role = String.valueOf(request.getSession().getAttribute("role"));
|
||||
// if("".equals(role)){
|
||||
// yijiedan.set
|
||||
// }
|
||||
yijiedanService.updateById(yijiedan);//根据id更新
|
||||
return R.ok();
|
||||
}else {
|
||||
return R.error(511,"表中有相同数据");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 完成
|
||||
*/
|
||||
@RequestMapping("/accomplish")
|
||||
public R accomplish(@RequestBody Integer ids){
|
||||
YijiedanEntity yijiedan = yijiedanService.selectById(ids);
|
||||
if(yijiedan == null){
|
||||
return R.error();
|
||||
}
|
||||
JiedanEntity odd = jiedanService.selectOne(new EntityWrapper<JiedanEntity>().eq("odd", yijiedan.getOdd()));
|
||||
if(odd == null){
|
||||
return R.error();
|
||||
}
|
||||
if(odd.getKdlxTypes() == 1){
|
||||
DaiquEntity takecode = daiquService.selectOne(new EntityWrapper().eq("takecode", odd.getJdtakecode()));
|
||||
if(takecode == null){
|
||||
return R.error();
|
||||
}
|
||||
takecode.setKdztTypes(2);
|
||||
|
||||
takecode.setPickupTime(new Date());
|
||||
daiquService.updateById(takecode);
|
||||
}else{
|
||||
DaiquEntity daiqu = new DaiquEntity();
|
||||
List<ZhandianEntity> zhandian = zhandianService.selectList(null);
|
||||
int max=zhandian.size()-1,min=0;
|
||||
int ran2 = (int) (Math.random()*(max-min)+min);
|
||||
//随机站点
|
||||
daiqu.setZhandianId(zhandian.get(ran2).getId());
|
||||
//快递名称
|
||||
daiqu.setDqname(odd.getDaiqukuaidimc());
|
||||
//快递大小
|
||||
daiqu.setKddxTypes(odd.getDx());
|
||||
daiqu.setKdztTypes(1);
|
||||
//收件用户id
|
||||
YonghuEntity name = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("name", odd.getAddresseename()));
|
||||
daiqu.setYonghuId(name.getId());
|
||||
//手机号
|
||||
daiqu.setDqphone(name.getPhone());
|
||||
//取件码
|
||||
daiqu.setTakecode(UUID.randomUUID().toString().toString().replace("-","").substring(0,6));
|
||||
daiquService.insert(daiqu);
|
||||
}
|
||||
yijiedan.setDdztTypes(2);//2已完成
|
||||
yijiedanService.updateById(yijiedan);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Integer[] ids){
|
||||
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
|
||||
yijiedanService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,242 @@
|
||||
package com.controller;
|
||||
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import java.util.*;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import org.springframework.web.context.ContextLoader;
|
||||
import javax.servlet.ServletContext;
|
||||
import com.service.TokenService;
|
||||
import com.utils.StringUtil;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
import com.service.DictionaryService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import com.annotation.IgnoreAuth;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
|
||||
import com.entity.YonghuEntity;
|
||||
|
||||
import com.service.YonghuService;
|
||||
import com.entity.view.YonghuView;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
|
||||
/**
|
||||
*
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-11
|
||||
*/
|
||||
@RestController
|
||||
@Controller
|
||||
@RequestMapping("/yonghu")
|
||||
public class YonghuController {
|
||||
private static final Logger logger = LoggerFactory.getLogger(YonghuController.class);
|
||||
|
||||
@Autowired
|
||||
private YonghuService yonghuService;
|
||||
|
||||
@Autowired
|
||||
private TokenService tokenService;
|
||||
|
||||
@Autowired
|
||||
private DictionaryService dictionaryService;
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
|
||||
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
|
||||
PageUtils page = yonghuService.queryPage(params);
|
||||
|
||||
//字典表数据转换
|
||||
List<YonghuView> list =(List<YonghuView>)page.getList();
|
||||
for(YonghuView c:list){
|
||||
//修改对应字典表字段
|
||||
dictionaryService.dictionaryConvert(c);
|
||||
}
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
|
||||
YonghuEntity yonghu = yonghuService.selectById(id);
|
||||
if(yonghu !=null){
|
||||
//entity转view
|
||||
YonghuView view = new YonghuView();
|
||||
BeanUtils.copyProperties( yonghu , view );//把实体数据重构到view中
|
||||
|
||||
//修改对应字典表字段
|
||||
dictionaryService.dictionaryConvert(view);
|
||||
return R.ok().put("data", view);
|
||||
}else {
|
||||
return R.error(511,"查不到数据");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody YonghuEntity yonghu, HttpServletRequest request){
|
||||
logger.debug("save方法:,,Controller:{},,yonghu:{}",this.getClass().getName(),yonghu.toString());
|
||||
Wrapper<YonghuEntity> queryWrapper = new EntityWrapper<YonghuEntity>()
|
||||
.eq("studentnumber", yonghu.getStudentnumber())
|
||||
.eq("name", yonghu.getName())
|
||||
.eq("username", yonghu.getUsername())
|
||||
.eq("password", yonghu.getPassword())
|
||||
.eq("sex_types", yonghu.getSexTypes())
|
||||
.eq("phone", yonghu.getPhone())
|
||||
.eq("zhuSuLou", yonghu.getZhuSuLou())
|
||||
.eq("dormitory", yonghu.getDormitory())
|
||||
.eq("role", yonghu.getRole())
|
||||
;
|
||||
logger.info("sql语句:"+queryWrapper.getSqlSegment());
|
||||
YonghuEntity yonghuEntity = yonghuService.selectOne(queryWrapper);
|
||||
if(yonghuEntity==null){
|
||||
if(yonghu.getPassword()== "" || yonghu.getPassword() == null){
|
||||
yonghu.setPassword("123456");
|
||||
}
|
||||
yonghu.setRole("用户");
|
||||
yonghuService.insert(yonghu);
|
||||
return R.ok();
|
||||
}else {
|
||||
return R.error(511,"表中有相同数据");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody YonghuEntity yonghu, HttpServletRequest request){
|
||||
logger.debug("update方法:,,Controller:{},,yonghu:{}",this.getClass().getName(),yonghu.toString());
|
||||
//根据字段查询是否有相同数据
|
||||
Wrapper<YonghuEntity> queryWrapper = new EntityWrapper<YonghuEntity>()
|
||||
.notIn("id",yonghu.getId())
|
||||
.eq("studentnumber", yonghu.getStudentnumber())
|
||||
.eq("name", yonghu.getName())
|
||||
.eq("username", yonghu.getUsername())
|
||||
.eq("password", yonghu.getPassword())
|
||||
.eq("sex_types", yonghu.getSexTypes())
|
||||
.eq("phone", yonghu.getPhone())
|
||||
.eq("zhuSuLou", yonghu.getZhuSuLou())
|
||||
.eq("dormitory", yonghu.getDormitory())
|
||||
.eq("role", yonghu.getRole())
|
||||
;
|
||||
logger.info("sql语句:"+queryWrapper.getSqlSegment());
|
||||
YonghuEntity yonghuEntity = yonghuService.selectOne(queryWrapper);
|
||||
if("".equals(yonghu.getImgPhoto()) || "null".equals(yonghu.getImgPhoto())){
|
||||
yonghu.setImgPhoto(null);
|
||||
}
|
||||
if(yonghuEntity==null){
|
||||
yonghuService.updateById(yonghu);//根据id更新
|
||||
return R.ok();
|
||||
}else {
|
||||
return R.error(511,"表中有相同数据");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Integer[] ids){
|
||||
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
|
||||
yonghuService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 同意注册
|
||||
*/
|
||||
@RequestMapping("/yanz")
|
||||
public R delete(Integer ids){
|
||||
YonghuEntity yonghu = yonghuService.selectById(ids);
|
||||
if(yonghu!= null){
|
||||
return R.error();
|
||||
}
|
||||
yonghu.setYanzheng(1);
|
||||
yonghuService.updateById(yonghu);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 登录
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@PostMapping(value = "/login")
|
||||
public R login(String username, String password, String role, HttpServletRequest request) {
|
||||
YonghuEntity yonghu = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("username", username));
|
||||
if(yonghu==null || !yonghu.getPassword().equals(password)) {
|
||||
return R.error("账号或密码不正确");
|
||||
}
|
||||
if(yonghu.getYanzheng() != 1){
|
||||
return R.error("还未通过验证请耐心等待");
|
||||
}
|
||||
if(!role.equals(yonghu.getRole())){
|
||||
return R.error("权限不正确");
|
||||
}
|
||||
String token = tokenService.generateToken(yonghu.getId(),username, "yonghu", "用户");
|
||||
R r = R.ok();
|
||||
r.put("token", token);
|
||||
r.put("role","用户");
|
||||
r.put("userId",yonghu.getId());
|
||||
return r;
|
||||
}
|
||||
|
||||
/**
|
||||
* 注册
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@PostMapping(value = "/register")
|
||||
public R register(@RequestBody YonghuEntity yonghu){
|
||||
// ValidatorUtils.validateEntity(user);
|
||||
if(yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("username", yonghu.getUsername()).orNew().eq("phone",yonghu.getPhone())) !=null) {
|
||||
return R.error("用户已存在或手机号身份证号已经被使用");
|
||||
}
|
||||
yonghuService.insert(yonghu);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户的session用户信息
|
||||
*/
|
||||
@RequestMapping("/session")
|
||||
public R getCurrYonghu(HttpServletRequest request){
|
||||
Integer id = (Integer)request.getSession().getAttribute("userId");
|
||||
YonghuEntity yonghu = yonghuService.selectById(id);
|
||||
return R.ok().put("data", yonghu);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 退出
|
||||
*/
|
||||
@GetMapping(value = "logout")
|
||||
public R logout(HttpServletRequest request) {
|
||||
request.getSession().invalidate();
|
||||
return R.ok("退出成功");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,163 @@
|
||||
package com.controller;
|
||||
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import java.util.*;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import org.springframework.web.context.ContextLoader;
|
||||
import javax.servlet.ServletContext;
|
||||
import com.service.TokenService;
|
||||
import com.utils.StringUtil;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
import com.service.DictionaryService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import com.annotation.IgnoreAuth;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
|
||||
import com.entity.ZhandianEntity;
|
||||
|
||||
import com.service.ZhandianService;
|
||||
import com.entity.view.ZhandianView;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
|
||||
/**
|
||||
* 快递站点
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
* @date 2021-03-11
|
||||
*/
|
||||
@RestController
|
||||
@Controller
|
||||
@RequestMapping("/zhandian")
|
||||
public class ZhandianController {
|
||||
private static final Logger logger = LoggerFactory.getLogger(ZhandianController.class);
|
||||
|
||||
@Autowired
|
||||
private ZhandianService zhandianService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private TokenService tokenService;
|
||||
@Autowired
|
||||
private DictionaryService dictionaryService;
|
||||
|
||||
|
||||
//级联表service
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
|
||||
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
|
||||
String role = String.valueOf(request.getSession().getAttribute("role"));
|
||||
if(StringUtil.isNotEmpty(role) && "用户".equals(role)){
|
||||
params.put("yonghuId",request.getSession().getAttribute("userId"));
|
||||
}
|
||||
PageUtils page = zhandianService.queryPage(params);
|
||||
|
||||
//字典表数据转换
|
||||
List<ZhandianView> list =(List<ZhandianView>)page.getList();
|
||||
for(ZhandianView c:list){
|
||||
//修改对应字典表字段
|
||||
dictionaryService.dictionaryConvert(c);
|
||||
}
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
|
||||
ZhandianEntity zhandian = zhandianService.selectById(id);
|
||||
if(zhandian !=null){
|
||||
//entity转view
|
||||
ZhandianView view = new ZhandianView();
|
||||
BeanUtils.copyProperties( zhandian , view );//把实体数据重构到view中
|
||||
|
||||
//修改对应字典表字段
|
||||
dictionaryService.dictionaryConvert(view);
|
||||
return R.ok().put("data", view);
|
||||
}else {
|
||||
return R.error(511,"查不到数据");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody ZhandianEntity zhandian, HttpServletRequest request){
|
||||
logger.debug("save方法:,,Controller:{},,zhandian:{}",this.getClass().getName(),zhandian.toString());
|
||||
Wrapper<ZhandianEntity> queryWrapper = new EntityWrapper<ZhandianEntity>()
|
||||
.eq("zdname", zhandian.getZdname())
|
||||
.eq("address", zhandian.getAddress())
|
||||
;
|
||||
logger.info("sql语句:"+queryWrapper.getSqlSegment());
|
||||
ZhandianEntity zhandianEntity = zhandianService.selectOne(queryWrapper);
|
||||
if(zhandianEntity==null){
|
||||
// String role = String.valueOf(request.getSession().getAttribute("role"));
|
||||
// if("".equals(role)){
|
||||
// zhandian.set
|
||||
// }
|
||||
zhandianService.insert(zhandian);
|
||||
return R.ok();
|
||||
}else {
|
||||
return R.error(511,"表中有相同数据");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody ZhandianEntity zhandian, HttpServletRequest request){
|
||||
logger.debug("update方法:,,Controller:{},,zhandian:{}",this.getClass().getName(),zhandian.toString());
|
||||
//根据字段查询是否有相同数据
|
||||
Wrapper<ZhandianEntity> queryWrapper = new EntityWrapper<ZhandianEntity>()
|
||||
.notIn("id",zhandian.getId())
|
||||
.eq("zdname", zhandian.getZdname())
|
||||
.eq("address", zhandian.getAddress())
|
||||
;
|
||||
logger.info("sql语句:"+queryWrapper.getSqlSegment());
|
||||
ZhandianEntity zhandianEntity = zhandianService.selectOne(queryWrapper);
|
||||
if(zhandianEntity==null){
|
||||
// String role = String.valueOf(request.getSession().getAttribute("role"));
|
||||
// if("".equals(role)){
|
||||
// zhandian.set
|
||||
// }
|
||||
zhandianService.updateById(zhandian);//根据id更新
|
||||
return R.ok();
|
||||
}else {
|
||||
return R.error(511,"表中有相同数据");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Integer[] ids){
|
||||
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
|
||||
zhandianService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,26 @@
|
||||
|
||||
package com.dao;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 通用接口
|
||||
*/
|
||||
public interface CommonDao{
|
||||
List<String> getOption(Map<String, Object> params);
|
||||
|
||||
Map<String, Object> getFollowByOption(Map<String, Object> params);
|
||||
|
||||
List<String> getFollowByOption2(Map<String, Object> params);
|
||||
|
||||
void sh(Map<String, Object> params);
|
||||
|
||||
int remindCount(Map<String, Object> params);
|
||||
|
||||
Map<String, Object> selectCal(Map<String, Object> params);
|
||||
|
||||
List<Map<String, Object>> selectGroup(Map<String, Object> params);
|
||||
|
||||
List<Map<String, Object>> selectValue(Map<String, Object> params);
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
|
||||
package com.dao;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import com.entity.ConfigEntity;
|
||||
|
||||
/**
|
||||
* 配置
|
||||
*/
|
||||
public interface ConfigDao extends BaseMapper<ConfigEntity> {
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.DaiquEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.view.DaiquView;
|
||||
|
||||
/**
|
||||
* 待取件表 Dao 接口
|
||||
*
|
||||
* @author
|
||||
* @since 2021-03-11
|
||||
*/
|
||||
public interface DaiquDao extends BaseMapper<DaiquEntity> {
|
||||
|
||||
List<DaiquView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.DaiqurenEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.view.DaiqurenView;
|
||||
|
||||
/**
|
||||
* Dao 接口
|
||||
*
|
||||
* @author
|
||||
* @since 2021-03-11
|
||||
*/
|
||||
public interface DaiqurenDao extends BaseMapper<DaiqurenEntity> {
|
||||
|
||||
List<DaiqurenView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.DictionaryEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.view.DictionaryView;
|
||||
|
||||
/**
|
||||
* 字典表 Dao 接口
|
||||
*
|
||||
* @author
|
||||
* @since 2021-03-11
|
||||
*/
|
||||
public interface DictionaryDao extends BaseMapper<DictionaryEntity> {
|
||||
|
||||
List<DictionaryView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.JiedanEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.view.JiedanView;
|
||||
|
||||
/**
|
||||
* 快递接单表 Dao 接口
|
||||
*
|
||||
* @author
|
||||
* @since 2021-03-11
|
||||
*/
|
||||
public interface JiedanDao extends BaseMapper<JiedanEntity> {
|
||||
|
||||
List<JiedanView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
|
||||
package com.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
import com.entity.TokenEntity;
|
||||
|
||||
/**
|
||||
* token
|
||||
*/
|
||||
public interface TokenDao extends BaseMapper<TokenEntity> {
|
||||
|
||||
List<TokenEntity> selectListView(@Param("ew") Wrapper<TokenEntity> wrapper);
|
||||
|
||||
List<TokenEntity> selectListView(Pagination page, @Param("ew") Wrapper<TokenEntity> wrapper);
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
|
||||
package com.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
import com.entity.UserEntity;
|
||||
|
||||
/**
|
||||
* 用户
|
||||
*/
|
||||
public interface UserDao extends BaseMapper<UserEntity> {
|
||||
|
||||
List<UserEntity> selectListView(@Param("ew") Wrapper<UserEntity> wrapper);
|
||||
|
||||
List<UserEntity> selectListView(Pagination page, @Param("ew") Wrapper<UserEntity> wrapper);
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.YijiedanEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.view.YijiedanView;
|
||||
|
||||
/**
|
||||
* 已接单表 Dao 接口
|
||||
*
|
||||
* @author
|
||||
* @since 2021-03-11
|
||||
*/
|
||||
public interface YijiedanDao extends BaseMapper<YijiedanEntity> {
|
||||
|
||||
List<YijiedanView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.YonghuEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.view.YonghuView;
|
||||
|
||||
/**
|
||||
* Dao 接口
|
||||
*
|
||||
* @author
|
||||
* @since 2021-03-11
|
||||
*/
|
||||
public interface YonghuDao extends BaseMapper<YonghuEntity> {
|
||||
|
||||
List<YonghuView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.ZhandianEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.view.ZhandianView;
|
||||
|
||||
/**
|
||||
* 快递站点 Dao 接口
|
||||
*
|
||||
* @author
|
||||
* @since 2021-03-11
|
||||
*/
|
||||
public interface ZhandianDao extends BaseMapper<ZhandianEntity> {
|
||||
|
||||
List<ZhandianView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
|
||||
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
|
||||
package com.entity;
|
||||
|
||||
/**
|
||||
* 自定义异常
|
||||
*/
|
||||
public class EIException extends RuntimeException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String msg;
|
||||
private int code = 500;
|
||||
|
||||
public EIException(String msg) {
|
||||
super(msg);
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public EIException(String msg, Throwable e) {
|
||||
super(msg, e);
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public EIException(String msg, int code) {
|
||||
super(msg);
|
||||
this.msg = msg;
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public EIException(String msg, int code, Throwable e) {
|
||||
super(msg, e);
|
||||
this.msg = msg;
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,132 @@
|
||||
package com.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotations.TableId;
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
import com.baomidou.mybatisplus.enums.IdType;
|
||||
|
||||
/**
|
||||
* token表
|
||||
*/
|
||||
@TableName("token")
|
||||
public class TokenEntity implements Serializable {
|
||||
private static final Long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Integer userid;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 表名
|
||||
*/
|
||||
private String tablename;
|
||||
|
||||
/**
|
||||
* 角色
|
||||
*/
|
||||
private String role;
|
||||
|
||||
/**
|
||||
* token
|
||||
*/
|
||||
private String token;
|
||||
|
||||
/**
|
||||
* 过期时间
|
||||
*/
|
||||
private Date expiratedtime;
|
||||
|
||||
/**
|
||||
* 新增时间
|
||||
*/
|
||||
private Date addtime;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getUserid() {
|
||||
return userid;
|
||||
}
|
||||
|
||||
public void setUserid(Integer userid) {
|
||||
this.userid = userid;
|
||||
}
|
||||
|
||||
public String getRole() {
|
||||
return role;
|
||||
}
|
||||
|
||||
public void setRole(String role) {
|
||||
this.role = role;
|
||||
}
|
||||
|
||||
public String getToken() {
|
||||
return token;
|
||||
}
|
||||
|
||||
public String getTablename() {
|
||||
return tablename;
|
||||
}
|
||||
|
||||
public void setTablename(String tablename) {
|
||||
this.tablename = tablename;
|
||||
}
|
||||
|
||||
public void setToken(String token) {
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
public Date getExpiratedtime() {
|
||||
return expiratedtime;
|
||||
}
|
||||
|
||||
public void setExpiratedtime(Date expiratedtime) {
|
||||
this.expiratedtime = expiratedtime;
|
||||
}
|
||||
|
||||
public Date getAddtime() {
|
||||
return addtime;
|
||||
}
|
||||
|
||||
public void setAddtime(Date addtime) {
|
||||
this.addtime = addtime;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public TokenEntity(Integer userid, String username, String tablename,String role, String token, Date expiratedtime) {
|
||||
super();
|
||||
this.userid = userid;
|
||||
this.username = username;
|
||||
this.tablename = tablename;
|
||||
this.role = role;
|
||||
this.token = token;
|
||||
this.expiratedtime = expiratedtime;
|
||||
}
|
||||
|
||||
public TokenEntity() {
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,73 @@
|
||||
package com.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotations.TableId;
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
import com.baomidou.mybatisplus.enums.IdType;
|
||||
|
||||
/**
|
||||
* 用户
|
||||
*/
|
||||
@TableName("users")
|
||||
public class UserEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 用户账号
|
||||
*/
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 用户类型
|
||||
*/
|
||||
private String role;
|
||||
|
||||
private Date addtime;
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getRole() {
|
||||
return role;
|
||||
}
|
||||
|
||||
public void setRole(String role) {
|
||||
this.role = role;
|
||||
}
|
||||
|
||||
public Date getAddtime() {
|
||||
return addtime;
|
||||
}
|
||||
|
||||
public void setAddtime(Date addtime) {
|
||||
this.addtime = addtime;
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
|
||||
package com.service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.entity.ConfigEntity;
|
||||
import com.utils.PageUtils;
|
||||
|
||||
|
||||
/**
|
||||
* 系统用户
|
||||
* @author yangliyuan
|
||||
* @date 2019年10月10日 上午9:18:20
|
||||
*/
|
||||
public interface ConfigService extends IService<ConfigEntity> {
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.service;
|
||||
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.utils.PageUtils;
|
||||
import com.entity.DaiquEntity;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 待取件表 服务类
|
||||
* @author
|
||||
* @since 2021-03-11
|
||||
*/
|
||||
public interface DaiquService extends IService<DaiquEntity> {
|
||||
|
||||
/**
|
||||
* @param params 查询参数
|
||||
* @return 带分页的查询出来的数据
|
||||
*/
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.service;
|
||||
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.utils.PageUtils;
|
||||
import com.entity.DaiqurenEntity;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 服务类
|
||||
* @author
|
||||
* @since 2021-03-11
|
||||
*/
|
||||
public interface DaiqurenService extends IService<DaiqurenEntity> {
|
||||
|
||||
/**
|
||||
* @param params 查询参数
|
||||
* @return 带分页的查询出来的数据
|
||||
*/
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.service;
|
||||
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.utils.PageUtils;
|
||||
import com.entity.DictionaryEntity;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 字典表 服务类
|
||||
* @author
|
||||
* @since 2021-03-11
|
||||
*/
|
||||
public interface DictionaryService extends IService<DictionaryEntity> {
|
||||
|
||||
/**
|
||||
* @param params 查询参数
|
||||
* @return 带分页的查询出来的数据
|
||||
*/
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 字典表转换
|
||||
* @param obj
|
||||
*/
|
||||
void dictionaryConvert(Object obj);
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.service;
|
||||
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.utils.PageUtils;
|
||||
import com.entity.JiedanEntity;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 快递接单表 服务类
|
||||
* @author
|
||||
* @since 2021-03-11
|
||||
*/
|
||||
public interface JiedanService extends IService<JiedanEntity> {
|
||||
|
||||
/**
|
||||
* @param params 查询参数
|
||||
* @return 带分页的查询出来的数据
|
||||
*/
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
|
||||
package com.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.entity.TokenEntity;
|
||||
import com.utils.PageUtils;
|
||||
|
||||
|
||||
/**
|
||||
* token
|
||||
* @author yangliyuan
|
||||
* @date 2019年10月10日 上午9:18:20
|
||||
*/
|
||||
public interface TokenService extends IService<TokenEntity> {
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
List<TokenEntity> selectListView(Wrapper<TokenEntity> wrapper);
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params, Wrapper<TokenEntity> wrapper);
|
||||
|
||||
String generateToken(Integer userid, String username, String tableName, String role);
|
||||
|
||||
TokenEntity getTokenEntity(String token);
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.service;
|
||||
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.utils.PageUtils;
|
||||
import com.entity.YijiedanEntity;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 已接单表 服务类
|
||||
* @author
|
||||
* @since 2021-03-11
|
||||
*/
|
||||
public interface YijiedanService extends IService<YijiedanEntity> {
|
||||
|
||||
/**
|
||||
* @param params 查询参数
|
||||
* @return 带分页的查询出来的数据
|
||||
*/
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.service;
|
||||
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.utils.PageUtils;
|
||||
import com.entity.YonghuEntity;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 服务类
|
||||
* @author
|
||||
* @since 2021-03-11
|
||||
*/
|
||||
public interface YonghuService extends IService<YonghuEntity> {
|
||||
|
||||
/**
|
||||
* @param params 查询参数
|
||||
* @return 带分页的查询出来的数据
|
||||
*/
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.service;
|
||||
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.utils.PageUtils;
|
||||
import com.entity.ZhandianEntity;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 快递站点 服务类
|
||||
* @author
|
||||
* @since 2021-03-11
|
||||
*/
|
||||
public interface ZhandianService extends IService<ZhandianEntity> {
|
||||
|
||||
/**
|
||||
* @param params 查询参数
|
||||
* @return 带分页的查询出来的数据
|
||||
*/
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
|
||||
package com.service.impl;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.dao.CommonDao;
|
||||
import com.service.CommonService;
|
||||
|
||||
|
||||
/**
|
||||
* 系统用户
|
||||
* @author yangliyuan
|
||||
* @date 2019年10月10日 上午9:17:59
|
||||
*/
|
||||
@Service("commonService")
|
||||
public class CommonServiceImpl implements CommonService {
|
||||
|
||||
@Autowired
|
||||
private CommonDao commonDao;
|
||||
|
||||
@Override
|
||||
public List<String> getOption(Map<String, Object> params) {
|
||||
return commonDao.getOption(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getFollowByOption(Map<String, Object> params) {
|
||||
return commonDao.getFollowByOption(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sh(Map<String, Object> params) {
|
||||
commonDao.sh(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int remindCount(Map<String, Object> params) {
|
||||
return commonDao.remindCount(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> selectCal(Map<String, Object> params) {
|
||||
return commonDao.selectCal(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> selectGroup(Map<String, Object> params) {
|
||||
return commonDao.selectGroup(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> selectValue(Map<String, Object> params) {
|
||||
return commonDao.selectValue(params);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
|
||||
package com.service.impl;
|
||||
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.entity.ConfigEntity;
|
||||
import com.utils.Query;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.dao.ConfigDao;
|
||||
import com.service.ConfigService;
|
||||
import com.utils.PageUtils;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* 系统用户
|
||||
* @author yangliyuan
|
||||
* @date 2019年10月10日 上午9:17:59
|
||||
*/
|
||||
@Service("configService")
|
||||
public class ConfigServiceImpl extends ServiceImpl<ConfigDao, ConfigEntity> implements ConfigService {
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
Page<ConfigEntity> page = this.selectPage(
|
||||
new Query<ConfigEntity>(params).getPage(),
|
||||
new EntityWrapper<ConfigEntity>()
|
||||
);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package com.service.impl;
|
||||
|
||||
import com.utils.StringUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.*;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.Query;
|
||||
import org.springframework.web.context.ContextLoader;
|
||||
import javax.servlet.ServletContext;
|
||||
|
||||
import com.dao.DaiquDao;
|
||||
import com.entity.DaiquEntity;
|
||||
import com.service.DaiquService;
|
||||
import com.entity.view.DaiquView;
|
||||
|
||||
/**
|
||||
* 待取件表 服务实现类
|
||||
* @author
|
||||
* @since 2021-03-11
|
||||
*/
|
||||
@Service("daiquService")
|
||||
@Transactional
|
||||
public class DaiquServiceImpl extends ServiceImpl<DaiquDao, DaiquEntity> implements DaiquService {
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String,Object> params) {
|
||||
if(params != null && (params.get("limit") == null || params.get("page") == null)){
|
||||
params.put("page","1");
|
||||
params.put("limit","10");
|
||||
}
|
||||
Page<DaiquView> page =new Query<DaiquView>(params).getPage();
|
||||
page.setRecords(baseMapper.selectListView(page,params));
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package com.service.impl;
|
||||
|
||||
import com.utils.StringUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.*;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.Query;
|
||||
import org.springframework.web.context.ContextLoader;
|
||||
import javax.servlet.ServletContext;
|
||||
|
||||
import com.dao.DaiqurenDao;
|
||||
import com.entity.DaiqurenEntity;
|
||||
import com.service.DaiqurenService;
|
||||
import com.entity.view.DaiqurenView;
|
||||
|
||||
/**
|
||||
* 服务实现类
|
||||
* @author
|
||||
* @since 2021-03-11
|
||||
*/
|
||||
@Service("daiqurenService")
|
||||
@Transactional
|
||||
public class DaiqurenServiceImpl extends ServiceImpl<DaiqurenDao, DaiqurenEntity> implements DaiqurenService {
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String,Object> params) {
|
||||
if(params != null && (params.get("limit") == null || params.get("page") == null)){
|
||||
params.put("page","1");
|
||||
params.put("limit","10");
|
||||
}
|
||||
Page<DaiqurenView> page =new Query<DaiqurenView>(params).getPage();
|
||||
page.setRecords(baseMapper.selectListView(page,params));
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,120 @@
|
||||
package com.service.impl;
|
||||
|
||||
import com.utils.StringUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.*;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.Query;
|
||||
import org.springframework.web.context.ContextLoader;
|
||||
import javax.servlet.ServletContext;
|
||||
|
||||
import com.dao.DictionaryDao;
|
||||
import com.entity.DictionaryEntity;
|
||||
import com.service.DictionaryService;
|
||||
import com.entity.view.DictionaryView;
|
||||
|
||||
/**
|
||||
* 字典表 服务实现类
|
||||
* @author
|
||||
* @since 2021-03-11
|
||||
*/
|
||||
@Service("dictionaryService")
|
||||
@Transactional
|
||||
public class DictionaryServiceImpl extends ServiceImpl<DictionaryDao, DictionaryEntity> implements DictionaryService {
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String,Object> params) {
|
||||
if(params != null && (params.get("limit") == null || params.get("page") == null)){
|
||||
params.put("page","1");
|
||||
params.put("limit","10");
|
||||
}
|
||||
Page<DictionaryView> page =new Query<DictionaryView>(params).getPage();
|
||||
page.setRecords(baseMapper.selectListView(page,params));
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 赋值给字典表
|
||||
* @param obj view对象
|
||||
*/
|
||||
public void dictionaryConvert(Object obj) {
|
||||
try {
|
||||
if (obj == null) return;
|
||||
//当前view和entity中的所有types的字段
|
||||
List<String> fieldNameList = new ArrayList<>();
|
||||
Class tempClass = obj.getClass();
|
||||
while (tempClass !=null) {
|
||||
Field[] declaredFields = tempClass.getDeclaredFields();
|
||||
for (Field f : declaredFields) {
|
||||
f.setAccessible(true);
|
||||
if (f.getType().getName().equals("java.lang.Integer") && f.getName().contains("Types")) {
|
||||
fieldNameList.add(f.getName());
|
||||
}
|
||||
}
|
||||
tempClass = tempClass.getSuperclass(); //得到父类,然后赋给自己
|
||||
}
|
||||
|
||||
// 获取监听器中的字典表
|
||||
ServletContext servletContext = ContextLoader.getCurrentWebApplicationContext().getServletContext();
|
||||
Map<String, Map<Integer, String>> dictionaryMap= (Map<String, Map<Integer, String>>) servletContext.getAttribute("dictionaryMap");
|
||||
|
||||
//通过Types的值给Value字段赋值
|
||||
for (String s : fieldNameList) {
|
||||
Field types = null;
|
||||
if(hasField(obj.getClass(),s)){
|
||||
//判断view中有没有这个字段,有就通过反射取出字段
|
||||
types= obj.getClass().getDeclaredField(s);//获取Types私有字段
|
||||
}else{
|
||||
//本表中没有这个字段,说明它是父表中的字段,也就是entity中的字段,从entity中取值
|
||||
types=obj.getClass().getSuperclass().getDeclaredField(s);
|
||||
}
|
||||
Field value = obj.getClass().getDeclaredField(s.replace("Types", "Value"));//获取value私有字段
|
||||
//设置权限
|
||||
types.setAccessible(true);
|
||||
value.setAccessible(true);
|
||||
|
||||
//赋值
|
||||
if (StringUtil.isNotEmpty(String.valueOf(types.get(obj)))) { //types的值不为空
|
||||
int i = Integer.parseInt(String.valueOf(types.get(obj)));//type
|
||||
String s1 = s.replace("Types", "_types");
|
||||
String s2 = dictionaryMap.get(s1).get(i);
|
||||
value.set(obj, s2);
|
||||
} else {
|
||||
new Exception("字典表赋值出现问题::::"+value.getName());
|
||||
value.set(obj, "");
|
||||
}
|
||||
}
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
} catch (NoSuchFieldException e) {
|
||||
e.printStackTrace();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断本实体有没有这个字段
|
||||
* @param c
|
||||
* @param fieldName
|
||||
* @return
|
||||
*/
|
||||
public boolean hasField(Class c, String fieldName){
|
||||
Field[] fields = c.getDeclaredFields();
|
||||
|
||||
for (Field f : fields) {
|
||||
if (fieldName.equals(f.getName())) {
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package com.service.impl;
|
||||
|
||||
import com.utils.StringUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.*;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.Query;
|
||||
import org.springframework.web.context.ContextLoader;
|
||||
import javax.servlet.ServletContext;
|
||||
|
||||
import com.dao.JiedanDao;
|
||||
import com.entity.JiedanEntity;
|
||||
import com.service.JiedanService;
|
||||
import com.entity.view.JiedanView;
|
||||
|
||||
/**
|
||||
* 快递接单表 服务实现类
|
||||
* @author
|
||||
* @since 2021-03-11
|
||||
*/
|
||||
@Service("jiedanService")
|
||||
@Transactional
|
||||
public class JiedanServiceImpl extends ServiceImpl<JiedanDao, JiedanEntity> implements JiedanService {
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String,Object> params) {
|
||||
if(params != null && (params.get("limit") == null || params.get("page") == null)){
|
||||
params.put("page","1");
|
||||
params.put("limit","10");
|
||||
}
|
||||
Page<JiedanView> page =new Query<JiedanView>(params).getPage();
|
||||
page.setRecords(baseMapper.selectListView(page,params));
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
|
||||
package com.service.impl;
|
||||
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.dao.TokenDao;
|
||||
import com.entity.TokenEntity;
|
||||
import com.entity.TokenEntity;
|
||||
import com.service.TokenService;
|
||||
import com.utils.CommonUtil;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.Query;
|
||||
|
||||
|
||||
/**
|
||||
* token
|
||||
* @author yangliyuan
|
||||
* @date 2019年10月10日 上午9:17:59
|
||||
*/
|
||||
@Service("tokenService")
|
||||
public class TokenServiceImpl extends ServiceImpl<TokenDao, TokenEntity> implements TokenService {
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
Page<TokenEntity> page = this.selectPage(
|
||||
new Query<TokenEntity>(params).getPage(),
|
||||
new EntityWrapper<TokenEntity>()
|
||||
);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TokenEntity> selectListView(Wrapper<TokenEntity> wrapper) {
|
||||
return baseMapper.selectListView(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params,
|
||||
Wrapper<TokenEntity> wrapper) {
|
||||
Page<TokenEntity> page =new Query<TokenEntity>(params).getPage();
|
||||
page.setRecords(baseMapper.selectListView(page,wrapper));
|
||||
PageUtils pageUtil = new PageUtils(page);
|
||||
return pageUtil;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String generateToken(Integer userid,String username, String tableName, String role) {
|
||||
TokenEntity tokenEntity = this.selectOne(new EntityWrapper<TokenEntity>().eq("userid", userid).eq("role", role));
|
||||
String token = CommonUtil.getRandomString(32);
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.setTime(new Date());
|
||||
cal.add(Calendar.HOUR_OF_DAY, 1);
|
||||
if(tokenEntity!=null) {
|
||||
tokenEntity.setToken(token);
|
||||
tokenEntity.setExpiratedtime(cal.getTime());
|
||||
this.updateById(tokenEntity);
|
||||
} else {
|
||||
this.insert(new TokenEntity(userid,username, tableName, role, token, cal.getTime()));
|
||||
}
|
||||
return token;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TokenEntity getTokenEntity(String token) {
|
||||
TokenEntity tokenEntity = this.selectOne(new EntityWrapper<TokenEntity>().eq("token", token));
|
||||
if(tokenEntity == null || tokenEntity.getExpiratedtime().getTime()<new Date().getTime()) {
|
||||
return null;
|
||||
}
|
||||
return tokenEntity;
|
||||
}
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
|
||||
package com.service.impl;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.dao.UserDao;
|
||||
import com.entity.UserEntity;
|
||||
import com.service.UserService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.Query;
|
||||
|
||||
|
||||
/**
|
||||
* 系统用户
|
||||
* @author yangliyuan
|
||||
* @date 2019年10月10日 上午9:17:59
|
||||
*/
|
||||
@Service("userService")
|
||||
public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements UserService {
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
Page<UserEntity> page = this.selectPage(
|
||||
new Query<UserEntity>(params).getPage(),
|
||||
new EntityWrapper<UserEntity>()
|
||||
);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserEntity> selectListView(Wrapper<UserEntity> wrapper) {
|
||||
return baseMapper.selectListView(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params,
|
||||
Wrapper<UserEntity> wrapper) {
|
||||
Page<UserEntity> page =new Query<UserEntity>(params).getPage();
|
||||
page.setRecords(baseMapper.selectListView(page,wrapper));
|
||||
PageUtils pageUtil = new PageUtils(page);
|
||||
return pageUtil;
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package com.service.impl;
|
||||
|
||||
import com.utils.StringUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.*;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.Query;
|
||||
import org.springframework.web.context.ContextLoader;
|
||||
import javax.servlet.ServletContext;
|
||||
|
||||
import com.dao.YijiedanDao;
|
||||
import com.entity.YijiedanEntity;
|
||||
import com.service.YijiedanService;
|
||||
import com.entity.view.YijiedanView;
|
||||
|
||||
/**
|
||||
* 已接单表 服务实现类
|
||||
* @author
|
||||
* @since 2021-03-11
|
||||
*/
|
||||
@Service("yijiedanService")
|
||||
@Transactional
|
||||
public class YijiedanServiceImpl extends ServiceImpl<YijiedanDao, YijiedanEntity> implements YijiedanService {
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String,Object> params) {
|
||||
if(params != null && (params.get("limit") == null || params.get("page") == null)){
|
||||
params.put("page","1");
|
||||
params.put("limit","10");
|
||||
}
|
||||
Page<YijiedanView> page =new Query<YijiedanView>(params).getPage();
|
||||
page.setRecords(baseMapper.selectListView(page,params));
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package com.service.impl;
|
||||
|
||||
import com.utils.StringUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.*;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.Query;
|
||||
import org.springframework.web.context.ContextLoader;
|
||||
import javax.servlet.ServletContext;
|
||||
|
||||
import com.dao.YonghuDao;
|
||||
import com.entity.YonghuEntity;
|
||||
import com.service.YonghuService;
|
||||
import com.entity.view.YonghuView;
|
||||
|
||||
/**
|
||||
* 服务实现类
|
||||
* @author
|
||||
* @since 2021-03-11
|
||||
*/
|
||||
@Service("yonghuService")
|
||||
@Transactional
|
||||
public class YonghuServiceImpl extends ServiceImpl<YonghuDao, YonghuEntity> implements YonghuService {
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String,Object> params) {
|
||||
if(params != null && (params.get("limit") == null || params.get("page") == null)){
|
||||
params.put("page","1");
|
||||
params.put("limit","10");
|
||||
}
|
||||
Page<YonghuView> page =new Query<YonghuView>(params).getPage();
|
||||
page.setRecords(baseMapper.selectListView(page,params));
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package com.service.impl;
|
||||
|
||||
import com.utils.StringUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.*;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.Query;
|
||||
import org.springframework.web.context.ContextLoader;
|
||||
import javax.servlet.ServletContext;
|
||||
|
||||
import com.dao.ZhandianDao;
|
||||
import com.entity.ZhandianEntity;
|
||||
import com.service.ZhandianService;
|
||||
import com.entity.view.ZhandianView;
|
||||
|
||||
/**
|
||||
* 快递站点 服务实现类
|
||||
* @author
|
||||
* @since 2021-03-11
|
||||
*/
|
||||
@Service("zhandianService")
|
||||
@Transactional
|
||||
public class ZhandianServiceImpl extends ServiceImpl<ZhandianDao, ZhandianEntity> implements ZhandianService {
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String,Object> params) {
|
||||
if(params != null && (params.get("limit") == null || params.get("page") == null)){
|
||||
params.put("page","1");
|
||||
params.put("limit","10");
|
||||
}
|
||||
Page<ZhandianView> page =new Query<ZhandianView>(params).getPage();
|
||||
page.setRecords(baseMapper.selectListView(page,params));
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package com.utils;
|
||||
|
||||
public class JQPageInfo{
|
||||
private Integer page;
|
||||
|
||||
private Integer limit;
|
||||
|
||||
private String sidx;
|
||||
|
||||
private String order;
|
||||
|
||||
private Integer offset;
|
||||
|
||||
public Integer getPage() {
|
||||
return page;
|
||||
}
|
||||
|
||||
public void setPage(Integer page) {
|
||||
this.page = page;
|
||||
}
|
||||
|
||||
public Integer getLimit() {
|
||||
return limit;
|
||||
}
|
||||
|
||||
public void setLimit(Integer limit) {
|
||||
this.limit = limit;
|
||||
}
|
||||
|
||||
public String getSidx() {
|
||||
return sidx;
|
||||
}
|
||||
|
||||
public void setSidx(String sidx) {
|
||||
this.sidx = sidx;
|
||||
}
|
||||
|
||||
public String getOrder() {
|
||||
return order;
|
||||
}
|
||||
|
||||
public void setOrder(String order) {
|
||||
this.order = order;
|
||||
}
|
||||
|
||||
public Integer getOffset() {
|
||||
return offset;
|
||||
}
|
||||
|
||||
public void setOffset(Integer offset) {
|
||||
this.offset = offset;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,101 @@
|
||||
|
||||
package com.utils;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
|
||||
/**
|
||||
* 分页工具类
|
||||
*/
|
||||
public class PageUtils implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
//总记录数
|
||||
private long total;
|
||||
//每页记录数
|
||||
private int pageSize;
|
||||
//总页数
|
||||
private long totalPage;
|
||||
//当前页数
|
||||
private int currPage;
|
||||
//列表数据
|
||||
private List<?> list;
|
||||
|
||||
/**
|
||||
* 分页
|
||||
* @param list 列表数据
|
||||
* @param totalCount 总记录数
|
||||
* @param pageSize 每页记录数
|
||||
* @param currPage 当前页数
|
||||
*/
|
||||
public PageUtils(List<?> list, int totalCount, int pageSize, int currPage) {
|
||||
this.list = list;
|
||||
this.total = totalCount;
|
||||
this.pageSize = pageSize;
|
||||
this.currPage = currPage;
|
||||
this.totalPage = (int)Math.ceil((double)totalCount/pageSize);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*/
|
||||
public PageUtils(Page<?> page) {
|
||||
this.list = page.getRecords();
|
||||
this.total = page.getTotal();
|
||||
this.pageSize = page.getSize();
|
||||
this.currPage = page.getCurrent();
|
||||
this.totalPage = page.getPages();
|
||||
}
|
||||
|
||||
/*
|
||||
* 空数据的分页
|
||||
*/
|
||||
public PageUtils(Map<String, Object> params) {
|
||||
Page page =new Query(params).getPage();
|
||||
new PageUtils(page);
|
||||
}
|
||||
|
||||
|
||||
public int getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
public void setPageSize(int pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
public int getCurrPage() {
|
||||
return currPage;
|
||||
}
|
||||
|
||||
public void setCurrPage(int currPage) {
|
||||
this.currPage = currPage;
|
||||
}
|
||||
|
||||
public List<?> getList() {
|
||||
return list;
|
||||
}
|
||||
|
||||
public void setList(List<?> list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
public long getTotalPage() {
|
||||
return totalPage;
|
||||
}
|
||||
|
||||
public void setTotalPage(long totalPage) {
|
||||
this.totalPage = totalPage;
|
||||
}
|
||||
|
||||
public long getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public void setTotal(long total) {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
|
||||
package com.utils;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import com.entity.EIException;
|
||||
|
||||
/**
|
||||
* SQL过滤
|
||||
*/
|
||||
public class SQLFilter {
|
||||
|
||||
/**
|
||||
* SQL注入过滤
|
||||
* @param str 待验证的字符串
|
||||
*/
|
||||
public static String sqlInject(String str){
|
||||
if(StringUtils.isBlank(str)){
|
||||
return null;
|
||||
}
|
||||
//去掉'|"|;|\字符
|
||||
str = StringUtils.replace(str, "'", "");
|
||||
str = StringUtils.replace(str, "\"", "");
|
||||
str = StringUtils.replace(str, ";", "");
|
||||
str = StringUtils.replace(str, "\\", "");
|
||||
|
||||
//转换成小写
|
||||
str = str.toLowerCase();
|
||||
|
||||
//非法字符
|
||||
String[] keywords = {"master", "truncate", "insert", "select", "delete", "update", "declare", "alter", "drop"};
|
||||
|
||||
//判断是否包含非法字符
|
||||
for(String keyword : keywords){
|
||||
if(str.indexOf(keyword) != -1){
|
||||
throw new EIException("包含非法字符");
|
||||
}
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue