提交修改
This commit is contained in:
parent
634125daa0
commit
b8db0e0fb3
@ -115,6 +115,10 @@ public class WeChatUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成小程序跳转短链 code
|
* 生成小程序跳转短链 code
|
||||||
* https://blog.csdn.net/weixin_44548582/article/details/131868367
|
* 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