Commit 4e00c8c8 by 程裕兵

feat:file

parent 5b38b5d1
...@@ -196,18 +196,6 @@ public class StudioMerchantServiceImpl implements StudioMerchantService { ...@@ -196,18 +196,6 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
return MerchantConvert.convertApply(apply, urlMap); return MerchantConvert.convertApply(apply, urlMap);
} }
private Map<Long, String> getResouceseUrlMap(StudioMerchantApply apply) {
List<Long> resourceIds = this.getResourceIds(apply);
return resourceRpcService.getResourceUrlMap(apply.getBrandId(), resourceIds);
}
private List<Long> getResourceIds(StudioMerchantApply apply) {
ApplyStudioMerchantParams info = JSON.parseObject(apply.getMerchantInfo(),
ApplyStudioMerchantParams.class);
return info.getResourceMap().values().stream().map(BrandResourceInfo::getResourceId)
.collect(Collectors.toList());
}
@Override @Override
public PageVO<StudioMerchantApplyVO> pageApply(PageStudioMerchantApplyParams params) { public PageVO<StudioMerchantApplyVO> pageApply(PageStudioMerchantApplyParams params) {
Page<StudioMerchantApply> page = studioMerchantApplyRpService.page(BeanUtil.map(params, Page<StudioMerchantApply> page = studioMerchantApplyRpService.page(BeanUtil.map(params,
...@@ -221,7 +209,8 @@ public class StudioMerchantServiceImpl implements StudioMerchantService { ...@@ -221,7 +209,8 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
if (null == apply) { if (null == apply) {
return null; return null;
} }
return MerchantConvert.convertApply(apply, null); Map<Long, String> urlMap = this.getResouceseUrlMap(apply);
return MerchantConvert.convertApply(apply, urlMap);
} }
@Override @Override
...@@ -382,4 +371,18 @@ public class StudioMerchantServiceImpl implements StudioMerchantService { ...@@ -382,4 +371,18 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
} }
} }
private Map<Long, String> getResouceseUrlMap(StudioMerchantApply apply) {
List<Long> resourceIds = this.getResourceIds(apply);
return resourceRpcService.getResourceUrlMap(apply.getBrandId(), resourceIds);
}
private List<Long> getResourceIds(StudioMerchantApply apply) {
ApplyStudioMerchantParams info = JSON.parseObject(apply.getMerchantInfo(),
ApplyStudioMerchantParams.class);
return info.getResourceMap().values().stream().map(BrandResourceInfo::getResourceId)
.collect(Collectors.toList());
}
} }
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