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.ShopFile;
|
import com.hrt.system.mapper.shop.ShopFileMapper;
|
import com.hrt.system.service.shop.ShopFileService;
|
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 ShopFileServiceImpl extends ServiceImpl<ShopFileMapper, ShopFile> implements ShopFileService {
|
|
@Resource
|
private ShopFileMapper shopFileMapper;
|
|
/**
|
* 通过商户id获取商户文件
|
* @param shopId
|
* @return
|
*/
|
@Override
|
public List<ShopFile> listShopFileByShopId(Long shopId){
|
LambdaQueryWrapper<ShopFile> queryWrapper = Wrappers.lambdaQuery();
|
queryWrapper.eq(ShopFile::getDelFlag, 0).eq(ShopFile::getShopId, shopId);
|
return this.list(queryWrapper);
|
}
|
|
/**
|
* 通过商户id删除关联
|
* @param shopId
|
*/
|
@Override
|
public void deleteByShopId(Long shopId){
|
shopFileMapper.deleteByShopId(shopId);
|
}
|
}
|