package com.dgtly.system.service.impl;

import java.util.List;
import com.dgtly.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dgtly.system.mapper.SysUserShopExtMapper;
import com.dgtly.system.domain.SysUserShopExt;
import com.dgtly.system.service.ISysUserShopExtService;
import com.dgtly.common.core.text.Convert;

/**
 * 门店人员信息扩展Service业务层处理
 * 
 * @author njs
 * @date 2025-08-19
 */
@Service
public class SysUserShopExtServiceImpl implements ISysUserShopExtService 
{
    @Autowired
    private SysUserShopExtMapper sysUserShopExtMapper;

    /**
     * 查询门店人员信息扩展
     * 
     * @param userId 门店人员信息扩展ID
     * @return 门店人员信息扩展
     */
    @Override
    public List<SysUserShopExt>  selectSysUserShopExtById(String userId)
    {
        return sysUserShopExtMapper.selectSysUserShopExtById(userId);
    }

    /**
     * 查询门店人员信息扩展列表
     * 
     * @param sysUserShopExt 门店人员信息扩展
     * @return 门店人员信息扩展
     */
    @Override
    public List<SysUserShopExt> selectSysUserShopExtList(SysUserShopExt sysUserShopExt)
    {
        return sysUserShopExtMapper.selectSysUserShopExtList(sysUserShopExt);
    }

    /**
     * 新增门店人员信息扩展
     * 
     * @param sysUserShopExt 门店人员信息扩展
     * @return 结果
     */
    @Override
    public int insertSysUserShopExt(SysUserShopExt sysUserShopExt)
    {
        sysUserShopExt.setCreateTime(DateUtils.getNowDate());
        return sysUserShopExtMapper.insertSysUserShopExt(sysUserShopExt);
    }

    /**
     * 修改门店人员信息扩展
     * 
     * @param sysUserShopExt 门店人员信息扩展
     * @return 结果
     */
    @Override
    public int updateSysUserShopExt(SysUserShopExt sysUserShopExt)
    {
        sysUserShopExt.setUpdateTime(DateUtils.getNowDate());
        return sysUserShopExtMapper.updateSysUserShopExt(sysUserShopExt);
    }

    /**
     * 删除门店人员信息扩展对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSysUserShopExtByIds(String ids)
    {
        return sysUserShopExtMapper.deleteSysUserShopExtByIds(Convert.toStrArray(ids));
    }

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