浏览代码

系统崩溃日志

wangzhe 2 年之前
父节点
当前提交
bedabbef35

+ 130 - 0
mybusiness/src/main/java/com/sooka/system/controller/TUInterfaceCrashLogController.java

@@ -0,0 +1,130 @@
+package com.sooka.system.controller;
+
+import com.sooka.common.annotation.Log;
+import com.sooka.common.core.controller.BaseController;
+import com.sooka.common.core.domain.AjaxResult;
+import com.sooka.common.core.page.TableDataInfo;
+import com.sooka.common.enums.BusinessType;
+import com.sooka.common.utils.poi.ExcelUtil;
+import com.sooka.system.domain.TUInterfaceCrashLog;
+import com.sooka.system.service.ITUInterfaceCrashLogService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 接口崩溃日志Controller
+ */
+@Controller
+@RequestMapping("/system/crashLog")
+public class TUInterfaceCrashLogController extends BaseController
+{
+    private String prefix = "system/crashLog";
+
+    @Autowired
+    private ITUInterfaceCrashLogService tUInterfaceCrashLogService;
+
+    @RequiresPermissions("system:crashLog:view")
+    @GetMapping()
+    public String crashLog()
+    {
+        return prefix + "/crashLog";
+    }
+
+    /**
+     * 查询接口崩溃日志列表
+     */
+    @RequiresPermissions("system:crashLog:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(TUInterfaceCrashLog tUInterfaceCrashLog)
+    {
+        startPage();
+        List<TUInterfaceCrashLog> list = tUInterfaceCrashLogService.selectTUInterfaceCrashLogList(tUInterfaceCrashLog);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出接口崩溃日志列表
+     */
+    @RequiresPermissions("system:crashLog:export")
+    @Log(title = "接口崩溃日志", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(TUInterfaceCrashLog tUInterfaceCrashLog)
+    {
+        List<TUInterfaceCrashLog> list = tUInterfaceCrashLogService.selectTUInterfaceCrashLogList(tUInterfaceCrashLog);
+        ExcelUtil<TUInterfaceCrashLog> util = new ExcelUtil<TUInterfaceCrashLog>(TUInterfaceCrashLog.class);
+        return util.exportExcel(list, "crashLog");
+    }
+
+    /**
+     * 新增接口崩溃日志
+     */
+    @GetMapping("/add")
+    public String add()
+    {
+        return prefix + "/add";
+    }
+
+    /**
+     * 新增保存接口崩溃日志
+     */
+    @RequiresPermissions("system:crashLog:add")
+    @Log(title = "接口崩溃日志", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(TUInterfaceCrashLog tUInterfaceCrashLog)
+    {
+        return toAjax(tUInterfaceCrashLogService.insertTUInterfaceCrashLog(tUInterfaceCrashLog));
+    }
+
+    /**
+     * 修改接口崩溃日志
+     */
+    @GetMapping("/edit/{id}")
+    public String edit(@PathVariable("id") String id, ModelMap mmap)
+    {
+        TUInterfaceCrashLog tUInterfaceCrashLog = tUInterfaceCrashLogService.selectTUInterfaceCrashLogById(id);
+        mmap.put("crashLog", tUInterfaceCrashLog);
+        return prefix + "/edit";
+    }
+
+    /**
+     * 查看接口崩溃日志详情
+     */
+    @GetMapping("/detail/{id}")
+    public String detail(@PathVariable("id") String id, ModelMap mmap) {
+        TUInterfaceCrashLog tUInterfaceCrashLog = tUInterfaceCrashLogService.selectTUInterfaceCrashLogById(id);
+        mmap.put("crashLog", tUInterfaceCrashLog);
+        return prefix + "/detail";
+    }
+
+    /**
+     * 修改保存接口崩溃日志
+     */
+    @RequiresPermissions("system:crashLog:edit")
+    @Log(title = "接口崩溃日志", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(TUInterfaceCrashLog tUInterfaceCrashLog)
+    {
+        return toAjax(tUInterfaceCrashLogService.updateTUInterfaceCrashLog(tUInterfaceCrashLog));
+    }
+
+    /**
+     * 删除接口崩溃日志
+     */
+    @RequiresPermissions("system:crashLog:remove")
+    @Log(title = "接口崩溃日志", businessType = BusinessType.DELETE)
+    @PostMapping( "/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids)
+    {
+        return toAjax(tUInterfaceCrashLogService.deleteTUInterfaceCrashLogByIds(ids));
+    }
+}

文件差异内容过多而无法显示
+ 1586 - 0
mybusiness/src/main/java/com/sooka/system/domain/TUInterfaceCrashLog.java


+ 62 - 0
mybusiness/src/main/java/com/sooka/system/mapper/TUInterfaceCrashLogMapper.java

@@ -0,0 +1,62 @@
+package com.sooka.system.mapper;
+
+import com.sooka.common.annotation.DataSource;
+import com.sooka.common.enums.DataSourceType;
+import com.sooka.system.domain.TUInterfaceCrashLog;
+
+import java.util.List;
+
+/**
+ * 接口崩溃日志Mapper接口
+ */
+@DataSource(value = DataSourceType.MASTER)
+public interface TUInterfaceCrashLogMapper
+{
+    /**
+     * 查询接口崩溃日志
+     *
+     * @param id 接口崩溃日志ID
+     * @return 接口崩溃日志
+     */
+    public TUInterfaceCrashLog selectTUInterfaceCrashLogById(String id);
+
+    /**
+     * 查询接口崩溃日志列表
+     *
+     * @param tUInterfaceCrashLog 接口崩溃日志
+     * @return 接口崩溃日志集合
+     */
+    public List<TUInterfaceCrashLog> selectTUInterfaceCrashLogList(TUInterfaceCrashLog tUInterfaceCrashLog);
+
+    /**
+     * 新增接口崩溃日志
+     *
+     * @param tUInterfaceCrashLog 接口崩溃日志
+     * @return 结果
+     */
+    public int insertTUInterfaceCrashLog(TUInterfaceCrashLog tUInterfaceCrashLog);
+
+    /**
+     * 修改接口崩溃日志
+     *
+     * @param tUInterfaceCrashLog 接口崩溃日志
+     * @return 结果
+     */
+    public int updateTUInterfaceCrashLog(TUInterfaceCrashLog tUInterfaceCrashLog);
+
+    /**
+     * 删除接口崩溃日志
+     *
+     * @param id 接口崩溃日志ID
+     * @return 结果
+     */
+    public int deleteTUInterfaceCrashLogById(String id);
+
+    /**
+     * 批量删除接口崩溃日志
+     *
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteTUInterfaceCrashLogByIds(String[] ids);
+}

+ 59 - 0
mybusiness/src/main/java/com/sooka/system/service/ITUInterfaceCrashLogService.java

@@ -0,0 +1,59 @@
+package com.sooka.system.service;
+
+import com.sooka.system.domain.TUInterfaceCrashLog;
+
+import java.util.List;
+
+/**
+ * 接口崩溃日志Service接口
+ */
+public interface ITUInterfaceCrashLogService 
+{
+    /**
+     * 查询接口崩溃日志
+     * 
+     * @param id 接口崩溃日志ID
+     * @return 接口崩溃日志
+     */
+    public TUInterfaceCrashLog selectTUInterfaceCrashLogById(String id);
+
+    /**
+     * 查询接口崩溃日志列表
+     * 
+     * @param tUInterfaceCrashLog 接口崩溃日志
+     * @return 接口崩溃日志集合
+     */
+    public List<TUInterfaceCrashLog> selectTUInterfaceCrashLogList(TUInterfaceCrashLog tUInterfaceCrashLog);
+
+    /**
+     * 新增接口崩溃日志
+     * 
+     * @param tUInterfaceCrashLog 接口崩溃日志
+     * @return 结果
+     */
+    public int insertTUInterfaceCrashLog(TUInterfaceCrashLog tUInterfaceCrashLog);
+
+    /**
+     * 修改接口崩溃日志
+     * 
+     * @param tUInterfaceCrashLog 接口崩溃日志
+     * @return 结果
+     */
+    public int updateTUInterfaceCrashLog(TUInterfaceCrashLog tUInterfaceCrashLog);
+
+    /**
+     * 批量删除接口崩溃日志
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteTUInterfaceCrashLogByIds(String ids);
+
+    /**
+     * 删除接口崩溃日志信息
+     * 
+     * @param id 接口崩溃日志ID
+     * @return 结果
+     */
+    public int deleteTUInterfaceCrashLogById(String id);
+}

+ 8 - 0
mybusiness/src/main/java/com/sooka/system/service/impl/Guiji_Base_Service.java

@@ -5,10 +5,13 @@ import com.sooka.common.utils.ServletUtils;
 import com.sooka.common.utils.uuid.UUID;
 import com.sooka.system.domain.BaseBusinessEntity;
 import com.sooka.system.domain.SysUser;
+import com.sooka.system.domain.TUInterfaceCrashLog;
 import com.sooka.system.domain.TULog;
+import com.sooka.system.mapper.TUInterfaceCrashLogMapper;
 import com.sooka.system.mapper.TULogMapper;
 import com.util.HttpUtil;
 import com.util.UserInfoUtil;
+import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -21,6 +24,8 @@ import java.util.Set;
 public class Guiji_Base_Service {
 
     @Resource
+    TUInterfaceCrashLogMapper crashLogMapper;
+    @Resource
     TULogMapper tuLogMapper;
     @Resource
     private UserInfoUtil userInfoUtil;
@@ -110,5 +115,8 @@ public class Guiji_Base_Service {
             tuLog.setPlatformInterfacetype(baseBusinessEntity.getInterfacetype());
         }
         tuLogMapper.insertTULog(tuLog);
+        TUInterfaceCrashLog crashLog = new TUInterfaceCrashLog();
+        BeanUtils.copyProperties(tuLog, crashLog);
+        crashLogMapper.insertTUInterfaceCrashLog(crashLog);
     }
 }

+ 95 - 0
mybusiness/src/main/java/com/sooka/system/service/impl/TUInterfaceCrashLogServiceImpl.java

@@ -0,0 +1,95 @@
+package com.sooka.system.service.impl;
+
+import com.sooka.common.core.text.Convert;
+import com.sooka.common.utils.DateUtils;
+import com.sooka.system.domain.TUInterfaceCrashLog;
+import com.sooka.system.mapper.TUInterfaceCrashLogMapper;
+import com.sooka.system.service.ITUInterfaceCrashLogService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 接口崩溃日志Service业务层处理
+ */
+@Service
+public class TUInterfaceCrashLogServiceImpl implements ITUInterfaceCrashLogService
+{
+    @Autowired
+    private TUInterfaceCrashLogMapper tUInterfaceCrashLogMapper;
+
+    /**
+     * 查询接口崩溃日志
+     *
+     * @param id 接口崩溃日志ID
+     * @return 接口崩溃日志
+     */
+    @Override
+    public TUInterfaceCrashLog selectTUInterfaceCrashLogById(String id)
+    {
+        return tUInterfaceCrashLogMapper.selectTUInterfaceCrashLogById(id);
+    }
+
+    /**
+     * 查询接口崩溃日志列表
+     *
+     * @param tUInterfaceCrashLog 接口崩溃日志
+     * @return 接口崩溃日志
+     */
+    @Override
+    public List<TUInterfaceCrashLog> selectTUInterfaceCrashLogList(TUInterfaceCrashLog tUInterfaceCrashLog)
+    {
+        return tUInterfaceCrashLogMapper.selectTUInterfaceCrashLogList(tUInterfaceCrashLog);
+    }
+
+    /**
+     * 新增接口崩溃日志
+     *
+     * @param tUInterfaceCrashLog 接口崩溃日志
+     * @return 结果
+     */
+    @Override
+    public int insertTUInterfaceCrashLog(TUInterfaceCrashLog tUInterfaceCrashLog)
+    {
+        tUInterfaceCrashLog.setCreateTime(DateUtils.getNowDate());
+        return tUInterfaceCrashLogMapper.insertTUInterfaceCrashLog(tUInterfaceCrashLog);
+    }
+
+    /**
+     * 修改接口崩溃日志
+     *
+     * @param tUInterfaceCrashLog 接口崩溃日志
+     * @return 结果
+     */
+    @Override
+    public int updateTUInterfaceCrashLog(TUInterfaceCrashLog tUInterfaceCrashLog)
+    {
+        tUInterfaceCrashLog.setUpdateTime(DateUtils.getNowDate());
+        return tUInterfaceCrashLogMapper.updateTUInterfaceCrashLog(tUInterfaceCrashLog);
+    }
+
+    /**
+     * 删除接口崩溃日志对象
+     *
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTUInterfaceCrashLogByIds(String ids)
+    {
+        return tUInterfaceCrashLogMapper.deleteTUInterfaceCrashLogByIds(Convert.toStrArray(ids));
+    }
+
+    /**
+     * 删除接口崩溃日志信息
+     *
+     * @param id 接口崩溃日志ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTUInterfaceCrashLogById(String id)
+    {
+        return tUInterfaceCrashLogMapper.deleteTUInterfaceCrashLogById(id);
+    }
+}

+ 149 - 0
mybusiness/src/main/resources/mapper/system/TUInterfaceCrashLogMapper.xml

@@ -0,0 +1,149 @@
+<?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.sooka.system.mapper.TUInterfaceCrashLogMapper">
+
+    <resultMap type="TUInterfaceCrashLog" id="TUInterfaceCrashLogResult">
+        <result property="id"    column="id"    />
+        <result property="status"    column="status"    />
+        <result property="remark"    column="remark"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="loginUser"    column="login_user"    />
+        <result property="loginName"    column="login_name"    />
+        <result property="interfaceinfoId"    column="interfaceinfo_id"    />
+        <result property="interfaceinfoName"    column="interfaceinfo_name"    />
+        <result property="ipaddress"    column="ipaddress"    />
+        <result property="os"    column="os"    />
+        <result property="platformInterfacetype"    column="platform_interfacetype"    />
+        <result property="browser"    column="browser"    />
+        <result property="param"    column="param"    />
+        <result property="results"    column="results"    />
+        <result property="operationQuantity"    column="operation_quantity"    />
+        <result property="operationStatus"    column="operation_status"    />
+        <result property="exceptionLog"    column="exception_log"    />
+    </resultMap>
+
+    <sql id="selectTUInterfaceCrashLogVo">
+        select id, status, remark, del_flag, create_by, create_time, update_by, update_time, login_user, login_name, interfaceinfo_id, interfaceinfo_name, ipaddress, os, platform_interfacetype, browser, param, results, operation_quantity, operation_status, exception_log from t_u_interface_crash_log
+    </sql>
+
+    <select id="selectTUInterfaceCrashLogList" parameterType="TUInterfaceCrashLog" resultMap="TUInterfaceCrashLogResult">
+        <include refid="selectTUInterfaceCrashLogVo"/>
+        <where>
+            <if test="status != null  and status != ''"> and status = #{status}</if>
+            <if test="loginUser != null "> and login_user = #{loginUser}</if>
+            <if test="loginName != null  and loginName != ''"> and login_name like concat('%', #{loginName}, '%')</if>
+            <if test="interfaceinfoId != null  and interfaceinfoId != ''"> and interfaceinfo_id = #{interfaceinfoId}</if>
+            <if test="interfaceinfoName != null  and interfaceinfoName != ''"> and interfaceinfo_name like concat('%', #{interfaceinfoName}, '%')</if>
+            <if test="ipaddress != null  and ipaddress != ''"> and ipaddress = #{ipaddress}</if>
+            <if test="os != null  and os != ''"> and os = #{os}</if>
+            <if test="platformInterfacetype != null  and platformInterfacetype != ''"> and platform_interfacetype = #{platformInterfacetype}</if>
+            <if test="browser != null  and browser != ''"> and browser = #{browser}</if>
+            <if test="param != null  and param != ''"> and param = #{param}</if>
+            <if test="results != null  and results != ''"> and results = #{results}</if>
+            <if test="operationQuantity != null "> and operation_quantity = #{operationQuantity}</if>
+            <if test="operationStatus != null "> and operation_status = #{operationStatus}</if>
+            <if test="exceptionLog != null  and exceptionLog != ''"> and exception_log = #{exceptionLog}</if>
+        </where>
+        order by create_time desc
+    </select>
+
+    <select id="selectTUInterfaceCrashLogById" parameterType="String" resultMap="TUInterfaceCrashLogResult">
+        <include refid="selectTUInterfaceCrashLogVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertTUInterfaceCrashLog" parameterType="TUInterfaceCrashLog">
+        insert into t_u_interface_crash_log
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="status != null">status,</if>
+            <if test="remark != null">remark,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="loginUser != null">login_user,</if>
+            <if test="loginName != null">login_name,</if>
+            <if test="interfaceinfoId != null">interfaceinfo_id,</if>
+            <if test="interfaceinfoName != null">interfaceinfo_name,</if>
+            <if test="ipaddress != null">ipaddress,</if>
+            <if test="os != null">os,</if>
+            <if test="platformInterfacetype != null">platform_interfacetype,</if>
+            <if test="browser != null">browser,</if>
+            <if test="param != null">param,</if>
+            <if test="results != null">results,</if>
+            <if test="operationQuantity != null">operation_quantity,</if>
+            <if test="operationStatus != null">operation_status,</if>
+            <if test="exceptionLog != null">exception_log,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="status != null">#{status},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="loginUser != null">#{loginUser},</if>
+            <if test="loginName != null">#{loginName},</if>
+            <if test="interfaceinfoId != null">#{interfaceinfoId},</if>
+            <if test="interfaceinfoName != null">#{interfaceinfoName},</if>
+            <if test="ipaddress != null">#{ipaddress},</if>
+            <if test="os != null">#{os},</if>
+            <if test="platformInterfacetype != null">#{platformInterfacetype},</if>
+            <if test="browser != null">#{browser},</if>
+            <if test="param != null">#{param},</if>
+            <if test="results != null">#{results},</if>
+            <if test="operationQuantity != null">#{operationQuantity},</if>
+            <if test="operationStatus != null">#{operationStatus},</if>
+            <if test="exceptionLog != null">#{exceptionLog},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTUInterfaceCrashLog" parameterType="TUInterfaceCrashLog">
+        update t_u_interface_crash_log
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="status != null">status = #{status},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="loginUser != null">login_user = #{loginUser},</if>
+            <if test="loginName != null">login_name = #{loginName},</if>
+            <if test="interfaceinfoId != null">interfaceinfo_id = #{interfaceinfoId},</if>
+            <if test="interfaceinfoName != null">interfaceinfo_name = #{interfaceinfoName},</if>
+            <if test="ipaddress != null">ipaddress = #{ipaddress},</if>
+            <if test="os != null">os = #{os},</if>
+            <if test="platformInterfacetype != null">platform_interfacetype = #{platformInterfacetype},</if>
+            <if test="browser != null">browser = #{browser},</if>
+            <if test="param != null">param = #{param},</if>
+            <if test="results != null">results = #{results},</if>
+            <if test="operationQuantity != null">operation_quantity = #{operationQuantity},</if>
+            <if test="operationStatus != null">operation_status = #{operationStatus},</if>
+            <if test="exceptionLog != null">exception_log = #{exceptionLog},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteTUInterfaceCrashLogById" parameterType="String">
+        delete from t_u_interface_crash_log where id = #{id}
+    </delete>
+
+    <delete id="deleteTUInterfaceCrashLogByIds" parameterType="String">
+        delete from t_u_interface_crash_log where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+</mapper>

+ 215 - 0
mybusiness/src/main/resources/templates/system/crashLog/crashLog.html

@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<head>
+    <th:block th:include="include :: header('接口崩溃日志列表')"/>
+</head>
+<body class="gray-bg">
+<div class="container-div">
+    <div class="row">
+        <div class="col-sm-12 search-collapse">
+            <form id="formId">
+                <div class="select-list">
+                    <ul>
+                        <!--<li>
+                            <label>登录名:</label>
+                            <input type="text" name="loginName"/>
+                        </li>-->
+                        <li>
+                            <label style="width: auto">调用接口名:</label>
+                            <input type="text" name="interfaceinfoName"/>
+                        </li>
+                        <li>
+                            <label style="width: auto">调用结果:</label>
+                            <select name="operationStatus">
+                                <option value="">所有</option>
+                                <option value="1">成功</option>
+                                <option value="0">失败</option>
+                            </select>
+                        </li>
+                        <!--<li>
+                            <label style="width: auto">平台接口类型:</label>
+                            <select name="platformInterfacetype"
+                                    th:with="type=${@dict.getType('platform_interfacetype')}">
+                                <option value="">所有</option>
+                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
+                                        th:value="${dict.dictValue}"></option>
+                            </select>
+                        </li>-->
+                        <li>
+                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
+                                    class="fa fa-search"></i>&nbsp;搜索</a>
+                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
+                                    class="fa fa-refresh"></i>&nbsp;重置</a>
+                        </li>
+                    </ul>
+                </div>
+            </form>
+        </div>
+
+        <div class="btn-group-sm" id="toolbar" role="group">
+            <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:log:export">
+                <i class="fa fa-download"></i> 导出
+            </a>
+        </div>
+        <div class="col-sm-12 select-table table-striped">
+            <table id="bootstrap-table"></table>
+        </div>
+    </div>
+</div>
+<th:block th:include="include :: footer"/>
+<script th:inline="javascript">
+    let viewFlag = [[${@permission.hasPermi('system:log:view')}]];
+    let prefix = ctx + "system/crashLog";
+    let platform_interfacetype_datas = [[${@dict.getType('platform_interfacetype')}]];
+
+    $(function () {
+        var options = {
+            url: prefix + "/list",
+            detailUrl: prefix + "/detail/{id}",
+            exportUrl: prefix + "/export",
+            modalName: "接口崩溃日志",
+            columns: [{
+                checkbox: true
+            },
+                {
+                    field: 'id',
+                    title: '主键ID',
+                    visible: false
+                },
+                {
+                    field: 'status',
+                    title: '状态',
+                    visible: false
+                },
+                {
+                    field: 'remark',
+                    title: '注释',
+                    visible: false
+                },
+                {
+                    field: 'loginUser',
+                    title: '登录人',
+                    visible: false
+                },
+                {
+                    field: 'loginName',
+                    title: '登录名',
+                    visible: false
+                },
+                {
+                    field: 'interfaceinfoId',
+                    title: '调用接口id',
+                    visible: false
+                },
+                {
+                    field: 'interfaceinfoName',
+                    title: '调用接口名'
+                },
+                {
+                    field: 'createTime',
+                    title: '调用时间'
+                },
+                {
+                    field: 'operationStatus',
+                    title: '调用结果',
+                    formatter: function (value,row,index) {
+                        return value == 1 ? '<span class="badge badge-primary">成功</span>' : '<span class="badge badge-danger">失败</span>';
+                    }
+                },
+                {
+                    field: 'exceptionType',
+                    title: '崩溃类型'
+                },
+                {
+                    field: 'exceptionCause',
+                    title: '造成原因'
+                },
+                {
+                    field: 'exceptionExistence',
+                    title: '发生位置'
+                },
+                {
+                    field: 'ipaddress',
+                    title: 'ip地址',
+                    visible: false
+                },
+                {
+                    field: 'os',
+                    title: '操作系统',
+                    cellStyle:formatTableUnit,
+                    formatter: paramsMatter,
+                    visible: false
+                },
+                {
+                    field: 'platformInterfacetype',
+                    title: '平台接口类型',
+                    formatter: function (value, item, index) {
+                        return $.table.selectDictLabel(platform_interfacetype_datas, item.platformInterfacetype);
+                    },
+                    visible: false
+                },
+                {
+                    field: 'browser',
+                    title: '访问浏览器',
+                    visible: false
+                },
+                {
+                    field: 'param',
+                    title: '参数条件',
+                    visible: false
+                },
+                {
+                    field: 'results',
+                    title: '返回结果',
+                    visible: false
+                },
+                {
+                    field: 'operationQuantity',
+                    title: '操作数量',
+                    visible: false
+                },
+                {
+                    field: 'operationStatus',
+                    title: '操作状态',
+                    visible: false
+                },
+                {
+                    field: 'exceptionLog',
+                    title: '异常记录',
+                    visible: false
+                },
+                {
+                    title: '操作',
+                    align: 'center',
+                    formatter: function(value, row, index) {
+                        var actions = [];
+                        actions.push('<a class="btn btn-warning btn-xs ' + viewFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-search"></i>详情</a> ');
+                        return actions.join('');
+                    }
+                }
+            ]
+        };
+        $.table.init(options);
+    });
+
+    //表格超出宽度鼠标悬停显示td内容
+    function paramsMatter(value,row,index) {
+        let span=document.createElement("span");
+        span.setAttribute("title",value);
+        span.innerHTML = value;
+        return span.outerHTML;
+    }
+    //td宽度以及内容超过宽度隐藏
+    function formatTableUnit(value, row, index) {
+        return {
+            css: {
+                "white-space": "nowrap",
+                "text-overflow": "ellipsis",
+                "overflow": "hidden",
+                "max-width":"150px"
+            }
+        }
+    }
+</script>
+</body>
+</html>

+ 119 - 0
mybusiness/src/main/resources/templates/system/crashLog/detail.html

@@ -0,0 +1,119 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('接口崩溃日志')" />
+    <th:block th:include="include :: jsonview-css" />
+    <th:block th:include="include :: bootstrap-select-css" />
+</head>
+<body class="white-bg">
+<div class="wrapper wrapper-content animated fadeInRight ibox-content">
+    <form class="form-horizontal m" id="form-log-edit" th:object="${crashLog}">
+        <input name="id" th:field="*{id}" type="hidden">
+        <div class="form-group">
+            <label class="col-sm-3 control-label">登录人:</label>
+            <div class="col-sm-8">
+                <input name="loginUser" th:disabled="disabled" th:field="*{loginUser}" class="form-control" type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">登录名:</label>
+            <div class="col-sm-8">
+                <input name="loginName" th:disabled="disabled" th:field="*{loginName}" class="form-control" type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">调用接口id:</label>
+            <div class="col-sm-8">
+                <input name="interfaceinfoId" th:disabled="disabled" th:field="*{interfaceinfoId}" class="form-control" type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">调用接口名:</label>
+            <div class="col-sm-8">
+                <input name="interfaceinfoName" th:disabled="disabled" th:field="*{interfaceinfoName}" class="form-control" type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">ip地址:</label>
+            <div class="col-sm-8">
+                <input name="ipaddress" th:disabled="disabled" th:field="*{ipaddress}" class="form-control" type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">操作系统:</label>
+            <div class="col-sm-8">
+                <textarea name="os" class="form-control" style="height:80px;resize:none;" th:field="*{os}" th:readonly="readonly" />
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">平台接口类型:</label>
+            <div class="col-sm-8">
+                <select name="platformInterfacetype" th:disabled="disabled" class="form-control m-b"
+                        th:with="type=${@dict.getType('platform_interfacetype')}">
+                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{platformInterfacetype}"></option>
+                </select>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">访问浏览器:</label>
+            <div class="col-sm-8">
+                <input name="browser" th:disabled="disabled" th:field="*{browser}" class="form-control" type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">参数条件:</label>
+            <div class="col-sm-8">
+                <pre id="param"></pre>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">操作状态:</label>
+            <div class="col-sm-8">
+                <span th:if="${crashLog.operationStatus == 1}" class="badge badge-primary">成功</span>
+                <span th:if="${crashLog.operationStatus == 0}"class="badge badge-danger">失败</span>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">返回结果:</label>
+            <div class="col-sm-8">
+                <pre id="results"></pre>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">异常记录:</label>
+            <div class="col-sm-8">
+                <pre id="exceptionLog"></pre>
+            </div>
+        </div>
+    </form>
+</div>
+<th:block th:include="include :: footer" />
+<th:block th:include="include :: jsonview-js" />
+<script th:inline="javascript">
+    $("#form-log-edit").validate({
+        focusCleanup: true
+    });
+
+    $(function() {
+        let param = [[${crashLog.param}]];
+        if ($.common.isNotEmpty(param) && param.length < 2000) {
+            $("#param").JSONView(param);
+        } else {
+            $("#param").text(param);
+        }
+        let results = [[${crashLog.results}]];
+        if ($.common.isNotEmpty(results) && results.length < 2000) {
+            $("#results").JSONView(results);
+        } else {
+            $("#results").text(results);
+        }
+        let exceptionLog = [[${crashLog.exceptionLog}]];
+        if ($.common.isNotEmpty(exceptionLog) && exceptionLog.length < 2000) {
+            $("#exceptionLog").JSONView(exceptionLog);
+        } else {
+            $("#exceptionLog").text(exceptionLog);
+        }
+    });
+</script>
+</body>
+</html>