商户版本
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -128,7 +128,7 @@ public class ShopInfo implements Serializable {
|
||||
private String businessTime;
|
||||
|
||||
/**
|
||||
* trial试用版,release正式
|
||||
* probation试用版,release正式
|
||||
*/
|
||||
private String profiles;
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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