重新修改背景音乐的功能实现,原来的功能不起作用
This commit is contained in:
Binary file not shown.
@@ -50,6 +50,10 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="CSRedisCore, Version=3.8.670.0, Culture=neutral, PublicKeyToken=9aa6a3079358d437, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\lib\Redis\CSRedisCore.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FluentScheduler">
|
||||
<HintPath>..\lib\taskschedule\FluentScheduler.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -66,6 +70,9 @@
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.ValueTuple">
|
||||
<HintPath>..\lib\Redis\System.ValueTuple.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
|
||||
@@ -25,6 +25,7 @@ using Domain;
|
||||
using Newtonsoft.Json;
|
||||
using CommonEntity;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using CSRedis;
|
||||
|
||||
namespace ConsoleApplication2
|
||||
{
|
||||
@@ -241,8 +242,14 @@ namespace ConsoleApplication2
|
||||
}
|
||||
MyHttp.SendHttpData("http://f-xcx.blv-oa.com/rcu/report", resp);
|
||||
}
|
||||
static void RedisTest()
|
||||
{
|
||||
var redis_webchat = new CSRedisClient(string.Format("47.119.147.104:26379" + ",password={0},defaultDatabase=0", "1001^_^lool"));
|
||||
redis_webchat.HMSet("a","b","c");
|
||||
}
|
||||
static void Main(string[] args)
|
||||
{
|
||||
RedisTest();
|
||||
Data();
|
||||
Console.ReadLine();
|
||||
string uuawer = string.Concat("h", "eeeelll");
|
||||
|
||||
@@ -1038,17 +1038,20 @@ namespace RCUHost.Implement
|
||||
|
||||
foreach (string cuid in a)//多个英文逗号隔开
|
||||
{
|
||||
if (!string.IsNullOrEmpty(e))
|
||||
{
|
||||
string ffg = "https://www.boonlive-rcu.com/welcomebgm/" + e;
|
||||
TianMaoOperation.PostWebRequestToTianMao("PushWelcome",
|
||||
Newtonsoft.Json.JsonConvert.SerializeObject(new { HotelId = cuid.Split('&')[0], RoomNo = cuid.Split('&')[1], WelcomeText = b, MusicUrl = ffg }), c, d);//通知天猫精灵播放欢迎词
|
||||
}
|
||||
else
|
||||
{
|
||||
TianMaoOperation.PostWebRequestToTianMao("PushWelcome",
|
||||
Newtonsoft.Json.JsonConvert.SerializeObject(new { HotelId = cuid.Split('&')[0], RoomNo = cuid.Split('&')[1], WelcomeText = b }), c, d);//通知天猫精灵播放欢迎词
|
||||
}
|
||||
//if (!string.IsNullOrEmpty(e))
|
||||
//{
|
||||
// string ffg = "https://www.boonlive-rcu.com/welcomebgm/" + e;
|
||||
// TianMaoOperation.PostWebRequestToTianMao("PushWelcome",
|
||||
// Newtonsoft.Json.JsonConvert.SerializeObject(new { HotelId = cuid.Split('&')[0], RoomNo = cuid.Split('&')[1], WelcomeText = b, MusicUrl = ffg }), c, d);//通知天猫精灵播放欢迎词
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// TianMaoOperation.PostWebRequestToTianMao("PushWelcome",
|
||||
// Newtonsoft.Json.JsonConvert.SerializeObject(new { HotelId = cuid.Split('&')[0], RoomNo = cuid.Split('&')[1], WelcomeText = b }), c, d);//通知天猫精灵播放欢迎词
|
||||
//}
|
||||
|
||||
TianMaoOperation.PostWebRequestToTianMao("PushWelcome",
|
||||
Newtonsoft.Json.JsonConvert.SerializeObject(new { HotelId = cuid.Split('&')[0], RoomNo = cuid.Split('&')[1], WelcomeText = b }), c, d);//通知天猫精灵播放欢迎词
|
||||
|
||||
Interface3Log w1 = new Interface3Log();
|
||||
w1.HotelCode = c;
|
||||
|
||||
@@ -1596,6 +1596,21 @@ namespace RCUHost.Implement
|
||||
hostFaultRecords.Value = fault.Value.Data;
|
||||
hostFaultRecords.Date = now;
|
||||
HostFaultRecordsRepository.Save(hostFaultRecords);
|
||||
|
||||
|
||||
|
||||
XuanZhuResponse resp1 = new XuanZhuResponse()
|
||||
{
|
||||
code = host.SysHotel.Code,
|
||||
roomNumber = host.RoomNumber,
|
||||
address = hostModal.Modal.ModalAddress,
|
||||
name = hostModal.Modal.Name,
|
||||
status = hostModal.Status,
|
||||
faultType = fault.Value.Type,
|
||||
faultData = fault.Value.Data
|
||||
};
|
||||
string KKK = CacheKey.WebChatDeviceFault + "_" + resp1.code + "_" + resp1.roomNumber;
|
||||
CSRedisCacheHelper.redis_webchat.HMSet(KKK, resp1.address, resp1);
|
||||
//出现异常信息时上报
|
||||
if (!string.IsNullOrEmpty(host.SysHotel.FaultPushURL))
|
||||
{
|
||||
|
||||
@@ -968,25 +968,28 @@ namespace RCUHost.Implement
|
||||
|
||||
var b = hhh.SysHotel.WelcomeSpeech;
|
||||
string bb = hhh.SysHotel.WelcomeBGM;
|
||||
if (!string.IsNullOrEmpty(bb))
|
||||
{
|
||||
bb = "https://www.boonlive-rcu.com/welcomebgm/" + bb;
|
||||
}
|
||||
//if (!string.IsNullOrEmpty(bb))
|
||||
//{
|
||||
// bb = "https://www.boonlive-rcu.com/welcomebgm/" + bb;
|
||||
//}
|
||||
var c = hhh.SysHotel.Code;
|
||||
var d = hhh.RoomNumber;
|
||||
|
||||
foreach (string cuid in a)//多个英文逗号隔开
|
||||
{
|
||||
if (!string.IsNullOrEmpty(bb))
|
||||
{
|
||||
TianMaoOperation.PostWebRequestToTianMao("PushWelcome",
|
||||
Newtonsoft.Json.JsonConvert.SerializeObject(new { HotelId = cuid.Split('&')[0], RoomNo = cuid.Split('&')[1], WelcomeText = b, MusicUrl = bb }), c, d);//通知天猫精灵播放欢迎词
|
||||
}
|
||||
else
|
||||
{
|
||||
//if (!string.IsNullOrEmpty(bb))
|
||||
//{
|
||||
// TianMaoOperation.PostWebRequestToTianMao("PushWelcome",
|
||||
// Newtonsoft.Json.JsonConvert.SerializeObject(new { HotelId = cuid.Split('&')[0], RoomNo = cuid.Split('&')[1], WelcomeText = b, MusicUrl = bb }), c, d);//通知天猫精灵播放欢迎词
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// TianMaoOperation.PostWebRequestToTianMao("PushWelcome",
|
||||
// Newtonsoft.Json.JsonConvert.SerializeObject(new { HotelId = cuid.Split('&')[0], RoomNo = cuid.Split('&')[1], WelcomeText = b }), c, d);//通知天猫精灵播放欢迎词
|
||||
//}
|
||||
|
||||
TianMaoOperation.PostWebRequestToTianMao("PushWelcome",
|
||||
Newtonsoft.Json.JsonConvert.SerializeObject(new { HotelId = cuid.Split('&')[0], RoomNo = cuid.Split('&')[1], WelcomeText = b }), c, d);//通知天猫精灵播放欢迎词
|
||||
}
|
||||
|
||||
Interface3Log w1 = new Interface3Log();
|
||||
w1.HotelCode = c;
|
||||
@@ -2121,6 +2124,20 @@ namespace RCUHost.Implement
|
||||
hostFaultRecords.Value = fault.Value.Data;
|
||||
hostFaultRecords.Date = now;
|
||||
HostFaultRecordsRepository.Save(hostFaultRecords);
|
||||
|
||||
|
||||
XuanZhuResponse resp1 = new XuanZhuResponse()
|
||||
{
|
||||
code = host.SysHotel.Code,
|
||||
roomNumber = host.RoomNumber,
|
||||
address = hostModal.Modal.ModalAddress,
|
||||
name = hostModal.Modal.Name,
|
||||
status = hostModal.Status,
|
||||
faultType = fault.Value.Type,
|
||||
faultData = fault.Value.Data
|
||||
};
|
||||
string KKK = CacheKey.WebChatDeviceFault + "_" + resp1.code + "_" + resp1.roomNumber;
|
||||
CSRedisCacheHelper.redis_webchat.HMSet(KKK, resp1.address, resp1);
|
||||
//出现异常信息时上报
|
||||
if (!string.IsNullOrEmpty(host.SysHotel.FaultPushURL))
|
||||
{
|
||||
|
||||
@@ -172,6 +172,7 @@ namespace WebSite.Controllers
|
||||
return Json(new { IsSuccess = true, Message = HttpContext.InnerLanguage("SaveSuccess") });
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 上传BGM
|
||||
/// </summary>
|
||||
@@ -215,6 +216,7 @@ namespace WebSite.Controllers
|
||||
}
|
||||
|
||||
sysHotel.WelcomeBGM = NewFileName;
|
||||
|
||||
SysHotelManager.Update(sysHotel);
|
||||
return Json(new { IsSuccess = true, FileName = NewFileName }, JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
@@ -232,6 +234,22 @@ namespace WebSite.Controllers
|
||||
|
||||
|
||||
|
||||
[Authorize()]
|
||||
public ActionResult DeleteBGM()
|
||||
{
|
||||
try
|
||||
{
|
||||
var sysHotel = SysHotelManager.Get(CurrentHotelID);
|
||||
sysHotel.WelcomeBGM = "";
|
||||
SysHotelManager.Update(sysHotel);
|
||||
return Json(new { IsSuccess = true }, JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return Json(new { IsSuccess = false, Message = ex.Message }, JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 保存第三方对接信息
|
||||
/// </summary>
|
||||
@@ -282,6 +300,12 @@ namespace WebSite.Controllers
|
||||
//sysHotel.TCLAppSecret = entity.TCLAppSecret;
|
||||
SysHotelManager.Update(sysHotel);
|
||||
|
||||
if (!string.IsNullOrEmpty(entity.WelcomeBGM))
|
||||
{
|
||||
string ffg = "https://www.boonlive-rcu.com/welcomebgm/" + entity.WelcomeBGM;
|
||||
TianMaoOperation.PostWebRequestToTianMao("AddOrUpdateWelcomeText",
|
||||
Newtonsoft.Json.JsonConvert.SerializeObject(new { HotelId = CurrentHotelID, MusicUrl = ffg, WelcomeText = entity.WelcomeSpeech }), CurrentHotelCode, "");//通知天猫精灵播放欢迎词
|
||||
}
|
||||
if (sysHotel.IsUseQianLiMa)
|
||||
{
|
||||
QianLiMa_PMS.QiYong(sysHotel.Code, "add");
|
||||
|
||||
@@ -712,7 +712,29 @@ function dockingInfo() {
|
||||
.dialog({ title: lang.DockingInformation, width: 600, height: 380 })
|
||||
.dialog("open");
|
||||
}
|
||||
|
||||
function deletemusic()
|
||||
{
|
||||
$.ajax({
|
||||
url: '/SysHotel/DeleteBGM/',
|
||||
type: 'Post',
|
||||
//contentType: 'application/x-www-form-urlencoded',
|
||||
contentType: 'application/json',
|
||||
//data: JSON.stringify(getdata),
|
||||
data: {},
|
||||
success: function(response) {
|
||||
$("#welcomebgmid").val("");
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.log(error);
|
||||
},
|
||||
beforeSend: function(xhr) {
|
||||
console.log('Sending request...');
|
||||
},
|
||||
complete: function(xhr, status) {
|
||||
console.log('Request completed.');
|
||||
}
|
||||
});
|
||||
}
|
||||
function uploadmusic()
|
||||
{
|
||||
var filename = $("#welcomebgm").val();
|
||||
@@ -725,8 +747,10 @@ function uploadmusic()
|
||||
secureuri: false,
|
||||
fileElementId: "welcomebgm",
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
|
||||
success: function (response) {
|
||||
console.log(response);
|
||||
var fname= response.FileName;
|
||||
$("#welcomebgmid").val(fname);
|
||||
},
|
||||
error: function (data, status, e) {
|
||||
$("#msg").html(e);
|
||||
|
||||
@@ -80,8 +80,9 @@
|
||||
</th>
|
||||
<td colspan="3">
|
||||
<input id="welcomebgmid" name="welcomebgm" value="<%: Model.WelcomeBGM %>" readonly="readonly"/>
|
||||
<input type="file" id="welcomebgm" name="file" size="30" />
|
||||
<input type="file" id="welcomebgm" name="file" size="30" /></br>
|
||||
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-save'" onclick="uploadmusic();">Save</a>
|
||||
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-remove'" onclick="deletemusic();">Remove</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user