Преглед изворни кода

Merge remote-tracking branch 'origin/test'

limin пре 7 година
родитељ
комит
44df844911

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

@@ -464,7 +464,7 @@ public class JtBusinessServiceImpl  extends BaseMybatisDao<JtBusinessProjectMapp
 	@Override
 	public int updateProjectMoveUp(String id) {
 		JtBusinessCategory j1=jtBusinessCategoryMapper.selectByPrimaryKey(id);
-		JtBusinessCategory j2=jtBusinessCategoryMapper.selectFirstLevel(id,j1.getModule(),j1.getLayer(),0);
+		JtBusinessCategory j2=jtBusinessCategoryMapper.selectFirstLevel(id,j1.getModule(),j1.getSuperId(),0);
 		if(null==j2){
 			return -1;
 		}
@@ -483,7 +483,7 @@ public class JtBusinessServiceImpl  extends BaseMybatisDao<JtBusinessProjectMapp
 	@Override
 	public int updateProjectSetTop(String id) {
 		JtBusinessCategory j1=jtBusinessCategoryMapper.selectByPrimaryKey(id);
-		JtBusinessCategory j2=jtBusinessCategoryMapper.selectFirstLevel(id,j1.getModule(),j1.getLayer(),1);
+		JtBusinessCategory j2=jtBusinessCategoryMapper.selectFirstLevel(id,j1.getModule(),j1.getSuperId(),1);
 		if(null==j2){
 			return -1;
 		}

+ 0 - 3
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -5,17 +5,14 @@ import java.util.Arrays;
 import java.util.Date;
 import java.util.Iterator;
 import java.util.List;
-
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
-
 import org.apache.commons.lang3.time.DateFormatUtils;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.servlet.ModelAndView;
-
 import com.goafanti.achievement.service.AchievementInterestService;
 import com.goafanti.achievement.service.AchievementService;
 import com.goafanti.app.bo.ExpertsListBo;

+ 1 - 1
src/main/java/com/goafanti/common/dao/JtBusinessCategoryMapper.java

@@ -97,7 +97,7 @@ public interface JtBusinessCategoryMapper {
     
     List<JtBusinessCategory> getCategoryByModule(Integer module);
 
-	JtBusinessCategory selectFirstLevel(String id, Integer module, Integer layer,@Param("type")Integer type);
+	JtBusinessCategory selectFirstLevel(String id, Integer module, String superId,@Param("type")Integer type);
 	
 	List<JtBusinessCategory> getCategoryByName(JtBusinessCategory category);
 	List<JtBusinessCategory> getCategoryByModel(JtBusinessCategory category);

+ 1 - 1
src/main/java/com/goafanti/common/mapper/JtBusinessCategoryMapper.xml

@@ -554,7 +554,7 @@ and layer=#{0}
   select
    <include refid="Base_Column_List" /> 
    from jt_business_category
-	where module=#{1} and layer=#{2}
+	where module=#{1} and super_id=#{2}
 	and   sort &lt; (select sort from jt_business_category where id=#{0})
 	order by sort
 	

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

@@ -1317,7 +1317,7 @@ from
 			left join jt_consult_order b on a.order_no=b.order_no
 			group by b.seller_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 ='1' ) b
+	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 
 	where u.status = 0 and u.source = 0 
 	and ui.expert = 2 and ui.audit_status=2

+ 9 - 1
src/main/java/com/goafanti/news/controller/AdminPolicyApiController.java

@@ -141,8 +141,16 @@ public class AdminPolicyApiController extends BaseApiController {
 				if(result.getError().size()>0) {
 					return result;
 				}
-				if(policy.getAuditStatus()!=null &&policy.getAuditStatus() == 2) {
+				if(policy.getAuditStatus()!=null ) {
 					policy.setReleaseDate(new Date());
+					if(policy.getAuditStatus() ==2){
+						policy.setReleaseDate(new Date());
+						policyService.addJtCollectSearch(policy);
+						}
+					if(policy.getAuditStatus()==4) {
+						policyService.updateJtCollectSearch(policy);
+					}
+					
 				}
 				policy.setEditTime(new Date());