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.
399 lines
13 KiB
XML
399 lines
13 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.udi.admin.dao.inout.DruginfoMapper">
|
|
<resultMap id="BaseResultMap" type="com.glxp.udi.admin.entity.inout.Druginfo">
|
|
<id column="nameCode" jdbcType="VARCHAR" property="namecode" />
|
|
<result column="type" jdbcType="VARCHAR" property="type" />
|
|
<result column="unit" jdbcType="VARCHAR" property="unit" />
|
|
<result column="coName" jdbcType="VARCHAR" property="coname" />
|
|
<result column="form" jdbcType="VARCHAR" property="form" />
|
|
<result column="formSpec" jdbcType="VARCHAR" property="formspec" />
|
|
<result column="packSpec" jdbcType="VARCHAR" property="packspec" />
|
|
<result column="authCode" jdbcType="VARCHAR" property="authcode" />
|
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
|
<result column="packRatio" jdbcType="VARCHAR" property="packratio" />
|
|
<result column="packLevel" jdbcType="VARCHAR" property="packlevel" />
|
|
<result column="uuid" jdbcType="VARCHAR" property="uuid" />
|
|
</resultMap>
|
|
<sql id="Example_Where_Clause">
|
|
<where>
|
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
|
<if test="criteria.valid">
|
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
|
<foreach collection="criteria.criteria" item="criterion">
|
|
<choose>
|
|
<when test="criterion.noValue">
|
|
and ${criterion.condition}
|
|
</when>
|
|
<when test="criterion.singleValue">
|
|
and ${criterion.condition} #{criterion.value}
|
|
</when>
|
|
<when test="criterion.betweenValue">
|
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
</when>
|
|
<when test="criterion.listValue">
|
|
and ${criterion.condition}
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
#{listItem}
|
|
</foreach>
|
|
</when>
|
|
</choose>
|
|
</foreach>
|
|
</trim>
|
|
</if>
|
|
</foreach>
|
|
</where>
|
|
</sql>
|
|
<sql id="Update_By_Example_Where_Clause">
|
|
<where>
|
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
<if test="criteria.valid">
|
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
|
<foreach collection="criteria.criteria" item="criterion">
|
|
<choose>
|
|
<when test="criterion.noValue">
|
|
and ${criterion.condition}
|
|
</when>
|
|
<when test="criterion.singleValue">
|
|
and ${criterion.condition} #{criterion.value}
|
|
</when>
|
|
<when test="criterion.betweenValue">
|
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
</when>
|
|
<when test="criterion.listValue">
|
|
and ${criterion.condition}
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
#{listItem}
|
|
</foreach>
|
|
</when>
|
|
</choose>
|
|
</foreach>
|
|
</trim>
|
|
</if>
|
|
</foreach>
|
|
</where>
|
|
</sql>
|
|
<sql id="Base_Column_List">
|
|
nameCode, type, unit, coName, form, formSpec, packSpec, authCode, name, packRatio,
|
|
packLevel, uuid
|
|
</sql>
|
|
<select id="selectByExample" parameterType="com.glxp.udi.admin.entity.inout.DruginfoExample" resultMap="BaseResultMap">
|
|
select
|
|
<if test="distinct">
|
|
distinct
|
|
</if>
|
|
<include refid="Base_Column_List" />
|
|
from druginfo
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
<if test="orderByClause != null">
|
|
order by ${orderByClause}
|
|
</if>
|
|
</select>
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
from druginfo
|
|
where nameCode = #{namecode,jdbcType=VARCHAR}
|
|
</select>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
delete from druginfo
|
|
where nameCode = #{namecode,jdbcType=VARCHAR}
|
|
</delete>
|
|
<delete id="deleteByExample" parameterType="com.glxp.udi.admin.entity.inout.DruginfoExample">
|
|
delete from druginfo
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</delete>
|
|
<insert id="insert" parameterType="com.glxp.udi.admin.entity.inout.Druginfo">
|
|
insert into druginfo (nameCode, type, unit,
|
|
coName, form, formSpec,
|
|
packSpec, authCode, name,
|
|
packRatio, packLevel, uuid
|
|
)
|
|
values (#{namecode,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR},
|
|
#{coname,jdbcType=VARCHAR}, #{form,jdbcType=VARCHAR}, #{formspec,jdbcType=VARCHAR},
|
|
#{packspec,jdbcType=VARCHAR}, #{authcode,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
|
#{packratio,jdbcType=VARCHAR}, #{packlevel,jdbcType=VARCHAR}, #{uuid,jdbcType=VARCHAR}
|
|
)
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.glxp.udi.admin.entity.inout.Druginfo">
|
|
insert into druginfo
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="namecode != null">
|
|
nameCode,
|
|
</if>
|
|
<if test="type != null">
|
|
type,
|
|
</if>
|
|
<if test="unit != null">
|
|
unit,
|
|
</if>
|
|
<if test="coname != null">
|
|
coName,
|
|
</if>
|
|
<if test="form != null">
|
|
form,
|
|
</if>
|
|
<if test="formspec != null">
|
|
formSpec,
|
|
</if>
|
|
<if test="packspec != null">
|
|
packSpec,
|
|
</if>
|
|
<if test="authcode != null">
|
|
authCode,
|
|
</if>
|
|
<if test="name != null">
|
|
name,
|
|
</if>
|
|
<if test="packratio != null">
|
|
packRatio,
|
|
</if>
|
|
<if test="packlevel != null">
|
|
packLevel,
|
|
</if>
|
|
<if test="uuid != null">
|
|
uuid,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="namecode != null">
|
|
#{namecode,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="type != null">
|
|
#{type,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="unit != null">
|
|
#{unit,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="coname != null">
|
|
#{coname,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="form != null">
|
|
#{form,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="formspec != null">
|
|
#{formspec,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="packspec != null">
|
|
#{packspec,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="authcode != null">
|
|
#{authcode,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="name != null">
|
|
#{name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="packratio != null">
|
|
#{packratio,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="packlevel != null">
|
|
#{packlevel,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="uuid != null">
|
|
#{uuid,jdbcType=VARCHAR},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<select id="countByExample" parameterType="com.glxp.udi.admin.entity.inout.DruginfoExample" resultType="java.lang.Long">
|
|
select count(*) from druginfo
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</select>
|
|
<update id="updateByExampleSelective" parameterType="map">
|
|
update druginfo
|
|
<set>
|
|
<if test="record.namecode != null">
|
|
nameCode = #{record.namecode,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.type != null">
|
|
type = #{record.type,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.unit != null">
|
|
unit = #{record.unit,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.coname != null">
|
|
coName = #{record.coname,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.form != null">
|
|
form = #{record.form,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.formspec != null">
|
|
formSpec = #{record.formspec,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.packspec != null">
|
|
packSpec = #{record.packspec,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.authcode != null">
|
|
authCode = #{record.authcode,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.name != null">
|
|
name = #{record.name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.packratio != null">
|
|
packRatio = #{record.packratio,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.packlevel != null">
|
|
packLevel = #{record.packlevel,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.uuid != null">
|
|
uuid = #{record.uuid,jdbcType=VARCHAR},
|
|
</if>
|
|
</set>
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByExample" parameterType="map">
|
|
update druginfo
|
|
set nameCode = #{record.namecode,jdbcType=VARCHAR},
|
|
type = #{record.type,jdbcType=VARCHAR},
|
|
unit = #{record.unit,jdbcType=VARCHAR},
|
|
coName = #{record.coname,jdbcType=VARCHAR},
|
|
form = #{record.form,jdbcType=VARCHAR},
|
|
formSpec = #{record.formspec,jdbcType=VARCHAR},
|
|
packSpec = #{record.packspec,jdbcType=VARCHAR},
|
|
authCode = #{record.authcode,jdbcType=VARCHAR},
|
|
name = #{record.name,jdbcType=VARCHAR},
|
|
packRatio = #{record.packratio,jdbcType=VARCHAR},
|
|
packLevel = #{record.packlevel,jdbcType=VARCHAR},
|
|
uuid = #{record.uuid,jdbcType=VARCHAR}
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.glxp.udi.admin.entity.inout.Druginfo">
|
|
update druginfo
|
|
<set>
|
|
<if test="type != null">
|
|
type = #{type,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="unit != null">
|
|
unit = #{unit,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="coname != null">
|
|
coName = #{coname,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="form != null">
|
|
form = #{form,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="formspec != null">
|
|
formSpec = #{formspec,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="packspec != null">
|
|
packSpec = #{packspec,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="authcode != null">
|
|
authCode = #{authcode,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="name != null">
|
|
name = #{name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="packratio != null">
|
|
packRatio = #{packratio,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="packlevel != null">
|
|
packLevel = #{packlevel,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="uuid != null">
|
|
uuid = #{uuid,jdbcType=VARCHAR},
|
|
</if>
|
|
</set>
|
|
where nameCode = #{namecode,jdbcType=VARCHAR}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="com.glxp.udi.admin.entity.inout.Druginfo">
|
|
update druginfo
|
|
set type = #{type,jdbcType=VARCHAR},
|
|
unit = #{unit,jdbcType=VARCHAR},
|
|
coName = #{coname,jdbcType=VARCHAR},
|
|
form = #{form,jdbcType=VARCHAR},
|
|
formSpec = #{formspec,jdbcType=VARCHAR},
|
|
packSpec = #{packspec,jdbcType=VARCHAR},
|
|
authCode = #{authcode,jdbcType=VARCHAR},
|
|
name = #{name,jdbcType=VARCHAR},
|
|
packRatio = #{packratio,jdbcType=VARCHAR},
|
|
packLevel = #{packlevel,jdbcType=VARCHAR},
|
|
uuid = #{uuid,jdbcType=VARCHAR}
|
|
where nameCode = #{namecode,jdbcType=VARCHAR}
|
|
</update>
|
|
|
|
<!--<insert id="insertDrugs" parameterType="java.util.List">-->
|
|
<!--INSERT INTO druginfo-->
|
|
<!--(-->
|
|
<!--type,-->
|
|
<!--unit,-->
|
|
<!--coName,-->
|
|
<!--form,-->
|
|
<!--formSpec,-->
|
|
<!--packSpec,-->
|
|
<!--authCode,-->
|
|
<!--name,-->
|
|
<!--packRatio,-->
|
|
<!--packLevel,-->
|
|
<!--nameCode-->
|
|
<!--)-->
|
|
<!--VALUES-->
|
|
<!--<foreach collection="druginfos" item="item" index="index"-->
|
|
<!--separator=",">-->
|
|
<!--(-->
|
|
<!--#{item.type},-->
|
|
<!--#{item.unit},-->
|
|
<!--#{item.coname},-->
|
|
<!--#{item.form},-->
|
|
<!--#{item.formspec},-->
|
|
<!--#{item.packspec},-->
|
|
<!--#{item.authcode},-->
|
|
<!--#{item.name},-->
|
|
<!--#{item.packratio},-->
|
|
<!--#{item.packlevel},-->
|
|
<!--#{item.namecode})-->
|
|
<!--</foreach>-->
|
|
|
|
|
|
<!--ON DUPLICATE KEY UPDATE `name` = VALUES(`name`)-->
|
|
<!--</insert>-->
|
|
<insert id="insertDrugs" parameterType="java.util.List">
|
|
replace INTO druginfo
|
|
(
|
|
type,
|
|
unit,
|
|
coName,
|
|
form,
|
|
formSpec,
|
|
packSpec,
|
|
authCode,
|
|
name,
|
|
packRatio,
|
|
packLevel,
|
|
nameCode,
|
|
uuid
|
|
)
|
|
VALUES
|
|
<foreach collection="druginfos" item="item" index="index"
|
|
separator=",">
|
|
(
|
|
#{item.type},
|
|
#{item.unit},
|
|
#{item.coname},
|
|
#{item.form},
|
|
#{item.formspec},
|
|
#{item.packspec},
|
|
#{item.authcode},
|
|
#{item.name},
|
|
#{item.packratio},
|
|
#{item.packlevel},
|
|
#{item.namecode},
|
|
#{item.uuid})
|
|
</foreach>
|
|
|
|
|
|
|
|
</insert>
|
|
<delete id="deleteAll">
|
|
delete from druginfo;
|
|
</delete>
|
|
</mapper> |