Commit ddacd0bf by 裴大威

Merge branch 'zyj-shouye' into 'master'

fixbug扫码带书刊信息

See merge request rays/pcloud-book!621
parents 3c56c2ba 1fa26a40
......@@ -764,4 +764,11 @@ public interface BookGroupBiz {
* @return
*/
public Long getBookGroupId4OldData(Long raysBookId);
/**
* 获取小程序中信息
* @param wechatUserId
* @param scene
*/
void getByAppletScene(Long wechatUserId, String scene);
}
......@@ -9,6 +9,8 @@ import com.pcloud.appcenter.app.dto.AppDto;
import com.pcloud.appcenter.base.dto.AppPriceCacheDTO;
import com.pcloud.appcenter.cache.service.AppPriceCacheService;
import com.pcloud.audioapp.audioLesson.service.AudioLessonService;
import com.pcloud.book.applet.biz.AppletUserBookcaseBiz;
import com.pcloud.book.applet.entity.AppletUserBookcase;
import com.pcloud.book.base.exception.BookBizException;
import com.pcloud.book.book.biz.BookBiz;
import com.pcloud.book.book.dao.BookAdviserDao;
......@@ -303,6 +305,8 @@ public class BookGroupBizImpl implements BookGroupBiz {
private BookAppletSceneDao bookAppletSceneDao;
@Autowired
private RightsSettingBiz rightsSettingBiz;
@Autowired
private AppletUserBookcaseBiz appletUserBookcaseBiz;
private static final ThreadPoolExecutor PLATFORM_STATISTICS_EXPORT_THREAD = new ThreadPoolExecutor(2, 2,
0, TimeUnit.SECONDS, new LinkedBlockingQueue<>(),
......@@ -4478,4 +4482,23 @@ public class BookGroupBizImpl implements BookGroupBiz {
return bookGroupDao.getBookGroupId4OldData(raysBookId);
}
@Override
public void getByAppletScene(Long wechatUserId, String scene) {
BookAppletScene bookAppletScene = bookAppletSceneDao.getByAppletId(scene);
if (null==bookAppletScene){
return;
}
BookGroupDTO bookGroupDTO = bookGroupDao. getBookBaseInfoById(bookAppletScene.getBookGroupId());
if (null==bookGroupDTO){
return;
}
//用户书刊埋点
AppletUserBookcase appletUserBookcase = new AppletUserBookcase();
appletUserBookcase.setWechatUserId(wechatUserId);
appletUserBookcase.setAdviserId(bookGroupDTO.getCreateUser());
appletUserBookcase.setBookId(bookGroupDTO.getBookId());
appletUserBookcase.setChannelId(bookGroupDTO.getChannelId());
appletUserBookcaseBiz.addUserBook(appletUserBookcase);
}
}
......@@ -700,4 +700,8 @@ public interface BookGroupFacade {
@ApiImplicitParam(name = "raysBookId", value = "临时书刊id", required = true, dataType = "long", paramType = "query")
@GetMapping("getBookGroupId4OldData")
ResponseDto<Long> getBookGroupId4OldData(@RequestParam("raysBookId") Long raysBookId);
@ApiOperation("根据小程序id获取信息")
@GetMapping("getByAppletScene")
ResponseDto<?> getByAppletScene(@CookieValue("userInfo") String userInfo,@RequestParam("scene") String scene);
}
......@@ -1123,4 +1123,15 @@ public class BookGroupFacadeImpl implements BookGroupFacade {
return new ResponseDto<>(bookGroupBiz.getBookGroupId4OldData(raysBookId));
}
@Override
@GetMapping("getByAppletScene")
public ResponseDto<?> getByAppletScene(@CookieValue("userInfo") String userInfo,@RequestParam("scene") String scene){
if (StringUtil.isEmpty(scene)){
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "scene不能为空!");
}
Long wechatUserId = Cookie.getId(userInfo,Cookie._WECHAT_USER_ID);
bookGroupBiz.getByAppletScene(wechatUserId,scene);
return new ResponseDto<>();
}
}
......@@ -5,11 +5,11 @@ public class RightsSettingConstant {
/**
* 所属k12教育的编辑书刊分类id--生产uat
*/
public static final Long[] K12_TEMPLET_ID = {48L, 59L, 46L, 40L, 65L, 60L, 131L};
public static final Long[] K12_TEMPLET_ID = {48L, 59L, 46L, 40L, 65L, 60L, 131L,73L};
/**
* 所属k12教育的编辑书刊分类id--测试环境
*/
public static final Long[] K12_TEMPLET_ID_TEST = {48L, 59L, 46L, 40L, 65L, 60L, 136L};
public static final Long[] K12_TEMPLET_ID_TEST = {48L, 59L, 46L, 40L, 65L, 60L, 136L, 73L};
/**
* 医疗保健编辑书刊分类id
*/
......
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