You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
111 lines
3.8 KiB
111 lines
3.8 KiB
<?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.dxhy.core.dao.GsClientMapper" >
|
|
<resultMap id="BaseResultMap" type="com.dxhy.core.entity.GsClient" >
|
|
<id column="id" property="id" jdbcType="INTEGER" />
|
|
<result column="gsdm" property="gsdm" jdbcType="VARCHAR" />
|
|
<result column="gsmc" property="gsmc" jdbcType="VARCHAR" />
|
|
<result column="client" property="client" jdbcType="VARCHAR" />
|
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
|
</resultMap>
|
|
<sql id="Base_Column_List" >
|
|
id, gsdm, gsmc, client, create_time
|
|
</sql>
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
from gs_client
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</select>
|
|
<select id="selectByGsdm" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
from gs_client
|
|
where gsdm = #{gsdm,jdbcType=VARCHAR}
|
|
</select>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
|
delete from gs_client
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</delete>
|
|
<delete id="deleteAll" >
|
|
delete from gs_client
|
|
</delete>
|
|
<insert id="insert" parameterType="com.dxhy.core.entity.GsClient" >
|
|
insert into gs_client (id, gsdm, gsmc,
|
|
client, create_time)
|
|
values (#{id,jdbcType=INTEGER}, #{gsdm,jdbcType=VARCHAR}, #{gsmc,jdbcType=VARCHAR},
|
|
#{client,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.dxhy.core.entity.GsClient" >
|
|
insert into gs_client
|
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
|
<if test="id != null" >
|
|
id,
|
|
</if>
|
|
<if test="gsdm != null" >
|
|
gsdm,
|
|
</if>
|
|
<if test="gsmc != null" >
|
|
gsmc,
|
|
</if>
|
|
<if test="client != null" >
|
|
client,
|
|
</if>
|
|
<if test="createTime != null" >
|
|
create_time,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
<if test="id != null" >
|
|
#{id,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="gsdm != null" >
|
|
#{gsdm,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="gsmc != null" >
|
|
#{gsmc,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="client != null" >
|
|
#{client,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="createTime != null" >
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.dxhy.core.entity.GsClient" >
|
|
update gs_client
|
|
<set >
|
|
<if test="gsdm != null" >
|
|
gsdm = #{gsdm,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="gsmc != null" >
|
|
gsmc = #{gsmc,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="client != null" >
|
|
client = #{client,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="createTime != null" >
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
</set>
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="com.dxhy.core.entity.GsClient" >
|
|
update gs_client
|
|
set gsdm = #{gsdm,jdbcType=VARCHAR},
|
|
gsmc = #{gsmc,jdbcType=VARCHAR},
|
|
client = #{client,jdbcType=VARCHAR},
|
|
create_time = #{createTime,jdbcType=TIMESTAMP}
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</update>
|
|
<insert id="insertList" parameterType="java.util.List" useGeneratedKeys="false">
|
|
insert into gs_client (gsdm,gsmc,client,create_time)
|
|
values
|
|
<foreach collection="list" item="item" index="index"
|
|
separator=",">
|
|
(#{item.gsdm,jdbcType=VARCHAR}, #{item.gsmc,jdbcType=VARCHAR},
|
|
#{item.client,jdbcType=VARCHAR},#{item.createTime,jdbcType=TIMESTAMP})
|
|
</foreach>
|
|
</insert>
|
|
</mapper> |