3/4 auth 优化1.1

dev_drug_dm
wangwei 4 months ago
parent f0330fce94
commit d59dd0df79

@ -31,13 +31,6 @@ public interface AuthAdminDao extends BaseMapperPlus<AuthAdminDao, AuthAdmin, Au
*/ */
AuthAdmin findById(Long id); AuthAdmin findById(Long id);
/**
* id password
*
* @param id id
* @return
*/
AuthAdmin findPwdById(Long id);
/** /**
* Name * Name
@ -71,7 +64,6 @@ public interface AuthAdminDao extends BaseMapperPlus<AuthAdminDao, AuthAdmin, Au
*/ */
boolean deleteById(Long id); boolean deleteById(Long id);
/** /**
* *
* *
@ -85,8 +77,6 @@ public interface AuthAdminDao extends BaseMapperPlus<AuthAdminDao, AuthAdmin, Au
List<AuthAdmin> selectUnallocatedList(FilterAuthUserRequest filterAuthUserRequest); List<AuthAdmin> selectUnallocatedList(FilterAuthUserRequest filterAuthUserRequest);
List<AuthAdmin> findByCustomerId(@Param("CustomerId") String customerId);
boolean updateUser(UpdateUserRequset updateUserRequset); boolean updateUser(UpdateUserRequset updateUserRequset);
} }

@ -1,5 +1,6 @@
package com.glxp.api.dao.auth; package com.glxp.api.dao.auth;
import com.glxp.api.dao.BaseMapperPlus;
import com.glxp.api.entity.auth.AuthCheckEntity; import com.glxp.api.entity.auth.AuthCheckEntity;
import com.glxp.api.req.auth.FilterAuthCheckRequest; import com.glxp.api.req.auth.FilterAuthCheckRequest;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@ -7,7 +8,7 @@ import org.apache.ibatis.annotations.Mapper;
import java.util.List; import java.util.List;
@Mapper @Mapper
public interface AuthCheckDao { public interface AuthCheckDao extends BaseMapperPlus<AuthCheckDao,AuthCheckEntity,AuthCheckEntity> {
List<AuthCheckEntity> filterDevices(FilterAuthCheckRequest filterAuthCheckRequest); List<AuthCheckEntity> filterDevices(FilterAuthCheckRequest filterAuthCheckRequest);

@ -1,9 +1,10 @@
package com.glxp.api.dao.auth; package com.glxp.api.dao.auth;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.api.dao.BaseMapperPlus;
import com.glxp.api.entity.auth.AuthCompany; import com.glxp.api.entity.auth.AuthCompany;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@Mapper @Mapper
public interface AuthCompanyMapper extends BaseMapper<AuthCompany> { public interface AuthCompanyMapper extends BaseMapperPlus<AuthCompanyMapper,AuthCompany,AuthCompany> {
} }

@ -1,5 +1,6 @@
package com.glxp.api.dao.auth; package com.glxp.api.dao.auth;
import com.glxp.api.dao.BaseMapperPlus;
import com.glxp.api.entity.auth.AuthRole; import com.glxp.api.entity.auth.AuthRole;
import com.glxp.api.entity.auth.AuthRoleAdmin; import com.glxp.api.entity.auth.AuthRoleAdmin;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@ -8,7 +9,7 @@ import java.util.List;
@Mapper @Mapper
public interface AuthRoleAdminDao { public interface AuthRoleAdminDao extends BaseMapperPlus<AuthRoleAdminDao,AuthRoleAdmin,AuthRoleAdmin> {
/** /**
* adminId * adminId
@ -18,22 +19,6 @@ public interface AuthRoleAdminDao {
*/ */
List<AuthRoleAdmin> listByAdminId(Long adminId); List<AuthRoleAdmin> listByAdminId(Long adminId);
/**
* adminId
*
* @param adminIds adminIds
* @return
*/
List<AuthRoleAdmin> listByAdminIdIn(List<Long> adminIds);
/**
* role_id admin_id
*
* @param roleId roleId
* @return
*/
List<AuthRoleAdmin> listByRoleId(Long roleId);
/** /**
* *
* *
@ -43,16 +28,6 @@ public interface AuthRoleAdminDao {
int insertAuthRoleAdminAll(List<AuthRoleAdmin> authRoleAdminList); int insertAuthRoleAdminAll(List<AuthRoleAdmin> authRoleAdminList);
/**
* adminId
*
* @param adminId
* @return
*/
boolean deleteByAdminId(Long adminId);
boolean updateAuthRoleAdmin(AuthRoleAdmin authRoleAdmin); boolean updateAuthRoleAdmin(AuthRoleAdmin authRoleAdmin);
List<AuthRole> listAdminRole(Long adminId);
} }

@ -1,5 +1,6 @@
package com.glxp.api.dao.auth; package com.glxp.api.dao.auth;
import com.glxp.api.dao.BaseMapperPlus;
import com.glxp.api.entity.auth.AuthRole; import com.glxp.api.entity.auth.AuthRole;
import com.glxp.api.req.auth.AuthRoleQueryRequest; import com.glxp.api.req.auth.AuthRoleQueryRequest;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@ -8,42 +9,12 @@ import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
@Mapper @Mapper
public interface AuthRoleDao { public interface AuthRoleDao extends BaseMapperPlus<AuthRoleDao,AuthRole,AuthRole> {
/**
*
* @return
*/
List<AuthRole> listAdminPage(AuthRoleQueryRequest authRoleQueryRequest);
/**
* id,name
* @return
*/
List<AuthRole> listAuthAdminRolePage(@Param("status") Integer status);
List<AuthRole> listCustomerRoles(@Param("isCustomer") Integer isCustomer); List<AuthRole> listCustomerRoles(@Param("isCustomer") Integer isCustomer);
List<AuthRole> getCustomerRoles(@Param("isCustomer") Integer isCustomer); List<AuthRole> getCustomerRoles(@Param("isCustomer") Integer isCustomer);
List<AuthRole> listAuthRoles2();
AuthRole findByName(String name);
/**
*
* @param authAdmin
* @return
*/
boolean insertAuthRole(AuthRole authAdmin);
/**
*
* @param authAdmin
* @return
*/
boolean updateAuthRole(AuthRole authAdmin);
/** /**
* *
* @param id * @param id

@ -1,5 +1,6 @@
package com.glxp.api.dao.auth; package com.glxp.api.dao.auth;
import com.glxp.api.dao.BaseMapperPlus;
import com.glxp.api.entity.auth.CustomerDetailEntity; import com.glxp.api.entity.auth.CustomerDetailEntity;
import com.glxp.api.entity.auth.CustomerInfoEntity; import com.glxp.api.entity.auth.CustomerInfoEntity;
import com.glxp.api.req.auth.CustomerInfoFilterRequest; import com.glxp.api.req.auth.CustomerInfoFilterRequest;
@ -8,7 +9,7 @@ import org.apache.ibatis.annotations.Mapper;
import java.util.List; import java.util.List;
@Mapper @Mapper
public interface CustomerInfoDao { public interface CustomerInfoDao extends BaseMapperPlus<BaseMapperPlus,CustomerInfoEntity,CustomerInfoEntity>{
List<CustomerInfoEntity> filterCustomerInfo(CustomerInfoFilterRequest customerInfoFilterRequest); List<CustomerInfoEntity> filterCustomerInfo(CustomerInfoFilterRequest customerInfoFilterRequest);
@ -24,9 +25,6 @@ public interface CustomerInfoDao {
CustomerDetailEntity selectDetail(String customerId); CustomerDetailEntity selectDetail(String customerId);
CustomerInfoEntity isExitRoleId(String roleId);
List<Long> selectCustomerIdListByUserFlag(Integer userFlag); List<Long> selectCustomerIdListByUserFlag(Integer userFlag);
List<CustomerInfoEntity> getList(CustomerInfoEntity customerInfoEntity); List<CustomerInfoEntity> getList(CustomerInfoEntity customerInfoEntity);

@ -57,7 +57,6 @@ public interface DeptDao extends BaseMapperPlus<DeptDao, DeptEntity, DeptEntity>
boolean updateTime(@Param("code") String code, @Param("updateTime") Date updateTime); boolean updateTime(@Param("code") String code, @Param("updateTime") Date updateTime);
DeptEntity selectByThirdSys(@Param("thirdIdSys") String thirdIdSys, @Param("thirdId") String thirdId);
/** /**
* code* * code*

@ -12,8 +12,6 @@ import java.util.List;
@Mapper @Mapper
public interface DeptUserDao extends BaseMapperPlus<DeptUserDao, DeptUserEntity, DeptUserEntity> { public interface DeptUserDao extends BaseMapperPlus<DeptUserDao, DeptUserEntity, DeptUserEntity> {
List<DeptUserEntity> selectDeptUser(FilterDeptUserReqeust filterDeptUserReqeust); List<DeptUserEntity> selectDeptUser(FilterDeptUserReqeust filterDeptUserReqeust);
List<DeptUserResponse> selectJoinDeptUser(FilterDeptUserReqeust filterDeptUserReqeust); List<DeptUserResponse> selectJoinDeptUser(FilterDeptUserReqeust filterDeptUserReqeust);
@ -26,8 +24,6 @@ public interface DeptUserDao extends BaseMapperPlus<DeptUserDao, DeptUserEntity,
boolean deleteByUser(@Param("userId") Long userId); boolean deleteByUser(@Param("userId") Long userId);
int deleteByList(@Param("ids") List<Integer> ids);
int insertBatch(List<DeptUserEntity> list); int insertBatch(List<DeptUserEntity> list);
int replaceBatch(@Param("list")List<DeptUserEntity> list); int replaceBatch(@Param("list")List<DeptUserEntity> list);

@ -19,8 +19,6 @@ public interface InvBusUserDao extends BaseMapperPlus<InvBusUserDao, InvBusUserE
List<WarehouseBussinessTypeEntity> filterUnSelect(FilterInvBusUserRequest filterInvBusUserRequest); List<WarehouseBussinessTypeEntity> filterUnSelect(FilterInvBusUserRequest filterInvBusUserRequest);
List<InvBusUserResponse> filterJoinInvBusUser(FilterInvBusUserRequest filterInvBusUserRequest);
boolean insertInvBusUser(InvBusUserEntity InvBusUserEntity); boolean insertInvBusUser(InvBusUserEntity InvBusUserEntity);
boolean updateInvBusUser(InvBusUserEntity InvBusUserEntity); boolean updateInvBusUser(InvBusUserEntity InvBusUserEntity);
@ -29,6 +27,5 @@ public interface InvBusUserDao extends BaseMapperPlus<InvBusUserDao, InvBusUserE
boolean deleteByUnion(@Param("userId") String userId, @Param("subInvCode") String subInvCode); boolean deleteByUnion(@Param("userId") String userId, @Param("subInvCode") String subInvCode);
boolean deleteByscAction( @Param("subInvCode") String subInvCode,@Param("selectedCodes") List<String> selectedCodes);
} }

@ -54,13 +54,6 @@ public interface InvSpaceDao extends BaseMapperPlus<InvSpaceDao, InvSpace, InvSp
*/ */
List<InvSpace> selectByWarehouseCode(String warehouseCode); List<InvSpace> selectByWarehouseCode(String warehouseCode);
/**
*
*
* @param invSpace
* @return
*/
List<InvSpace> selectExist(InvSpace invSpace);
/** /**

@ -26,7 +26,6 @@ public interface InvWarehouseDao extends BaseMapperPlus<InvWarehouseDao, InvWare
boolean deleteById(String id); boolean deleteById(String id);
boolean deleteByParentCode(@Param("code") String code);
InvWarehouseEntity getByWareId(@Param("id") String id); InvWarehouseEntity getByWareId(@Param("id") String id);
@ -113,6 +112,5 @@ public interface InvWarehouseDao extends BaseMapperPlus<InvWarehouseDao, InvWare
*/ */
InvWarehouseEntity filterInvSubWarehouseLimitOne(FilterInvSubWarehouseRequest filterInvSubWarehouseRequest); InvWarehouseEntity filterInvSubWarehouseLimitOne(FilterInvSubWarehouseRequest filterInvSubWarehouseRequest);
List<InvWarehouseEntity> selectLowWarehouseAll(@Param("pcode") String pCode);
} }

@ -1,15 +1,15 @@
package com.glxp.api.dao.auth; package com.glxp.api.dao.auth;
import com.glxp.api.dao.BaseMapperPlus;
import com.glxp.api.entity.auth.SysCustomConfigEntity; import com.glxp.api.entity.auth.SysCustomConfigEntity;
import com.glxp.api.req.auth.SysCustomConfigRequest; import com.glxp.api.req.auth.SysCustomConfigRequest;
import com.glxp.api.req.system.DeleteRequest;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List; import java.util.List;
@Mapper @Mapper
public interface SysCustomConfigDao { public interface SysCustomConfigDao extends BaseMapperPlus<SysCustomConfigDao,SysCustomConfigEntity,SysCustomConfigEntity> {
List<SysCustomConfigEntity> filterSysCustomConfig(SysCustomConfigRequest request); List<SysCustomConfigEntity> filterSysCustomConfig(SysCustomConfigRequest request);

@ -1,6 +1,7 @@
package com.glxp.api.dao.auth; package com.glxp.api.dao.auth;
import com.glxp.api.dao.BaseMapperPlus;
import com.glxp.api.entity.auth.SysCustomConfigDetailEntity; import com.glxp.api.entity.auth.SysCustomConfigDetailEntity;
import com.glxp.api.req.auth.SysCustomConfigDetailRequest; import com.glxp.api.req.auth.SysCustomConfigDetailRequest;
import com.glxp.api.req.system.DeleteRequest; import com.glxp.api.req.system.DeleteRequest;
@ -9,7 +10,7 @@ import org.apache.ibatis.annotations.Mapper;
import java.util.List; import java.util.List;
@Mapper @Mapper
public interface SysCustomConfigDetailDao { public interface SysCustomConfigDetailDao extends BaseMapperPlus<SysCustomConfigDetailDao,SysCustomConfigDetailEntity,SysCustomConfigDetailEntity> {
List<SysCustomConfigDetailEntity> filterSysCustomConfigDetail(SysCustomConfigDetailRequest request); List<SysCustomConfigDetailEntity> filterSysCustomConfigDetail(SysCustomConfigDetailRequest request);

@ -1,5 +1,6 @@
package com.glxp.api.dao.auth; package com.glxp.api.dao.auth;
import com.glxp.api.dao.BaseMapperPlus;
import com.glxp.api.entity.auth.SysDictData; import com.glxp.api.entity.auth.SysDictData;
import com.glxp.api.req.auth.SysDictDataRequest; import com.glxp.api.req.auth.SysDictDataRequest;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@ -11,7 +12,7 @@ import java.util.List;
* *
*/ */
@Mapper @Mapper
public interface SysDictDataMapper { public interface SysDictDataMapper extends BaseMapperPlus<SysDictDataMapper,SysDictData,SysDictData> {
List<SysDictData> selectDictDataList(SysDictDataRequest sysDictDataRequest); List<SysDictData> selectDictDataList(SysDictDataRequest sysDictDataRequest);

@ -24,13 +24,6 @@ public interface SysMenuDao {
List<SysMenu> selectMenuList(FilterMenuRequest filterMenuRequest); List<SysMenu> selectMenuList(FilterMenuRequest filterMenuRequest);
/**
*
*
* @return
*/
List<String> selectMenuPerms();
/** /**
* *
* *

@ -9,8 +9,6 @@ import java.util.List;
@Mapper @Mapper
public interface SysRoleMapper { public interface SysRoleMapper {
int insert(SysRole sysRole); int insert(SysRole sysRole);
int updateById(SysRole sysRole); int updateById(SysRole sysRole);

@ -17,8 +17,6 @@ public interface SysUserRoleMapper {
int insert(SysUserRole sysUserRole); int insert(SysUserRole sysUserRole);
SysUserRole selectByAuthId(Long id);
List<SysUserRole> selectUserRoleList(Long roleId); List<SysUserRole> selectUserRoleList(Long roleId);
} }

@ -20,35 +20,14 @@ public interface WarehouseUserDao extends BaseMapperPlus<WarehouseUserDao, Wareh
int insertOrUpdateEntity(WarehouseUserEntity record); int insertOrUpdateEntity(WarehouseUserEntity record);
int insertOrUpdateSelective(WarehouseUserEntity record);
WarehouseUserEntity selectByPrimaryKey(Long id);
List<WarehouseUserEntity> selectListByCode(@Param("code") String code);
List<WarehouseUserEntity> selectListkey(FilterInvLinkDataRequest filterInvLinkDataRequest); List<WarehouseUserEntity> selectListkey(FilterInvLinkDataRequest filterInvLinkDataRequest);
List<WarehouseUserEntity> selectNotSelectUserid(@Param("userIds") List<Long> userIds);
List<String> selectCodeByUser(@Param("userId") String userId); List<String> selectCodeByUser(@Param("userId") String userId);
void deleteByCode(@Param("code") String code); void deleteByCode(@Param("code") String code);
/**
*
*
* @param code
* @param isDirector
*/
void updateDirector(@Param("code") String code, @Param("isDirector") int isDirector);
/**
* id
*
* @param id
* @param isDirector
*/
void updateDirectorById(@Param("id") Long id, @Param("isDirector") int isDirector);
/** /**
* *

@ -70,14 +70,6 @@
LIMIT 1 LIMIT 1
</select> </select>
<select id="findPwdById" parameterType="hashmap" resultType="com.glxp.api.entity.auth.AuthAdmin">
SELECT passWord
FROM auth_user
<where>
id = #{id}
</where>
LIMIT 1
</select>
<insert id="insertAuthAdmin" keyProperty="id" parameterType="com.glxp.api.entity.auth.AuthAdmin"> <insert id="insertAuthAdmin" keyProperty="id" parameterType="com.glxp.api.entity.auth.AuthAdmin">
INSERT INTO auth_user( id, userName, passWord, lastLoginIp, lastLoginTime, createTime, userFlag INSERT INTO auth_user( id, userName, passWord, lastLoginIp, lastLoginTime, createTime, userFlag

@ -9,26 +9,6 @@
where user_id = #{adminId} where user_id = #{adminId}
</select> </select>
<select id="listAdminRole" resultType="com.glxp.api.entity.auth.AuthRole">
select * from auth_role INNER JOIN auth_user_role on auth_role.id = auth_user_role.role_id
WHERE auth_user_role.user_id = #{adminId};
</select>
<select id="listByAdminIdIn" resultType="com.glxp.api.entity.auth.AuthRoleAdmin">
SELECT *
FROM auth_user_role
where user_id in
<foreach collection="list" item="id" index="index" open="(" close=")" separator=",">
#{id}
</foreach>
</select>
<select id="listByRoleId" resultType="com.glxp.api.entity.auth.AuthRoleAdmin">
SELECT admin_id
FROM auth_user_role
where role_id = #{roleId}
</select>
<insert id="insertAuthRoleAdminAll"> <insert id="insertAuthRoleAdminAll">
INSERT INTO auth_user_role INSERT INTO auth_user_role
(user_id,role_id) (user_id,role_id)
@ -40,11 +20,6 @@
</foreach> </foreach>
</insert> </insert>
<delete id="deleteByAdminId" parameterType="java.lang.Long">
delete from auth_user_role where user_id = #{adminId}
</delete>
<update id="updateAuthRoleAdmin" parameterType="com.glxp.api.entity.auth.AuthRoleAdmin"> <update id="updateAuthRoleAdmin" parameterType="com.glxp.api.entity.auth.AuthRoleAdmin">
UPDATE auth_user_role UPDATE auth_user_role
<set> <set>

@ -6,39 +6,6 @@
<result property="roleId" column="role_id"/> <result property="roleId" column="role_id"/>
<result property="roleName" column="role_name"/> <result property="roleName" column="role_name"/>
</resultMap> </resultMap>
<select id="listAdminPage" parameterType="com.glxp.api.req.auth.AuthRoleQueryRequest"
resultType="com.glxp.api.entity.auth.AuthRole">
SELECT id,name,status,remark,create_time,listorder,isCustomer
FROM auth_role
<where>
<if test="status != null">
AND status = #{status}
</if>
<if test="isCustomer != null">
AND isCustomer = #{isCustomer}
</if>
<if test="name != null and '' != name">
AND `name` LIKE CONCAT('%',#{name},'%')
</if>
</where>
</select>
<select id="listAuthAdminRolePage" resultType="com.glxp.api.entity.auth.AuthRole">
SELECT id,name
FROM auth_role
<where>
<if test="status != null">
AND status = #{status}
</if>
</where>
</select>
<select id="findByName" resultType="com.glxp.api.entity.auth.AuthRole">
SELECT id
FROM auth_role
where `name` = #{name}
</select>
<select id="listCustomerRoles" parameterType="java.lang.Integer" <select id="listCustomerRoles" parameterType="java.lang.Integer"
resultMap="SysAuthRoleResult"> resultMap="SysAuthRoleResult">
@ -54,63 +21,6 @@
where `isCustomer` = #{isCustomer} and status =0 where `isCustomer` = #{isCustomer} and status =0
</select> </select>
<select id="listAuthRoles2" parameterType="java.lang.Integer" resultType="com.glxp.api.entity.auth.AuthRole">
SELECT role_id, role_name
FROM auth_role
</select>
<insert id="insertAuthRole" keyProperty="id" parameterType="com.glxp.api.entity.auth.AuthRole">
INSERT INTO auth_role(`name`,pid,`status`,`remark`,`listorder`,create_time,update_time,isCustomer)
values
(
#{name},
<choose>
<when test="pid != null">
#{pid},
</when>
<otherwise>
0,
</otherwise>
</choose>
#{status},
<choose>
<when test="remark != null">
#{remark},
</when>
<otherwise>
'',
</otherwise>
</choose>
<choose>
<when test="listorder != null">
#{listorder},
</when>
<otherwise>
999,
</otherwise>
</choose>
#{createTime},
#{updateTime},
#{isCustomer}
)
</insert>
<update id="updateAuthRole" parameterType="com.glxp.api.entity.auth.AuthRole">
UPDATE auth_role
<set>
<if test="name != null">`name`=#{name},</if>
<if test="pid != null">pid=#{pid},</if>
<if test="status != null">`status`=#{status},</if>
<if test="remark != null">remark=#{remark},</if>
<if test="listorder != null">`listorder`=#{listorder},</if>
<if test="updateTime != null">update_time=#{updateTime},</if>
<if test="isCustomer != null">isCustomer=#{isCustomer},</if>
</set>
WHERE id=#{id}
</update>
<delete id="deleteById" parameterType="java.lang.Long"> <delete id="deleteById" parameterType="java.lang.Long">
delete delete
from auth_role from auth_role

@ -121,14 +121,6 @@
</select> </select>
<select id="isExitRoleId" parameterType="java.lang.String"
resultType="com.glxp.api.entity.auth.CustomerInfoEntity">
SELECT *
FROM customer_info
WHERE (
roleId = #{roleId}) limit 1
</select>
<select id="selectCustomerIdListByUserFlag" parameterType="java.lang.Integer" <select id="selectCustomerIdListByUserFlag" parameterType="java.lang.Integer"
resultType="Long"> resultType="Long">

@ -321,13 +321,6 @@
where code = #{code} where code = #{code}
</update> </update>
<select id="selectByThirdSys" resultType="com.glxp.api.entity.auth.DeptEntity">
select *
from auth_dept
where ${thirdIdSys} = #{thirdId}
</select>
<select id="selectByCodeAll" resultType="com.glxp.api.entity.auth.DeptEntity"> <select id="selectByCodeAll" resultType="com.glxp.api.entity.auth.DeptEntity">
select * select *
from auth_dept from auth_dept

@ -89,17 +89,6 @@
and deptId = #{deptId} and deptId = #{deptId}
</delete> </delete>
<delete id="deleteByList" parameterType="java.util.List"
>
delete
from auth_dept_user
where deptId in
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<insert id="insertBatch" keyProperty="id" parameterType="java.util.List"> <insert id="insertBatch" keyProperty="id" parameterType="java.util.List">
insert INTO auth_dept_user insert INTO auth_dept_user
(deptId, userId, updateTime) (deptId, userId, updateTime)

@ -47,27 +47,6 @@
</where> </where>
</select> </select>
<select id="filterJoinInvBusUser" parameterType="com.glxp.api.req.auth.FilterInvBusUserRequest"
resultType="com.glxp.api.res.auth.InvBusUserResponse">
select auth_user_bustype.*, basic_bussiness_type.name billTypeName
FROM auth_user_bustype
left join basic_bussiness_type on auth_user_bustype.scAction = basic_bussiness_type.action
<where>
<if test="userId != '' and userId != null">
AND userId = #{userId}
</if>
<if test="subInvCode != '' and subInvCode != null">
AND subInvCode = #{subInvCode}
</if>
<if test="scAction != '' and scAction != null">
AND scAction = #{scAction}
</if>
</where>
group by auth_user_bustype.id
</select>
<insert id="insertInvBusUser" <insert id="insertInvBusUser"
parameterType="com.glxp.api.entity.auth.InvBusUserEntity"> parameterType="com.glxp.api.entity.auth.InvBusUserEntity">
replace replace
@ -92,21 +71,6 @@
WHERE subInvCode = #{subInvCode} WHERE subInvCode = #{subInvCode}
and userId = #{userId} and userId = #{userId}
</delete> </delete>
<delete id="deleteByscAction" parameterType="Map">
DELETE
FROM auth_user_bustype
<where>
<if test="subInvCode != '' and subInvCode != null">
AND subInvCode = #{subInvCode}
</if>
<if test="selectedCodes != null and selectedCodes.size() != 0">
and scAction in
<foreach collection="selectedCodes" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</delete>
<update id="updateInvBusUser" parameterType="com.glxp.api.entity.auth.InvBusUserEntity"> <update id="updateInvBusUser" parameterType="com.glxp.api.entity.auth.InvBusUserEntity">
UPDATE auth_user_bustype UPDATE auth_user_bustype
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">

@ -187,25 +187,6 @@
where invWarehouseCode = #{warehouseCode} where invWarehouseCode = #{warehouseCode}
</select> </select>
<select id="selectExist" 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="code != null and code != ''">
AND code = #{code}
</if>
<if test="name != null and name != ''">
AND name = #{name}
</if>
</where>
</select>
<select id="selectExistByName" resultMap="BaseResultMap"> <select id="selectExistByName" resultMap="BaseResultMap">
select select

@ -129,9 +129,6 @@
</where> </where>
</select> </select>
<delete id="deleteById" parameterType="Map"> <delete id="deleteById" parameterType="Map">
DELETE DELETE
FROM auth_warehouse FROM auth_warehouse
@ -157,13 +154,6 @@
and spUse = 1 and spUse = 1
</select> </select>
<delete id="deleteByParentCode" parameterType="Map">
DELETE
FROM auth_warehouse
WHERE parentId = #{code}
</delete>
<update id="updateInvSubWarehouse" parameterType="com.glxp.api.entity.auth.InvWarehouseEntity"> <update id="updateInvSubWarehouse" parameterType="com.glxp.api.entity.auth.InvWarehouseEntity">
UPDATE auth_warehouse UPDATE auth_warehouse
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
@ -436,18 +426,4 @@
</select> </select>
<select id="selectLowWarehouseAll" parameterType="java.lang.String"
resultType="com.glxp.api.entity.auth.InvWarehouseEntity">
with recursive table_a as (
select *
from auth_warehouse ta
where parentCode = #{pcode}
union all
select tb.*
from auth_warehouse tb
inner join table_a on table_a.code = tb.parentCode
)
select *
from table_a
</select>
</mapper> </mapper>

@ -225,13 +225,6 @@
order by m.parent_id, m.order_num order by m.parent_id, m.order_num
</select> </select>
<select id="selectMenuPerms" resultType="String">
select distinct m.perms
from auth_menu m
left join auth_role_menu rm on m.menu_id = rm.menu_id
left join auth_user_role sur on rm.role_id = sur.role_id
</select>
<select id="selectMenuPermsByUserId" parameterType="Long" resultType="String"> <select id="selectMenuPermsByUserId" parameterType="Long" resultType="String">
select distinct m.perms select distinct m.perms
from auth_menu m from auth_menu m

@ -41,12 +41,6 @@
</where> </where>
</delete> </delete>
<insert id="insert" parameterType="com.glxp.api.entity.auth.SysUserRole">
insert INTO auth_user_role values ( #{userId},
#{roleId})
</insert>
<insert id="insertBatch" keyProperty="id" parameterType="java.util.List"> <insert id="insertBatch" keyProperty="id" parameterType="java.util.List">
insert INTO auth_user_role insert INTO auth_user_role
( (

@ -19,25 +19,6 @@
isDirector, isDirector,
locSubInvCode locSubInvCode
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<!--@mbg.generated-->
select
<include refid="Base_Column_List"/>
from auth_warehouse_user
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectNotSelectUserid" resultMap="BaseResultMap">
select *
from auth_warehouse_user
<where>
<if test="userIds != null and userIds.size() != 0">
and id in
<foreach collection="userIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
<delete id="deleteByCodeAndId"> <delete id="deleteByCodeAndId">
<!--@mbg.generated--> <!--@mbg.generated-->
delete delete
@ -84,62 +65,7 @@
userName = #{username,jdbcType=VARCHAR}, userName = #{username,jdbcType=VARCHAR},
</trim> </trim>
</insert> </insert>
<insert id="insertOrUpdateSelective" 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="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="selectListByCode" resultMap="BaseResultMap">
select auth_warehouse_user.*, auth_user.employeeName
from auth_warehouse_user
inner join auth_user on auth_user.id = auth_warehouse_user.userId
where code = #{code}
</select>
<select id="selectListkey" resultType="com.glxp.api.entity.auth.WarehouseUserEntity" <select id="selectListkey" resultType="com.glxp.api.entity.auth.WarehouseUserEntity"
parameterType="com.glxp.api.req.auth.FilterInvLinkDataRequest"> parameterType="com.glxp.api.req.auth.FilterInvLinkDataRequest">
@ -204,15 +130,4 @@
where code = #{code} where code = #{code}
</delete> </delete>
<update id="updateDirector">
update auth_warehouse_user
set isDirector = #{isDirector}
where code = #{code}
</update>
<update id="updateDirectorById">
update auth_warehouse_user
set isDirector = #{isDirector}
where id = #{id}
</update>
</mapper> </mapper>

Loading…
Cancel
Save