商户版本

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

@@ -40,8 +40,8 @@ public class ShopInfoController {
@SaAdminCheckRole("管理员")
@SaAdminCheckPermission(parentName = "店铺管理接口", value = "shopInfo:list", name = "店铺列表")
@GetMapping
public CzgResult<Page<ShopInfo>> get(PageDTO pageDTO, String shopName, Integer status, Integer isHeadShop) {
return CzgResult.success(shopInfoService.get(pageDTO, shopName, status, isHeadShop));
public CzgResult<Page<ShopInfo>> get(PageDTO pageDTO, String profiles, String phone, String shopName, Integer status, Integer isHeadShop) {
return CzgResult.success(shopInfoService.get(pageDTO, profiles, phone, shopName, status, isHeadShop));
}
/**

View File

@@ -128,7 +128,7 @@ public class ShopInfo implements Serializable {
private String businessTime;
/**
* trial试用版release正式
* probation试用版release正式
*/
private String profiles;

View File

@@ -30,7 +30,7 @@ public interface ShopInfoService extends IService<ShopInfo> {
*/
boolean checkSwitch(Long shopId, ShopSwitchTypeEnum switchType) throws ValidateException;
Page<ShopInfo> get(PageDTO pageDTO, String shopName, Integer status, Integer isHeadShop);
Page<ShopInfo> get(PageDTO pageDTO, String profiles, String phone, String shopName, Integer status, Integer isHeadShop);
Page<ShopInfo> getShopByMainId(PageDTO pageDTO, String shopName, Integer status);

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);