Commit 441ebbed by 徐高华

群群发

parent 3bd8ad4f
package com.gic.haoban.manage.api.enums.chat;
public enum PlanSendStatusEnum {
FAIL(0, "失败"),
TO_BE_SEND(1, "待发送"),
SENDED(2, "禁用");
private int code;
private String name;
private PlanSendStatusEnum(int code, String name) {
this.code = code;
this.name = name;
}
public int getCode() {
return code;
}
public String getName() {
return name;
}
public void setCode(int code) {
this.code = code;
}
public void setName(String name) {
this.name = name;
}
}
...@@ -37,6 +37,7 @@ import com.gic.haoban.manage.api.dto.chat.GroupChatPlanLogDTO; ...@@ -37,6 +37,7 @@ import com.gic.haoban.manage.api.dto.chat.GroupChatPlanLogDTO;
import com.gic.haoban.manage.api.dto.chat.GroupChatPlanOwnerLogDTO; import com.gic.haoban.manage.api.dto.chat.GroupChatPlanOwnerLogDTO;
import com.gic.haoban.manage.api.dto.qdto.chat.GroupChatPlanSearchQDTO; import com.gic.haoban.manage.api.dto.qdto.chat.GroupChatPlanSearchQDTO;
import com.gic.haoban.manage.api.enums.PendingTaskTypeEnum; import com.gic.haoban.manage.api.enums.PendingTaskTypeEnum;
import com.gic.haoban.manage.api.enums.chat.PlanSendStatusEnum;
import com.gic.haoban.manage.service.config.Config; import com.gic.haoban.manage.service.config.Config;
import com.gic.haoban.manage.service.dao.mapper.StaffMapper; import com.gic.haoban.manage.service.dao.mapper.StaffMapper;
import com.gic.haoban.manage.service.dao.mapper.chat.GroupChatPlanLogMapper; import com.gic.haoban.manage.service.dao.mapper.chat.GroupChatPlanLogMapper;
...@@ -218,10 +219,10 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService { ...@@ -218,10 +219,10 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
if (sendResp.isSuccess()) { if (sendResp.isSuccess()) {
String msgid = sendResp.getResult(); String msgid = sendResp.getResult();
ownerLog.setMsgid(msgid); ownerLog.setMsgid(msgid);
ownerLog.setSendStatus(2); ownerLog.setSendStatus(PlanSendStatusEnum.TO_BE_SEND.getCode());
} else { } else {
ownerLog.setRemark(sendResp.getMessage()); ownerLog.setRemark(sendResp.getMessage());
ownerLog.setSendStatus(0); ownerLog.setSendStatus(PlanSendStatusEnum.FAIL.getCode());
} }
ownerLog.setWxEnterpriseId(wxEnterpriseId); ownerLog.setWxEnterpriseId(wxEnterpriseId);
this.groupChatPlanOwnerLogService.update(ownerLog); this.groupChatPlanOwnerLogService.update(ownerLog);
...@@ -230,7 +231,6 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService { ...@@ -230,7 +231,6 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
this.savePendTask(dto, plan); this.savePendTask(dto, plan);
} }
} }
} }
} }
...@@ -314,11 +314,11 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService { ...@@ -314,11 +314,11 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
if (item.getStatus() == 1) { if (item.getStatus() == 1) {
sendCount++; sendCount++;
// 已发送 // 已发送
entity.setSendStatus(2); entity.setSendStatus(PlanSendStatusEnum.SENDED.getCode());
} else { } else {
failCount++; failCount++;
// 发送失败 // 发送失败
entity.setSendStatus(0); entity.setSendStatus(PlanSendStatusEnum.FAIL.getCode());
} }
entity.setLogId(UniqueIdUtils.uniqueLong()); entity.setLogId(UniqueIdUtils.uniqueLong());
entity.setPlanId(ownerLog.getPlanId()); entity.setPlanId(ownerLog.getPlanId());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment