Commit e7b6d2cd by 18356073052

fix some bug

1 parent 1d60b09d
......@@ -97,7 +97,7 @@ public class WeCustomerMessagePushController extends BaseController {
/**
* 同步消息发送结果
*/
//@PreAuthorize("@ss.hasPermi('customerMessagePush:push:asyncResult')")
@PreAuthorize("@ss.hasPermi('customerMessagePush:push:asyncResult')")
@PostMapping(value = "asyncResult")
public AjaxResult asyncResult(@RequestBody AsyncResultDto asyncResultDto) throws JsonProcessingException {
weCustomerMessageOriginalService.asyncResult(asyncResultDto);
......
......@@ -319,6 +319,48 @@ public class WeConstans {
}
public static enum sendMessageStatusEnum {
NOT_SEND("0", "未发送"),
SEND("1","已发送"),
NOT_FRIEND_SEND("2","因客户不是好友导致发送失败"),
RECEIVE_OTHER_MESSAGE("3","-因客户已经收到其他群发消息导致发送失败"),
;
private String status;
private String desc;
/**
* 构造方法
*
* @param status
* @param desc
*/
sendMessageStatusEnum(String status, String desc) {
this.setStatus(status);
this.setDesc(desc);
}
public String getStatus() {
return status;
}
public void setStatus(String key) {
this.status = status;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
}
public static final String WECOM_FINANCE_INDEX = "finance";
public static final String WECOM_SENSITIVE_HIT_INDEX = "sensitive";
......
......@@ -66,10 +66,10 @@ public class WeCustomerMessageOriginalServiceImpl extends ServiceImpl<WeCustomer
CustomerMessagePushVo customerMessagePushDetail = weCustomerMessageOriginalMapper.findCustomerMessagePushDetail(messageId);
//检查是否已经同步发送结果
if( weCustomerMessgaeResultMapper.checkSendStatus(messageId)==0){
//拉取消息发送结果
CompletableFuture.runAsync(() -> syncSendResult(customerMessagePushDetail.getMsgid(), messageId));
}
if( weCustomerMessgaeResultMapper.checkSendStatus(messageId)==0){
//拉取消息发送结果
CompletableFuture.runAsync(() -> syncSendResult(customerMessagePushDetail.getMsgid(), messageId));
}
return customerMessagePushDetail;
}
......@@ -117,7 +117,7 @@ public class WeCustomerMessageOriginalServiceImpl extends ServiceImpl<WeCustomer
detailList.forEach(d -> {
if (d.getStatus().equals("1")) {
if (d.getStatus().equals(WeConstans.sendMessageStatusEnum.SEND.getStatus())) {
atomicInteger.incrementAndGet();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!