Browse Source

修改sql语句,获取完整的行业

ying.rong 9 years ago
parent
commit
37480dcf92

+ 1 - 1
src/main/java/com/cloudcross/ssp/model/mapper/zone-industry.sql.xml

@@ -13,7 +13,7 @@
 	<select id="findAll" parameterType="long" resultType="com.cloudcross.ssp.model.ZoneIndustry">
 	<select id="findAll" parameterType="long" resultType="com.cloudcross.ssp.model.ZoneIndustry">
 		select t_zone_industry.zone_id as zoneId, t_zone_industry.industry_id as industryId, a.name as industryName, b.name as industryFatherName 
 		select t_zone_industry.zone_id as zoneId, t_zone_industry.industry_id as industryId, a.name as industryName, b.name as industryFatherName 
 		from t_zone_industry, t_industry a, t_industry b
 		from t_zone_industry, t_industry a, t_industry b
-		where t_zone_industry.industry_id = a.id and a.father_id = b.id 
+		where t_zone_industry.industry_id = a.id and (a.father_id = b.id || (a.id = b.id and a.father_id = 0) )
 		and t_zone_industry.zone_id = #{zoneId} and t_zone_industry.status = 0
 		and t_zone_industry.zone_id = #{zoneId} and t_zone_industry.status = 0
 	</select>
 	</select>
 	
 	

+ 1 - 1
src/main/webapp/assets/js/advertiser/advertiser.js

@@ -7,7 +7,7 @@ $(document).ready(function(){
 		$("#selectBar_industry a:first").addClass("selectBar_change");
 		$("#selectBar_industry a:first").addClass("selectBar_change");
 	}
 	}
 	$.ajax({
 	$.ajax({
-		url: ctx+"/widget/selector/provide/industry",
+		url: ctx+"/widget/selector/provide/industry?parentId="+$("#sessionagentId").val(),
 		type: "post",
 		type: "post",
 		contentType: "application/json",
 		contentType: "application/json",
 		dataType:"json",
 		dataType:"json",