MoneyAccountController.java 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. package com.dk.mdm.controller.mst;
  2. import com.dk.common.model.pojo.PageList;
  3. import com.dk.common.response.ResponseResultVO;
  4. import com.dk.mdm.model.pojo.mst.MoneyAccount;
  5. import com.dk.common.service.BaseService;
  6. import com.dk.mdm.model.query.mst.MoneyAccountQuery;
  7. import com.dk.mdm.model.response.mst.MoneyAccountResponse;
  8. import com.dk.mdm.model.vo.mst.MoneyAccountVO;
  9. import io.swagger.annotations.ApiOperation;
  10. import org.springframework.web.bind.annotation.*;
  11. import org.springframework.beans.factory.annotation.Autowired;
  12. import io.swagger.annotations.Api;
  13. import com.dk.mdm.service.mst.MoneyAccountService;
  14. import java.util.List;
  15. import java.util.Map;
  16. @Api(tags = "资金账户API接口")
  17. @RestController
  18. @RequestMapping("/mst/moneyAccount")
  19. public class MoneyAccountController{
  20. public BaseService<MoneyAccount> getService() {
  21. return moneyAccountService;
  22. }
  23. @Autowired
  24. private MoneyAccountService moneyAccountService;
  25. /**
  26. * @desc : 条件查询
  27. * @author : 宋扬
  28. * @date : 2023/2/29 10:36
  29. */
  30. @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
  31. @PostMapping({"list_by"})
  32. public ResponseResultVO<PageList<MoneyAccountResponse>> selectByCond(@RequestBody MoneyAccountQuery moneyAccountQuery) {
  33. return moneyAccountService.selectByCond(moneyAccountQuery);
  34. }
  35. /**
  36. * @desc : 维修小程序查询
  37. * @author : 王英杰
  38. * @date : 2023/2/29 10:36
  39. */
  40. @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
  41. @PostMapping({"wx_list_by"})
  42. public ResponseResultVO<Map<String, Object>> wxSelectByCond(@RequestBody MoneyAccountQuery moneyAccountQuery) {
  43. return moneyAccountService.wxSelectByCond(moneyAccountQuery);
  44. }
  45. /**
  46. * @desc : 通过ID查询
  47. * @author : 宋扬
  48. * @date : 2024/3/1 16:01
  49. */
  50. @PostMapping({"/{id}"})
  51. public ResponseResultVO selectById(@PathVariable String id) {
  52. return moneyAccountService.selectById(id);
  53. }
  54. /**
  55. * @desc : 新建资金账户
  56. * @author : 宋扬
  57. * @date : 2023/2/29 10:48
  58. */
  59. @ApiOperation(value = "新建资金账户", notes = "新建资金账户")
  60. @PostMapping({"insert"})
  61. public ResponseResultVO<?> insert(@RequestBody MoneyAccountVO moneyAccountVO) {
  62. return moneyAccountService.insert(moneyAccountVO);
  63. }
  64. /**
  65. * @desc : 编辑员工
  66. * @author : 宋扬
  67. * @date : 2023/2/29 10:49
  68. */
  69. @ApiOperation(value = "编辑资金账户", notes = "编辑资金账户")
  70. @PostMapping({"update"})
  71. public ResponseResultVO<Boolean> update(@RequestBody MoneyAccountVO moneyAccountVO) {
  72. return moneyAccountService.update(moneyAccountVO);
  73. }
  74. /**
  75. * @desc : 批量启用
  76. * @author : 周兴
  77. * @date : 2023/3/7 10:34
  78. */
  79. @ApiOperation(value = "批量启用", notes = "批量启用")
  80. @PostMapping("enable_batch")
  81. public ResponseResultVO<Boolean> enableBatch(@RequestBody List<String> ids) {
  82. return this.getService().enableBatch(ids);
  83. }
  84. /**
  85. * @desc : 批量停用
  86. * @author : 周兴
  87. * @date : 2023/3/7 10:34
  88. */
  89. @ApiOperation(value = "批量停用", notes = "批量停用")
  90. @PostMapping("disable_batch")
  91. public ResponseResultVO<Boolean> disableBatch(@RequestBody List<String> ids) {
  92. return this.getService().disableBatch(ids);
  93. }
  94. }