|
|
@@ -25,7 +25,6 @@ import com.tzld.piaoquan.longarticle.service.local.PlanAccountService;
|
|
|
import com.tzld.piaoquan.longarticle.service.remote.AigcService;
|
|
|
import com.tzld.piaoquan.longarticle.service.remote.MatchService;
|
|
|
import com.tzld.piaoquan.longarticle.service.remote.VideoService;
|
|
|
-import com.tzld.piaoquan.longarticle.service.remote.impl.SortServiceImpl;
|
|
|
import com.tzld.piaoquan.longarticle.utils.DateUtil;
|
|
|
import com.tzld.piaoquan.longarticle.utils.LarkRobotUtil;
|
|
|
import com.tzld.piaoquan.longarticle.utils.TimeZoneUtil;
|
|
|
@@ -102,6 +101,7 @@ public class CoreServiceImpl implements CoreService {
|
|
|
@ApolloJsonValue("${fwhGhIdList:[]}")
|
|
|
private List<String> fwhGhIdList;
|
|
|
|
|
|
+
|
|
|
public void initAccountSpecialSettings() {
|
|
|
List<SpecialSettingVO> specialSettings = aigcService.getSpecialSetting();
|
|
|
if (CollectionUtils.isEmpty(specialSettings)) {
|
|
|
@@ -234,7 +234,7 @@ public class CoreServiceImpl implements CoreService {
|
|
|
if (!CollectionUtils.isEmpty(specialAccountIds) && specialAccountIds.contains(planAccount.getAccountId())) {
|
|
|
planAccount.setSpecialNotSend(SpecialNotSendEnum.NOT_SEND.getStatusCode());
|
|
|
}
|
|
|
- planAccountService.saveOrUpdatePlanAccount(planAccount);
|
|
|
+ planAccountService.saveOrUpdatePlanAccount(planAccount, account);
|
|
|
}
|
|
|
if (CollectionUtils.isEmpty(accountIdSet)) {
|
|
|
continue;
|
|
|
@@ -269,7 +269,7 @@ public class CoreServiceImpl implements CoreService {
|
|
|
}
|
|
|
for (PlanAccount planAccount : planAccountList) {
|
|
|
planAccount.setSpecialNotSend(SpecialNotSendEnum.NOT_SEND.getStatusCode());
|
|
|
- planAccountService.saveOrUpdatePlanAccount(planAccount);
|
|
|
+ planAccountService.saveOrUpdatePlanAccount(planAccount, null);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -503,7 +503,8 @@ public class CoreServiceImpl implements CoreService {
|
|
|
|
|
|
public boolean checkPlanAccount(PlanAccount planAccount) {
|
|
|
boolean isGzhGroupPushPlan = Objects.nonNull(planAccount.getPushType())
|
|
|
- && PublishGzhPushTypeEnum.auto_group_publish.getVal().equals(planAccount.getPushType());
|
|
|
+ && (Objects.equals(planAccount.getPushType(), PublishGzhPushTypeEnum.auto_group_publish.getVal())
|
|
|
+ || Objects.equals(planAccount.getPushType(), PublishGzhPushTypeEnum.batch_group_publish.getVal()));
|
|
|
boolean flag = true;
|
|
|
// 固定日期
|
|
|
if (planAccount.getPublishRate() == 1) {
|
|
|
@@ -742,7 +743,8 @@ public class CoreServiceImpl implements CoreService {
|
|
|
pushContentList.add(contentParam);
|
|
|
}
|
|
|
|
|
|
- if (fwhGhIdList != null && fwhGhIdList.contains(planAccount.getGhId())) {
|
|
|
+ if (Objects.equals(planAccount.getPushType(), PublishGzhPushTypeEnum.batch_group_publish.getVal())
|
|
|
+ || (fwhGhIdList != null && fwhGhIdList.contains(planAccount.getGhId()))) {
|
|
|
pushBatchGroupPushTask(planAccount, pushContentList, sendIds);
|
|
|
} else {
|
|
|
CreatePushTaskParam gzhPushParam = getCreatePushTaskParam(planAccount, pushContentList);
|
|
|
@@ -799,7 +801,8 @@ public class CoreServiceImpl implements CoreService {
|
|
|
return null;
|
|
|
}
|
|
|
//自动群发少于最少数量不发送 例外设置数量少于最少发送数量不发送
|
|
|
- if (Objects.equals(planAccount.getPushType(), PublishGzhPushTypeEnum.auto_group_publish.getVal())
|
|
|
+ if ((Objects.equals(planAccount.getPushType(), PublishGzhPushTypeEnum.auto_group_publish.getVal())
|
|
|
+ || Objects.equals(planAccount.getPushType(), PublishGzhPushTypeEnum.batch_group_publish.getVal()))
|
|
|
|| planAccount.getIsSpecialSetting() == 1) {
|
|
|
if (pushContentList.size() < planAccount.getPublishPreMinNum()) {
|
|
|
return null;
|
|
|
@@ -826,7 +829,8 @@ public class CoreServiceImpl implements CoreService {
|
|
|
return;
|
|
|
}
|
|
|
//自动群发少于最少数量不发送 例外设置数量少于最少发送数量不发送
|
|
|
- if (Objects.equals(planAccount.getPushType(), PublishGzhPushTypeEnum.auto_group_publish.getVal())
|
|
|
+ if ((Objects.equals(planAccount.getPushType(), PublishGzhPushTypeEnum.auto_group_publish.getVal())
|
|
|
+ || Objects.equals(planAccount.getPushType(), PublishGzhPushTypeEnum.batch_group_publish.getVal()))
|
|
|
|| planAccount.getIsSpecialSetting() == 1) {
|
|
|
if (pushContentList.size() < planAccount.getPublishPreMinNum()) {
|
|
|
return;
|
|
|
@@ -1023,7 +1027,8 @@ public class CoreServiceImpl implements CoreService {
|
|
|
Objects.equals(planAccount.getPushType(), PublishGzhPushTypeEnum.batch_group_publish.getVal())) {
|
|
|
planAccountService.updateStatus(2, planAccountId);
|
|
|
}
|
|
|
- if (fwhGhIdList != null && fwhGhIdList.contains(planAccount.getGhId())) {
|
|
|
+ if (Objects.equals(planAccount.getPushType(), PublishGzhPushTypeEnum.batch_group_publish.getVal())
|
|
|
+ || (fwhGhIdList != null && fwhGhIdList.contains(planAccount.getGhId()))) {
|
|
|
GroupSendResultExample groupSendResultExample = new GroupSendResultExample();
|
|
|
groupSendResultExample.createCriteria().andPushIdEqualTo(pushId);
|
|
|
List<GroupSendResult> groupSendResults = groupSendResultMapper.selectByExample(groupSendResultExample);
|