Browse Source

Merge branch 'test' of ssh://anderx@git.jishutao.com:55555/jishutao/jitao-server.git into test

anderx 7 years ago
parent
commit
af98a5bf56

+ 1 - 1
src/main/java/com/goafanti/achievement/service/AchievementService.java

@@ -84,7 +84,7 @@ public interface AchievementService {
 	
 	AchievementResultObject getAchievementDetailById(String id);
 	
-	List<AchievementObject>getBoutiquePatent(int size);
+	List<AchievementObject>getBoutiquePatent(int size, int deletedSign);
 	
 	List<AchievementObject>guessYouLike(int size);
 	

+ 7 - 2
src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java

@@ -741,9 +741,9 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 	}
 
 	@Override
-	public List<AchievementObject> getBoutiquePatent(int size) {
+	public List<AchievementObject> getBoutiquePatent(int size,int deletedSign) {
 		// TODO Auto-generated method stub
-		return achievementMapper.getBoutiquePatent( size);
+		return achievementMapper.getBoutiquePatent( size,deletedSign);
 	}
 
 	@Override
@@ -813,6 +813,11 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		 if(null != achievementObject.getFieldB()) {
 			 params.put("fieldB", achievementObject.getFieldB());
 		 }
+		 if(null != achievementObject.getDeletedSign()) {
+			 params.put("deletedSign", achievementObject.getDeletedSign());
+		 }else{
+			 params.put("deletedSign", 0);//未删除的数据
+		 }
 		 return params;
 		
 	}

+ 9 - 48
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -427,7 +427,7 @@ public class WebpageController extends BaseController {
 		}
 		modelview.addObject("owner", owner);
 		modelview.addObject("pj", jtBusinessProject);
-		System.out.println(jtBusinessProject.toString());
+		//System.out.println(jtBusinessProject.toString());
 		if (jtBusinessProject != null) {
 			JtBusinessCategoryTree tree = jtBusinessService.getCategoryTree(jtBusinessProject.getCategoryId());
 			modelview.addObject("tree", tree);
@@ -474,7 +474,7 @@ public class WebpageController extends BaseController {
 		}
 		modelview.addObject("owner", owner);
 		modelview.addObject("pj", jtBusinessProject);
-		System.out.println(jtBusinessProject.toString());
+		//System.out.println(jtBusinessProject.toString());
 		if (jtBusinessProject != null) {
 			JtBusinessCategoryTree tree = jtBusinessService.getCategoryTree(jtBusinessProject.getCategoryId());
 			modelview.addObject("tree", tree);
@@ -504,7 +504,7 @@ public class WebpageController extends BaseController {
 	public ModelAndView demandList(HttpServletRequest request, ModelAndView modelview) {
 		String url = com.goafanti.common.utils.StringUtils.getDomainByHttpRequest(request);
 		modelview.setViewName("/portal/technologyTrading/demandList");
-		List<DemandListBo> boutiques = demandService.getHotDemand(3, url, "web_demand_list");
+		List<DemandListBo> boutiques = demandService.getHotDemand(3, url, "web_demand_list", 0);
 		modelview.addObject("boutiques", boutiques);
 		return modelview;
 	}
@@ -512,7 +512,7 @@ public class WebpageController extends BaseController {
 	@RequestMapping(value = "/portal/technologyTrading/achievementList", method = RequestMethod.GET)
 	public ModelAndView achievementList(HttpServletRequest request, ModelAndView modelview) {
 		modelview.setViewName("/portal/technologyTrading/achievementList");
-		List<AchievementObject> boutiques = achievementService.getBoutiquePatent(3);
+		List<AchievementObject> boutiques = achievementService.getBoutiquePatent(3,0);
 		modelview.addObject("boutiques", boutiques);
 		return modelview;
 	}
@@ -778,7 +778,7 @@ public class WebpageController extends BaseController {
 		modelview.addObject("urgentDemand3", urgentDemand3);
 
 		// 热点需求
-		List<DemandListBo> hotDemand = demandService.getHotDemand(5, url, showLocation);
+		List<DemandListBo> hotDemand = demandService.getHotDemand(5, url, showLocation,0);
 		List<DemandListBo> hotDemand2 = hotDemand.subList(0, Math.min(2, hotDemand.size()));
 		List<DemandListBo> hotDemand3 = hotDemand.subList(Math.min(2, hotDemand.size()), Math.min(5, hotDemand.size()));
 		System.out.print("u2:" + hotDemand2.size() + " u3:" + hotDemand3.size());
@@ -859,7 +859,7 @@ public class WebpageController extends BaseController {
 
 		// 精品需求
 		List<DemandListBo> boutiqueDemandList = LimitLengthUtil
-				.LimitListLengthRandomly(demandService.getHotDemand(10, url, "web_demand_list"), 3, 10);
+				.LimitListLengthRandomly(demandService.getHotDemand(10, url, "web_demand_list",0), 3, 10);
 		modelAndView.addObject("reboutiquedemand", boutiqueDemandList);
 
 		// 猜你喜欢
@@ -924,7 +924,7 @@ public class WebpageController extends BaseController {
 		modelAndView.addObject("achievementdetail", achievementObject);
 		// 精品
 		List<AchievementObject> boutiques = LimitLengthUtil
-				.LimitListLengthRandomly(achievementService.getBoutiquePatent(10), 3, 10);
+				.LimitListLengthRandomly(achievementService.getBoutiquePatent(10,0), 3, 10);
 		modelAndView.addObject("reboutiqueachievement", boutiques);
 
 		// 猜你喜欢
@@ -1018,7 +1018,7 @@ public class WebpageController extends BaseController {
 		modelAndView.addObject("achievement", achievementObjects);
 
 		// 需求
-		List<DemandListBo> demandListBos = demandService.getHotDemand(2, url, "web_demand_trading_index");
+		List<DemandListBo> demandListBos = demandService.getHotDemand(2, url, "web_demand_trading_index",0);
 		for (DemandListBo d : demandListBos) {
 			if (null != d.getFirstPic() && d.getFirstPic().contains(",")) {
 				d.setFirstPic(d.getFirstPic().substring(0, d.getFirstPic().indexOf(",")));
@@ -1193,43 +1193,4 @@ public class WebpageController extends BaseController {
 		return res;
 	}
 	
-	/*
-	 * 服务预览详情
-	 * 
-	 * @param id String
-	 */
-	@RequestMapping(value = "/portal/service/serviceDetailPreview", method = RequestMethod.GET)
-	public ModelAndView portalServiceServiceDetailPreview(HttpServletRequest request, ModelAndView modelview, String id) {
-		modelview.setViewName("/portal/service/serviceDetails");
-		JtBusinessProject jtBusinessProject = jtBusinessService.getBusinessProjectDetail(id);
-		if (jtBusinessProject != null) {
-			if (jtBusinessProject.getMaxImgUrl() != null && jtBusinessProject.getMaxImgUrl().length() <= 0)
-				jtBusinessProject.setMaxImgUrl(null);
-		}
-		if (jtBusinessProject.getCreateTime() != null
-				&& 7 >= differentDaysByMillisecond(jtBusinessProject.getCreateTime(), new Date())) {
-			modelview.addObject("newly", true);
-		} else
-			modelview.addObject("newly", false);
-		String owner = "平台管理员";
-		if (jtBusinessProject.getOwnerId() != null) {
-			User user = userService.selectByPrimaryKey(jtBusinessProject.getOwnerId());
-			if (user != null && user.getIdentifyName() != null) {
-				owner = user.getIdentifyName();
-			}
-		}
-		modelview.addObject("owner", owner);
-		modelview.addObject("pj", jtBusinessProject);
-		if (jtBusinessProject != null) {
-			JtBusinessCategoryTree tree = jtBusinessService.getCategoryTree(jtBusinessProject.getCategoryId());
-			modelview.addObject("tree", tree);
-		}
-		JtBusinessCategory jtBusinessCategory = jtBusinessService.getCategoryById(jtBusinessProject.getCategoryId());
-		if (jtBusinessCategory != null && jtBusinessCategory.getModule() != null)
-			modelview.addObject("module", jtBusinessCategory.getModule());
-		else
-			modelview.addObject("module", 0);
-
-		return modelview;
-	}
-}
+}

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

@@ -67,7 +67,7 @@ public interface AchievementMapper {
 	
 	AchievementObject getAchievementDetail(String id,Integer type);
 	
-	List<AchievementObject>getBoutiquePatent(int size);
+	List<AchievementObject>getBoutiquePatent(int size, int deletedSign);
 	    
 	List<AchievementObject>guessYouLike(int size);
 	

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

@@ -55,7 +55,7 @@ public interface DemandMapper {
 	
 	List<DemandListBo> getUrgentDemand(int size,String pattern,String location);
 	
-	List<DemandListBo> getHotDemand(int size,String pattern,String location);
+	List<DemandListBo> getHotDemand(int size,String pattern,String location, int deletedSign);
 	
 	List<DemandListBo> getAreaDemand(int size,String pattern,String location);
 	

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

@@ -612,6 +612,9 @@
   <if test="name !=null">
   and a.name like concat("%",#{name,jdbcType=VARCHAR},"%")
   </if>
+  <if test="deletedSign !=null">
+  and a.deleted_sign = #{deletedSign,jdbcType=INTEGER}
+  </if>
   order by a.release_date
   <if test="page_sql !=null">
   	${page_sql}
@@ -631,6 +634,9 @@
   <if test="name !=null">
   and a.name like concat("%",#{name,jdbcType=VARCHAR},"%")
   </if>
+  <if test="deletedSign !=null">
+  and a.deleted_sign = #{deletedSign,jdbcType=INTEGER}
+  </if>
   </select>
    <select id="findAppAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
   	
@@ -1235,6 +1241,9 @@ where
 	a.info_sources = 1
 	and audit_status=2
 	and a.boutique = 1
+	<if test="#{1} != null">
+	and	a.deleted_sign = #{1}
+	</if>
 	order by a.release_date desc
 limit #{0}
 </select>
@@ -1437,4 +1446,4 @@ where
   	left join achievement_interest ai on ai.achievement_id=a.id
   	where ai.uid=#{uid,jdbcType=VARCHAR}
   	</select>
-</mapper>
+</mapper>

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

@@ -1044,6 +1044,9 @@ left join demand_publish dp on dp.demand_id=d.id and dp.publish_platform=branchI
       left join branch_information branchInfo on INSTR(#{1},branchInfo.domain_name)>0
 left join demand_publish dp on dp.demand_id=d.id and dp.publish_platform=branchInfo.id
    where  d.audit_status=2 and info_sources=1 and dp.demand_id=d.id and dp.publish_platform=branchInfo.id and instr(dp.publish_page,#{2})>0
+    <if test="#{3} != null">
+    and d.deleted_sign = #{3}
+    </if>
     order by  release_date  desc limit #{0}
   </select>
   
@@ -1142,6 +1145,9 @@ order by release_date desc limit #{0}
   <if test="name !=null">
   and a.name like concat("%",#{name,jdbcType=VARCHAR},"%")
   </if>
+  <if test="deletedSign !=null">
+   and a.deleted_sign = #{deletedSign,jdbcType=INTEGER}
+  </if>
   order by a.release_date
   <if test="page_sql !=null">
   	${page_sql}
@@ -1159,6 +1165,9 @@ order by release_date desc limit #{0}
   <if test="name !=null">
   and a.name like concat("%",#{name,jdbcType=VARCHAR},"%")
   </if>
+  <if test="deletedSign !=null">
+   and a.deleted_sign = #{deletedSign,jdbcType=INTEGER}
+  </if>
   </select>
   
   
@@ -1196,4 +1205,4 @@ order by release_date desc limit #{0}
    left join demand_interest di on di.demand_id=a.id
    where di.uid=#{uid,jdbcType=VARCHAR}
    </select>
-  </mapper>
+  </mapper>

+ 10 - 0
src/main/java/com/goafanti/demand/bo/DemandListBo.java

@@ -14,6 +14,8 @@ public class DemandListBo extends InputDemand{
 	private String		industryCategory3;
 	//是否精品 0-false 1-true
 	private Integer 	boutique;
+	//是否删除 0 未删除 1 已删除
+	private Integer 	deletedSign;
 	
 	//demandType String 映射
 	private String	demandTypeS;
@@ -128,6 +130,14 @@ public class DemandListBo extends InputDemand{
 		this.industryCategory3 = industryCategory3;
 	}
 
+	public Integer getDeletedSign() {
+		return deletedSign;
+	}
+
+	public void setDeletedSign(Integer deletedSign) {
+		this.deletedSign = deletedSign;
+	}
+
 	@Override
 	public void setDemandType(Integer demandType) {
 		// TODO Auto-generated method stub

+ 1 - 1
src/main/java/com/goafanti/demand/service/DemandService.java

@@ -64,7 +64,7 @@ public interface DemandService {
 	
 	List<DemandListBo> getUrgentDemand(int size,String pattern,String showLocation);
 	
-	List<DemandListBo> getHotDemand(int size,String pattern,String showLocation);
+	List<DemandListBo> getHotDemand(int size,String pattern,String showLocation, int deletedSign);
 	
 	List<DemandListBo> areaDemand(int size,String pattern,String showLocation); 
 	

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

@@ -750,9 +750,9 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 	}
 
 	@Override
-	public List<DemandListBo> getHotDemand(int size,String pattern,String showLocation) {
+	public List<DemandListBo> getHotDemand(int size,String pattern,String showLocation, int deletedSign) {
 		// TODO Auto-generated method stub
-		return demandMapper.getHotDemand(size,pattern,showLocation);
+		return demandMapper.getHotDemand(size,pattern,showLocation,deletedSign);
 	}
 
 	@Override
@@ -888,6 +888,11 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 		if(demandListBo.getIndustryCategoryB() !=null) {
 			params.put("industryCategoryB", demandListBo.getIndustryCategoryB());
 		}
+		if(null != demandListBo.getDeletedSign()){
+			params.put("deletedSign", demandListBo.getDeletedSign());
+		}else{
+			params.put("deletedSign", 0);
+		}
 		return params;
 	}
 

+ 7 - 1
src/main/java/com/goafanti/portal/bo/AchievementObject.java

@@ -18,6 +18,7 @@ public class AchievementObject extends InputAchievement {
 	private String categoryS;
 	private String	ownerTypeS;
 	private Integer isHot;
+	private Integer deletedSign;
 	private Date releaseDate;
 	private String interestCount;
 	private String ifInterest;
@@ -105,7 +106,12 @@ public class AchievementObject extends InputAchievement {
 		this.categoryS = categoryS;
 	}
 	
-	
+	public Integer getDeletedSign() {
+		return deletedSign;
+	}
+	public void setDeletedSign(Integer deletedSign) {
+		this.deletedSign = deletedSign;
+	}
 	//override
 	@Override
 	public void setCategory(Integer category) {