GamePayWayController.java 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. package com.zanxiang.manage.controller;
  2. import com.baomidou.mybatisplus.core.metadata.IPage;
  3. import com.zanxiang.common.domain.ResultVO;
  4. import com.zanxiang.erp.security.annotation.PreAuthorize;
  5. import com.zanxiang.manage.domain.params.GamePayWayAddUpdateParam;
  6. import com.zanxiang.manage.domain.params.GamePayWayListParam;
  7. import com.zanxiang.manage.domain.vo.GamePayWayListVO;
  8. import com.zanxiang.manage.service.IGamePayWayService;
  9. import io.swagger.annotations.Api;
  10. import io.swagger.annotations.ApiOperation;
  11. import io.swagger.annotations.ApiResponse;
  12. import io.swagger.annotations.ApiResponses;
  13. import org.springframework.beans.factory.annotation.Autowired;
  14. import org.springframework.validation.annotation.Validated;
  15. import org.springframework.web.bind.annotation.*;
  16. /**
  17. * @author : lingfeng
  18. * @time : 2022-11-25
  19. * @description : 游戏支付配置管理
  20. */
  21. @Api(tags = "支付配置管理")
  22. @RestController
  23. @RequestMapping("/game/pay/way")
  24. public class GamePayWayController {
  25. @Autowired
  26. private IGamePayWayService gamePayWayService;
  27. @ApiOperation(value = "游戏支付配置新增或者更新")
  28. @PostMapping(value = "/add/or/update")
  29. @PreAuthorize(permissionKey = "manage:gamePayWay:addOrUpdate")
  30. @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
  31. public ResultVO<Boolean> addOrUpdate(@Validated @RequestBody GamePayWayAddUpdateParam param) {
  32. return new ResultVO<>(gamePayWayService.addOrUpdate(param));
  33. }
  34. @ApiOperation(value = "游戏支付配置列表查询")
  35. @PostMapping(value = "/list")
  36. @PreAuthorize(permissionKey = "manage:gamePayWay:list")
  37. @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = GamePayWayListVO.class)})
  38. public ResultVO<IPage<GamePayWayListVO>> pageList(@Validated @RequestBody GamePayWayListParam param) {
  39. return new ResultVO<>(gamePayWayService.pageList(param));
  40. }
  41. @ApiOperation(value = "游戏支付配置删除")
  42. @DeleteMapping(value = "/delete")
  43. @PreAuthorize(permissionKey = "manage:gamePayWay:delete")
  44. @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
  45. public ResultVO<Boolean> deleteById(@RequestParam Long id) {
  46. return new ResultVO<>(gamePayWayService.deleteById(id));
  47. }
  48. @ApiOperation(value = "游戏支付配置状态变更")
  49. @PatchMapping(value = "/status/update")
  50. @PreAuthorize(permissionKey = "manage:gamePayWay:statusUpdate")
  51. @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
  52. public ResultVO<Boolean> statusUpdate(@RequestParam Long id, @RequestParam Integer status) {
  53. return new ResultVO<>(gamePayWayService.statusUpdate(id, status));
  54. }
  55. }