1.修复耗材字典查询bug,添加新表的实体类
							parent
							
								
									2ffcc5103a
								
							
						
					
					
						commit
						735076879a
					
				| @ -0,0 +1,18 @@ | ||||
| package com.glxp.api.dao.basic; | ||||
| 
 | ||||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||||
| import com.glxp.api.entity.basic.BasicHospTypeEntity; | ||||
| import java.util.List; | ||||
| import org.apache.ibatis.annotations.Param; | ||||
| 
 | ||||
| public interface BasicHospTypeDao extends BaseMapper<BasicHospTypeEntity> { | ||||
|     int updateBatch(List<BasicHospTypeEntity> list); | ||||
| 
 | ||||
|     int updateBatchSelective(List<BasicHospTypeEntity> list); | ||||
| 
 | ||||
|     int batchInsert(@Param("list") List<BasicHospTypeEntity> list); | ||||
| 
 | ||||
|     int insertOrUpdate(BasicHospTypeEntity record); | ||||
| 
 | ||||
|     int insertOrUpdateSelective(BasicHospTypeEntity record); | ||||
| } | ||||
| @ -0,0 +1,18 @@ | ||||
| package com.glxp.api.dao.basic; | ||||
| 
 | ||||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||||
| import com.glxp.api.entity.basic.BasicHospTypeRelEntity; | ||||
| import java.util.List; | ||||
| import org.apache.ibatis.annotations.Param; | ||||
| 
 | ||||
| public interface BasicHospTypeRelDao extends BaseMapper<BasicHospTypeRelEntity> { | ||||
|     int updateBatch(List<BasicHospTypeRelEntity> list); | ||||
| 
 | ||||
|     int updateBatchSelective(List<BasicHospTypeRelEntity> list); | ||||
| 
 | ||||
|     int batchInsert(@Param("list") List<BasicHospTypeRelEntity> list); | ||||
| 
 | ||||
|     int insertOrUpdate(BasicHospTypeRelEntity record); | ||||
| 
 | ||||
|     int insertOrUpdateSelective(BasicHospTypeRelEntity record); | ||||
| } | ||||
| @ -0,0 +1,81 @@ | ||||
| package com.glxp.api.entity.basic; | ||||
| 
 | ||||
| import com.baomidou.mybatisplus.annotation.IdType; | ||||
| import com.baomidou.mybatisplus.annotation.TableField; | ||||
| import com.baomidou.mybatisplus.annotation.TableId; | ||||
| import com.baomidou.mybatisplus.annotation.TableName; | ||||
| import java.util.Date; | ||||
| import lombok.Data; | ||||
| 
 | ||||
| @Data | ||||
| @TableName(value = "basic_hosp_type") | ||||
| public class BasicHospTypeEntity { | ||||
|     @TableId(value = "id", type = IdType.AUTO) | ||||
|     private Integer id; | ||||
| 
 | ||||
|     /** | ||||
|      * 院内编码 | ||||
|      */ | ||||
|     @TableField(value = "code") | ||||
|     private String code; | ||||
| 
 | ||||
|     /** | ||||
|      * 父级编码 | ||||
|      */ | ||||
|     @TableField(value = "parentCode") | ||||
|     private String parentCode; | ||||
| 
 | ||||
|     /** | ||||
|      * 院内编码名称 | ||||
|      */ | ||||
|     @TableField(value = "`name`") | ||||
|     private String name; | ||||
| 
 | ||||
|     /** | ||||
|      * 备注 | ||||
|      */ | ||||
|     @TableField(value = "remark") | ||||
|     private String remark; | ||||
| 
 | ||||
|     /** | ||||
|      * 创建时间 | ||||
|      */ | ||||
|     @TableField(value = "createTime") | ||||
|     private Date createTime; | ||||
| 
 | ||||
|     /** | ||||
|      * 更新时间 | ||||
|      */ | ||||
|     @TableField(value = "updateTime") | ||||
|     private Date updateTime; | ||||
| 
 | ||||
|     /** | ||||
|      * 创建人 | ||||
|      */ | ||||
|     @TableField(value = "`createUser`") | ||||
|     private String createUser; | ||||
| 
 | ||||
|     /** | ||||
|      * 更新人 | ||||
|      */ | ||||
|     @TableField(value = "updateUser") | ||||
|     private String updateUser; | ||||
| 
 | ||||
|     public static final String COL_ID = "id"; | ||||
| 
 | ||||
|     public static final String COL_CODE = "code"; | ||||
| 
 | ||||
|     public static final String COL_PARENTCODE = "parentCode"; | ||||
| 
 | ||||
|     public static final String COL_NAME = "name"; | ||||
| 
 | ||||
|     public static final String COL_REMARK = "remark"; | ||||
| 
 | ||||
|     public static final String COL_CREATETIME = "createTime"; | ||||
| 
 | ||||
|     public static final String COL_UPDATETIME = "updateTime"; | ||||
| 
 | ||||
|     public static final String COL_CREATEUSER = "createUser"; | ||||
| 
 | ||||
|     public static final String COL_UPDATEUSER = "updateUser"; | ||||
| } | ||||
| @ -0,0 +1,32 @@ | ||||
| package com.glxp.api.entity.basic; | ||||
| 
 | ||||
| import com.baomidou.mybatisplus.annotation.IdType; | ||||
| import com.baomidou.mybatisplus.annotation.TableField; | ||||
| import com.baomidou.mybatisplus.annotation.TableId; | ||||
| import com.baomidou.mybatisplus.annotation.TableName; | ||||
| import lombok.Data; | ||||
| 
 | ||||
| @Data | ||||
| @TableName(value = "basic_hosp_type_rel") | ||||
| public class BasicHospTypeRelEntity { | ||||
|     @TableId(value = "id", type = IdType.AUTO) | ||||
|     private Integer id; | ||||
| 
 | ||||
|     /** | ||||
|      * 院内编码 | ||||
|      */ | ||||
|     @TableField(value = "code") | ||||
|     private String code; | ||||
| 
 | ||||
|     /** | ||||
|      * 耗材字典ID主键 | ||||
|      */ | ||||
|     @TableField(value = "relId") | ||||
|     private String relId; | ||||
| 
 | ||||
|     public static final String COL_ID = "id"; | ||||
| 
 | ||||
|     public static final String COL_CODE = "code"; | ||||
| 
 | ||||
|     public static final String COL_RELID = "relId"; | ||||
| } | ||||
| @ -0,0 +1,287 @@ | ||||
| <?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.BasicHospTypeDao"> | ||||
|   <resultMap id="BaseResultMap" type="com.glxp.api.entity.basic.BasicHospTypeEntity"> | ||||
|     <!--@mbg.generated--> | ||||
|     <!--@Table basic_hosp_type--> | ||||
|     <id column="id" jdbcType="INTEGER" property="id" /> | ||||
|     <result column="code" jdbcType="VARCHAR" property="code" /> | ||||
|     <result column="parentCode" jdbcType="VARCHAR" property="parentCode" /> | ||||
|     <result column="name" jdbcType="VARCHAR" property="name" /> | ||||
|     <result column="remark" jdbcType="VARCHAR" property="remark" /> | ||||
|     <result column="createTime" jdbcType="TIMESTAMP" property="createTime" /> | ||||
|     <result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" /> | ||||
|     <result column="createUser" jdbcType="VARCHAR" property="createUser" /> | ||||
|     <result column="updateUser" jdbcType="VARCHAR" property="updateUser" /> | ||||
|   </resultMap> | ||||
|   <sql id="Base_Column_List"> | ||||
|     <!--@mbg.generated--> | ||||
|     id, code, parentCode, `name`, remark, createTime, updateTime, `createUser`, updateUser | ||||
|   </sql> | ||||
|   <update id="updateBatch" parameterType="java.util.List"> | ||||
|     <!--@mbg.generated--> | ||||
|     update basic_hosp_type | ||||
|     <trim prefix="set" suffixOverrides=","> | ||||
|       <trim prefix="code = case" suffix="end,"> | ||||
|         <foreach collection="list" index="index" item="item"> | ||||
|           when id = #{item.id,jdbcType=INTEGER} then #{item.code,jdbcType=VARCHAR} | ||||
|         </foreach> | ||||
|       </trim> | ||||
|       <trim prefix="parentCode = case" suffix="end,"> | ||||
|         <foreach collection="list" index="index" item="item"> | ||||
|           when id = #{item.id,jdbcType=INTEGER} then #{item.parentCode,jdbcType=VARCHAR} | ||||
|         </foreach> | ||||
|       </trim> | ||||
|       <trim prefix="`name` = case" suffix="end,"> | ||||
|         <foreach collection="list" index="index" item="item"> | ||||
|           when id = #{item.id,jdbcType=INTEGER} then #{item.name,jdbcType=VARCHAR} | ||||
|         </foreach> | ||||
|       </trim> | ||||
|       <trim prefix="remark = case" suffix="end,"> | ||||
|         <foreach collection="list" index="index" item="item"> | ||||
|           when id = #{item.id,jdbcType=INTEGER} then #{item.remark,jdbcType=VARCHAR} | ||||
|         </foreach> | ||||
|       </trim> | ||||
|       <trim prefix="createTime = case" suffix="end,"> | ||||
|         <foreach collection="list" index="index" item="item"> | ||||
|           when id = #{item.id,jdbcType=INTEGER} then #{item.createTime,jdbcType=TIMESTAMP} | ||||
|         </foreach> | ||||
|       </trim> | ||||
|       <trim prefix="updateTime = case" suffix="end,"> | ||||
|         <foreach collection="list" index="index" item="item"> | ||||
|           when id = #{item.id,jdbcType=INTEGER} then #{item.updateTime,jdbcType=TIMESTAMP} | ||||
|         </foreach> | ||||
|       </trim> | ||||
|       <trim prefix="`createUser` = case" suffix="end,"> | ||||
|         <foreach collection="list" index="index" item="item"> | ||||
|           when id = #{item.id,jdbcType=INTEGER} then #{item.createUser,jdbcType=VARCHAR} | ||||
|         </foreach> | ||||
|       </trim> | ||||
|       <trim prefix="updateUser = case" suffix="end,"> | ||||
|         <foreach collection="list" index="index" item="item"> | ||||
|           when id = #{item.id,jdbcType=INTEGER} then #{item.updateUser,jdbcType=VARCHAR} | ||||
|         </foreach> | ||||
|       </trim> | ||||
|     </trim> | ||||
|     where id in | ||||
|     <foreach close=")" collection="list" item="item" open="(" separator=", "> | ||||
|       #{item.id,jdbcType=INTEGER} | ||||
|     </foreach> | ||||
|   </update> | ||||
|   <update id="updateBatchSelective" parameterType="java.util.List"> | ||||
|     <!--@mbg.generated--> | ||||
|     update basic_hosp_type | ||||
|     <trim prefix="set" suffixOverrides=","> | ||||
|       <trim prefix="code = case" suffix="end,"> | ||||
|         <foreach collection="list" index="index" item="item"> | ||||
|           <if test="item.code != null"> | ||||
|             when id = #{item.id,jdbcType=INTEGER} then #{item.code,jdbcType=VARCHAR} | ||||
|           </if> | ||||
|         </foreach> | ||||
|       </trim> | ||||
|       <trim prefix="parentCode = case" suffix="end,"> | ||||
|         <foreach collection="list" index="index" item="item"> | ||||
|           <if test="item.parentCode != null"> | ||||
|             when id = #{item.id,jdbcType=INTEGER} then #{item.parentCode,jdbcType=VARCHAR} | ||||
|           </if> | ||||
|         </foreach> | ||||
|       </trim> | ||||
|       <trim prefix="`name` = case" suffix="end,"> | ||||
|         <foreach collection="list" index="index" item="item"> | ||||
|           <if test="item.name != null"> | ||||
|             when id = #{item.id,jdbcType=INTEGER} then #{item.name,jdbcType=VARCHAR} | ||||
|           </if> | ||||
|         </foreach> | ||||
|       </trim> | ||||
|       <trim prefix="remark = case" suffix="end,"> | ||||
|         <foreach collection="list" index="index" item="item"> | ||||
|           <if test="item.remark != null"> | ||||
|             when id = #{item.id,jdbcType=INTEGER} then #{item.remark,jdbcType=VARCHAR} | ||||
|           </if> | ||||
|         </foreach> | ||||
|       </trim> | ||||
|       <trim prefix="createTime = case" suffix="end,"> | ||||
|         <foreach collection="list" index="index" item="item"> | ||||
|           <if test="item.createTime != null"> | ||||
|             when id = #{item.id,jdbcType=INTEGER} then #{item.createTime,jdbcType=TIMESTAMP} | ||||
|           </if> | ||||
|         </foreach> | ||||
|       </trim> | ||||
|       <trim prefix="updateTime = case" suffix="end,"> | ||||
|         <foreach collection="list" index="index" item="item"> | ||||
|           <if test="item.updateTime != null"> | ||||
|             when id = #{item.id,jdbcType=INTEGER} then #{item.updateTime,jdbcType=TIMESTAMP} | ||||
|           </if> | ||||
|         </foreach> | ||||
|       </trim> | ||||
|       <trim prefix="`createUser` = case" suffix="end,"> | ||||
|         <foreach collection="list" index="index" item="item"> | ||||
|           <if test="item.createUser != null"> | ||||
|             when id = #{item.id,jdbcType=INTEGER} then #{item.createUser,jdbcType=VARCHAR} | ||||
|           </if> | ||||
|         </foreach> | ||||
|       </trim> | ||||
|       <trim prefix="updateUser = case" suffix="end,"> | ||||
|         <foreach collection="list" index="index" item="item"> | ||||
|           <if test="item.updateUser != null"> | ||||
|             when id = #{item.id,jdbcType=INTEGER} then #{item.updateUser,jdbcType=VARCHAR} | ||||
|           </if> | ||||
|         </foreach> | ||||
|       </trim> | ||||
|     </trim> | ||||
|     where id in | ||||
|     <foreach close=")" collection="list" item="item" open="(" separator=", "> | ||||
|       #{item.id,jdbcType=INTEGER} | ||||
|     </foreach> | ||||
|   </update> | ||||
|   <insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true"> | ||||
|     <!--@mbg.generated--> | ||||
|     insert into basic_hosp_type | ||||
|     (code, parentCode, `name`, remark, createTime, updateTime, `createUser`, updateUser | ||||
|       ) | ||||
|     values | ||||
|     <foreach collection="list" item="item" separator=","> | ||||
|       (#{item.code,jdbcType=VARCHAR}, #{item.parentCode,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR},  | ||||
|         #{item.remark,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateTime,jdbcType=TIMESTAMP},  | ||||
|         #{item.createUser,jdbcType=VARCHAR}, #{item.updateUser,jdbcType=VARCHAR}) | ||||
|     </foreach> | ||||
|   </insert> | ||||
|   <insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.glxp.api.entity.basic.BasicHospTypeEntity" useGeneratedKeys="true"> | ||||
|     <!--@mbg.generated--> | ||||
|     insert into basic_hosp_type | ||||
|     <trim prefix="(" suffix=")" suffixOverrides=","> | ||||
|       <if test="id != null"> | ||||
|         id, | ||||
|       </if> | ||||
|       code, | ||||
|       parentCode, | ||||
|       `name`, | ||||
|       remark, | ||||
|       createTime, | ||||
|       updateTime, | ||||
|       `createUser`, | ||||
|       updateUser, | ||||
|     </trim> | ||||
|     values | ||||
|     <trim prefix="(" suffix=")" suffixOverrides=","> | ||||
|       <if test="id != null"> | ||||
|         #{id,jdbcType=INTEGER}, | ||||
|       </if> | ||||
|       #{code,jdbcType=VARCHAR}, | ||||
|       #{parentCode,jdbcType=VARCHAR}, | ||||
|       #{name,jdbcType=VARCHAR}, | ||||
|       #{remark,jdbcType=VARCHAR}, | ||||
|       #{createTime,jdbcType=TIMESTAMP}, | ||||
|       #{updateTime,jdbcType=TIMESTAMP}, | ||||
|       #{createUser,jdbcType=VARCHAR}, | ||||
|       #{updateUser,jdbcType=VARCHAR}, | ||||
|     </trim> | ||||
|     on duplicate key update  | ||||
|     <trim suffixOverrides=","> | ||||
|       <if test="id != null"> | ||||
|         id = #{id,jdbcType=INTEGER}, | ||||
|       </if> | ||||
|       code = #{code,jdbcType=VARCHAR}, | ||||
|       parentCode = #{parentCode,jdbcType=VARCHAR}, | ||||
|       `name` = #{name,jdbcType=VARCHAR}, | ||||
|       remark = #{remark,jdbcType=VARCHAR}, | ||||
|       createTime = #{createTime,jdbcType=TIMESTAMP}, | ||||
|       updateTime = #{updateTime,jdbcType=TIMESTAMP}, | ||||
|       `createUser` = #{createUser,jdbcType=VARCHAR}, | ||||
|       updateUser = #{updateUser,jdbcType=VARCHAR}, | ||||
|     </trim> | ||||
|   </insert> | ||||
|   <insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id" parameterType="com.glxp.api.entity.basic.BasicHospTypeEntity" useGeneratedKeys="true"> | ||||
|     <!--@mbg.generated--> | ||||
|     insert into basic_hosp_type | ||||
|     <trim prefix="(" suffix=")" suffixOverrides=","> | ||||
|       <if test="id != null"> | ||||
|         id, | ||||
|       </if> | ||||
|       <if test="code != null"> | ||||
|         code, | ||||
|       </if> | ||||
|       <if test="parentCode != null"> | ||||
|         parentCode, | ||||
|       </if> | ||||
|       <if test="name != null"> | ||||
|         `name`, | ||||
|       </if> | ||||
|       <if test="remark != null"> | ||||
|         remark, | ||||
|       </if> | ||||
|       <if test="createTime != null"> | ||||
|         createTime, | ||||
|       </if> | ||||
|       <if test="updateTime != null"> | ||||
|         updateTime, | ||||
|       </if> | ||||
|       <if test="createUser != null"> | ||||
|         `createUser`, | ||||
|       </if> | ||||
|       <if test="updateUser != null"> | ||||
|         updateUser, | ||||
|       </if> | ||||
|     </trim> | ||||
|     values | ||||
|     <trim prefix="(" suffix=")" suffixOverrides=","> | ||||
|       <if test="id != null"> | ||||
|         #{id,jdbcType=INTEGER}, | ||||
|       </if> | ||||
|       <if test="code != null"> | ||||
|         #{code,jdbcType=VARCHAR}, | ||||
|       </if> | ||||
|       <if test="parentCode != null"> | ||||
|         #{parentCode,jdbcType=VARCHAR}, | ||||
|       </if> | ||||
|       <if test="name != null"> | ||||
|         #{name,jdbcType=VARCHAR}, | ||||
|       </if> | ||||
|       <if test="remark != null"> | ||||
|         #{remark,jdbcType=VARCHAR}, | ||||
|       </if> | ||||
|       <if test="createTime != null"> | ||||
|         #{createTime,jdbcType=TIMESTAMP}, | ||||
|       </if> | ||||
|       <if test="updateTime != null"> | ||||
|         #{updateTime,jdbcType=TIMESTAMP}, | ||||
|       </if> | ||||
|       <if test="createUser != null"> | ||||
|         #{createUser,jdbcType=VARCHAR}, | ||||
|       </if> | ||||
|       <if test="updateUser != null"> | ||||
|         #{updateUser,jdbcType=VARCHAR}, | ||||
|       </if> | ||||
|     </trim> | ||||
|     on duplicate key update  | ||||
|     <trim suffixOverrides=","> | ||||
|       <if test="id != null"> | ||||
|         id = #{id,jdbcType=INTEGER}, | ||||
|       </if> | ||||
|       <if test="code != null"> | ||||
|         code = #{code,jdbcType=VARCHAR}, | ||||
|       </if> | ||||
|       <if test="parentCode != null"> | ||||
|         parentCode = #{parentCode,jdbcType=VARCHAR}, | ||||
|       </if> | ||||
|       <if test="name != null"> | ||||
|         `name` = #{name,jdbcType=VARCHAR}, | ||||
|       </if> | ||||
|       <if test="remark != null"> | ||||
|         remark = #{remark,jdbcType=VARCHAR}, | ||||
|       </if> | ||||
|       <if test="createTime != null"> | ||||
|         createTime = #{createTime,jdbcType=TIMESTAMP}, | ||||
|       </if> | ||||
|       <if test="updateTime != null"> | ||||
|         updateTime = #{updateTime,jdbcType=TIMESTAMP}, | ||||
|       </if> | ||||
|       <if test="createUser != null"> | ||||
|         `createUser` = #{createUser,jdbcType=VARCHAR}, | ||||
|       </if> | ||||
|       <if test="updateUser != null"> | ||||
|         updateUser = #{updateUser,jdbcType=VARCHAR}, | ||||
|       </if> | ||||
|     </trim> | ||||
|   </insert> | ||||
| </mapper> | ||||
| @ -0,0 +1,119 @@ | ||||
| <?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.BasicHospTypeRelDao"> | ||||
|   <resultMap id="BaseResultMap" type="com.glxp.api.entity.basic.BasicHospTypeRelEntity"> | ||||
|     <!--@mbg.generated--> | ||||
|     <!--@Table basic_hosp_type_rel--> | ||||
|     <id column="id" jdbcType="INTEGER" property="id" /> | ||||
|     <result column="code" jdbcType="VARCHAR" property="code" /> | ||||
|     <result column="relId" jdbcType="VARCHAR" property="relId" /> | ||||
|   </resultMap> | ||||
|   <sql id="Base_Column_List"> | ||||
|     <!--@mbg.generated--> | ||||
|     id, code, relId | ||||
|   </sql> | ||||
|   <update id="updateBatch" parameterType="java.util.List"> | ||||
|     <!--@mbg.generated--> | ||||
|     update basic_hosp_type_rel | ||||
|     <trim prefix="set" suffixOverrides=","> | ||||
|       <trim prefix="code = case" suffix="end,"> | ||||
|         <foreach collection="list" index="index" item="item"> | ||||
|           when id = #{item.id,jdbcType=INTEGER} then #{item.code,jdbcType=VARCHAR} | ||||
|         </foreach> | ||||
|       </trim> | ||||
|       <trim prefix="relId = case" suffix="end,"> | ||||
|         <foreach collection="list" index="index" item="item"> | ||||
|           when id = #{item.id,jdbcType=INTEGER} then #{item.relId,jdbcType=VARCHAR} | ||||
|         </foreach> | ||||
|       </trim> | ||||
|     </trim> | ||||
|     where id in | ||||
|     <foreach close=")" collection="list" item="item" open="(" separator=", "> | ||||
|       #{item.id,jdbcType=INTEGER} | ||||
|     </foreach> | ||||
|   </update> | ||||
|   <update id="updateBatchSelective" parameterType="java.util.List"> | ||||
|     <!--@mbg.generated--> | ||||
|     update basic_hosp_type_rel | ||||
|     <trim prefix="set" suffixOverrides=","> | ||||
|       <trim prefix="code = case" suffix="end,"> | ||||
|         <foreach collection="list" index="index" item="item"> | ||||
|           <if test="item.code != null"> | ||||
|             when id = #{item.id,jdbcType=INTEGER} then #{item.code,jdbcType=VARCHAR} | ||||
|           </if> | ||||
|         </foreach> | ||||
|       </trim> | ||||
|       <trim prefix="relId = case" suffix="end,"> | ||||
|         <foreach collection="list" index="index" item="item"> | ||||
|           <if test="item.relId != null"> | ||||
|             when id = #{item.id,jdbcType=INTEGER} then #{item.relId,jdbcType=VARCHAR} | ||||
|           </if> | ||||
|         </foreach> | ||||
|       </trim> | ||||
|     </trim> | ||||
|     where id in | ||||
|     <foreach close=")" collection="list" item="item" open="(" separator=", "> | ||||
|       #{item.id,jdbcType=INTEGER} | ||||
|     </foreach> | ||||
|   </update> | ||||
|   <insert id="batchInsert" parameterType="map"> | ||||
|     <!--@mbg.generated--> | ||||
|     insert into basic_hosp_type_rel | ||||
|     (id, code, relId) | ||||
|     values | ||||
|     <foreach collection="list" item="item" separator=","> | ||||
|       (#{item.id,jdbcType=INTEGER}, #{item.code,jdbcType=VARCHAR}, #{item.relId,jdbcType=VARCHAR} | ||||
|         ) | ||||
|     </foreach> | ||||
|   </insert> | ||||
|   <insert id="insertOrUpdate" parameterType="com.glxp.api.entity.basic.BasicHospTypeRelEntity"> | ||||
|     <!--@mbg.generated--> | ||||
|     insert into basic_hosp_type_rel | ||||
|     (id, code, relId) | ||||
|     values | ||||
|     (#{id,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR}, #{relId,jdbcType=VARCHAR}) | ||||
|     on duplicate key update  | ||||
|     id = #{id,jdbcType=INTEGER},  | ||||
|     code = #{code,jdbcType=VARCHAR},  | ||||
|     relId = #{relId,jdbcType=VARCHAR} | ||||
|   </insert> | ||||
|   <insert id="insertOrUpdateSelective" parameterType="com.glxp.api.entity.basic.BasicHospTypeRelEntity"> | ||||
|     <!--@mbg.generated--> | ||||
|     insert into basic_hosp_type_rel | ||||
|     <trim prefix="(" suffix=")" suffixOverrides=","> | ||||
|       <if test="id != null"> | ||||
|         id, | ||||
|       </if> | ||||
|       <if test="code != null"> | ||||
|         code, | ||||
|       </if> | ||||
|       <if test="relId != null"> | ||||
|         relId, | ||||
|       </if> | ||||
|     </trim> | ||||
|     values | ||||
|     <trim prefix="(" suffix=")" suffixOverrides=","> | ||||
|       <if test="id != null"> | ||||
|         #{id,jdbcType=INTEGER}, | ||||
|       </if> | ||||
|       <if test="code != null"> | ||||
|         #{code,jdbcType=VARCHAR}, | ||||
|       </if> | ||||
|       <if test="relId != null"> | ||||
|         #{relId,jdbcType=VARCHAR}, | ||||
|       </if> | ||||
|     </trim> | ||||
|     on duplicate key update  | ||||
|     <trim suffixOverrides=","> | ||||
|       <if test="id != null"> | ||||
|         id = #{id,jdbcType=INTEGER}, | ||||
|       </if> | ||||
|       <if test="code != null"> | ||||
|         code = #{code,jdbcType=VARCHAR}, | ||||
|       </if> | ||||
|       <if test="relId != null"> | ||||
|         relId = #{relId,jdbcType=VARCHAR}, | ||||
|       </if> | ||||
|     </trim> | ||||
|   </insert> | ||||
| </mapper> | ||||
					Loading…
					
					
				
		Reference in New Issue