From a5ebd7103f2375c8c241c6f14c586c7d75b0dd79 Mon Sep 17 00:00:00 2001
From: CeDo <cedoogle@gmail.com>
Date: 星期六, 05 六月 2021 18:44:36 +0800
Subject: [PATCH] Merge branch 'test_future_wangge' into test
---
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/api/EasyPhotoApi.java | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 108 insertions(+), 6 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..5c44a0d 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,16 @@
package com.panzhihua.service_grid.api;
+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;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
/**
*
@@ -20,9 +24,107 @@
@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();
+ 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