Explorar o código

修改更新状态

xueyiming hai 1 mes
pai
achega
9595a269ce

+ 8 - 0
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/impl/CoreServiceImpl.java

@@ -933,6 +933,14 @@ public class CoreServiceImpl implements CoreService {
                         Objects.equals(planAccount.getPushType(), PublishGzhPushTypeEnum.batch_group_publish.getVal())) {
                     planAccountService.updateStatus(2, planAccountId);
                 }
+                GroupSendResultExample groupSendResultExample = new GroupSendResultExample();
+                groupSendResultExample.createCriteria().andPushIdEqualTo(pushId);
+                List<GroupSendResult> groupSendResults = groupSendResultMapper.selectByExample(groupSendResultExample);
+                if (!CollectionUtils.isEmpty(groupSendResults)) {
+                    GroupSendResult updateGroupSendResult = new GroupSendResult();
+                    updateGroupSendResult.setStatus(updateStatus);
+                    groupSendResultMapper.updateByExampleSelective(updateGroupSendResult, groupSendResultExample);
+                }
             }
             if (updateStatus == 3) {
                 PublishContentExample publishContentExample = new PublishContentExample();

+ 0 - 18
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/impl/PublicContentServiceImpl.java

@@ -28,11 +28,6 @@ public class PublicContentServiceImpl {
     @Autowired
     private PublishMiniprogramMapper publishMiniprogramMapper;
 
-    @Autowired
-    private GroupSendResultMapper groupSendResultMapper;
-
-    @Autowired
-    private AigcService aigcService;
 
     public int getSendCount(Long planAccountId) {
         PublishContentExample example = new PublishContentExample();
@@ -108,19 +103,6 @@ public class PublicContentServiceImpl {
         publishContent.setId(publishContentId);
         publishContent.setReason(reason);
         publishContentMapper.updateByPrimaryKeySelective(publishContent);
-
-        GroupSendResultExample example = new GroupSendResultExample();
-        example.createCriteria().andPushIdEqualTo(pushId);
-        List<GroupSendResult> groupSendResults = groupSendResultMapper.selectByExample(example);
-        if (!CollectionUtils.isEmpty(groupSendResults)) {
-            GroupSendResult groupSendResult = groupSendResults.get(0);
-            GroupSendResult updateGroupSendResult = new GroupSendResult();
-            updateGroupSendResult.setId(groupSendResult.getId());
-            updateGroupSendResult.setStatus(status);
-            groupSendResultMapper.updateByPrimaryKeySelective(updateGroupSendResult);
-        }
-
-
     }
 
     public void updatePublishContentPushId(List<Long> ids, String pushId) {