Commit d536c7c9 by gaopeng

广告位修改

parent 7869dfac
...@@ -263,10 +263,11 @@ public interface AdvertisingSpaceBiz { ...@@ -263,10 +263,11 @@ public interface AdvertisingSpaceBiz {
* @param adviserId 编辑ID * @param adviserId 编辑ID
* @param channelId 运营ID * @param channelId 运营ID
* @param adPositionDetail 广告具体位置 * @param adPositionDetail 广告具体位置
* @param bookGroupId 社群码ID
* @return * @return
* @throws BizException * @throws BizException
*/ */
List<AdvertisingSpaceDTO> get4Wechat(Long sceneId, Long adviserId, Long channelId, String adPositionDetail) throws BizException; List<AdvertisingSpaceDTO> get4Wechat(Long sceneId, Long adviserId, Long channelId, String adPositionDetail, Long bookGroupId) throws BizException;
/** /**
* 获取社群书配置的广告位信息 * 获取社群书配置的广告位信息
......
...@@ -1445,9 +1445,20 @@ public class AdvertisingSpaceBizImpl implements AdvertisingSpaceBiz { ...@@ -1445,9 +1445,20 @@ public class AdvertisingSpaceBizImpl implements AdvertisingSpaceBiz {
*/ */
@Override @Override
@ParamLog("客户端获取书刊配置的广告位信息") @ParamLog("客户端获取书刊配置的广告位信息")
public List<AdvertisingSpaceDTO> get4Wechat(Long sceneId, Long adviserId, Long channelId, String adPositionDetail) throws BizException { public List<AdvertisingSpaceDTO> get4Wechat(Long sceneId, Long adviserId, Long channelId, String adPositionDetail, Long bookGroupId) throws BizException {
Long agentId = adviserConsr.getAgentIdByAdviser(adviserId); Long agentId;
Long bookId = ResponseHandleUtil.parseResponse(qrcodeSceneService.getBookId4SceneId(sceneId), Long.class); Long bookId;
if (null != bookGroupId) {
BookGroupDTO bookGroupDTO = bookGroupDao.getDTOById(bookGroupId);
if (null == bookGroupDTO || null == bookGroupDTO.getBookId()) {
return new ArrayList<>();
}
bookId = bookGroupDTO.getBookId();
agentId = adviserConsr.getAgentIdByAdviser(bookGroupDTO.getCreateUser());
} else {
agentId = adviserConsr.getAgentIdByAdviser(adviserId);
bookId = ResponseHandleUtil.parseResponse(qrcodeSceneService.getBookId4SceneId(sceneId), Long.class);
}
if (null == agentId || null == bookId) { if (null == agentId || null == bookId) {
return new ArrayList<>(); return new ArrayList<>();
} }
......
...@@ -307,10 +307,11 @@ public class AdvertisingSpaceFacadeImpl implements AdvertisingSpaceFacade { ...@@ -307,10 +307,11 @@ public class AdvertisingSpaceFacadeImpl implements AdvertisingSpaceFacade {
Long sceneId = Cookie.getId(userInfo, Cookie._SCENE_ID); Long sceneId = Cookie.getId(userInfo, Cookie._SCENE_ID);
Long adviserId = Cookie.getId(userInfo, Cookie._ADVISER_ID); Long adviserId = Cookie.getId(userInfo, Cookie._ADVISER_ID);
Long channelId = Cookie.getId(userInfo, Cookie._CHANNEL_ID); Long channelId = Cookie.getId(userInfo, Cookie._CHANNEL_ID);
if (null == sceneId || null == adviserId || null == channelId) { Long bookGroupId = Cookie.getId(userInfo, Cookie.BOOK_GROUP_ID);
if (null == bookGroupId && (null == sceneId || null == adviserId || null == channelId)) {
return new ResponseDto<>(new ArrayList<>()); return new ResponseDto<>(new ArrayList<>());
} }
return new ResponseDto<>(advertisingSpaceBiz.get4Wechat(sceneId, adviserId, channelId, adPositionDetail)); return new ResponseDto<>(advertisingSpaceBiz.get4Wechat(sceneId, adviserId, channelId, adPositionDetail, bookGroupId));
} }
/** /**
......
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