| | |
| | | */ |
| | | @ApiOperation(value = "获取教育资讯分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<TSysEducationalInfo>> pageList(@RequestBody TSysEducationalInfoQuery query) { |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | if(roleType == 5){ |
| | | query.setRoleType(roleType); |
| | | } |
| | | return R.ok(sysEducationalInfoService.pageList(query)); |
| | | public R<PageInfo<TSysEducationalInfo>> pageListApp(@RequestBody TSysEducationalInfoQuery query) { |
| | | return R.ok(sysEducationalInfoService.pageListApp(query)); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @ApiOperation(value = "获取直播管理分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<TSysLiveVO>> pageList(@RequestBody TSysLiveQuery query) { |
| | | String userId = tokenService.getLoginUserApplet().getUserId(); |
| | | query.setAppUserId(userId); |
| | | return R.ok(sysLiveService.pageList(query)); |
| | | public R<PageInfo<TSysLiveVO>> pageListApp(@RequestBody TSysLiveQuery query) { |
| | | return R.ok(sysLiveService.pageListApp(query)); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | List<TSysEducationalInfo> pageList(@Param("query") TSysEducationalInfoQuery query, @Param("pageInfo")PageInfo<TSysEducationalInfo> pageInfo); |
| | | /** |
| | | * 获取教育资讯分页列表 |
| | | * @param query |
| | | * @param pageInfo |
| | | * @return |
| | | */ |
| | | List<TSysEducationalInfo> pageListApp(@Param("query") TSysEducationalInfoQuery query, @Param("pageInfo")PageInfo<TSysEducationalInfo> pageInfo); |
| | | } |
| | |
| | | * @return 直播管理列表 |
| | | */ |
| | | List<TSysLiveVO> pageList(@Param("query") TSysLiveQuery query, @Param("pageInfo")PageInfo<TSysLiveVO> pageInfo); |
| | | /** |
| | | * 获取直播管理分页列表 |
| | | * |
| | | * @param query 查询参数 |
| | | * @return 直播管理列表 |
| | | */ |
| | | List<TSysLiveVO> pageListApp(@Param("query") TSysLiveQuery query, @Param("pageInfo")PageInfo<TSysLiveVO> pageInfo); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | PageInfo<TSysEducationalInfo> pageList(TSysEducationalInfoQuery query); |
| | | /** |
| | | * 获取教育资讯分页列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageInfo<TSysEducationalInfo> pageListApp(TSysEducationalInfoQuery query); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | PageInfo<TSysLiveVO> pageList(TSysLiveQuery query); |
| | | /** |
| | | * 获取直播管理分页列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageInfo<TSysLiveVO> pageListApp(TSysLiveQuery query); |
| | | } |
| | |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | @Override |
| | | public PageInfo<TSysEducationalInfo> pageListApp(TSysEducationalInfoQuery query) { |
| | | PageInfo<TSysEducationalInfo> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TSysEducationalInfo> list = this.baseMapper.pageListApp(query,pageInfo); |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |
| | |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | @Override |
| | | public PageInfo<TSysLiveVO> pageListApp(TSysLiveQuery query) { |
| | | PageInfo<TSysLiveVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TSysLiveVO> list = this.baseMapper.pageListApp(query,pageInfo); |
| | | if (CollectionUtils.isEmpty(list)){ |
| | | return pageInfo; |
| | | } |
| | | // 判断状态 |
| | | for (TSysLiveVO sysLive : list) { |
| | | if(sysLive.getStartTime().isAfter(LocalDateTime.now())){ |
| | | sysLive.setLiveStatus(1); |
| | | } |
| | | if(sysLive.getStartTime().isBefore(LocalDateTime.now()) && sysLive.getEndTime().isAfter(LocalDateTime.now())){ |
| | | sysLive.setLiveStatus(2); |
| | | } |
| | | if(sysLive.getEndTime().isBefore(LocalDateTime.now())){ |
| | | sysLive.setLiveStatus(3); |
| | | } |
| | | // 查看是否包含该值 |
| | | boolean memberInSet = redisCache.isMemberInSet(Constants.LIVE_APPOINTMENT_PUSH + sysLive.getId(), query.getAppUserId()); |
| | | sysLive.setAppointmentStatus(memberInSet ? 2 : 1); |
| | | } |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |
| | |
| | | * |
| | | * @author lihen |
| | | */ |
| | | //@Configuration |
| | | @Configuration |
| | | public class WxConfig { |
| | | |
| | | private final WeixinPayProperties weixinPayProperties; |
| | |
| | | </where> |
| | | ORDER BY create_time DESC |
| | | </select> |
| | | <select id="pageListApp" resultType="com.ruoyi.system.model.TSysEducationalInfo"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from t_sys_educational_info |
| | | <where> |
| | | <if test="query.infoTitle != null and query.infoTitle != ''"> |
| | | and info_title like concat('%',#{query.infoTitle},'%') |
| | | </if> |
| | | <if test="query.showType != null"> |
| | | and show_type = #{query.showType} |
| | | </if> |
| | | <if test="query.status != null"> |
| | | and status = #{query.status} |
| | | </if> |
| | | and show_type in (1,3) |
| | | AND disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY create_time DESC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | ORDER BY create_time DESC |
| | | </select> |
| | | |
| | | <select id="pageListApp" resultType="com.ruoyi.system.vo.TSysLiveVO"> |
| | | SELECT |
| | | <include refid="Base_Column_List"/> |
| | | FROM t_sys_live |
| | | <where> |
| | | <if test="query.liveTitle != null and query.liveTitle != ''"> |
| | | AND live_title LIKE concat('%',#{query.liveTitle},'%') |
| | | </if> |
| | | <if test="query.liveStatus != null and query.liveStatus == 1"> |
| | | AND date_format(start_time,'%y%m%d %H%i%s') > date_format(NOW(),'%y%m%d %H%i%s') |
| | | </if> |
| | | <if test="query.liveStatus != null and query.liveStatus == 2"> |
| | | AND date_format(start_time,'%y%m%d %H%i%s') <= date_format(NOW(),'%y%m%d %H%i%s') |
| | | AND date_format(end_time,'%y%m%d %H%i%s') >= date_format(NOW(),'%y%m%d %H%i%s') |
| | | </if> |
| | | <if test="query.liveStatus != null and query.liveStatus == 3"> |
| | | AND date_format(end_time,'%y%m%d %H%i%s') < date_format(NOW(),'%y%m%d %H%i%s') |
| | | </if> |
| | | AND disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY create_time DESC |
| | | </select> |
| | | |
| | | </mapper> |