From 8581b76c538ed2f31d20d8c2b4cf6aa9d5a0a0ef Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期五, 07 十一月 2025 11:56:00 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/mobile_community

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/THelpNeedsController.java |   65 +++++++++++++++++++++++++++++++-
 1 files changed, 63 insertions(+), 2 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/THelpNeedsController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/THelpNeedsController.java
index 966f750..f0c30d4 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/THelpNeedsController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/THelpNeedsController.java
@@ -1,9 +1,26 @@
 package com.ruoyi.web.controller.api;
 
 
-import org.springframework.web.bind.annotation.RequestMapping;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.basic.PageInfo;
+import com.ruoyi.common.core.domain.R;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.system.model.TAppUser;
+import com.ruoyi.system.model.THelpNeeds;
+import com.ruoyi.system.model.THelpNeeds;
+import com.ruoyi.system.query.AssistedDiningListQuery;
+import com.ruoyi.system.query.HelpNeedsListQuery;
+import com.ruoyi.system.service.THelpNeedsService;
+import com.ruoyi.system.service.THelpNeedsService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.*;
 
-import org.springframework.web.bind.annotation.RestController;
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * <p>
@@ -15,7 +32,51 @@
  */
 @RestController
 @RequestMapping("/t-help-needs")
+@Api(tags = "助需管理")
 public class THelpNeedsController {
+    @Autowired
+    private THelpNeedsService helpNeedsService;
+    @ApiOperation(value = "助需管理分页列表")
+    @PostMapping(value = "/pageList")
+    public R<PageInfo<THelpNeeds>> pageList(@RequestBody HelpNeedsListQuery query) {
+        return R.ok(helpNeedsService.pageList(query));
+    }
 
+    @ApiOperation(value = "添加")
+    @Transactional
+    @Log(title = "助需管理-添加", businessType = BusinessType.INSERT)
+    @PostMapping(value = "/add")
+    public R<Boolean> save(@RequestBody THelpNeeds dto) {
+        helpNeedsService.save(dto);
+        return R.ok();
+    }
+    @ApiOperation(value = "修改")
+    @Log(title = "助需管理-修改", businessType = BusinessType.UPDATE)
+    @PostMapping(value = "/edit")
+    public R<Boolean> edit(@RequestBody THelpNeeds dto) {
+        helpNeedsService.updateById(dto);
+        return R.ok();
+    }
+    @Log(title = "助需管理-删除", businessType = BusinessType.DELETE)
+    @ApiOperation(value = "助需管理-删除")
+    @DeleteMapping(value = "/deleteById")
+    public R<Boolean> deleteById(@RequestParam String id) {
+        return R.ok(helpNeedsService.removeById(id));
+    }
+
+    /**
+     * 批量删除助需管理
+     */
+    @Log(title = "助需管理-批量删除", businessType = BusinessType.DELETE)
+    @ApiOperation(value = "助需管理-批量删除")
+    @DeleteMapping(value = "/deleteByIds")
+    public R<Boolean> deleteByIds(@RequestBody List<String> ids) {
+        return R.ok(helpNeedsService.removeByIds(ids));
+    }
+    @ApiOperation(value = "查看详情")
+    @GetMapping(value = "/detail")
+    public R<THelpNeeds> detail(Integer id) {
+        return R.ok(helpNeedsService.getById( id));
+    }
 }
 

--
Gitblit v1.7.1