Commit ec9df5b9 authored by hkl's avatar hkl

feat:1.代码提交

parent 5f2bd8be
...@@ -10,22 +10,28 @@ import java.io.Serializable; ...@@ -10,22 +10,28 @@ import java.io.Serializable;
/** /**
* 接口返回数据格式 * 接口返回数据格式
*
* @author scott * @author scott
* @email jeecgos@163.com * @email jeecgos@163.com
* @date 2019年1月19日 * @date 2019年1月19日
*/ */
@Data @Data
@ApiModel(value="接口返回对象", description="接口返回对象") @ApiModel(value = "接口返回对象", description = "接口返回对象")
public class Result<T> implements Serializable { public class Result<T> implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public void setSuccess(boolean success) {
this.success = success;
this.code = 200;
}
/** /**
* 成功标志 * 成功标志
*/ */
@ApiModelProperty(value = "成功标志") @ApiModelProperty(value = "成功标志")
private boolean success = true; private boolean success = true;
/** /**
* 返回处理消息 * 返回处理消息
*/ */
...@@ -55,6 +61,7 @@ public class Result<T> implements Serializable { ...@@ -55,6 +61,7 @@ public class Result<T> implements Serializable {
/** /**
* 兼容VUE3版token失效不跳转登录页面 * 兼容VUE3版token失效不跳转登录页面
*
* @param code * @param code
* @param message * @param message
*/ */
...@@ -70,14 +77,14 @@ public class Result<T> implements Serializable { ...@@ -70,14 +77,14 @@ public class Result<T> implements Serializable {
return this; return this;
} }
public static<T> Result<T> ok() { public static <T> Result<T> ok() {
Result<T> r = new Result<T>(); Result<T> r = new Result<T>();
r.setSuccess(true); r.setSuccess(true);
r.setCode(CommonConstant.SC_OK_200); r.setCode(CommonConstant.SC_OK_200);
return r; return r;
} }
public static<T> Result<T> ok(String msg) { public static <T> Result<T> ok(String msg) {
Result<T> r = new Result<T>(); Result<T> r = new Result<T>();
r.setSuccess(true); r.setSuccess(true);
r.setCode(CommonConstant.SC_OK_200); r.setCode(CommonConstant.SC_OK_200);
...@@ -87,7 +94,7 @@ public class Result<T> implements Serializable { ...@@ -87,7 +94,7 @@ public class Result<T> implements Serializable {
return r; return r;
} }
public static<T> Result<T> ok(T data) { public static <T> Result<T> ok(T data) {
Result<T> r = new Result<T>(); Result<T> r = new Result<T>();
r.setSuccess(true); r.setSuccess(true);
r.setCode(CommonConstant.SC_OK_200); r.setCode(CommonConstant.SC_OK_200);
...@@ -95,7 +102,7 @@ public class Result<T> implements Serializable { ...@@ -95,7 +102,7 @@ public class Result<T> implements Serializable {
return r; return r;
} }
public static<T> Result<T> OK() { public static <T> Result<T> OK() {
Result<T> r = new Result<T>(); Result<T> r = new Result<T>();
r.setSuccess(true); r.setSuccess(true);
r.setCode(CommonConstant.SC_OK_200); r.setCode(CommonConstant.SC_OK_200);
...@@ -109,7 +116,7 @@ public class Result<T> implements Serializable { ...@@ -109,7 +116,7 @@ public class Result<T> implements Serializable {
* @param <T> * @param <T>
* @return * @return
*/ */
public static<T> Result<T> OK(String msg) { public static <T> Result<T> OK(String msg) {
Result<T> r = new Result<T>(); Result<T> r = new Result<T>();
r.setSuccess(true); r.setSuccess(true);
r.setCode(CommonConstant.SC_OK_200); r.setCode(CommonConstant.SC_OK_200);
...@@ -119,7 +126,7 @@ public class Result<T> implements Serializable { ...@@ -119,7 +126,7 @@ public class Result<T> implements Serializable {
return r; return r;
} }
public static<T> Result<T> OK(T data) { public static <T> Result<T> OK(T data) {
Result<T> r = new Result<T>(); Result<T> r = new Result<T>();
r.setSuccess(true); r.setSuccess(true);
r.setCode(CommonConstant.SC_OK_200); r.setCode(CommonConstant.SC_OK_200);
...@@ -127,7 +134,7 @@ public class Result<T> implements Serializable { ...@@ -127,7 +134,7 @@ public class Result<T> implements Serializable {
return r; return r;
} }
public static<T> Result<T> OK(String msg, T data) { public static <T> Result<T> OK(String msg, T data) {
Result<T> r = new Result<T>(); Result<T> r = new Result<T>();
r.setSuccess(true); r.setSuccess(true);
r.setCode(CommonConstant.SC_OK_200); r.setCode(CommonConstant.SC_OK_200);
...@@ -136,7 +143,7 @@ public class Result<T> implements Serializable { ...@@ -136,7 +143,7 @@ public class Result<T> implements Serializable {
return r; return r;
} }
public static<T> Result<T> error(String msg, T data) { public static <T> Result<T> error(String msg, T data) {
Result<T> r = new Result<T>(); Result<T> r = new Result<T>();
r.setSuccess(false); r.setSuccess(false);
r.setCode(CommonConstant.SC_INTERNAL_SERVER_ERROR_500); r.setCode(CommonConstant.SC_INTERNAL_SERVER_ERROR_500);
...@@ -145,11 +152,11 @@ public class Result<T> implements Serializable { ...@@ -145,11 +152,11 @@ public class Result<T> implements Serializable {
return r; return r;
} }
public static<T> Result<T> error(String msg) { public static <T> Result<T> error(String msg) {
return error(CommonConstant.SC_INTERNAL_SERVER_ERROR_500, msg); return error(CommonConstant.SC_INTERNAL_SERVER_ERROR_500, msg);
} }
public static<T> Result<T> error(int code, String msg) { public static <T> Result<T> error(int code, String msg) {
Result<T> r = new Result<T>(); Result<T> r = new Result<T>();
r.setCode(code); r.setCode(code);
r.setMessage(msg); r.setMessage(msg);
...@@ -167,7 +174,7 @@ public class Result<T> implements Serializable { ...@@ -167,7 +174,7 @@ public class Result<T> implements Serializable {
/** /**
* 无权限访问返回结果 * 无权限访问返回结果
*/ */
public static<T> Result<T> noauth(String msg) { public static <T> Result<T> noauth(String msg) {
return error(CommonConstant.SC_JEECG_NO_AUTHZ, msg); return error(CommonConstant.SC_JEECG_NO_AUTHZ, msg);
} }
......
...@@ -14,8 +14,8 @@ import org.springframework.http.ResponseEntity; ...@@ -14,8 +14,8 @@ import org.springframework.http.ResponseEntity;
*/ */
public class RestDesformUtil { public class RestDesformUtil {
private static String domain = null; public static String domain = null;
private static String path = null; public static String path = null;
static { static {
domain = SpringContextUtils.getDomain(); domain = SpringContextUtils.getDomain();
......
...@@ -25,59 +25,59 @@ public class FileTypeFilter { ...@@ -25,59 +25,59 @@ public class FileTypeFilter {
static { static {
FILE_TYPE_MAP.put("3c25402070616765206c", "jsp"); FILE_TYPE_MAP.put("3c25402070616765206c", "jsp");
FILE_TYPE_MAP.put("3c3f7068700a0a2f2a2a0a202a205048", "php"); FILE_TYPE_MAP.put("3c3f7068700a0a2f2a2a0a202a205048", "php");
/* fileTypeMap.put("ffd8ffe000104a464946", "jpg"); FILE_TYPE_MAP.put("ffd8ffe000104a464946", "jpg");
fileTypeMap.put("89504e470d0a1a0a0000", "png"); FILE_TYPE_MAP.put("89504e470d0a1a0a0000", "png");
fileTypeMap.put("47494638396126026f01", "gif"); FILE_TYPE_MAP.put("47494638396126026f01", "gif");
fileTypeMap.put("49492a00227105008037", "tif"); FILE_TYPE_MAP.put("49492a00227105008037", "tif");
fileTypeMap.put("424d228c010000000000", "bmp"); FILE_TYPE_MAP.put("424d228c010000000000", "bmp");
fileTypeMap.put("424d8240090000000000", "bmp"); FILE_TYPE_MAP.put("424d8240090000000000", "bmp");
fileTypeMap.put("424d8e1b030000000000", "bmp"); FILE_TYPE_MAP.put("424d8e1b030000000000", "bmp");
fileTypeMap.put("41433130313500000000", "dwg"); FILE_TYPE_MAP.put("41433130313500000000", "dwg");
fileTypeMap.put("3c21444f435459504520", "html"); FILE_TYPE_MAP.put("3c21444f435459504520", "html");
fileTypeMap.put("3c21646f637479706520", "htm"); FILE_TYPE_MAP.put("3c21646f637479706520", "htm");
fileTypeMap.put("48544d4c207b0d0a0942", "css"); FILE_TYPE_MAP.put("48544d4c207b0d0a0942", "css");
fileTypeMap.put("696b2e71623d696b2e71", "js"); FILE_TYPE_MAP.put("696b2e71623d696b2e71", "js");
fileTypeMap.put("7b5c727466315c616e73", "rtf"); FILE_TYPE_MAP.put("7b5c727466315c616e73", "rtf");
fileTypeMap.put("38425053000100000000", "psd"); FILE_TYPE_MAP.put("38425053000100000000", "psd");
fileTypeMap.put("46726f6d3a203d3f6762", "eml"); FILE_TYPE_MAP.put("46726f6d3a203d3f6762", "eml");
fileTypeMap.put("d0cf11e0a1b11ae10000", "doc"); FILE_TYPE_MAP.put("d0cf11e0a1b11ae10000", "doc");
fileTypeMap.put("5374616E64617264204A", "mdb"); FILE_TYPE_MAP.put("5374616E64617264204A", "mdb");
fileTypeMap.put("252150532D41646F6265", "ps"); FILE_TYPE_MAP.put("252150532D41646F6265", "ps");
fileTypeMap.put("255044462d312e350d0a", "pdf"); FILE_TYPE_MAP.put("255044462d312e350d0a", "pdf");
fileTypeMap.put("2e524d46000000120001", "rmvb"); FILE_TYPE_MAP.put("2e524d46000000120001", "rmvb");
fileTypeMap.put("464c5601050000000900", "flv"); FILE_TYPE_MAP.put("464c5601050000000900", "flv");
fileTypeMap.put("00000020667479706d70", "mp4"); FILE_TYPE_MAP.put("00000020667479706d70", "mp4");
fileTypeMap.put("49443303000000002176", "mp3"); FILE_TYPE_MAP.put("49443303000000002176", "mp3");
fileTypeMap.put("000001ba210001000180", "mpg"); FILE_TYPE_MAP.put("000001ba210001000180", "mpg");
fileTypeMap.put("3026b2758e66cf11a6d9", "wmv"); FILE_TYPE_MAP.put("3026b2758e66cf11a6d9", "wmv");
fileTypeMap.put("52494646e27807005741", "wav"); FILE_TYPE_MAP.put("52494646e27807005741", "wav");
fileTypeMap.put("52494646d07d60074156", "avi"); FILE_TYPE_MAP.put("52494646d07d60074156", "avi");
fileTypeMap.put("4d546864000000060001", "mid"); FILE_TYPE_MAP.put("4d546864000000060001", "mid");
fileTypeMap.put("504b0304140000000800", "zip"); FILE_TYPE_MAP.put("504b0304140000000800", "zip");
fileTypeMap.put("526172211a0700cf9073", "rar"); FILE_TYPE_MAP.put("526172211a0700cf9073", "rar");
fileTypeMap.put("235468697320636f6e66", "ini"); FILE_TYPE_MAP.put("235468697320636f6e66", "ini");
fileTypeMap.put("504b03040a0000000000", "jar"); FILE_TYPE_MAP.put("504b03040a0000000000", "jar");
fileTypeMap.put("4d5a9000030000000400", "exe"); FILE_TYPE_MAP.put("4d5a9000030000000400", "exe");
fileTypeMap.put("3c25402070616765206c", "jsp"); FILE_TYPE_MAP.put("3c25402070616765206c", "jsp");
fileTypeMap.put("4d616e69666573742d56", "mf"); FILE_TYPE_MAP.put("4d616e69666573742d56", "mf");
fileTypeMap.put("3c3f786d6c2076657273", "xml"); FILE_TYPE_MAP.put("3c3f786d6c2076657273", "xml");
fileTypeMap.put("494e5345525420494e54", "sql"); FILE_TYPE_MAP.put("494e5345525420494e54", "sql");
fileTypeMap.put("7061636b616765207765", "java"); FILE_TYPE_MAP.put("7061636b616765207765", "java");
fileTypeMap.put("406563686f206f66660d", "bat"); FILE_TYPE_MAP.put("406563686f206f66660d", "bat");
fileTypeMap.put("1f8b0800000000000000", "gz"); FILE_TYPE_MAP.put("1f8b0800000000000000", "gz");
fileTypeMap.put("6c6f67346a2e726f6f74", "properties"); FILE_TYPE_MAP.put("6c6f67346a2e726f6f74", "properties");
fileTypeMap.put("cafebabe0000002e0041", "class"); FILE_TYPE_MAP.put("cafebabe0000002e0041", "class");
fileTypeMap.put("49545346030000006000", "chm"); FILE_TYPE_MAP.put("49545346030000006000", "chm");
fileTypeMap.put("04000000010000001300", "mxp"); FILE_TYPE_MAP.put("04000000010000001300", "mxp");
fileTypeMap.put("504b0304140006000800", "docx"); FILE_TYPE_MAP.put("504b0304140006000800", "docx");
fileTypeMap.put("6431303a637265617465", "torrent"); FILE_TYPE_MAP.put("6431303a637265617465", "torrent");
fileTypeMap.put("6D6F6F76", "mov"); FILE_TYPE_MAP.put("6D6F6F76", "mov");
fileTypeMap.put("FF575043", "wpd"); FILE_TYPE_MAP.put("FF575043", "wpd");
fileTypeMap.put("CFAD12FEC5FD746F", "dbx"); FILE_TYPE_MAP.put("CFAD12FEC5FD746F", "dbx");
fileTypeMap.put("2142444E", "pst"); FILE_TYPE_MAP.put("2142444E", "pst");
fileTypeMap.put("AC9EBD8F", "qdf"); FILE_TYPE_MAP.put("AC9EBD8F", "qdf");
fileTypeMap.put("E3828596", "pwl"); FILE_TYPE_MAP.put("E3828596", "pwl");
fileTypeMap.put("2E7261FD", "ram");*/ FILE_TYPE_MAP.put("2E7261FD", "ram");
} }
/** /**
......
...@@ -19,13 +19,11 @@ import springfox.documentation.builders.ApiInfoBuilder; ...@@ -19,13 +19,11 @@ import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.ParameterBuilder; import springfox.documentation.builders.ParameterBuilder;
import springfox.documentation.builders.PathSelectors; import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors; import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.oas.annotations.EnableOpenApi;
import springfox.documentation.schema.ModelRef; import springfox.documentation.schema.ModelRef;
import springfox.documentation.service.*; import springfox.documentation.service.*;
import springfox.documentation.spi.DocumentationType; import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spi.service.contexts.SecurityContext; import springfox.documentation.spi.service.contexts.SecurityContext;
import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.spring.web.plugins.WebFluxRequestHandlerProvider;
import springfox.documentation.spring.web.plugins.WebMvcRequestHandlerProvider; import springfox.documentation.spring.web.plugins.WebMvcRequestHandlerProvider;
import springfox.documentation.swagger2.annotations.EnableSwagger2; import springfox.documentation.swagger2.annotations.EnableSwagger2;
...@@ -45,7 +43,6 @@ import java.util.stream.Collectors; ...@@ -45,7 +43,6 @@ import java.util.stream.Collectors;
public class Swagger2Config implements WebMvcConfigurer { public class Swagger2Config implements WebMvcConfigurer {
/** /**
*
* 显示swagger-ui.html文档展示页,还必须注入swagger资源: * 显示swagger-ui.html文档展示页,还必须注入swagger资源:
* *
* @param registry * @param registry
...@@ -89,8 +86,10 @@ public class Swagger2Config implements WebMvcConfigurer { ...@@ -89,8 +86,10 @@ public class Swagger2Config implements WebMvcConfigurer {
SecurityScheme securityScheme() { SecurityScheme securityScheme() {
return new ApiKey(CommonConstant.X_ACCESS_TOKEN, CommonConstant.X_ACCESS_TOKEN, "header"); return new ApiKey(CommonConstant.X_ACCESS_TOKEN, CommonConstant.X_ACCESS_TOKEN, "header");
} }
/** /**
* JWT token * JWT token
*
* @return * @return
*/ */
private List<Parameter> setHeaderToken() { private List<Parameter> setHeaderToken() {
...@@ -115,7 +114,7 @@ public class Swagger2Config implements WebMvcConfigurer { ...@@ -115,7 +114,7 @@ public class Swagger2Config implements WebMvcConfigurer {
// 描述 // 描述
.description("后台API接口") .description("后台API接口")
// 作者 // 作者
.contact(new Contact(" "," "," ")) .contact(new Contact(" ", " ", " "))
.license("The Apache License, Version 2.0") .license("The Apache License, Version 2.0")
.licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html") .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html")
.build(); .build();
...@@ -143,6 +142,7 @@ public class Swagger2Config implements WebMvcConfigurer { ...@@ -143,6 +142,7 @@ public class Swagger2Config implements WebMvcConfigurer {
/** /**
* 解决springboot2.6 和springfox不兼容问题 * 解决springboot2.6 和springfox不兼容问题
*
* @return * @return
*/ */
@Bean @Bean
...@@ -151,7 +151,7 @@ public class Swagger2Config implements WebMvcConfigurer { ...@@ -151,7 +151,7 @@ public class Swagger2Config implements WebMvcConfigurer {
@Override @Override
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
if (bean instanceof WebMvcRequestHandlerProvider || bean instanceof WebFluxRequestHandlerProvider) { if (bean instanceof WebMvcRequestHandlerProvider) {
customizeSpringfoxHandlerMappings(getHandlerMappings(bean)); customizeSpringfoxHandlerMappings(getHandlerMappings(bean));
} }
return bean; return bean;
......
package org.jeecg.modules.subwayNetwork.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 线路车站-区间站点映射
* @Author: jeecg-boot
* @Date: 2023-06-15
* @Version: V1.0
*/
@Data
@TableName("t_sn_section_station_map")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="t_sn_section_station_map对象", description="线路车站-区间站点映射")
public class SectionStationMap implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private java.lang.String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**区间id*/
@Excel(name = "区间id", width = 15)
@ApiModelProperty(value = "区间id")
private java.lang.String sectionId;
/**车站id*/
@Excel(name = "车站id", width = 15)
@ApiModelProperty(value = "车站id")
private java.lang.String stationId;
}
...@@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; ...@@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.common.api.dto.PageSearch; import org.jeecg.common.api.dto.PageSearch;
import org.jeecg.modules.subwayNetwork.dto.LightRailQueryDTO; import org.jeecg.modules.subwayNetwork.dto.LightRailQueryDTO;
import org.jeecg.modules.subwayNetwork.entity.LightRail; import org.jeecg.modules.subwayNetwork.entity.LightRail;
import org.jeecg.modules.subwayNetwork.entity.SectionStationMap;
import org.jeecg.modules.subwayNetwork.mapper.LightRailMapper; import org.jeecg.modules.subwayNetwork.mapper.LightRailMapper;
import org.jeecg.modules.subwayNetwork.service.ILightRailService; import org.jeecg.modules.subwayNetwork.service.ILightRailService;
import org.jeecg.modules.subwayNetwork.vo.LightRailQueryVO; import org.jeecg.modules.subwayNetwork.vo.LightRailQueryVO;
......
...@@ -156,6 +156,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl ...@@ -156,6 +156,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
result.setSuccess(true); result.setSuccess(true);
result.setResult(pageList); result.setResult(pageList);
result.setCode(200);
//log.info(pageList.toString()); //log.info(pageList.toString());
return result; return result;
} }
......
...@@ -28,8 +28,10 @@ ...@@ -28,8 +28,10 @@
<xxl-job-core.version>2.2.0</xxl-job-core.version> <xxl-job-core.version>2.2.0</xxl-job-core.version>
<fastjson.version>1.2.83</fastjson.version> <fastjson.version>1.2.83</fastjson.version>
<pegdown.version>1.6.0</pegdown.version> <pegdown.version>1.6.0</pegdown.version>
<knife4j-spring-boot-starter.version>3.0.3</knife4j-spring-boot-starter.version> <knife4j-spring-boot-starter.version>2.0.2</knife4j-spring-boot-starter.version>
<knife4j-spring-ui.version>2.0.9</knife4j-spring-ui.version> <knife4j-spring-ui.version>2.0.2</knife4j-spring-ui.version>
<!-- <knife4j-spring-ui.version>2.0.9</knife4j-spring-ui.version>
<knife4j-spring-boot-starter.version>3.0.3</knife4j-spring-boot-starter.version>-->
<!-- 数据库驱动 --> <!-- 数据库驱动 -->
<postgresql.version>42.2.25</postgresql.version> <postgresql.version>42.2.25</postgresql.version>
<ojdbc6.version>11.2.0.3</ojdbc6.version> <ojdbc6.version>11.2.0.3</ojdbc6.version>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment