Commit 2e6e15b6 authored by hkl's avatar hkl

feat:1.代码提交

parent ec9df5b9
...@@ -24,7 +24,9 @@ public class Result<T> implements Serializable { ...@@ -24,7 +24,9 @@ public class Result<T> implements Serializable {
public void setSuccess(boolean success) { public void setSuccess(boolean success) {
this.success = success; this.success = success;
this.code = 200; if (success == true) {
this.code = 200;
}
} }
/** /**
......
...@@ -58,11 +58,8 @@ public class LightRailController extends JeecgController<LightRail, ILightRailSe ...@@ -58,11 +58,8 @@ public class LightRailController extends JeecgController<LightRail, ILightRailSe
@PostMapping(value = "/edit") @PostMapping(value = "/edit")
public Result<String> edit(@RequestBody LightRail lightRail) { public Result<String> edit(@RequestBody LightRail lightRail) {
//获取当前用户 //获取当前用户
// LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
// lightRail.setUpdateBy(sysUser.getUsername());
lightRail.setUpdateTime(new Date()); lightRail.setUpdateTime(new Date());
if (ObjectUtil.isEmpty(lightRail.getId())) { if (ObjectUtil.isEmpty(lightRail.getId())) {
// lightRail.setCreateBy(sysUser.getUsername());
lightRail.setCreateTime(new Date()); lightRail.setCreateTime(new Date());
lightRailService.save(lightRail); lightRailService.save(lightRail);
} else { } else {
......
package org.jeecg.modules.subwayNetwork.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
@Data
@TableName("t_sn_line_alias")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "t_sn_line_alias对象", description = "线路车站-线别管理")
public class LineAlias {
@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 String updateBy;
@ApiModelProperty(value = "更新日期")
private Date updateTime;
@ApiModelProperty(value = "线别Code")
private String lineAliasCode;
@ApiModelProperty(value = "线别名称")
private String lineAliasName;
@ApiModelProperty(value = "备注")
private String remark;
}
package org.jeecg.modules.subwayNetwork.mapper;
public class LineAliasMapper {
}
...@@ -12,13 +12,11 @@ ...@@ -12,13 +12,11 @@
t1.status, t1.status,
t1.update_by, t1.update_by,
t1.update_time, t1.update_time,
count(t2.id) subwaySectionNum, (SELECT count(1) FROM t_sn_subway_section WHERE light_rail_id = t1.id ) subwaySectionNum,
count(t3.id) trainStationNum, (SELECT count( DISTINCT station_name) FROM t_sn_train_station WHERE light_rail_id = t1.id ) trainStationNum,
ifnull(sum(t3.end_mileage),0) lineMileage (SELECT max(end_mileage) FROM t_sn_train_station WHERE light_rail_id = t1.id ) lineMileage
FROM FROM
t_sn_light_rail t1 t_sn_light_rail t1
LEFT JOIN t_sn_subway_section t2 ON t1.id = t2.light_rail_id
LEFT JOIN t_sn_train_station t3 ON t1.id = t3.light_rail_id
<where> <where>
<if test="query.railLineName != null and query.railLineName != ''"> <if test="query.railLineName != null and query.railLineName != ''">
AND t1.rail_line_name like concat('%',#{query.railLineName},'%') AND t1.rail_line_name like concat('%',#{query.railLineName},'%')
......
...@@ -11,6 +11,7 @@ import org.jeecg.common.util.CommonUtils; ...@@ -11,6 +11,7 @@ import org.jeecg.common.util.CommonUtils;
import org.jeecg.common.util.RestDesformUtil; import org.jeecg.common.util.RestDesformUtil;
import org.jeecg.common.util.filter.FileTypeFilter; import org.jeecg.common.util.filter.FileTypeFilter;
import org.jeecg.common.util.oConvertUtils; import org.jeecg.common.util.oConvertUtils;
import org.jeecg.config.JeecgBaseConfig;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.util.AntPathMatcher; import org.springframework.util.AntPathMatcher;
import org.springframework.util.FileCopyUtils; import org.springframework.util.FileCopyUtils;
...@@ -23,6 +24,7 @@ import org.springframework.web.multipart.MultipartHttpServletRequest; ...@@ -23,6 +24,7 @@ import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.HandlerMapping; import org.springframework.web.servlet.HandlerMapping;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.*; import java.io.*;
...@@ -50,6 +52,9 @@ public class CommonController { ...@@ -50,6 +52,9 @@ public class CommonController {
@Value(value = "${jeecg.uploadType}") @Value(value = "${jeecg.uploadType}")
private String uploadType; private String uploadType;
@Resource
private JeecgBaseConfig jeecgBaseConfig;
/** /**
* @return * @return
* @Author 政辉 * @Author 政辉
...@@ -118,7 +123,7 @@ public class CommonController { ...@@ -118,7 +123,7 @@ public class CommonController {
//update-end-author:taoyan date:20200814 for:文件上传改造 //update-end-author:taoyan date:20200814 for:文件上传改造
} }
if (oConvertUtils.isNotEmpty(savePath)) { if (oConvertUtils.isNotEmpty(savePath)) {
savePath = RestDesformUtil.path + "/sys/common/static/" + savePath; savePath = jeecgBaseConfig.getFileViewDomain() + RestDesformUtil.path + "/sys/common/static/" + savePath;
result.setResult(savePath); result.setResult(savePath);
result.setSuccess(true); result.setSuccess(true);
} else { } else {
......
...@@ -302,6 +302,7 @@ public class SysPermissionController { ...@@ -302,6 +302,7 @@ public class SysPermissionController {
json.put("allAuth", allauthjsonArray); json.put("allAuth", allauthjsonArray);
json.put("sysSafeMode", jeecgBaseConfig.getSafeMode()); json.put("sysSafeMode", jeecgBaseConfig.getSafeMode());
result.setResult(json); result.setResult(json);
result.setSuccess(true);
} catch (Exception e) { } catch (Exception e) {
result.error500("查询失败:" + e.getMessage()); result.error500("查询失败:" + e.getMessage());
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
......
...@@ -71,7 +71,7 @@ public class PermissionDataUtil { ...@@ -71,7 +71,7 @@ public class PermissionDataUtil {
// 一级菜单默认组件 // 一级菜单默认组件
if (0 == permission.getMenuType() && oConvertUtils.isEmpty(permission.getComponent())) { if (0 == permission.getMenuType() && oConvertUtils.isEmpty(permission.getComponent())) {
// 一级菜单默认组件 // 一级菜单默认组件
permission.setComponent("layouts/RouteView"); // permission.setComponent("layouts/RouteView");
} }
return permission; return permission;
} }
......
...@@ -131,7 +131,7 @@ spring: ...@@ -131,7 +131,7 @@ spring:
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
datasource: datasource:
master: master:
url: jdbc:mysql://47.94.207.62:3306/hzsomms2?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&zeroDateTimeBehavior=convertToNull url: jdbc:mysql://47.94.207.62:3306/hzsomms?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&zeroDateTimeBehavior=convertToNull
username: root username: root
password: superAdmin&321 password: superAdmin&321
driver-class-name: com.mysql.jdbc.Driver driver-class-name: com.mysql.jdbc.Driver
...@@ -188,9 +188,10 @@ jeecg: ...@@ -188,9 +188,10 @@ jeecg:
app: http://localhost:8051 app: http://localhost:8051
path: path:
#文件上传根目录 设置 #文件上传根目录 设置
upload: /opt/upFiles upload: F:\\upFiles
#webapp文件路径 #webapp文件路径
webapp: /opt/webapp webapp: F:\\upFiles
#文件访问域名
shiro: shiro:
excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/** excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**
#阿里云oss存储和大鱼短信秘钥配置 #阿里云oss存储和大鱼短信秘钥配置
...@@ -205,7 +206,7 @@ jeecg: ...@@ -205,7 +206,7 @@ jeecg:
cluster-nodes: 127.0.0.1:9200 cluster-nodes: 127.0.0.1:9200
check-enabled: false check-enabled: false
# 在线预览文件服务器地址配置 # 在线预览文件服务器地址配置
file-view-domain: http://fileview.jeecg.com file-view-domain: http://192.168.11.41:8080
# minio文件上传 # minio文件上传
minio: minio:
minio_url: http://minio.jeecg.com minio_url: http://minio.jeecg.com
......
...@@ -131,7 +131,7 @@ spring: ...@@ -131,7 +131,7 @@ spring:
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
datasource: datasource:
master: master:
url: jdbc:mysql://127.0.0.1:3306/hzsomms2?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&zeroDateTimeBehavior=convertToNull url: jdbc:mysql://127.0.0.1:3306/hzsomms?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&zeroDateTimeBehavior=convertToNull
username: root username: root
password: superAdmin&321 password: superAdmin&321
driver-class-name: com.mysql.jdbc.Driver driver-class-name: com.mysql.jdbc.Driver
...@@ -188,9 +188,9 @@ jeecg: ...@@ -188,9 +188,9 @@ jeecg:
app: http://localhost:8051 app: http://localhost:8051
path: path:
#文件上传根目录 设置 #文件上传根目录 设置
upload: D://opt//upFiles upload: /opt/ztgk/file
#webapp文件路径 #webapp文件路径
webapp: D://opt//webapp webapp: /opt/ztgk/file
shiro: shiro:
excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/** excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**
#阿里云oss存储和大鱼短信秘钥配置 #阿里云oss存储和大鱼短信秘钥配置
...@@ -206,7 +206,7 @@ jeecg: ...@@ -206,7 +206,7 @@ jeecg:
cluster-nodes: 81.70.47.128:9200 cluster-nodes: 81.70.47.128:9200
check-enabled: false check-enabled: false
# 在线预览文件服务器地址配置 # 在线预览文件服务器地址配置
file-view-domain: http://127.0.0.1:8012 file-view-domain: http://47.94.207.62
# minio文件上传 # minio文件上传
minio: minio:
minio_url: http://minio.jeecg.com minio_url: http://minio.jeecg.com
......
...@@ -2,4 +2,4 @@ spring: ...@@ -2,4 +2,4 @@ spring:
application: application:
name: jeecg-system name: jeecg-system
profiles: profiles:
active: dev active: dev
\ No newline at end of file
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