diff --git a/skyeye-erp/erp-common/src/main/java/com/skyeye/rest/shop/rest/IShopStoreRest.java b/skyeye-erp/erp-common/src/main/java/com/skyeye/rest/shop/rest/IShopStoreRest.java index 8a8dd59e..6cbc4b9d 100644 --- a/skyeye-erp/erp-common/src/main/java/com/skyeye/rest/shop/rest/IShopStoreRest.java +++ b/skyeye-erp/erp-common/src/main/java/com/skyeye/rest/shop/rest/IShopStoreRest.java @@ -5,6 +5,7 @@ package com.skyeye.rest.shop.rest; import com.skyeye.common.client.ClientConfiguration; +import com.skyeye.common.entity.search.CommonPageInfo; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -39,4 +40,10 @@ public interface IShopStoreRest { String queryStoreListByParams(@RequestParam("shopAreaId") String shopAreaId, @RequestParam("enabled") Integer enabled); + /** + * 分页获取门店列表信息 + */ + @PostMapping("/queryStoreListFoServer") + String queryStoreListFoServer(CommonPageInfo commonPageInfo); + } diff --git a/skyeye-erp/erp-common/src/main/java/com/skyeye/rest/shop/service/IShopStoreService.java b/skyeye-erp/erp-common/src/main/java/com/skyeye/rest/shop/service/IShopStoreService.java index 339701ea..70b93711 100644 --- a/skyeye-erp/erp-common/src/main/java/com/skyeye/rest/shop/service/IShopStoreService.java +++ b/skyeye-erp/erp-common/src/main/java/com/skyeye/rest/shop/service/IShopStoreService.java @@ -5,6 +5,7 @@ package com.skyeye.rest.shop.service; import com.skyeye.base.rest.service.IService; +import com.skyeye.common.entity.search.CommonPageInfo; import java.util.List; import java.util.Map; @@ -21,4 +22,6 @@ public interface IShopStoreService extends IService { List> queryStoreListByParams(String shopAreaId, Integer enabled); + List> queryStoreListFoServer(CommonPageInfo commonPageInfo); + } diff --git a/skyeye-erp/erp-common/src/main/java/com/skyeye/rest/shop/service/impl/IShopStoreServiceImpl.java b/skyeye-erp/erp-common/src/main/java/com/skyeye/rest/shop/service/impl/IShopStoreServiceImpl.java index 7b7b9bd7..f99668dd 100644 --- a/skyeye-erp/erp-common/src/main/java/com/skyeye/rest/shop/service/impl/IShopStoreServiceImpl.java +++ b/skyeye-erp/erp-common/src/main/java/com/skyeye/rest/shop/service/impl/IShopStoreServiceImpl.java @@ -7,6 +7,7 @@ package com.skyeye.rest.shop.service.impl; import com.skyeye.base.rest.service.impl.IServiceImpl; import com.skyeye.common.client.ExecuteFeignClient; import com.skyeye.common.constans.CacheConstants; +import com.skyeye.common.entity.search.CommonPageInfo; import com.skyeye.rest.shop.rest.IShopStoreRest; import com.skyeye.rest.shop.service.IShopStoreService; import org.springframework.beans.factory.annotation.Autowired; @@ -50,4 +51,9 @@ public class IShopStoreServiceImpl extends IServiceImpl implements IShopStoreSer public List> queryStoreListByParams(String shopAreaId, Integer enabled) { return ExecuteFeignClient.get(() -> iShopStoreRest.queryStoreListByParams(shopAreaId, enabled)).getRows(); } + + @Override + public List> queryStoreListFoServer(CommonPageInfo commonPageInfo) { + return ExecuteFeignClient.get(() -> iShopStoreRest.queryStoreListFoServer(commonPageInfo)).getRows(); + } } diff --git a/skyeye-erp/erp-pro/src/main/java/com/skyeye/shopmaterial/service/impl/ShopMaterialServiceImpl.java b/skyeye-erp/erp-pro/src/main/java/com/skyeye/shopmaterial/service/impl/ShopMaterialServiceImpl.java index ae01df87..2ae4faab 100644 --- a/skyeye-erp/erp-pro/src/main/java/com/skyeye/shopmaterial/service/impl/ShopMaterialServiceImpl.java +++ b/skyeye-erp/erp-pro/src/main/java/com/skyeye/shopmaterial/service/impl/ShopMaterialServiceImpl.java @@ -23,6 +23,7 @@ import com.skyeye.common.util.mybatisplus.MybatisPlusUtil; import com.skyeye.material.classenum.MaterialShelvesState; import com.skyeye.material.entity.Material; import com.skyeye.material.service.MaterialService; +import com.skyeye.rest.shop.service.IShopStoreService; import com.skyeye.shopmaterial.dao.ShopMaterialDao; import com.skyeye.shopmaterial.entity.ShopMaterial; import com.skyeye.shopmaterial.entity.ShopMaterialNorms; @@ -63,6 +64,9 @@ public class ShopMaterialServiceImpl extends SkyeyeBusinessServiceImpl> storeList = iShopStoreService.queryStoreListFoServer(commonPageInfo); + if (CollectionUtil.isEmpty(storeList)) { + return; + } + List storeIdList = storeList.stream().map(bean -> bean.get("id").toString()).collect(Collectors.toList()); } diff --git a/skyeye-promote/skyeye-common/src/main/java/com/skyeye/framework/file/core/client/ftp/FtpFileClientConfig.java b/skyeye-promote/skyeye-common/src/main/java/com/skyeye/framework/file/core/client/ftp/FtpFileClientConfig.java index b271b5a1..698cf8e2 100644 --- a/skyeye-promote/skyeye-common/src/main/java/com/skyeye/framework/file/core/client/ftp/FtpFileClientConfig.java +++ b/skyeye-promote/skyeye-common/src/main/java/com/skyeye/framework/file/core/client/ftp/FtpFileClientConfig.java @@ -10,6 +10,7 @@ import lombok.Data; import javax.validation.Validator; import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; /** * @ClassName: FtpFileClientConfig @@ -32,7 +33,7 @@ public class FtpFileClientConfig implements FileClientConfig { @NotBlank(message = "主机地址", groups = {Config.class}) private String host; - @NotBlank(message = "主机端口", groups = {Config.class}) + @NotNull(message = "主机端口", groups = {Config.class}) private Integer port; @NotBlank(message = "用户名", groups = {Config.class}) diff --git a/skyeye-promote/skyeye-common/src/main/java/com/skyeye/framework/file/core/client/sftp/SftpFileClientConfig.java b/skyeye-promote/skyeye-common/src/main/java/com/skyeye/framework/file/core/client/sftp/SftpFileClientConfig.java index 29807195..ceb97e53 100644 --- a/skyeye-promote/skyeye-common/src/main/java/com/skyeye/framework/file/core/client/sftp/SftpFileClientConfig.java +++ b/skyeye-promote/skyeye-common/src/main/java/com/skyeye/framework/file/core/client/sftp/SftpFileClientConfig.java @@ -10,6 +10,7 @@ import lombok.Data; import javax.validation.Validator; import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; /** * @ClassName: SftpFileClientConfig @@ -32,7 +33,7 @@ public class SftpFileClientConfig implements FileClientConfig { @NotBlank(message = "主机地址", groups = {Config.class}) private String host; - @NotBlank(message = "主机端口", groups = {Config.class}) + @NotNull(message = "主机端口", groups = {Config.class}) private Integer port; @NotBlank(message = "用户名", groups = {Config.class}) diff --git a/skyeye-shop/shop-member/src/main/java/com/skyeye/store/controller/ShopStoreController.java b/skyeye-shop/shop-member/src/main/java/com/skyeye/store/controller/ShopStoreController.java index d4f68d89..b3ba4c6a 100644 --- a/skyeye-shop/shop-member/src/main/java/com/skyeye/store/controller/ShopStoreController.java +++ b/skyeye-shop/shop-member/src/main/java/com/skyeye/store/controller/ShopStoreController.java @@ -39,6 +39,13 @@ public class ShopStoreController { shopStoreService.queryPageList(inputObject, outputObject); } + @ApiOperation(id = "queryStoreListFoServer", value = "其他微服务调用,获取门店信息", method = "POST", allUse = "0") + @ApiImplicitParams(classBean = CommonPageInfo.class) + @RequestMapping("/post/ShopStoreController/queryStoreListFoServer") + public void queryStoreListFoServer(InputObject inputObject, OutputObject outputObject) { + shopStoreService.queryPageList(inputObject, outputObject); + } + @ApiOperation(id = "writeStore", value = "添加/编辑门店", method = "POST", allUse = "1") @ApiImplicitParams(classBean = ShopStore.class) @RequestMapping("/post/ShopStoreController/writeStore")