3/3 auth代码优化1.0

dev_drug_dm
wangwei 1 month ago
parent 853715fbea
commit 83ce4aa677

@ -23,9 +23,6 @@ public interface AuthAdminDao extends BaseMapperPlus<AuthAdminDao, AuthAdmin, Au
List<AuthAdmin> findByCustomerld(String CustomerId);
boolean replaceAuthAdmin(AuthAdmin authAdmin);
/**
* id
*

@ -10,18 +10,14 @@ import java.util.List;
@Mapper
public interface CustomerInfoDao {
List<CustomerInfoEntity> filterCustomerInfo(CustomerInfoFilterRequest customerInfoFilterRequest);
List<CustomerDetailEntity> filterDetailCustomerInfo(CustomerInfoFilterRequest customerInfoFilterRequest);
boolean insertCustomerInfo(CustomerInfoEntity customerInfoEntity);
boolean updateCustomerInfo(CustomerInfoEntity customerInfoEntity);
boolean modifyCustomerInfo(CustomerDetailEntity customerDetailEntity);
boolean deleteById(String customerId);
CustomerInfoEntity selectById(String customerId);

@ -12,19 +12,12 @@ import java.util.List;
@Mapper
public interface InvSpaceDao extends BaseMapperPlus<InvSpaceDao, InvSpace, InvSpace> {
int insertEntity(InvSpace record);
int insertSelective(InvSpace record);
int updateByPrimaryKeySelective(InvSpace record);
int updateByPrimaryKey(InvSpace record);
boolean updateBatch(List<InvSpace> list);
int batchInsert(@Param("list") List<InvSpace> list);
/**
*
@ -34,13 +27,6 @@ public interface InvSpaceDao extends BaseMapperPlus<InvSpaceDao, InvSpace, InvSp
*/
List<InvSpaceResponse> filterList(FilterInvSpaceRequest filterInvSpaceRequest);
/**
*
*
* @param invSpace
* @return
*/
List<InvSpace> selectEntityList(InvSpace invSpace);
/**
*
@ -76,15 +62,6 @@ public interface InvSpaceDao extends BaseMapperPlus<InvSpaceDao, InvSpace, InvSp
*/
List<InvSpace> selectExist(InvSpace invSpace);
/**
*
*
* @param invStorageCode
* @param invWarehouseCode
* @param inSpaceCode
* @return
*/
List<InvSpace> selectByInvCode(@Param("invStorageCode") String invStorageCode, @Param("invWarehouseCode") String invWarehouseCode, @Param("invSpaceCode") String invSpaceCode);
/**
*

@ -22,12 +22,8 @@ public interface InvWarehouseDao extends BaseMapperPlus<InvWarehouseDao, InvWare
InvWarehouseEntity selectMaxCode(FilterInvSubWarehouseRequest filterInvSubWarehouseRequest);
boolean insertInvSubWarehouse(InvWarehouseEntity invWarehouseEntity);
boolean updateInvSubWarehouse(InvWarehouseEntity invWarehouseEntity);
void importInvSubWarehouse(@Param("invWarehouseEntities") List<InvWarehouseEntity> invSubWarehouseEntities);
boolean deleteById(String id);
boolean deleteByParentCode(@Param("code") String code);
@ -85,13 +81,9 @@ public interface InvWarehouseDao extends BaseMapperPlus<InvWarehouseDao, InvWare
*/
List<InvSubWarehouseResponse> filterSubInvList(FilterInvWarehouseRequest filterInvWarehouseRequest);
boolean updateTime(@Param("code") String code, @Param("updateTime") Date updateTime);
/**
* ID
*
* @param userId
* @return
*/
List<InvWarehouseEntity> selectInvListByUser(FilterInvWarehouseRequest filterInvWarehouseRequest);
@ -99,7 +91,6 @@ public interface InvWarehouseDao extends BaseMapperPlus<InvWarehouseDao, InvWare
/**
* ID
*
* @param userId
* @return
*/
List<InvWarehouseTreeVo> selectInvListTreeByUser(FilterInvWarehouseRequest filterInvWarehouseRequest);

@ -21,6 +21,5 @@ public interface SysCustomConfigDao {
SysCustomConfigEntity selectById(Long id);
boolean deleteContact(DeleteRequest request);
}

@ -23,6 +23,4 @@ public interface SysCustomConfigDetailDao {
SysCustomConfigDetailEntity selectById(Long id);
boolean deleteContact(DeleteRequest request);
}

@ -23,7 +23,6 @@ public interface SysDictDataMapper {
int updateById(SysDictData sysDictData);
int updateByType(SysDictData sysDictData);
SysDictData exists(SysDictDataRequest sysDictDataRequest);

@ -15,13 +15,10 @@ public interface SysRoleMapper {
int updateById(SysRole sysRole);
int delete(Long id);
SysRole selectById(Long id);
int deleteBatchIds(@Param("ids") List<Long> ids);
/**
*
*
@ -46,12 +43,4 @@ public interface SysRoleMapper {
*/
List<Long> selectRoleListByUserId(Long userId);
/**
* ID
*
* @param userName
* @return
*/
List<SysRole> selectRolesByUserName(String userName);
}

@ -12,20 +12,8 @@ import java.util.List;
@Mapper
public interface WarehouseBussinessTypeDao extends BaseMapperPlus<WarehouseBussinessTypeDao, WarehouseBussinessTypeEntity, WarehouseBussinessTypeEntity> {
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);
List<WarehouseBussinessTypeEntity> selectListByCode(@Param("code") String code);
List<WarehouseBussinessTypeEntity> filterList(FilterInvBusTypeRequest filterInvBusTypeRequest);

@ -11,7 +11,6 @@ import java.util.List;
@Mapper
public interface WarehouseUserDao extends BaseMapperPlus<WarehouseUserDao, WarehouseUserEntity, WarehouseUserEntity> {
int deleteByPrimaryKey(Integer id);
int deleteByCodeAndId(@Param("id") Long id, @Param("code") String code);
@ -23,19 +22,8 @@ public interface WarehouseUserDao extends BaseMapperPlus<WarehouseUserDao, Wareh
int insertOrUpdateSelective(WarehouseUserEntity record);
int insertSelective(WarehouseUserEntity record);
WarehouseUserEntity selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(WarehouseUserEntity record);
int updateByPrimaryKey(WarehouseUserEntity record);
int updateBatch(List<WarehouseUserEntity> list);
int updateBatchSelective(List<WarehouseUserEntity> list);
List<WarehouseUserEntity> selectListByCode(@Param("code") String code);
List<WarehouseUserEntity> selectListkey(FilterInvLinkDataRequest filterInvLinkDataRequest);

@ -32,5 +32,4 @@ public interface BasicUnitMaintainDao {
BasicUnitMaintainEntity selectByName(@Param("name") String name);
boolean importBasicUnitMaintain(BasicUnitMaintainEntity basicUnitMaintainEntity);
}

@ -16,14 +16,11 @@ public interface CustomerInfoService {
boolean updateCustomerInfo(CustomerInfoEntity customerInfoEntity);
boolean modifyCustomerInfo(CustomerDetailEntity customerDetailEntity);
boolean deleteById(String id);
CustomerInfoEntity selectById(String customerId);
boolean isExitRoleId(String roleId);
CustomerDetailEntity selectDetail(String customerId);
/**

@ -140,7 +140,6 @@ public interface ISysRoleService {
* @param roleId ID
* @return
*/
int deleteRoleById(Long roleId);
/**
*

@ -66,10 +66,6 @@ public class CustomerInfoServiceImpl implements CustomerInfoService {
return customerInfoDao.updateCustomerInfo(customerInfoEntity);
}
@Override
public boolean modifyCustomerInfo(CustomerDetailEntity customerDetailEntity) {
return false;
}
@Override
public boolean deleteById(String id) {
@ -81,14 +77,6 @@ public class CustomerInfoServiceImpl implements CustomerInfoService {
return customerInfoDao.selectById(customerId);
}
@Override
public boolean isExitRoleId(String roleId) {
CustomerInfoEntity customerInfoEntity = customerInfoDao.isExitRoleId(roleId);
if (customerInfoEntity == null)
return false;
else return true;
}
@Override
public CustomerDetailEntity selectDetail(String customerId) {
return customerInfoDao.selectDetail(customerId);

@ -302,21 +302,6 @@ public class SysRoleServiceImpl implements ISysRoleService {
}
/**
* ID
*
* @param roleId ID
* @return
*/
@Override
@Transactional(rollbackFor = Exception.class)
public int deleteRoleById(Long roleId) {
// 删除角色与菜单关联
roleMenuMapper.deleteById(roleId);
// 删除角色与部门关联
return sysRoleMapper.delete(roleId);
}
/**
*
*

@ -119,28 +119,6 @@
#{locInvCode}, #{comments})
</insert>
<insert id="replaceAuthAdmin" keyProperty="id" parameterType="com.glxp.api.entity.auth.AuthAdmin">
replace
INTO auth_user(id, userName, passWord, lastLoginIp,
lastLoginTime, createTime, userFlag, lastModifyTime, employeeName, CustomerId,
locDeptCode,
locInvCode, comments)
values (#{id},
#{userName},
#{passWord},
#{lastLoginIp},
#{lastLoginTime},
#{createTime},
#{userFlag,jdbcType=INTEGER},
#{lastModifyTime},
#{employeeName},
#{CustomerId},
#{locDeptCode},
#{locInvCode},
#{comments})
</insert>
<update id="updateAuthAdmin" parameterType="com.glxp.api.entity.auth.AuthAdmin">
UPDATE auth_user
<set>

@ -45,120 +45,7 @@
#{remark,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id"
parameterType="com.glxp.api.entity.auth.InvSpace" useGeneratedKeys="true">
insert into auth_space
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="code != null">
code,
</if>
<if test="name != null">
`name`,
</if>
<if test="type != null">
type,
</if>
<if test="invStorageCode != null">
invStorageCode,
</if>
<if test="invWarehouseCode != null">
invWarehouseCode,
</if>
<if test="status != null">
`status`,
</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>
<if test="remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="invStorageCode != null">
#{invStorageCode,jdbcType=VARCHAR},
</if>
<if test="invWarehouseCode != null">
#{invWarehouseCode,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=BOOLEAN},
</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>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.glxp.api.entity.auth.InvSpace">
update auth_space
<set>
<if test="code != null">
code = #{code,jdbcType=VARCHAR},
</if>
<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>
<if test="invWarehouseCode != null">
invWarehouseCode = #{invWarehouseCode,jdbcType=VARCHAR},
</if>
<if test="status != null">
`status` = #{status,jdbcType=BOOLEAN},
</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>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.glxp.api.entity.auth.InvSpace">
update auth_space
@ -241,21 +128,6 @@
</foreach>
</update>
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
insert into auth_space
(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.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},
#{item.updateUser,jdbcType=VARCHAR},
#{item.remark,jdbcType=VARCHAR})
</foreach>
</insert>
<select id="filterList" parameterType="com.glxp.api.req.auth.FilterInvSpaceRequest"
resultType="com.glxp.api.res.auth.InvSpaceResponse">
@ -282,27 +154,6 @@
</where>
</select>
<select id="selectEntityList" resultMap="BaseResultMap">
select *
from auth_space
<where>
<if test="invStorageCode != null and invStorageCode != ''">
AND invStorageCode = #{invStorageCode}
</if>
<if test="invWarehouseCode != null and invWarehouseCode != ''">
AND invWarehouseCode = #{invWarehouseCode}
</if>
<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>
</where>
</select>
<select id="selectSpaceCodeList" resultType="com.glxp.api.res.auth.InvSpaceResponse">
select auth_space.code, auth_space.name, iws.name invSubStorageName, iw.name invStorageName
@ -355,22 +206,6 @@
</where>
</select>
<select id="selectByInvCode" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from auth_space
<where>
<if test="invStorageCode != null and invStorageCode != ''">
AND invStorageCode = #{invStorageCode}
</if>
<if test="invWarehouseCode != null and invWarehouseCode != ''">
AND invWarehouseCode = #{invWarehouseCode}
</if>
<if test="invSpaceCode != null and invSpaceCode != ''">
AND code = #{invSpaceCode}
</if>
</where>
</select>
<select id="selectExistByName" resultMap="BaseResultMap">
select

@ -130,27 +130,6 @@
</select>
<insert id="insertInvSubWarehouse" keyProperty="id"
parameterType="com.glxp.api.entity.auth.InvWarehouseEntity">
replace
INTO auth_warehouse
( id, code, `name`, parentId, remark, defaultInv, advanceType, spUse, parentCode
, thirdId, thirdId1, thirdId2, thirdId3, thirdId4)
values (#{id},
#{code},
#{name},
#{parentId},
#{remark},
#{defaultInv},
#{advanceType},
#{spUse},
#{parentCode},
#{thirdId},
#{thirdId1},
#{thirdId2},
#{thirdId3},
#{thirdId4})
</insert>
<delete id="deleteById" parameterType="Map">
@ -234,32 +213,6 @@
WHERE id = #{id}
</update>
<insert id="importInvSubWarehouse" parameterType="java.util.List">
replace
into auth_warehouse
(id, code, `name`, parentId, remark, defaultInv, parentCode, advanceType, spUse, thirdId, thirdId1,
thirdId2, thirdId3,
thirdId4)
values
<foreach collection="invWarehouseEntities" item="item" index="index" separator=",">
(#{item.id},
#{item.code},
#{item.name},
#{item.parentId},
#{item.remark},
#{item.defaultInv},
#{item.parentCode},
#{item.advanceType},
#{item.spUse},
#{item.thirdId},
#{item.thirdId1},
#{item.thirdId2},
#{item.thirdId3},
#{item.thirdId4})
</foreach>
</insert>
<select id="countByParentIdAndName" resultType="int">
select count(*)
@ -402,7 +355,7 @@
</where>
GROUP BY auth_warehouse.code
</select>
<resultMap id="selectInvListTreeByUser" type="com.glxp.api.vo.inv.InvWarehouseTreeVo" autoMapping="true">
<result column="code" property="code"></result>
<collection property="bussinessTypeList" autoMapping="true" ofType="com.glxp.api.entity.auth.WarehouseBussinessTypeEntity"

@ -65,12 +65,6 @@
</delete>
<delete id="deleteById" parameterType="java.lang.Long">
delete
from auth_role
where role_id = #{id}
</delete>
<select id="selectById" parameterType="java.lang.Long"
resultMap="SysRoleResult">
@ -157,25 +151,6 @@
where u.id = #{userId}
</select>
<select id="selectRolesByUserName" parameterType="String" resultMap="SysRoleResult">
select distinct r.role_id,
r.role_name,
r.role_key,
r.role_sort,
r.data_scope,
r.menu_check_strictly,
r.dept_check_strictly,
r.status,
r.del_flag,
r.create_time,
r.remark
from auth_role r
left join auth_user_role sur on sur.role_id = r.role_id
left join auth_user u on u.id = sur.user_id
WHERE u.userName = #{userName}
</select>
</mapper>

@ -13,66 +13,7 @@
<!--@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 auth_warehouse_bustype
where id = #{id,jdbcType=INTEGER}
</select>
<insert id="insertSelective" keyColumn="id" keyProperty="id"
parameterType="com.glxp.api.entity.auth.WarehouseBussinessTypeEntity" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into auth_warehouse_bustype
<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.api.entity.auth.WarehouseBussinessTypeEntity">
<!--@mbg.generated-->
update auth_warehouse_bustype
<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.api.entity.auth.WarehouseBussinessTypeEntity">
<!--@mbg.generated-->
update auth_warehouse_bustype
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 auth_warehouse_bustype
@ -98,37 +39,6 @@
#{item.id,jdbcType=INTEGER}
</foreach>
</update>
<update id="updateBatchSelective" parameterType="java.util.List">
<!--@mbg.generated-->
update auth_warehouse_bustype
<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>
<select id="selectListByCode" parameterType="java.lang.String" resultMap="BaseResultMap">
select auth_warehouse_bustype.id,
@ -159,21 +69,6 @@
</where>
</select>
<select id="selectListByAction" resultMap="BaseResultMap">
select auth_warehouse_bustype.id,
auth_warehouse_bustype.code,
auth_warehouse_bustype.action,
basic_bussiness_type.name
from auth_warehouse_bustype
inner join basic_bussiness_type on auth_warehouse_bustype.action = basic_bussiness_type.action
where spUse = 2
and mainAction = 'WareHouseIn'
and enable = true
and corpType = 2
and code = #{code}
</select>
<delete id="deleteByCode">
delete
from auth_warehouse_bustype

@ -38,12 +38,6 @@
</if>
</where>
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<!--@mbg.generated-->
delete
from auth_warehouse_user
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByCodeAndId">
<!--@mbg.generated-->
delete
@ -57,116 +51,6 @@
insert into auth_warehouse_user (code, userId, userName, isDirector)
values (#{code,jdbcType=VARCHAR}, #{userid,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR}, #{isDirector})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id"
parameterType="com.glxp.api.entity.auth.WarehouseUserEntity" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into auth_warehouse_user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="code != null">
code,
</if>
<if test="userid != null">
userId,
</if>
<if test="username != null">
userName,
</if>
isDirector
</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>
#{isDirector}
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.glxp.api.entity.auth.WarehouseUserEntity">
<!--@mbg.generated-->
update auth_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>
isDirector = #{isDirector}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.glxp.api.entity.auth.WarehouseUserEntity">
<!--@mbg.generated-->
update auth_warehouse_user
set code = #{code,jdbcType=VARCHAR},
userId = #{userid,jdbcType=BIGINT},
userName = #{username,jdbcType=VARCHAR} isDirector = #{isDirector}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateBatch" parameterType="java.util.List">
<!--@mbg.generated-->
update auth_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 auth_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="insertOrUpdateEntity" keyColumn="id" keyProperty="id"
parameterType="com.glxp.api.entity.auth.WarehouseUserEntity" useGeneratedKeys="true">
<!--@mbg.generated-->

@ -285,35 +285,4 @@
</select>
<insert id="importBasicUnitMaintain">
replace
INTO basic_corp
( thirdId, erpId, `name`, spell,
addr, status, `type`, creditNo, contact, mobile, thirdId1, thirdId2, thirdId3, thirdId4,
thirdName, thirdName1, thirdName2, thirdName3, thirdName4, updateTime, corpType,outType)
values (
#{thirdId},
#{erpId},
#{name},
#{spell},
#{addr},
#{status},
#{type},
#{creditNo},
#{contact},
#{mobile},
#{thirdId1},
#{thirdId2},
#{thirdId3},
#{thirdId4},
#{thirdName},
#{thirdName1},
#{thirdName2},
#{thirdName3},
#{thirdName4},
#{updateTime},
#{corpType},
#{outType}
)
</insert>
</mapper>

Loading…
Cancel
Save