From c42f62b32bac302a7ac9fcde7489f7c5fc6e11aa Mon Sep 17 00:00:00 2001
From: zjh <1084500556@qq.com>
Date: 星期五, 06 十二月 2024 15:35:17 +0800
Subject: [PATCH] zjh20241205-3

---
 ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjTeamContactLogController.java |   30 +++++++++++++++++++++---------
 1 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjTeamContactLogController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjTeamContactLogController.java
index 31cd5b8..9d227f2 100644
--- a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjTeamContactLogController.java
+++ b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjTeamContactLogController.java
@@ -1,9 +1,15 @@
 package com.ltkj.web.controller.system;
 
+import java.util.Date;
 import java.util.List;
+import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
 
-import org.springframework.security.access.prepost.PreAuthorize;
+import com.ltkj.common.core.domain.entity.SysUser;
+import com.ltkj.framework.config.UserHoder;
+import com.ltkj.system.service.ISysUserService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -30,15 +36,18 @@
  */
 @RestController
 @RequestMapping("/hosp/TjTeamContactLog")
+@Api(tags = "A--鍥㈤槦棰勭害娌熼�氳褰曟帴鍙�")
 public class TjTeamContactLogController extends BaseController {
     @Autowired
     private ITjTeamContactLogService tjTeamContactLogService;
+    @Autowired
+    private ISysUserService userService;
 
     /**
      * 鏌ヨ鍥㈤槦棰勭害娌熼�氳褰曞垪琛�
      */
-    @PreAuthorize("@ss.hasPermi('hosp:TjTeamContactLog:list')")
     @GetMapping("/list")
+    @ApiOperation(value = "鏌ヨ鍥㈤槦棰勭害娌熼�氳褰曞垪琛�")
     public TableDataInfo list(TjTeamContactLog tjTeamContactLog) {
         startPage();
         List<TjTeamContactLog> list = tjTeamContactLogService.selectTjTeamContactLogList(tjTeamContactLog);
@@ -48,7 +57,6 @@
     /**
      * 瀵煎嚭鍥㈤槦棰勭害娌熼�氳褰曞垪琛�
      */
-    @PreAuthorize("@ss.hasPermi('hosp:TjTeamContactLog:export')")
     @Log(title = "鍥㈤槦棰勭害娌熼�氳褰�", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
     public void export(HttpServletResponse response, TjTeamContactLog tjTeamContactLog) {
@@ -60,8 +68,8 @@
     /**
      * 鑾峰彇鍥㈤槦棰勭害娌熼�氳褰曡缁嗕俊鎭�
      */
-    @PreAuthorize("@ss.hasPermi('hosp:TjTeamContactLog:query')")
     @GetMapping(value = "/{id}")
+    @ApiOperation(value = "鑾峰彇鍥㈤槦棰勭害娌熼�氳褰曡缁嗕俊鎭�")
     public AjaxResult getInfo(@PathVariable("id") Long id) {
         return success(tjTeamContactLogService.selectTjTeamContactLogById(id));
     }
@@ -69,29 +77,33 @@
     /**
      * 鏂板鍥㈤槦棰勭害娌熼�氳褰�
      */
-    @PreAuthorize("@ss.hasPermi('hosp:TjTeamContactLog:add')")
     @Log(title = "鍥㈤槦棰勭害娌熼�氳褰�", businessType = BusinessType.INSERT)
     @PostMapping
+    @ApiOperation(value = "鏂板鍥㈤槦棰勭害娌熼�氳褰�")
     public AjaxResult add(@RequestBody TjTeamContactLog tjTeamContactLog) {
-        return toAjax(tjTeamContactLogService.insertTjTeamContactLog(tjTeamContactLog));
+
+        SysUser user = userService.getById(tjTeamContactLog.getContactUserId());
+        if(null !=user)tjTeamContactLog.setContactUserName(user.getNickName());
+        tjTeamContactLog.setContactTime(new Date());
+        return toAjax(tjTeamContactLogService.save(tjTeamContactLog));
     }
 
     /**
      * 淇敼鍥㈤槦棰勭害娌熼�氳褰�
      */
-    @PreAuthorize("@ss.hasPermi('hosp:TjTeamContactLog:edit')")
     @Log(title = "鍥㈤槦棰勭害娌熼�氳褰�", businessType = BusinessType.UPDATE)
     @PutMapping
+    @ApiOperation(value = "淇敼鍥㈤槦棰勭害娌熼�氳褰�")
     public AjaxResult edit(@RequestBody TjTeamContactLog tjTeamContactLog) {
-        return toAjax(tjTeamContactLogService.updateTjTeamContactLog(tjTeamContactLog));
+        return toAjax(tjTeamContactLogService.updateById(tjTeamContactLog));
     }
 
     /**
      * 鍒犻櫎鍥㈤槦棰勭害娌熼�氳褰�
      */
-    @PreAuthorize("@ss.hasPermi('hosp:TjTeamContactLog:remove')")
     @Log(title = "鍥㈤槦棰勭害娌熼�氳褰�", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
+    @ApiOperation(value = "鍒犻櫎鍥㈤槦棰勭害娌熼�氳褰�")
     public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(tjTeamContactLogService.deleteTjTeamContactLogByIds(ids));
     }

--
Gitblit v1.8.0