库管员机具关联优化
This commit is contained in:
parent
83da73af7a
commit
21fb5e8d87
|
|
@ -3,6 +3,7 @@ package com.bonus.material.ma.mapper;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.bonus.material.ma.domain.TypeKeeper;
|
import com.bonus.material.ma.domain.TypeKeeper;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 库管员配置Mapper接口
|
* 库管员配置Mapper接口
|
||||||
|
|
@ -41,7 +42,7 @@ public interface TypeKeeperMapper {
|
||||||
* @param typeKeepers 库管员配置
|
* @param typeKeepers 库管员配置
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
int insertTypeKeeper(List<TypeKeeper> typeKeepers);
|
int insertTypeKeeper(@Param("list") List<TypeKeeper> typeKeepers);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改库管员配置
|
* 修改库管员配置
|
||||||
|
|
@ -70,5 +71,5 @@ public interface TypeKeeperMapper {
|
||||||
/**
|
/**
|
||||||
* 根据用户ID和物资类型ID删除库管员配置
|
* 根据用户ID和物资类型ID删除库管员配置
|
||||||
*/
|
*/
|
||||||
int deleteTypeKeeperByUserIdAndTypeId(List<TypeKeeper> typeKeepers);
|
int deleteTypeKeeperByUserIdAndTypeId(@Param("list") List<TypeKeeper> typeKeepers);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<insert id="insertTypeKeeper" parameterType="com.bonus.material.ma.domain.TypeKeeper" useGeneratedKeys="true" keyProperty="ID">
|
<insert id="insertTypeKeeper" parameterType="com.bonus.material.ma.domain.TypeKeeper" useGeneratedKeys="true" keyProperty="ID">
|
||||||
insert into ma_type_keeper (type_id,user_id,create_time,update_time,company_id)
|
insert into ma_type_keeper (type_id,user_id,create_time,update_time,company_id)
|
||||||
values
|
values
|
||||||
<foreach collection="typeKeepers" item="item" separator=",">
|
<foreach collection="list" item="item" separator=",">
|
||||||
(
|
(
|
||||||
#{item.typeId},
|
#{item.typeId},
|
||||||
#{item.userId},
|
#{item.userId},
|
||||||
|
|
@ -88,14 +88,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<delete id="deleteTypeKeeperByUserIdAndTypeId">
|
<delete id="deleteTypeKeeperByUserIdAndTypeId">
|
||||||
delete from ma_type_keeper where
|
delete from ma_type_keeper where
|
||||||
type_id in
|
type_id in
|
||||||
<foreach collection="typeKeepers" item="item" separator=",">
|
<foreach collection="list" item="item" separator=",">
|
||||||
(
|
(
|
||||||
#{item.typeId}
|
#{item.typeId}
|
||||||
)
|
)
|
||||||
</foreach>
|
</foreach>
|
||||||
and
|
and
|
||||||
user_id in
|
user_id in
|
||||||
<foreach collection="typeKeepers" item="item" separator=",">
|
<foreach collection="list" item="item" separator=",">
|
||||||
(
|
(
|
||||||
#{item.userId}
|
#{item.userId}
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue