package com.hrt.system.service.impl;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.hrt.system.domain.poji.shop.ShopRelTag;
|
import com.hrt.system.domain.poji.shop.ShopRelUser;
|
import com.hrt.system.mapper.shop.ShopRelUserMapper;
|
import com.hrt.system.service.shop.ShopRelUserService;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import org.springframework.stereotype.Service;
|
|
import javax.annotation.Resource;
|
import java.util.List;
|
|
/**
|
* <p>
|
* 商户关联员工 服务实现类
|
* </p>
|
*
|
* @author jqs
|
* @since 2023-04-17
|
*/
|
@Service
|
public class ShopRelUserServiceImpl extends ServiceImpl<ShopRelUserMapper, ShopRelUser> implements ShopRelUserService {
|
|
@Resource
|
private ShopRelUserMapper shopRelUserMapper;
|
|
/**
|
* 通过商户id删除关联
|
* @param shopId
|
*/
|
@Override
|
public void deleteByShopId(Long shopId){
|
shopRelUserMapper.deleteByShopId(shopId);
|
}
|
|
/**
|
* 通过商户id获取关联用户
|
* @param shopId
|
* @return
|
*/
|
@Override
|
public List<ShopRelUser> listByShopId(Long shopId){
|
LambdaQueryWrapper<ShopRelUser> queryWrapper = Wrappers.lambdaQuery();
|
queryWrapper.eq(ShopRelUser::getDelFlag, 0).eq(ShopRelUser::getShopId, shopId);
|
return this.list(queryWrapper);
|
}
|
}
|