店铺区域接口

This commit is contained in:
张松
2025-02-19 10:31:11 +08:00
parent d8791107a6
commit 3520a4cc07
7 changed files with 78 additions and 36 deletions

View File

@@ -1,18 +0,0 @@
package com.czg.service.account.service.impl;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import com.czg.account.entity.ShopTableArea;
import com.czg.account.service.ShopAreaService;
import com.czg.service.account.mapper.ShopAreaMapper;
import org.springframework.stereotype.Service;
/**
* 店铺区域 服务层实现。
*
* @author zs
* @since 2025-02-18
*/
@Service
public class ShopAreaServiceImpl extends ServiceImpl<ShopAreaMapper, ShopTableArea> implements ShopAreaService{
}

View File

@@ -0,0 +1,31 @@
package com.czg.service.account.service.impl;
import cn.hutool.core.util.StrUtil;
import com.czg.utils.PageUtil;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import com.czg.account.entity.ShopTableArea;
import com.czg.account.service.ShopTableAreaService;
import com.czg.service.account.mapper.ShopAreaMapper;
import org.springframework.stereotype.Service;
/**
* 店铺区域 服务层实现。
*
* @author zs
* @since 2025-02-18
*/
@Service
public class ShopTableAreaServiceImpl extends ServiceImpl<ShopAreaMapper, ShopTableArea> implements ShopTableAreaService {
@Override
public Page<ShopTableArea> pageInfo(Long shopId, String name) {
QueryWrapper queryWrapper = new QueryWrapper().eq(ShopTableArea::getShopId, shopId);
if (StrUtil.isNotBlank(name)) {
queryWrapper.like(ShopTableArea::getName, name);
}
return page(PageUtil.buildPage(), queryWrapper);
}
}

View File

@@ -9,7 +9,7 @@ import com.czg.account.dto.table.ShopTableAddDTO;
import com.czg.account.dto.table.ShopTableBindDTO;
import com.czg.account.entity.ShopTableArea;
import com.czg.account.entity.ShopTableCode;
import com.czg.account.service.ShopAreaService;
import com.czg.account.service.ShopTableAreaService;
import com.czg.account.service.ShopTableCodeService;
import com.czg.enums.ShopTableStatusEnum;
import com.czg.exception.ApiNotPrintException;
@@ -42,7 +42,7 @@ import java.util.zip.ZipOutputStream;
@Service
public class ShopTableServiceImpl extends ServiceImpl<ShopTableMapper, ShopTable> implements ShopTableService{
@Resource
private ShopAreaService shopAreaService;
private ShopTableAreaService shopAreaService;
@Resource
private ShopTableCodeService shopTableCodeService;