Commit abc7c477 by xugaojun

新增错误日志服务

parent 2ae233b5
package com.gic.haoban.manage.service.dao.mapper;
import com.gic.haoban.manage.service.entity.TabHaobanErrorLog;
public interface TabHaobanErrorLogMapper {
int deleteByPrimaryKey(Long id);
int insert(TabHaobanErrorLog record);
int insertSelective(TabHaobanErrorLog record);
TabHaobanErrorLog selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(TabHaobanErrorLog record);
int updateByPrimaryKey(TabHaobanErrorLog record);
}
\ No newline at end of file
package com.gic.haoban.manage.service.entity;
import java.io.Serializable;
import java.util.Date;
/**
* tab_haoban_error_log
* @author
*/
public class TabHaobanErrorLog implements Serializable {
/**
* 主键id
*/
private Long id;
/**
* 企业id
*/
private String enterpriseId;
/**
* 模块描述 例:haoban-commission-service
*/
private String moduleDesc;
/**
* 错误描述,系统错误、参数错误、调用错误
*/
private String errorDesc;
/**
* 错误标识id
*/
private String errorFlagId;
/**
* 错误参数
*/
private String errorParam;
/**
* 备注
*/
private String remark;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
public String getModuleDesc() {
return moduleDesc;
}
public void setModuleDesc(String moduleDesc) {
this.moduleDesc = moduleDesc;
}
public String getErrorDesc() {
return errorDesc;
}
public void setErrorDesc(String errorDesc) {
this.errorDesc = errorDesc;
}
public String getErrorFlagId() {
return errorFlagId;
}
public void setErrorFlagId(String errorFlagId) {
this.errorFlagId = errorFlagId;
}
public String getErrorParam() {
return errorParam;
}
public void setErrorParam(String errorParam) {
this.errorParam = errorParam;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
}
\ No newline at end of file
<?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.gic.haoban.manage.service.dao.mapper.TabHaobanErrorLogMapper">
<resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabHaobanErrorLog">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="enterprise_id" jdbcType="VARCHAR" property="enterpriseId" />
<result column="module_desc" jdbcType="VARCHAR" property="moduleDesc" />
<result column="error_desc" jdbcType="VARCHAR" property="errorDesc" />
<result column="error_flag_id" jdbcType="VARCHAR" property="errorFlagId" />
<result column="error_param" jdbcType="VARCHAR" property="errorParam" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
id, enterprise_id, module_desc, error_desc, error_flag_id, error_param, remark, create_time,
update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_haoban_error_log
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from tab_haoban_error_log
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.gic.haoban.manage.service.entity.TabHaobanErrorLog" useGeneratedKeys="true">
insert into tab_haoban_error_log (id,enterprise_id, module_desc, error_desc,
error_flag_id, error_param, remark,
create_time, update_time)
values (#{id,jdbcType=BIGINT}, #{enterpriseId,jdbcType=VARCHAR}, #{moduleDesc,jdbcType=VARCHAR}, #{errorDesc,jdbcType=VARCHAR},
#{errorFlagId,jdbcType=VARCHAR}, #{errorParam,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.gic.haoban.manage.service.entity.TabHaobanErrorLog" useGeneratedKeys="true">
insert into tab_haoban_error_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="moduleDesc != null">
module_desc,
</if>
<if test="errorDesc != null">
error_desc,
</if>
<if test="errorFlagId != null">
error_flag_id,
</if>
<if test="errorParam != null">
error_param,
</if>
<if test="remark != null">
remark,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=VARCHAR},
</if>
<if test="moduleDesc != null">
#{moduleDesc,jdbcType=VARCHAR},
</if>
<if test="errorDesc != null">
#{errorDesc,jdbcType=VARCHAR},
</if>
<if test="errorFlagId != null">
#{errorFlagId,jdbcType=VARCHAR},
</if>
<if test="errorParam != null">
#{errorParam,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanErrorLog">
update tab_haoban_error_log
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if>
<if test="moduleDesc != null">
module_desc = #{moduleDesc,jdbcType=VARCHAR},
</if>
<if test="errorDesc != null">
error_desc = #{errorDesc,jdbcType=VARCHAR},
</if>
<if test="errorFlagId != null">
error_flag_id = #{errorFlagId,jdbcType=VARCHAR},
</if>
<if test="errorParam != null">
error_param = #{errorParam,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabHaobanErrorLog">
update tab_haoban_error_log
set enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
module_desc = #{moduleDesc,jdbcType=VARCHAR},
error_desc = #{errorDesc,jdbcType=VARCHAR},
error_flag_id = #{errorFlagId,jdbcType=VARCHAR},
error_param = #{errorParam,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</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