From 3cfa0bda6574d0c39db120c457e98a168aa193e8 Mon Sep 17 00:00:00 2001 From: Jinquan_Ou <Jinquan@gdut.com> Date: 星期日, 23 四月 2023 17:15:20 +0800 Subject: [PATCH] 完成婚姻 --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZMarryController.java | 67 ++++++++++++++++++++++++++++++++- 1 files changed, 64 insertions(+), 3 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZMarryController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZMarryController.java index 5b245fe..95c572e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZMarryController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZMarryController.java @@ -1,9 +1,24 @@ package com.ruoyi.web.controller.zhang; -import org.springframework.web.bind.annotation.RequestMapping; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.domain.entity.SysUser; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.SecurityUtils; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.domain.ZMarry; +import com.ruoyi.domain.dto.MarryInfoDto; +import com.ruoyi.service.ZMarryService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; -import org.springframework.web.bind.annotation.RestController; +import javax.servlet.http.HttpServletResponse; +import java.util.Arrays; +import java.util.List; /** * <p> @@ -15,7 +30,53 @@ */ @RestController @RequestMapping("/zMarry") -public class ZMarryController { +@Slf4j +public class ZMarryController extends BaseController { + @Autowired + private ZMarryService zMarryService; + + + /** + * 鏌ヨ褰撳墠濠氬Щ鐘跺喌 + */ + @GetMapping("/list") + public AjaxResult getMarryStatus(){ + return zMarryService.getNow(); + } + + /** + * 鏂板濠氬Щ鐘跺喌璁板綍 + */ +// @PreAuthorize("@ss.hasPermi('system:property:add')") + @Log(title = "濠氬Щ鐘跺喌璁板綍", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody MarryInfoDto marryInfoDto) + { + return zMarryService.addInfo(marryInfoDto); + } + + /** + * 淇敼濠氬Щ鐘跺喌璁板綍 + */ +// @PreAuthorize("@ss.hasPermi('system:property:edit')") + @Log(title = "濠氬Щ鐘跺喌璁板綍", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody MarryInfoDto marryInfoDto) + { + return zMarryService.updateInfo(marryInfoDto); + } +// + /** + * 鎵归噺鍒犻櫎濠氬Щ鐘跺喌璁板綍 + */ +// @PreAuthorize("@ss.hasPermi('system:property:remove')") + @Log(title = "濠氬Щ鐘跺喌璁板綍", businessType = BusinessType.DELETE) + @DeleteMapping() + public AjaxResult remove(String id) + { + return zMarryService.deleteOld(id); + } + } -- Gitblit v1.9.1