商户版本

This commit is contained in:
2026-02-03 10:17:12 +08:00
parent 65f6978612
commit 9da67fc67f
4 changed files with 13 additions and 6 deletions

View File

@@ -113,8 +113,14 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
}
@Override
public Page<ShopInfo> get(PageDTO pageDTO, String shopName, Integer status, Integer isHeadShop) {
public Page<ShopInfo> get(PageDTO pageDTO, String profiles, String phone, String shopName, Integer status, Integer isHeadShop) {
QueryWrapper queryWrapper = new QueryWrapper();
if (StrUtil.isNotBlank(profiles)) {
queryWrapper.eq(ShopInfo::getProfiles, profiles);
}
if (StrUtil.isNotBlank(phone)) {
queryWrapper.like(ShopInfo::getPhone, phone);
}
if (StrUtil.isNotBlank(shopName)) {
queryWrapper.like(ShopInfo::getShopName, shopName);
}
@@ -125,7 +131,8 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
queryWrapper.eq(ShopInfo::getIsHeadShop, isHeadShop);
}
List<ShopInfo> shopAllList = getMapper().selectListByQuery(query().select(ShopInfo::getId, ShopInfo::getShopName));
List<ShopInfo> shopAllList = getMapper().selectListByQuery(query().select(ShopInfo::getId, ShopInfo::getShopName)
.eq(ShopInfo::getIsHeadShop, 1).ne(ShopInfo::getShopType, ShopTypeEnum.ONLY.getValue()));
Map<Long, String> shopKv = shopAllList.stream().collect(Collectors.toMap(ShopInfo::getId, ShopInfo::getShopName));
queryWrapper.orderBy(ShopInfo::getCreateTime, false);
Page<ShopInfo> page = page(new Page<>(pageDTO.page(), pageDTO.size()), queryWrapper);