商户版本
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user