Quellcode durchsuchen

初始化项目

zhoutg vor 4 Jahren
Ursprung
Commit
b6221ab8ec
35 geänderte Dateien mit 322 neuen und 758 gelöschten Zeilen
  1. 1 1
      src/main/java/com/diagbot/CdssCoreApplication.java
  2. 1 1
      src/main/java/com/diagbot/aop/SysLoggerAspect.java
  3. 1 1
      src/main/java/com/diagbot/config/CorsConfiguer.java
  4. 1 1
      src/main/java/com/diagbot/config/MybatisPlusConfigurer.java
  5. 1 1
      src/main/java/com/diagbot/config/SwaggerConfigurer.java
  6. 0 196
      src/main/java/com/diagbot/entity/SysLog.java
  7. 83 0
      src/main/java/com/diagbot/entity/SysUser.java
  8. 0 142
      src/main/java/com/diagbot/entity/User.java
  9. 1 1
      src/main/java/com/diagbot/exception/CommonExceptionHandler.java
  10. 1 1
      src/main/java/com/diagbot/exception/ServiceErrorCode.java
  11. 1 1
      src/main/java/com/diagbot/facade/KgFacade.java
  12. 0 13
      src/main/java/com/diagbot/facade/SysLogFacade.java
  13. 24 0
      src/main/java/com/diagbot/facade/UserFacade.java
  14. 1 1
      src/main/java/com/diagbot/mapper/KgMapper.java
  15. 0 16
      src/main/java/com/diagbot/mapper/SysLogMapper.java
  16. 18 0
      src/main/java/com/diagbot/mapper/SysUserMapper.java
  17. 1 1
      src/main/java/com/diagbot/service/KgService.java
  18. 0 15
      src/main/java/com/diagbot/service/SysLogService.java
  19. 16 0
      src/main/java/com/diagbot/service/SysUserService.java
  20. 1 1
      src/main/java/com/diagbot/service/impl/KgServiceImpl.java
  21. 0 19
      src/main/java/com/diagbot/service/impl/SysLogServiceImpl.java
  22. 20 0
      src/main/java/com/diagbot/service/impl/SysUserServiceImpl.java
  23. 1 1
      src/main/java/com/diagbot/vo/KgQueryVO.java
  24. 1 1
      src/main/java/com/diagbot/vo/SysLogVo.java
  25. 1 1
      src/main/java/com/diagbot/web/KgController.java
  26. 0 110
      src/main/java/com/diagbot/web/SysLogController.java
  27. 41 0
      src/main/java/com/diagbot/web/UserController.java
  28. 2 2
      src/main/resources/application-dev.yml
  29. 1 1
      src/main/resources/application-local.yml
  30. 26 68
      src/main/resources/application-pre.yml
  31. 26 68
      src/main/resources/application-pro.yml
  32. 26 68
      src/main/resources/application-test.yml
  33. 0 22
      src/main/resources/mapper/SysLogMapper.xml
  34. 21 0
      src/main/resources/mapper/SysUserMapper.xml
  35. 4 4
      src/test/java/com/diagbot/CodeGeneration.java

+ 1 - 1
src/main/java/com/diagbot/CdssCoreApplication.java

@@ -15,7 +15,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
 
 /**
  * @Description: 病历质控系统启动文件
- * @author: gaodm
+ * @author: zhoutg
  * @time: 2018/8/7 9:26
  */
 @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class,

+ 1 - 1
src/main/java/com/diagbot/aop/SysLoggerAspect.java

@@ -14,7 +14,7 @@
 //
 ///**
 // * @Description: 日志拦截切面
-// * @author: gaodm
+// * @author: zhoutg
 // * @time: 2018/8/2 13:36
 // */
 //@Aspect

+ 1 - 1
src/main/java/com/diagbot/config/CorsConfiguer.java

@@ -8,7 +8,7 @@ import org.springframework.web.filter.CorsFilter;
 
 /**
  * @Description:
- * @author: gaodm
+ * @author: zhoutg
  * @time: 2020/4/12 15:56
  */
 @Configuration

+ 1 - 1
src/main/java/com/diagbot/config/MybatisPlusConfigurer.java

@@ -8,7 +8,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
 
 /**
  * @Description: MybatisPlus配置类
- * @author: gaodm
+ * @author: zhoutg
  * @time: 2018/8/2 13:39
  */
 @EnableTransactionManagement

+ 1 - 1
src/main/java/com/diagbot/config/SwaggerConfigurer.java

@@ -22,7 +22,7 @@ import java.util.List;
 
 /**
  * @Description: Swagger配置类
- * @author: gaodm
+ * @author: zhoutg
  * @time: 2018/8/2 14:21
  */
 @Configuration

+ 0 - 196
src/main/java/com/diagbot/entity/SysLog.java

@@ -1,196 +0,0 @@
-package com.diagbot.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * <p>
- * 系统操作日志表
- * </p>
- *
- * @author gaodm
- * @since 2018-09-14
- */
-public class SysLog implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 日志ID
-     */
-    @TableId(value = "id", type = IdType.AUTO)
-    private Long id;
-
-    /**
-     * 是否删除,N:未删除,Y:删除
-     */
-    private String isDeleted;
-
-    /**
-     * 记录创建时间
-     */
-    private Date gmtCreate;
-
-    /**
-     * 记录修改时间,如果时间是1970年则表示纪录未修改
-     */
-    private Date gmtModified;
-
-    /**
-     * 创建人,0表示无创建人值
-     */
-    private String creator;
-
-    /**
-     * 修改人,如果为0则表示纪录未修改
-     */
-    private String modifier;
-
-    /**
-     * 访问者的IP
-     */
-    private String ip;
-
-    /**
-     * 访问的系统类型 1:user-service,2:diagbotman-service,3:uaa-service,4:log-service,5:bi-service,6:knowledge-service,7:feedback-service,8:icss-web
-     */
-    private Integer sysType;
-
-    /**
-     * 方法
-     */
-    private String method;
-
-    /**
-     * 操作名
-     */
-    private String operation;
-
-    /**
-     * 参数
-     */
-    private String params;
-
-    /**
-     * 用户名
-     */
-    private String username;
-
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public String getIsDeleted() {
-        return isDeleted;
-    }
-
-    public void setIsDeleted(String isDeleted) {
-        this.isDeleted = isDeleted;
-    }
-
-    public Date getGmtCreate() {
-        return gmtCreate;
-    }
-
-    public void setGmtCreate(Date gmtCreate) {
-        this.gmtCreate = gmtCreate;
-    }
-
-    public Date getGmtModified() {
-        return gmtModified;
-    }
-
-    public void setGmtModified(Date gmtModified) {
-        this.gmtModified = gmtModified;
-    }
-
-    public String getCreator() {
-        return creator;
-    }
-
-    public void setCreator(String creator) {
-        this.creator = creator;
-    }
-
-    public String getModifier() {
-        return modifier;
-    }
-
-    public void setModifier(String modifier) {
-        this.modifier = modifier;
-    }
-
-    public String getIp() {
-        return ip;
-    }
-
-    public void setIp(String ip) {
-        this.ip = ip;
-    }
-
-    public Integer getSysType() {
-        return sysType;
-    }
-
-    public void setSysType(Integer sysType) {
-        this.sysType = sysType;
-    }
-
-    public String getMethod() {
-        return method;
-    }
-
-    public void setMethod(String method) {
-        this.method = method;
-    }
-
-    public String getOperation() {
-        return operation;
-    }
-
-    public void setOperation(String operation) {
-        this.operation = operation;
-    }
-
-    public String getParams() {
-        return params;
-    }
-
-    public void setParams(String params) {
-        this.params = params;
-    }
-
-    public String getUsername() {
-        return username;
-    }
-
-    public void setUsername(String username) {
-        this.username = username;
-    }
-
-    @Override
-    public String toString() {
-        return "SysLog{" +
-                "id=" + id +
-                ", isDeleted=" + isDeleted +
-                ", gmtCreate=" + gmtCreate +
-                ", gmtModified=" + gmtModified +
-                ", creator=" + creator +
-                ", modifier=" + modifier +
-                ", ip=" + ip +
-                ", sysType=" + sysType +
-                ", method=" + method +
-                ", operation=" + operation +
-                ", params=" + params +
-                ", username=" + username +
-                "}";
-    }
-}

+ 83 - 0
src/main/java/com/diagbot/entity/SysUser.java

@@ -0,0 +1,83 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 系统用户表
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-07-27
+ */
+@Data
+public class SysUser implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 用户ID
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 用户名
+     */
+    private String username;
+
+    /**
+     * 用户密码
+     */
+    private String password;
+
+    /**
+     * 联系人
+     */
+    private String linkman;
+
+    /**
+     * 是否启用(0:停用,1:启用)
+     */
+    private Integer status;
+
+    /**
+     * 1内部用户,0外部用户(默认0)
+     */
+    private Integer type;
+
+    /**
+     * 备注
+     */
+    private String remark;
+}

+ 0 - 142
src/main/java/com/diagbot/entity/User.java

@@ -1,142 +0,0 @@
-package com.diagbot.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * <p>
- * 系统用户表
- * </p>
- *
- * @author gaodm
- * @since 2018-08-30
- */
-@TableName("sys_user")
-public class User implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 用户ID
-     */
-    @TableId(value = "id", type = IdType.AUTO)
-    private Long id;
-
-    /**
-     * 是否删除,N:未删除,Y:删除
-     */
-    private String isDeleted;
-
-    /**
-     * 记录创建时间
-     */
-    private Date gmtCreate;
-
-    /**
-     * 记录修改时间,如果时间是1970年则表示纪录未修改
-     */
-    private Date gmtModified;
-
-    /**
-     * 创建人,0表示无创建人值
-     */
-    private String creator;
-
-    /**
-     * 修改人,如果为0则表示纪录未修改
-     */
-    private String modifier;
-
-    /**
-     * 用户密码
-     */
-    private String password;
-
-    /**
-     * 用户名
-     */
-    private String username;
-
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public String getIsDeleted() {
-        return isDeleted;
-    }
-
-    public void setIsDeleted(String isDeleted) {
-        this.isDeleted = isDeleted;
-    }
-
-    public Date getGmtCreate() {
-        return gmtCreate;
-    }
-
-    public void setGmtCreate(Date gmtCreate) {
-        this.gmtCreate = gmtCreate;
-    }
-
-    public Date getGmtModified() {
-        return gmtModified;
-    }
-
-    public void setGmtModified(Date gmtModified) {
-        this.gmtModified = gmtModified;
-    }
-
-    public String getCreator() {
-        return creator;
-    }
-
-    public void setCreator(String creator) {
-        this.creator = creator;
-    }
-
-    public String getModifier() {
-        return modifier;
-    }
-
-    public void setModifier(String modifier) {
-        this.modifier = modifier;
-    }
-
-    public String getPassword() {
-        return password;
-    }
-
-    public void setPassword(String password) {
-        this.password = password;
-    }
-
-    public String getUsername() {
-        return username;
-    }
-
-    public void setUsername(String username) {
-        this.username = username;
-    }
-
-    @Override
-    public String toString() {
-        return "User{" +
-                "id=" + id +
-                ", isDeleted=" + isDeleted +
-                ", gmtCreate=" + gmtCreate +
-                ", gmtModified=" + gmtModified +
-                ", creator=" + creator +
-                ", modifier=" + modifier +
-                ", password=" + password +
-                ", username=" + username +
-                "}";
-    }
-}

+ 1 - 1
src/main/java/com/diagbot/exception/CommonExceptionHandler.java

@@ -19,7 +19,7 @@ import java.util.Map;
 
 /**
  * @Description: 错误通用处理
- * @author: gaodm
+ * @author: zhoutg
  * @time: 2018/8/2 14:22
  */
 @ControllerAdvice

+ 1 - 1
src/main/java/com/diagbot/exception/ServiceErrorCode.java

@@ -4,7 +4,7 @@ package com.diagbot.exception;
  * @Description: 本服务错误码
  * 系统码(3位) + 等级码(1位) + 4位顺序号
  * 系统码 通用码 000;用户中心 100; 管理中心 200;
- * @author: gaodm
+ * @author: zhoutg
  * @time: 2018/9/10 11:11
  */
 public enum ServiceErrorCode implements ErrorCode {

+ 1 - 1
src/main/java/com/diagbot/facade/KgFacade.java

@@ -6,7 +6,7 @@ import org.springframework.stereotype.Component;
 
 /**
  * @Description: 用户日志业务层
- * @author: gaodm
+ * @author: zhoutg
  * @time: 2018/8/6 9:11
  */
 @Component

+ 0 - 13
src/main/java/com/diagbot/facade/SysLogFacade.java

@@ -1,13 +0,0 @@
-package com.diagbot.facade;
-
-import com.diagbot.service.impl.SysLogServiceImpl;
-import org.springframework.stereotype.Component;
-
-/**
- * @Description: 用户日志业务层
- * @author: gaodm
- * @time: 2018/8/6 9:11
- */
-@Component
-public class SysLogFacade extends SysLogServiceImpl {
-}

+ 24 - 0
src/main/java/com/diagbot/facade/UserFacade.java

@@ -0,0 +1,24 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.entity.SysUser;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.service.impl.SysUserServiceImpl;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+/**
+ * @Description: 用户日志业务层
+ * @author: zhoutg
+ * @time: 2018/8/6 9:11
+ */
+@Component
+public class UserFacade extends SysUserServiceImpl {
+
+    public List<SysUser> getlist() {
+        QueryWrapper<SysUser> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey());
+        return this.list(queryWrapper);
+    }
+}

+ 1 - 1
src/main/java/com/diagbot/mapper/KgMapper.java

@@ -6,7 +6,7 @@ import com.diagbot.vo.KgQueryVO;
  * Mapper 接口
  * </p>
  *
- * @author gaodm
+ * @author zhoutg
  * @since 2018-08-02
  */
 public interface KgMapper {

+ 0 - 16
src/main/java/com/diagbot/mapper/SysLogMapper.java

@@ -1,16 +0,0 @@
-package com.diagbot.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.diagbot.entity.SysLog;
-
-/**
- * <p>
- * Mapper 接口
- * </p>
- *
- * @author gaodm
- * @since 2018-08-02
- */
-public interface SysLogMapper extends BaseMapper<SysLog> {
-
-}

+ 18 - 0
src/main/java/com/diagbot/mapper/SysUserMapper.java

@@ -0,0 +1,18 @@
+package com.diagbot.mapper;
+
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.entity.SysUser;
+
+/**
+ * <p>
+ * 系统用户表 Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-07-27
+ */
+@DS("mysql")
+public interface SysUserMapper extends BaseMapper<SysUser> {
+
+}

+ 1 - 1
src/main/java/com/diagbot/service/KgService.java

@@ -7,7 +7,7 @@ import com.diagbot.vo.KgQueryVO;
  * 服务类
  * </p>
  *
- * @author gaodm
+ * @author zhoutg
  * @since 2018-08-02
  */
 public interface KgService {

+ 0 - 15
src/main/java/com/diagbot/service/SysLogService.java

@@ -1,15 +0,0 @@
-package com.diagbot.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.diagbot.entity.SysLog;
-
-/**
- * <p>
- * 服务类
- * </p>
- *
- * @author gaodm
- * @since 2018-08-02
- */
-public interface SysLogService extends IService<SysLog> {
-}

+ 16 - 0
src/main/java/com/diagbot/service/SysUserService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.entity.SysUser;
+
+/**
+ * <p>
+ * 系统用户表 服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-07-27
+ */
+public interface SysUserService extends IService<SysUser> {
+
+}

+ 1 - 1
src/main/java/com/diagbot/service/impl/KgServiceImpl.java

@@ -11,7 +11,7 @@ import org.springframework.stereotype.Service;
  * 服务实现类
  * </p>
  *
- * @author gaodm
+ * @author zhoutg
  * @since 2018-08-02
  */
 @Service

+ 0 - 19
src/main/java/com/diagbot/service/impl/SysLogServiceImpl.java

@@ -1,19 +0,0 @@
-package com.diagbot.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.diagbot.entity.SysLog;
-import com.diagbot.mapper.SysLogMapper;
-import com.diagbot.service.SysLogService;
-import org.springframework.stereotype.Service;
-
-/**
- * <p>
- * 服务实现类
- * </p>
- *
- * @author gaodm
- * @since 2018-08-02
- */
-@Service
-public class SysLogServiceImpl extends ServiceImpl<SysLogMapper, SysLog> implements SysLogService {
-}

+ 20 - 0
src/main/java/com/diagbot/service/impl/SysUserServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.entity.SysUser;
+import com.diagbot.mapper.SysUserMapper;
+import com.diagbot.service.SysUserService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 系统用户表 服务实现类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-07-27
+ */
+@Service
+public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements SysUserService {
+
+}

+ 1 - 1
src/main/java/com/diagbot/vo/KgQueryVO.java

@@ -8,7 +8,7 @@ import javax.validation.constraints.NotBlank;
 
 /**
  * @Description:
- * @author: gaodm
+ * @author: zhoutg
  * @time: 2020/3/16 9:47
  */
 @Getter

+ 1 - 1
src/main/java/com/diagbot/vo/SysLogVo.java

@@ -7,7 +7,7 @@ import java.util.Date;
 
 /**
  * @Description:
- * @author: gaodm
+ * @author: zhoutg
  * @time: 2018/8/6 10:16
  */
 @Getter

+ 1 - 1
src/main/java/com/diagbot/web/KgController.java

@@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.RestController;
 
 /**
  * @Description: 朗通知识图谱控制层
- * @author: gaodm
+ * @author: zhoutg
  * @time: 2018/8/30 10:12
  */
 @RestController

+ 0 - 110
src/main/java/com/diagbot/web/SysLogController.java

@@ -1,110 +0,0 @@
-package com.diagbot.web;
-
-
-import com.baomidou.mybatisplus.core.conditions.Wrapper;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.diagbot.annotation.SysLogger;
-import com.diagbot.dto.RespDTO;
-import com.diagbot.entity.SysLog;
-import com.diagbot.facade.SysLogFacade;
-import com.diagbot.vo.SysLogVo;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-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.RestController;
-
-import java.util.Date;
-
-/**
- * @Description: 日志操作控制层
- * @author: gaodm
- * @time: 2018/8/30 10:12
- */
-@RestController
-@RequestMapping("/log")
-public class SysLogController {
-
-    @Autowired
-    private SysLogFacade sysLogFacade;
-
-    /**
-     * 新增日志信息
-     *
-     * @param sysLogVo 新增日志输入参数
-     * @return 新增日志是否成功
-     */
-    @ApiOperation(value = "添加日志", notes = "添加日志")
-    @PostMapping("/add")
-    @SysLogger("postLog")
-    public RespDTO add(@RequestBody SysLogVo sysLogVo) {
-        //初始化新增日志信息
-        SysLog sysLog = new SysLog();
-        sysLog.setGmtCreate(new Date());
-        sysLog.setIp(sysLogVo.getIp());
-        sysLog.setMethod(sysLogVo.getMethod());
-        sysLog.setOperation(sysLogVo.getOperation());
-        sysLog.setParams(sysLogVo.getParams());
-        return RespDTO.onSuc(sysLogFacade.save(sysLog) ? "添加成功" : "添加失败");
-    }
-
-    /**
-     * 删除日志
-     *
-     * @param id 日志信息ID
-     * @return 删除是否成功
-     */
-    @ApiOperation(value = "删除日志", notes = "删除日志")
-    @DeleteMapping("/delete/{id}")
-    @SysLogger("deleteLog")
-    public RespDTO delete(@PathVariable(value = "id") Integer id) {
-        return RespDTO.onSuc(sysLogFacade.removeById(id) ? "删除成功" : "删除失败");
-    }
-
-    /**
-     * 修改日志
-     *
-     * @param sysLog 修改日志输入参数
-     * @return 修改是否成功
-     */
-    @ApiOperation(value = "修改日志", notes = "修改日志")
-    @PostMapping("/update")
-    @SysLogger("updateLog")
-    public RespDTO update(@RequestBody SysLog sysLog) {
-        return RespDTO.onSuc(sysLogFacade.updateById(sysLog) ? "修改成功" : "修改失败");
-    }
-
-    /**
-     * 获取日志列表
-     *
-     * @return 日志列信息
-     */
-    @ApiOperation(value = "获取日志列表", notes = "获取日志列表")
-    @GetMapping("/list")
-    @SysLogger("listLog")
-    public RespDTO list() {
-        Wrapper<SysLog> wrapper = new QueryWrapper<>();
-        return RespDTO.onSuc(sysLogFacade.list(wrapper));
-    }
-
-    /**
-     * 获取日志翻页信息
-     *
-     * @return 日志翻页信息
-     */
-    @ApiOperation(value = "获取日志翻页信息", notes = "获取日志翻页信息")
-    @GetMapping("/page")
-    @SysLogger("pageLog")
-    public RespDTO page() {
-        //初始化日志翻页参数
-        IPage<SysLog> wrapper = new Page<>();
-        return RespDTO.onSuc(sysLogFacade.page(wrapper, null));
-    }
-}
-

+ 41 - 0
src/main/java/com/diagbot/web/UserController.java

@@ -0,0 +1,41 @@
+package com.diagbot.web;
+
+
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.SysUser;
+import com.diagbot.facade.UserFacade;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @Description: 日志操作控制层
+ * @author: zhoutg
+ * @time: 2018/8/30 10:12
+ */
+@RestController
+@RequestMapping("/user")
+@Api(value = "用户API", tags = { "用户API" })
+@SuppressWarnings("unchecked")
+public class UserController {
+
+    @Autowired
+    private UserFacade userFacade;
+
+    /**
+     * 获取用户列表
+     *
+     * @return 日志列信息
+     */
+    @ApiOperation(value = "获取用户列表", notes = "获取用户列表")
+    @PostMapping("/list")
+    public RespDTO<List<SysUser>> getlist() {
+        return RespDTO.onSuc(userFacade.getlist());
+    }
+}
+

+ 2 - 2
src/main/resources/application-dev.yml

@@ -1,5 +1,5 @@
 server:
-  port: 8000
+  port: 5860
   max-http-header-size: 10MB
 
 hystrix:
@@ -58,7 +58,7 @@ spring:
     druid:
       driver-class-name: com.mysql.cj.jdbc.Driver
       platform: mysql
-      url: jdbc:mysql://192.168.2.236:3306/pe?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+      url: jdbc:mysql://192.168.2.236:3306/cdss?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
       username: root
       password: lantone
       # 连接池的配置信息

+ 1 - 1
src/main/resources/application-local.yml

@@ -59,7 +59,7 @@ spring:
         mysql:
           driver-class-name: com.mysql.cj.jdbc.Driver
           platform: mysql
-          url: jdbc:mysql://192.168.2.236:3306/pe?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+          url: jdbc:mysql://192.168.2.236:3306/cdss?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
           username: root
           password: lantone
 

+ 26 - 68
src/main/resources/application-pre.yml

@@ -20,12 +20,6 @@ hystrix:
           thread:
             timeoutInMilliseconds: 20000
 
-ribbon:
-  ReadTimeout: 20000
-  ConnectTimeout: 20000
-  MaxAutoRetries: 0
-  MaxAutoRetriesNextServer: 1
-
 feign:
   hystrix:
     enabled: true
@@ -40,70 +34,34 @@ feign:
     max-connections: 1000 # 默认值
     max-connections-per-route: 250 # 默认值
 
-management:
-  endpoints:
-    web:
-      exposure:
-        include: bus-refresh,health,info,hystrix.stream
-      cors:
-        allowed-origins: "*"
-        allowed-methods: "*"
-  endpoint:
-    health:
-      show-details: always
-
 # 驱动配置信息
 spring:
   datasource:
-    druid:
-      driver-class-name: com.mysql.cj.jdbc.Driver
-      platform: mysql
-      url: jdbc:mysql://192.168.2.121:3306/pe?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
-      username: teamback
-      password: goTulmLeon
-      # 连接池的配置信息
-      # 初始化大小,最小,最大
-      initialSize: 5
-      minIdle: 5
-      maxActive: 20
-      # 配置获取连接等待超时的时间
-      maxWait: 60000
-      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
-      timeBetweenEvictionRunsMillis: 60000
-      # 配置一个连接在池中最小生存的时间,单位是毫秒
-      minEvictableIdleTimeMillis: 300000
-      validationQuery: SELECT 1 FROM DUAL
-      testWhileIdle: true
-      testOnBorrow: false
-      testOnReturn: false
-      # 打开PSCache,并且指定每个连接上PSCache的大小
-      poolPreparedStatements: true
-      maxPoolPreparedStatementPerConnectionSize: 20
-      # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
-      filters.commons-log.connection-logger-name: wall,log4j
-      filter:
-        stat:
-          enabled: true
-          mergeSql: true
-          log-slow-sql: true
-          slow-sql-millis: 2000
-      #监控配置
-      web-stat-filter:
-        enabled: true
-        url-pattern: /*
-        exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
-
-      # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
-      stat-view-servlet:
-        enabled: true
-        url-pattern: /druid/*
-        reset-enable: false
-        login-username: root
-        login-password: root
-
-  jackson:
-    date-format: yyyy-MM-dd HH:mm:ss
-    time-zone: GMT+8
+    dynamic:
+      primary: neo4j
+      # 数据库配置
+      datasource:
+        neo4j:
+          driver-class-name: org.neo4j.jdbc.Driver
+          url: jdbc:neo4j:http://192.168.2.234:7472
+          username: neo4j
+          password: root
+          #定义初始连接数
+          initialSize: 0
+          #定义最大连接数
+          maxActive: 20
+          #定义最大空闲
+          maxIdle: 20
+          #定义最小空闲
+          minIdle: 1
+          #定义最长等待时间
+          maxWait: 60000
+        mysql:
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          platform: mysql
+          url: jdbc:mysql://192.168.2.121:3306/cdss?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+          username: teamback
+          password: goTulmLeon
 
   servlet:
     multipart:
@@ -143,4 +101,4 @@ io.github.lvyahui8.spring:
   thread-number: 12
 
 swagger:
-  enable: true
+  enable: true

+ 26 - 68
src/main/resources/application-pro.yml

@@ -20,12 +20,6 @@ hystrix:
           thread:
             timeoutInMilliseconds: 20000
 
-ribbon:
-  ReadTimeout: 20000
-  ConnectTimeout: 20000
-  MaxAutoRetries: 0
-  MaxAutoRetriesNextServer: 1
-
 feign:
   hystrix:
     enabled: true
@@ -40,70 +34,34 @@ feign:
     max-connections: 1000 # 默认值
     max-connections-per-route: 250 # 默认值
 
-management:
-  endpoints:
-    web:
-      exposure:
-        include: bus-refresh,health,info,hystrix.stream
-      cors:
-        allowed-origins: "*"
-        allowed-methods: "*"
-  endpoint:
-    health:
-      show-details: always
-
 # 驱动配置信息
 spring:
   datasource:
-    druid:
-      driver-class-name: com.mysql.cj.jdbc.Driver
-      platform: mysql
-      url: jdbc:mysql://192.168.2.122:3306/pe?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
-      username: root
-      password: lantone
-      # 连接池的配置信息
-      # 初始化大小,最小,最大
-      initialSize: 5
-      minIdle: 5
-      maxActive: 20
-      # 配置获取连接等待超时的时间
-      maxWait: 60000
-      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
-      timeBetweenEvictionRunsMillis: 60000
-      # 配置一个连接在池中最小生存的时间,单位是毫秒
-      minEvictableIdleTimeMillis: 300000
-      validationQuery: SELECT 1 FROM DUAL
-      testWhileIdle: true
-      testOnBorrow: false
-      testOnReturn: false
-      # 打开PSCache,并且指定每个连接上PSCache的大小
-      poolPreparedStatements: true
-      maxPoolPreparedStatementPerConnectionSize: 20
-      # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
-      filters.commons-log.connection-logger-name: wall,log4j
-      filter:
-        stat:
-          enabled: true
-          mergeSql: true
-          log-slow-sql: true
-          slow-sql-millis: 2000
-      #监控配置
-      web-stat-filter:
-        enabled: true
-        url-pattern: /*
-        exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
-
-      # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
-      stat-view-servlet:
-        enabled: true
-        url-pattern: /druid/*
-        reset-enable: false
-        login-username: root
-        login-password: root
-
-  jackson:
-    date-format: yyyy-MM-dd HH:mm:ss
-    time-zone: GMT+8
+    dynamic:
+      primary: neo4j
+      # 数据库配置
+      datasource:
+        neo4j:
+          driver-class-name: org.neo4j.jdbc.Driver
+          url: jdbc:neo4j:http://192.168.2.234:7472
+          username: neo4j
+          password: root
+          #定义初始连接数
+          initialSize: 0
+          #定义最大连接数
+          maxActive: 20
+          #定义最大空闲
+          maxIdle: 20
+          #定义最小空闲
+          minIdle: 1
+          #定义最长等待时间
+          maxWait: 60000
+        mysql:
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          platform: mysql
+          url: jdbc:mysql://192.168.2.122:3306/cdss?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+          username: root
+          password: lantone
 
   servlet:
     multipart:
@@ -143,4 +101,4 @@ io.github.lvyahui8.spring:
   thread-number: 12
 
 swagger:
-  enable: true
+  enable: true

+ 26 - 68
src/main/resources/application-test.yml

@@ -20,12 +20,6 @@ hystrix:
           thread:
             timeoutInMilliseconds: 20000
 
-ribbon:
-  ReadTimeout: 20000
-  ConnectTimeout: 20000
-  MaxAutoRetries: 0
-  MaxAutoRetriesNextServer: 1
-
 feign:
   hystrix:
     enabled: true
@@ -40,70 +34,34 @@ feign:
     max-connections: 1000 # 默认值
     max-connections-per-route: 250 # 默认值
 
-management:
-  endpoints:
-    web:
-      exposure:
-        include: bus-refresh,health,info,hystrix.stream
-      cors:
-        allowed-origins: "*"
-        allowed-methods: "*"
-  endpoint:
-    health:
-      show-details: always
-
 # 驱动配置信息
 spring:
   datasource:
-    druid:
-      driver-class-name: com.mysql.cj.jdbc.Driver
-      platform: mysql
-      url: jdbc:mysql://192.168.2.241:3306/pe?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
-      username: root
-      password: lantone
-      # 连接池的配置信息
-      # 初始化大小,最小,最大
-      initialSize: 5
-      minIdle: 5
-      maxActive: 20
-      # 配置获取连接等待超时的时间
-      maxWait: 60000
-      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
-      timeBetweenEvictionRunsMillis: 60000
-      # 配置一个连接在池中最小生存的时间,单位是毫秒
-      minEvictableIdleTimeMillis: 300000
-      validationQuery: SELECT 1 FROM DUAL
-      testWhileIdle: true
-      testOnBorrow: false
-      testOnReturn: false
-      # 打开PSCache,并且指定每个连接上PSCache的大小
-      poolPreparedStatements: true
-      maxPoolPreparedStatementPerConnectionSize: 20
-      # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
-      filters.commons-log.connection-logger-name: wall,log4j
-      filter:
-        stat:
-          enabled: true
-          mergeSql: true
-          log-slow-sql: true
-          slow-sql-millis: 2000
-      #监控配置
-      web-stat-filter:
-        enabled: true
-        url-pattern: /*
-        exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
-
-      # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
-      stat-view-servlet:
-        enabled: true
-        url-pattern: /druid/*
-        reset-enable: false
-        login-username: root
-        login-password: root
-
-  jackson:
-    date-format: yyyy-MM-dd HH:mm:ss
-    time-zone: GMT+8
+    dynamic:
+      primary: neo4j
+      # 数据库配置
+      datasource:
+        neo4j:
+          driver-class-name: org.neo4j.jdbc.Driver
+          url: jdbc:neo4j:http://192.168.2.234:7472
+          username: neo4j
+          password: root
+          #定义初始连接数
+          initialSize: 0
+          #定义最大连接数
+          maxActive: 20
+          #定义最大空闲
+          maxIdle: 20
+          #定义最小空闲
+          minIdle: 1
+          #定义最长等待时间
+          maxWait: 60000
+        mysql:
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          platform: mysql
+          url: jdbc:mysql://192.168.2.241:3306/cdss?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+          username: root
+          password: lantone
 
   servlet:
     multipart:
@@ -143,4 +101,4 @@ io.github.lvyahui8.spring:
   thread-number: 12
 
 swagger:
-  enable: true
+  enable: true

+ 0 - 22
src/main/resources/mapper/SysLogMapper.xml

@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.diagbot.mapper.SysLogMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.diagbot.entity.SysLog">
-        <id column="id" property="id"/>
-        <result column="is_deleted" property="isDeleted"/>
-        <result column="gmt_create" property="gmtCreate"/>
-        <result column="gmt_modified" property="gmtModified"/>
-        <result column="creator" property="creator"/>
-        <result column="modifier" property="modifier"/>
-        <result column="ip" property="ip"/>
-        <result column="sys_type" property="sysType"/>
-        <result column="method" property="method"/>
-        <result column="operation" property="operation"/>
-        <result column="params" property="params"/>
-        <result column="username" property="username"/>
-    </resultMap>
-
-</mapper>

+ 21 - 0
src/main/resources/mapper/SysUserMapper.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.diagbot.mapper.SysUserMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.SysUser">
+        <id column="id" property="id" />
+        <result column="is_deleted" property="isDeleted" />
+        <result column="gmt_create" property="gmtCreate" />
+        <result column="gmt_modified" property="gmtModified" />
+        <result column="creator" property="creator" />
+        <result column="modifier" property="modifier" />
+        <result column="username" property="username" />
+        <result column="password" property="password" />
+        <result column="linkman" property="linkman" />
+        <result column="status" property="status" />
+        <result column="type" property="type" />
+        <result column="remark" property="remark" />
+    </resultMap>
+
+</mapper>

+ 4 - 4
src/test/java/com/diagbot/CodeGeneration.java

@@ -11,7 +11,7 @@ import com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine;
 
 /**
  * @Description: 代码生成器
- * @author: gaodm
+ * @author: zhoutg
  * @time: 2018/8/2 10:15
  */
 public class CodeGeneration {
@@ -27,7 +27,7 @@ public class CodeGeneration {
 
         // 全局配置
         GlobalConfig gc = new GlobalConfig();
-        gc.setOutputDir("E://code//mrqcsys");
+        gc.setOutputDir("E://code//cdss");
         gc.setFileOverride(true);
         gc.setActiveRecord(false);// 不需要ActiveRecord特性的请改为false
         gc.setEnableCache(false);// XML 二级缓存
@@ -49,14 +49,14 @@ public class CodeGeneration {
         dsc.setDriverName("com.mysql.cj.jdbc.Driver");
         dsc.setUsername("root");
         dsc.setPassword("lantone");
-        dsc.setUrl("jdbc:mysql://192.168.2.236:3306/pe?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8");
+        dsc.setUrl("jdbc:mysql://192.168.2.236:3306/cdss?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8");
         mpg.setDataSource(dsc);
 
         // 策略配置
         StrategyConfig strategy = new StrategyConfig();
 //        strategy.setTablePrefix(new String[] { "med_" });// 此处可以修改为您的表前缀
         strategy.setNaming(NamingStrategy.underline_to_camel);// 表名生成策略
-        strategy.setInclude(new String[] { "med_crisis_info"}); // 需要生成的表
+        strategy.setInclude(new String[] { "sys_user"}); // 需要生成的表
 
         strategy.setSuperServiceClass(null);
         strategy.setSuperServiceImplClass(null);