parent
3d23e0cfba
commit
8f087cefb5
@ -0,0 +1,31 @@ |
|||||||
|
package com.dxhy.extend.dao; |
||||||
|
|
||||||
|
|
||||||
|
import com.dxhy.extend.entity.GsClient; |
||||||
|
import org.apache.ibatis.annotations.Mapper; |
||||||
|
import org.apache.ibatis.annotations.Param; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
@Mapper |
||||||
|
public interface GsClientMapper { |
||||||
|
int deleteByPrimaryKey(Integer id); |
||||||
|
|
||||||
|
int deleteAll(); |
||||||
|
|
||||||
|
int insert(GsClient record); |
||||||
|
|
||||||
|
int insertSelective(GsClient record); |
||||||
|
|
||||||
|
int insertList(@Param("list") List<GsClient> recordList); |
||||||
|
|
||||||
|
GsClient selectByPrimaryKey(Integer id); |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
List<GsClient> selectByGsdm(String gsdm); |
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(GsClient record); |
||||||
|
|
||||||
|
int updateByPrimaryKey(GsClient record); |
||||||
|
} |
@ -0,0 +1,19 @@ |
|||||||
|
package com.dxhy.extend.entity; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
@Data |
||||||
|
public class GsClient { |
||||||
|
private Integer id; |
||||||
|
|
||||||
|
private String gsdm; |
||||||
|
|
||||||
|
private String gsmc; |
||||||
|
|
||||||
|
private String client; |
||||||
|
|
||||||
|
private Date createTime; |
||||||
|
|
||||||
|
} |
@ -0,0 +1,111 @@ |
|||||||
|
<?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.extend.dao.GsClientMapper" > |
||||||
|
<resultMap id="BaseResultMap" type="com.dxhy.extend.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> |
Loading…
Reference in new issue