Commit 96b22efd by 陶湘宇

APP异常捕获

parent dabcf896
package cn.timer.api.bean.qyzx;
import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.dto.login.QysDto;
import cn.timer.api.dto.qyzx.MenuStructureDto;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.Columns;
import javax.persistence.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* @author tao 2023-6-11
*/
@Entity
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "app_exception_erro")
@ApiModel("APP异常错误表")
public class AppExceptionErro {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value="编号",example="101")
private Integer id;
@ApiModelProperty(value="异常日志")
@Column(name ="errolog" ,columnDefinition="TEXT", nullable=true)
private String errolog;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getErrolog() {
return errolog;
}
public void setErrolog(String errolog) {
this.errolog = errolog;
}
}
\ No newline at end of file
......@@ -13,6 +13,8 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import cn.timer.api.bean.qyzx.*;
import cn.timer.api.dao.qyzx.APPErroMapper;
import cn.timer.api.utils.redis.RedisUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -48,11 +50,6 @@ import cn.timer.api.bean.kqmk.KqglAssoOvertimeBasics;
import cn.timer.api.bean.kqmk.KqglAssoOvertimeRules;
import cn.timer.api.bean.kqmk.KqglAssoOvertimeRulesM;
import cn.timer.api.bean.qyxx.CmsContent;
import cn.timer.api.bean.qyzx.QyzxAdminColour;
import cn.timer.api.bean.qyzx.QyzxAdminMenu;
import cn.timer.api.bean.qyzx.QyzxEmpEntAsso;
import cn.timer.api.bean.qyzx.QyzxEmpLogin;
import cn.timer.api.bean.qyzx.QyzxEntInfoM;
import cn.timer.api.bean.xcgl.XcglAssoBszqsz;
import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.bean.zzgl.ZzglAuth;
......@@ -158,6 +155,8 @@ public class LoginController {
@Autowired
private QyzxEmpLoginMapper qyzxEmpLoginMapper;
@Autowired
private APPErroMapper appErroMapper;
@Autowired
private QyzxEmpEntAssoMapper qyzxEmpEntAssoMapper;
......@@ -272,10 +271,18 @@ public class LoginController {
return ResultUtil.error("发送验证码失败");
}
}
@PostMapping(value = "/apperro")
@ApiOperation(value = "1.收集APP异常", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 1)
@Log(title = "收集APP异常", businessType = BusinessType.SEND_CODE)
public Result<String> sendCode(@RequestBody String errolog) {
AppExceptionErro e=new AppExceptionErro();
e.setErrolog(errolog);
appErroMapper.insert(e);
return ResultUtil.success();
}
/**
* 发送验证码
*
* @param entRegisterDto
* @return
*/
......
package cn.timer.api.dao.qyzx;
import cn.timer.api.bean.qyzx.AppExceptionErro;
import cn.timer.api.bean.qyzx.QyzxEmpLogin;
import cn.timer.api.dto.login.QysDto;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* 员工登录表
* @author Tang 2019-11-11
*/
@Repository
public interface APPErroMapper extends BaseMapper<AppExceptionErro> {
}
<?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="cn.timer.api.dao.qyzx.APPErroMapper">
<resultMap id="EntMap" type="cn.timer.api.bean.qyzx.AppExceptionErro" >
<result column="id" property="id" />
<result column="errolog" property="errolog" />
</resultMap>
</mapper>
\ 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