|
@@ -9,6 +9,7 @@ import com.yonge.cooleshow.biz.dal.entity.CustomerServiceBatchSending;
|
|
import com.yonge.cooleshow.biz.dal.entity.CustomerServiceReceive;
|
|
import com.yonge.cooleshow.biz.dal.entity.CustomerServiceReceive;
|
|
import com.yonge.cooleshow.biz.dal.entity.Subject;
|
|
import com.yonge.cooleshow.biz.dal.entity.Subject;
|
|
import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
|
|
import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
|
|
|
|
+import com.yonge.cooleshow.biz.dal.enums.im.EImSendStatus;
|
|
import com.yonge.cooleshow.biz.dal.mapper.CustomerServiceBatchSendingMapper;
|
|
import com.yonge.cooleshow.biz.dal.mapper.CustomerServiceBatchSendingMapper;
|
|
import com.yonge.cooleshow.biz.dal.service.CustomerServiceBatchSendingService;
|
|
import com.yonge.cooleshow.biz.dal.service.CustomerServiceBatchSendingService;
|
|
import com.yonge.cooleshow.biz.dal.service.CustomerServiceReceiveService;
|
|
import com.yonge.cooleshow.biz.dal.service.CustomerServiceReceiveService;
|
|
@@ -180,4 +181,35 @@ public class CustomerServiceBatchSendingServiceImpl extends ServiceImpl<Customer
|
|
|
|
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 更新消息状态
|
|
|
|
+ *
|
|
|
|
+ * @param id 消息Id
|
|
|
|
+ * @param sendStatus EImSendStatus
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ public void status(Long id, EImSendStatus sendStatus) {
|
|
|
|
+
|
|
|
|
+ CustomerServiceBatchSending record = getById(id);
|
|
|
|
+ if (Objects.isNull(record)) {
|
|
|
|
+ throw new BizException("无效的请求Id");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 校验消息发送状态
|
|
|
|
+ if (EImSendStatus.SEND == record.getSendStatus()) {
|
|
|
|
+ throw new BizException("当前消息已发送");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 当前群发消息状态一致
|
|
|
|
+ if (record.getSendStatus() == sendStatus) {
|
|
|
|
+ throw new BizException("群发消息状态一致");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 更新群发消息状态
|
|
|
|
+ lambdaUpdate()
|
|
|
|
+ .eq(CustomerServiceBatchSending::getId, id)
|
|
|
|
+ .set(CustomerServiceBatchSending::getSendStatus, sendStatus)
|
|
|
|
+ .update();
|
|
|
|
+ }
|
|
}
|
|
}
|