ZsjApi.java 952 B

12345678910111213141516171819202122232425262728293031323334
  1. package com.sooka.api;
  2. import com.sooka.enums.ResultEnum;
  3. import com.sooka.model.ResultModel;
  4. import com.sooka.service.AuthService;
  5. import org.springframework.beans.factory.annotation.Autowired;
  6. import org.springframework.util.StringUtils;
  7. import org.springframework.web.bind.annotation.GetMapping;
  8. import org.springframework.web.bind.annotation.RequestMapping;
  9. import org.springframework.web.bind.annotation.RestController;
  10. @RestController
  11. @RequestMapping("/")
  12. public class ZsjApi {
  13. @Autowired
  14. private AuthService authService;
  15. // POST 增加 提交表单
  16. // GET 查询 获取列表信息
  17. // DELETE 删除
  18. // PUT 修改
  19. @GetMapping("/test")
  20. public ResultModel auth(String secretKey, String intCode) {
  21. if (StringUtils.isEmpty(secretKey) || StringUtils.isEmpty(intCode)) {
  22. return ResultModel.error(ResultEnum.PARAM_EMPTY);
  23. }
  24. return authService.auth(secretKey, intCode);
  25. }
  26. }