Selaa lähdekoodia

Merge remote-tracking branch 'origin/test'

limin 7 vuotta sitten
vanhempi
commit
349cd28b65

+ 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);
 	}
 

+ 6 - 6
src/main/java/com/goafanti/common/mapper/UserIdentityMapper.xml

@@ -1290,13 +1290,13 @@ select a.id as uid,a.nickname as username,a.head_portrait_url as personPortraitU
 		ifnull(c.count,0) as countInterest,b.expert,ifnull(x.a,0) as favorable,ifnull(x.b,0) as general,
 		ifnull(x.c,0) as inferior,ifnull(x.d,0) as commentCount,ifnull( cast(x.a*100 / x.d as decimal(18, 2)), 100 ) as favorableRate,
 		if(isnull(d.to_uid),0,1) as interested
-		from `user` a left join user_identity b on a.id=b.uid left join (select b.seller_id as uid,
+		from `user` a left join user_identity b on a.id=b.uid left join (select a.commodity_id as uid,
 			sum(case when a.star &gt; 3 then 1 else 0 end) as a,
 			sum(case when a.star=3 then 1 else 0 end) as b,
 			sum(case when a.star &lt; 3 then 1 else 0 end) as c,count(*) as d
 			from jt_commodity_comment a 
 			left join jt_consult_order b on a.order_no=b.order_no
-			group by b.seller_id)x on a.id=x.uid
+			group by a.commodity_id)x on a.id=x.uid
 		left join (select count(*) as count,to_uid from  user_interest group by to_uid)c on a.id=c.to_uid
 left join (select to_uid from  user_interest where from_uid= #{uid,jdbcType=VARCHAR} group by to_uid)d on a.id=d.to_uid
 where a.id=#{id,jdbcType=VARCHAR}
@@ -1309,13 +1309,13 @@ where a.id=#{id,jdbcType=VARCHAR}
 	ifnull( x.d, 0 ) as commentCount, ifnull( cast(x.a*100 / x.d as decimal(18, 2)), 100 ) as favorableRate
 from
 	`user` u left join user_identity ui on ui.uid = u.id 
-	left join(select b.seller_id as uid,
+	left join(select a.commodity_id as uid,
 			sum(case when a.star &gt; 3 then 1 else 0 end) as a,
 			sum(case when a.star=3 then 1 else 0 end) as b,
 			sum(case when a.star &lt; 3 then 1 else 0 end) as c,count(*) as d
 			from jt_commodity_comment a 
 			left join jt_consult_order b on a.order_no=b.order_no
-			group by b.seller_id)x on u.id=x.uid
+			group by a.commodity_id)x on u.id=x.uid
 	left join( select count(*) as count, to_uid from user_interest group by to_uid) a 
 	on u.id = a.to_uid left join( select to_uid from user_interest where from_uid =#{uid,jdbcType=VARCHAR} ) b
 	on u.id = b.to_uid 
@@ -1445,9 +1445,9 @@ select a.create_time as createTime,
   a.content,a.star,u.identify_name as commenter
   from jt_commodity_comment a 
   left join user u on a.uid=u.id
-  left join jt_consult_order b on a.order_no=b.order_no
+  <!-- left join jt_consult_order b on a.order_no=b.order_no -->
   where 1=1
-  and b.seller_id= #{id,jdbcType=VARCHAR}
+  and a.commodity_id= #{id,jdbcType=VARCHAR}
   order by a.star desc,a.create_time desc
   limit 1
 

+ 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")