Browse Source

back热点管理修改

you.chen 9 years ago
parent
commit
e060c69ed4

+ 3 - 3
src/main/java/com/cloudcross/ssp/model/mapper/placeclass-information.sql.xml

@@ -7,11 +7,11 @@
 		where id = #{id}
 	</select>
 	
-	<select id="findPlaceClassByOperatorId" parameterType="long" resultType="map">
+	<select id="findPlaceClassByOperatorId" parameterType="long" resultType="PlaceClassInformation">
 		select i.id as id, i.name as name from t_place_operator o, t_place_class c, t_place_class_info i
 		where o.place_id = c.place_id and c.class_id = i.id
-		<if test="operatorId != null">
-			o.operator_id = #{operatorId}
+		<if test="_parameter!=null">
+			and o.operator_id = #{_parameter}
 		</if>
 	</select>
 	

+ 1 - 1
src/main/java/com/cloudcross/ssp/service/IPlaceClassInformationService.java

@@ -19,7 +19,7 @@ public interface IPlaceClassInformationService extends IGenericService<PlaceClas
 	 * @param operatorId
 	 * @return
 	 */
-	List<Map<Long, String>> findPlaceClassByOperatorId(Long operatorId);
+	List<PlaceClassInformation> findPlaceClassByOperatorId(Long operatorId);
 	
 	/**
 	 * 查找所有的数聚场景

+ 1 - 1
src/main/java/com/cloudcross/ssp/service/impl/PlaceClassInformationService.java

@@ -61,7 +61,7 @@ public class PlaceClassInformationService implements IPlaceClassInformationServi
 	}
 
 	@Override
-	public List<Map<Long, String>> findPlaceClassByOperatorId(Long operatorId) {
+	public List<PlaceClassInformation> findPlaceClassByOperatorId(Long operatorId) {
 		return myBatisDao.getList("placeClassInformationSqlMapper.findPlaceClassByOperatorId", operatorId);
 	}
 

+ 4 - 3
src/main/java/com/cloudcross/ssp/web/back/main/ap/ApmacController.java

@@ -33,6 +33,7 @@ import com.cloudcross.ssp.common.utils.SqlHelper;
 import com.cloudcross.ssp.model.Account;
 import com.cloudcross.ssp.model.Location;
 import com.cloudcross.ssp.model.Log;
+import com.cloudcross.ssp.model.PlaceClassInformation;
 import com.cloudcross.ssp.model.PlaceOperator;
 import com.cloudcross.ssp.model.Wifi;
 import com.cloudcross.ssp.service.ILocationService;
@@ -272,12 +273,12 @@ public class ApmacController extends SimpleController {
 	 */
 	@RequestMapping("/placeClassName")
 	public @ResponseBody
-	List<Map<Long, String>> placeName(@RequestParam Long operatorId) {
+	List<PlaceClassInformation> placeName(@RequestParam Long operatorId) {
 		if(null == operatorId) {
 			System.out.println("传递的参数为空");
-			return null;
+			return (new ArrayList<PlaceClassInformation>());
 		}
-		List<Map<Long, String>> placeClassNameList = placeClassInformationService.findPlaceClassByOperatorId(operatorId);
+		List<PlaceClassInformation> placeClassNameList = placeClassInformationService.findPlaceClassByOperatorId(operatorId);
 		return placeClassNameList;
 	}