From cc00d8ea70f475b54dacf575b59b8e7629afe899 Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期四, 06 十一月 2025 14:12:12 +0800
Subject: [PATCH] 后台党建引领,托育服务,社区公告

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TEmploymentEntrepreneurshipController.java |  105 +++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 103 insertions(+), 2 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TEmploymentEntrepreneurshipController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TEmploymentEntrepreneurshipController.java
index 2a7cd55..0a404b1 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TEmploymentEntrepreneurshipController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TEmploymentEntrepreneurshipController.java
@@ -1,8 +1,23 @@
 package com.ruoyi.web.controller.api;
 
 
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+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.framework.web.service.TokenService;
+import com.ruoyi.system.model.TEmploymentEntrepreneurship;
+import com.ruoyi.system.query.TEmploymentEntrepreneurshipQuery;
+import com.ruoyi.system.service.TEmploymentEntrepreneurshipService;
+import com.ruoyi.system.vo.TEmploymentEntrepreneurshipVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
 
 /**
  * <p>
@@ -12,9 +27,95 @@
  * @author xiaochen
  * @since 2025-11-06
  */
+@Api(tags = "就业创业服务管理")
 @RestController
 @RequestMapping("/t-employment-entrepreneurship")
 public class TEmploymentEntrepreneurshipController {
 
+    private final TEmploymentEntrepreneurshipService employmentEntrepreneurshipService;
+    private final TokenService tokenService;
+    @Autowired
+    public TEmploymentEntrepreneurshipController(TEmploymentEntrepreneurshipService employmentEntrepreneurshipService, TokenService tokenService) {
+        this.employmentEntrepreneurshipService = employmentEntrepreneurshipService;
+        this.tokenService = tokenService;
+    }
+
+    /**
+     * 获取就业创业服务管理管理列表
+     */
+    @ApiOperation(value = "获取就业创业服务管理分页列表")
+    @PostMapping(value = "/pageList")
+    public R<PageInfo<TEmploymentEntrepreneurshipVO>> pageList(@RequestBody TEmploymentEntrepreneurshipQuery query) {
+        return R.ok(employmentEntrepreneurshipService.pageList(query));
+    }
+
+    /**
+     * 获取就业创业服务管理管理列表
+     */
+    @ApiOperation(value = "获取就业创业服务管理列表")
+    @PostMapping(value = "/list")
+    public R<List<TEmploymentEntrepreneurship>> list() {
+        return R.ok(employmentEntrepreneurshipService.list(Wrappers.lambdaQuery(TEmploymentEntrepreneurship.class).orderByDesc(TEmploymentEntrepreneurship::getCreateTime)));
+    }
+
+    /**
+     * 添加就业创业服务管理管理
+     */
+    @Log(title = "就业创业服务管理信息-新增就业创业服务管理", businessType = BusinessType.INSERT)
+    @ApiOperation(value = "添加就业创业服务管理")
+    @PostMapping(value = "/add")
+    public R<Boolean> add(@Validated @RequestBody TEmploymentEntrepreneurship dto) {
+        if (employmentEntrepreneurshipService.isExit(dto)) {
+            return R.fail("就业创业服务标题已存在");
+        }
+        Long userId = tokenService.getLoginUser().getUser().getUserId();
+        String nickName = tokenService.getLoginUser().getUser().getNickName();
+        dto.setUserId(userId);
+        dto.setReleasePerson(nickName);
+        return R.ok(employmentEntrepreneurshipService.save(dto));
+    }
+
+    /**
+     * 修改就业创业服务管理
+     */
+    @Log(title = "就业创业服务管理信息-修改就业创业服务管理", businessType = BusinessType.UPDATE)
+    @ApiOperation(value = "修改就业创业服务管理")
+    @PostMapping(value = "/update")
+    public R<Boolean> update(@Validated @RequestBody TEmploymentEntrepreneurship dto) {
+        if (employmentEntrepreneurshipService.isExit(dto)) {
+            return R.fail("就业创业服务标题已存在");
+        }
+        return R.ok(employmentEntrepreneurshipService.updateById(dto));
+    }
+
+    /**
+     * 查看就业创业服务管理详情
+     */
+    @ApiOperation(value = "查看就业创业服务管理详情")
+    @GetMapping(value = "/getDetailById")
+    public R<TEmploymentEntrepreneurship> getDetailById(@RequestParam String id) {
+        return R.ok(employmentEntrepreneurshipService.getById(id));
+    }
+
+    /**
+     * 删除就业创业服务管理
+     */
+    @Log(title = "就业创业服务管理信息-删除就业创业服务管理", businessType = BusinessType.DELETE)
+    @ApiOperation(value = "删除就业创业服务管理")
+    @DeleteMapping(value = "/deleteById")
+    public R<Boolean> deleteById(@RequestParam String id) {
+        return R.ok(employmentEntrepreneurshipService.removeById(id));
+    }
+
+    /**
+     * 批量删除就业创业服务管理
+     */
+    @Log(title = "就业创业服务管理信息-删除就业创业服务管理", businessType = BusinessType.DELETE)
+    @ApiOperation(value = "批量删除就业创业服务管理")
+    @DeleteMapping(value = "/deleteByIds")
+    public R<Boolean> deleteByIds(@RequestBody List<String> ids) {
+        return R.ok(employmentEntrepreneurshipService.removeByIds(ids));
+    }
+    
 }
 

--
Gitblit v1.7.1