素材上传 播放配置
This commit is contained in:
parent
cb75413ecd
commit
a55f60c96f
@ -10,28 +10,40 @@ namespace APT.BaseData.Domain.Entities
|
||||
/// <summary>
|
||||
/// BI播放轮播配置
|
||||
/// </summary>
|
||||
[Description("图片视频")]
|
||||
[Description("播放设置")]
|
||||
public partial class T_PF_BIPLAY_SET : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 自动播放
|
||||
/// </summary>
|
||||
[Description("自动播放")]
|
||||
[FormFieldEdit]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
public bool V_ISAUTO { get; set; }
|
||||
/// <summary>
|
||||
/// 循环播放
|
||||
/// </summary>
|
||||
[Description("循环播放")]
|
||||
[FormFieldEdit]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
public bool V_ISRE { get; set; }
|
||||
/// <summary>
|
||||
/// 静音播放
|
||||
/// </summary>
|
||||
[Description("静音播放")]
|
||||
[FormFieldEdit]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
public bool V_ISSILENT { get; set; }
|
||||
/// <summary>
|
||||
/// 显示控制器
|
||||
/// </summary>
|
||||
[Description("显示控制器")]
|
||||
[FormFieldEdit]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
public bool V_ISSHOWCONTROL { get; set; }
|
||||
|
||||
|
||||
@ -39,12 +51,18 @@ namespace APT.BaseData.Domain.Entities
|
||||
/// 轮播间隔 秒
|
||||
/// </summary>
|
||||
[Description("轮播间隔")]
|
||||
[FormFieldEdit]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
public decimal IMG_TIMESPAN { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 循环播放
|
||||
/// </summary>
|
||||
[Description("循环播放")]
|
||||
[FormFieldEdit]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
public bool IMG_ISRE { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -39,6 +39,7 @@ namespace APT.BaseData.Domain.Entities
|
||||
[Description("附件类型")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public FILETYPEEnum TYPE { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -0,0 +1,103 @@
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.BaseData.Domain.IServices;
|
||||
using APT.Infrastructure.Core;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using APT.Utility;
|
||||
using APT.Infrastructure.Api;
|
||||
using APT.Migrations;
|
||||
using APT.BaseData.Domain.Entities.OP;
|
||||
using APT.BaseData.Domain.Enums.OP;
|
||||
using APT.BaseData.Domain.Enums.PF;
|
||||
using APT.BaseData.Domain.IServices.OP;
|
||||
using Microsoft.Data.SqlClient;
|
||||
|
||||
namespace APT.PF.WebApiControllers.Api.PF
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Route("api/PF/PFBivideoimg")]
|
||||
public class PFBivideoimgController : AuthorizeApiController<T_PF_BIVIDEOIMG>
|
||||
{
|
||||
IOPTenantDBConnService OPTenantDBConnService { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="opTenantDBConnService"></param>
|
||||
public PFBivideoimgController(IOPTenantDBConnService opTenantDBConnService)
|
||||
{
|
||||
OPTenantDBConnService = opTenantDBConnService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新或新增数据
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("FullUpdate")]
|
||||
public JsonActionResult<bool> FullUpdate([FromBody] T_PF_BIVIDEOIMG entity)
|
||||
{
|
||||
return SafeExecute(() =>
|
||||
{
|
||||
T_PF_BIVIDEOIMG check = null;
|
||||
var Nav_Files = entity.Nav_Files;
|
||||
entity.Nav_Files = null;
|
||||
if (string.IsNullOrEmpty(entity.TITLE))
|
||||
{
|
||||
throw new Exception("请输入标题后再操作!");
|
||||
}
|
||||
if (Nav_Files == null || Nav_Files.Count() < 1)
|
||||
{
|
||||
throw new Exception("请上传图片或附件再操作!");
|
||||
}
|
||||
if (entity.TYPE == FILETYPEEnum.VIDEO && Nav_Files.Where(e => !e.IS_DELETED).Count() > 1)
|
||||
{
|
||||
throw new Exception("只能上传一个视频!");
|
||||
}
|
||||
if (entity.STATUS == STATEEnum.release)
|
||||
{
|
||||
check = GetEntity<T_PF_BIVIDEOIMG>(e => e.STATUS == STATEEnum.release);
|
||||
if (check != null)
|
||||
{
|
||||
if (check.ID == entity.ID)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception("只能有一条已发布的标语!如需发布本本条,请撤回已发布的标语!");
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (entity.STATUS == STATEEnum.Delete)
|
||||
{
|
||||
entity.IS_DELETED = true;
|
||||
}
|
||||
else if (entity.STATUS == STATEEnum.Draft)
|
||||
{
|
||||
check = GetEntity<T_PF_BIVIDEOIMG>(entity.ID);
|
||||
if (check != null && (check.STATUS == STATEEnum.release))
|
||||
{
|
||||
throw new Exception("请先撤回后再修改!");
|
||||
}
|
||||
}
|
||||
if (entity.USER_ID_CREATER == Guid.Empty)
|
||||
{
|
||||
entity.USER_ID_CREATER = APT.Infrastructure.Api.AppContext.CurrentSession.UserID.Value;
|
||||
}
|
||||
|
||||
entity.MODIFY_TIME = DateTime.Now;
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
UpdateEntityNoCommit(entity);
|
||||
if (Nav_Files != null && Nav_Files.Count() > 0)
|
||||
BantchSaveEntityNoCommit(Nav_Files);
|
||||
});
|
||||
return true;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user