1.添加仓库字典关联表实体类和dao,service类
parent
25348c43a4
commit
94b9941e49
@ -0,0 +1,30 @@
|
|||||||
|
package com.glxp.sale.admin.dao.inout;
|
||||||
|
|
||||||
|
import com.glxp.sale.admin.entity.inout.WarehouseBussinessTypeEntity;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface WarehouseBussinessTypeDao {
|
||||||
|
int deleteByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
int insert(WarehouseBussinessTypeEntity record);
|
||||||
|
|
||||||
|
int insertOrUpdate(WarehouseBussinessTypeEntity record);
|
||||||
|
|
||||||
|
int insertOrUpdateSelective(WarehouseBussinessTypeEntity record);
|
||||||
|
|
||||||
|
int insertSelective(WarehouseBussinessTypeEntity record);
|
||||||
|
|
||||||
|
WarehouseBussinessTypeEntity selectByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(WarehouseBussinessTypeEntity record);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(WarehouseBussinessTypeEntity record);
|
||||||
|
|
||||||
|
int updateBatch(List<WarehouseBussinessTypeEntity> list);
|
||||||
|
|
||||||
|
int updateBatchSelective(List<WarehouseBussinessTypeEntity> list);
|
||||||
|
|
||||||
|
int batchInsert(@Param("list") List<WarehouseBussinessTypeEntity> list);
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
package com.glxp.sale.admin.dao.inout;
|
||||||
|
|
||||||
|
import com.glxp.sale.admin.entity.inout.WarehouseUserEntity;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface WarehouseUserDao {
|
||||||
|
int deleteByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
int insert(WarehouseUserEntity record);
|
||||||
|
|
||||||
|
int insertOrUpdate(WarehouseUserEntity record);
|
||||||
|
|
||||||
|
int insertOrUpdateSelective(WarehouseUserEntity record);
|
||||||
|
|
||||||
|
int insertSelective(WarehouseUserEntity record);
|
||||||
|
|
||||||
|
WarehouseUserEntity selectByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(WarehouseUserEntity record);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(WarehouseUserEntity record);
|
||||||
|
|
||||||
|
int updateBatch(List<WarehouseUserEntity> list);
|
||||||
|
|
||||||
|
int updateBatchSelective(List<WarehouseUserEntity> list);
|
||||||
|
|
||||||
|
int batchInsert(@Param("list") List<WarehouseUserEntity> list);
|
||||||
|
|
||||||
|
List<WarehouseUserEntity> selectWarehouseUserListByCode(@Param("code") String code);
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package com.glxp.sale.admin.entity.inout;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库字典-单据类型关联表
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WarehouseBussinessTypeEntity {
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓位码
|
||||||
|
*/
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务类型
|
||||||
|
*/
|
||||||
|
private String action;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package com.glxp.sale.admin.entity.inout;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库字典-用户关联表
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WarehouseUserEntity {
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓位码
|
||||||
|
*/
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
private Long userid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户名/登录账号
|
||||||
|
*/
|
||||||
|
private String username;
|
||||||
|
}
|
@ -0,0 +1,4 @@
|
|||||||
|
package com.glxp.sale.admin.service.inout;
|
||||||
|
|
||||||
|
public interface WarehouseBussinessTypeService {
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
package com.glxp.sale.admin.service.inout;
|
||||||
|
|
||||||
|
import com.glxp.sale.admin.entity.inout.WarehouseUserEntity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface WarehouseUserService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询仓库信息关联的用户数据
|
||||||
|
*
|
||||||
|
* @param code 仓位码
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<WarehouseUserEntity> getWarehouseUserList(String code);
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.glxp.sale.admin.service.inout.impl;
|
||||||
|
|
||||||
|
import com.glxp.sale.admin.dao.inout.WarehouseBussinessTypeDao;
|
||||||
|
import com.glxp.sale.admin.service.inout.WarehouseBussinessTypeService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
public class WarehouseBussinessTypeServiceImpl implements WarehouseBussinessTypeService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private WarehouseBussinessTypeDao warehouseBussinessTypeDao;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.glxp.sale.admin.service.inout.impl;
|
||||||
|
|
||||||
|
import com.glxp.sale.admin.dao.inout.WarehouseUserDao;
|
||||||
|
import com.glxp.sale.admin.entity.inout.WarehouseUserEntity;
|
||||||
|
import com.glxp.sale.admin.service.inout.WarehouseUserService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
public class WarehouseUserServiceImpl implements WarehouseUserService {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private WarehouseUserDao warehouseUserDao;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<WarehouseUserEntity> getWarehouseUserList(String code) {
|
||||||
|
return warehouseUserDao.selectWarehouseUserListByCode(code);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,229 @@
|
|||||||
|
<?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.sale.admin.dao.inout.WarehouseBussinessTypeDao">
|
||||||
|
<resultMap id="BaseResultMap" type="com.glxp.sale.admin.entity.inout.WarehouseBussinessTypeEntity">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table inv_warehouse_bussiness_type-->
|
||||||
|
<id column="id" jdbcType="INTEGER" property="id" />
|
||||||
|
<result column="code" jdbcType="VARCHAR" property="code" />
|
||||||
|
<result column="action" jdbcType="VARCHAR" property="action" />
|
||||||
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
id, code, `action`, `name`
|
||||||
|
</sql>
|
||||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from inv_warehouse_bussiness_type
|
||||||
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
delete from inv_warehouse_bussiness_type
|
||||||
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</delete>
|
||||||
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.glxp.sale.admin.entity.inout.WarehouseBussinessTypeEntity" useGeneratedKeys="true">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
insert into inv_warehouse_bussiness_type (code, `action`, `name`
|
||||||
|
)
|
||||||
|
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">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
insert into inv_warehouse_bussiness_type
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="code != null">
|
||||||
|
code,
|
||||||
|
</if>
|
||||||
|
<if test="action != null">
|
||||||
|
`action`,
|
||||||
|
</if>
|
||||||
|
<if test="name != null">
|
||||||
|
`name`,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<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>
|
||||||
|
</insert>
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="com.glxp.sale.admin.entity.inout.WarehouseBussinessTypeEntity">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
update inv_warehouse_bussiness_type
|
||||||
|
<set>
|
||||||
|
<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},
|
||||||
|
`name` = #{name,jdbcType=VARCHAR}
|
||||||
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</update>
|
||||||
|
<update id="updateBatch" parameterType="java.util.List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
update inv_warehouse_bussiness_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="`action` = case" suffix="end,">
|
||||||
|
<foreach collection="list" index="index" item="item">
|
||||||
|
when id = #{item.id,jdbcType=INTEGER} then #{item.action,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>
|
||||||
|
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 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>
|
||||||
|
</update>
|
||||||
|
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
insert into inv_warehouse_bussiness_type
|
||||||
|
(code, `action`, `name`)
|
||||||
|
values
|
||||||
|
<foreach collection="list" item="item" separator=",">
|
||||||
|
(#{item.code,jdbcType=VARCHAR}, #{item.action,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}
|
||||||
|
)
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.glxp.sale.admin.entity.inout.WarehouseBussinessTypeEntity" useGeneratedKeys="true">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
insert into inv_warehouse_bussiness_type
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
id,
|
||||||
|
</if>
|
||||||
|
code,
|
||||||
|
`action`,
|
||||||
|
`name`,
|
||||||
|
</trim>
|
||||||
|
values
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
#{id,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
#{code,jdbcType=VARCHAR},
|
||||||
|
#{action,jdbcType=VARCHAR},
|
||||||
|
#{name,jdbcType=VARCHAR},
|
||||||
|
</trim>
|
||||||
|
on duplicate key update
|
||||||
|
<trim suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
id = #{id,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
code = #{code,jdbcType=VARCHAR},
|
||||||
|
`action` = #{action,jdbcType=VARCHAR},
|
||||||
|
`name` = #{name,jdbcType=VARCHAR},
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id" parameterType="com.glxp.sale.admin.entity.inout.WarehouseBussinessTypeEntity" useGeneratedKeys="true">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
insert into inv_warehouse_bussiness_type
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
id,
|
||||||
|
</if>
|
||||||
|
<if test="code != null">
|
||||||
|
code,
|
||||||
|
</if>
|
||||||
|
<if test="action != null">
|
||||||
|
`action`,
|
||||||
|
</if>
|
||||||
|
<if test="name != null">
|
||||||
|
`name`,
|
||||||
|
</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="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>
|
||||||
|
</mapper>
|
@ -0,0 +1,233 @@
|
|||||||
|
<?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.sale.admin.dao.inout.WarehouseUserDao">
|
||||||
|
<resultMap id="BaseResultMap" type="com.glxp.sale.admin.entity.inout.WarehouseUserEntity">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table inv_warehouse_user-->
|
||||||
|
<id column="id" jdbcType="INTEGER" property="id" />
|
||||||
|
<result column="code" jdbcType="VARCHAR" property="code" />
|
||||||
|
<result column="userId" jdbcType="BIGINT" property="userid" />
|
||||||
|
<result column="userName" jdbcType="VARCHAR" property="username" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
id, code, userId, userName
|
||||||
|
</sql>
|
||||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from inv_warehouse_user
|
||||||
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
delete from inv_warehouse_user
|
||||||
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</delete>
|
||||||
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.glxp.sale.admin.entity.inout.WarehouseUserEntity" useGeneratedKeys="true">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
insert into inv_warehouse_user (code, userId, userName
|
||||||
|
)
|
||||||
|
values (#{code,jdbcType=VARCHAR}, #{userid,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR}
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.glxp.sale.admin.entity.inout.WarehouseUserEntity" useGeneratedKeys="true">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
insert into inv_warehouse_user
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="code != null">
|
||||||
|
code,
|
||||||
|
</if>
|
||||||
|
<if test="userid != null">
|
||||||
|
userId,
|
||||||
|
</if>
|
||||||
|
<if test="username != null">
|
||||||
|
userName,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="code != null">
|
||||||
|
#{code,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="userid != null">
|
||||||
|
#{userid,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="username != null">
|
||||||
|
#{username,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="com.glxp.sale.admin.entity.inout.WarehouseUserEntity">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
update inv_warehouse_user
|
||||||
|
<set>
|
||||||
|
<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>
|
||||||
|
</set>
|
||||||
|
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},
|
||||||
|
userName = #{username,jdbcType=VARCHAR}
|
||||||
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</update>
|
||||||
|
<update id="updateBatch" parameterType="java.util.List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
update inv_warehouse_user
|
||||||
|
<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="userId = case" suffix="end,">
|
||||||
|
<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>
|
||||||
|
</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 inv_warehouse_user
|
||||||
|
<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="userId = case" suffix="end,">
|
||||||
|
<foreach collection="list" index="index" item="item">
|
||||||
|
<if test="item.userid != null">
|
||||||
|
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>
|
||||||
|
</update>
|
||||||
|
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
insert into inv_warehouse_user
|
||||||
|
(code, userId, userName)
|
||||||
|
values
|
||||||
|
<foreach collection="list" item="item" separator=",">
|
||||||
|
(#{item.code,jdbcType=VARCHAR}, #{item.userid,jdbcType=BIGINT}, #{item.username,jdbcType=VARCHAR}
|
||||||
|
)
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.glxp.sale.admin.entity.inout.WarehouseUserEntity" useGeneratedKeys="true">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
insert into inv_warehouse_user
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
id,
|
||||||
|
</if>
|
||||||
|
code,
|
||||||
|
userId,
|
||||||
|
userName,
|
||||||
|
</trim>
|
||||||
|
values
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
#{id,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
#{code,jdbcType=VARCHAR},
|
||||||
|
#{userid,jdbcType=BIGINT},
|
||||||
|
#{username,jdbcType=VARCHAR},
|
||||||
|
</trim>
|
||||||
|
on duplicate key update
|
||||||
|
<trim suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
id = #{id,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
code = #{code,jdbcType=VARCHAR},
|
||||||
|
userId = #{userid,jdbcType=BIGINT},
|
||||||
|
userName = #{username,jdbcType=VARCHAR},
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id" parameterType="com.glxp.sale.admin.entity.inout.WarehouseUserEntity" useGeneratedKeys="true">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
insert into inv_warehouse_user
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
id,
|
||||||
|
</if>
|
||||||
|
<if test="code != null">
|
||||||
|
code,
|
||||||
|
</if>
|
||||||
|
<if test="userid != null">
|
||||||
|
userId,
|
||||||
|
</if>
|
||||||
|
<if test="username != null">
|
||||||
|
userName,
|
||||||
|
</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="userid != null">
|
||||||
|
#{userid,jdbcType=BIGINT},
|
||||||
|
</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="selectWarehouseUserListByCode" resultMap="BaseResultMap">
|
||||||
|
select * from inv_warehouse_user where code = #{code}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue