更新配置文件

1 parent 5710ac50
...@@ -25,7 +25,10 @@ import org.springframework.web.multipart.MultipartFile; ...@@ -25,7 +25,10 @@ import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Base64;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -136,9 +139,13 @@ public class WeMaterialController extends BaseController { ...@@ -136,9 +139,13 @@ public class WeMaterialController extends BaseController {
@ApiOperation("H5端发送获取素材media_id") @ApiOperation("H5端发送获取素材media_id")
public AjaxResult temporaryMaterialMediaId(String url,String type,String name) throws UnsupportedEncodingException { public AjaxResult temporaryMaterialMediaId(String url,String type,String name) throws UnsupportedEncodingException {
// Base64.Encoder encoder = Base64.getEncoder();
// byte[] textByte = name.getBytes("UTF-8");
// String encodedText = encoder.encodeToString(textByte);
WeMediaDto weMediaDto = materialService.uploadTemporaryMaterial(url, WeMediaDto weMediaDto = materialService.uploadTemporaryMaterial(url,
type type
,new String(name.getBytes(),"UTF-8")); , name+"."+url .substring( url .lastIndexOf(".") + 1, url.length()));
return AjaxResult.success(weMediaDto); return AjaxResult.success(weMediaDto);
} }
......
...@@ -10,21 +10,16 @@ ruoyi: ...@@ -10,21 +10,16 @@ ruoyi:
editPwd: false editPwd: false
# 实例演示开关 # 实例演示开关
demoEnabled: true demoEnabled: true
# 是否开启文件云上传(使用的是腾讯云,如果开启了,则需要配置腾讯云存储相关信息;如果关闭了则文件存储再本地,需要配置本地路径) # 目前只支持腾讯云上传
file: file:
startCosUpload: true startCosUpload: true
#如果startCosUpload为false时必须设置,则文件资源放在本地服务器上,该配置为文件访问前缀,配置到nginx上可以直接访问
imgUrlPrefix: /lwImg
#腾讯云对象存储 #腾讯云对象存储
cos: cos:
secretId: AKIDQRCizIeUGl13vakkDQMH0VkjhPr1rBBv secretId:
secretKey: e3D8oFetseC0f8OX9XeV7UcTDiyyQ8cr secretKey:
#link-wechat-1251309172.cos.ap-nanjing.myqcloud.com region:
region: ap-nanjing bucketName:
bucketName: link-wechat-1251309172 cosImgUrlPrefix:
cosImgUrlPrefix: https://link-wechat-1251309172.cos.ap-nanjing.myqcloud.com/
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /app/project/pic)
profile: /app/pic
# 获取ip地址开关 # 获取ip地址开关
addressEnabled: true addressEnabled: true
# 验证码类型 math 数组计算 char 字符验证 # 验证码类型 math 数组计算 char 字符验证
...@@ -93,10 +88,10 @@ logging: ...@@ -93,10 +88,10 @@ logging:
#H5地址路径 #H5地址路径
H5: H5:
domainPrefix: http://linkwechat.cn/ domainPrefix: http://demo.linkwechat.cn/
url: http://h5.linkwechat.cn/index.html url: http://h5.linkwechat.cn/index.html
fissionUrl: http://h5.linkwechat.cn/index.html?fissionId={}&fissionTargetId={}&posterId={} #任务宝访问链 fissionUrl: http://demo.linkwechat.cn/taskMobile/index.html?fissionId={}&fissionTargetId={}&posterId={} #任务宝
fissionGroupUrl: http://h5.linkwechat.cn/fission.html fissionGroupUrl: http://demo.linkwechat.cn/taskMobile/fission.html?fissionId={}&recordId={} #群裂变
# Spring配置 # Spring配置
spring: spring:
# 资源信息 # 资源信息
...@@ -271,5 +266,5 @@ wecome: ...@@ -271,5 +266,5 @@ wecome:
welcome-msg-default: "您好,欢迎关注LinkWechat,如果对您有帮助,麻烦在码云上帮我们点个star,谢谢!" welcome-msg-default: "您好,欢迎关注LinkWechat,如果对您有帮助,麻烦在码云上帮我们点个star,谢谢!"
weixin: weixin:
appid:
secret:
\ No newline at end of file \ No newline at end of file
appid: #公众号appid
secret: #公众号密钥
\ No newline at end of file \ No newline at end of file
linkwechat.nacos.host= linkwechat.nacos.host=120.79.64.17
linkwechat.nacos.port=10848 linkwechat.nacos.port=10848
linkwechat.nacos.namespace= linkwechat.nacos.namespace=1cc3943c-fed8-46e6-907e-2d52b72044a5
linkwechat.nacos.username= linkwechat.nacos.username=nacos
linkwechat.nacos.password= linkwechat.nacos.password=0p-0p-0p-
...@@ -40,6 +40,7 @@ public interface WeMediaClient { ...@@ -40,6 +40,7 @@ public interface WeMediaClient {
/** /**
* 上传附件资源 * 上传附件资源
* Inputstream 对象 * Inputstream 对象
......
...@@ -138,7 +138,7 @@ public class WeMessagePushServiceImpl implements IWeMessagePushService { ...@@ -138,7 +138,7 @@ public class WeMessagePushServiceImpl implements IWeMessagePushService {
if(StringUtils.isNotEmpty(REDIRECT_URI)){ if(StringUtils.isNotEmpty(REDIRECT_URI)){
String context = String.format( String context = String.format(
textContent+"<a href='%s?appid=%s&redirect_uri=%s&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect'>请点击此链接查看</a>", textContent+"<br><a href='%s?appid=%s&redirect_uri=%s&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect'>请点击此链接查看</a>",
validWeCorpAccount.getAuthorizeUrl(), corpId, REDIRECT_URI); validWeCorpAccount.getAuthorizeUrl(), corpId, REDIRECT_URI);
text.setContent(context); text.setContent(context);
pushDto.setText(text); pushDto.setText(text);
......
...@@ -207,6 +207,8 @@ public class WeMomentsServiceImpl extends ServiceImpl<WeMomentsMapper, WeMoments ...@@ -207,6 +207,8 @@ public class WeMomentsServiceImpl extends ServiceImpl<WeMomentsMapper, WeMoments
} }
MomentsParamDto.VisibleRange visibleRange MomentsParamDto.VisibleRange visibleRange
= MomentsParamDto.VisibleRange.builder().build(); = MomentsParamDto.VisibleRange.builder().build();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!