public List<hp_public_video> hpPublicVideoBasicList(){
Sql sql = Sqls.create("select video_device_coding,video_name,camera_type,video_lng,video_lat,camera_position_type,manager_phonenumber,video_installation_height from hp_public_video limit 0,1000");
sql.setEntity(dao().getEntity(hp_public_video.class));
sql.setCallback(Sqls.callback.entities());
dao().execute(sql);
List<hp_public_video> list = sql.getList(hp_public_video.class);
return list;
}
@At("/hpPublicVideo/videoBasicMessage")
@Ok("json")
public Object GethpPublicVideoList(){
List<hp_public_video> hpVideoBasicList = null;
try{
if(huPublicVideoService.hpPublicVideoBasicList() != null){
hpVideoBasicList = huPublicVideoService.hpPublicVideoBasicList();
return hpVideoBasicList;
}else{
return "暂无数据或传输出错";
}
}catch (Exception e){
e.printStackTrace();
return "传输错误";
}
}
为什么通过网址访问locallhost:8080//hpPublicVideo/videoBasicMessage? hpPublicVideoBasicList()此 方法会执行2次?