Commit f448d15c by 徐高华

Merge branch 'feature/社群' into 'developer'

Feature/社群

See merge request !663
parents 01dfab1b 441ebbed
......@@ -48,6 +48,7 @@ public class GroupChatHmDTO implements Serializable {
// 可以群数
private Integer usableChatCount;
public Integer getUsableChatCount() {
return usableChatCount;
}
......
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;
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.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.dao.mapper.StaffMapper;
import com.gic.haoban.manage.service.dao.mapper.chat.GroupChatPlanLogMapper;
......@@ -218,10 +219,10 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
if (sendResp.isSuccess()) {
String msgid = sendResp.getResult();
ownerLog.setMsgid(msgid);
ownerLog.setSendStatus(2);
ownerLog.setSendStatus(PlanSendStatusEnum.TO_BE_SEND.getCode());
} else {
ownerLog.setRemark(sendResp.getMessage());
ownerLog.setSendStatus(0);
ownerLog.setSendStatus(PlanSendStatusEnum.FAIL.getCode());
}
ownerLog.setWxEnterpriseId(wxEnterpriseId);
this.groupChatPlanOwnerLogService.update(ownerLog);
......@@ -230,7 +231,6 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
this.savePendTask(dto, plan);
}
}
}
}
......@@ -314,11 +314,11 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
if (item.getStatus() == 1) {
sendCount++;
// 已发送
entity.setSendStatus(2);
entity.setSendStatus(PlanSendStatusEnum.SENDED.getCode());
} else {
failCount++;
// 发送失败
entity.setSendStatus(0);
entity.setSendStatus(PlanSendStatusEnum.FAIL.getCode());
}
entity.setLogId(UniqueIdUtils.uniqueLong());
entity.setPlanId(ownerLog.getPlanId());
......
......@@ -105,7 +105,6 @@
<select id="listForTimer" resultType="long">
SELECT a.owner_log_id FROM tab_haoban_group_chat_plan_owner_log a left join tab_haoban_group_chat_plan b on a.plan_id = b.plan_id
WHERE b.end_time >= DATE_ADD(NOW(),INTERVAL -6 hour) and a.done_flag = 0 and a.delete_flag = 0 and b.delete_flag = 0 and a.msgid is not null
and b.status_flag = 0
<if test="null != planId and -1 != planId">
and a.plan_id = #{planId}
</if>
......
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