Skip to content

Commit

Permalink
Spotless Apply
Browse files Browse the repository at this point in the history
  • Loading branch information
Zzm0809 authored and github-actions[bot] committed Dec 18, 2023
1 parent 652cdd8 commit 9351d0f
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ public class WeChatConstants extends AlertBaseConstant {
/** WeChat alert baseconstant */
public static final String WECHAT_PUSH_URL = "%s/message/send?access_token=%s";

public static final String WECHAT_TOKEN_URL =
"%s/gettoken?corpid=%s&corpsecret=%s";
public static final String WECHAT_TOKEN_URL = "%s/gettoken?corpid=%s&corpsecret=%s";
public static final String CORP_ID = "corpId";
public static final String TEAM_SEND_MSG = "teamSendMsg";
public static final String AGENT_ID = "agentId";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,11 @@ public class WeChatSender {
if (wechatParams.getSendType().equals(WeChatType.CHAT.getValue())) {
requireNonNull(wechatParams.getWebhook(), WeChatConstants.WEB_HOOK + " must not null");
}
weChatTokenUrlReplace =
String.format(WeChatConstants.WECHAT_TOKEN_URL,wechatParams.getSendUrl(), wechatParams.getCorpId(), wechatParams.getSecret());
weChatTokenUrlReplace = String.format(
WeChatConstants.WECHAT_TOKEN_URL,
wechatParams.getSendUrl(),
wechatParams.getCorpId(),
wechatParams.getSecret());
}

/**
Expand Down Expand Up @@ -99,7 +102,7 @@ public AlertResult send(String content) {
if (WeChatType.APP.getValue().equals(wechatParams.getSendType())) {
String token = getToken();
assert token != null;
url = String.format(WeChatConstants.WECHAT_PUSH_URL,wechatParams.getSendUrl(), token);
url = String.format(WeChatConstants.WECHAT_PUSH_URL, wechatParams.getSendUrl(), token);
} else {
url = wechatParams.getWebhook();
}
Expand Down
3 changes: 2 additions & 1 deletion dinky-web/src/locales/en-US/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,8 @@ export default {
'rc.ai.sendUrl': 'QiWei Send Addr',
'rc.ai.sendUrlPleaseHolder': 'Please enter the sending address or the proxy address',
'rc.ai.sendUrlValidate': 'Please enter the correct sending address, no / is required at the end',
'rc.ai.sendUrlTooltip': 'You can enter the proxy address for the sending address, such as: http://127.0.0.1:8080/cgi-bin, the default is: https://qyapi.weixin.qq.com/cgi-bin ',
'rc.ai.sendUrlTooltip':
'You can enter the proxy address for the sending address, such as: http://127.0.0.1:8080/cgi-bin, the default is: https://qyapi.weixin.qq.com/cgi-bin ',
'rc.ai.apikey': 'Account unique identifier',
'rc.ai.apikeyPleaseHolder': 'Please enter the unique ID of the account',
'rc.ai.appId': 'App ID',
Expand Down
3 changes: 2 additions & 1 deletion dinky-web/src/locales/zh-CN/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,8 @@ export default {
'rc.ai.sendUrl': '企微发送地址',
'rc.ai.sendUrlPleaseHolder': '请输入发送地址可输入代理地址',
'rc.ai.sendUrlValidate': '请输入正确的发送地址,末尾不需要带 /',
'rc.ai.sendUrlTooltip': '发送地址可输入代理地址,如:http://127.0.0.1:8080/cgi-bin ,默认为:https://qyapi.weixin.qq.com/cgi-bin',
'rc.ai.sendUrlTooltip':
'发送地址可输入代理地址,如:http://127.0.0.1:8080/cgi-bin ,默认为:https://qyapi.weixin.qq.com/cgi-bin',
'rc.ai.apikey': '账号唯一标识',
'rc.ai.apikeyPleaseHolder': '请输入账号唯一标识',
'rc.ai.appId': '应用 ID',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const WeChat = (props: WeChatProps) => {
if (!value) {
return Promise.reject(l('rc.ai.sendUrlPleaseHolder'));
}
if(value.endsWith('/')){
if (value.endsWith('/')) {
return Promise.reject(l('rc.ai.sendUrlValidate'));
}
}
Expand Down Expand Up @@ -155,13 +155,13 @@ const WeChat = (props: WeChatProps) => {
placeholder={l('rc.ai.agentIdPleaseHolder')}
/>
<ProFormText
width='xl'
name={['params', 'sendUrl']}
label={l('rc.ai.sendUrl')}
tooltip={l('rc.ai.sendUrlTooltip')}
initialValue={'https://qyapi.weixin.qq.com/cgi-bin'}
rules={validateRulesWeChatSendUrl}
placeholder={l('rc.ai.sendUrlPleaseHolder')}
width='xl'
name={['params', 'sendUrl']}
label={l('rc.ai.sendUrl')}
tooltip={l('rc.ai.sendUrlTooltip')}
initialValue={'https://qyapi.weixin.qq.com/cgi-bin'}
rules={validateRulesWeChatSendUrl}
placeholder={l('rc.ai.sendUrlPleaseHolder')}
/>
</>
)
Expand Down

0 comments on commit 9351d0f

Please sign in to comment.