OrderPossessUserController.java 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. package com.zhongzheng.controller.user;
  2. import java.util.List;
  3. import java.util.Arrays;
  4. import com.zhongzheng.common.utils.ServletUtils;
  5. import com.zhongzheng.framework.web.service.WxTokenService;
  6. import com.zhongzheng.modules.user.bo.OrderPossessUserQueryBo;
  7. import com.zhongzheng.modules.user.entity.ClientLoginUser;
  8. import com.zhongzheng.modules.user.service.IOrderPossessUserService;
  9. import com.zhongzheng.modules.user.vo.OrderPossessUserVo;
  10. import lombok.RequiredArgsConstructor;
  11. import org.springframework.security.access.prepost.PreAuthorize;
  12. import org.springframework.beans.factory.annotation.Autowired;
  13. import org.springframework.web.bind.annotation.GetMapping;
  14. import org.springframework.web.bind.annotation.PostMapping;
  15. import org.springframework.web.bind.annotation.PutMapping;
  16. import org.springframework.web.bind.annotation.DeleteMapping;
  17. import org.springframework.web.bind.annotation.PathVariable;
  18. import org.springframework.web.bind.annotation.RequestBody;
  19. import org.springframework.web.bind.annotation.RequestMapping;
  20. import org.springframework.web.bind.annotation.RestController;
  21. import com.zhongzheng.common.annotation.Log;
  22. import com.zhongzheng.common.core.controller.BaseController;
  23. import com.zhongzheng.common.core.domain.AjaxResult;
  24. import com.zhongzheng.common.enums.BusinessType;
  25. import com.zhongzheng.common.utils.poi.ExcelUtil;
  26. import com.zhongzheng.common.core.page.TableDataInfo;
  27. import io.swagger.annotations.Api;
  28. import io.swagger.annotations.ApiOperation;
  29. /**
  30. * 【请填写功能名称】Controller
  31. *
  32. * @author ruoyi
  33. * @date 2021-06-25
  34. */
  35. @Api(value = "【用户拥有课程或题库】控制器", tags = {"【用户拥有课程或题库】管理"})
  36. @RequiredArgsConstructor(onConstructor_ = @Autowired)
  37. @RestController
  38. @RequestMapping("/system/user")
  39. public class OrderPossessUserController extends BaseController {
  40. private final IOrderPossessUserService iOrderPossessUserService;
  41. private final com.zhongzheng.framework.web.service.WxTokenService WxTokenService;
  42. /**
  43. * 查询【请填写功能名称】列表
  44. */
  45. @ApiOperation("查询【请填写功能名称】列表")
  46. @PreAuthorize("@ss.hasPermi('system:user:list')")
  47. @GetMapping("/list")
  48. public AjaxResult<OrderPossessUserVo> list(OrderPossessUserQueryBo bo) {
  49. ClientLoginUser loginUser = WxTokenService.getLoginUser(ServletUtils.getRequest());
  50. bo.setUserId(loginUser.getUser().getUserId());
  51. OrderPossessUserVo list = iOrderPossessUserService.queryList(bo);
  52. return AjaxResult.success(list);
  53. }
  54. }