Browse Source

修改api接口方法名;添加修改草稿内容状态方法

master
jianjun 5 years ago
parent
commit
8392e1416a
  1. 2
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/DraftContentDao.java
  2. 2
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/DraftCoverDao.java
  3. 13
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java
  4. 5
      epmet-module/gov-voice/gov-voice-server/src/main/resources/bootstrap.yml
  5. 3
      epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftContentDao.xml
  6. 2
      epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftCoverDao.xml

2
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/DraftContentDao.java

@ -49,4 +49,6 @@ public interface DraftContentDao extends BaseDao<DraftContentEntity> {
* @return * @return
*/ */
List<DraftContentEntity> selectScanContentByDraftId(String draftId); List<DraftContentEntity> selectScanContentByDraftId(String draftId);
int updateAuditStatusById(@Param("id")String id, @Param("auditStatus")String auditStatus);
} }

2
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/DraftCoverDao.java

@ -51,5 +51,5 @@ public interface DraftCoverDao extends BaseDao<DraftCoverEntity> {
**/ **/
DraftCoverDTO selectCoverIdAndUrlByDraftId(@Param("draftId")String draftId); DraftCoverDTO selectCoverIdAndUrlByDraftId(@Param("draftId")String draftId);
int updateAuditStatusById(@Param("draftId")String id, @Param("auditStatus")String auditStatus); int updateAuditStatusById(@Param("id")String id, @Param("auditStatus")String auditStatus);
} }

13
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java

@ -122,6 +122,10 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
@Value("${openapi.scan.server.host}") @Value("${openapi.scan.server.host}")
private String scanApiHost; private String scanApiHost;
@Value("${openapi.scan.method.imgSyncScan}")
private String imgSyncScanMethod;
@Value("${openapi.scan.method.textSyncScan}")
private String textSyncScanMethod;
private static final String AGENCY = "agency"; private static final String AGENCY = "agency";
private static final String GRID = "grid"; private static final String GRID = "grid";
@ -932,10 +936,9 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
} }
//todo 执行审核 //todo 执行审核
SyncScanResult imgSyncScanResult = ScanContentUtils.imgSyncScan(scanApiHost,imgScanParamDTO); SyncScanResult imgSyncScanResult = ScanContentUtils.imgSyncScan(scanApiHost.concat(imgSyncScanMethod),imgScanParamDTO);
SyncScanResult textSyncScanResult = ScanContentUtils.textSyncScan(scanApiHost,textScanParamDTO); SyncScanResult textSyncScanResult = ScanContentUtils.textSyncScan(scanApiHost.concat(textSyncScanMethod),textScanParamDTO);
SyncScanResult result = new SyncScanResult(); SyncScanResult result = new SyncScanResult();
if (imgSyncScanResult.isAllPass()){ if (imgSyncScanResult.isAllPass()){
result.setAllPass(imgSyncScanResult.isAllPass()); result.setAllPass(imgSyncScanResult.isAllPass());
result.getSuccessDataIds().addAll(imgSyncScanResult.getSuccessDataIds()); result.getSuccessDataIds().addAll(imgSyncScanResult.getSuccessDataIds());
@ -987,11 +990,9 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
if (id.indexOf(ModuleConstant.SCAN_COVER_PREFIX)>=0){ if (id.indexOf(ModuleConstant.SCAN_COVER_PREFIX)>=0){
draftCoverDao.updateAuditStatusById(id,ModuleConstant.AUDIT_STATUS_FAIL); draftCoverDao.updateAuditStatusById(id,ModuleConstant.AUDIT_STATUS_FAIL);
}else{ }else{
//TODO 修改内容 审核状态 draftContentDao.updateAuditStatusById(id,ModuleConstant.AUDIT_STATUS_FAIL);
} }
}); });
} }
public Result sendMsg(String title,String content) { public Result sendMsg(String title,String content) {

5
epmet-module/gov-voice/gov-voice-server/src/main/resources/bootstrap.yml

@ -97,4 +97,7 @@ ribbon:
openapi: openapi:
scan: scan:
server: server:
host: http://localhost:8107/epmetscan host: http://localhost:8107/epmetscan/api
mehod:
imgSyncScan: /imgSyncScan
textSyncScan: /textSyncScan

3
epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftContentDao.xml

@ -34,5 +34,8 @@
WHERE WHERE
DEL_FLAG = 0 AND DRAFT_ID = #{draftId,jdbcType=VARCHAR} DEL_FLAG = 0 AND DRAFT_ID = #{draftId,jdbcType=VARCHAR}
</select> </select>
<update id="updateAuditStatusById">
UPDATE DRAFT_CONTENT SET AUDIT_STATUS = #{auditStatus,jdbcType=VARCHAR} WHERE ID = #{id,jdbcType=VARCHAR}
</update>
</mapper> </mapper>

2
epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftCoverDao.xml

@ -25,7 +25,7 @@
SELECT ID,IMG_URL FROM DRAFT_COVER WHERE DEL_FLAG = 0 AND DRAFT_ID = #{draftId,jdbcType=VARCHAR} SELECT ID,IMG_URL FROM DRAFT_COVER WHERE DEL_FLAG = 0 AND DRAFT_ID = #{draftId,jdbcType=VARCHAR}
</select> </select>
<update id="updateAuditStatusById"> <update id="updateAuditStatusById">
UPDATE DRAFT_COVER SET AUDIT_STATUS = #{auditStatus,jdbcType=VARCHAR} UPDATE DRAFT_COVER SET AUDIT_STATUS = #{auditStatus,jdbcType=VARCHAR} WHERE ID = #{id,jdbcType=VARCHAR}
</update> </update>
</mapper> </mapper>
Loading…
Cancel
Save