|  |  |  | 
|---|
|  |  |  | import com.ruoyi.common.enums.BusinessType; | 
|---|
|  |  |  | import com.ruoyi.common.utils.SecurityUtils; | 
|---|
|  |  |  | import com.ruoyi.framework.web.service.TokenService; | 
|---|
|  |  |  | import com.ruoyi.system.model.TSysEducationalInfo; | 
|---|
|  |  |  | import com.ruoyi.system.model.TSysLive; | 
|---|
|  |  |  | import com.ruoyi.system.model.TSysProductIntroduction; | 
|---|
|  |  |  | import com.ruoyi.system.query.TSysLiveQuery; | 
|---|
|  |  |  | 
|---|
|  |  |  | public R<List<TSysLive>> list() { | 
|---|
|  |  |  | return R.ok(sysLiveService.list(Wrappers.lambdaQuery(TSysLive.class).orderByDesc(TSysLive::getCreateTime))); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 获取直播管理管理列表 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiOperation(value = "获取直播管理列表-banner使用") | 
|---|
|  |  |  | @PostMapping(value = "/listBanner") | 
|---|
|  |  |  | public R<List<TSysLive>> listBanner() { | 
|---|
|  |  |  | return R.ok(sysLiveService.list(Wrappers.lambdaQuery(TSysLive.class) | 
|---|
|  |  |  | .orderByDesc(TSysLive::getCreateTime))); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 添加直播管理管理 | 
|---|
|  |  |  | 
|---|
|  |  |  | Long userId = tokenService.getLoginUser().getUserId(); | 
|---|
|  |  |  | Set<Long> clickCount = new HashSet<>(); | 
|---|
|  |  |  | clickCount.add(userId); | 
|---|
|  |  |  | redisCache.setCacheSet(Constants.SYS_LIVE_COUNT+id,clickCount); | 
|---|
|  |  |  | redisCache.setCacheSet(Constants.SYS_LIVE_CLICK_COUNT+id,clickCount); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok(sysLive); | 
|---|
|  |  |  | } | 
|---|