Commit 13e6b825 by 徐高华

链接

parent f4e1ad54
......@@ -539,26 +539,14 @@ public class HmLinkController {
if (page == null) {
return RestResponse.successResult();
}
// 查询shortCode
String shortCode = "";
ServiceResponse<HmLinkDTO> hmLinkRes = hmLinkApiService.getByLinkId(loginUser.getWxEnterpriseId(),
loginUser.getEnterpriseId(), qdto.getLinkId());
if (hmLinkRes.isSuccess()) {
HmLinkDTO hmLink = hmLinkRes.getResult();
if (hmLink != null) {
shortCode = hmLink.getShortCode();
}
}
Page<HmLinkListVO> retPage = EntityUtil.changeEntityByJSON(Page.class, page);
List<HmLinkListVO> list = EntityUtil.changeEntityListByJSON(HmLinkListVO.class, page.getResult());
if (CollectionUtils.isEmpty(list)) {
if (CollectionUtils.isEmpty(page.getResult())) {
return RestResponse.successResult(retPage);
}
List<HmLinkListVO> list = EntityUtil.changeEntityListByJSON(HmLinkListVO.class, page.getResult());
ServiceResponse<String> urlResp = this.hmLinkApiService.getHmLinkUrl();
String finalShortCode = shortCode;
list.forEach(item -> {
item.setShortCode(finalShortCode);
item.setLinkUrl(urlResp.getResult() + finalShortCode);
item.setLinkUrl(urlResp.getResult() + item.getShortCode());
});
retPage.setResult(list);
return RestResponse.successResult(retPage);
......
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