Commit fcc6e899 authored by 黄奎's avatar 黄奎

页面修改

parent f07a1611
...@@ -25,23 +25,23 @@ namespace Edu.ThirdCore.TenCloud ...@@ -25,23 +25,23 @@ namespace Edu.ThirdCore.TenCloud
/// <returns></returns> /// <returns></returns>
public async Task<(bool result, string message)> SetUserToCCCUser(Employee_ViewModel employee) public async Task<(bool result, string message)> SetUserToCCCUser(Employee_ViewModel employee)
{ {
CreateStaffRequest req = new CreateStaffRequest(); CreateStaffRequest req = new CreateStaffRequest
req.SdkAppId = SDKAPPID; {
SeatUserInfo seatUserInfo1 = new SeatUserInfo(); SdkAppId = SDKAPPID
seatUserInfo1.Name = employee.EmployeeName; };
seatUserInfo1.Mail = employee.Email; SeatUserInfo seatUserInfo1 = new SeatUserInfo
seatUserInfo1.Phone = employee.EmployeeTel; {
seatUserInfo1.Nick = employee.EmployeeName.ToCharArray()[0] + "老师"; Name = employee.EmployeeName,
seatUserInfo1.UserId = employee.Id.ToString(); Mail = employee.Email,
seatUserInfo1.StaffNumber = employee.Id.ToString(); Phone = employee.EmployeeTel,
Nick = employee.EmployeeName.ToCharArray()[0] + "老师",
UserId = employee.Id.ToString(),
StaffNumber = employee.Id.ToString()
};
req.Staffs = new SeatUserInfo[] { seatUserInfo1 }; req.Staffs = new SeatUserInfo[] { seatUserInfo1 };
var credential = TenCloudCredential._instance; var credential = TenCloudCredential._instance;
CreateStaffResponse resp = credential.CreateStaffSync(req); CreateStaffResponse resp = credential.CreateStaffSync(req);
//JObject result = JObject.Parse(AbstractModel.ToJsonString(resp)); if (resp.ErrorStaffList != null && resp.ErrorStaffList.Length > 0)
if (resp.ErrorStaffList!=null && resp.ErrorStaffList.Length>0)
{ {
return (false, resp.ErrorStaffList[0].Message); return (false, resp.ErrorStaffList[0].Message);
} }
...@@ -63,10 +63,12 @@ namespace Edu.ThirdCore.TenCloud ...@@ -63,10 +63,12 @@ namespace Edu.ThirdCore.TenCloud
public void SetTenUserStaffSkillGroupList(string mail, long?[] list) public void SetTenUserStaffSkillGroupList(string mail, long?[] list)
{ {
var credential = TenCloudCredential._instance; var credential = TenCloudCredential._instance;
BindStaffSkillGroupListRequest req = new BindStaffSkillGroupListRequest(); BindStaffSkillGroupListRequest req = new BindStaffSkillGroupListRequest
req.SdkAppId = SDKAPPID; {
req.StaffEmail = mail; SdkAppId = SDKAPPID,
req.SkillGroupList = list; StaffEmail = mail,
SkillGroupList = list
};
BindStaffSkillGroupListResponse resp = credential.BindStaffSkillGroupListSync(req); BindStaffSkillGroupListResponse resp = credential.BindStaffSkillGroupListSync(req);
} }
...@@ -77,10 +79,12 @@ namespace Edu.ThirdCore.TenCloud ...@@ -77,10 +79,12 @@ namespace Edu.ThirdCore.TenCloud
public long?[] QueryDescribeSkillGroup() public long?[] QueryDescribeSkillGroup()
{ {
var credential = TenCloudCredential._instance; var credential = TenCloudCredential._instance;
DescribeSkillGroupInfoListRequest req = new DescribeSkillGroupInfoListRequest(); DescribeSkillGroupInfoListRequest req = new DescribeSkillGroupInfoListRequest
req.SdkAppId = SDKAPPID; {
req.PageSize = 1; SdkAppId = SDKAPPID,
req.PageNumber = 100; PageSize = 1,
PageNumber = 100
};
DescribeSkillGroupInfoListResponse resp = credential.DescribeSkillGroupInfoListSync(req); DescribeSkillGroupInfoListResponse resp = credential.DescribeSkillGroupInfoListSync(req);
if (resp.SkillGroupList != null && resp.SkillGroupList.Length > 0) if (resp.SkillGroupList != null && resp.SkillGroupList.Length > 0)
{ {
...@@ -100,11 +104,12 @@ namespace Edu.ThirdCore.TenCloud ...@@ -100,11 +104,12 @@ namespace Edu.ThirdCore.TenCloud
public async Task<(bool result, string message)> DelUserToCCCUser(Employee_ViewModel employee) public async Task<(bool result, string message)> DelUserToCCCUser(Employee_ViewModel employee)
{ {
var credential = TenCloudCredential._instance; var credential = TenCloudCredential._instance;
DeleteStaffRequest req = new DeleteStaffRequest(); DeleteStaffRequest req = new DeleteStaffRequest
req.SdkAppId = SDKAPPID; {
req.StaffList = new string[] { employee.Email }; SdkAppId = SDKAPPID,
StaffList = new string[] { employee.Email }
};
DeleteStaffResponse resp = credential.DeleteStaffSync(req); DeleteStaffResponse resp = credential.DeleteStaffSync(req);
return (resp.OnlineStaffList == null, ""); return (resp.OnlineStaffList == null, "");
} }
...@@ -116,14 +121,15 @@ namespace Edu.ThirdCore.TenCloud ...@@ -116,14 +121,15 @@ namespace Edu.ThirdCore.TenCloud
{ {
var credential = TenCloudCredential._instance; var credential = TenCloudCredential._instance;
var tenCccTokenItem = new TenCccTokenItem(); var tenCccTokenItem = new TenCccTokenItem();
CreateSDKLoginTokenRequest req = new CreateSDKLoginTokenRequest(); CreateSDKLoginTokenRequest req = new CreateSDKLoginTokenRequest
req.SdkAppId = SDKAPPID; {
req.SeatUserId = mail; SdkAppId = SDKAPPID,
SeatUserId = mail
};
CreateSDKLoginTokenResponse resp = credential.CreateSDKLoginTokenSync(req); CreateSDKLoginTokenResponse resp = credential.CreateSDKLoginTokenSync(req);
tenCccTokenItem.SdkURL = resp.SdkURL; tenCccTokenItem.SdkURL = resp.SdkURL;
tenCccTokenItem.Token = resp.Token; tenCccTokenItem.Token = resp.Token;
return tenCccTokenItem; return tenCccTokenItem;
} }
} }
} }
...@@ -47,7 +47,8 @@ namespace Edu.WebApi.Controllers.QYWeChat ...@@ -47,7 +47,8 @@ namespace Edu.WebApi.Controllers.QYWeChat
var userInfo = base.UserInfo; var userInfo = base.UserInfo;
JObject parms = JObject.Parse(base.RequestParm.Msg.ToString()); JObject parms = JObject.Parse(base.RequestParm.Msg.ToString());
int Type = parms.GetInt("Type", 0);//平台类型 int Type = parms.GetInt("Type", 0);//平台类型
if (Type <= 0) { if (Type <= 0)
{
return ApiResult.ParamIsNull(); return ApiResult.ParamIsNull();
} }
...@@ -68,16 +69,20 @@ namespace Edu.WebApi.Controllers.QYWeChat ...@@ -68,16 +69,20 @@ namespace Edu.WebApi.Controllers.QYWeChat
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public ApiResult SetContributeConfigInfo() { public ApiResult SetContributeConfigInfo()
{
var userInfo = base.UserInfo; var userInfo = base.UserInfo;
RB_Contribute_Config_ViewModel demodel = JsonHelper.DeserializeObject<RB_Contribute_Config_ViewModel>(base.RequestParm.Msg.ToString()); RB_Contribute_Config_ViewModel demodel = JsonHelper.DeserializeObject<RB_Contribute_Config_ViewModel>(base.RequestParm.Msg.ToString());
if (string.IsNullOrEmpty(demodel.Name)) { if (string.IsNullOrEmpty(demodel.Name))
{
return ApiResult.ParamIsNull("请传递对象名称"); return ApiResult.ParamIsNull("请传递对象名称");
} }
if (string.IsNullOrEmpty(demodel.AppId)) { if (string.IsNullOrEmpty(demodel.AppId))
{
return ApiResult.ParamIsNull("请传递对象appid"); return ApiResult.ParamIsNull("请传递对象appid");
} }
if (string.IsNullOrEmpty(demodel.AppSecret)) { if (string.IsNullOrEmpty(demodel.AppSecret))
{
return ApiResult.ParamIsNull("请传递对象秘钥"); return ApiResult.ParamIsNull("请传递对象秘钥");
} }
...@@ -92,7 +97,8 @@ namespace Edu.WebApi.Controllers.QYWeChat ...@@ -92,7 +97,8 @@ namespace Edu.WebApi.Controllers.QYWeChat
{ {
return ApiResult.Success(); return ApiResult.Success();
} }
else { else
{
return ApiResult.Failed(msg); return ApiResult.Failed(msg);
} }
} }
...@@ -265,7 +271,8 @@ namespace Edu.WebApi.Controllers.QYWeChat ...@@ -265,7 +271,8 @@ namespace Edu.WebApi.Controllers.QYWeChat
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public ApiResult SetContributeMediumInfo() { public ApiResult SetContributeMediumInfo()
{
var userInfo = base.UserInfo; var userInfo = base.UserInfo;
RB_Contribute_Medium_ViewModel demodel = JsonHelper.DeserializeObject<RB_Contribute_Medium_ViewModel>(base.RequestParm.Msg.ToString()); RB_Contribute_Medium_ViewModel demodel = JsonHelper.DeserializeObject<RB_Contribute_Medium_ViewModel>(base.RequestParm.Msg.ToString());
if (demodel.Id <= 0) if (demodel.Id <= 0)
...@@ -289,10 +296,6 @@ namespace Edu.WebApi.Controllers.QYWeChat ...@@ -289,10 +296,6 @@ namespace Edu.WebApi.Controllers.QYWeChat
if (demodel.Type == ContributeMediumTypeEnum.Video) if (demodel.Type == ContributeMediumTypeEnum.Video)
{ {
return ApiResult.ParamIsNull("视频暂无法上传"); return ApiResult.ParamIsNull("视频暂无法上传");
//if (string.IsNullOrEmpty(demodel.VideoImage) && string.IsNullOrEmpty(demodel.VideoWXImage))
//{
// return ApiResult.ParamIsNull("请传递视频封面图");
//}
} }
if (demodel.Type != ContributeMediumTypeEnum.Image) if (demodel.Type != ContributeMediumTypeEnum.Image)
{ {
...@@ -302,13 +305,17 @@ namespace Edu.WebApi.Controllers.QYWeChat ...@@ -302,13 +305,17 @@ namespace Edu.WebApi.Controllers.QYWeChat
} }
} }
} }
else { else
{
//修改 图片 音频只能修改标题 视频可修改封面图 + 介绍 + 标题 //修改 图片 音频只能修改标题 视频可修改封面图 + 介绍 + 标题
if (string.IsNullOrEmpty(demodel.MediaName)) { if (string.IsNullOrEmpty(demodel.MediaName))
{
return ApiResult.ParamIsNull("请传递标题"); return ApiResult.ParamIsNull("请传递标题");
} }
if (demodel.Type == ContributeMediumTypeEnum.Video) { if (demodel.Type == ContributeMediumTypeEnum.Video)
if (string.IsNullOrEmpty(demodel.VideoWXImage)) { {
if (string.IsNullOrEmpty(demodel.VideoWXImage))
{
return ApiResult.ParamIsNull("请传递视频封面图"); return ApiResult.ParamIsNull("请传递视频封面图");
} }
} }
...@@ -325,7 +332,8 @@ namespace Edu.WebApi.Controllers.QYWeChat ...@@ -325,7 +332,8 @@ namespace Edu.WebApi.Controllers.QYWeChat
{ {
return ApiResult.Success(); return ApiResult.Success();
} }
else { else
{
return ApiResult.Failed(msg); return ApiResult.Failed(msg);
} }
} }
...@@ -348,15 +356,18 @@ namespace Edu.WebApi.Controllers.QYWeChat ...@@ -348,15 +356,18 @@ namespace Edu.WebApi.Controllers.QYWeChat
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public ApiResult SetContributeMediumMoveGroup() { public ApiResult SetContributeMediumMoveGroup()
{
var userInfo = base.UserInfo; var userInfo = base.UserInfo;
JObject parms = JObject.Parse(base.RequestParm.Msg.ToString()); JObject parms = JObject.Parse(base.RequestParm.Msg.ToString());
string MediumIds = parms.GetStringValue("MediumIds");// 素材Ids 英文逗号分隔 string MediumIds = parms.GetStringValue("MediumIds");// 素材Ids 英文逗号分隔
int MediumGroupId = parms.GetInt("MediumGroupId", 0);//新分组的ID int MediumGroupId = parms.GetInt("MediumGroupId", 0);//新分组的ID
if (string.IsNullOrEmpty(MediumIds)) { if (string.IsNullOrEmpty(MediumIds))
{
return ApiResult.ParamIsNull("请传递素材ID"); return ApiResult.ParamIsNull("请传递素材ID");
} }
if (MediumGroupId <= 0) { if (MediumGroupId <= 0)
{
return ApiResult.ParamIsNull("请传递素材分组ID"); return ApiResult.ParamIsNull("请传递素材分组ID");
} }
...@@ -365,7 +376,8 @@ namespace Edu.WebApi.Controllers.QYWeChat ...@@ -365,7 +376,8 @@ namespace Edu.WebApi.Controllers.QYWeChat
{ {
return ApiResult.Success(); return ApiResult.Success();
} }
else { else
{
return ApiResult.Failed(msg); return ApiResult.Failed(msg);
} }
} }
...@@ -375,7 +387,8 @@ namespace Edu.WebApi.Controllers.QYWeChat ...@@ -375,7 +387,8 @@ namespace Edu.WebApi.Controllers.QYWeChat
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public ApiResult DelContributeMediumBatch() { public ApiResult DelContributeMediumBatch()
{
var userInfo = base.UserInfo; var userInfo = base.UserInfo;
JObject parms = JObject.Parse(base.RequestParm.Msg.ToString()); JObject parms = JObject.Parse(base.RequestParm.Msg.ToString());
string MediumIds = parms.GetStringValue("MediumIds");// 素材Ids 英文逗号分隔 string MediumIds = parms.GetStringValue("MediumIds");// 素材Ids 英文逗号分隔
...@@ -415,11 +428,13 @@ namespace Edu.WebApi.Controllers.QYWeChat ...@@ -415,11 +428,13 @@ namespace Edu.WebApi.Controllers.QYWeChat
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public ApiResult SetContributeImageText() { public ApiResult SetContributeImageText()
{
var userInfo = base.UserInfo; var userInfo = base.UserInfo;
JObject parms = JObject.Parse(base.RequestParm.Msg.ToString()); JObject parms = JObject.Parse(base.RequestParm.Msg.ToString());
string filePath = parms.GetStringValue("filePath");//临时文件路径 string filePath = parms.GetStringValue("filePath");//临时文件路径
if (string.IsNullOrEmpty(filePath)) { if (string.IsNullOrEmpty(filePath))
{
return ApiResult.Failed("请传递文件路径"); return ApiResult.Failed("请传递文件路径");
} }
...@@ -567,7 +582,8 @@ namespace Edu.WebApi.Controllers.QYWeChat ...@@ -567,7 +582,8 @@ namespace Edu.WebApi.Controllers.QYWeChat
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public ApiResult GetMyContributeInfoPageList() { public ApiResult GetMyContributeInfoPageList()
{
var userInfo = base.UserInfo; var userInfo = base.UserInfo;
ResultPageModel pmodel = JsonHelper.DeserializeObject<ResultPageModel>(base.RequestParm.Msg.ToString()); ResultPageModel pmodel = JsonHelper.DeserializeObject<ResultPageModel>(base.RequestParm.Msg.ToString());
RB_Contribute_Info_ViewModel demodel = JsonHelper.DeserializeObject<RB_Contribute_Info_ViewModel>(base.RequestParm.Msg.ToString()); RB_Contribute_Info_ViewModel demodel = JsonHelper.DeserializeObject<RB_Contribute_Info_ViewModel>(base.RequestParm.Msg.ToString());
...@@ -600,7 +616,7 @@ namespace Edu.WebApi.Controllers.QYWeChat ...@@ -600,7 +616,7 @@ namespace Edu.WebApi.Controllers.QYWeChat
x.IsSendCommission, x.IsSendCommission,
x.CommissionMoney, x.CommissionMoney,
x.UpdateBy, x.UpdateBy,
UpdateByName = Cache.User.UserReidsCache.GetUserLoginInfo(x.UpdateBy)?.AccountName??"", UpdateByName = Cache.User.UserReidsCache.GetUserLoginInfo(x.UpdateBy)?.AccountName ?? "",
UpdateTime = x.UpdateTime.ToString("yyyy-MM-dd HH:mm") UpdateTime = x.UpdateTime.ToString("yyyy-MM-dd HH:mm")
}); });
return ApiResult.Success("", pmodel); return ApiResult.Success("", pmodel);
...@@ -611,11 +627,13 @@ namespace Edu.WebApi.Controllers.QYWeChat ...@@ -611,11 +627,13 @@ namespace Edu.WebApi.Controllers.QYWeChat
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public ApiResult GetContributeInfo() { public ApiResult GetContributeInfo()
{
var userInfo = base.UserInfo; var userInfo = base.UserInfo;
JObject prams = JObject.Parse(base.RequestParm.Msg.ToString()); JObject prams = JObject.Parse(base.RequestParm.Msg.ToString());
int ContributeId = prams.GetInt("ContributeId", 0);//投稿ID int ContributeId = prams.GetInt("ContributeId", 0);//投稿ID
if (ContributeId <= 0) { if (ContributeId <= 0)
{
return ApiResult.ParamIsNull(); return ApiResult.ParamIsNull();
} }
...@@ -660,55 +678,46 @@ namespace Edu.WebApi.Controllers.QYWeChat ...@@ -660,55 +678,46 @@ namespace Edu.WebApi.Controllers.QYWeChat
{ {
return ApiResult.ParamIsNull("状态不正确"); return ApiResult.ParamIsNull("状态不正确");
} }
if (demodel.Type == ContributeInfoTypeEnum.Video)
{
return ApiResult.ParamIsNull("视频暂无法发布");
}
switch (demodel.Type) switch (demodel.Type)
{ {
case ContributeInfoTypeEnum.ImgText: case ContributeInfoTypeEnum.ImgText:
if (string.IsNullOrEmpty(demodel.Title)) { if (string.IsNullOrEmpty(demodel.Title))
{
return ApiResult.ParamIsNull("请输入标题"); return ApiResult.ParamIsNull("请输入标题");
} }
if (string.IsNullOrEmpty(demodel.Description)) { if (string.IsNullOrEmpty(demodel.Description))
{
return ApiResult.ParamIsNull("请输入摘要"); return ApiResult.ParamIsNull("请输入摘要");
} }
if (demodel.CoverImageId <= 0) { if (demodel.CoverImageId <= 0)
{
return ApiResult.ParamIsNull("请选择封面图"); return ApiResult.ParamIsNull("请选择封面图");
} }
break; break;
case ContributeInfoTypeEnum.Video:
return ApiResult.ParamIsNull("视频暂无法发布");
//if (string.IsNullOrEmpty(demodel.Title))
//{
// return ApiResult.ParamIsNull("请输入标题");
//}
//if (string.IsNullOrEmpty(demodel.Description))
//{
// return ApiResult.ParamIsNull("请输入推荐语");
//}
//if (demodel.VideoMediumId <= 0) {
// return ApiResult.ParamIsNull("请选择视频");
//}
break;
case ContributeInfoTypeEnum.Audio: case ContributeInfoTypeEnum.Audio:
if (string.IsNullOrEmpty(demodel.Title)) if (string.IsNullOrEmpty(demodel.Title))
{ {
return ApiResult.ParamIsNull("请输入标题"); return ApiResult.ParamIsNull("请输入标题");
} }
//if (string.IsNullOrEmpty(demodel.Description))
//{
// return ApiResult.ParamIsNull("请输入推荐语");
//}
if (demodel.VideoMediumId <= 0) if (demodel.VideoMediumId <= 0)
{ {
return ApiResult.ParamIsNull("请选择音频"); return ApiResult.ParamIsNull("请选择音频");
} }
break; break;
case ContributeInfoTypeEnum.Image: case ContributeInfoTypeEnum.Image:
if (demodel.ImageList == null || !demodel.ImageList.Any()) { if (demodel.ImageList == null || !demodel.ImageList.Any())
{
return ApiResult.ParamIsNull("请选择图片列表"); return ApiResult.ParamIsNull("请选择图片列表");
} }
demodel.ImageMediumIds = string.Join(",", demodel.ImageList.Select(x => x.Id)); demodel.ImageMediumIds = string.Join(",", demodel.ImageList.Select(x => x.Id));
break; break;
case ContributeInfoTypeEnum.Text: case ContributeInfoTypeEnum.Text:
if (string.IsNullOrEmpty(demodel.Description)) { if (string.IsNullOrEmpty(demodel.Description))
{
return ApiResult.ParamIsNull("请输入文本内容"); return ApiResult.ParamIsNull("请输入文本内容");
} }
break; break;
...@@ -727,7 +736,8 @@ namespace Edu.WebApi.Controllers.QYWeChat ...@@ -727,7 +736,8 @@ namespace Edu.WebApi.Controllers.QYWeChat
{ {
return ApiResult.Success(); return ApiResult.Success();
} }
else { else
{
return ApiResult.Failed(msg); return ApiResult.Failed(msg);
} }
} }
...@@ -737,12 +747,14 @@ namespace Edu.WebApi.Controllers.QYWeChat ...@@ -737,12 +747,14 @@ namespace Edu.WebApi.Controllers.QYWeChat
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public ApiResult SetContributeInfoState() { public ApiResult SetContributeInfoState()
{
var userInfo = base.UserInfo; var userInfo = base.UserInfo;
JObject parms = JObject.Parse(base.RequestParm.Msg.ToString()); JObject parms = JObject.Parse(base.RequestParm.Msg.ToString());
int ContributeId = parms.GetInt("ContributeId", 0);//投稿ID int ContributeId = parms.GetInt("ContributeId", 0);//投稿ID
int Type = parms.GetInt("Type", 1);//类型 1提交审核 2删除 int Type = parms.GetInt("Type", 1);//类型 1提交审核 2删除
if (ContributeId <= 0) { if (ContributeId <= 0)
{
return ApiResult.ParamIsNull("请传递投稿ID"); return ApiResult.ParamIsNull("请传递投稿ID");
} }
...@@ -751,7 +763,8 @@ namespace Edu.WebApi.Controllers.QYWeChat ...@@ -751,7 +763,8 @@ namespace Edu.WebApi.Controllers.QYWeChat
{ {
return ApiResult.Success(); return ApiResult.Success();
} }
else { else
{
return ApiResult.Failed(msg); return ApiResult.Failed(msg);
} }
} }
...@@ -795,7 +808,8 @@ namespace Edu.WebApi.Controllers.QYWeChat ...@@ -795,7 +808,8 @@ namespace Edu.WebApi.Controllers.QYWeChat
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public ApiResult GetContributeInfoAuditedPageList() { public ApiResult GetContributeInfoAuditedPageList()
{
var userInfo = base.UserInfo; var userInfo = base.UserInfo;
ResultPageModel pmodel = JsonHelper.DeserializeObject<ResultPageModel>(base.RequestParm.Msg.ToString()); ResultPageModel pmodel = JsonHelper.DeserializeObject<ResultPageModel>(base.RequestParm.Msg.ToString());
RB_Contribute_Info_ViewModel demodel = JsonHelper.DeserializeObject<RB_Contribute_Info_ViewModel>(base.RequestParm.Msg.ToString()); RB_Contribute_Info_ViewModel demodel = JsonHelper.DeserializeObject<RB_Contribute_Info_ViewModel>(base.RequestParm.Msg.ToString());
...@@ -892,13 +906,17 @@ namespace Edu.WebApi.Controllers.QYWeChat ...@@ -892,13 +906,17 @@ namespace Edu.WebApi.Controllers.QYWeChat
break; break;
} }
if (demodel.IsPreview > 0) { if (demodel.IsPreview > 0)
if (demodel.IsPreview == 1) { {
if (string.IsNullOrEmpty(demodel.TagId)) { if (demodel.IsPreview == 1)
{
if (string.IsNullOrEmpty(demodel.TagId))
{
return ApiResult.ParamIsNull("请传递微信账号"); return ApiResult.ParamIsNull("请传递微信账号");
} }
} }
if (demodel.PlatformId <= 0) { if (demodel.PlatformId <= 0)
{
return ApiResult.ParamIsNull("请选择平台"); return ApiResult.ParamIsNull("请选择平台");
} }
} }
...@@ -927,7 +945,8 @@ namespace Edu.WebApi.Controllers.QYWeChat ...@@ -927,7 +945,8 @@ namespace Edu.WebApi.Controllers.QYWeChat
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public ApiResult SetContributeInfoPublish() { public ApiResult SetContributeInfoPublish()
{
var userInfo = base.UserInfo; var userInfo = base.UserInfo;
JObject parms = JObject.Parse(base.RequestParm.Msg.ToString()); JObject parms = JObject.Parse(base.RequestParm.Msg.ToString());
int ContributeId = parms.GetInt("ContributeId", 0);//投稿ID int ContributeId = parms.GetInt("ContributeId", 0);//投稿ID
...@@ -935,13 +954,16 @@ namespace Edu.WebApi.Controllers.QYWeChat ...@@ -935,13 +954,16 @@ namespace Edu.WebApi.Controllers.QYWeChat
int IsPreview = parms.GetInt("IsPreview", 1);// 1预览 2发布 int IsPreview = parms.GetInt("IsPreview", 1);// 1预览 2发布
string TagId = parms.GetStringValue("TagId");//预览微信号 发布标签ID string TagId = parms.GetStringValue("TagId");//预览微信号 发布标签ID
if (ContributeId <= 0) { if (ContributeId <= 0)
{
return ApiResult.ParamIsNull("请传递投稿"); return ApiResult.ParamIsNull("请传递投稿");
} }
if (PlatformId <= 0) { if (PlatformId <= 0)
{
return ApiResult.ParamIsNull("请传递平台"); return ApiResult.ParamIsNull("请传递平台");
} }
if (IsPreview != 0 && IsPreview != 1 && IsPreview != 2) { if (IsPreview != 0 && IsPreview != 1 && IsPreview != 2)
{
return ApiResult.ParamIsNull("请传递类型"); return ApiResult.ParamIsNull("请传递类型");
} }
...@@ -950,7 +972,8 @@ namespace Edu.WebApi.Controllers.QYWeChat ...@@ -950,7 +972,8 @@ namespace Edu.WebApi.Controllers.QYWeChat
{ {
return ApiResult.Success(); return ApiResult.Success();
} }
else { else
{
return ApiResult.Failed(msg); return ApiResult.Failed(msg);
} }
} }
...@@ -960,7 +983,8 @@ namespace Edu.WebApi.Controllers.QYWeChat ...@@ -960,7 +983,8 @@ namespace Edu.WebApi.Controllers.QYWeChat
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public ApiResult GetGZHUserTagList() { public ApiResult GetGZHUserTagList()
{
var userInfo = base.UserInfo; var userInfo = base.UserInfo;
var list = contributeModule.GetGZHUserTagList(userInfo, out bool flag); var list = contributeModule.GetGZHUserTagList(userInfo, out bool flag);
...@@ -979,11 +1003,13 @@ namespace Edu.WebApi.Controllers.QYWeChat ...@@ -979,11 +1003,13 @@ namespace Edu.WebApi.Controllers.QYWeChat
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public ApiResult GetContributeInfoPublishLogList() { public ApiResult GetContributeInfoPublishLogList()
{
var userInfo = base.UserInfo; var userInfo = base.UserInfo;
JObject parms = JObject.Parse(base.RequestParm.Msg.ToString()); JObject parms = JObject.Parse(base.RequestParm.Msg.ToString());
int ContributeId = parms.GetInt("ContributeId", 0);//投稿ID int ContributeId = parms.GetInt("ContributeId", 0);//投稿ID
if (ContributeId <= 0) { if (ContributeId <= 0)
{
return ApiResult.ParamIsNull(); return ApiResult.ParamIsNull();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment