|  |  |  | @ -5,6 +5,7 @@ | 
			
		
	
		
			
				
					|  |  |  |  |         <id column="id" jdbcType="INTEGER" property="id"/> | 
			
		
	
		
			
				
					|  |  |  |  |         <result column="code" jdbcType="VARCHAR" property="code"/> | 
			
		
	
		
			
				
					|  |  |  |  |         <result column="name" jdbcType="VARCHAR" property="name"/> | 
			
		
	
		
			
				
					|  |  |  |  |         <result column="type" jdbcType="VARCHAR" property="type"/> | 
			
		
	
		
			
				
					|  |  |  |  |         <result column="invStorageCode" jdbcType="VARCHAR" property="invStorageCode"/> | 
			
		
	
		
			
				
					|  |  |  |  |         <result column="invWarehouseCode" jdbcType="VARCHAR" property="invWarehouseCode"/> | 
			
		
	
		
			
				
					|  |  |  |  |         <result column="status" jdbcType="INTEGER" property="status"/> | 
			
		
	
	
		
			
				
					|  |  |  | @ -19,6 +20,7 @@ | 
			
		
	
		
			
				
					|  |  |  |  |         id, | 
			
		
	
		
			
				
					|  |  |  |  |         code, | 
			
		
	
		
			
				
					|  |  |  |  |         `name`, | 
			
		
	
		
			
				
					|  |  |  |  |         type, | 
			
		
	
		
			
				
					|  |  |  |  |         invStorageCode, | 
			
		
	
		
			
				
					|  |  |  |  |         invWarehouseCode, | 
			
		
	
		
			
				
					|  |  |  |  |         `status`, | 
			
		
	
	
		
			
				
					|  |  |  | @ -44,11 +46,12 @@ | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.glxp.api.admin.entity.business.InvSpace" | 
			
		
	
		
			
				
					|  |  |  |  |             useGeneratedKeys="true"> | 
			
		
	
		
			
				
					|  |  |  |  |         insert into inv_space (code, `name`, invStorageCode, | 
			
		
	
		
			
				
					|  |  |  |  |         insert into inv_space (code, `name`, type, invStorageCode, | 
			
		
	
		
			
				
					|  |  |  |  |                                invWarehouseCode, `status`, createTime, | 
			
		
	
		
			
				
					|  |  |  |  |                                updateTime, `createUser`, updateUser, | 
			
		
	
		
			
				
					|  |  |  |  |                                remark) | 
			
		
	
		
			
				
					|  |  |  |  |         values (#{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{invStorageCode,jdbcType=VARCHAR}, | 
			
		
	
		
			
				
					|  |  |  |  |         values (#{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, | 
			
		
	
		
			
				
					|  |  |  |  |                 #{invStorageCode,jdbcType=VARCHAR}, | 
			
		
	
		
			
				
					|  |  |  |  |                 #{invWarehouseCode,jdbcType=VARCHAR}, #{status,jdbcType=BOOLEAN}, #{createTime,jdbcType=TIMESTAMP}, | 
			
		
	
		
			
				
					|  |  |  |  |                 #{updateTime,jdbcType=TIMESTAMP}, #{createUser,jdbcType=VARCHAR}, #{updateUser,jdbcType=VARCHAR}, | 
			
		
	
		
			
				
					|  |  |  |  |                 #{remark,jdbcType=VARCHAR}) | 
			
		
	
	
		
			
				
					|  |  |  | @ -64,6 +67,9 @@ | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="name != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 `name`, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="type != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 type, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="invStorageCode != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 invStorageCode, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
	
		
			
				
					|  |  |  | @ -96,6 +102,9 @@ | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="name != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 #{name,jdbcType=VARCHAR}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="type != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 #{type,jdbcType=VARCHAR}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="invStorageCode != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 #{invStorageCode,jdbcType=VARCHAR}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
	
		
			
				
					|  |  |  | @ -132,6 +141,9 @@ | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="name != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 `name` = #{name,jdbcType=VARCHAR}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="type != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 type = #{type,jdbcType=VARCHAR}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="invStorageCode != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 invStorageCode = #{invStorageCode,jdbcType=VARCHAR}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
	
		
			
				
					|  |  |  | @ -164,6 +176,7 @@ | 
			
		
	
		
			
				
					|  |  |  |  |         update inv_space | 
			
		
	
		
			
				
					|  |  |  |  |         set code             = #{code,jdbcType=VARCHAR}, | 
			
		
	
		
			
				
					|  |  |  |  |             `name`           = #{name,jdbcType=VARCHAR}, | 
			
		
	
		
			
				
					|  |  |  |  |             type             = #{type,jdbcType=VARCHAR}, | 
			
		
	
		
			
				
					|  |  |  |  |             invStorageCode   = #{invStorageCode,jdbcType=VARCHAR}, | 
			
		
	
		
			
				
					|  |  |  |  |             invWarehouseCode = #{invWarehouseCode,jdbcType=VARCHAR}, | 
			
		
	
		
			
				
					|  |  |  |  |             `status`         = #{status,jdbcType=BOOLEAN}, | 
			
		
	
	
		
			
				
					|  |  |  | @ -188,6 +201,11 @@ | 
			
		
	
		
			
				
					|  |  |  |  |                     when id = #{item.id,jdbcType=INTEGER} then #{item.name,jdbcType=VARCHAR} | 
			
		
	
		
			
				
					|  |  |  |  |                 </foreach> | 
			
		
	
		
			
				
					|  |  |  |  |             </trim> | 
			
		
	
		
			
				
					|  |  |  |  |             <trim prefix="type = case" suffix="end,"> | 
			
		
	
		
			
				
					|  |  |  |  |                 <foreach collection="list" index="index" item="item"> | 
			
		
	
		
			
				
					|  |  |  |  |                     when id = #{item.id,jdbcType=INTEGER} then #{item.type,jdbcType=VARCHAR} | 
			
		
	
		
			
				
					|  |  |  |  |                 </foreach> | 
			
		
	
		
			
				
					|  |  |  |  |             </trim> | 
			
		
	
		
			
				
					|  |  |  |  |             <trim prefix="invStorageCode = case" suffix="end,"> | 
			
		
	
		
			
				
					|  |  |  |  |                 <foreach collection="list" index="index" item="item"> | 
			
		
	
		
			
				
					|  |  |  |  |                     when id = #{item.id,jdbcType=INTEGER} then #{item.invStorageCode,jdbcType=VARCHAR} | 
			
		
	
	
		
			
				
					|  |  |  | @ -235,93 +253,14 @@ | 
			
		
	
		
			
				
					|  |  |  |  |         </foreach> | 
			
		
	
		
			
				
					|  |  |  |  |     </update> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     <update id="updateBatchSelective" parameterType="java.util.List"> | 
			
		
	
		
			
				
					|  |  |  |  |         update inv_space | 
			
		
	
		
			
				
					|  |  |  |  |         <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="`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="invStorageCode = case" suffix="end,"> | 
			
		
	
		
			
				
					|  |  |  |  |                 <foreach collection="list" index="index" item="item"> | 
			
		
	
		
			
				
					|  |  |  |  |                     <if test="item.invStorageCode != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                         when id = #{item.id,jdbcType=INTEGER} then #{item.invStorageCode,jdbcType=VARCHAR} | 
			
		
	
		
			
				
					|  |  |  |  |                     </if> | 
			
		
	
		
			
				
					|  |  |  |  |                 </foreach> | 
			
		
	
		
			
				
					|  |  |  |  |             </trim> | 
			
		
	
		
			
				
					|  |  |  |  |             <trim prefix="invWarehouseCode = case" suffix="end,"> | 
			
		
	
		
			
				
					|  |  |  |  |                 <foreach collection="list" index="index" item="item"> | 
			
		
	
		
			
				
					|  |  |  |  |                     <if test="item.invWarehouseCode != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                         when id = #{item.id,jdbcType=INTEGER} then #{item.invWarehouseCode,jdbcType=VARCHAR} | 
			
		
	
		
			
				
					|  |  |  |  |                     </if> | 
			
		
	
		
			
				
					|  |  |  |  |                 </foreach> | 
			
		
	
		
			
				
					|  |  |  |  |             </trim> | 
			
		
	
		
			
				
					|  |  |  |  |             <trim prefix="`status` = case" suffix="end,"> | 
			
		
	
		
			
				
					|  |  |  |  |                 <foreach collection="list" index="index" item="item"> | 
			
		
	
		
			
				
					|  |  |  |  |                     <if test="item.status != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                         when id = #{item.id,jdbcType=INTEGER} then #{item.status,jdbcType=BOOLEAN} | 
			
		
	
		
			
				
					|  |  |  |  |                     </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 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> | 
			
		
	
		
			
				
					|  |  |  |  |         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"> | 
			
		
	
		
			
				
					|  |  |  |  |         insert into inv_space | 
			
		
	
		
			
				
					|  |  |  |  |         (code, `name`, invStorageCode, invWarehouseCode, `status`, createTime, updateTime, | 
			
		
	
		
			
				
					|  |  |  |  |         (code, `name`, type, invStorageCode, invWarehouseCode, `status`, createTime, updateTime, | 
			
		
	
		
			
				
					|  |  |  |  |          `createUser`, updateUser, remark) | 
			
		
	
		
			
				
					|  |  |  |  |         values | 
			
		
	
		
			
				
					|  |  |  |  |         <foreach collection="list" item="item" separator=","> | 
			
		
	
		
			
				
					|  |  |  |  |             (#{item.code,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}, #{item.invStorageCode,jdbcType=VARCHAR}, | 
			
		
	
		
			
				
					|  |  |  |  |             (#{item.code,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}, #{item.type,jdbcType=VARCHAR}, | 
			
		
	
		
			
				
					|  |  |  |  |              #{item.invStorageCode,jdbcType=VARCHAR}, | 
			
		
	
		
			
				
					|  |  |  |  |              #{item.invWarehouseCode,jdbcType=VARCHAR}, #{item.status,jdbcType=BOOLEAN}, | 
			
		
	
		
			
				
					|  |  |  |  |              #{item.createTime,jdbcType=TIMESTAMP}, | 
			
		
	
		
			
				
					|  |  |  |  |              #{item.updateTime,jdbcType=TIMESTAMP}, #{item.createUser,jdbcType=VARCHAR}, | 
			
		
	
	
		
			
				
					|  |  |  | @ -345,7 +284,8 @@ | 
			
		
	
		
			
				
					|  |  |  |  |                 AND s.invWarehouseCode = #{invWarehouseCode} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="key != null and key != ''"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND (s.code like concat('%', #{key}, '%') or s.name like concat('%', #{key}, '%')) | 
			
		
	
		
			
				
					|  |  |  |  |                 AND (s.code like concat('%', #{key}, '%') or s.name like concat('%', #{key}, '%') or | 
			
		
	
		
			
				
					|  |  |  |  |                      s.type like concat('%', #{key}, '%')) | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |         </where> | 
			
		
	
		
			
				
					|  |  |  |  |     </select> | 
			
		
	
	
		
			
				
					|  |  |  | @ -363,6 +303,9 @@ | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="name != null and name != ''"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND name = #{name} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="type != null and type != ''"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND type = #{type} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="code != null and code != ''"> | 
			
		
	
		
			
				
					|  |  |  |  |                 AND code = #{code} | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
	
		
			
				
					|  |  |  | @ -381,5 +324,4 @@ | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |         </where> | 
			
		
	
		
			
				
					|  |  |  |  |     </select> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | </mapper> |