You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
udi-spms-java/src/main/resources/mybatis/mapper/basic/ThirdAliDrugMapper.xml

212 lines
6.7 KiB
XML

<?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.glxp.api.dao.basic.ThirdAliDrugMapper">
<resultMap id="BaseResultMap" type="com.glxp.api.entity.thrsys.ThirdAliDrug">
<!--@mbg.generated-->
<!--@Table third_ali_drug-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="manufacturer" jdbcType="VARCHAR" property="manufacturer" />
<result column="cpmctymc" jdbcType="VARCHAR" property="cpmctymc" />
<result column="form" jdbcType="VARCHAR" property="form" />
<result column="formSpec" jdbcType="VARCHAR" property="formSpec" />
<result column="bzgg" jdbcType="VARCHAR" property="bzgg" />
<result column="spmc" jdbcType="VARCHAR" property="spmc" />
<result column="nameCode" jdbcType="VARCHAR" property="nameCode" />
<result column="packRatio" jdbcType="VARCHAR" property="packRatio" />
<result column="packLevel" jdbcType="VARCHAR" property="packLevel" />
<result column="createTime" jdbcType="TIMESTAMP" property="createTime" />
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, `type`, manufacturer, cpmctymc, form, formSpec, bzgg, spmc, nameCode, packRatio,
packLevel, createTime, updateTime
</sql>
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.glxp.api.entity.thrsys.ThirdAliDrug" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into third_ali_drug
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
`type`,
manufacturer,
cpmctymc,
form,
formSpec,
bzgg,
spmc,
nameCode,
packRatio,
packLevel,
createTime,
updateTime,
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
#{type,jdbcType=VARCHAR},
#{manufacturer,jdbcType=VARCHAR},
#{cpmctymc,jdbcType=VARCHAR},
#{form,jdbcType=VARCHAR},
#{formSpec,jdbcType=VARCHAR},
#{bzgg,jdbcType=VARCHAR},
#{spmc,jdbcType=VARCHAR},
#{nameCode,jdbcType=VARCHAR},
#{packRatio,jdbcType=VARCHAR},
#{packLevel,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP},
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=INTEGER},
</if>
`type` = #{type,jdbcType=VARCHAR},
manufacturer = #{manufacturer,jdbcType=VARCHAR},
cpmctymc = #{cpmctymc,jdbcType=VARCHAR},
form = #{form,jdbcType=VARCHAR},
formSpec = #{formSpec,jdbcType=VARCHAR},
bzgg = #{bzgg,jdbcType=VARCHAR},
spmc = #{spmc,jdbcType=VARCHAR},
nameCode = #{nameCode,jdbcType=VARCHAR},
packRatio = #{packRatio,jdbcType=VARCHAR},
packLevel = #{packLevel,jdbcType=VARCHAR},
createTime = #{createTime,jdbcType=TIMESTAMP},
updateTime = #{updateTime,jdbcType=TIMESTAMP},
</trim>
</insert>
<insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id" parameterType="com.glxp.api.entity.thrsys.ThirdAliDrug" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into third_ali_drug
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="type != null">
`type`,
</if>
<if test="manufacturer != null">
manufacturer,
</if>
<if test="cpmctymc != null">
cpmctymc,
</if>
<if test="form != null">
form,
</if>
<if test="formSpec != null">
formSpec,
</if>
<if test="bzgg != null">
bzgg,
</if>
<if test="spmc != null">
spmc,
</if>
<if test="nameCode != null">
nameCode,
</if>
<if test="packRatio != null">
packRatio,
</if>
<if test="packLevel != null">
packLevel,
</if>
<if test="createTime != null">
createTime,
</if>
<if test="updateTime != null">
updateTime,
</if>
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="manufacturer != null">
#{manufacturer,jdbcType=VARCHAR},
</if>
<if test="cpmctymc != null">
#{cpmctymc,jdbcType=VARCHAR},
</if>
<if test="form != null">
#{form,jdbcType=VARCHAR},
</if>
<if test="formSpec != null">
#{formSpec,jdbcType=VARCHAR},
</if>
<if test="bzgg != null">
#{bzgg,jdbcType=VARCHAR},
</if>
<if test="spmc != null">
#{spmc,jdbcType=VARCHAR},
</if>
<if test="nameCode != null">
#{nameCode,jdbcType=VARCHAR},
</if>
<if test="packRatio != null">
#{packRatio,jdbcType=VARCHAR},
</if>
<if test="packLevel != null">
#{packLevel,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=INTEGER},
</if>
<if test="type != null">
`type` = #{type,jdbcType=VARCHAR},
</if>
<if test="manufacturer != null">
manufacturer = #{manufacturer,jdbcType=VARCHAR},
</if>
<if test="cpmctymc != null">
cpmctymc = #{cpmctymc,jdbcType=VARCHAR},
</if>
<if test="form != null">
form = #{form,jdbcType=VARCHAR},
</if>
<if test="formSpec != null">
formSpec = #{formSpec,jdbcType=VARCHAR},
</if>
<if test="bzgg != null">
bzgg = #{bzgg,jdbcType=VARCHAR},
</if>
<if test="spmc != null">
spmc = #{spmc,jdbcType=VARCHAR},
</if>
<if test="nameCode != null">
nameCode = #{nameCode,jdbcType=VARCHAR},
</if>
<if test="packRatio != null">
packRatio = #{packRatio,jdbcType=VARCHAR},
</if>
<if test="packLevel != null">
packLevel = #{packLevel,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
createTime = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
updateTime = #{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
</mapper>