Authored by peuei

FIX

@@ -43,6 +43,7 @@ public class GrassArticleListener extends AbstractMqListener<GrassArticle> { @@ -43,6 +43,7 @@ public class GrassArticleListener extends AbstractMqListener<GrassArticle> {
43 private static final Integer CHECK_FAILED = 3; 43 private static final Integer CHECK_FAILED = 3;
44 private static final Integer DELETE = 2; 44 private static final Integer DELETE = 2;
45 private static final Integer DRAFT = 0; 45 private static final Integer DRAFT = 0;
  46 + private static final Integer DEFAULT_STATUS = 1;
46 47
47 @Override 48 @Override
48 protected void deleteData(GrassArticle sourceObject, Object checkResult) throws Exception { 49 protected void deleteData(GrassArticle sourceObject, Object checkResult) throws Exception {
@@ -185,6 +186,11 @@ public class GrassArticleListener extends AbstractMqListener<GrassArticle> { @@ -185,6 +186,11 @@ public class GrassArticleListener extends AbstractMqListener<GrassArticle> {
185 case 2: 186 case 2:
186 targetObject.setAuditStatus(CHECK_FAILED); 187 targetObject.setAuditStatus(CHECK_FAILED);
187 break; 188 break;
  189 + default:
  190 + targetObject.setAuditStatus(DEFAULT_STATUS);
  191 + break;
  192 + }
  193 + switch (sourceObject.getAuthStatus()) {
188 case 3: 194 case 3:
189 // 数据库里默认为正常状态 1 195 // 数据库里默认为正常状态 1
190 targetObject.setStatus(DELETE); 196 targetObject.setStatus(DELETE);
@@ -192,6 +198,9 @@ public class GrassArticleListener extends AbstractMqListener<GrassArticle> { @@ -192,6 +198,9 @@ public class GrassArticleListener extends AbstractMqListener<GrassArticle> {
192 case 9: 198 case 9:
193 targetObject.setStatus(DRAFT); 199 targetObject.setStatus(DRAFT);
194 break; 200 break;
  201 + default:
  202 + targetObject.setStatus(DEFAULT_STATUS);
  203 + break;
195 } 204 }
196 targetObject.setPublishTime(sourceObject.getCreateTime()); 205 targetObject.setPublishTime(sourceObject.getCreateTime());
197 } 206 }