|
@ -0,0 +1,35 @@
|
|
|
|
package com.yihu.wlyy.web.wx;
|
|
|
|
|
|
|
|
import com.yihu.wlyy.service.weixin.openid.WxOpenidTempService;
|
|
|
|
import com.yihu.wlyy.web.WeixinBaseController;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.http.MediaType;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Created by Trick on 2018/6/28
|
|
|
|
*/
|
|
|
|
@RestController
|
|
|
|
@RequestMapping(value = "/wx/Openid", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
|
|
|
@Api(description = "微信openid相关接口")
|
|
|
|
public class OpenidController extends WeixinBaseController {
|
|
|
|
@Autowired
|
|
|
|
private WxOpenidTempService wxOpenidTempService;
|
|
|
|
|
|
|
|
@ApiOperation(value = "微信小程序下载用户openid")
|
|
|
|
@RequestMapping(value = "/loadWeChatOpenIDList", method = RequestMethod.POST)
|
|
|
|
public String loadWeChatOpenIDList(){
|
|
|
|
try {
|
|
|
|
return write(200, "请求成功", "data", wxOpenidTempService.loadWeChatOpenIDList());
|
|
|
|
}catch (Exception e){
|
|
|
|
error(e);
|
|
|
|
return error(-1, "失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|