From 8f2d9c337abf638b943b873bcbfa06c871088f0a Mon Sep 17 00:00:00 2001 From: renjianbo <18691577328@163.com> Date: Sun, 17 May 2026 01:13:01 +0800 Subject: [PATCH] feat: add certification approve/reject with enhanced UI (#18) - Add PUT /approve/{id} and PUT /reject/{id} endpoints - Add state filter dropdown (pending/approved/rejected) - Add colored status tags and approve/reject action buttons - Add reject reason dialog and detail view with image previews Co-Authored-By: Claude Opus 4.6 --- rlz-ui/src/api/system/renzheng.js | 105 ++-- rlz-ui/src/views/system/renzheng/index.vue | 568 ++++++++---------- .../controller/SysUserRenzhengController.java | 34 ++ 3 files changed, 342 insertions(+), 365 deletions(-) diff --git a/rlz-ui/src/api/system/renzheng.js b/rlz-ui/src/api/system/renzheng.js index c85c8fb..1a91b25 100644 --- a/rlz-ui/src/api/system/renzheng.js +++ b/rlz-ui/src/api/system/renzheng.js @@ -1,44 +1,61 @@ -import request from '@/utils/request' - -// 查询renzheng列表 -export function listRenzheng(query) { - return request({ - url: '/system/renzheng/list', - method: 'get', - params: query - }) -} - -// 查询renzheng详细 -export function getRenzheng(id) { - return request({ - url: '/system/renzheng/' + id, - method: 'get' - }) -} - -// 新增renzheng -export function addRenzheng(data) { - return request({ - url: '/system/renzheng', - method: 'post', - data: data - }) -} - -// 修改renzheng -export function updateRenzheng(data) { - return request({ - url: '/system/renzheng', - method: 'put', - data: data - }) -} - -// 删除renzheng -export function delRenzheng(id) { - return request({ - url: '/system/renzheng/' + id, - method: 'delete' - }) -} +import request from '@/utils/request' + +// 查询renzheng列表 +export function listRenzheng(query) { + return request({ + url: '/system/renzheng/list', + method: 'get', + params: query + }) +} + +// 查询renzheng详细 +export function getRenzheng(id) { + return request({ + url: '/system/renzheng/' + id, + method: 'get' + }) +} + +// 新增renzheng +export function addRenzheng(data) { + return request({ + url: '/system/renzheng', + method: 'post', + data: data + }) +} + +// 修改renzheng +export function updateRenzheng(data) { + return request({ + url: '/system/renzheng', + method: 'put', + data: data + }) +} + +// 删除renzheng +export function delRenzheng(id) { + return request({ + url: '/system/renzheng/' + id, + method: 'delete' + }) +} + +// 审核通过 +export function approveRenzheng(id) { + return request({ + url: '/system/renzheng/approve/' + id, + method: 'put' + }) +} + +// 审核驳回 +export function rejectRenzheng(id, juejuereson) { + return request({ + url: '/system/renzheng/reject/' + id, + method: 'put', + data: { juejuereson } + }) +} diff --git a/rlz-ui/src/views/system/renzheng/index.vue b/rlz-ui/src/views/system/renzheng/index.vue index 8848240..ba542b3 100644 --- a/rlz-ui/src/views/system/renzheng/index.vue +++ b/rlz-ui/src/views/system/renzheng/index.vue @@ -1,321 +1,247 @@ - - - + + + diff --git a/rlz/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUserRenzhengController.java b/rlz/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUserRenzhengController.java index 1407483..de3a6ea 100644 --- a/rlz/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUserRenzhengController.java +++ b/rlz/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUserRenzhengController.java @@ -34,6 +34,40 @@ public class SysUserRenzhengController extends BaseController @Autowired private ISysUserRenzhengService sysUserRenzhengService; + /** + * 审核通过 + */ + @Log(title = "认证审核", businessType = BusinessType.UPDATE) + @PutMapping("/approve/{id}") + public AjaxResult approve(@PathVariable Long id) + { + SysUserRenzheng renzheng = sysUserRenzhengService.selectSysUserRenzhengById(id); + if (renzheng == null) + { + return AjaxResult.error("认证记录不存在"); + } + renzheng.setState("1"); + renzheng.setJuejuereson(null); + return toAjax(sysUserRenzhengService.updateSysUserRenzheng(renzheng)); + } + + /** + * 审核驳回 + */ + @Log(title = "认证审核", businessType = BusinessType.UPDATE) + @PutMapping("/reject/{id}") + public AjaxResult reject(@PathVariable Long id, @RequestBody SysUserRenzheng req) + { + SysUserRenzheng renzheng = sysUserRenzhengService.selectSysUserRenzhengById(id); + if (renzheng == null) + { + return AjaxResult.error("认证记录不存在"); + } + renzheng.setState("2"); + renzheng.setJuejuereson(req.getJuejuereson()); + return toAjax(sysUserRenzhengService.updateSysUserRenzheng(renzheng)); + } + /** * 查询renzheng列表 */