Kaynağa Gözat

政策列表修改、成果、需求、项目、新闻、政策删除修改

anderx 7 yıl önce
ebeveyn
işleme
c1b6510f94

+ 1 - 0
src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java

@@ -211,6 +211,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		achievementPublishMapper.batchDeleteByAchievementIds(id);
 		for (String s : id) {
 			Achievement a = achievementMapper.selectByPrimaryKey(s);
+			if(collectFlag)jtCollectSearchMapper.deleteByrowId(s);
 			if (null != a && AchievementAuditStatus.AUDITED.getCode().equals(a.getAuditStatus())
 					&& StringUtils.isNotBlank(a.getOwnerId())) {
 				AchievementDemandCount adc = achievementDemandCountMapper.selectByUid(a.getOwnerId());

+ 1 - 1
src/main/java/com/goafanti/business/service/impl/JtBusinessServiceImpl.java

@@ -362,7 +362,7 @@ public class JtBusinessServiceImpl  extends BaseMybatisDao<JtBusinessProjectMapp
 
 	@Override
 	public int deleteProjectById(String id) {
-
+		if(collectFlag)jtCollectSearchMapper.deleteByrowId(id);
 		return jtBusinessProjectMapper.deleteByPrimaryKey(id);
 	}
 

+ 2 - 0
src/main/java/com/goafanti/demand/service/impl/DemandServiceImpl.java

@@ -146,8 +146,10 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 		demandKeywordMapper.batchDeleteByDemandIds(id);
 		achievementDemandMapper.batchDeleteByDemandIds(id);
 		demandPublishMapper.batchDeleteByDemandIds(id);
+		
 		for (String s : id) {
 			Demand d = demandMapper.selectByPrimaryKey(s);
+			if(collectFlag)jtCollectSearchMapper.deleteByrowId(s);
 			if (null != d && DemandAuditStatus.AUDITED.getCode().equals(d.getAuditStatus())
 					&& StringUtils.isNotBlank(d.getEmployerId())) {
 				AchievementDemandCount adc = achievementDemandCountMapper.selectByUid(d.getEmployerId());

+ 1 - 0
src/main/java/com/goafanti/news/service/NewsService.java

@@ -336,6 +336,7 @@ public class NewsService extends BaseMybatisDao<NewsMapper> {
 	
 	public int deleteByPrimaryKey(long id) {
 		newsPublishMapper.deleteByNewsId(id);
+		if(collectFlag)jtCollectSearchMapper.deleteByrowId(String.valueOf(id));
 		return newsMapper.deleteByPrimaryKey(id);
 	}
 	

+ 4 - 5
src/main/java/com/goafanti/news/service/PolicyService.java

@@ -6,6 +6,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 
+import org.aspectj.weaver.ast.And;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
@@ -75,6 +76,7 @@ if(appPages!=null)
 
 public int deletePolicyById(Long id) {
 	if(id!=null) {
+		if(collectFlag)jtCollectSearchMapper.deleteByrowId(String.valueOf(id));
 		policyPublishMapper.deleteByPolicyId(id);
 		return policyMapper.deleteByPrimaryKey(id);
 	}
@@ -154,15 +156,12 @@ public Pagination<PolicyResult>searchPolicy(String title,Integer auditStatus,Str
 public Pagination<AppDiscoveryBo> appListPolicy(Integer pageNo, Integer pageSize) {
 	Map<String, Object> params = new HashMap<>();
 	Pagination<AppDiscoveryBo>p=(Pagination<AppDiscoveryBo>) findPage("findPolicyAppList","findPolicyAppCount",params, pageNo, pageSize);
-	List<AppDiscoveryBo> l=(List<AppDiscoveryBo>) p.getList();
-	for (AppDiscoveryBo a : l) {
-		a.setContent(a.getContent().replaceAll("<p>", "").replaceAll("</p>", ""));
-	}
 	return p; 
 }
 
 public PolicyResult policyDetail(String id) {
-	return policyMapper.selectPolicyDetail(id);
+	PolicyResult policyResult =policyMapper.selectPolicyDetail(id);
+	return policyResult;
 }
 
 @SuppressWarnings("unchecked")