Browse Source

[微信直播]缓存调整、分页支持

release_toaliyun_real
Burce 6 years ago
parent
commit
2cb6556522
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      mallinkCApi/src/main/java/com/iformall/controller/WxLiveController.java

+ 4
- 4
mallinkCApi/src/main/java/com/iformall/controller/WxLiveController.java View File

@@ -27,13 +27,13 @@ public class WxLiveController extends BaseController {
* @return
*/
@ApiOperation("获取所有直播间和商品信息")
@RedisCache(expireTime = 30,dateUnit = TimeUnit.MINUTES)
@RedisCache(expireTime = 5, dateUnit = TimeUnit.MINUTES)
@GetMapping("/roomList")
public ResultData getLiveinfos(String appId) {
public ResultData getLiveinfos(String appId, Integer start, Integer limit) {
ResultData resultData = new ResultData();
try {
WxMaService wxMaService = getWeappService(appId);
resultData.data = wxMaService.getLiveService().getLiveinfos();
resultData.data = wxMaService.getLiveService().getLiveInfo(start,limit);
} catch (WxErrorException e) {
logger.error("getLiveinfos error", e);
throw new MallinkException(ErrorCode.SYS_SERVER_ERROR);
@@ -52,7 +52,7 @@ public class WxLiveController extends BaseController {
* @return
*/
@ApiOperation("获取直播房间回放数据和商品信息")
@RedisCache(expireTime = 30,dateUnit = TimeUnit.MINUTES)
@RedisCache(expireTime = 5, dateUnit = TimeUnit.MINUTES)
@GetMapping("/replayList")
public ResultData getLiveReplay(Integer room_id, Integer start, Integer limit) {
ResultData resultData = new ResultData();


Loading…
Cancel
Save