Commit aea9d053 by zhiwj

门店ETL修改

parent 3c8c5cfa
......@@ -36,6 +36,10 @@ public class ProcessBatchStoreDTO implements Serializable {
private String conactsPhone;
/**
* 店招品牌id
*/
private Integer brandId;
/**
* 店招品牌
*/
private String brandName;
......@@ -209,4 +213,12 @@ public class ProcessBatchStoreDTO implements Serializable {
public void setStoreGroupName(String storeGroupName) {
this.storeGroupName = storeGroupName;
}
public Integer getBrandId() {
return brandId;
}
public void setBrandId(Integer brandId) {
this.brandId = brandId;
}
}
......@@ -647,13 +647,22 @@ public class StoreApiServiceImpl implements StoreApiService {
return responseErrorElement(ImportStoreBatchResultEnum.A4);
}
storeDTO.setStoreCode(processBatchStoreDTO.getStoreCode());
if (StringUtils.isNotBlank(processBatchStoreDTO.getBrandName())) {
// 店招品牌
if (processBatchStoreDTO.getBrandId() != null) {
TabStoreBrand storeBrand = storeBrandService.getById(processBatchStoreDTO.getBrandId());
if (storeBrand == null) {
return responseErrorElement(ImportStoreBatchResultEnum.B1);
}
storeDTO.setBrandIds(processBatchStoreDTO.getBrandId().toString());
}else if (StringUtils.isNotBlank(processBatchStoreDTO.getBrandName())) {
TabStoreBrand storeBrand = storeBrandService.getByStoreBrandName(processBatchStoreDTO.getEnterpriseId(), processBatchStoreDTO.getBrandName());
if (storeBrand == null) {
return responseErrorElement(ImportStoreBatchResultEnum.B1);
}
storeDTO.setBrandIds(storeBrand.getStoreBrandId().toString());
}
// 门店类型
if (StringUtils.isNotBlank(processBatchStoreDTO.getStoreType())) {
ServiceResponse<List<StoreDictDTO>> serviceResponse = storeDictApiService.listStoreType(processBatchStoreDTO.getEnterpriseId());
if (serviceResponse.isSuccess()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment