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 feign.Param;
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};"})
//   int checkCountBasicsDdiningUserId(Long userId);
//
//   @Select({"select count(0) from alloc_stall where cust_id = #{userId};"})
//   int checkBasicsShopstallsUserId(Long userId);
//
//   @Select({"select count(0) from drp_warehouse where user_id = #{userId};"})
//   int checkDrpWarehouse(Long userId);
//
//   @Select({"select user_id, real_name from mgr_user ${ew.customSqlSegment}"})
//   MgrUserIdNameVO selectIdAndRealNameByWrapper(@Param("ew") Wrapper<MgrUser> wrapper);
//
//   @Select({"select dining_id as canteen_id, shopstall_id from basics_shopstalls ${ew.customSqlSegment}"})
//   List<EffCanteenVO> selectShopstallByWrapper(@Param("ew") Wrapper<?> wrapper);
//
//   @Select({"select canteen_id, shopstall_id from mkt_effective_detail ${ew.customSqlSegment}"})
//   List<EffCanteenVO> selectCanteenByWrapper(@Param("ew") Wrapper<?> wrapper);
//
//   @Select({"select 1 from mkt_effective ${ew.customSqlSegment}"})
//   Integer selectExistFromMktEffectiveByWrapper(@Param("ew") Wrapper<?> wrapper);
//
//   List<MgrUserIdNameVO> listUserByIdAndRole(@Param("userId") Long userId, @Param("roleCode") String roleCode, @Param("delFlag") Integer delFlag);
//
//   Long selectUserIdByCustId(@Param("custId") Long custId);
//
//   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);
}
