Commit a244d8ed by 阮思源

Merge branch 'fixbug-rsy' into 'master'

配置资源自动上架

See merge request rays/pcloud-book!242
parents 7f9266ff 9207009d
...@@ -2175,6 +2175,7 @@ public class BookGroupBizImpl implements BookGroupBiz { ...@@ -2175,6 +2175,7 @@ public class BookGroupBizImpl implements BookGroupBiz {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "参数错误!"); throw new BookBizException(BookBizException.PARAM_IS_ERROR, "参数错误!");
} }
AccountSettingDto accountSettingDto = qrcodeSceneConsr.getWechatInfo(dto.getChannelId()); AccountSettingDto accountSettingDto = qrcodeSceneConsr.getWechatInfo(dto.getChannelId());
List<Long> productIds = new ArrayList<>();
for (BookGroupServe bookGroupServe : bookGroupServes) { for (BookGroupServe bookGroupServe : bookGroupServes) {
if ("APP".equalsIgnoreCase(bookGroupServe.getServeType())) { if ("APP".equalsIgnoreCase(bookGroupServe.getServeType())) {
AppDto appDto = appConsr.getBaseById(bookGroupServe.getServeId()); AppDto appDto = appConsr.getBaseById(bookGroupServe.getServeId());
...@@ -2189,8 +2190,15 @@ public class BookGroupBizImpl implements BookGroupBiz { ...@@ -2189,8 +2190,15 @@ public class BookGroupBizImpl implements BookGroupBiz {
String resultUrl=UrlUtils.getShortUrl4Own(linkUrl); String resultUrl=UrlUtils.getShortUrl4Own(linkUrl);
bookGroupServe.setShortUrl(resultUrl); bookGroupServe.setShortUrl(resultUrl);
bookGroupServe.setCreateUser(partyId); bookGroupServe.setCreateUser(partyId);
if ("PRODUCT".equalsIgnoreCase(bookGroupServe.getServeType())) {
productIds.add(bookGroupServe.getServeId());
}
} }
bookGroupServeDao.batchInsert(bookGroupServes); bookGroupServeDao.batchInsert(bookGroupServes);
if (!ListUtils.isEmpty(productIds)){
//自动上架
productConsr.productAutoOnShelves(dto.getChannelId(), productIds);
}
} }
@ParamLog("删除资源配置") @ParamLog("删除资源配置")
......
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