12345678910111213141516171819202122232425262728293031323334 |
- package com.sooka.api;
- import com.sooka.enums.ResultEnum;
- import com.sooka.model.ResultModel;
- import com.sooka.service.AuthService;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.util.StringUtils;
- import org.springframework.web.bind.annotation.GetMapping;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RestController;
- @RestController
- @RequestMapping("/")
- public class ZsjApi {
- @Autowired
- private AuthService authService;
- // POST 增加 提交表单
- // GET 查询 获取列表信息
- // DELETE 删除
- // PUT 修改
- @GetMapping("/test")
- public ResultModel auth(String secretKey, String intCode) {
- if (StringUtils.isEmpty(secretKey) || StringUtils.isEmpty(intCode)) {
- return ResultModel.error(ResultEnum.PARAM_EMPTY);
- }
- return authService.auth(secretKey, intCode);
- }
- }
|