parent
649f85cc65
commit
6565707338
@ -1,45 +0,0 @@
|
||||
package com.infincash.statistics.risk.table.stats;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class TStatsRiskDetail {
|
||||
private Long id;
|
||||
|
||||
private Date statsTime;
|
||||
|
||||
private Integer aHourCount;
|
||||
|
||||
private String riskRuleId;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Date getStatsTime() {
|
||||
return statsTime;
|
||||
}
|
||||
|
||||
public void setStatsTime(Date statsTime) {
|
||||
this.statsTime = statsTime;
|
||||
}
|
||||
|
||||
public Integer getaHourCount() {
|
||||
return aHourCount;
|
||||
}
|
||||
|
||||
public void setaHourCount(Integer aHourCount) {
|
||||
this.aHourCount = aHourCount;
|
||||
}
|
||||
|
||||
public String getRiskRuleId() {
|
||||
return riskRuleId;
|
||||
}
|
||||
|
||||
public void setRiskRuleId(String riskRuleId) {
|
||||
this.riskRuleId = riskRuleId == null ? null : riskRuleId.trim();
|
||||
}
|
||||
}
|
@ -1,52 +1,20 @@
|
||||
<?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.infincash.statistics.risk.mapper.stats.TStatsRiskDetailMapper">
|
||||
<resultMap id="BaseResultMap" type="com.infincash.statistics.risk.table.stats.TStatsRiskDetail">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="stats_time" jdbcType="TIMESTAMP" property="statsTime" />
|
||||
<result column="a_hour_count" jdbcType="INTEGER" property="aHourCount" />
|
||||
<result column="risk_rule_id" jdbcType="VARCHAR" property="riskRuleId" />
|
||||
<resultMap id="BaseResultMap" type="com.infincash.statistics.risk.table.prd.extend.RiskStatsDTO">
|
||||
<result property="riskRuleId" column="risk_rule_id" />
|
||||
<result property="count" column="count1" />
|
||||
<result property="time" column="time" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, stats_time, a_hour_count, risk_rule_id
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from t_stats_risk_detail
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.infincash.statistics.risk.table.stats.TStatsRiskDetail">
|
||||
insert into t_stats_risk_detail (id, stats_time, a_hour_count,
|
||||
risk_rule_id)
|
||||
values (#{id,jdbcType=BIGINT}, #{statsTime,jdbcType=TIMESTAMP}, #{aHourCount,jdbcType=INTEGER},
|
||||
#{riskRuleId,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch" parameterType="com.infincash.statistics.risk.table.stats.TStatsRiskDetail">
|
||||
|
||||
<insert id="insertBatch" parameterType="java.util.List">
|
||||
insert into t_stats_risk_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="statsTime != null">
|
||||
stats_time,
|
||||
</if>
|
||||
<if test="aHourCount != null">
|
||||
a_hour_count,
|
||||
</if>
|
||||
<if test="riskRuleId != null">
|
||||
risk_rule_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="statsTime != null">
|
||||
#{statsTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="aHourCount != null">
|
||||
#{aHourCount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="riskRuleId != null">
|
||||
#{riskRuleId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
(stats_time, a_hour_count, risk_rule_id)
|
||||
VALUES
|
||||
<foreach collection ="list" item="oneItem" index= "index" separator =",">
|
||||
(
|
||||
#{oneItem.time}, #{oneItem.count},#{oneItem.riskRuleId}
|
||||
)
|
||||
</foreach >
|
||||
</insert>
|
||||
</mapper>
|
Loading…
Reference in new issue