UserProfileStampController.java 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. package com.zhongzheng.controller.base;
  2. import com.zhongzheng.common.annotation.Log;
  3. import com.zhongzheng.common.core.controller.BaseController;
  4. import com.zhongzheng.common.core.domain.AjaxResult;
  5. import com.zhongzheng.common.core.domain.model.LoginUser;
  6. import com.zhongzheng.common.core.page.TableDataInfo;
  7. import com.zhongzheng.common.enums.BusinessType;
  8. import com.zhongzheng.common.utils.ServletUtils;
  9. import com.zhongzheng.framework.web.service.TokenService;
  10. import com.zhongzheng.modules.base.bo.UserProfileEditBo;
  11. import com.zhongzheng.modules.base.bo.UserProfileQueryBo;
  12. import com.zhongzheng.modules.base.service.IUserProfileService;
  13. import com.zhongzheng.modules.base.vo.UserProfileVo;
  14. import io.swagger.annotations.Api;
  15. import io.swagger.annotations.ApiOperation;
  16. import lombok.RequiredArgsConstructor;
  17. import org.springframework.beans.factory.annotation.Autowired;
  18. import org.springframework.security.access.prepost.PreAuthorize;
  19. import org.springframework.web.bind.annotation.*;
  20. import java.util.List;
  21. /**
  22. * 填写资料审核Controller
  23. *
  24. * @author ruoyi
  25. * @date 2021-12-20
  26. */
  27. @Api(value = "填写盖章审核控制器", tags = {"填写盖章审核控制器"})
  28. @RequiredArgsConstructor(onConstructor_ = @Autowired)
  29. @RestController
  30. @RequestMapping("/base/profileStamp")
  31. public class UserProfileStampController extends BaseController {
  32. private final IUserProfileService iUserProfileService;
  33. private final TokenService tokenService;
  34. /**
  35. * 查询填写资料审核列表
  36. */
  37. @ApiOperation("查询填写盖章审核列表")
  38. @PreAuthorize("@ss.hasPermi('system:profile:list')")
  39. @GetMapping("/list")
  40. public TableDataInfo<UserProfileVo> list(UserProfileQueryBo bo) {
  41. startPage();
  42. bo.setTypeStatus(2L);
  43. List<UserProfileVo> list = iUserProfileService.queryList(bo);
  44. return getDataTable(list);
  45. }
  46. /**
  47. * 查询填写资料审核列表
  48. */
  49. @ApiOperation("查询填写盖章审记录列表")
  50. @PreAuthorize("@ss.hasPermi('system:profile:list')")
  51. @GetMapping("/listRecord")
  52. public TableDataInfo<UserProfileVo> listRecord(UserProfileQueryBo bo) {
  53. startPage();
  54. bo.setTypeStatus(2L);
  55. List<UserProfileVo> list = iUserProfileService.listRecord(bo);
  56. return getDataTable(list);
  57. }
  58. /**
  59. * 获取填写资料审核详细信息
  60. */
  61. @ApiOperation("获取填写盖章审核详细信息")
  62. @PreAuthorize("@ss.hasPermi('system:profile:query')")
  63. @GetMapping("/{id}")
  64. public AjaxResult<UserProfileVo> getInfo(@PathVariable("id" ) Long id) {
  65. return AjaxResult.success(iUserProfileService.queryById(id));
  66. }
  67. /**
  68. * 修改填写资料审核
  69. */
  70. @ApiOperation("审核盖章")
  71. @PreAuthorize("@ss.hasPermi('system:profile:edit')")
  72. @Log(title = "填写盖章审核", businessType = BusinessType.UPDATE)
  73. @PostMapping()
  74. public AjaxResult<Void> edit(@RequestBody UserProfileEditBo bo) {
  75. LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
  76. return toAjax(iUserProfileService.updateAuditByEditBo(bo,loginUser) ? 1 : 0);
  77. }
  78. }