Commit 7b775fea by jianan

ag_acl_customer_system_log

parent 75d0e3cb
package com.yd.dal.entity.customer;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* ag_acl_customer_system_log
* @author
*/
@Data
public class AclCustomerSystemLog implements Serializable {
/**
* 记录ID
*/
private Long id;
/**
* 客户ID
*/
private Long customerId;
/**
* 登录token
*/
private String token;
/**
* 客户使用IP
*/
private String customerIp;
/**
* 客户使用来源
*/
private String customerHostname;
/**
* 监控系统(1: 银盾经纪; 2: 银盾在线; 3: AGMS; 4: Goup)
*/
private String fromSystem;
/**
* 开始使用时间
*/
private Date startTime;
/**
* 结束使用时间
*/
private Date endTime;
/**
* 是否启用(0=No, 1=Yes)
*/
private Integer isActive;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.yd.dal.mapper.customer;
import com.yd.dal.entity.customer.AclCustomerSystemLog;
public interface AclCustomerSystemLogMapper {
int deleteByPrimaryKey(Long id);
int insert(AclCustomerSystemLog record);
int insertSelective(AclCustomerSystemLog record);
AclCustomerSystemLog selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(AclCustomerSystemLog record);
int updateByPrimaryKey(AclCustomerSystemLog record);
}
\ 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.yd.dal.mapper.customer.AclCustomerSystemLogMapper">
<resultMap id="BaseResultMap" type="com.yd.dal.entity.customer.AclCustomerSystemLog">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="customer_id" jdbcType="BIGINT" property="customerId" />
<result column="token" jdbcType="VARCHAR" property="token" />
<result column="customer_ip" jdbcType="VARCHAR" property="customerIp" />
<result column="customer_hostname" jdbcType="VARCHAR" property="customerHostname" />
<result column="from_system" jdbcType="VARCHAR" property="fromSystem" />
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
<result column="is_active" jdbcType="INTEGER" property="isActive" />
</resultMap>
<sql id="Base_Column_List">
id, customer_id, token, customer_ip, customer_hostname, from_system, start_time,
end_time, is_active
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ag_acl_customer_system_log
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from ag_acl_customer_system_log
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.customer.AclCustomerSystemLog" useGeneratedKeys="true">
insert into ag_acl_customer_system_log (customer_id, token, customer_ip,
customer_hostname, from_system, start_time,
end_time, is_active)
values (#{customerId,jdbcType=BIGINT}, #{token,jdbcType=VARCHAR}, #{customerIp,jdbcType=VARCHAR},
#{customerHostname,jdbcType=VARCHAR}, #{fromSystem,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP},
#{endTime,jdbcType=TIMESTAMP}, #{isActive,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.customer.AclCustomerSystemLog" useGeneratedKeys="true">
insert into ag_acl_customer_system_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="customerId != null">
customer_id,
</if>
<if test="token != null">
token,
</if>
<if test="customerIp != null">
customer_ip,
</if>
<if test="customerHostname != null">
customer_hostname,
</if>
<if test="fromSystem != null">
from_system,
</if>
<if test="startTime != null">
start_time,
</if>
<if test="endTime != null">
end_time,
</if>
<if test="isActive != null">
is_active,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="customerId != null">
#{customerId,jdbcType=BIGINT},
</if>
<if test="token != null">
#{token,jdbcType=VARCHAR},
</if>
<if test="customerIp != null">
#{customerIp,jdbcType=VARCHAR},
</if>
<if test="customerHostname != null">
#{customerHostname,jdbcType=VARCHAR},
</if>
<if test="fromSystem != null">
#{fromSystem,jdbcType=VARCHAR},
</if>
<if test="startTime != null">
#{startTime,jdbcType=TIMESTAMP},
</if>
<if test="endTime != null">
#{endTime,jdbcType=TIMESTAMP},
</if>
<if test="isActive != null">
#{isActive,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yd.dal.entity.customer.AclCustomerSystemLog">
update ag_acl_customer_system_log
<set>
<if test="customerId != null">
customer_id = #{customerId,jdbcType=BIGINT},
</if>
<if test="token != null">
token = #{token,jdbcType=VARCHAR},
</if>
<if test="customerIp != null">
customer_ip = #{customerIp,jdbcType=VARCHAR},
</if>
<if test="customerHostname != null">
customer_hostname = #{customerHostname,jdbcType=VARCHAR},
</if>
<if test="fromSystem != null">
from_system = #{fromSystem,jdbcType=VARCHAR},
</if>
<if test="startTime != null">
start_time = #{startTime,jdbcType=TIMESTAMP},
</if>
<if test="endTime != null">
end_time = #{endTime,jdbcType=TIMESTAMP},
</if>
<if test="isActive != null">
is_active = #{isActive,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.yd.dal.entity.customer.AclCustomerSystemLog">
update ag_acl_customer_system_log
set customer_id = #{customerId,jdbcType=BIGINT},
token = #{token,jdbcType=VARCHAR},
customer_ip = #{customerIp,jdbcType=VARCHAR},
customer_hostname = #{customerHostname,jdbcType=VARCHAR},
from_system = #{fromSystem,jdbcType=VARCHAR},
start_time = #{startTime,jdbcType=TIMESTAMP},
end_time = #{endTime,jdbcType=TIMESTAMP},
is_active = #{isActive,jdbcType=INTEGER}
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