| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- package com.dk.oauth.controller;
- import com.dk.common.response.ResponseResultVO;
- import com.dk.oauth.entity.Company;
- import com.dk.oauth.service.ICompanyService;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiOperation;
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.*;
- @Api(tags = "企业API接口")
- @RestController
- @RequestMapping("/company")
- public class CompanyController {
- private final Logger logger = LoggerFactory.getLogger(this.getClass());
- /**
- * 服务对象
- */
- @Autowired
- private ICompanyService companyService;
- /**
- * @desc : 通过ID查询
- * @author : admin
- * @date : 2023/2/3 13:32
- */
- @PostMapping({"{id}"})
- public ResponseResultVO<?> selectById(@PathVariable Integer id) {
- return companyService.selectById(id);
- }
- /**
- * @desc : 注册商户
- * @author : admin
- * @date : 2024/2/1 14:55
- */
- @ApiOperation( value = "注册商户", notes = "注册商户" )
- @PostMapping({"register_company"})
- public ResponseResultVO<?> registerCompany(@RequestBody Company company) {
- return companyService.registerCompany(company);
- }
- }
|