Parcourir la source

清理不必要的代码

gaodm il y a 4 ans
Parent
commit
5ab0c620ad

+ 0 - 196
cdssman-service/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 +
-                "}";
-    }
-}

+ 0 - 13
cdssman-service/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 {
-}

+ 0 - 16
cdssman-service/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> {
-
-}

+ 0 - 15
cdssman-service/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> {
-}

+ 0 - 19
cdssman-service/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 {
-}

+ 0 - 21
cdssman-service/src/main/java/com/diagbot/vo/SysLogVo.java

@@ -1,21 +0,0 @@
-package com.diagbot.vo;
-
-import lombok.Getter;
-import lombok.Setter;
-
-import java.util.Date;
-
-/**
- * @Description:
- * @author: gaodm
- * @time: 2018/8/6 10:16
- */
-@Getter
-@Setter
-public class SysLogVo {
-    private Date createDate;
-    private String ip;
-    private String method;
-    private String operation;
-    private String params;
-}

+ 0 - 110
cdssman-service/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));
-    }
-}
-

+ 0 - 22
cdssman-service/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>