parent
							
								
									8f9daa0774
								
							
						
					
					
						commit
						943df144a1
					
				| @ -1,237 +1,247 @@ | |||||||
| <?xml version="1.0" encoding="UTF-8"?> | <?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"> | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||||||
| <mapper namespace="com.glxp.sale.admin.dao.inout.WarehouseBussinessTypeDao"> | <mapper namespace="com.glxp.sale.admin.dao.inout.WarehouseBussinessTypeDao"> | ||||||
|   <resultMap id="BaseResultMap" type="com.glxp.sale.admin.entity.inout.WarehouseBussinessTypeEntity"> |     <resultMap id="BaseResultMap" type="com.glxp.sale.admin.entity.inout.WarehouseBussinessTypeEntity"> | ||||||
|     <!--@mbg.generated--> |         <!--@mbg.generated--> | ||||||
|     <!--@Table inv_warehouse_bussiness_type--> |         <!--@Table inv_warehouse_bussiness_type--> | ||||||
|     <id column="id" jdbcType="INTEGER" property="id" /> |         <id column="id" jdbcType="INTEGER" property="id"/> | ||||||
|     <result column="code" jdbcType="VARCHAR" property="code" /> |         <result column="code" jdbcType="VARCHAR" property="code"/> | ||||||
|     <result column="action" jdbcType="VARCHAR" property="action" /> |         <result column="action" jdbcType="VARCHAR" property="action"/> | ||||||
|     <result column="name" jdbcType="VARCHAR" property="name" /> |         <result column="name" jdbcType="VARCHAR" property="name"/> | ||||||
|   </resultMap> |     </resultMap> | ||||||
|   <sql id="Base_Column_List"> |     <sql id="Base_Column_List"> | ||||||
|     <!--@mbg.generated--> |         <!--@mbg.generated--> | ||||||
|     id, code, `action`, `name` |         id, code, `action`, `name` | ||||||
|   </sql> |     </sql> | ||||||
|   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> |     <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> | ||||||
|     <!--@mbg.generated--> |         <!--@mbg.generated--> | ||||||
|     select  |         select | ||||||
|     <include refid="Base_Column_List" /> |         <include refid="Base_Column_List"/> | ||||||
|     from inv_warehouse_bussiness_type |         from inv_warehouse_bussiness_type | ||||||
|     where id = #{id,jdbcType=INTEGER} |         where id = #{id,jdbcType=INTEGER} | ||||||
|   </select> |     </select> | ||||||
|   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> |     <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> | ||||||
|     <!--@mbg.generated--> |         <!--@mbg.generated--> | ||||||
|     delete from inv_warehouse_bussiness_type |         delete from inv_warehouse_bussiness_type | ||||||
|     where id = #{id,jdbcType=INTEGER} |         where id = #{id,jdbcType=INTEGER} | ||||||
|   </delete> |     </delete> | ||||||
|   <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.glxp.sale.admin.entity.inout.WarehouseBussinessTypeEntity" useGeneratedKeys="true"> |     <insert id="insert" keyColumn="id" keyProperty="id" | ||||||
|     <!--@mbg.generated--> |             parameterType="com.glxp.sale.admin.entity.inout.WarehouseBussinessTypeEntity" useGeneratedKeys="true"> | ||||||
|     insert into inv_warehouse_bussiness_type (code, `action`, `name` |         <!--@mbg.generated--> | ||||||
|       ) |         insert into inv_warehouse_bussiness_type (code, `action`, `name` | ||||||
|     values (#{code,jdbcType=VARCHAR}, #{action,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR} |         ) | ||||||
|       ) |         values (#{code,jdbcType=VARCHAR}, #{action,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR} | ||||||
|   </insert> |         ) | ||||||
|   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.glxp.sale.admin.entity.inout.WarehouseBussinessTypeEntity" useGeneratedKeys="true"> |     </insert> | ||||||
|     <!--@mbg.generated--> |     <insert id="insertSelective" keyColumn="id" keyProperty="id" | ||||||
|     insert into inv_warehouse_bussiness_type |             parameterType="com.glxp.sale.admin.entity.inout.WarehouseBussinessTypeEntity" useGeneratedKeys="true"> | ||||||
|     <trim prefix="(" suffix=")" suffixOverrides=","> |         <!--@mbg.generated--> | ||||||
|       <if test="code != null"> |         insert into inv_warehouse_bussiness_type | ||||||
|         code, |         <trim prefix="(" suffix=")" suffixOverrides=","> | ||||||
|       </if> |             <if test="code != null"> | ||||||
|       <if test="action != null"> |                 code, | ||||||
|         `action`, |             </if> | ||||||
|       </if> |             <if test="action != null"> | ||||||
|       <if test="name != null"> |                 `action`, | ||||||
|         `name`, |             </if> | ||||||
|       </if> |             <if test="name != null"> | ||||||
|     </trim> |                 `name`, | ||||||
|     <trim prefix="values (" suffix=")" suffixOverrides=","> |             </if> | ||||||
|       <if test="code != null"> |         </trim> | ||||||
|         #{code,jdbcType=VARCHAR}, |         <trim prefix="values (" suffix=")" suffixOverrides=","> | ||||||
|       </if> |             <if test="code != null"> | ||||||
|       <if test="action != null"> |                 #{code,jdbcType=VARCHAR}, | ||||||
|         #{action,jdbcType=VARCHAR}, |             </if> | ||||||
|       </if> |             <if test="action != null"> | ||||||
|       <if test="name != null"> |                 #{action,jdbcType=VARCHAR}, | ||||||
|         #{name,jdbcType=VARCHAR}, |             </if> | ||||||
|       </if> |             <if test="name != null"> | ||||||
|     </trim> |                 #{name,jdbcType=VARCHAR}, | ||||||
|   </insert> |             </if> | ||||||
|   <update id="updateByPrimaryKeySelective" parameterType="com.glxp.sale.admin.entity.inout.WarehouseBussinessTypeEntity"> |         </trim> | ||||||
|     <!--@mbg.generated--> |     </insert> | ||||||
|     update inv_warehouse_bussiness_type |     <update id="updateByPrimaryKeySelective" | ||||||
|     <set> |             parameterType="com.glxp.sale.admin.entity.inout.WarehouseBussinessTypeEntity"> | ||||||
|       <if test="code != null"> |         <!--@mbg.generated--> | ||||||
|         code = #{code,jdbcType=VARCHAR}, |         update inv_warehouse_bussiness_type | ||||||
|       </if> |         <set> | ||||||
|       <if test="action != null"> |             <if test="code != null"> | ||||||
|  |                 code = #{code,jdbcType=VARCHAR}, | ||||||
|  |             </if> | ||||||
|  |             <if test="action != null"> | ||||||
|  |                 `action` = #{action,jdbcType=VARCHAR}, | ||||||
|  |             </if> | ||||||
|  |             <if test="name != null"> | ||||||
|  |                 `name` = #{name,jdbcType=VARCHAR}, | ||||||
|  |             </if> | ||||||
|  |         </set> | ||||||
|  |         where id = #{id,jdbcType=INTEGER} | ||||||
|  |     </update> | ||||||
|  |     <update id="updateByPrimaryKey" parameterType="com.glxp.sale.admin.entity.inout.WarehouseBussinessTypeEntity"> | ||||||
|  |         <!--@mbg.generated--> | ||||||
|  |         update inv_warehouse_bussiness_type | ||||||
|  |         set code = #{code,jdbcType=VARCHAR}, | ||||||
|         `action` = #{action,jdbcType=VARCHAR}, |         `action` = #{action,jdbcType=VARCHAR}, | ||||||
|       </if> |         `name` = #{name,jdbcType=VARCHAR} | ||||||
|       <if test="name != null"> |         where id = #{id,jdbcType=INTEGER} | ||||||
|         `name` = #{name,jdbcType=VARCHAR}, |     </update> | ||||||
|       </if> |     <update id="updateBatch" parameterType="java.util.List"> | ||||||
|     </set> |         <!--@mbg.generated--> | ||||||
|     where id = #{id,jdbcType=INTEGER} |         update inv_warehouse_bussiness_type | ||||||
|   </update> |         <trim prefix="set" suffixOverrides=","> | ||||||
|   <update id="updateByPrimaryKey" parameterType="com.glxp.sale.admin.entity.inout.WarehouseBussinessTypeEntity"> |             <trim prefix="code = case" suffix="end,"> | ||||||
|     <!--@mbg.generated--> |                 <foreach collection="list" index="index" item="item"> | ||||||
|     update inv_warehouse_bussiness_type |                     when id = #{item.id,jdbcType=INTEGER} then #{item.code,jdbcType=VARCHAR} | ||||||
|     set code = #{code,jdbcType=VARCHAR}, |                 </foreach> | ||||||
|       `action` = #{action,jdbcType=VARCHAR}, |             </trim> | ||||||
|       `name` = #{name,jdbcType=VARCHAR} |             <trim prefix="`action` = case" suffix="end,"> | ||||||
|     where id = #{id,jdbcType=INTEGER} |                 <foreach collection="list" index="index" item="item"> | ||||||
|   </update> |                     when id = #{item.id,jdbcType=INTEGER} then #{item.action,jdbcType=VARCHAR} | ||||||
|   <update id="updateBatch" parameterType="java.util.List"> |                 </foreach> | ||||||
|     <!--@mbg.generated--> |             </trim> | ||||||
|     update inv_warehouse_bussiness_type |             <trim prefix="`name` = case" suffix="end,"> | ||||||
|     <trim prefix="set" suffixOverrides=","> |                 <foreach collection="list" index="index" item="item"> | ||||||
|       <trim prefix="code = case" suffix="end,"> |                     when id = #{item.id,jdbcType=INTEGER} then #{item.name,jdbcType=VARCHAR} | ||||||
|         <foreach collection="list" index="index" item="item"> |                 </foreach> | ||||||
|           when id = #{item.id,jdbcType=INTEGER} then #{item.code,jdbcType=VARCHAR} |             </trim> | ||||||
|         </foreach> |         </trim> | ||||||
|       </trim> |         where id in | ||||||
|       <trim prefix="`action` = case" suffix="end,"> |         <foreach close=")" collection="list" item="item" open="(" separator=", "> | ||||||
|         <foreach collection="list" index="index" item="item"> |             #{item.id,jdbcType=INTEGER} | ||||||
|           when id = #{item.id,jdbcType=INTEGER} then #{item.action,jdbcType=VARCHAR} |  | ||||||
|         </foreach> |         </foreach> | ||||||
|       </trim> |     </update> | ||||||
|       <trim prefix="`name` = case" suffix="end,"> |     <update id="updateBatchSelective" parameterType="java.util.List"> | ||||||
|         <foreach collection="list" index="index" item="item"> |         <!--@mbg.generated--> | ||||||
|           when id = #{item.id,jdbcType=INTEGER} then #{item.name,jdbcType=VARCHAR} |         update inv_warehouse_bussiness_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="`action` = case" suffix="end,"> | ||||||
|  |                 <foreach collection="list" index="index" item="item"> | ||||||
|  |                     <if test="item.action != null"> | ||||||
|  |                         when id = #{item.id,jdbcType=INTEGER} then #{item.action,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> | ||||||
|  |         where id in | ||||||
|  |         <foreach close=")" collection="list" item="item" open="(" separator=", "> | ||||||
|  |             #{item.id,jdbcType=INTEGER} | ||||||
|         </foreach> |         </foreach> | ||||||
|       </trim> |     </update> | ||||||
|     </trim> |     <insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true"> | ||||||
|     where id in |         <!--@mbg.generated--> | ||||||
|     <foreach close=")" collection="list" item="item" open="(" separator=", "> |         insert into inv_warehouse_bussiness_type | ||||||
|       #{item.id,jdbcType=INTEGER} |         (code, `action`, `name`) | ||||||
|     </foreach> |         values | ||||||
|   </update> |         <foreach collection="list" item="item" separator=","> | ||||||
|   <update id="updateBatchSelective" parameterType="java.util.List"> |             (#{item.code,jdbcType=VARCHAR}, #{item.action,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR} | ||||||
|     <!--@mbg.generated--> |             ) | ||||||
|     update inv_warehouse_bussiness_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> |         </foreach> | ||||||
|       </trim> |     </insert> | ||||||
|       <trim prefix="`action` = case" suffix="end,"> |     <insert id="insertOrUpdate" keyColumn="id" keyProperty="id" | ||||||
|         <foreach collection="list" index="index" item="item"> |             parameterType="com.glxp.sale.admin.entity.inout.WarehouseBussinessTypeEntity" useGeneratedKeys="true"> | ||||||
|           <if test="item.action != null"> |         <!--@mbg.generated--> | ||||||
|             when id = #{item.id,jdbcType=INTEGER} then #{item.action,jdbcType=VARCHAR} |         insert into inv_warehouse_bussiness_type | ||||||
|           </if> |         <trim prefix="(" suffix=")" suffixOverrides=","> | ||||||
|         </foreach> |             <if test="id != null"> | ||||||
|       </trim> |                 id, | ||||||
|       <trim prefix="`name` = case" suffix="end,"> |             </if> | ||||||
|         <foreach collection="list" index="index" item="item"> |             code, | ||||||
|           <if test="item.name != null"> |             `action`, | ||||||
|             when id = #{item.id,jdbcType=INTEGER} then #{item.name,jdbcType=VARCHAR} |             `name`, | ||||||
|           </if> |         </trim> | ||||||
|         </foreach> |         values | ||||||
|       </trim> |         <trim prefix="(" suffix=")" suffixOverrides=","> | ||||||
|     </trim> |             <if test="id != null"> | ||||||
|     where id in |                 #{id,jdbcType=INTEGER}, | ||||||
|     <foreach close=")" collection="list" item="item" open="(" separator=", "> |             </if> | ||||||
|       #{item.id,jdbcType=INTEGER} |             #{code,jdbcType=VARCHAR}, | ||||||
|     </foreach> |             #{action,jdbcType=VARCHAR}, | ||||||
|   </update> |             #{name,jdbcType=VARCHAR}, | ||||||
|   <insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true"> |         </trim> | ||||||
|     <!--@mbg.generated--> |         on duplicate key update | ||||||
|     insert into inv_warehouse_bussiness_type |         <trim suffixOverrides=","> | ||||||
|     (code, `action`, `name`) |             <if test="id != null"> | ||||||
|     values |                 id = #{id,jdbcType=INTEGER}, | ||||||
|     <foreach collection="list" item="item" separator=","> |             </if> | ||||||
|       (#{item.code,jdbcType=VARCHAR}, #{item.action,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR} |             code = #{code,jdbcType=VARCHAR}, | ||||||
|         ) |             `action` = #{action,jdbcType=VARCHAR}, | ||||||
|     </foreach> |             `name` = #{name,jdbcType=VARCHAR}, | ||||||
|   </insert> |         </trim> | ||||||
|   <insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.glxp.sale.admin.entity.inout.WarehouseBussinessTypeEntity" useGeneratedKeys="true"> |     </insert> | ||||||
|     <!--@mbg.generated--> |     <insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id" | ||||||
|     insert into inv_warehouse_bussiness_type |             parameterType="com.glxp.sale.admin.entity.inout.WarehouseBussinessTypeEntity" useGeneratedKeys="true"> | ||||||
|     <trim prefix="(" suffix=")" suffixOverrides=","> |         <!--@mbg.generated--> | ||||||
|       <if test="id != null"> |         insert into inv_warehouse_bussiness_type | ||||||
|         id, |         <trim prefix="(" suffix=")" suffixOverrides=","> | ||||||
|       </if> |             <if test="id != null"> | ||||||
|       code, |                 id, | ||||||
|       `action`, |             </if> | ||||||
|       `name`, |             <if test="code != null"> | ||||||
|     </trim> |                 code, | ||||||
|     values |             </if> | ||||||
|     <trim prefix="(" suffix=")" suffixOverrides=","> |             <if test="action != null"> | ||||||
|       <if test="id != null"> |                 `action`, | ||||||
|         #{id,jdbcType=INTEGER}, |             </if> | ||||||
|       </if> |             <if test="name != null"> | ||||||
|       #{code,jdbcType=VARCHAR}, |                 `name`, | ||||||
|       #{action,jdbcType=VARCHAR}, |             </if> | ||||||
|       #{name,jdbcType=VARCHAR}, |         </trim> | ||||||
|     </trim> |         values | ||||||
|     on duplicate key update  |         <trim prefix="(" suffix=")" suffixOverrides=","> | ||||||
|     <trim suffixOverrides=","> |             <if test="id != null"> | ||||||
|       <if test="id != null"> |                 #{id,jdbcType=INTEGER}, | ||||||
|         id = #{id,jdbcType=INTEGER}, |             </if> | ||||||
|       </if> |             <if test="code != null"> | ||||||
|       code = #{code,jdbcType=VARCHAR}, |                 #{code,jdbcType=VARCHAR}, | ||||||
|       `action` = #{action,jdbcType=VARCHAR}, |             </if> | ||||||
|       `name` = #{name,jdbcType=VARCHAR}, |             <if test="action != null"> | ||||||
|     </trim> |                 #{action,jdbcType=VARCHAR}, | ||||||
|   </insert> |             </if> | ||||||
|   <insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id" parameterType="com.glxp.sale.admin.entity.inout.WarehouseBussinessTypeEntity" useGeneratedKeys="true"> |             <if test="name != null"> | ||||||
|     <!--@mbg.generated--> |                 #{name,jdbcType=VARCHAR}, | ||||||
|     insert into inv_warehouse_bussiness_type |             </if> | ||||||
|     <trim prefix="(" suffix=")" suffixOverrides=","> |         </trim> | ||||||
|       <if test="id != null"> |         on duplicate key update | ||||||
|         id, |         <trim suffixOverrides=","> | ||||||
|       </if> |             <if test="id != null"> | ||||||
|       <if test="code != null"> |                 id = #{id,jdbcType=INTEGER}, | ||||||
|         code, |             </if> | ||||||
|       </if> |             <if test="code != null"> | ||||||
|       <if test="action != null"> |                 code = #{code,jdbcType=VARCHAR}, | ||||||
|         `action`, |             </if> | ||||||
|       </if> |             <if test="action != null"> | ||||||
|       <if test="name != null"> |                 `action` = #{action,jdbcType=VARCHAR}, | ||||||
|         `name`, |             </if> | ||||||
|       </if> |             <if test="name != null"> | ||||||
|     </trim> |                 `name` = #{name,jdbcType=VARCHAR}, | ||||||
|     values |             </if> | ||||||
|     <trim prefix="(" suffix=")" suffixOverrides=","> |         </trim> | ||||||
|       <if test="id != null"> |     </insert> | ||||||
|         #{id,jdbcType=INTEGER}, |  | ||||||
|       </if> |  | ||||||
|       <if test="code != null"> |  | ||||||
|         #{code,jdbcType=VARCHAR}, |  | ||||||
|       </if> |  | ||||||
|       <if test="action != null"> |  | ||||||
|         #{action,jdbcType=VARCHAR}, |  | ||||||
|       </if> |  | ||||||
|       <if test="name != null"> |  | ||||||
|         #{name,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="action != null"> |  | ||||||
|         `action` = #{action,jdbcType=VARCHAR}, |  | ||||||
|       </if> |  | ||||||
|       <if test="name != null"> |  | ||||||
|         `name` = #{name,jdbcType=VARCHAR}, |  | ||||||
|       </if> |  | ||||||
|     </trim> |  | ||||||
|   </insert> |  | ||||||
| 
 | 
 | ||||||
|   <select id="selectListByCode" resultMap="BaseResultMap"> |     <select id="selectListByCode" resultMap="BaseResultMap"> | ||||||
|     select * from inv_warehouse_bussiness_type where code = #{code} |         select inv_warehouse_bussiness_type.code, inv_warehouse_bussiness_type.action, basic_bussiness_type.name | ||||||
|  |         from inv_warehouse_bussiness_type | ||||||
|  |                  inner join basic_bussiness_type on inv_warehouse_bussiness_type.action = basic_bussiness_type.action | ||||||
|  |         where code = #{code} | ||||||
|     </select> |     </select> | ||||||
| 
 | 
 | ||||||
|   <delete id="deleteByCode"> |     <delete id="deleteByCode"> | ||||||
|     delete from inv_warehouse_bussiness_type where code = #{code} |         delete | ||||||
|   </delete> |         from inv_warehouse_bussiness_type | ||||||
|  |         where code = #{code} | ||||||
|  |     </delete> | ||||||
| </mapper> | </mapper> | ||||||
| @ -1,252 +1,266 @@ | |||||||
| <?xml version="1.0" encoding="UTF-8"?> | <?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"> | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||||||
| <mapper namespace="com.glxp.sale.admin.dao.inout.WarehouseUserDao"> | <mapper namespace="com.glxp.sale.admin.dao.inout.WarehouseUserDao"> | ||||||
|   <resultMap id="BaseResultMap" type="com.glxp.sale.admin.entity.inout.WarehouseUserEntity"> |     <resultMap id="BaseResultMap" type="com.glxp.sale.admin.entity.inout.WarehouseUserEntity"> | ||||||
|     <!--@mbg.generated--> |         <!--@mbg.generated--> | ||||||
|     <!--@Table inv_warehouse_user--> |         <!--@Table inv_warehouse_user--> | ||||||
|     <id column="id" jdbcType="INTEGER" property="id" /> |         <id column="id" jdbcType="INTEGER" property="id"/> | ||||||
|     <result column="code" jdbcType="VARCHAR" property="code" /> |         <result column="code" jdbcType="VARCHAR" property="code"/> | ||||||
|     <result column="userId" jdbcType="BIGINT" property="userid" /> |         <result column="userId" jdbcType="BIGINT" property="userid"/> | ||||||
|     <result column="userName" jdbcType="VARCHAR" property="username" /> |         <result column="userName" jdbcType="VARCHAR" property="username"/> | ||||||
|     <result column="isDirector" javaType="boolean" property="isDirector" /> |         <result column="isDirector" javaType="boolean" property="isDirector"/> | ||||||
|   </resultMap> |     </resultMap> | ||||||
|   <sql id="Base_Column_List"> |     <sql id="Base_Column_List"> | ||||||
|     <!--@mbg.generated--> |         <!--@mbg.generated--> | ||||||
|     id, code, userId, userName, isDirector |         id, code, userId, userName, isDirector | ||||||
|   </sql> |     </sql> | ||||||
|   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> |     <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> | ||||||
|     <!--@mbg.generated--> |         <!--@mbg.generated--> | ||||||
|     select  |         select | ||||||
|     <include refid="Base_Column_List" /> |         <include refid="Base_Column_List"/> | ||||||
|     from inv_warehouse_user |         from inv_warehouse_user | ||||||
|     where id = #{id,jdbcType=INTEGER} |         where id = #{id,jdbcType=INTEGER} | ||||||
|   </select> |     </select> | ||||||
|   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> |     <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> | ||||||
|     <!--@mbg.generated--> |         <!--@mbg.generated--> | ||||||
|     delete from inv_warehouse_user |         delete from inv_warehouse_user | ||||||
|     where id = #{id,jdbcType=INTEGER} |         where id = #{id,jdbcType=INTEGER} | ||||||
|   </delete> |     </delete> | ||||||
|   <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.glxp.sale.admin.entity.inout.WarehouseUserEntity" useGeneratedKeys="true"> |     <insert id="insert" keyColumn="id" keyProperty="id" | ||||||
|     <!--@mbg.generated--> |             parameterType="com.glxp.sale.admin.entity.inout.WarehouseUserEntity" useGeneratedKeys="true"> | ||||||
|     insert into inv_warehouse_user (code, userId, userName, isDirector |         <!--@mbg.generated--> | ||||||
|       ) |         insert into inv_warehouse_user (code, userId, userName, isDirector | ||||||
|     values (#{code,jdbcType=VARCHAR}, #{userid,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR}, #{isDirector} |         ) | ||||||
|       ) |         values (#{code,jdbcType=VARCHAR}, #{userid,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR}, #{isDirector} | ||||||
|   </insert> |         ) | ||||||
|   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.glxp.sale.admin.entity.inout.WarehouseUserEntity" useGeneratedKeys="true"> |     </insert> | ||||||
|     <!--@mbg.generated--> |     <insert id="insertSelective" keyColumn="id" keyProperty="id" | ||||||
|     insert into inv_warehouse_user |             parameterType="com.glxp.sale.admin.entity.inout.WarehouseUserEntity" useGeneratedKeys="true"> | ||||||
|     <trim prefix="(" suffix=")" suffixOverrides=","> |         <!--@mbg.generated--> | ||||||
|       <if test="code != null"> |         insert into inv_warehouse_user | ||||||
|         code, |         <trim prefix="(" suffix=")" suffixOverrides=","> | ||||||
|       </if> |             <if test="code != null"> | ||||||
|       <if test="userid != null"> |                 code, | ||||||
|         userId, |             </if> | ||||||
|       </if> |             <if test="userid != null"> | ||||||
|       <if test="username != null"> |                 userId, | ||||||
|         userName, |             </if> | ||||||
|       </if> |             <if test="username != null"> | ||||||
|       isDirector |                 userName, | ||||||
|     </trim> |             </if> | ||||||
|     <trim prefix="values (" suffix=")" suffixOverrides=","> |             isDirector | ||||||
|       <if test="code != null"> |         </trim> | ||||||
|         #{code,jdbcType=VARCHAR}, |         <trim prefix="values (" suffix=")" suffixOverrides=","> | ||||||
|       </if> |             <if test="code != null"> | ||||||
|       <if test="userid != null"> |                 #{code,jdbcType=VARCHAR}, | ||||||
|         #{userid,jdbcType=BIGINT}, |             </if> | ||||||
|       </if> |             <if test="userid != null"> | ||||||
|       <if test="username != null"> |                 #{userid,jdbcType=BIGINT}, | ||||||
|         #{username,jdbcType=VARCHAR}, |             </if> | ||||||
|       </if> |             <if test="username != null"> | ||||||
|       #{isDirector} |                 #{username,jdbcType=VARCHAR}, | ||||||
|     </trim> |             </if> | ||||||
|   </insert> |             #{isDirector} | ||||||
|   <update id="updateByPrimaryKeySelective" parameterType="com.glxp.sale.admin.entity.inout.WarehouseUserEntity"> |         </trim> | ||||||
|     <!--@mbg.generated--> |     </insert> | ||||||
|     update inv_warehouse_user |     <update id="updateByPrimaryKeySelective" parameterType="com.glxp.sale.admin.entity.inout.WarehouseUserEntity"> | ||||||
|     <set> |         <!--@mbg.generated--> | ||||||
|       <if test="code != null"> |         update inv_warehouse_user | ||||||
|         code = #{code,jdbcType=VARCHAR}, |         <set> | ||||||
|       </if> |             <if test="code != null"> | ||||||
|       <if test="userid != null"> |                 code = #{code,jdbcType=VARCHAR}, | ||||||
|  |             </if> | ||||||
|  |             <if test="userid != null"> | ||||||
|  |                 userId = #{userid,jdbcType=BIGINT}, | ||||||
|  |             </if> | ||||||
|  |             <if test="username != null"> | ||||||
|  |                 userName = #{username,jdbcType=VARCHAR}, | ||||||
|  |             </if> | ||||||
|  |         </set> | ||||||
|  |         isDirector = #{isDirector} | ||||||
|  |         where id = #{id,jdbcType=INTEGER} | ||||||
|  |     </update> | ||||||
|  |     <update id="updateByPrimaryKey" parameterType="com.glxp.sale.admin.entity.inout.WarehouseUserEntity"> | ||||||
|  |         <!--@mbg.generated--> | ||||||
|  |         update inv_warehouse_user | ||||||
|  |         set code = #{code,jdbcType=VARCHAR}, | ||||||
|         userId = #{userid,jdbcType=BIGINT}, |         userId = #{userid,jdbcType=BIGINT}, | ||||||
|       </if> |         userName = #{username,jdbcType=VARCHAR} | ||||||
|       <if test="username != null"> |         isDirector = #{isDirector} | ||||||
|         userName = #{username,jdbcType=VARCHAR}, |         where id = #{id,jdbcType=INTEGER} | ||||||
|       </if> |     </update> | ||||||
|     </set> |     <update id="updateBatch" parameterType="java.util.List"> | ||||||
|     isDirector = #{isDirector} |         <!--@mbg.generated--> | ||||||
|     where id = #{id,jdbcType=INTEGER} |         update inv_warehouse_user | ||||||
|   </update> |         <trim prefix="set" suffixOverrides=","> | ||||||
|   <update id="updateByPrimaryKey" parameterType="com.glxp.sale.admin.entity.inout.WarehouseUserEntity"> |             <trim prefix="code = case" suffix="end,"> | ||||||
|     <!--@mbg.generated--> |                 <foreach collection="list" index="index" item="item"> | ||||||
|     update inv_warehouse_user |                     when id = #{item.id,jdbcType=INTEGER} then #{item.code,jdbcType=VARCHAR} | ||||||
|     set code = #{code,jdbcType=VARCHAR}, |                 </foreach> | ||||||
|       userId = #{userid,jdbcType=BIGINT}, |             </trim> | ||||||
|       userName = #{username,jdbcType=VARCHAR} |             <trim prefix="userId = case" suffix="end,"> | ||||||
|       isDirector = #{isDirector} |                 <foreach collection="list" index="index" item="item"> | ||||||
|     where id = #{id,jdbcType=INTEGER} |                     when id = #{item.id,jdbcType=INTEGER} then #{item.userid,jdbcType=BIGINT} | ||||||
|   </update> |                 </foreach> | ||||||
|   <update id="updateBatch" parameterType="java.util.List"> |             </trim> | ||||||
|     <!--@mbg.generated--> |             <trim prefix="userName = case" suffix="end,"> | ||||||
|     update inv_warehouse_user |                 <foreach collection="list" index="index" item="item"> | ||||||
|     <trim prefix="set" suffixOverrides=","> |                     when id = #{item.id,jdbcType=INTEGER} then #{item.username,jdbcType=VARCHAR} | ||||||
|       <trim prefix="code = case" suffix="end,"> |                 </foreach> | ||||||
|         <foreach collection="list" index="index" item="item"> |             </trim> | ||||||
|           when id = #{item.id,jdbcType=INTEGER} then #{item.code,jdbcType=VARCHAR} |         </trim> | ||||||
|         </foreach> |         where id in | ||||||
|       </trim> |         <foreach close=")" collection="list" item="item" open="(" separator=", "> | ||||||
|       <trim prefix="userId = case" suffix="end,"> |             #{item.id,jdbcType=INTEGER} | ||||||
|         <foreach collection="list" index="index" item="item"> |  | ||||||
|           when id = #{item.id,jdbcType=INTEGER} then #{item.userid,jdbcType=BIGINT} |  | ||||||
|         </foreach> |  | ||||||
|       </trim> |  | ||||||
|       <trim prefix="userName = case" suffix="end,"> |  | ||||||
|         <foreach collection="list" index="index" item="item"> |  | ||||||
|           when id = #{item.id,jdbcType=INTEGER} then #{item.username,jdbcType=VARCHAR} |  | ||||||
|         </foreach> |         </foreach> | ||||||
|       </trim> |     </update> | ||||||
|     </trim> |     <update id="updateBatchSelective" parameterType="java.util.List"> | ||||||
|     where id in |         <!--@mbg.generated--> | ||||||
|     <foreach close=")" collection="list" item="item" open="(" separator=", "> |         update inv_warehouse_user | ||||||
|       #{item.id,jdbcType=INTEGER} |         <trim prefix="set" suffixOverrides=","> | ||||||
|     </foreach> |             <trim prefix="code = case" suffix="end,"> | ||||||
|   </update> |                 <foreach collection="list" index="index" item="item"> | ||||||
|   <update id="updateBatchSelective" parameterType="java.util.List"> |                     <if test="item.code != null"> | ||||||
|     <!--@mbg.generated--> |                         when id = #{item.id,jdbcType=INTEGER} then #{item.code,jdbcType=VARCHAR} | ||||||
|     update inv_warehouse_user |                     </if> | ||||||
|     <trim prefix="set" suffixOverrides=","> |                 </foreach> | ||||||
|       <trim prefix="code = case" suffix="end,"> |             </trim> | ||||||
|         <foreach collection="list" index="index" item="item"> |             <trim prefix="userId = case" suffix="end,"> | ||||||
|           <if test="item.code != null"> |                 <foreach collection="list" index="index" item="item"> | ||||||
|             when id = #{item.id,jdbcType=INTEGER} then #{item.code,jdbcType=VARCHAR} |                     <if test="item.userid != null"> | ||||||
|           </if> |                         when id = #{item.id,jdbcType=INTEGER} then #{item.userid,jdbcType=BIGINT} | ||||||
|  |                     </if> | ||||||
|  |                 </foreach> | ||||||
|  |             </trim> | ||||||
|  |             <trim prefix="userName = case" suffix="end,"> | ||||||
|  |                 <foreach collection="list" index="index" item="item"> | ||||||
|  |                     <if test="item.username != null"> | ||||||
|  |                         when id = #{item.id,jdbcType=INTEGER} then #{item.username,jdbcType=VARCHAR} | ||||||
|  |                     </if> | ||||||
|  |                 </foreach> | ||||||
|  |             </trim> | ||||||
|  |         </trim> | ||||||
|  |         where id in | ||||||
|  |         <foreach close=")" collection="list" item="item" open="(" separator=", "> | ||||||
|  |             #{item.id,jdbcType=INTEGER} | ||||||
|         </foreach> |         </foreach> | ||||||
|       </trim> |     </update> | ||||||
|       <trim prefix="userId = case" suffix="end,"> |     <insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true"> | ||||||
|         <foreach collection="list" index="index" item="item"> |         <!--@mbg.generated--> | ||||||
|           <if test="item.userid != null"> |         insert into inv_warehouse_user | ||||||
|             when id = #{item.id,jdbcType=INTEGER} then #{item.userid,jdbcType=BIGINT} |         (code, userId, userName, isDirector) | ||||||
|           </if> |         values | ||||||
|  |         <foreach collection="list" item="item" separator=","> | ||||||
|  |             (#{item.code,jdbcType=VARCHAR}, #{item.userid,jdbcType=BIGINT}, #{item.username,jdbcType=VARCHAR}, | ||||||
|  |             #{item.isDirector} | ||||||
|  |             ) | ||||||
|         </foreach> |         </foreach> | ||||||
|       </trim> |     </insert> | ||||||
|       <trim prefix="userName = case" suffix="end,"> |     <insert id="insertOrUpdate" keyColumn="id" keyProperty="id" | ||||||
|         <foreach collection="list" index="index" item="item"> |             parameterType="com.glxp.sale.admin.entity.inout.WarehouseUserEntity" useGeneratedKeys="true"> | ||||||
|           <if test="item.username != null"> |         <!--@mbg.generated--> | ||||||
|             when id = #{item.id,jdbcType=INTEGER} then #{item.username,jdbcType=VARCHAR} |         insert into inv_warehouse_user | ||||||
|           </if> |         <trim prefix="(" suffix=")" suffixOverrides=","> | ||||||
|         </foreach> |             <if test="id != null"> | ||||||
|       </trim> |                 id, | ||||||
|     </trim> |             </if> | ||||||
|     where id in |             code, | ||||||
|     <foreach close=")" collection="list" item="item" open="(" separator=", "> |             userId, | ||||||
|       #{item.id,jdbcType=INTEGER} |             userName, | ||||||
|     </foreach> |             isDirector, | ||||||
|   </update> |         </trim> | ||||||
|   <insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true"> |         values | ||||||
|     <!--@mbg.generated--> |         <trim prefix="(" suffix=")" suffixOverrides=","> | ||||||
|     insert into inv_warehouse_user |             <if test="id != null"> | ||||||
|     (code, userId, userName, isDirector) |                 #{id,jdbcType=INTEGER}, | ||||||
|     values |             </if> | ||||||
|     <foreach collection="list" item="item" separator=","> |             #{code,jdbcType=VARCHAR}, | ||||||
|       (#{item.code,jdbcType=VARCHAR}, #{item.userid,jdbcType=BIGINT}, #{item.username,jdbcType=VARCHAR}, #{item.isDirector} |             #{userid,jdbcType=BIGINT}, | ||||||
|         ) |             #{username,jdbcType=VARCHAR}, | ||||||
|     </foreach> |             #{isDirector} | ||||||
|   </insert> |         </trim> | ||||||
|   <insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.glxp.sale.admin.entity.inout.WarehouseUserEntity" useGeneratedKeys="true"> |         on duplicate key update | ||||||
|     <!--@mbg.generated--> |         <trim suffixOverrides=","> | ||||||
|     insert into inv_warehouse_user |             <if test="id != null"> | ||||||
|     <trim prefix="(" suffix=")" suffixOverrides=","> |                 id = #{id,jdbcType=INTEGER}, | ||||||
|       <if test="id != null"> |             </if> | ||||||
|         id, |             code = #{code,jdbcType=VARCHAR}, | ||||||
|       </if> |             userId = #{userid,jdbcType=BIGINT}, | ||||||
|       code, |             userName = #{username,jdbcType=VARCHAR}, | ||||||
|       userId, |         </trim> | ||||||
|       userName, |     </insert> | ||||||
|       isDirector, |     <insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id" | ||||||
|     </trim> |             parameterType="com.glxp.sale.admin.entity.inout.WarehouseUserEntity" useGeneratedKeys="true"> | ||||||
|     values |         <!--@mbg.generated--> | ||||||
|     <trim prefix="(" suffix=")" suffixOverrides=","> |         insert into inv_warehouse_user | ||||||
|       <if test="id != null"> |         <trim prefix="(" suffix=")" suffixOverrides=","> | ||||||
|         #{id,jdbcType=INTEGER}, |             <if test="id != null"> | ||||||
|       </if> |                 id, | ||||||
|       #{code,jdbcType=VARCHAR}, |             </if> | ||||||
|       #{userid,jdbcType=BIGINT}, |             <if test="code != null"> | ||||||
|       #{username,jdbcType=VARCHAR}, |                 code, | ||||||
|       #{isDirector} |             </if> | ||||||
|     </trim> |             <if test="userid != null"> | ||||||
|     on duplicate key update  |                 userId, | ||||||
|     <trim suffixOverrides=","> |             </if> | ||||||
|       <if test="id != null"> |             <if test="username != null"> | ||||||
|         id = #{id,jdbcType=INTEGER}, |                 userName, | ||||||
|       </if> |             </if> | ||||||
|       code = #{code,jdbcType=VARCHAR}, |         </trim> | ||||||
|       userId = #{userid,jdbcType=BIGINT}, |         values | ||||||
|       userName = #{username,jdbcType=VARCHAR}, |         <trim prefix="(" suffix=")" suffixOverrides=","> | ||||||
|     </trim> |             <if test="id != null"> | ||||||
|   </insert> |                 #{id,jdbcType=INTEGER}, | ||||||
|   <insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id" parameterType="com.glxp.sale.admin.entity.inout.WarehouseUserEntity" useGeneratedKeys="true"> |             </if> | ||||||
|     <!--@mbg.generated--> |             <if test="code != null"> | ||||||
|     insert into inv_warehouse_user |                 #{code,jdbcType=VARCHAR}, | ||||||
|     <trim prefix="(" suffix=")" suffixOverrides=","> |             </if> | ||||||
|       <if test="id != null"> |             <if test="userid != null"> | ||||||
|         id, |                 #{userid,jdbcType=BIGINT}, | ||||||
|       </if> |             </if> | ||||||
|       <if test="code != null"> |             <if test="username != null"> | ||||||
|         code, |                 #{username,jdbcType=VARCHAR}, | ||||||
|       </if> |             </if> | ||||||
|       <if test="userid != null"> |         </trim> | ||||||
|         userId, |         on duplicate key update | ||||||
|       </if> |         <trim suffixOverrides=","> | ||||||
|       <if test="username != null"> |             <if test="id != null"> | ||||||
|         userName, |                 id = #{id,jdbcType=INTEGER}, | ||||||
|       </if> |             </if> | ||||||
|     </trim> |             <if test="code != null"> | ||||||
|     values |                 code = #{code,jdbcType=VARCHAR}, | ||||||
|     <trim prefix="(" suffix=")" suffixOverrides=","> |             </if> | ||||||
|       <if test="id != null"> |             <if test="userid != null"> | ||||||
|         #{id,jdbcType=INTEGER}, |                 userId = #{userid,jdbcType=BIGINT}, | ||||||
|       </if> |             </if> | ||||||
|       <if test="code != null"> |             <if test="username != null"> | ||||||
|         #{code,jdbcType=VARCHAR}, |                 userName = #{username,jdbcType=VARCHAR}, | ||||||
|       </if> |             </if> | ||||||
|       <if test="userid != null"> |         </trim> | ||||||
|         #{userid,jdbcType=BIGINT}, |     </insert> | ||||||
|       </if> |  | ||||||
|       <if test="username != null"> |  | ||||||
|         #{username,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="userid != null"> |  | ||||||
|         userId = #{userid,jdbcType=BIGINT}, |  | ||||||
|       </if> |  | ||||||
|       <if test="username != null"> |  | ||||||
|         userName = #{username,jdbcType=VARCHAR}, |  | ||||||
|       </if> |  | ||||||
|     </trim> |  | ||||||
|   </insert> |  | ||||||
| 
 | 
 | ||||||
|   <select id="selectListByCode" resultMap="BaseResultMap"> |     <select id="selectListByCode" resultMap="BaseResultMap"> | ||||||
|     select * from inv_warehouse_user where code = #{code} |         select inv_warehouse_user.*, auth_user.employeeName | ||||||
|   </select> |         from inv_warehouse_user | ||||||
|  |         inner join auth_user on auth_user.id = inv_warehouse_user.userId | ||||||
|  |         where code = #{code} | ||||||
|  |     </select> | ||||||
| 
 | 
 | ||||||
|   <delete id="deleteByCode"> |     <delete id="deleteByCode"> | ||||||
|     delete from inv_warehouse_user where code = #{code} |         delete | ||||||
|   </delete> |         from inv_warehouse_user | ||||||
|  |         where code = #{code} | ||||||
|  |     </delete> | ||||||
| 
 | 
 | ||||||
|   <update id="updateDirector"> |     <update id="updateDirector"> | ||||||
|     update inv_warehouse_user set isDirector = #{isDirector} where code = #{code} |         update inv_warehouse_user | ||||||
|   </update> |         set isDirector = #{isDirector} | ||||||
|  |         where code = #{code} | ||||||
|  |     </update> | ||||||
| 
 | 
 | ||||||
|   <update id="updateDirectorById"> |     <update id="updateDirectorById"> | ||||||
|     update inv_warehouse_user set isDirector = #{isDirector} where id = #{id} |         update inv_warehouse_user | ||||||
|   </update> |         set isDirector = #{isDirector} | ||||||
|  |         where id = #{id} | ||||||
|  |     </update> | ||||||
| </mapper> | </mapper> | ||||||
					Loading…
					
					
				
		Reference in New Issue