t push Merge branch 'master' of https://git.iwulin.tech/quyixiao/eb-service-api
This commit is contained in:
commit
14b6750a21
@ -115,6 +115,10 @@ public class WeChatUtils {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 生成小程序跳转短链 code
|
||||
* https://blog.csdn.net/weixin_44548582/article/details/131868367
|
||||
|
||||
@ -0,0 +1,49 @@
|
||||
|
||||
package com.heyu.api.controller.vv;
|
||||
|
||||
|
||||
import com.heyu.api.alibaba.request.vv.AppQrCodeRequest;
|
||||
import com.heyu.api.common.annotation.Describe;
|
||||
import com.heyu.api.data.dto.AccessTokenDTO;
|
||||
import com.heyu.api.data.utils.R;
|
||||
import com.heyu.api.data.utils.WeChatUtils;
|
||||
import com.heyu.api.oss.OssFileUploadService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/app/weixin")
|
||||
public class AppWeiXinTokenController {
|
||||
|
||||
|
||||
// 自行配置:正式版为 "release",体验版为 "trial",开发版为 "develop"。默认是正式版。
|
||||
private String envVersion = "trial";
|
||||
|
||||
|
||||
@Autowired
|
||||
private OssFileUploadService ossFileUploadService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private WeChatUtils weChatUtils;
|
||||
|
||||
/***
|
||||
* 列表
|
||||
* http://localhost:8888/app/weixin/token
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Describe("获取token")
|
||||
@RequestMapping("/token")
|
||||
public R create(@RequestBody AppQrCodeRequest request) {
|
||||
|
||||
AccessTokenDTO accessTokenDTO = weChatUtils.getAccessTokenDTO(false);
|
||||
|
||||
return R.ok().setData(accessTokenDTO);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user