|
|
@ -1,9 +1,9 @@ |
|
|
|
package com.hnac.hzims.operational.video.controller; |
|
|
|
package com.hnac.hzims.operational.video.controller; |
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.hnac.hzims.common.invalid.Create; |
|
|
|
import com.hnac.hzims.common.invalid.Create; |
|
|
|
import com.hnac.hzims.common.invalid.Update; |
|
|
|
import com.hnac.hzims.common.invalid.Update; |
|
|
|
import com.hnac.hzims.common.support.constants.Order; |
|
|
|
|
|
|
|
import com.hnac.hzims.common.support.utils.Condition; |
|
|
|
import com.hnac.hzims.common.support.utils.Condition; |
|
|
|
import com.hnac.hzims.operational.OperationalConstants; |
|
|
|
import com.hnac.hzims.operational.OperationalConstants; |
|
|
|
import com.hnac.hzims.operational.video.dto.VideoPlaybackDTO; |
|
|
|
import com.hnac.hzims.operational.video.dto.VideoPlaybackDTO; |
|
|
@ -19,13 +19,16 @@ import io.swagger.annotations.ApiOperationSupport; |
|
|
|
import io.swagger.annotations.ApiParam; |
|
|
|
import io.swagger.annotations.ApiParam; |
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
import org.springblade.core.boot.ctrl.BladeController; |
|
|
|
import org.springblade.core.boot.ctrl.BladeController; |
|
|
|
|
|
|
|
import org.springblade.core.mp.support.Query; |
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
|
|
|
|
|
import org.springblade.core.tool.utils.StringUtil; |
|
|
|
import org.springframework.validation.annotation.Validated; |
|
|
|
import org.springframework.validation.annotation.Validated; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.*; |
|
|
|
/** |
|
|
|
|
|
|
|
* @author ysj |
|
|
|
|
|
|
|
*/ |
|
|
|
@RestController |
|
|
|
@RestController |
|
|
|
@Api(value = "视频平台管理",tags = "视频平台管理") |
|
|
|
@Api(value = "视频平台管理",tags = "视频平台管理") |
|
|
|
@RequestMapping("/video/platform") |
|
|
|
@RequestMapping("/video/platform") |
|
|
@ -64,12 +67,13 @@ public class VideoPlatformController extends BladeController { |
|
|
|
@ApiOperation("查询视频平台列表") |
|
|
|
@ApiOperation("查询视频平台列表") |
|
|
|
@ApiOperationSupport(order = 4) |
|
|
|
@ApiOperationSupport(order = 4) |
|
|
|
@Operate(label = "查询视频平台列表",type = BusinessType.QUERY,ignore = false) |
|
|
|
@Operate(label = "查询视频平台列表",type = BusinessType.QUERY,ignore = false) |
|
|
|
public R<List<VideoPlatformEntity>> list(VideoPlatformEntity req) { |
|
|
|
public R<IPage<VideoPlatformEntity>> list(Query query, VideoPlatformEntity req) { |
|
|
|
HashMap<String, Order> sort = new HashMap<String, Order>() {{ |
|
|
|
LambdaQueryWrapper<VideoPlatformEntity> queryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
put("create_time", Order.DESC); |
|
|
|
queryWrapper.orderByDesc(VideoPlatformEntity::getCreateTime); |
|
|
|
}}; |
|
|
|
if(!StringUtil.isEmpty(req.getName())){ |
|
|
|
LambdaQueryWrapper<VideoPlatformEntity> queryWrapper = Condition.getQueryWrapper(req, VideoPlatformEntity.class, sort); |
|
|
|
queryWrapper.like(VideoPlatformEntity::getName,req.getName()); |
|
|
|
return R.data(videoPlatformService.list(queryWrapper)); |
|
|
|
} |
|
|
|
|
|
|
|
return R.data(videoPlatformService.page(Condition.getPage(query),queryWrapper)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@DeleteMapping("/remove") |
|
|
|
@DeleteMapping("/remove") |
|
|
|