From 1f9c0e8663d2b7b59d03caf9257afb7526a88ec3 Mon Sep 17 00:00:00 2001
From: 罗元桥 <2376770955@qq.com>
Date: 星期六, 09 十月 2021 18:41:39 +0800
Subject: [PATCH] Merge branch 'test' into 'test_bak'
---
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/api/EasyPhotoApi.java | 139 +++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 131 insertions(+), 8 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/api/EasyPhotoApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/api/EasyPhotoApi.java
index da70f08..d0d644c 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/api/EasyPhotoApi.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/api/EasyPhotoApi.java
@@ -1,12 +1,18 @@
package com.panzhihua.service_grid.api;
+import javax.annotation.Resource;
+
+import org.springframework.web.bind.annotation.*;
+
+import com.panzhihua.common.model.dtos.grid.ComActEasyPhotoEditAdminDTO;
+import com.panzhihua.common.model.dtos.grid.ComActEasyPhotoHandleDTO;
+import com.panzhihua.common.model.dtos.grid.PageEasyAdminDTO;
import com.panzhihua.common.model.dtos.grid.PageEasyAppDTO;
import com.panzhihua.common.model.vos.R;
+import com.panzhihua.service_grid.service.ComActEasyPhotoService;
+import com.panzhihua.service_grid.service.ComActEasyPhotoTypeService;
+
import lombok.extern.slf4j.Slf4j;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
/**
*
@@ -14,15 +20,132 @@
* @version 1.0
* @since 1.0
* @date 2021-05-26
- * */
+ */
@Slf4j
@RestController
@RequestMapping("/easy")
public class EasyPhotoApi {
+ @Resource
+ private ComActEasyPhotoService comActEasyPhotoService;
+ @Resource
+ private ComActEasyPhotoTypeService comActEasyPhotoTypeService;
+
+ /**
+ * 分页查询随手拍
+ *
+ * @param easyAppDTO
+ * 请求参数
+ * @return 随手拍列表
+ */
@PostMapping("list")
- public R list(@RequestBody PageEasyAppDTO easyAppDTO){
-
- return R.ok();
+ public R list(@RequestBody PageEasyAppDTO easyAppDTO) {
+ return comActEasyPhotoService.query(easyAppDTO);
+ }
+
+ /**
+ * 根据随手拍id查询随手拍详情
+ *
+ * @param easyId
+ * 随手拍id
+ * @return 随手拍详情
+ */
+ @PostMapping("detail")
+ public R detail(@RequestParam("easyId") Long easyId) {
+ return comActEasyPhotoService.detail(easyId);
+ }
+
+ /**
+ * 查询随手拍类型列表
+ *
+ * @return 类型列表
+ */
+ @PostMapping("type/list")
+ public R typeList() {
+ return comActEasyPhotoTypeService.typeList();
+ }
+
+ /**
+ * 随手拍处理
+ *
+ * @param photoHandleDTO
+ * 请求参数
+ * @return 处理结果
+ */
+ @PostMapping("handle")
+ public R easyHandle(@RequestBody ComActEasyPhotoHandleDTO photoHandleDTO) {
+ return comActEasyPhotoService.easyHandle(photoHandleDTO);
+ }
+
+ /**
+ * 随手拍公示状态切换
+ *
+ * @param photoHandleDTO
+ * 请求参数
+ * @return 切换结果
+ */
+ @PostMapping("publicity")
+ public R easyPublicity(@RequestBody ComActEasyPhotoHandleDTO photoHandleDTO) {
+ return comActEasyPhotoService.easyPublicity(photoHandleDTO);
+ }
+
+ /**
+ * 随手拍上报社区
+ *
+ * @param photoHandleDTO
+ * 请求参数
+ * @return 上报结果
+ */
+ @PostMapping("report")
+ public R easyReport(@RequestBody ComActEasyPhotoHandleDTO photoHandleDTO) {
+ return comActEasyPhotoService.easyReport(photoHandleDTO);
+ }
+
+ /**
+ * 后台管理-分页查询随手拍列表
+ *
+ * @param easyAppDTO
+ * 请求参数
+ * @return 随手拍列表
+ */
+ @PostMapping("admin/list")
+ public R easyListByAdmin(@RequestBody PageEasyAdminDTO easyAppDTO) {
+ return comActEasyPhotoService.easyListByAdmin(easyAppDTO);
+ }
+
+ /**
+ * 后台管理-随手拍详情
+ *
+ * @param easyId
+ * 随手拍id
+ * @return 随手拍详情
+ */
+ @PostMapping("admin/detail")
+ public R easyDetailByAdmin(@RequestParam("easyId") Long easyId) {
+ return comActEasyPhotoService.easyDetailByAdmin(easyId);
+ }
+
+ /**
+ * 后台管理-随手拍处理
+ *
+ * @param photoHandleDTO
+ * 请求参数
+ * @return 处理结果
+ */
+ @PostMapping("admin/handle")
+ public R easyHandleByAdmin(@RequestBody ComActEasyPhotoHandleDTO photoHandleDTO) {
+ return comActEasyPhotoService.easyHandleByAdmin(photoHandleDTO);
+ }
+
+ /**
+ * 后台管理-批量修改随手拍公示状态/删除随手拍
+ *
+ * @param photoEditDTO
+ * 请求参数
+ * @return 修改/删除结果
+ */
+ @PostMapping("admin/publicity")
+ public R easyPublicityByAdmin(@RequestBody ComActEasyPhotoEditAdminDTO photoEditDTO) {
+ return comActEasyPhotoService.easyPublicityByAdmin(photoEditDTO);
}
}
--
Gitblit v1.7.1