WechatInfoController.java 945 B

123456789101112131415161718192021222324252627282930313233
  1. package com.boman.wechat.controller;
  2. import com.boman.domain.dto.AjaxResult;
  3. import com.boman.domain.form.LoginBody;
  4. import com.boman.wechat.service.WechatService;
  5. import io.swagger.annotations.ApiOperation;
  6. import org.springframework.beans.factory.annotation.Autowired;
  7. import org.springframework.web.bind.annotation.*;
  8. /**
  9. * 微信登录验证
  10. *
  11. * @author zhong.h
  12. */
  13. @RequestMapping("/wechat/p/c")
  14. @RestController
  15. public class WechatInfoController {
  16. @Autowired
  17. private WechatService wechatService;
  18. @ApiOperation(value = "小程序相关信息获取")
  19. @RequestMapping(value = "/wechatInfo", method = RequestMethod.POST)
  20. public AjaxResult getWechatInfo(@RequestBody LoginBody loginBody) {
  21. return wechatService.getWechatInfo(loginBody);
  22. }
  23. @ApiOperation(value = "小程序模板id获取")
  24. @GetMapping("/tmpIds")
  25. public AjaxResult getTmpIds() {
  26. return wechatService.getTmpIds();
  27. }
  28. }