Merge remote-tracking branch 'origin/master'

This commit is contained in:
gaowdong 2025-03-19 11:15:18 +08:00
commit c8b12d2a17
4 changed files with 1489 additions and 1489 deletions

View File

@ -1,200 +1,200 @@
package com.bonus.canteen.core.auth.user.controller; //package com.bonus.canteen.core.auth.user.controller;
//
import com.bonus.canteen.core.auth.role.dto.MgrRoleUserListDTO; //import com.bonus.canteen.core.auth.role.dto.MgrRoleUserListDTO;
import com.bonus.canteen.core.auth.role.vo.MgrRoleUserVO; //import com.bonus.canteen.core.auth.role.vo.MgrRoleUserVO;
import com.bonus.canteen.core.auth.user.service.MgrUserService; //import com.bonus.canteen.core.auth.user.service.MgrUserService;
import com.bonus.common.core.web.domain.AjaxResult; //import com.bonus.common.core.web.domain.AjaxResult;
import io.swagger.annotations.Api; //import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; //import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger; //import org.slf4j.Logger;
import org.slf4j.LoggerFactory; //import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; //import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; //import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; //import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; //import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; //import org.springframework.web.bind.annotation.RestController;
//
import java.util.List; //import java.util.List;
//
@RestController //@RestController
@RequestMapping({"/api/v1/mgruser"}) //@RequestMapping({"/api/v1/mgruser"})
@Api( //@Api(
value = "mgruser", // value = "mgruser",
tags = {"商家管理员模块"} // tags = {"商家管理员模块"}
) //)
public class MgrUserController { //public class MgrUserController {
private static final Logger log = LoggerFactory.getLogger(MgrUserController.class); // private static final Logger log = LoggerFactory.getLogger(MgrUserController.class);
private static final String USER_LOCK = "user-lock-"; // private static final String USER_LOCK = "user-lock-";
@Autowired
private MgrUserService mgrUserService;
// @Autowired // @Autowired
// private StringRedisTemplate stringRedisTemplate; // private MgrUserService mgrUserService;
//// @Autowired
//// private StringRedisTemplate stringRedisTemplate;
////
//// @PostMapping({"/admin/add"})
//// @RequiresGuest
//// public LeResponse<Void> addMgrUserInfo(@RequestBody MgrUserAdminAddDTO mgrUserAdminAddDTO) {
//// this.mgrUserService.addMgrUserInfo(mgrUserAdminAddDTO);
//// return LeResponse.succ();
//// }
////
//// @PutMapping({"/block"})
//// @RequiresGuest
//// public LeResponse<Void> blockMgrUser() {
//// this.mgrUserService.blockMgrUser();
//// return LeResponse.succ();
//// }
////
//// @PostMapping({"/add"})
//// @RequiresAuthentication
//// @RequiresPermissions(
//// value = {"user:mgruser:add"},
//// logical = Logical.OR
//// )
//// @ApiOperation("新建商家操作员")
//// public LeResponse<Void> addMgrUser(@RequestBody @Valid LeRequest<MgrUserAddDTO> leRequest) {
//// MgrUserAddDTO userAddDTO = (MgrUserAddDTO)leRequest.getContent();
//// this.mgrUserService.addMgrUser(userAddDTO);
//// return LeResponse.succ();
//// }
////
//// @GetMapping({"/page"})
//// @RequiresAuthentication
//// @ApiOperation("分页获取商家操作员信息")
//// public LeResponse<Page<MgrUserPageVO>> getMgrUserPage(LeRequest<String> leRequest) {
//// String content = (String)leRequest.getContent();
//// Page<MgrUserPageVO> resultPage = this.mgrUserService.getMgrUserPage(content);
//// return LeResponse.succ(resultPage);
//// }
////
//// @GetMapping({"/page-other"})
//// @RequiresAuthentication
//// @ApiOperation("分页获取商家操作员信息")
//// public LeResponse<Page<MgrUserPageVO>> getMgrUserPageOther(LeRequest<String> leRequest) {
//// String content = (String)leRequest.getContent();
//// Page<MgrUserPageVO> resultPage = this.mgrUserService.getMgrUserPage(content);
//// return LeResponse.succ(resultPage);
//// }
////
//// @GetMapping({"/info/{userId}"})
//// @RequiresAuthentication
//// @ApiOperation("分页获取商家操作员信息")
//// public MgrUserInfoVO getMgrUserInfo(@PathVariable("userId") Long userId) {
//// return this.mgrUserService.getMgrUserInfo(userId);
//// }
////
//// @PutMapping({"/edit"})
//// @RequiresAuthentication
//// @RequiresPermissions(
//// value = {"user:mgruser:edit"},
//// logical = Logical.OR
//// )
//// @ApiOperation("修改商家操作员信息")
//// public LeResponse<Void> editMgrUser(@RequestBody LeRequest<MgrUserEditDTO> leRequest) {
//// MgrUserEditDTO userEditDTO = (MgrUserEditDTO)leRequest.getContent();
//// this.mgrUserService.editMgrUser(userEditDTO);
//// return LeResponse.succ();
//// }
////
//// @DeleteMapping({"/remove/{userId}"})
//// @RequiresGuest
//// @RequiresPermissions(
//// value = {"user:mgruser:remove"},
//// logical = Logical.OR
//// )
//// @ApiOperation("删除商家操作员信息")
//// public LeResponse<Void> removeByUserId(@PathVariable Long userId) {
//// this.mgrUserService.removeByUserId(userId);
//// return LeResponse.succ();
//// }
////
//// @PostMapping({"/auth-temp-ops-user"})
//// @RequiresAuthentication
//// @SysLog("授权临时调试账号")
//// public MgrUserOpsPO authTempOpsUser() {
//// return this.mgrUserService.authTempOpsUser();
//// }
////
//// @GetMapping({"/all/delivery/list"})
//// @RequiresAuthentication
//// public LeResponse<List<MgrRoleUserVO>> getAllDeliveryUserId() {
//// List<MgrRoleUserVO> userList = this.mgrUserService.getAllDeliveryUser();
//// return LeResponse.succ(userList);
//// }
////
//// @PutMapping({"/change/password"})
//// @RequiresAuthentication
//// public LeResponse<Void> changeMgrUserPassword(@RequestBody @Valid LeRequest<MgrUserChangePasswordDTO> leRequest) {
//// MgrUserChangePasswordDTO content = (MgrUserChangePasswordDTO)leRequest.getContent();
//// this.mgrUserService.changeMgrUserPassword(content);
//// return LeResponse.succ();
//// }
////
//// @PostMapping({"/change/password/by/old"})
//// @RequiresAuthentication
//// @SysLog("根据旧密码修改密码")
//// public LeResponse<Void> changePasswordByOld(@RequestBody @Valid LeRequest<MgrUserChangePasswordByOldDTO> leRequest) {
//// MgrUserChangePasswordByOldDTO content = (MgrUserChangePasswordByOldDTO)leRequest.getContent();
//// this.mgrUserService.changePasswordByOld(content);
//// return LeResponse.succ();
//// }
////
//// @SysLog("获取登录用户的信息")
//// @PostMapping({"/detail/info"})
//// @RequiresAuthentication
//// @ApiOperation("获取登录用户的信息")
//// public LeResponse<MgrUserDetailVO> getUserDetailInfo() {
//// MgrUserDetailVO result = this.mgrUserService.getUserDetailInfo();
//// return LeResponse.succ(result);
//// }
////
//// @PostMapping({"/list/exclude/supplier"})
//// @RequiresGuest
//// @ApiOperation("获取领料人")
//// public List<MgrRoleUserVO> getUserExcludeSupplier() {
//// return this.mgrUserService.getUserExcludeSupplier();
//// }
////
//// @GetMapping({"/all/keeper/list"})
//// @RequiresGuest
//// public LeResponse<List<MgrRoleUserVO>> getAllKeeperUserId() {
//// List<MgrRoleUserVO> userList = this.mgrUserService.getAllKeeperUserId();
//// return LeResponse.succ(userList);
//// }
////
//// @PostMapping({"/all/buyer/list"})
//// @RequiresGuest
//// public LeResponse<List<MgrRoleUserVO>> getAllBuyerUserId() {
//// List<MgrRoleUserVO> userList = this.mgrUserService.getAllBuyerUserId();
//// return LeResponse.succ(userList);
//// }
////
//// @PostMapping({"/relieve/lock/{username}"})
//// @RequiresGuest
//// public LeResponse<Void> getAllBuyerUserId(@PathVariable String username) {
//// this.stringRedisTemplate.delete("user-lock-" + username);
//// return LeResponse.succ();
//// }
// //
// @PostMapping({"/admin/add"}) // @PostMapping({"/list/by/role"})
// @RequiresGuest // @ApiOperation("获取指定角色用户列表")
// public LeResponse<Void> addMgrUserInfo(@RequestBody MgrUserAdminAddDTO mgrUserAdminAddDTO) { // public AjaxResult getAllUserByRoleCode(@RequestBody MgrRoleUserListDTO content) {
// this.mgrUserService.addMgrUserInfo(mgrUserAdminAddDTO); // List<MgrRoleUserVO> resultList = this.mgrUserService.getAllUserByRoleCode(content);
// return LeResponse.succ(); // return AjaxResult.success(resultList);
// } // }
// ////
// @PutMapping({"/block"}) //// @PostMapping({"/update/default/role"})
// @RequiresGuest //// @RequiresAuthentication
// public LeResponse<Void> blockMgrUser() { //// @ApiOperation("修改默认角色")
// this.mgrUserService.blockMgrUser(); //// public void updateDefaultRole(@RequestBody LeRequest<String> leRequest) {
// return LeResponse.succ(); //// String roleCode = (String)leRequest.getContent();
// } //// this.mgrUserService.updateDefaultRole(roleCode);
// //// }
// @PostMapping({"/add"}) ////
// @RequiresAuthentication //// @PostMapping({"/change/role"})
// @RequiresPermissions( //// @RequiresAuthentication
// value = {"user:mgruser:add"}, //// @ApiOperation("选择角色")
// logical = Logical.OR //// public void changeRole(@RequestBody LeRequest<String> leRequest) {
// ) //// String roleCode = (String)leRequest.getContent();
// @ApiOperation("新建商家操作员") //// this.mgrUserService.changeRole(roleCode);
// public LeResponse<Void> addMgrUser(@RequestBody @Valid LeRequest<MgrUserAddDTO> leRequest) { //// }
// MgrUserAddDTO userAddDTO = (MgrUserAddDTO)leRequest.getContent(); //}
// this.mgrUserService.addMgrUser(userAddDTO);
// return LeResponse.succ();
// }
//
// @GetMapping({"/page"})
// @RequiresAuthentication
// @ApiOperation("分页获取商家操作员信息")
// public LeResponse<Page<MgrUserPageVO>> getMgrUserPage(LeRequest<String> leRequest) {
// String content = (String)leRequest.getContent();
// Page<MgrUserPageVO> resultPage = this.mgrUserService.getMgrUserPage(content);
// return LeResponse.succ(resultPage);
// }
//
// @GetMapping({"/page-other"})
// @RequiresAuthentication
// @ApiOperation("分页获取商家操作员信息")
// public LeResponse<Page<MgrUserPageVO>> getMgrUserPageOther(LeRequest<String> leRequest) {
// String content = (String)leRequest.getContent();
// Page<MgrUserPageVO> resultPage = this.mgrUserService.getMgrUserPage(content);
// return LeResponse.succ(resultPage);
// }
//
// @GetMapping({"/info/{userId}"})
// @RequiresAuthentication
// @ApiOperation("分页获取商家操作员信息")
// public MgrUserInfoVO getMgrUserInfo(@PathVariable("userId") Long userId) {
// return this.mgrUserService.getMgrUserInfo(userId);
// }
//
// @PutMapping({"/edit"})
// @RequiresAuthentication
// @RequiresPermissions(
// value = {"user:mgruser:edit"},
// logical = Logical.OR
// )
// @ApiOperation("修改商家操作员信息")
// public LeResponse<Void> editMgrUser(@RequestBody LeRequest<MgrUserEditDTO> leRequest) {
// MgrUserEditDTO userEditDTO = (MgrUserEditDTO)leRequest.getContent();
// this.mgrUserService.editMgrUser(userEditDTO);
// return LeResponse.succ();
// }
//
// @DeleteMapping({"/remove/{userId}"})
// @RequiresGuest
// @RequiresPermissions(
// value = {"user:mgruser:remove"},
// logical = Logical.OR
// )
// @ApiOperation("删除商家操作员信息")
// public LeResponse<Void> removeByUserId(@PathVariable Long userId) {
// this.mgrUserService.removeByUserId(userId);
// return LeResponse.succ();
// }
//
// @PostMapping({"/auth-temp-ops-user"})
// @RequiresAuthentication
// @SysLog("授权临时调试账号")
// public MgrUserOpsPO authTempOpsUser() {
// return this.mgrUserService.authTempOpsUser();
// }
//
// @GetMapping({"/all/delivery/list"})
// @RequiresAuthentication
// public LeResponse<List<MgrRoleUserVO>> getAllDeliveryUserId() {
// List<MgrRoleUserVO> userList = this.mgrUserService.getAllDeliveryUser();
// return LeResponse.succ(userList);
// }
//
// @PutMapping({"/change/password"})
// @RequiresAuthentication
// public LeResponse<Void> changeMgrUserPassword(@RequestBody @Valid LeRequest<MgrUserChangePasswordDTO> leRequest) {
// MgrUserChangePasswordDTO content = (MgrUserChangePasswordDTO)leRequest.getContent();
// this.mgrUserService.changeMgrUserPassword(content);
// return LeResponse.succ();
// }
//
// @PostMapping({"/change/password/by/old"})
// @RequiresAuthentication
// @SysLog("根据旧密码修改密码")
// public LeResponse<Void> changePasswordByOld(@RequestBody @Valid LeRequest<MgrUserChangePasswordByOldDTO> leRequest) {
// MgrUserChangePasswordByOldDTO content = (MgrUserChangePasswordByOldDTO)leRequest.getContent();
// this.mgrUserService.changePasswordByOld(content);
// return LeResponse.succ();
// }
//
// @SysLog("获取登录用户的信息")
// @PostMapping({"/detail/info"})
// @RequiresAuthentication
// @ApiOperation("获取登录用户的信息")
// public LeResponse<MgrUserDetailVO> getUserDetailInfo() {
// MgrUserDetailVO result = this.mgrUserService.getUserDetailInfo();
// return LeResponse.succ(result);
// }
//
// @PostMapping({"/list/exclude/supplier"})
// @RequiresGuest
// @ApiOperation("获取领料人")
// public List<MgrRoleUserVO> getUserExcludeSupplier() {
// return this.mgrUserService.getUserExcludeSupplier();
// }
//
// @GetMapping({"/all/keeper/list"})
// @RequiresGuest
// public LeResponse<List<MgrRoleUserVO>> getAllKeeperUserId() {
// List<MgrRoleUserVO> userList = this.mgrUserService.getAllKeeperUserId();
// return LeResponse.succ(userList);
// }
//
// @PostMapping({"/all/buyer/list"})
// @RequiresGuest
// public LeResponse<List<MgrRoleUserVO>> getAllBuyerUserId() {
// List<MgrRoleUserVO> userList = this.mgrUserService.getAllBuyerUserId();
// return LeResponse.succ(userList);
// }
//
// @PostMapping({"/relieve/lock/{username}"})
// @RequiresGuest
// public LeResponse<Void> getAllBuyerUserId(@PathVariable String username) {
// this.stringRedisTemplate.delete("user-lock-" + username);
// return LeResponse.succ();
// }
@PostMapping({"/list/by/role"})
@ApiOperation("获取指定角色用户列表")
public AjaxResult getAllUserByRoleCode(@RequestBody MgrRoleUserListDTO content) {
List<MgrRoleUserVO> resultList = this.mgrUserService.getAllUserByRoleCode(content);
return AjaxResult.success(resultList);
}
//
// @PostMapping({"/update/default/role"})
// @RequiresAuthentication
// @ApiOperation("修改默认角色")
// public void updateDefaultRole(@RequestBody LeRequest<String> leRequest) {
// String roleCode = (String)leRequest.getContent();
// this.mgrUserService.updateDefaultRole(roleCode);
// }
//
// @PostMapping({"/change/role"})
// @RequiresAuthentication
// @ApiOperation("选择角色")
// public void changeRole(@RequestBody LeRequest<String> leRequest) {
// String roleCode = (String)leRequest.getContent();
// this.mgrUserService.changeRole(roleCode);
// }
}

View File

@ -1,59 +1,59 @@
package com.bonus.canteen.core.auth.user.mapper; //package com.bonus.canteen.core.auth.user.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bonus.canteen.core.auth.role.dto.MgrRoleUserDTO;
import com.bonus.canteen.core.auth.role.vo.MgrRoleUserVO;
import com.bonus.canteen.core.auth.user.entity.MgrUser;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface MgrUserMapper extends BaseMapper<MgrUser> {
// Page<MgrUserPageVO> selectRolePage(Page<MgrUserPageVO> page, @Param("userPageDTO") MgrUserPageDTO userPageDTO);
List<MgrRoleUserVO> selectAllUserByRoleCode(MgrRoleUserDTO deliveryUserDTO);
// MgrUserDetailVO selectUserInfoByUserId(@Param("userId") Long userId, @Param("delFlag") Integer delFlag);
// //
// @Select({"select count(0) from alloc_canteen where cust_id = #{userId};"}) //import com.baomidou.mybatisplus.core.mapper.BaseMapper;
// int checkCountBasicsDdiningUserId(Long userId); //import com.bonus.canteen.core.auth.role.dto.MgrRoleUserDTO;
//import com.bonus.canteen.core.auth.role.vo.MgrRoleUserVO;
//import com.bonus.canteen.core.auth.user.entity.MgrUser;
//import org.apache.ibatis.annotations.Mapper;
// //
// @Select({"select count(0) from alloc_stall where cust_id = #{userId};"}) //import java.util.List;
// int checkBasicsShopstallsUserId(Long userId);
// //
// @Select({"select count(0) from drp_warehouse where user_id = #{userId};"}) //@Mapper
// int checkDrpWarehouse(Long userId); //public interface MgrUserMapper extends BaseMapper<MgrUser> {
//// Page<MgrUserPageVO> selectRolePage(Page<MgrUserPageVO> page, @Param("userPageDTO") MgrUserPageDTO userPageDTO);
// //
// @Select({"select user_id, real_name from mgr_user ${ew.customSqlSegment}"}) // List<MgrRoleUserVO> selectAllUserByRoleCode(MgrRoleUserDTO deliveryUserDTO);
// MgrUserIdNameVO selectIdAndRealNameByWrapper(@Param("ew") Wrapper<MgrUser> wrapper);
// //
// @Select({"select dining_id as canteen_id, shopstall_id from basics_shopstalls ${ew.customSqlSegment}"}) //// MgrUserDetailVO selectUserInfoByUserId(@Param("userId") Long userId, @Param("delFlag") Integer delFlag);
// List<EffCanteenVO> selectShopstallByWrapper(@Param("ew") Wrapper<?> wrapper); ////
// //// @Select({"select count(0) from alloc_canteen where cust_id = #{userId};"})
// @Select({"select canteen_id, shopstall_id from mkt_effective_detail ${ew.customSqlSegment}"}) //// int checkCountBasicsDdiningUserId(Long userId);
// List<EffCanteenVO> selectCanteenByWrapper(@Param("ew") Wrapper<?> wrapper); ////
// //// @Select({"select count(0) from alloc_stall where cust_id = #{userId};"})
// @Select({"select 1 from mkt_effective ${ew.customSqlSegment}"}) //// int checkBasicsShopstallsUserId(Long userId);
// Integer selectExistFromMktEffectiveByWrapper(@Param("ew") Wrapper<?> wrapper); ////
// //// @Select({"select count(0) from drp_warehouse where user_id = #{userId};"})
// List<MgrUserIdNameVO> listUserByIdAndRole(@Param("userId") Long userId, @Param("roleCode") String roleCode, @Param("delFlag") Integer delFlag); //// int checkDrpWarehouse(Long userId);
// ////
// Long selectUserIdByCustId(@Param("custId") Long custId); //// @Select({"select user_id, real_name from mgr_user ${ew.customSqlSegment}"})
// //// MgrUserIdNameVO selectIdAndRealNameByWrapper(@Param("ew") Wrapper<MgrUser> wrapper);
// String selectUserNameIdByCustId(@Param("custId") Long custId); ////
// //// @Select({"select dining_id as canteen_id, shopstall_id from basics_shopstalls ${ew.customSqlSegment}"})
// Long selectCustIdByUserId(@Param("userId") Long userId); //// List<EffCanteenVO> selectShopstallByWrapper(@Param("ew") Wrapper<?> wrapper);
// ////
// List<MgrRoleUserVO> getUserExcludeSupplier(@Param("delFlag") Integer delFlag); //// @Select({"select canteen_id, shopstall_id from mkt_effective_detail ${ew.customSqlSegment}"})
// //// List<EffCanteenVO> selectCanteenByWrapper(@Param("ew") Wrapper<?> wrapper);
// MgrUser getUserByRoleCode(@Param("roleCode") String roleCode); ////
// //// @Select({"select 1 from mkt_effective ${ew.customSqlSegment}"})
// List<MgrUser> queryByRoles(@Param("roles") List<Long> roles); //// Integer selectExistFromMktEffectiveByWrapper(@Param("ew") Wrapper<?> wrapper);
// ////
// List<MgrRoleUserVO> queryMgrUserIdListByCustIdList(@Param("custIdList") List<Long> custIdList); //// List<MgrUserIdNameVO> listUserByIdAndRole(@Param("userId") Long userId, @Param("roleCode") String roleCode, @Param("delFlag") Integer delFlag);
// ////
// List<MgrRoleUserVO> queryCanteenManagerMgrUserList(@Param("caneenIdList") List<Long> caneenIdList); //// Long selectUserIdByCustId(@Param("custId") Long custId);
// ////
// MgrUser getUserByRoleCodeExcludeUserName(@Param("roleCode") String roleCode, @Param("excludeUserName") String excludeUserName); //// String selectUserNameIdByCustId(@Param("custId") Long custId);
} ////
//// Long selectCustIdByUserId(@Param("userId") Long userId);
////
//// List<MgrRoleUserVO> getUserExcludeSupplier(@Param("delFlag") Integer delFlag);
////
//// MgrUser getUserByRoleCode(@Param("roleCode") String roleCode);
////
//// List<MgrUser> queryByRoles(@Param("roles") List<Long> roles);
////
//// List<MgrRoleUserVO> queryMgrUserIdListByCustIdList(@Param("custIdList") List<Long> custIdList);
////
//// List<MgrRoleUserVO> queryCanteenManagerMgrUserList(@Param("caneenIdList") List<Long> caneenIdList);
////
//// MgrUser getUserByRoleCodeExcludeUserName(@Param("roleCode") String roleCode, @Param("excludeUserName") String excludeUserName);
//}

View File

@ -1,252 +1,252 @@
<?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.bonus.canteen.core.auth.user.mapper.MgrUserMapper"> <!--<mapper namespace="com.bonus.canteen.core.auth.user.mapper.MgrUserMapper">-->
<!-- <resultMap id="mgrUserMap" type="net.xnzn.core.auth.user.entity.MgrUser">--> <!--&lt;!&ndash; <resultMap id="mgrUserMap" type="net.xnzn.core.auth.user.entity.MgrUser">&ndash;&gt;-->
<!-- <id property="id" column="id"/>--> <!--&lt;!&ndash; <id property="id" column="id"/>&ndash;&gt;-->
<!-- <result property="userId" column="user_id"/>--> <!--&lt;!&ndash; <result property="userId" column="user_id"/>&ndash;&gt;-->
<!-- <result property="username" column="username"/>--> <!--&lt;!&ndash; <result property="username" column="username"/>&ndash;&gt;-->
<!-- <result property="password" column="password"/>--> <!--&lt;!&ndash; <result property="password" column="password"/>&ndash;&gt;-->
<!-- <result property="realName" column="real_name"/>--> <!--&lt;!&ndash; <result property="realName" column="real_name"/>&ndash;&gt;-->
<!-- <result property="salt" column="salt"/>--> <!--&lt;!&ndash; <result property="salt" column="salt"/>&ndash;&gt;-->
<!-- <result property="phone" column="phone"/>--> <!--&lt;!&ndash; <result property="phone" column="phone"/>&ndash;&gt;-->
<!-- <result property="avatar" column="avatar"/>--> <!--&lt;!&ndash; <result property="avatar" column="avatar"/>&ndash;&gt;-->
<!-- <result property="deptId" column="dept_id"/>--> <!--&lt;!&ndash; <result property="deptId" column="dept_id"/>&ndash;&gt;-->
<!-- <result property="lockFlag" column="lock_flag"/>--> <!--&lt;!&ndash; <result property="lockFlag" column="lock_flag"/>&ndash;&gt;-->
<!-- <result property="delFlag" column="del_flag"/>--> <!--&lt;!&ndash; <result property="delFlag" column="del_flag"/>&ndash;&gt;-->
<!-- <result property="wxOpenid" column="wx_openid"/>--> <!--&lt;!&ndash; <result property="wxOpenid" column="wx_openid"/>&ndash;&gt;-->
<!-- <result property="miniOpenid" column="mini_openid"/>--> <!--&lt;!&ndash; <result property="miniOpenid" column="mini_openid"/>&ndash;&gt;-->
<!-- <result property="qqOpenid" column="qq_openid"/>--> <!--&lt;!&ndash; <result property="qqOpenid" column="qq_openid"/>&ndash;&gt;-->
<!-- <result property="giteeLogin" column="gitee_login"/>--> <!--&lt;!&ndash; <result property="giteeLogin" column="gitee_login"/>&ndash;&gt;-->
<!-- <result property="oscId" column="osc_id"/>--> <!--&lt;!&ndash; <result property="oscId" column="osc_id"/>&ndash;&gt;-->
<!-- <result property="revision" column="revision"/>--> <!--&lt;!&ndash; <result property="revision" column="revision"/>&ndash;&gt;-->
<!-- <result property="crby" column="crby"/>--> <!--&lt;!&ndash; <result property="crby" column="crby"/>&ndash;&gt;-->
<!-- <result property="crtime" column="crtime"/>--> <!--&lt;!&ndash; <result property="crtime" column="crtime"/>&ndash;&gt;-->
<!-- <result property="upby" column="upby"/>--> <!--&lt;!&ndash; <result property="upby" column="upby"/>&ndash;&gt;-->
<!-- <result property="uptime" column="uptime"/>--> <!--&lt;!&ndash; <result property="uptime" column="uptime"/>&ndash;&gt;-->
<!-- </resultMap>--> <!--&lt;!&ndash; </resultMap>&ndash;&gt;-->
<!-- <resultMap id="mgrUserPageVOMap" type="net.xnzn.core.auth.user.vo.MgrUserPageVO">--> <!--&lt;!&ndash; <resultMap id="mgrUserPageVOMap" type="net.xnzn.core.auth.user.vo.MgrUserPageVO">&ndash;&gt;-->
<!-- <result property="userId" column="user_id"/>--> <!--&lt;!&ndash; <result property="userId" column="user_id"/>&ndash;&gt;-->
<!-- <result property="custId" column="cust_id"/>--> <!--&lt;!&ndash; <result property="custId" column="cust_id"/>&ndash;&gt;-->
<!-- <result property="areaId" column="area_id"/>--> <!--&lt;!&ndash; <result property="areaId" column="area_id"/>&ndash;&gt;-->
<!-- <result property="areaName" column="area_name"/>--> <!--&lt;!&ndash; <result property="areaName" column="area_name"/>&ndash;&gt;-->
<!-- <result property="username" column="username"/>--> <!--&lt;!&ndash; <result property="username" column="username"/>&ndash;&gt;-->
<!-- <result property="realName" column="real_name"/>--> <!--&lt;!&ndash; <result property="realName" column="real_name"/>&ndash;&gt;-->
<!-- <result property="phone" column="phone"/>--> <!--&lt;!&ndash; <result property="phone" column="phone"/>&ndash;&gt;-->
<!-- <result property="avatar" column="avatar"/>--> <!--&lt;!&ndash; <result property="avatar" column="avatar"/>&ndash;&gt;-->
<!-- <result property="lockFlag" column="lock_flag"/>--> <!--&lt;!&ndash; <result property="lockFlag" column="lock_flag"/>&ndash;&gt;-->
<!-- <result property="wxOpenid" column="wx_openid"/>--> <!--&lt;!&ndash; <result property="wxOpenid" column="wx_openid"/>&ndash;&gt;-->
<!-- <result property="miniOpenid" column="mini_openid"/>--> <!--&lt;!&ndash; <result property="miniOpenid" column="mini_openid"/>&ndash;&gt;-->
<!-- <result property="qqOpenid" column="qq_openid"/>--> <!--&lt;!&ndash; <result property="qqOpenid" column="qq_openid"/>&ndash;&gt;-->
<!-- <result property="giteeLogin" column="gitee_login"/>--> <!--&lt;!&ndash; <result property="giteeLogin" column="gitee_login"/>&ndash;&gt;-->
<!-- <result property="oscId" column="osc_id"/>--> <!--&lt;!&ndash; <result property="oscId" column="osc_id"/>&ndash;&gt;-->
<!-- <result property="crby" column="crby"/>--> <!--&lt;!&ndash; <result property="crby" column="crby"/>&ndash;&gt;-->
<!-- <result property="crtime" column="crtime"/>--> <!--&lt;!&ndash; <result property="crtime" column="crtime"/>&ndash;&gt;-->
<!-- <result property="upby" column="upby"/>--> <!--&lt;!&ndash; <result property="upby" column="upby"/>&ndash;&gt;-->
<!-- <result property="uptime" column="uptime"/>--> <!--&lt;!&ndash; <result property="uptime" column="uptime"/>&ndash;&gt;-->
<!-- <result property="loginTime" column="login_time"/>--> <!--&lt;!&ndash; <result property="loginTime" column="login_time"/>&ndash;&gt;-->
<!-- <collection property="roleList" ofType="net.xnzn.core.auth.user.vo.MgrUserRolePageVO">--> <!--&lt;!&ndash; <collection property="roleList" ofType="net.xnzn.core.auth.user.vo.MgrUserRolePageVO">&ndash;&gt;-->
<!-- <result property="roleId" column="role_id"/>--> <!--&lt;!&ndash; <result property="roleId" column="role_id"/>&ndash;&gt;-->
<!-- <result property="roleName" column="role_name"/>--> <!--&lt;!&ndash; <result property="roleName" column="role_name"/>&ndash;&gt;-->
<!-- <result property="roleCode" column="role_code"/>--> <!--&lt;!&ndash; <result property="roleCode" column="role_code"/>&ndash;&gt;-->
<!-- <result property="roleDesc" column="role_desc"/>--> <!--&lt;!&ndash; <result property="roleDesc" column="role_desc"/>&ndash;&gt;-->
<!-- </collection>--> <!--&lt;!&ndash; </collection>&ndash;&gt;-->
<!-- </resultMap>--> <!--&lt;!&ndash; </resultMap>&ndash;&gt;-->
<!-- &lt;!&ndash; 分页获取操作员信息 &ndash;&gt;--> <!--&lt;!&ndash; &lt;!&ndash; 分页获取操作员信息 &ndash;&gt;&ndash;&gt;-->
<!-- <select id="selectRolePage" resultMap="mgrUserPageVOMap">--> <!--&lt;!&ndash; <select id="selectRolePage" resultMap="mgrUserPageVOMap">&ndash;&gt;-->
<!-- SELECT mu.user_id,--> <!--&lt;!&ndash; SELECT mu.user_id,&ndash;&gt;-->
<!-- mu.cust_id,--> <!--&lt;!&ndash; mu.cust_id,&ndash;&gt;-->
<!-- mu.area_id,--> <!--&lt;!&ndash; mu.area_id,&ndash;&gt;-->
<!-- mu.username,--> <!--&lt;!&ndash; mu.username,&ndash;&gt;-->
<!-- mu.real_name,--> <!--&lt;!&ndash; mu.real_name,&ndash;&gt;-->
<!-- mu.phone,--> <!--&lt;!&ndash; mu.phone,&ndash;&gt;-->
<!-- mu.avatar,--> <!--&lt;!&ndash; mu.avatar,&ndash;&gt;-->
<!-- mu.user_type,--> <!--&lt;!&ndash; mu.user_type,&ndash;&gt;-->
<!-- mu.lock_flag,--> <!--&lt;!&ndash; mu.lock_flag,&ndash;&gt;-->
<!-- mu.mini_openid,--> <!--&lt;!&ndash; mu.mini_openid,&ndash;&gt;-->
<!-- mu.qq_openid,--> <!--&lt;!&ndash; mu.qq_openid,&ndash;&gt;-->
<!-- mu.gitee_login,--> <!--&lt;!&ndash; mu.gitee_login,&ndash;&gt;-->
<!-- mu.osc_id,--> <!--&lt;!&ndash; mu.osc_id,&ndash;&gt;-->
<!-- mu.crby,--> <!--&lt;!&ndash; mu.crby,&ndash;&gt;-->
<!-- mu.crtime,--> <!--&lt;!&ndash; mu.crtime,&ndash;&gt;-->
<!-- mu.upby,--> <!--&lt;!&ndash; mu.upby,&ndash;&gt;-->
<!-- mu.uptime,--> <!--&lt;!&ndash; mu.uptime,&ndash;&gt;-->
<!-- aa.area_name,--> <!--&lt;!&ndash; aa.area_name,&ndash;&gt;-->
<!-- mu.login_time--> <!--&lt;!&ndash; mu.login_time&ndash;&gt;-->
<!-- FROM mgr_user mu--> <!--&lt;!&ndash; FROM mgr_user mu&ndash;&gt;-->
<!-- LEFT JOIN alloc_area aa ON mu.area_id = aa.area_id--> <!--&lt;!&ndash; LEFT JOIN alloc_area aa ON mu.area_id = aa.area_id&ndash;&gt;-->
<!-- WHERE mu.del_flag = #{userPageDTO.delFlag}--> <!--&lt;!&ndash; WHERE mu.del_flag = #{userPageDTO.delFlag}&ndash;&gt;-->
<!-- AND EXISTS(SELECT NULL--> <!--&lt;!&ndash; AND EXISTS(SELECT NULL&ndash;&gt;-->
<!-- FROM mgr_user_role mur--> <!--&lt;!&ndash; FROM mgr_user_role mur&ndash;&gt;-->
<!-- left join mgr_role mr on mur.role_id = mr.role_id--> <!--&lt;!&ndash; left join mgr_role mr on mur.role_id = mr.role_id&ndash;&gt;-->
<!-- WHERE mu.user_id = mur.user_id--> <!--&lt;!&ndash; WHERE mu.user_id = mur.user_id&ndash;&gt;-->
<!-- AND mr.role_code != #{userPageDTO.roleCode})--> <!--&lt;!&ndash; AND mr.role_code != #{userPageDTO.roleCode})&ndash;&gt;-->
<!-- <if test="userPageDTO.username != null and userPageDTO.username != ''">--> <!--&lt;!&ndash; <if test="userPageDTO.username != null and userPageDTO.username != ''">&ndash;&gt;-->
<!-- AND username = #{userPageDTO.username}--> <!--&lt;!&ndash; AND username = #{userPageDTO.username}&ndash;&gt;-->
<!-- </if>--> <!--&lt;!&ndash; </if>&ndash;&gt;-->
<!-- <if test="userPageDTO.realName != null and userPageDTO.realName != ''">--> <!--&lt;!&ndash; <if test="userPageDTO.realName != null and userPageDTO.realName != ''">&ndash;&gt;-->
<!-- AND real_name = #{userPageDTO.realName,typeHandler=net.xnzn.core.common.encrypt.SM4EncDecHandler}--> <!--&lt;!&ndash; AND real_name = #{userPageDTO.realName,typeHandler=net.xnzn.core.common.encrypt.SM4EncDecHandler}&ndash;&gt;-->
<!-- </if>--> <!--&lt;!&ndash; </if>&ndash;&gt;-->
<!-- <if test="userPageDTO.phone != null and userPageDTO.phone != ''">--> <!--&lt;!&ndash; <if test="userPageDTO.phone != null and userPageDTO.phone != ''">&ndash;&gt;-->
<!-- AND phone = #{userPageDTO.phone,typeHandler=net.xnzn.core.common.encrypt.SM4EncDecHandler}--> <!--&lt;!&ndash; AND phone = #{userPageDTO.phone,typeHandler=net.xnzn.core.common.encrypt.SM4EncDecHandler}&ndash;&gt;-->
<!-- </if>--> <!--&lt;!&ndash; </if>&ndash;&gt;-->
<!-- <if test="userPageDTO.keyword != null and userPageDTO.keyword != ''">--> <!--&lt;!&ndash; <if test="userPageDTO.keyword != null and userPageDTO.keyword != ''">&ndash;&gt;-->
<!-- AND concat(IFNULL(real_name, ''), IFNULL(phone, ''), IFNULL(phone_suffix, '')) like concat('%', #{userPageDTO.keyword,typeHandler=net.xnzn.core.common.encrypt.SM4EncDecHandler}, '%')--> <!--&lt;!&ndash; AND concat(IFNULL(real_name, ''), IFNULL(phone, ''), IFNULL(phone_suffix, '')) like concat('%', #{userPageDTO.keyword,typeHandler=net.xnzn.core.common.encrypt.SM4EncDecHandler}, '%')&ndash;&gt;-->
<!-- </if>--> <!--&lt;!&ndash; </if>&ndash;&gt;-->
<!-- <if test="userPageDTO.areaIdList != null and userPageDTO.areaIdList.size() != 0">--> <!--&lt;!&ndash; <if test="userPageDTO.areaIdList != null and userPageDTO.areaIdList.size() != 0">&ndash;&gt;-->
<!-- AND mu.area_id IN--> <!--&lt;!&ndash; AND mu.area_id IN&ndash;&gt;-->
<!-- <foreach collection="userPageDTO.areaIdList" item="item" index="index" open="("--> <!--&lt;!&ndash; <foreach collection="userPageDTO.areaIdList" item="item" index="index" open="("&ndash;&gt;-->
<!-- separator="," close=")">--> <!--&lt;!&ndash; separator="," close=")">&ndash;&gt;-->
<!-- #{item}--> <!--&lt;!&ndash; #{item}&ndash;&gt;-->
<!-- </foreach>--> <!--&lt;!&ndash; </foreach>&ndash;&gt;-->
<!-- </if>--> <!--&lt;!&ndash; </if>&ndash;&gt;-->
<!-- <if test="userPageDTO.authAreaIdList != null and userPageDTO.authAreaIdList.size() != 0">--> <!--&lt;!&ndash; <if test="userPageDTO.authAreaIdList != null and userPageDTO.authAreaIdList.size() != 0">&ndash;&gt;-->
<!-- AND EXISTS (SELECT NULL--> <!--&lt;!&ndash; AND EXISTS (SELECT NULL&ndash;&gt;-->
<!-- FROM mgr_user_role mur--> <!--&lt;!&ndash; FROM mgr_user_role mur&ndash;&gt;-->
<!-- left join mgr_role_area mra on mur.role_id = mra.role_id--> <!--&lt;!&ndash; left join mgr_role_area mra on mur.role_id = mra.role_id&ndash;&gt;-->
<!-- WHERE mu.user_id = mur.user_id--> <!--&lt;!&ndash; WHERE mu.user_id = mur.user_id&ndash;&gt;-->
<!-- AND mra.data_id IN--> <!--&lt;!&ndash; AND mra.data_id IN&ndash;&gt;-->
<!-- <foreach collection="userPageDTO.authAreaIdList" item="item" index="index" open="("--> <!--&lt;!&ndash; <foreach collection="userPageDTO.authAreaIdList" item="item" index="index" open="("&ndash;&gt;-->
<!-- separator="," close=")">--> <!--&lt;!&ndash; separator="," close=")">&ndash;&gt;-->
<!-- #{item}--> <!--&lt;!&ndash; #{item}&ndash;&gt;-->
<!-- </foreach>--> <!--&lt;!&ndash; </foreach>&ndash;&gt;-->
<!-- AND mra.half_select = 1)--> <!--&lt;!&ndash; AND mra.half_select = 1)&ndash;&gt;-->
<!-- </if>--> <!--&lt;!&ndash; </if>&ndash;&gt;-->
<!-- ORDER BY mu.id DESC--> <!--&lt;!&ndash; ORDER BY mu.id DESC&ndash;&gt;-->
<!-- </select>--> <!--&lt;!&ndash; </select>&ndash;&gt;-->
<!-- 查询指定角色所有用户信息 --> <!-- &lt;!&ndash; 查询指定角色所有用户信息 &ndash;&gt;-->
<select id="selectAllUserByRoleCode" resultType="com.bonus.canteen.core.auth.role.vo.MgrRoleUserVO"> <!-- <select id="selectAllUserByRoleCode" resultType="com.bonus.canteen.core.auth.role.vo.MgrRoleUserVO">-->
SELECT mu.user_id userId,
mu.username,
mu.real_name realName
FROM mgr_user mu
LEFT JOIN cust_info ci ON mu.cust_id = ci.cust_id
where mu.del_flag = #{delFlag}
<if test="roleCode != null and roleCode != ''">
AND ci.job = #{roleCode}
</if>
</select>
<!-- &lt;!&ndash; &ndash;&gt;-->
<!-- <select id="selectUserInfoByUserId" resultType="net.xnzn.core.auth.user.vo.MgrUserDetailVO">-->
<!-- select user_id userId,-->
<!-- username,-->
<!-- real_name realName,-->
<!-- cust_id,-->
<!-- area_id,-->
<!-- phone,-->
<!-- avatar-->
<!-- from mgr_user-->
<!-- where user_id = #{userId}-->
<!-- and del_flag = #{delFlag}-->
<!-- </select>-->
<!-- <select id="listUserByIdAndRole" resultType="net.xnzn.core.auth.user.vo.MgrUserIdNameVO">-->
<!-- SELECT mu.user_id userId,--> <!-- SELECT mu.user_id userId,-->
<!-- mu.username,-->
<!-- mu.real_name realName--> <!-- mu.real_name realName-->
<!-- FROM mgr_user mu--> <!-- FROM mgr_user mu-->
<!-- LEFT JOIN cust_info ci ON mu.cust_id = ci.cust_id--> <!-- LEFT JOIN sys_user ci ON mu.cust_id = ci.cust_id-->
<!-- where mu.del_flag = #{delFlag}--> <!-- where mu.del_flag = #{delFlag}-->
<!-- <if test="roleCode != null and roleCode != ''">-->
<!-- AND ci.job = #{roleCode}--> <!-- AND ci.job = #{roleCode}-->
<!-- AND mu.user_id = #{userId}--> <!-- </if>-->
<!-- </select>--> <!-- </select>-->
<!-- <select id="selectUserIdByCustId" resultType="java.lang.Long">-->
<!-- SELECT user_id-->
<!-- FROM mgr_user-->
<!-- WHERE cust_id = #{custId}-->
<!-- AND del_flag = 2-->
<!-- </select>-->
<!-- <select id="selectCustIdByUserId" resultType="java.lang.Long">--> <!--&lt;!&ndash; &lt;!&ndash; &ndash;&gt;&ndash;&gt;-->
<!-- SELECT t1.cust_id--> <!--&lt;!&ndash; <select id="selectUserInfoByUserId" resultType="net.xnzn.core.auth.user.vo.MgrUserDetailVO">&ndash;&gt;-->
<!-- FROM mgr_user t1--> <!--&lt;!&ndash; select user_id userId,&ndash;&gt;-->
<!-- LEFT JOIN cust_info t2 ON t1.cust_id = t2.cust_id--> <!--&lt;!&ndash; username,&ndash;&gt;-->
<!-- WHERE t1.user_id = #{userId}--> <!--&lt;!&ndash; real_name realName,&ndash;&gt;-->
<!-- AND (t2.cust_state = 1 OR t1.cust_id = -2)--> <!--&lt;!&ndash; cust_id,&ndash;&gt;-->
<!-- </select>--> <!--&lt;!&ndash; area_id,&ndash;&gt;-->
<!--&lt;!&ndash; phone,&ndash;&gt;-->
<!--&lt;!&ndash; avatar&ndash;&gt;-->
<!--&lt;!&ndash; from mgr_user&ndash;&gt;-->
<!--&lt;!&ndash; where user_id = #{userId}&ndash;&gt;-->
<!--&lt;!&ndash; and del_flag = #{delFlag}&ndash;&gt;-->
<!--&lt;!&ndash; </select>&ndash;&gt;-->
<!-- <select id="getUserExcludeSupplier" resultType="net.xnzn.core.auth.role.vo.MgrRoleUserVO">-->
<!-- SELECT mu.user_id userId,-->
<!-- mu.username,-->
<!-- mu.real_name realName-->
<!-- FROM mgr_user mu-->
<!-- LEFT JOIN drp_supplier ds ON ds.supplier_user_id = mu.user_id-->
<!-- WHERE mu.del_flag = #{delFlag}-->
<!-- AND ds.supplier_user_id IS NULL;-->
<!-- </select>-->
<!-- <select id="selectUserNameIdByCustId" resultType="java.lang.String">--> <!--&lt;!&ndash; <select id="listUserByIdAndRole" resultType="net.xnzn.core.auth.user.vo.MgrUserIdNameVO">&ndash;&gt;-->
<!-- SELECT username--> <!--&lt;!&ndash; SELECT mu.user_id userId,&ndash;&gt;-->
<!-- FROM mgr_user--> <!--&lt;!&ndash; mu.real_name realName&ndash;&gt;-->
<!-- WHERE cust_id = #{custId}--> <!--&lt;!&ndash; FROM mgr_user mu&ndash;&gt;-->
<!-- AND del_flag = 2--> <!--&lt;!&ndash; LEFT JOIN cust_info ci ON mu.cust_id = ci.cust_id&ndash;&gt;-->
<!-- </select>--> <!--&lt;!&ndash; where mu.del_flag = #{delFlag}&ndash;&gt;-->
<!--&lt;!&ndash; AND ci.job = #{roleCode}&ndash;&gt;-->
<!--&lt;!&ndash; AND mu.user_id = #{userId}&ndash;&gt;-->
<!--&lt;!&ndash; </select>&ndash;&gt;-->
<!-- <select id="getUserByRoleCode" resultType="net.xnzn.core.auth.user.entity.MgrUser">--> <!--&lt;!&ndash; <select id="selectUserIdByCustId" resultType="java.lang.Long">&ndash;&gt;-->
<!-- SELECT t1.user_id,--> <!--&lt;!&ndash; SELECT user_id&ndash;&gt;-->
<!-- t1.username--> <!--&lt;!&ndash; FROM mgr_user&ndash;&gt;-->
<!-- FROM mgr_user t1--> <!--&lt;!&ndash; WHERE cust_id = #{custId}&ndash;&gt;-->
<!-- INNER JOIN mgr_user_role t2 ON t1.user_id = t2.user_id--> <!--&lt;!&ndash; AND del_flag = 2&ndash;&gt;-->
<!-- INNER JOIN mgr_role t3 ON t2.role_id = t3.role_id--> <!--&lt;!&ndash; </select>&ndash;&gt;-->
<!-- WHERE t1.del_flag = 2-->
<!-- AND t3.del_flag = 2-->
<!-- AND t3.role_code = #{roleCode}-->
<!-- </select>-->
<!-- <select id="queryByRoles" resultType="net.xnzn.core.auth.user.entity.MgrUser">--> <!--&lt;!&ndash; <select id="selectCustIdByUserId" resultType="java.lang.Long">&ndash;&gt;-->
<!-- SELECT t1.user_id,--> <!--&lt;!&ndash; SELECT t1.cust_id&ndash;&gt;-->
<!-- t1.username--> <!--&lt;!&ndash; FROM mgr_user t1&ndash;&gt;-->
<!-- FROM mgr_user t1--> <!--&lt;!&ndash; LEFT JOIN cust_info t2 ON t1.cust_id = t2.cust_id&ndash;&gt;-->
<!-- INNER JOIN mgr_user_role t2 ON t1.user_id = t2.user_id--> <!--&lt;!&ndash; WHERE t1.user_id = #{userId}&ndash;&gt;-->
<!-- WHERE t1.del_flag = 2--> <!--&lt;!&ndash; AND (t2.cust_state = 1 OR t1.cust_id = -2)&ndash;&gt;-->
<!-- and t2.role_id in--> <!--&lt;!&ndash; </select>&ndash;&gt;-->
<!-- <foreach collection="roles" item="role" open="(" close=")" separator=",">-->
<!-- #{role}-->
<!-- </foreach>-->
<!-- </select>-->
<!-- <select id="queryMgrUserIdListByCustIdList" resultType="net.xnzn.core.auth.role.vo.MgrRoleUserVO">--> <!--&lt;!&ndash; <select id="getUserExcludeSupplier" resultType="net.xnzn.core.auth.role.vo.MgrRoleUserVO">&ndash;&gt;-->
<!-- SELECT user_id, username, real_name--> <!--&lt;!&ndash; SELECT mu.user_id userId,&ndash;&gt;-->
<!-- FROM mgr_user--> <!--&lt;!&ndash; mu.username,&ndash;&gt;-->
<!-- WHERE cust_id IN--> <!--&lt;!&ndash; mu.real_name realName&ndash;&gt;-->
<!-- <foreach collection="custIdList" item="custId" open="(" close=")" separator=",">--> <!--&lt;!&ndash; FROM mgr_user mu&ndash;&gt;-->
<!-- #{custId}--> <!--&lt;!&ndash; LEFT JOIN drp_supplier ds ON ds.supplier_user_id = mu.user_id&ndash;&gt;-->
<!-- </foreach>--> <!--&lt;!&ndash; WHERE mu.del_flag = #{delFlag}&ndash;&gt;-->
<!-- </select>--> <!--&lt;!&ndash; AND ds.supplier_user_id IS NULL;&ndash;&gt;-->
<!--&lt;!&ndash; </select>&ndash;&gt;-->
<!-- <select id="queryCanteenManagerMgrUserList" resultType="net.xnzn.core.auth.role.vo.MgrRoleUserVO">--> <!--&lt;!&ndash; <select id="selectUserNameIdByCustId" resultType="java.lang.String">&ndash;&gt;-->
<!-- SELECT t1.user_id, t1.username, t1.real_name--> <!--&lt;!&ndash; SELECT username&ndash;&gt;-->
<!-- FROM mgr_user t1--> <!--&lt;!&ndash; FROM mgr_user&ndash;&gt;-->
<!-- WHERE exists(SELECT NULL--> <!--&lt;!&ndash; WHERE cust_id = #{custId}&ndash;&gt;-->
<!-- FROM alloc_canteen t2 WHERE t1.cust_id = t2.cust_id--> <!--&lt;!&ndash; AND del_flag = 2&ndash;&gt;-->
<!-- AND t2.canteen_id IN--> <!--&lt;!&ndash; </select>&ndash;&gt;-->
<!-- <foreach collection="caneenIdList" item="canteenId" open="(" close=")" separator=",">-->
<!-- #{canteenId}-->
<!-- </foreach>-->
<!-- )-->
<!-- </select>-->
<!-- <select id="getUserByRoleCodeExcludeUserName" resultType="net.xnzn.core.auth.user.entity.MgrUser">--> <!--&lt;!&ndash; <select id="getUserByRoleCode" resultType="net.xnzn.core.auth.user.entity.MgrUser">&ndash;&gt;-->
<!-- SELECT t1.user_id,--> <!--&lt;!&ndash; SELECT t1.user_id,&ndash;&gt;-->
<!-- t1.username--> <!--&lt;!&ndash; t1.username&ndash;&gt;-->
<!-- FROM mgr_user t1--> <!--&lt;!&ndash; FROM mgr_user t1&ndash;&gt;-->
<!-- INNER JOIN mgr_user_role t2 ON t1.user_id = t2.user_id--> <!--&lt;!&ndash; INNER JOIN mgr_user_role t2 ON t1.user_id = t2.user_id&ndash;&gt;-->
<!-- INNER JOIN mgr_role t3 ON t2.role_id = t3.role_id--> <!--&lt;!&ndash; INNER JOIN mgr_role t3 ON t2.role_id = t3.role_id&ndash;&gt;-->
<!-- WHERE t1.del_flag = 2--> <!--&lt;!&ndash; WHERE t1.del_flag = 2&ndash;&gt;-->
<!-- AND t3.del_flag = 2--> <!--&lt;!&ndash; AND t3.del_flag = 2&ndash;&gt;-->
<!-- AND t3.role_code = #{roleCode}--> <!--&lt;!&ndash; AND t3.role_code = #{roleCode}&ndash;&gt;-->
<!-- AND t1.username != #{excludeUserName}--> <!--&lt;!&ndash; </select>&ndash;&gt;-->
<!-- </select>-->
</mapper> <!--&lt;!&ndash; <select id="queryByRoles" resultType="net.xnzn.core.auth.user.entity.MgrUser">&ndash;&gt;-->
<!--&lt;!&ndash; SELECT t1.user_id,&ndash;&gt;-->
<!--&lt;!&ndash; t1.username&ndash;&gt;-->
<!--&lt;!&ndash; FROM mgr_user t1&ndash;&gt;-->
<!--&lt;!&ndash; INNER JOIN mgr_user_role t2 ON t1.user_id = t2.user_id&ndash;&gt;-->
<!--&lt;!&ndash; WHERE t1.del_flag = 2&ndash;&gt;-->
<!--&lt;!&ndash; and t2.role_id in&ndash;&gt;-->
<!--&lt;!&ndash; <foreach collection="roles" item="role" open="(" close=")" separator=",">&ndash;&gt;-->
<!--&lt;!&ndash; #{role}&ndash;&gt;-->
<!--&lt;!&ndash; </foreach>&ndash;&gt;-->
<!--&lt;!&ndash; </select>&ndash;&gt;-->
<!--&lt;!&ndash; <select id="queryMgrUserIdListByCustIdList" resultType="net.xnzn.core.auth.role.vo.MgrRoleUserVO">&ndash;&gt;-->
<!--&lt;!&ndash; SELECT user_id, username, real_name&ndash;&gt;-->
<!--&lt;!&ndash; FROM mgr_user&ndash;&gt;-->
<!--&lt;!&ndash; WHERE cust_id IN&ndash;&gt;-->
<!--&lt;!&ndash; <foreach collection="custIdList" item="custId" open="(" close=")" separator=",">&ndash;&gt;-->
<!--&lt;!&ndash; #{custId}&ndash;&gt;-->
<!--&lt;!&ndash; </foreach>&ndash;&gt;-->
<!--&lt;!&ndash; </select>&ndash;&gt;-->
<!--&lt;!&ndash; <select id="queryCanteenManagerMgrUserList" resultType="net.xnzn.core.auth.role.vo.MgrRoleUserVO">&ndash;&gt;-->
<!--&lt;!&ndash; SELECT t1.user_id, t1.username, t1.real_name&ndash;&gt;-->
<!--&lt;!&ndash; FROM mgr_user t1&ndash;&gt;-->
<!--&lt;!&ndash; WHERE exists(SELECT NULL&ndash;&gt;-->
<!--&lt;!&ndash; FROM alloc_canteen t2 WHERE t1.cust_id = t2.cust_id&ndash;&gt;-->
<!--&lt;!&ndash; AND t2.canteen_id IN&ndash;&gt;-->
<!--&lt;!&ndash; <foreach collection="caneenIdList" item="canteenId" open="(" close=")" separator=",">&ndash;&gt;-->
<!--&lt;!&ndash; #{canteenId}&ndash;&gt;-->
<!--&lt;!&ndash; </foreach>&ndash;&gt;-->
<!--&lt;!&ndash; )&ndash;&gt;-->
<!--&lt;!&ndash; </select>&ndash;&gt;-->
<!--&lt;!&ndash; <select id="getUserByRoleCodeExcludeUserName" resultType="net.xnzn.core.auth.user.entity.MgrUser">&ndash;&gt;-->
<!--&lt;!&ndash; SELECT t1.user_id,&ndash;&gt;-->
<!--&lt;!&ndash; t1.username&ndash;&gt;-->
<!--&lt;!&ndash; FROM mgr_user t1&ndash;&gt;-->
<!--&lt;!&ndash; INNER JOIN mgr_user_role t2 ON t1.user_id = t2.user_id&ndash;&gt;-->
<!--&lt;!&ndash; INNER JOIN mgr_role t3 ON t2.role_id = t3.role_id&ndash;&gt;-->
<!--&lt;!&ndash; WHERE t1.del_flag = 2&ndash;&gt;-->
<!--&lt;!&ndash; AND t3.del_flag = 2&ndash;&gt;-->
<!--&lt;!&ndash; AND t3.role_code = #{roleCode}&ndash;&gt;-->
<!--&lt;!&ndash; AND t1.username != #{excludeUserName}&ndash;&gt;-->
<!--&lt;!&ndash; </select>&ndash;&gt;-->
<!--</mapper>-->