Merge branch 'master' into vip

pull/9/head
3y 2 years ago
commit 096a35ee88

@ -56,6 +56,7 @@ austin项目**核心流程**`austin-api`接收到发送消息请求,直接
目前引用的中间件教程的安装姿势均基于`Centos 7.6`(**完全部署所有的服务大概8G内存**)austin项目**强依赖**`MySQL`/`Redis`/`Kafka`/`apollo`**弱依赖**`prometheus`/`graylog`/`flink`/`xxl-job`。如果缺少相关的组件可戳:[安装相关组件教程](INSTALL.md)。
实在想要拉下clone项目后不部署环境直接启动我这提供了[会员服务](https://mp.weixin.qq.com/s?__biz=MzI4Njg5MDA5NA==&mid=2247505577&idx=1&sn=5114f8f583755899c2946fbea0b22e4b&chksm=ebd497a8dca31ebe8f98344483a00c860863dfc3586e51eed95b25988151427fee8101311f4f&token=735778370&lang=zh_CN#rd)
**1**、austin使用的MySQL版本**5.7x**。如果目前使用的MySQL版本8.0,注意改变`pom.xml`所依赖的版本
@ -141,11 +142,14 @@ curl -XPOST "127.0.0.1:8080/send" -H 'Content-Type: application/json' -d '{"co
<img align="center" src='https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/5eae548196934599a7cb3637aedf381d~tplv-k3u1fbpfcp-zoom-1.image' width=300px height=300px />
**Java3y**公众号在持续更新austin系列文章**保姆级**讲解搭建项目的过程(包括技术选型以及一些业务的探讨)以及相关环境的搭建。**扫下面的码直接关注,带你了解整个项目**
如果你需要用这个项目写在简历上,**强烈建议关注公众号看实现细节的思路**。如果⽂档中有任何的不懂的问题,都可以直接来找我询问,我乐意帮助你们!公众号下有我的联系方式
[会员服务](https://mp.weixin.qq.com/s?__biz=MzI4Njg5MDA5NA==&mid=2247505577&idx=1&sn=5114f8f583755899c2946fbea0b22e4b&chksm=ebd497a8dca31ebe8f98344483a00c860863dfc3586e51eed95b25988151427fee8101311f4f&token=735778370&lang=zh_CN#rd)
<img align="center" src='https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/4e109cdb8d064c1e87541d7b6c17957d~tplv-k3u1fbpfcp-zoom-1.image' width=300px height=300px />
## 如何准备面试?

@ -21,6 +21,7 @@ public enum IdType {
EMAIL(50, "email"),
ENTERPRISE_USER_ID(60, "enterprise_user_id"),
DING_DING_USER_ID(70, "ding_ding_user_id"),
CID(80, "cid"),
;
private Integer code;

@ -2,6 +2,7 @@ package com.java3y.austin.service.api.impl.action;
import cn.hutool.core.util.ReflectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.google.common.base.Throwables;
@ -114,7 +115,7 @@ public class AssembleAction implements BusinessProcess<SendTaskModel> {
if (StrUtil.isNotBlank(originValue)) {
String resultValue = ContentHolderUtil.replacePlaceHolder(originValue, variables);
Object resultObj = JSON.parseObject(resultValue, field.getType());
Object resultObj = JSONUtil.isJsonObj(resultValue) ? JSONUtil.toBean(resultValue, field.getType()) : resultValue;
ReflectUtil.setFieldValue(contentModel, field, resultObj);
}
}

@ -0,0 +1,46 @@
package com.java3y.austin.web.controller;
import com.java3y.austin.common.enums.ChannelType;
import com.java3y.austin.common.vo.BasicResultVO;
import com.java3y.austin.cron.handler.RefreshDingDingAccessTokenHandler;
import com.java3y.austin.cron.handler.RefreshGeTuiAccessTokenHandler;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @Author 3y
*/
@Api(tags = {"手动刷新token的接口"})
@RestController
public class RefreshTokenController {
@Autowired
private RefreshDingDingAccessTokenHandler refreshDingDingAccessTokenHandler;
@Autowired
private RefreshGeTuiAccessTokenHandler refreshGeTuiAccessTokenHandler;
/**
* TokenchannelTypecom.java3y.austin.common.enums.ChannelType
* @param channelType
* @return
*/
@ApiOperation(value = "手动刷新token", notes = "钉钉/个推 token刷新")
@GetMapping("/refresh")
public BasicResultVO refresh(Integer channelType) {
if (ChannelType.PUSH.getCode().equals(channelType)) {
refreshGeTuiAccessTokenHandler.execute();
}
if (ChannelType.DING_DING_WORK_NOTICE.getCode().equals(channelType)) {
refreshDingDingAccessTokenHandler.execute();
}
return BasicResultVO.success("刷新成功");
}
}
Loading…
Cancel
Save