|
@ -206,28 +206,29 @@ public class WarrantServiceImpl implements WarrantService { |
|
|
public void dingDingRobot(String result,String event,String customerName,String clientType){ |
|
|
public void dingDingRobot(String result,String event,String customerName,String clientType){ |
|
|
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/robot/send?access_token=5b48fcbc3fde24b8ba4696aa062b7f8146479a9d3467dbb1f9cf132ec36b955a"); |
|
|
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/robot/send?access_token=5b48fcbc3fde24b8ba4696aa062b7f8146479a9d3467dbb1f9cf132ec36b955a"); |
|
|
OapiRobotSendRequest request = new OapiRobotSendRequest(); |
|
|
OapiRobotSendRequest request = new OapiRobotSendRequest(); |
|
|
request.setMsgtype("text"); |
|
|
request.setMsgtype("markdown"); |
|
|
OapiRobotSendRequest.Text text = new OapiRobotSendRequest.Text(); |
|
|
OapiRobotSendRequest.Markdown markdown = new OapiRobotSendRequest.Markdown(); |
|
|
|
|
|
markdown.setTitle("代码审核结果"); |
|
|
switch (event){ |
|
|
switch (event){ |
|
|
case ModuleConstant.WEAPP_AUDIT_SUCCESS: |
|
|
case ModuleConstant.WEAPP_AUDIT_SUCCESS: |
|
|
text.setContent("代码审核结果: 审核成功\n"+ |
|
|
markdown.setText("代码审核结果: 审核成功\n"+ |
|
|
"客户名称:" + customerName +"\n"+ |
|
|
"> 客户名称:" + customerName +"\n\n"+ |
|
|
"客户端:"+clientType+"\n"); |
|
|
"> 客户端:"+clientType+"\n"); |
|
|
break; |
|
|
break; |
|
|
case ModuleConstant.WEAPP_AUDIT_FAIL: |
|
|
case ModuleConstant.WEAPP_AUDIT_FAIL: |
|
|
text.setContent("代码审核结果: 审核不通过\n"+ |
|
|
markdown.setText("代码审核结果: 审核不通过\n"+ |
|
|
"客户名称:" + customerName +"\n"+ |
|
|
"> 客户名称:" + customerName +"\n\n"+ |
|
|
"客户端:"+clientType+"\n"+ |
|
|
"> 客户端:"+clientType+"\n\n"+ |
|
|
"不通过原因:"+result); |
|
|
"> 不通过原因:"+result); |
|
|
break; |
|
|
break; |
|
|
case ModuleConstant.WEAPP_AUDIT_DELAY: |
|
|
case ModuleConstant.WEAPP_AUDIT_DELAY: |
|
|
text.setContent("代码审核结果: 审核延时\n"+ |
|
|
markdown.setText("代码审核结果: 审核延时\n"+ |
|
|
"客户名称:" + customerName +"\n"+ |
|
|
"> 客户名称:" + customerName +"\n\n"+ |
|
|
"客户端:"+clientType+"\n"+ |
|
|
"> 客户端:"+clientType+"\n\n"+ |
|
|
"延时原因:"+result); |
|
|
"> 延时原因:"+result); |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
request.setText(text); |
|
|
request.setMarkdown(markdown); |
|
|
try { |
|
|
try { |
|
|
OapiRobotSendResponse response = client.execute(request); |
|
|
OapiRobotSendResponse response = client.execute(request); |
|
|
} catch (ApiException e) { |
|
|
} catch (ApiException e) { |
|
|