From db9f34881bfb372892823fcd403f3d833a4ecdfe Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期一, 14 七月 2025 14:18:13 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.11.205:9000/r/se-cloud --- se-modules/se-system/src/main/java/com/se/system/controller/SysAppTokenController.java | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 105 insertions(+), 0 deletions(-) diff --git a/se-modules/se-system/src/main/java/com/se/system/controller/SysAppTokenController.java b/se-modules/se-system/src/main/java/com/se/system/controller/SysAppTokenController.java new file mode 100644 index 0000000..1abb040 --- /dev/null +++ b/se-modules/se-system/src/main/java/com/se/system/controller/SysAppTokenController.java @@ -0,0 +1,105 @@ +package com.se.system.controller; + +import java.util.List; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; + +import com.se.system.service.impl.SysAppTokenServiceImpl; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.se.common.log.annotation.Log; +import com.se.common.log.enums.BusinessType; +import com.se.common.security.annotation.RequiresPermissions; +import com.se.system.domain.SysAppToken; +import com.se.common.core.web.controller.BaseController; +import com.se.common.core.web.domain.AjaxResult; +import com.se.common.core.utils.poi.ExcelUtil; +import com.se.common.core.web.page.TableDataInfo; + +/** + * 澶栨帴搴旂敤Controller + * + * @author se + * @date 2025-04-07 + */ +@RestController +@RequestMapping("/token") +public class SysAppTokenController extends BaseController +{ + @Resource + private SysAppTokenServiceImpl sysAppTokenService; + + /** + * 鏌ヨ澶栨帴搴旂敤鍒楄〃 + */ + @RequiresPermissions("system:token:list") + @GetMapping("/list") + public TableDataInfo list(SysAppToken sysAppToken) + { + startPage(); + List<SysAppToken> list = sysAppTokenService.selectSysAppTokenList(sysAppToken); + return getDataTable(list); + } + + /** + * 瀵煎嚭澶栨帴搴旂敤鍒楄〃 + */ + @RequiresPermissions("system:token:export") + @Log(title = "澶栨帴搴旂敤", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, SysAppToken sysAppToken) + { + List<SysAppToken> list = sysAppTokenService.selectSysAppTokenList(sysAppToken); + ExcelUtil<SysAppToken> util = new ExcelUtil<SysAppToken>(SysAppToken.class); + util.exportExcel(response, list, "澶栨帴搴旂敤鏁版嵁"); + } + + /** + * 鑾峰彇澶栨帴搴旂敤璇︾粏淇℃伅 + */ + @RequiresPermissions("system:token:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(sysAppTokenService.selectSysAppTokenById(id)); + } + + /** + * 鏂板澶栨帴搴旂敤 + */ + @RequiresPermissions("system:token:add") + @Log(title = "澶栨帴搴旂敤", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody SysAppToken sysAppToken) + { + return toAjax(sysAppTokenService.insertSysAppToken(sysAppToken)); + } + + /** + * 淇敼澶栨帴搴旂敤 + */ + @RequiresPermissions("system:token:edit") + @Log(title = "澶栨帴搴旂敤", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody SysAppToken sysAppToken) + { + return toAjax(sysAppTokenService.updateSysAppToken(sysAppToken)); + } + + /** + * 鍒犻櫎澶栨帴搴旂敤 + */ + @RequiresPermissions("system:token:remove") + @Log(title = "澶栨帴搴旂敤", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(sysAppTokenService.deleteSysAppTokenByIds(ids)); + } +} -- Gitblit v1.9.3