mirror of
https://github.com/weizhiqiang1995/erp-pro.git
synced 2024-12-27 18:34:28 +08:00
feat: 文件配置参数校验修改
This commit is contained in:
parent
580d84ed05
commit
f7141acf31
7 changed files with 37 additions and 2 deletions
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
|
@ -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<Map<String, Object>> queryStoreListByParams(String shopAreaId, Integer enabled);
|
||||
|
||||
List<Map<String, Object>> queryStoreListFoServer(CommonPageInfo commonPageInfo);
|
||||
|
||||
}
|
||||
|
|
|
@ -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<Map<String, Object>> queryStoreListByParams(String shopAreaId, Integer enabled) {
|
||||
return ExecuteFeignClient.get(() -> iShopStoreRest.queryStoreListByParams(shopAreaId, enabled)).getRows();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> queryStoreListFoServer(CommonPageInfo commonPageInfo) {
|
||||
return ExecuteFeignClient.get(() -> iShopStoreRest.queryStoreListFoServer(commonPageInfo)).getRows();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<ShopMater
|
|||
@Autowired
|
||||
private BrandService brandService;
|
||||
|
||||
@Autowired
|
||||
private IShopStoreService iShopStoreService;
|
||||
|
||||
@Override
|
||||
public void createPrepose(ShopMaterial entity) {
|
||||
entity.setRealSales(CommonNumConstants.NUM_ZERO.toString());
|
||||
|
@ -174,6 +178,12 @@ public class ShopMaterialServiceImpl extends SkyeyeBusinessServiceImpl<ShopMater
|
|||
@Override
|
||||
public void queryShopMaterialListForStore(InputObject inputObject, OutputObject outputObject) {
|
||||
CommonPageInfo commonPageInfo = inputObject.getParams(CommonPageInfo.class);
|
||||
// 分页查询门店信息
|
||||
List<Map<String, Object>> storeList = iShopStoreService.queryStoreListFoServer(commonPageInfo);
|
||||
if (CollectionUtil.isEmpty(storeList)) {
|
||||
return;
|
||||
}
|
||||
List<String> storeIdList = storeList.stream().map(bean -> bean.get("id").toString()).collect(Collectors.toList());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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})
|
||||
|
|
|
@ -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})
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue