|
@@ -1,11 +1,11 @@
|
|
|
package com.chelvc.cloud.maintain.controller;
|
|
|
|
|
|
-import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.chelvc.cloud.vehicle.api.dto.DynamicContentDTO;
|
|
|
import com.chelvc.cloud.vehicle.api.param.AddDynamicContentParam;
|
|
|
import com.chelvc.cloud.vehicle.api.param.QueryDynamicContentParam;
|
|
|
import com.chelvc.cloud.vehicle.api.service.DynamicContentService;
|
|
|
import com.chelvc.framework.base.context.SessionContextHolder;
|
|
|
+import com.chelvc.framework.common.model.Pagination;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import org.apache.dubbo.config.annotation.DubboReference;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
@@ -27,7 +27,7 @@ import java.util.Map;
|
|
|
public class DynamicContentController {
|
|
|
|
|
|
@DubboReference
|
|
|
- private final DynamicContentService iDynamicContentService;
|
|
|
+ private DynamicContentService iDynamicContentService;
|
|
|
|
|
|
/**
|
|
|
* 查询列表
|
|
@@ -38,14 +38,14 @@ public class DynamicContentController {
|
|
|
* @date 2023/8/9 17:25
|
|
|
*/
|
|
|
@GetMapping("/page")
|
|
|
- public IPage<DynamicContentDTO> list(@Validated QueryDynamicContentParam param, Integer pageNum, Integer pageSize) {
|
|
|
+ public Pagination<DynamicContentDTO> list(@Validated QueryDynamicContentParam param, Integer pageNum, Integer pageSize) {
|
|
|
if (pageNum == null) {
|
|
|
pageNum = 1;
|
|
|
}
|
|
|
if (pageSize == null) {
|
|
|
pageSize = 20;
|
|
|
}
|
|
|
- return iDynamicContentService.queryPageList(param, pageNum, pageSize, SessionContextHolder.getId());
|
|
|
+ return this.iDynamicContentService.queryPageList(param, pageNum, pageSize, SessionContextHolder.getId());
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -57,14 +57,14 @@ public class DynamicContentController {
|
|
|
* @date 2023/8/9 17:25
|
|
|
*/
|
|
|
@GetMapping("/query-user")
|
|
|
- public IPage<DynamicContentDTO> queryUserById(@NotNull(message = "用户标识不能为空") Long userId, Integer pageNum, Integer pageSize) {
|
|
|
+ public Pagination<DynamicContentDTO> queryUserById(@NotNull(message = "用户标识不能为空") Long userId, Integer pageNum, Integer pageSize) {
|
|
|
if (pageNum == null) {
|
|
|
pageNum = 1;
|
|
|
}
|
|
|
if (pageSize == null) {
|
|
|
pageSize = 20;
|
|
|
}
|
|
|
- return iDynamicContentService.queryUserById(SessionContextHolder.getId(), userId, pageNum, pageSize);
|
|
|
+ return this.iDynamicContentService.queryUserById(SessionContextHolder.getId(), userId, pageNum, pageSize);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -75,7 +75,7 @@ public class DynamicContentController {
|
|
|
*/
|
|
|
@GetMapping("/query")
|
|
|
public DynamicContentDTO getInfo(@NotNull(message = "主键不能为空") Long id) {
|
|
|
- return iDynamicContentService.queryById(id, SessionContextHolder.getId());
|
|
|
+ return this.iDynamicContentService.queryById(id, SessionContextHolder.getId());
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -86,7 +86,7 @@ public class DynamicContentController {
|
|
|
*/
|
|
|
@PostMapping("/add")
|
|
|
public void add(@Validated @RequestBody AddDynamicContentParam param) {
|
|
|
- iDynamicContentService.insertByBo(param, SessionContextHolder.getId());
|
|
|
+ this.iDynamicContentService.insertByBo(param, SessionContextHolder.getId());
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -97,7 +97,7 @@ public class DynamicContentController {
|
|
|
*/
|
|
|
@DeleteMapping("/del")
|
|
|
public void remove(@NotNull(message = "主键不能为空") Long id) {
|
|
|
- iDynamicContentService.deleteByIds(id, SessionContextHolder.getId());
|
|
|
+ this.iDynamicContentService.deleteByIds(id, SessionContextHolder.getId());
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -110,6 +110,6 @@ public class DynamicContentController {
|
|
|
@PostMapping("/tencent/video/audit/call")
|
|
|
//@SkipRespBodyFormatHandler
|
|
|
public void videoAuditCallback(@RequestBody Map<String, Object> param) {
|
|
|
- iDynamicContentService.videoAuditCallback(param);
|
|
|
+ this.iDynamicContentService.videoAuditCallback(param);
|
|
|
}
|
|
|
}
|