package com.dgtly.system.mapper;

import com.dgtly.system.domain.SysUserShopExt;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 门店人员信息扩展Mapper接口
 *
 * @author njs
 * @date 2025-08-19
 */
public interface SysUserShopExtMapper
{
    /**
     * 查询门店人员信息扩展
     *
     * @param userId 门店人员信息扩展ID
     * @return 门店人员信息扩展
     */
    public List<SysUserShopExt> selectSysUserShopExtById(String userId);

    /**
     * 查询门店人员信息扩展列表
     *
     * @param sysUserShopExt 门店人员信息扩展
     * @return 门店人员信息扩展集合
     */
    public List<SysUserShopExt> selectSysUserShopExtList(SysUserShopExt sysUserShopExt);

    /**
     * 新增门店人员信息扩展
     *
     * @param sysUserShopExt 门店人员信息扩展
     * @return 结果
     */
    public int insertSysUserShopExt(SysUserShopExt sysUserShopExt);

    /**
     * 修改门店人员信息扩展
     *
     * @param sysUserShopExt 门店人员信息扩展
     * @return 结果
     */
    public int updateSysUserShopExt(SysUserShopExt sysUserShopExt);

    /**
     * 删除门店人员信息扩展
     *
     * @param userId 门店人员信息扩展ID
     * @return 结果
     */
    public int deleteSysUserShopExtById(String userId);

    /**
     * 批量删除门店人员信息扩展
     *
     * @param userIds 需要删除的数据ID
     * @return 结果
     */
    public int deleteSysUserShopExtByIds(String[] userIds);

    /**
     * @description: 查询上次同步的时间
     * @param: []
     * @return: java.lang.String
     * @author: njs
     * @date: 2025/8/19 15:41
     */
    String searchRunTime(@Param("isShopType") String isShopType);

    void deleteUserShopExt(@Param("userId") String userId,@Param("loginName") String loginName, @Param("shopCode") String shopCode,@Param("isShopType") String isShopType);

    void deletePhysicsUserShopExt(@Param("userId") String userId,@Param("loginName") String loginName, @Param("shopCode") String shopCode,@Param("isShopType") String isShopType);

    int delByDataUserId(@Param("dataUserId") String dataUserId, @Param("shopCode") String shopCode);

    String  selectLoginNameByUserId(@Param("dataUserId") String dataUserId, @Param("shopCode") String shopCode,@Param("shopType") String shopType);
}
