LoginController.java 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. package com.yihu.jw.controller.login;
  2. import com.yihu.jw.commnon.wlyy.PatientContants;
  3. import com.yihu.jw.restmodel.common.Envelop;
  4. import com.yihu.jw.version.ApiVersion;
  5. import io.swagger.annotations.Api;
  6. import io.swagger.annotations.ApiOperation;
  7. import io.swagger.annotations.ApiParam;
  8. import org.springframework.beans.factory.annotation.Autowired;
  9. import org.springframework.cloud.sleuth.Tracer;
  10. import org.springframework.http.MediaType;
  11. import org.springframework.web.bind.annotation.*;
  12. /**
  13. * Created by chenweida on 2017/6/16.
  14. */
  15. @RestController
  16. @Api(value = "登陆相关操作", description = "登陆相关操作")
  17. public class LoginController {
  18. @Autowired
  19. private Tracer tracer;
  20. @GetMapping(value = "/doctorlogin", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
  21. @ApiOperation(value = "医生登陆", notes = "医生登陆")
  22. public Envelop doctorlogin(
  23. @ApiParam(name = "account", value = "账号", defaultValue = "") @RequestParam(name = "account", required = true) String account,
  24. @ApiParam(name = "password", value = "密码", defaultValue = "") @RequestParam(name = "password", required = true) String password,
  25. @ApiParam(name = "type", value = "登陆方式(默认1):1账号密码 2账号验证码", defaultValue = "") @RequestParam(name = "type", required = true, defaultValue = "1") Integer type) throws Exception {
  26. //获取用户信息
  27. //判断用户是否存在
  28. //判断密码是否正确
  29. //获取用户的版本信息
  30. //获取用户的模块信息
  31. //用户登陆的信息放入缓存中
  32. //保存登陆日志
  33. return null;
  34. }
  35. @GetMapping(value = "/employLogin", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
  36. @ApiOperation(value = "患者登陆", notes = "患者登陆")
  37. public Envelop employLogin(
  38. @ApiParam(name = "account", value = "账号", defaultValue = "") @RequestParam(name = "account", required = true) String account,
  39. @ApiParam(name = "password", value = "密码", defaultValue = "") @RequestParam(name = "password", required = true) String password,
  40. @ApiParam(name = "type", value = "登陆方式(默认1):1账号密码 2账号验证码", defaultValue = "") @RequestParam(name = "type", required = true, defaultValue = "1") Integer type) throws Exception {
  41. //获取用户信息
  42. //判断用户是否存在
  43. //判断密码是否正确
  44. //获取用户的版本信息
  45. //用户登陆的信息放入缓存中
  46. //保存登陆日志
  47. return null;
  48. }
  49. }