public ActionResult DeletePage(long id)
        {
            IShakeAroundService shakeAroundService = _saService;
            List <long>         nums = new List <long>()
            {
                id
            };

            return(Json(new { success = shakeAroundService.DeletePage(nums) }));
        }
 public ShakeAroundController()
 {
     _settings   = ServiceHelper.Create <IVShopService>().GetVShopSetting(base.CurrentSellerManager.ShopId);
     _saService  = ServiceHelper.Create <IShakeAroundService>();
     _poiService = ServiceHelper.Create <IPoiService>();
     try
     {
         _saService.init(_settings.AppId, _settings.AppSecret);
         _poiService.init(_settings.AppId, _settings.AppSecret);
     }
     catch
     {
         _isdeploy = false;
     }
 }
        public ActionResult RemoveRelationship(RemoveRelationshipModel model)
        {
            DeviceModel deviceById = _saService.GetDeviceById(model.id);
            DeviceApply_Data_Device_Identifiers deviceApplyDataDeviceIdentifier = new DeviceApply_Data_Device_Identifiers()
            {
                device_id = long.Parse(deviceById.device_id),
                major     = long.Parse(deviceById.major),
                uuid      = deviceById.uuid,
                minor     = long.Parse(deviceById.minor)
            };
            IShakeAroundService shakeAroundService = _saService;

            long[] numArray = new long[] { model.pageid };
            bool   flag     = shakeAroundService.SetRelationship(deviceApplyDataDeviceIdentifier, numArray, ShakeAroundBindType.解除关联关系);

            return(Json(new { success = flag }));
        }
Пример #4
0
        public ShakeAroundController(IVShopService iVShopService, IShakeAroundService iShakeAroundService, IPoiService iPoiService)
        {
            var _ivshop = iVShopService;

            if (CurrentSellerManager != null)
            {
                this._settings            = _ivshop.GetVShopSetting(CurrentSellerManager.ShopId);
                this._iShakeAroundService = iShakeAroundService;
                this._iPoiService         = iPoiService;
                try
                {
                    this._iShakeAroundService.init(this._settings.AppId, this._settings.AppSecret);
                    this._iPoiService.init(this._settings.AppId, this._settings.AppSecret);
                }
                catch
                {
                    this._isdeploy = false;
                }
            }
        }
        public ActionResult BindRelationship(BindRelationshipModel model)
        {
            DeviceModel deviceById = _saService.GetDeviceById(model.id);
            DeviceApply_Data_Device_Identifiers deviceApplyDataDeviceIdentifier = new DeviceApply_Data_Device_Identifiers()
            {
                device_id = long.Parse(deviceById.device_id),
                major     = long.Parse(deviceById.major),
                uuid      = deviceById.uuid,
                minor     = long.Parse(deviceById.minor)
            };
            IShakeAroundService shakeAroundService = _saService;
            DeviceApply_Data_Device_Identifiers deviceApplyDataDeviceIdentifier1 = deviceApplyDataDeviceIdentifier;
            string str = model.pageids;

            char[] chrArray = new char[] { ',' };
            bool   flag     = shakeAroundService.SetRelationship(deviceApplyDataDeviceIdentifier1, (
                                                                     from p in str.Split(chrArray)
                                                                     select long.Parse(p)).ToArray(), ShakeAroundBindType.建立关联关系);

            return(Json(new { success = flag }));
        }