|
|
@ -1,7 +1,7 @@ |
|
|
|
<?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.ccsens.ptos_tall.persist.mapper.SysBusinessMapper"> |
|
|
|
<resultMap id="BaseResultMap" type="com.ccsens.ptos_tall.bean.po.SysBusiness"> |
|
|
|
<mapper namespace="com.ccsens.ptos_tall.persist.mapper.OpenBusinessMapper"> |
|
|
|
<resultMap id="BaseResultMap" type="com.ccsens.ptos_tall.bean.po.OpenBusiness"> |
|
|
|
<id column="id" jdbcType="BIGINT" property="id" /> |
|
|
|
<result column="name" jdbcType="VARCHAR" property="name" /> |
|
|
|
<result column="code" jdbcType="VARCHAR" property="code" /> |
|
|
@ -13,6 +13,9 @@ |
|
|
|
<result column="last_ask_time" jdbcType="BIGINT" property="lastAskTime" /> |
|
|
|
<result column="last_answer_time" jdbcType="BIGINT" property="lastAnswerTime" /> |
|
|
|
<result column="type" jdbcType="TINYINT" property="type" /> |
|
|
|
<result column="pub" jdbcType="TINYINT" property="pub" /> |
|
|
|
<result column="start_using" jdbcType="TINYINT" property="startUsing" /> |
|
|
|
<result column="debug" jdbcType="TINYINT" property="debug" /> |
|
|
|
<result column="operator" jdbcType="BIGINT" property="operator" /> |
|
|
|
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
|
|
|
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
|
|
@ -78,15 +81,15 @@ |
|
|
|
</sql> |
|
|
|
<sql id="Base_Column_List"> |
|
|
|
id, name, code, description, url, app_id, secret, creator_id, last_ask_time, last_answer_time, |
|
|
|
type, operator, created_at, updated_at, rec_status |
|
|
|
type, pub, start_using, debug, operator, created_at, updated_at, rec_status |
|
|
|
</sql> |
|
|
|
<select id="selectByExample" parameterType="com.ccsens.ptos_tall.bean.po.SysBusinessExample" resultMap="BaseResultMap"> |
|
|
|
<select id="selectByExample" parameterType="com.ccsens.ptos_tall.bean.po.OpenBusinessExample" resultMap="BaseResultMap"> |
|
|
|
select |
|
|
|
<if test="distinct"> |
|
|
|
distinct |
|
|
|
</if> |
|
|
|
<include refid="Base_Column_List" /> |
|
|
|
from t_sys_business |
|
|
|
from t_open_business |
|
|
|
<if test="_parameter != null"> |
|
|
|
<include refid="Example_Where_Clause" /> |
|
|
|
</if> |
|
|
@ -97,35 +100,37 @@ |
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
|
|
|
select |
|
|
|
<include refid="Base_Column_List" /> |
|
|
|
from t_sys_business |
|
|
|
from t_open_business |
|
|
|
where id = #{id,jdbcType=BIGINT} |
|
|
|
</select> |
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|
|
|
delete from t_sys_business |
|
|
|
delete from t_open_business |
|
|
|
where id = #{id,jdbcType=BIGINT} |
|
|
|
</delete> |
|
|
|
<delete id="deleteByExample" parameterType="com.ccsens.ptos_tall.bean.po.SysBusinessExample"> |
|
|
|
delete from t_sys_business |
|
|
|
<delete id="deleteByExample" parameterType="com.ccsens.ptos_tall.bean.po.OpenBusinessExample"> |
|
|
|
delete from t_open_business |
|
|
|
<if test="_parameter != null"> |
|
|
|
<include refid="Example_Where_Clause" /> |
|
|
|
</if> |
|
|
|
</delete> |
|
|
|
<insert id="insert" parameterType="com.ccsens.ptos_tall.bean.po.SysBusiness"> |
|
|
|
insert into t_sys_business (id, name, code, |
|
|
|
<insert id="insert" parameterType="com.ccsens.ptos_tall.bean.po.OpenBusiness"> |
|
|
|
insert into t_open_business (id, name, code, |
|
|
|
description, url, app_id, |
|
|
|
secret, creator_id, last_ask_time, |
|
|
|
last_answer_time, type, operator, |
|
|
|
last_answer_time, type, pub, |
|
|
|
start_using, debug, operator, |
|
|
|
created_at, updated_at, rec_status |
|
|
|
) |
|
|
|
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, |
|
|
|
#{description,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{appId,jdbcType=VARCHAR}, |
|
|
|
#{secret,jdbcType=VARCHAR}, #{creatorId,jdbcType=BIGINT}, #{lastAskTime,jdbcType=BIGINT}, |
|
|
|
#{lastAnswerTime,jdbcType=BIGINT}, #{type,jdbcType=TINYINT}, #{operator,jdbcType=BIGINT}, |
|
|
|
#{lastAnswerTime,jdbcType=BIGINT}, #{type,jdbcType=TINYINT}, #{pub,jdbcType=TINYINT}, |
|
|
|
#{startUsing,jdbcType=TINYINT}, #{debug,jdbcType=TINYINT}, #{operator,jdbcType=BIGINT}, |
|
|
|
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} |
|
|
|
) |
|
|
|
</insert> |
|
|
|
<insert id="insertSelective" parameterType="com.ccsens.ptos_tall.bean.po.SysBusiness"> |
|
|
|
insert into t_sys_business |
|
|
|
<insert id="insertSelective" parameterType="com.ccsens.ptos_tall.bean.po.OpenBusiness"> |
|
|
|
insert into t_open_business |
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
|
|
<if test="id != null"> |
|
|
|
id, |
|
|
@ -160,6 +165,15 @@ |
|
|
|
<if test="type != null"> |
|
|
|
type, |
|
|
|
</if> |
|
|
|
<if test="pub != null"> |
|
|
|
pub, |
|
|
|
</if> |
|
|
|
<if test="startUsing != null"> |
|
|
|
start_using, |
|
|
|
</if> |
|
|
|
<if test="debug != null"> |
|
|
|
debug, |
|
|
|
</if> |
|
|
|
<if test="operator != null"> |
|
|
|
operator, |
|
|
|
</if> |
|
|
@ -207,6 +221,15 @@ |
|
|
|
<if test="type != null"> |
|
|
|
#{type,jdbcType=TINYINT}, |
|
|
|
</if> |
|
|
|
<if test="pub != null"> |
|
|
|
#{pub,jdbcType=TINYINT}, |
|
|
|
</if> |
|
|
|
<if test="startUsing != null"> |
|
|
|
#{startUsing,jdbcType=TINYINT}, |
|
|
|
</if> |
|
|
|
<if test="debug != null"> |
|
|
|
#{debug,jdbcType=TINYINT}, |
|
|
|
</if> |
|
|
|
<if test="operator != null"> |
|
|
|
#{operator,jdbcType=BIGINT}, |
|
|
|
</if> |
|
|
@ -221,14 +244,14 @@ |
|
|
|
</if> |
|
|
|
</trim> |
|
|
|
</insert> |
|
|
|
<select id="countByExample" parameterType="com.ccsens.ptos_tall.bean.po.SysBusinessExample" resultType="java.lang.Long"> |
|
|
|
select count(*) from t_sys_business |
|
|
|
<select id="countByExample" parameterType="com.ccsens.ptos_tall.bean.po.OpenBusinessExample" resultType="java.lang.Long"> |
|
|
|
select count(*) from t_open_business |
|
|
|
<if test="_parameter != null"> |
|
|
|
<include refid="Example_Where_Clause" /> |
|
|
|
</if> |
|
|
|
</select> |
|
|
|
<update id="updateByExampleSelective" parameterType="map"> |
|
|
|
update t_sys_business |
|
|
|
update t_open_business |
|
|
|
<set> |
|
|
|
<if test="record.id != null"> |
|
|
|
id = #{record.id,jdbcType=BIGINT}, |
|
|
@ -263,6 +286,15 @@ |
|
|
|
<if test="record.type != null"> |
|
|
|
type = #{record.type,jdbcType=TINYINT}, |
|
|
|
</if> |
|
|
|
<if test="record.pub != null"> |
|
|
|
pub = #{record.pub,jdbcType=TINYINT}, |
|
|
|
</if> |
|
|
|
<if test="record.startUsing != null"> |
|
|
|
start_using = #{record.startUsing,jdbcType=TINYINT}, |
|
|
|
</if> |
|
|
|
<if test="record.debug != null"> |
|
|
|
debug = #{record.debug,jdbcType=TINYINT}, |
|
|
|
</if> |
|
|
|
<if test="record.operator != null"> |
|
|
|
operator = #{record.operator,jdbcType=BIGINT}, |
|
|
|
</if> |
|
|
@ -281,7 +313,7 @@ |
|
|
|
</if> |
|
|
|
</update> |
|
|
|
<update id="updateByExample" parameterType="map"> |
|
|
|
update t_sys_business |
|
|
|
update t_open_business |
|
|
|
set id = #{record.id,jdbcType=BIGINT}, |
|
|
|
name = #{record.name,jdbcType=VARCHAR}, |
|
|
|
code = #{record.code,jdbcType=VARCHAR}, |
|
|
@ -293,6 +325,9 @@ |
|
|
|
last_ask_time = #{record.lastAskTime,jdbcType=BIGINT}, |
|
|
|
last_answer_time = #{record.lastAnswerTime,jdbcType=BIGINT}, |
|
|
|
type = #{record.type,jdbcType=TINYINT}, |
|
|
|
pub = #{record.pub,jdbcType=TINYINT}, |
|
|
|
start_using = #{record.startUsing,jdbcType=TINYINT}, |
|
|
|
debug = #{record.debug,jdbcType=TINYINT}, |
|
|
|
operator = #{record.operator,jdbcType=BIGINT}, |
|
|
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|
|
|
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|
|
@ -301,8 +336,8 @@ |
|
|
|
<include refid="Update_By_Example_Where_Clause" /> |
|
|
|
</if> |
|
|
|
</update> |
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ptos_tall.bean.po.SysBusiness"> |
|
|
|
update t_sys_business |
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ptos_tall.bean.po.OpenBusiness"> |
|
|
|
update t_open_business |
|
|
|
<set> |
|
|
|
<if test="name != null"> |
|
|
|
name = #{name,jdbcType=VARCHAR}, |
|
|
@ -334,6 +369,15 @@ |
|
|
|
<if test="type != null"> |
|
|
|
type = #{type,jdbcType=TINYINT}, |
|
|
|
</if> |
|
|
|
<if test="pub != null"> |
|
|
|
pub = #{pub,jdbcType=TINYINT}, |
|
|
|
</if> |
|
|
|
<if test="startUsing != null"> |
|
|
|
start_using = #{startUsing,jdbcType=TINYINT}, |
|
|
|
</if> |
|
|
|
<if test="debug != null"> |
|
|
|
debug = #{debug,jdbcType=TINYINT}, |
|
|
|
</if> |
|
|
|
<if test="operator != null"> |
|
|
|
operator = #{operator,jdbcType=BIGINT}, |
|
|
|
</if> |
|
|
@ -349,8 +393,8 @@ |
|
|
|
</set> |
|
|
|
where id = #{id,jdbcType=BIGINT} |
|
|
|
</update> |
|
|
|
<update id="updateByPrimaryKey" parameterType="com.ccsens.ptos_tall.bean.po.SysBusiness"> |
|
|
|
update t_sys_business |
|
|
|
<update id="updateByPrimaryKey" parameterType="com.ccsens.ptos_tall.bean.po.OpenBusiness"> |
|
|
|
update t_open_business |
|
|
|
set name = #{name,jdbcType=VARCHAR}, |
|
|
|
code = #{code,jdbcType=VARCHAR}, |
|
|
|
description = #{description,jdbcType=VARCHAR}, |
|
|
@ -361,6 +405,9 @@ |
|
|
|
last_ask_time = #{lastAskTime,jdbcType=BIGINT}, |
|
|
|
last_answer_time = #{lastAnswerTime,jdbcType=BIGINT}, |
|
|
|
type = #{type,jdbcType=TINYINT}, |
|
|
|
pub = #{pub,jdbcType=TINYINT}, |
|
|
|
start_using = #{startUsing,jdbcType=TINYINT}, |
|
|
|
debug = #{debug,jdbcType=TINYINT}, |
|
|
|
operator = #{operator,jdbcType=BIGINT}, |
|
|
|
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|
|
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |