You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.7 KiB

1 month ago
1 month ago
  1. package com.example.demo.controller;
  2. import com.example.demo.domain.vo.AdminVo;
  3. import com.example.demo.domain.vo.Result;
  4. import com.example.demo.service.GeneralService;
  5. import lombok.RequiredArgsConstructor;
  6. import lombok.extern.slf4j.Slf4j;
  7. import org.springframework.beans.factory.annotation.Autowired;
  8. import org.springframework.web.bind.annotation.*;
  9. import java.util.List;
  10. /**
  11. * @program: GOLD
  12. * @ClassName GeneralController
  13. * @description:
  14. * @author: huangqizhen
  15. * @create: 202506-22 10:54
  16. * @Version 1.0
  17. **/
  18. @RestController
  19. @RequestMapping("/general")
  20. @RequiredArgsConstructor
  21. @Slf4j
  22. @CrossOrigin
  23. public class GeneralController {
  24. @Autowired
  25. private GeneralService generalService;
  26. @PostMapping("/market")
  27. public Result getMarket()
  28. {
  29. List<String> list = generalService.getMarket();
  30. return Result.success(list);
  31. }
  32. //获取角色地区权限列表
  33. @PostMapping("/roleMarkets")
  34. public Result getRoleMarkets(@RequestBody AdminVo adminVo) throws Exception {
  35. String account = adminVo.getAccount();
  36. List<String> list = generalService.getRoleMarket(account);
  37. return Result.success(list);
  38. }
  39. @PostMapping("/platform")
  40. public Result getPlatform()
  41. {
  42. List<String> list = generalService.getPlatform();
  43. return Result.success(list);
  44. }
  45. //获取商品名称
  46. @PostMapping("/goods")
  47. public Result getGoods()
  48. {
  49. List<String> list = generalService.getGoods();
  50. return Result.success(list);
  51. }
  52. //获取活动名称
  53. @PostMapping("/activity")
  54. public Result getActivity()
  55. {
  56. List<String> list = generalService.getActivity();
  57. return Result.success(list);
  58. }
  59. }