针对华亿的部署过程中,增加日志配置
parent
5458043bf4
commit
4f38626837
|
|
@ -100,7 +100,7 @@ public class ProCache extends ResultMapUtils {
|
|||
ProConfig.EZUIZ_APPKEY = map.get("ezuiz.app.key");
|
||||
|
||||
ProConfig.EZUIZ_APPSECRET = map.get("ezuiz.app.secret");
|
||||
|
||||
|
||||
//配置加载完成后初始化token
|
||||
EzuizService.refreshToken();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,13 +41,14 @@ public class ProConfig {
|
|||
public static String EZUIZ_APPKEY = "";
|
||||
|
||||
public static String EZUIZ_APPSECRET = "";
|
||||
|
||||
public static String BD_MAP_AK = "";
|
||||
|
||||
public final static String PAGE_SIZE = PropertiesUtil.getProperty("page.size");
|
||||
|
||||
public final static String DEV_MODE = PropertiesUtil.getProperty("dev.mode");
|
||||
|
||||
public final static String BD_API_GEOCODER = PropertiesUtil.getProperty("bd.api.geocoder");
|
||||
|
||||
|
||||
// public final static String SENSOR_ICON_SELF_FLAG = PropertiesUtil.getProperty("sensor.icon.self.flag") ;
|
||||
|
||||
public static class Mail{
|
||||
|
|
|
|||
|
|
@ -175,8 +175,10 @@ public class FileInfoController extends BaseController {
|
|||
// 转存文件
|
||||
file.transferTo(new File(filePath));
|
||||
// 返回所有值
|
||||
LogUtil4j.debugLogger.debug("save file: ({})", filePath);
|
||||
putData(resultMap, relativeFilePath+"/"+newFileName) ;
|
||||
} catch (Exception e) {
|
||||
} catch (Exception e) {
|
||||
LogUtil.errorLog(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,26 +1,20 @@
|
|||
package com.lp.controller;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import com.lp.bo.SysConfigInfoBO;
|
||||
import com.lp.cache.ProCache;
|
||||
import com.lp.common.Code;
|
||||
import com.lp.common.Constants;
|
||||
import com.lp.common.RequestURL;
|
||||
import com.lp.util.LogUtil4j;
|
||||
import com.lp.util.ObjectUtil;
|
||||
import com.lp.util.ResultMapUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Map;
|
||||
|
||||
@Controller
|
||||
|
||||
|
|
@ -66,6 +60,7 @@ public class SysConfigInfoController extends BaseController {
|
|||
Map<String, Object> resultMap = getResultMap();
|
||||
try {
|
||||
resultMap = service.selectOne("SysConfigInfo.selectOne", new SysConfigInfoBO(id));
|
||||
LogUtil4j.debugLogger.debug("SysConfigInfo.selectOne with ({}), ret: ({})", id, resultMap);
|
||||
} catch (Exception e) {
|
||||
exception(e, resultMap, id);
|
||||
}
|
||||
|
|
@ -82,6 +77,7 @@ public class SysConfigInfoController extends BaseController {
|
|||
SysConfigInfoBO info = new SysConfigInfoBO();
|
||||
info.setName(key);
|
||||
resultMap = service.selectOne("SysConfigInfo.selectOneByCondition", info);
|
||||
LogUtil4j.debugLogger.debug("SysConfigInfo.selectOneByCondition with ({}), ret: ({})", key, resultMap);
|
||||
} catch (Exception e) {
|
||||
exception(e, resultMap, key);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -390,7 +390,7 @@ public class UserController extends BaseController {
|
|||
} catch (Exception e) {
|
||||
super.exception(e, resultMap);
|
||||
}
|
||||
LogUtil4j.debugLogger.debug("login response with name: ({})---{}", user.getName(), resultMap);
|
||||
LogUtil4j.debugLogger.debug("login response with name: ({}-{})---{}{}", user.getName(), user.getUser_key(), user.getType(), resultMap);
|
||||
return getModelAndView(resp, resultMap);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -56,9 +56,9 @@ public class IotNodeInfoController extends BaseController {
|
|||
Map<String, Object> resultMap = getResultMap();
|
||||
try {
|
||||
UserInfoBO user = getUserInfoByUserKey(userKey);
|
||||
// if(user.getType() != Code.UserType.SUPER ){
|
||||
if(user.getType() != Code.UserType.SUPER + 0 ){
|
||||
obj.setUser_id(user.getId());
|
||||
// }
|
||||
}
|
||||
resultMap = service.selectPageList("IotNodeInfo.selectPage",getPageBean(paged,pageSize), obj);
|
||||
} catch (Exception e) {
|
||||
exception(e,resultMap, obj);
|
||||
|
|
@ -80,7 +80,9 @@ public class IotNodeInfoController extends BaseController {
|
|||
Map<String, Object> resultMap = getResultMap();
|
||||
try {
|
||||
UserInfoBO user = getUserInfoByUserKey(userKey);
|
||||
obj.setUser_id(user.getId());
|
||||
if(user.getType() != Code.UserType.SUPER + 0 ){
|
||||
obj.setUser_id(user.getId());
|
||||
}
|
||||
resultMap = service.selectList("IotNodeInfo.selectStatisticNodeInfo", obj) ;
|
||||
} catch (Exception e) {
|
||||
exception(e,resultMap, obj);
|
||||
|
|
@ -347,10 +349,13 @@ public class IotNodeInfoController extends BaseController {
|
|||
@RequestHeader(value = ResultMapUtils.USER_KEY, required = true) String userKey ,
|
||||
@RequestBody IotNodeInfoBO obj) {
|
||||
Map<String, Object> resultMap = getResultMap();
|
||||
LogUtil4j.debugLogger.debug("request with userKey: ({})", userKey);
|
||||
try {
|
||||
UserInfoBO user = getUserInfoByUserKey(userKey);
|
||||
obj.setUser_id(user.getId());
|
||||
resultMap = service.selectList("IotNodeInfo.selectNodeSensorList", obj);
|
||||
if(user.getType() != Code.UserType.SUPER + 0){
|
||||
obj.setUser_id(user.getId());
|
||||
}
|
||||
resultMap = service.selectList("IotNodeInfo.selectNodeSensorList", obj);
|
||||
|
||||
} catch (Exception e) {
|
||||
exception(e,resultMap, obj);
|
||||
|
|
@ -371,7 +376,9 @@ public class IotNodeInfoController extends BaseController {
|
|||
|
||||
try {
|
||||
UserInfoBO user = getUserInfoByUserKey(userKey);
|
||||
obj.setUser_id(user.getId());
|
||||
if(user.getType() != Code.UserType.SUPER + 0){
|
||||
obj.setUser_id(user.getId());
|
||||
}
|
||||
LogUtil4j.debugLogger.debug("selectNodeSensorListPages is called with {}", obj);
|
||||
resultMap = service.selectPageList("IotNodeInfo.selectNodeSensorList",getPageBean(paged,pageSize), obj);
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
|
|
@ -48,9 +48,9 @@ public class IotSceneInfoController extends BaseController {
|
|||
Map<String, Object> resultMap = getResultMap();
|
||||
try {
|
||||
UserInfoBO user = getUserInfoByUserKey(userKey);
|
||||
// if(user.getType() != Code.UserType.SUPER ){
|
||||
if(user.getType() != Code.UserType.SUPER + 0 ){
|
||||
obj.setUser_id(user.getId());
|
||||
// }
|
||||
}
|
||||
resultMap = service.selectPageList("IotSceneInfo.select",getPageBean(paged,pageSize), obj);
|
||||
} catch (Exception e) {
|
||||
exception(e,resultMap, obj);
|
||||
|
|
|
|||
|
|
@ -434,8 +434,10 @@ public class IotSensorInfoController extends BaseController {
|
|||
Map<String, Object> resultMap = getResultMap();
|
||||
try {
|
||||
UserInfoBO user = getUserInfoByUserKey(userKey);
|
||||
obj.setUser_id(user.getId());
|
||||
resultMap = service.selectList("IotSensorInfo.selectLonLatSensorInfo", obj);
|
||||
if(user.getType() != Code.UserType.SUPER + 0){
|
||||
obj.setUser_id(user.getId());
|
||||
}
|
||||
resultMap = service.selectList("IotSensorInfo.selectLonLatSensorInfo", obj);
|
||||
} catch (Exception e) {
|
||||
exception(e,resultMap, obj);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import com.lp.bo.UserInfoBO;
|
|||
import com.lp.common.Code;
|
||||
import com.lp.common.Constants;
|
||||
import com.lp.common.ErrorCodeEnum;
|
||||
import com.lp.common.UrlIotVisual;
|
||||
import com.lp.controller.BaseController;
|
||||
import com.lp.util.CommonUtil;
|
||||
import com.lp.util.ObjectUtil;
|
||||
|
|
@ -25,7 +26,7 @@ import java.util.*;
|
|||
*/
|
||||
@Controller
|
||||
public class IotVisualDisplayInfoController extends BaseController {
|
||||
@RequestMapping(method = {org.springframework.web.bind.annotation.RequestMethod.POST}, value = {"/page/visual/display"})
|
||||
@RequestMapping(method = {org.springframework.web.bind.annotation.RequestMethod.POST}, value = {UrlIotVisual.IotVisualDisplayInfo.IOT_VISUAL_DISPLAY_INFO_PAGE})
|
||||
public ModelAndView selectPage(HttpServletResponse response, @RequestHeader(value = "USER-KEY", required = true) String userKey, @RequestBody IotVisualDisplayInfoBO obj, @RequestParam(required = false) Integer pageSize, @RequestParam Integer paged) {
|
||||
Map resultMap = getResultMap();
|
||||
try {
|
||||
|
|
@ -36,7 +37,7 @@ public class IotVisualDisplayInfoController extends BaseController {
|
|||
return getModelAndView(response, resultMap);
|
||||
}
|
||||
|
||||
@RequestMapping(method = {org.springframework.web.bind.annotation.RequestMethod.POST}, value = {"/visual/display/sub/all"})
|
||||
@RequestMapping(method = {org.springframework.web.bind.annotation.RequestMethod.POST}, value = {UrlIotVisual.IotVisualDisplayInfo.IOT_VISUAL_SUB_ALL})
|
||||
public ModelAndView selectList(HttpServletResponse response, @RequestHeader(value = "USER-KEY", required = true) String userKey, @RequestBody IotVisualDisplayInfoBO obj) {
|
||||
Map resultMap = getResultMap();
|
||||
try {
|
||||
|
|
@ -59,7 +60,7 @@ public class IotVisualDisplayInfoController extends BaseController {
|
|||
return getModelAndView(response, resultMap);
|
||||
}
|
||||
|
||||
@RequestMapping(method = {org.springframework.web.bind.annotation.RequestMethod.POST}, value = {"/visual/display"})
|
||||
@RequestMapping(method = {org.springframework.web.bind.annotation.RequestMethod.POST}, value = {UrlIotVisual.IotVisualDisplayInfo.IOT_VISUAL_DISPLAY_INFO})
|
||||
public ModelAndView save(HttpServletResponse response, @RequestHeader(value = "USER-KEY", required = true) String userKey, @RequestBody IotVisualDisplayInfoBO obj) {
|
||||
Map resultMap = getResultMap();
|
||||
try {
|
||||
|
|
@ -103,7 +104,7 @@ public class IotVisualDisplayInfoController extends BaseController {
|
|||
return getModelAndView(response, resultMap);
|
||||
}
|
||||
|
||||
@RequestMapping(method = {org.springframework.web.bind.annotation.RequestMethod.GET}, value = {"/visual/display"})
|
||||
@RequestMapping(method = {org.springframework.web.bind.annotation.RequestMethod.GET}, value = {UrlIotVisual.IotVisualDisplayInfo.IOT_VISUAL_DISPLAY_INFO})
|
||||
public ModelAndView selectOne(HttpServletResponse response, @RequestParam(required = false) Integer id, @RequestParam(required = false) String keycode) {
|
||||
Map resultMap = getResultMap();
|
||||
try {
|
||||
|
|
@ -146,7 +147,7 @@ public class IotVisualDisplayInfoController extends BaseController {
|
|||
return null;
|
||||
}
|
||||
|
||||
@RequestMapping(method = {org.springframework.web.bind.annotation.RequestMethod.POST}, value = {"/visual/login"})
|
||||
@RequestMapping(method = {org.springframework.web.bind.annotation.RequestMethod.POST}, value = {UrlIotVisual.IotVisualDisplayInfo.IOT_VISUAL_LOGIN})
|
||||
public ModelAndView visualLogin(HttpServletResponse response, @RequestBody IotVisualDisplayInfoBO obj) {
|
||||
Map resultMap = getResultMap();
|
||||
try {
|
||||
|
|
@ -169,7 +170,7 @@ public class IotVisualDisplayInfoController extends BaseController {
|
|||
return getModelAndView(response, resultMap);
|
||||
}
|
||||
|
||||
@RequestMapping(method = {org.springframework.web.bind.annotation.RequestMethod.PUT}, value = {"/visual/display"})
|
||||
@RequestMapping(method = {org.springframework.web.bind.annotation.RequestMethod.PUT}, value = {UrlIotVisual.IotVisualDisplayInfo.IOT_VISUAL_DISPLAY_INFO})
|
||||
public ModelAndView update(HttpServletResponse response, @RequestHeader(value = "USER-KEY", required = true) String userKey, @RequestBody IotVisualDisplayInfoBO obj) {
|
||||
Map resultMap = getResultMap();
|
||||
try {
|
||||
|
|
@ -197,7 +198,7 @@ public class IotVisualDisplayInfoController extends BaseController {
|
|||
return getModelAndView(response, resultMap);
|
||||
}
|
||||
|
||||
@RequestMapping(method = {org.springframework.web.bind.annotation.RequestMethod.DELETE}, value = {"/visual/display"})
|
||||
@RequestMapping(method = {org.springframework.web.bind.annotation.RequestMethod.DELETE}, value = {UrlIotVisual.IotVisualDisplayInfo.IOT_VISUAL_DISPLAY_INFO})
|
||||
public ModelAndView delete(HttpServletResponse response, @RequestParam Integer id) {
|
||||
Map resultMap = getResultMap();
|
||||
try {
|
||||
|
|
@ -215,7 +216,7 @@ public class IotVisualDisplayInfoController extends BaseController {
|
|||
return getModelAndView(response, resultMap);
|
||||
}
|
||||
|
||||
@RequestMapping(method = {org.springframework.web.bind.annotation.RequestMethod.POST}, value = {"/scene/visual"})
|
||||
@RequestMapping(method = {org.springframework.web.bind.annotation.RequestMethod.POST}, value = {UrlIotVisual.IotVisualDisplayInfo.IOT_VISUAL_DISPLAY_SCENE})
|
||||
public ModelAndView selectScene(HttpServletResponse response, @RequestHeader(value = "USER-KEY", required = true) String userKey, @RequestBody IotVisualDisplayInfoBO obj) {
|
||||
Map resultMap = getResultMap();
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.lp.bo.IotVisualMoudleInfoBO;
|
|||
import com.lp.bo.UserInfoBO;
|
||||
import com.lp.common.Code;
|
||||
import com.lp.common.Constants;
|
||||
import com.lp.common.UrlIotVisual;
|
||||
import com.lp.controller.BaseController;
|
||||
import com.lp.util.ObjectUtil;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
|
@ -24,7 +25,7 @@ import java.util.Map;
|
|||
@Controller
|
||||
public class IotVisualMoudleInfoController extends BaseController
|
||||
{
|
||||
@RequestMapping(method={org.springframework.web.bind.annotation.RequestMethod.POST}, value={"/page/moudle/visual"})
|
||||
@RequestMapping(method={org.springframework.web.bind.annotation.RequestMethod.POST}, value={UrlIotVisual.IotVisualMoudleInfo.IOT_VISUAL_MOUDLE_INFO_PAGE})
|
||||
public ModelAndView selectPage(HttpServletResponse response, @RequestHeader(value="USER-KEY", required=true) String userKey, @RequestBody IotVisualMoudleInfoBO obj, @RequestParam(required=false) Integer pageSize, @RequestParam Integer paged)
|
||||
{
|
||||
Map resultMap = getResultMap();
|
||||
|
|
@ -40,7 +41,7 @@ public class IotVisualMoudleInfoController extends BaseController
|
|||
return getModelAndView(response, resultMap);
|
||||
}
|
||||
|
||||
@RequestMapping(method={org.springframework.web.bind.annotation.RequestMethod.POST}, value={"/moudle/visual"})
|
||||
@RequestMapping(method={org.springframework.web.bind.annotation.RequestMethod.POST}, value={UrlIotVisual.IotVisualMoudleInfo.IOT_VISUAL_MOUDLE_INFO})
|
||||
public ModelAndView save(HttpServletResponse response, @RequestHeader(value="USER-KEY", required=true) String userKey, @RequestBody IotVisualMoudleInfoBO obj)
|
||||
{
|
||||
Map resultMap = getResultMap();
|
||||
|
|
@ -55,7 +56,7 @@ public class IotVisualMoudleInfoController extends BaseController
|
|||
return getModelAndView(response, resultMap);
|
||||
}
|
||||
|
||||
@RequestMapping(method={org.springframework.web.bind.annotation.RequestMethod.GET}, value={"/moudle/visual"})
|
||||
@RequestMapping(method={org.springframework.web.bind.annotation.RequestMethod.GET}, value={UrlIotVisual.IotVisualMoudleInfo.IOT_VISUAL_MOUDLE_INFO})
|
||||
public ModelAndView selectOne(HttpServletResponse response, @RequestParam Integer id)
|
||||
{
|
||||
Map resultMap = getResultMap();
|
||||
|
|
@ -67,7 +68,7 @@ public class IotVisualMoudleInfoController extends BaseController
|
|||
return getModelAndView(response, resultMap);
|
||||
}
|
||||
|
||||
@RequestMapping(method={org.springframework.web.bind.annotation.RequestMethod.PUT}, value={"/moudle/visual"})
|
||||
@RequestMapping(method={org.springframework.web.bind.annotation.RequestMethod.PUT}, value={UrlIotVisual.IotVisualMoudleInfo.IOT_VISUAL_MOUDLE_INFO})
|
||||
public ModelAndView update(HttpServletResponse response, @RequestBody IotVisualMoudleInfoBO obj)
|
||||
{
|
||||
Map resultMap = getResultMap();
|
||||
|
|
@ -79,7 +80,7 @@ public class IotVisualMoudleInfoController extends BaseController
|
|||
return getModelAndView(response, resultMap);
|
||||
}
|
||||
|
||||
@RequestMapping(method={org.springframework.web.bind.annotation.RequestMethod.DELETE}, value={"/moudle/visual"})
|
||||
@RequestMapping(method={org.springframework.web.bind.annotation.RequestMethod.DELETE}, value={UrlIotVisual.IotVisualMoudleInfo.IOT_VISUAL_MOUDLE_INFO})
|
||||
public ModelAndView delete(HttpServletResponse response, @RequestParam Integer id)
|
||||
{
|
||||
Map resultMap = getResultMap();
|
||||
|
|
|
|||
|
|
@ -1,11 +1,17 @@
|
|||
package com.lp.controller.iot;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.lp.bo.IotSceneInfoBO;
|
||||
import com.lp.bo.IotSensorInfoBO;
|
||||
import com.lp.bo.IotVideoInfoBO;
|
||||
import com.lp.bo.UserInfoBO;
|
||||
import com.lp.cache.CacheName;
|
||||
import com.lp.cache.ProCacheUtil;
|
||||
import com.lp.common.Code;
|
||||
import com.lp.common.CodeIot;
|
||||
import com.lp.controller.BaseController;
|
||||
import com.lp.service.IotOtherInfoService;
|
||||
import com.lp.util.CommonUtil;
|
||||
import com.lp.util.ObjectUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
|
|
@ -14,21 +20,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import com.lp.bo.IotSceneInfoBO;
|
||||
import com.lp.bo.IotSensorInfoBO;
|
||||
import com.lp.bo.IotVideoInfoBO;
|
||||
import com.lp.bo.UserInfoBO;
|
||||
import com.lp.bo.VideoFileInfoBO;
|
||||
import com.lp.cache.CacheName;
|
||||
import com.lp.cache.ProCacheUtil;
|
||||
import com.lp.common.Code;
|
||||
import com.lp.common.CodeIot;
|
||||
import com.lp.common.Constants;
|
||||
import com.lp.controller.BaseController;
|
||||
import com.lp.service.IotOtherInfoService;
|
||||
import com.lp.util.CommonUtil;
|
||||
import com.lp.util.ObjectUtil;
|
||||
import com.lp.util.PageBean;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@Controller
|
||||
|
|
@ -150,7 +144,9 @@ public class IotWebViewController extends BaseController {
|
|||
}
|
||||
UserInfoBO user = getUserInfoBySession(req);
|
||||
IotSceneInfoBO obj = new IotSceneInfoBO();
|
||||
obj.setUser_id(user.getId());
|
||||
if(user.getType() != Code.UserType.SUPER) {
|
||||
obj.setUser_id(user.getId());
|
||||
}
|
||||
resultData = service.selectPageList("IotSceneInfo.select",getPageBean(1,200), obj);
|
||||
}catch (Exception e) {
|
||||
exception(e, resultData);
|
||||
|
|
@ -170,7 +166,9 @@ public class IotWebViewController extends BaseController {
|
|||
try{
|
||||
UserInfoBO user = getUserInfoBySession(req);
|
||||
IotSceneInfoBO obj = new IotSceneInfoBO();
|
||||
obj.setUser_id(user.getId());
|
||||
if(user.getType() != Code.UserType.SUPER) {
|
||||
obj.setUser_id(user.getId());
|
||||
}
|
||||
resultData = service.selectPageList("IotSceneInfo.select",getPageBean(1,200), obj);
|
||||
}catch (Exception e) {
|
||||
exception(e, resultData);
|
||||
|
|
@ -241,7 +239,9 @@ public class IotWebViewController extends BaseController {
|
|||
try{
|
||||
UserInfoBO user = getUserInfoBySession(req);
|
||||
IotSceneInfoBO obj = new IotSceneInfoBO();
|
||||
obj.setUser_id(user.getId());
|
||||
if(user.getType() != Code.UserType.SUPER) {
|
||||
obj.setUser_id(user.getId());
|
||||
}
|
||||
resultData = service.selectPageList("IotSceneInfo.select",getPageBean(1,200), obj);
|
||||
}catch (Exception e) {
|
||||
exception(e, resultData);
|
||||
|
|
@ -261,7 +261,9 @@ public class IotWebViewController extends BaseController {
|
|||
try{
|
||||
UserInfoBO user = getUserInfoBySession(req);
|
||||
IotSceneInfoBO obj = new IotSceneInfoBO();
|
||||
obj.setUser_id(user.getId());
|
||||
if(user.getType() != Code.UserType.SUPER) {
|
||||
obj.setUser_id(user.getId());
|
||||
}
|
||||
resultData = service.selectPageList("IotSceneInfo.select",getPageBean(1,200), obj);
|
||||
}catch (Exception e) {
|
||||
exception(e, resultData);
|
||||
|
|
@ -281,7 +283,9 @@ public class IotWebViewController extends BaseController {
|
|||
try{
|
||||
UserInfoBO user = getUserInfoBySession(req);
|
||||
IotSceneInfoBO obj = new IotSceneInfoBO();
|
||||
obj.setUser_id(user.getId());
|
||||
if(user.getType() != Code.UserType.SUPER) {
|
||||
obj.setUser_id(user.getId());
|
||||
}
|
||||
resultData = service.selectPageList("IotSceneInfo.select",getPageBean(1,200), obj);
|
||||
}catch (Exception e) {
|
||||
exception(e, resultData);
|
||||
|
|
@ -301,7 +305,9 @@ public class IotWebViewController extends BaseController {
|
|||
try{
|
||||
UserInfoBO user = getUserInfoBySession(req);
|
||||
IotSceneInfoBO obj = new IotSceneInfoBO();
|
||||
obj.setUser_id(user.getId());
|
||||
if(user.getType() != Code.UserType.SUPER) {
|
||||
obj.setUser_id(user.getId());
|
||||
}
|
||||
resultData = service.selectPageList("IotSceneInfo.select",getPageBean(1,200), obj);
|
||||
}catch (Exception e) {
|
||||
exception(e, resultData);
|
||||
|
|
@ -321,7 +327,9 @@ public class IotWebViewController extends BaseController {
|
|||
try{
|
||||
UserInfoBO user = getUserInfoBySession(req);
|
||||
IotSceneInfoBO obj = new IotSceneInfoBO();
|
||||
obj.setUser_id(user.getId());
|
||||
if(user.getType() != Code.UserType.SUPER) {
|
||||
obj.setUser_id(user.getId());
|
||||
}
|
||||
resultData = service.selectPageList("IotSceneInfo.select",getPageBean(1,200), obj);
|
||||
}catch (Exception e) {
|
||||
exception(e, resultData);
|
||||
|
|
@ -341,7 +349,9 @@ public class IotWebViewController extends BaseController {
|
|||
try{
|
||||
UserInfoBO user = getUserInfoBySession(req);
|
||||
IotSceneInfoBO obj = new IotSceneInfoBO();
|
||||
obj.setUser_id(user.getId());
|
||||
if(user.getType() != Code.UserType.SUPER) {
|
||||
obj.setUser_id(user.getId());
|
||||
}
|
||||
resultData = service.selectPageList("IotSceneInfo.select",getPageBean(1,200), obj);
|
||||
}catch (Exception e) {
|
||||
exception(e, resultData);
|
||||
|
|
@ -365,7 +375,9 @@ public class IotWebViewController extends BaseController {
|
|||
}
|
||||
UserInfoBO user = getUserInfoBySession(req);
|
||||
IotSceneInfoBO obj = new IotSceneInfoBO();
|
||||
obj.setUser_id(user.getId());
|
||||
if(user.getType() != Code.UserType.SUPER) {
|
||||
obj.setUser_id(user.getId());
|
||||
}
|
||||
resultData = service.selectPageList("IotSceneInfo.select",getPageBean(1,200), obj);
|
||||
}catch (Exception e) {
|
||||
exception(e, resultData);
|
||||
|
|
@ -389,7 +401,9 @@ public class IotWebViewController extends BaseController {
|
|||
}
|
||||
UserInfoBO user = getUserInfoBySession(req);
|
||||
IotSceneInfoBO obj = new IotSceneInfoBO();
|
||||
obj.setUser_id(user.getId());
|
||||
if(user.getType() != Code.UserType.SUPER) {
|
||||
obj.setUser_id(user.getId());
|
||||
}
|
||||
resultData = service.selectPageList("IotSceneInfo.select",getPageBean(1,200), obj);
|
||||
}catch (Exception e) {
|
||||
exception(e, resultData);
|
||||
|
|
@ -413,7 +427,9 @@ public class IotWebViewController extends BaseController {
|
|||
}
|
||||
UserInfoBO user = getUserInfoBySession(req);
|
||||
IotSceneInfoBO obj = new IotSceneInfoBO();
|
||||
obj.setUser_id(user.getId());
|
||||
if(user.getType() != Code.UserType.SUPER) {
|
||||
obj.setUser_id(user.getId());
|
||||
}
|
||||
resultData = service.selectPageList("IotSceneInfo.select",getPageBean(1,200), obj);
|
||||
}catch (Exception e) {
|
||||
exception(e, resultData);
|
||||
|
|
@ -468,7 +484,9 @@ public class IotWebViewController extends BaseController {
|
|||
try{
|
||||
UserInfoBO user = getUserInfoBySession(req);
|
||||
IotVideoInfoBO obj = new IotVideoInfoBO();
|
||||
obj.setUser_id(user.getId());
|
||||
if(user.getType() != Code.UserType.SUPER) {
|
||||
obj.setUser_id(user.getId());
|
||||
}
|
||||
obj.setScene_id(sid);
|
||||
resultData = service.selectPageList("IotVideoInfo.selectPage",getPageBean(1,200), obj);
|
||||
req.setAttribute("videoId", id);
|
||||
|
|
|
|||
|
|
@ -1,22 +1,16 @@
|
|||
package com.lp.service.impl;
|
||||
|
||||
import com.lp.bo.*;
|
||||
import com.lp.common.Code;
|
||||
import com.lp.common.CodeIot;
|
||||
import com.lp.service.IotOtherInfoService;
|
||||
import com.lp.util.ObjectUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.lp.bo.CommonInfoBO;
|
||||
import com.lp.bo.IotAlarmInfoBO;
|
||||
import com.lp.bo.IotNodeInfoBO;
|
||||
import com.lp.bo.IotSceneInfoBO;
|
||||
import com.lp.bo.IotSensorInfoBO;
|
||||
import com.lp.bo.IotTriggerInfoBO;
|
||||
import com.lp.bo.UserInfoBO;
|
||||
import com.lp.common.CodeIot;
|
||||
import com.lp.service.IotOtherInfoService;
|
||||
import com.lp.util.ObjectUtil;
|
||||
|
||||
@Service
|
||||
public class IotOtherInfoServiceImpl extends BaseServiceImpl implements IotOtherInfoService {
|
||||
|
||||
|
|
@ -26,7 +20,9 @@ public class IotOtherInfoServiceImpl extends BaseServiceImpl implements IotOther
|
|||
try{
|
||||
// 场景数据
|
||||
IotSceneInfoBO obj = new IotSceneInfoBO();
|
||||
obj.setUser_id( user.getId() );
|
||||
if(user.getType() != Code.UserType.SUPER) {
|
||||
obj.setUser_id( user.getId() );
|
||||
}
|
||||
Integer num = dao.selectCount("IotSceneInfo.selectCount", obj);
|
||||
if(ObjectUtil.isEmpty(num)){
|
||||
num = 0;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,233 @@
|
|||
package com.lp.util;
|
||||
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.codehaus.jackson.JsonGenerationException;
|
||||
import org.codehaus.jackson.map.JsonMappingException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.management.ManagementFactory;
|
||||
import java.lang.management.RuntimeMXBean;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class LogUtil4j {
|
||||
|
||||
// public static Log otherLogger = LogFactory.getLog("other");
|
||||
public static Logger otherLogger = LoggerFactory.getLogger("other");
|
||||
public static Logger debugLogger = LoggerFactory.getLogger("debug");
|
||||
private final static Log LOGGER = LogFactory.getLog(LogUtil4j.class);
|
||||
|
||||
private static RuntimeMXBean runtimeMXBean=ManagementFactory.getRuntimeMXBean();
|
||||
|
||||
public static void errorLog(Exception e){
|
||||
e.printStackTrace();
|
||||
errorLog(e.getLocalizedMessage());
|
||||
}
|
||||
|
||||
//日志记录错误信息
|
||||
public static void errorLog(String errorMessage){
|
||||
StringBuffer sb=new StringBuffer();
|
||||
sb.append("pid:");
|
||||
sb.append(getPid());
|
||||
sb.append(",");
|
||||
sb.append(getClassName());
|
||||
sb.append(".");
|
||||
sb.append(getMethodName());
|
||||
sb.append("(");
|
||||
sb.append(getClassNameWithoutPackageName());
|
||||
sb.append(".java:");
|
||||
sb.append(getLineNumber());
|
||||
sb.append("),");
|
||||
sb.append("error:");
|
||||
sb.append(errorMessage);
|
||||
LOGGER.error(sb.toString());
|
||||
}
|
||||
//日志记录错误信息
|
||||
public static void errorLog(Object[] parametersName,Object[]parametersValue,String errorMessage){
|
||||
StringBuffer sb=new StringBuffer();
|
||||
sb.append("pid:");
|
||||
sb.append(getPid());
|
||||
sb.append(",");
|
||||
sb.append(getClassName());
|
||||
sb.append(".");
|
||||
sb.append(getMethodName());
|
||||
sb.append("(");
|
||||
sb.append(getClassNameWithoutPackageName());
|
||||
sb.append(".java:");
|
||||
sb.append(getLineNumber());
|
||||
sb.append("),");
|
||||
sb.append("parameters:[");
|
||||
sb.append(getPatameters(parametersName,parametersValue).toString());
|
||||
sb.append("],error:");
|
||||
sb.append(errorMessage);
|
||||
LOGGER.error(sb.toString());
|
||||
}
|
||||
|
||||
//日志记录信息
|
||||
public static void infoLog(String msg){
|
||||
StringBuffer sb=new StringBuffer();
|
||||
sb.append("pid:");
|
||||
sb.append(getPid());
|
||||
sb.append(",");
|
||||
sb.append(getClassName());
|
||||
sb.append(".");
|
||||
sb.append(getMethodName());
|
||||
sb.append("(");
|
||||
sb.append(getClassNameWithoutPackageName());
|
||||
sb.append(".java:");
|
||||
sb.append(getLineNumber());
|
||||
sb.append("),");
|
||||
sb.append("info:");
|
||||
sb.append(msg);
|
||||
LOGGER.info(sb.toString());
|
||||
}
|
||||
//日志记录信息
|
||||
public static void infoLog(Object[] parametersName,Object[]parametersValue,String msg){
|
||||
StringBuffer sb=new StringBuffer();
|
||||
sb.append("pid:");
|
||||
sb.append(getPid());
|
||||
sb.append(",");
|
||||
sb.append(getClassName());
|
||||
sb.append(".");
|
||||
sb.append(getMethodName());
|
||||
sb.append("(");
|
||||
sb.append(getClassNameWithoutPackageName());
|
||||
sb.append(".java:");
|
||||
sb.append(getLineNumber());
|
||||
sb.append("),");
|
||||
sb.append("parameters:[");
|
||||
sb.append(getPatameters(parametersName,parametersValue).toString());
|
||||
sb.append("],info:");
|
||||
sb.append(msg);
|
||||
LOGGER.info(sb.toString());
|
||||
}
|
||||
|
||||
|
||||
public static void debugLog(String msg, Object... var) {
|
||||
StringBuffer sb=new StringBuffer();
|
||||
sb.append(getClassName());
|
||||
sb.append(".");
|
||||
sb.append(getMethodName());
|
||||
sb.append("(");
|
||||
sb.append(getClassNameWithoutPackageName());
|
||||
sb.append(".java:");
|
||||
sb.append(getLineNumber());
|
||||
sb.append("), debug msg: ");
|
||||
debugLogger.debug(sb + msg, var);
|
||||
}
|
||||
|
||||
public static void debugerrorLog(String msg, Object var, Throwable var1) {
|
||||
StringBuffer sb=new StringBuffer();
|
||||
sb.append(getClassName());
|
||||
sb.append(".");
|
||||
sb.append(getMethodName());
|
||||
sb.append("(");
|
||||
sb.append(getClassNameWithoutPackageName());
|
||||
sb.append(".java:");
|
||||
sb.append(getLineNumber());
|
||||
sb.append("), error msg: ");
|
||||
debugLogger.debug(sb + msg, var, var1);
|
||||
}
|
||||
|
||||
//获取当前进程号
|
||||
private static String getPid(){
|
||||
return runtimeMXBean.getName().split("@")[0];
|
||||
}
|
||||
//获取当前运行类的类名(带包名称)
|
||||
private static String getClassName(){
|
||||
return Thread.currentThread().getStackTrace()[3].getClassName();
|
||||
}
|
||||
//获取当前运行类的的方法名
|
||||
private static String getMethodName(){
|
||||
return Thread.currentThread().getStackTrace()[3].getMethodName();
|
||||
}
|
||||
//获取类实现的接口集合
|
||||
@SuppressWarnings("unused")
|
||||
private static Class<?>[] getInterfaces(){
|
||||
Class<?>[] interfaces=getCurrentClass().getInterfaces();
|
||||
return interfaces;
|
||||
}
|
||||
//获取当前运行类的class 对象
|
||||
private static Class<?> getCurrentClass(){
|
||||
Class<?> currentClass=null;
|
||||
try {
|
||||
//通过类名称加载一个类来获取到当前类实例
|
||||
currentClass=Class.forName(Thread.currentThread().getStackTrace()[3].getClassName());
|
||||
} catch (ClassNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return currentClass;
|
||||
|
||||
}
|
||||
//获取当前运行类的行号
|
||||
private static int getLineNumber(){
|
||||
return Thread.currentThread().getStackTrace()[3].getLineNumber();
|
||||
}
|
||||
//获取当前运行类的类名(不含包名称)
|
||||
private static String getClassNameWithoutPackageName(){
|
||||
String []str=Thread.currentThread().getStackTrace()[3].getClassName().split("\\.");
|
||||
return str[str.length-1];
|
||||
}
|
||||
|
||||
//根据不同的参数类型,获取到相应的参数名,参数值
|
||||
private static StringBuffer getPatameters(Object[] parametersName,Object[]parametersValue){
|
||||
StringBuffer sb=new StringBuffer();
|
||||
for(int i=0;i<parametersName.length;i++){
|
||||
//如果是List类型
|
||||
if(parametersValue[i] instanceof List){
|
||||
sb.append(parametersValue[i].getClass().getName());
|
||||
sb.append(":");
|
||||
String json;
|
||||
try {
|
||||
json = JsonMarshaller.marshal(parametersValue[i]);
|
||||
sb.append(json+" ");
|
||||
} catch (JsonGenerationException e) {
|
||||
e.printStackTrace();
|
||||
} catch (JsonMappingException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
else if(!(parametersValue[i] instanceof Integer)&&
|
||||
!(parametersValue[i] instanceof Double)&&
|
||||
!(parametersValue[i] instanceof Long)&&
|
||||
!(parametersValue[i] instanceof String)&&
|
||||
parametersValue[i] instanceof Object){
|
||||
sb.append(parametersValue[i].getClass().getName());
|
||||
sb.append(":");
|
||||
try {
|
||||
String json=JsonMarshaller.marshal(parametersValue[i]);
|
||||
sb.append(json+" ");
|
||||
} catch (JsonGenerationException e1) {
|
||||
e1.printStackTrace();
|
||||
} catch (JsonMappingException e1) {
|
||||
e1.printStackTrace();
|
||||
} catch (IOException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
}else{
|
||||
if(parametersValue[i]!=null){
|
||||
sb.append("\""+parametersName[i]+"\"");
|
||||
sb.append(":");
|
||||
|
||||
if(parametersValue[i] instanceof String){
|
||||
sb.append("\""+parametersValue[i]+"\"");
|
||||
}else{
|
||||
sb.append(parametersValue[i]);
|
||||
}
|
||||
sb.append(" ");
|
||||
}
|
||||
}
|
||||
}
|
||||
return sb;
|
||||
}
|
||||
|
||||
public static void main(String[]args) throws InterruptedException{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -8,7 +8,7 @@ jdbc.defaultAutoCommit=true
|
|||
#jdbc.url=jdbc:mysql://192.168.3.5:35007/easyiot?characterEncoding=utf8&serverTimezone=Asia/Shanghai
|
||||
|
||||
#\u6D4B\u8BD5 2
|
||||
#jdbc.url=jdbc:mysql://192.168.1.222:3306/easyiot?characterEncoding=utf8&serverTimezone=Asia/Shanghai
|
||||
jdbc.url=jdbc:mysql://192.168.1.222:3306/easyiot?characterEncoding=utf8&serverTimezone=Asia/Shanghai
|
||||
|
||||
jdbc.username=easyiot
|
||||
|
||||
|
|
@ -16,7 +16,7 @@ jdbc.username=easyiot
|
|||
#jdbc.password=easyiot
|
||||
|
||||
#\u6D4B\u8BD5 2
|
||||
#jdbc.password=nnSf2aySKrt7xe6z
|
||||
jdbc.password=nnSf2aySKrt7xe6z
|
||||
|
||||
#\u8FDE\u63A5\u521D\u59CB\u503C\uFF0C\u8FDE\u63A5\u6C60\u542F\u52A8\u65F6\u521B\u5EFA\u7684\u8FDE\u63A5\u6570\u91CF\u7684\u521D\u59CB\u503C \u9ED8\u8BA4\u503C\u662F0
|
||||
jdbc.initialSize=10
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
|
||||
baidu.map.api.key=UnI0GOGcgAwxelY1n4WIENQ94NSgrglB
|
||||
baidu.map.api.key=f84xfiBjzaCFapazazcgWo6QTIGX0n9e
|
||||
|
|
@ -3,14 +3,14 @@
|
|||
#mp \u516C\u4F17\u53F7\u914D\u7F6E
|
||||
#weixin.mp.appid=wxcda55f09127119f9
|
||||
#weixin.mp.appid=wxff7e4d874e52241a
|
||||
#weixin.mp.appid=wx00b6998a595762a0
|
||||
weixin.mp.appid=wx00b6998a595762a0
|
||||
#weixin.mp.secret=f126999b83b902b697aaee8c7128839c
|
||||
#weixin.mp.secret=acb909da964498dc9b1b76c1031aaca9
|
||||
#weixin.mp.secret=c6700a2962dae167ef4dac3b9494357e
|
||||
weixin.mp.secret=c6700a2962dae167ef4dac3b9494357e
|
||||
weixin.mp.token=iotadmin
|
||||
#weixin.mp.aesKey=71AJPXUTBFje7YctbndixEoNrUfQxyHH56EWoRlY8Cd
|
||||
#weixin.mp.aesKey=7MhltzJjl4J7E9YbY5lk3azXBx4LmuZX9Cl7lkLyaH5
|
||||
#weixin.mp.aesKey=o0EXvGbPWG4F24WiibiiUw0Sn7su3FrOfOjNg9i3JFL
|
||||
weixin.mp.aesKey=o0EXvGbPWG4F24WiibiiUw0Sn7su3FrOfOjNg9i3JFL
|
||||
|
||||
#mch \u5546\u6237 \u4FE1\u606F
|
||||
weixin.mp.mch.id=1523933151
|
||||
|
|
@ -18,7 +18,7 @@ weixin.mp.mch.key=
|
|||
|
||||
#\u8BF7\u6C42URL
|
||||
#local.domain=https://iotadmin.segsvip.com
|
||||
#local.domain=https://iot.hy-ec.cn
|
||||
local.domain=https://iot.hy-ec.cn
|
||||
#
|
||||
# local.domain=http://127.0.0.1:8080/lpro
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#############################################################################
|
||||
log4j.rootLogger=DEBUG,LOG_FILE
|
||||
log4j.rootLogger=INFO,LOG_FILE
|
||||
log4j.additivity.org.apache=true
|
||||
|
||||
#spring \u53EA\u6253 INFO \u4FE1\u606F
|
||||
|
|
@ -47,7 +47,7 @@ log4j.appender.CONSOLE.layout.ConversionPattern=%d %p [%t] %C.%M(%F:%L) - %m%n
|
|||
#FileAppender
|
||||
log4j.appender.LOG_FILE=org.apache.log4j.RollingFileAppender
|
||||
log4j.appender.LOG_FILE.Threshold=DEBUG
|
||||
log4j.appender.LOG_FILE.File=/data/lpro/logs/lpro.log
|
||||
log4j.appender.LOG_FILE.File=/data/hyiot/logs/hyiot.log
|
||||
log4j.appender.LOG_FILE.MaxFileSize=4096KB
|
||||
log4j.appender.LOG_FILE.Append=true
|
||||
log4j.appender.LOG_FILE.MaxBackupIndex=40
|
||||
|
|
@ -59,7 +59,7 @@ log4j.appender.LOG_FILE.layout.ConversionPattern=%d %p [%t] %C.%M(%F:%L) - %m%n
|
|||
# SQL\u65E5\u5FD7
|
||||
log4j.logger.sql=DEBUG,sql
|
||||
log4j.appender.sql=org.apache.log4j.DailyRollingFileAppender
|
||||
log4j.appender.sql.File=/data/lpro/logs/sql.log
|
||||
log4j.appender.sql.File=/data/hyiot/logs/sql.log
|
||||
log4j.appender.sql.DatePattern='_'yyyy-MM-dd'.log'
|
||||
log4j.appender.sql.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.sql.layout.ConversionPattern=%d %p [%c %L %l] - %m%n
|
||||
|
|
@ -68,7 +68,7 @@ log4j.additivity.sql=false
|
|||
#\u5176\u4ED6\u884C\u4E3A\u7684\u65E5\u5FD7\u6587\u4EF6\uFF0C\u5982\u652F\u4ED8\u8BB0\u5F55\u7B49
|
||||
log4j.logger.other=DEBUG,other
|
||||
log4j.appender.other=org.apache.log4j.DailyRollingFileAppender
|
||||
log4j.appender.other.File=/data/lpro/logs/other.log
|
||||
log4j.appender.other.File=/data/hyiot/logs/other.log
|
||||
log4j.appender.other.DatePattern='_'yyyy-MM-dd'.log'
|
||||
log4j.appender.other.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.other.layout.ConversionPattern=%d %p %C.%M(%F:%L) - %m%n
|
||||
|
|
@ -79,7 +79,7 @@ log4j.additivity.other=false
|
|||
#\u5176\u4ED6\u884C\u4E3A\u7684\u65E5\u5FD7\u6587\u4EF6\uFF0C\u5982\u652F\u4ED8\u8BB0\u5F55\u7B49
|
||||
log4j.logger.debug=DEBUG, debug
|
||||
log4j.appender.debug=org.apache.log4j.DailyRollingFileAppender
|
||||
log4j.appender.debug.File=/data/lpro/logs/debug.log
|
||||
log4j.appender.debug.File=/data/hyiot/logs/debug.log
|
||||
log4j.appender.debug.DatePattern='_'yyyy-MM-dd'.log'
|
||||
log4j.appender.debug.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.debug.layout.ConversionPattern=%d %p %C.%M(%F:%L) - %m%n
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -15,7 +15,7 @@
|
|||
<script src="../../lib/element-ui/index.js"></script>
|
||||
<script type="text/javascript" src="../../lib/layer/layer.js"></script>
|
||||
|
||||
<script type="text/javascript" src="https://api.map.baidu.com/api?v=3.0&ak=q5uqiBY29eEu0wNIAPoCXwq1HvUmDzqP"></script>
|
||||
<script type="text/javascript" src="https://api.map.baidu.com/api?v=3.0&ak=f84xfiBjzaCFapazazcgWo6QTIGX0n9e"></script>
|
||||
<script>
|
||||
var map;
|
||||
var scene_id='';
|
||||
|
|
|
|||
|
|
@ -112,11 +112,11 @@
|
|||
connectTimeout: 4000, // 超时时间
|
||||
// 认证信息
|
||||
clientId: 'brower_' + parseInt(Math.random()/31.1*10000000000),
|
||||
username: mqttUserName ,
|
||||
password: mqttPassword ,
|
||||
username: 'yinzy' ,
|
||||
password: 'yzy123456' ,
|
||||
}
|
||||
client = mqtt.connect(mqttUrl, options) ;
|
||||
// client = mqtt.connect('ws://'+document.domain+':8083/mqtt', options) ;
|
||||
// client = mqtt.connect(mqttUrl, options) ;
|
||||
client = mqtt.connect('wss://'+document.domain+'/mqtt', options) ;
|
||||
client.on('reconnect', function(error) {
|
||||
console.log("reconnect");
|
||||
})
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
|
||||
<link rel="stylesheet" href="./css/index.css">
|
||||
<link rel="stylesheet" href="../../lib/iview/dist/styles/iview.css">
|
||||
|
||||
<script src="../common/util.js"></script>
|
||||
|
||||
<script src="../../lib/bigscreen/lib/jquery/jquery-1.9.1.min.js"></script>
|
||||
|
|
@ -13,7 +12,7 @@
|
|||
<script src="../../lib/bigscreen/js/vue.min.js"></script>
|
||||
<script src="../../lib/iview/dist/iview.js"></script>
|
||||
<script src="../../lib/echarts/echarts.min.js"></script>
|
||||
<script src="https://api.map.baidu.com/api?v=3.0&ak=q5uqiBY29eEu0wNIAPoCXwq1HvUmDzqP"></script>
|
||||
<script type="text/javascript" src="https://api.map.baidu.com/api?v=3.0&ak=f84xfiBjzaCFapazazcgWo6QTIGX0n9e"></script>
|
||||
<script type="text/javascript" src="../../lib/mqtt/mqtt.min.js"></script>
|
||||
<script>
|
||||
function fun_date(num) {
|
||||
|
|
@ -445,12 +444,12 @@
|
|||
connectTimeout: 4000, // 超时时间
|
||||
// 认证信息
|
||||
clientId: 'brower_' + parseInt(Math.random()/31.1*10000000000),
|
||||
username: mqttUserName ,
|
||||
password: mqttPassword ,
|
||||
protocol: 'ws',
|
||||
username: 'yinzy',
|
||||
password: 'yzy123456',
|
||||
// protocol: 'ws',
|
||||
}
|
||||
client = mqtt.connect(mqttUrl, options) ;
|
||||
// client = mqtt.connect('ws://'+document.domain+':8083/mqtt', options) ;
|
||||
// client = mqtt.connect(mqttUrl, options) ;
|
||||
client = mqtt.connect('wss://'+document.domain+'/mqtt', options) ;
|
||||
client.on('reconnect', function(error) {
|
||||
console.log("reconnect " + error);
|
||||
})
|
||||
|
|
@ -834,7 +833,6 @@
|
|||
}
|
||||
},
|
||||
created(){
|
||||
console.log('yzy created with %s %s %s', id, ucode, mqttUserName);
|
||||
let that=this
|
||||
that.getTableData()
|
||||
that.getDevDots()
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
<script type="text/jscript" src="lib/transform/jquery.transformable.js"></script>
|
||||
|
||||
<script type="text/jscript" src="lib/wangEditor/wangEditor.min.js"></script>
|
||||
<script type="text/javascript" src="https://api.map.baidu.com/api?v=3.0&ak=q5uqiBY29eEu0wNIAPoCXwq1HvUmDzqP"></script>
|
||||
<script type="text/javascript" src="https://api.map.baidu.com/api?v=3.0&ak=f84xfiBjzaCFapazazcgWo6QTIGX0n9e"></script>
|
||||
|
||||
<script type="text/jscript" src="lib/wangEditor/wangEditor.min.js"></script>
|
||||
|
||||
|
|
@ -1300,6 +1300,7 @@
|
|||
function (e) {
|
||||
if(isOK(e)){
|
||||
that.imgObjList = e.data.data ;
|
||||
console.log('handleChange imgObjList %o', that.imgObjList);
|
||||
setTimeout(function(){
|
||||
cfg.activeMenuNode($(".upload_img_ele"));
|
||||
}, 500);
|
||||
|
|
@ -1761,6 +1762,7 @@
|
|||
commonAjax('GET', baseurl+'/service/dictionary/130' , "" ,function (res) {
|
||||
if(isOK(res)){
|
||||
that.visualPartList = res.data ;
|
||||
console.log('initVisualPart %o', that.visualPartList);
|
||||
}
|
||||
}) ;
|
||||
},
|
||||
|
|
@ -1769,6 +1771,7 @@
|
|||
commonAjax('POST', baseurl+'/service/visual/display/sub/all' , data ,function (res) {
|
||||
if(isOK(res)){
|
||||
that.visualList = res.data ;
|
||||
console.log('initVisualListInfo %o', that.visualList);
|
||||
}
|
||||
}) ;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
<script type="text/javascript" src="./lib/layer/layer.js"></script>
|
||||
|
||||
<script type="text/javascript" src="https://api.map.baidu.com/api?v=3.0&ak=q5uqiBY29eEu0wNIAPoCXwq1HvUmDzqP"></script>
|
||||
<script type="text/javascript" src="https://api.map.baidu.com/api?v=3.0&ak=f84xfiBjzaCFapazazcgWo6QTIGX0n9e"></script>
|
||||
<!-- 视频播放 -->
|
||||
<script src="https://open.ys7.com/sdk/js/1.3/ezuikit.js"></script>
|
||||
<script type="text/javascript" src="../../lib/echarts/echarts.min.js"></script>
|
||||
|
|
@ -189,11 +189,11 @@
|
|||
connectTimeout: 4000, // 超时时间
|
||||
// 认证信息
|
||||
clientId: 'brower_' + parseInt(Math.random()/31.1*10000000000),
|
||||
username: mqttUserName ,
|
||||
password: mqttPassword ,
|
||||
username: 'yinzy' ,
|
||||
password: 'yzy123456' ,
|
||||
}
|
||||
// client = mqtt.connect('ws://'+document.domain+':8083/mqtt', options) ;
|
||||
client = mqtt.connect(mqttUrl, options) ;
|
||||
client = mqtt.connect('wss://'+document.domain+'/mqtt', options) ;
|
||||
// client = mqtt.connect(mqttUrl, options) ;
|
||||
client.on('reconnect', function(error) {
|
||||
console.log("reconnect");
|
||||
})
|
||||
|
|
|
|||
|
|
@ -2,3 +2,26 @@ GET http://iotadmin.segsvip.com/service/weixin/mp/msg?signature=582562ac83d3f558
|
|||
Accept: application/json
|
||||
|
||||
###
|
||||
GET {host1}/service/gen/dictionary
|
||||
Accept: application/json
|
||||
USER-KEY: 9229178248074d40b2168b27d77d9dff
|
||||
#Authorization: 9229178248074d40b2168b27d77d9dff
|
||||
Content-Type: application/json
|
||||
|
||||
|
||||
###
|
||||
GET {{host}}/service/gen/dictionary
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
USER-KEY: 426aad8a150a4d85a8fa7221085edca3
|
||||
|
||||
|
||||
|
||||
|
||||
###
|
||||
GET {{host}}/service/sys/confog/info
|
||||
Accept: */*
|
||||
Content-Type: application/x-www-form-urlencoded
|
||||
USER-KEY: {{userkey}}
|
||||
|
||||
id=2
|
||||
Loading…
Reference in New Issue