CompanyController.java 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. package com.dk.oauth.controller;
  2. import com.dk.common.response.ResponseResultVO;
  3. import com.dk.oauth.entity.Company;
  4. import com.dk.oauth.service.ICompanyService;
  5. import io.swagger.annotations.Api;
  6. import io.swagger.annotations.ApiOperation;
  7. import org.slf4j.Logger;
  8. import org.slf4j.LoggerFactory;
  9. import org.springframework.beans.factory.annotation.Autowired;
  10. import org.springframework.web.bind.annotation.*;
  11. @Api(tags = "企业API接口")
  12. @RestController
  13. @RequestMapping("/company")
  14. public class CompanyController {
  15. private final Logger logger = LoggerFactory.getLogger(this.getClass());
  16. /**
  17. * 服务对象
  18. */
  19. @Autowired
  20. private ICompanyService companyService;
  21. /**
  22. * @desc : 通过ID查询
  23. * @author : admin
  24. * @date : 2023/2/3 13:32
  25. */
  26. @PostMapping({"{id}"})
  27. public ResponseResultVO<?> selectById(@PathVariable Integer id) {
  28. return companyService.selectById(id);
  29. }
  30. /**
  31. * @desc : 注册商户
  32. * @author : admin
  33. * @date : 2024/2/1 14:55
  34. */
  35. @ApiOperation( value = "注册商户", notes = "注册商户" )
  36. @PostMapping({"register_company"})
  37. public ResponseResultVO<?> registerCompany(@RequestBody Company company) {
  38. return companyService.registerCompany(company);
  39. }
  40. }