Stream media配置保存并下发功能增加;

This commit is contained in:
duandongmei
2019-04-15 22:38:22 +08:00
parent 910072f66f
commit e4effb7ab4
5 changed files with 155 additions and 122 deletions

View File

@@ -41,6 +41,7 @@ import com.nis.util.DateUtils;
import com.nis.util.StringUtil;
import com.nis.util.excel.ExportExcel;
import com.nis.web.controller.BaseController;
import com.nis.web.security.UserUtils;
/**
* 处理音视频文本业务
@@ -665,7 +666,15 @@ public class AvContentController extends BaseController {
Date auditTime = new Date();
for (String id : idArray) {
try {
avContentCfgService.auditContUrl(isAudit, isValid, functionId, id, auditTime);
CfgIndexInfo entity=new CfgIndexInfo();
entity.setCfgId(Long.parseLong(id));
entity = avContentCfgService.getCfgIndexInfo(entity);
entity.setIsAudit(isAudit);
entity.setIsValid(isValid);
entity.setAuditorId(UserUtils.getUser().getId());
entity.setAuditTime(new Date());
entity.setFunctionId(functionId);
avContentCfgService.auditContUrl(entity,isAudit,Constants.INSERT_ACTION);
addMessage(redirectAttributes, "success", "audit_success");
} catch (Exception e) {
e.printStackTrace();

View File

@@ -11,6 +11,7 @@ import com.nis.domain.configuration.BaseIpCfg;
import com.nis.domain.configuration.BaseStringCfg;
import com.nis.domain.configuration.CfgIndexInfo;
import com.nis.domain.configuration.IpPortCfg;
import com.nis.domain.configuration.NtcSubscribeIdCfg;
import com.nis.web.dao.MyBatisDao;
@@ -28,15 +29,15 @@ public interface AvContentCfgDao {
public void deleteIpCfg(CfgIndexInfo entity);
public List<AvContUrlCfg> getAvContUrlList(CfgIndexInfo entity);
public void saveAvContUrlCfg(CfgIndexInfo entity);
public void saveAvContUrlCfg(AvContUrlCfg entity);
public void saveAvContUrlCfgNew(AvContUrlCfg entity);
public void deleteAvContUrlCfg(CfgIndexInfo entity);
public void insertCfgIndexInfo(CfgIndexInfo entity);
public void insertAvVoipIp(CfgIndexInfo entity);
public void insertAvVoipAccountCfg(CfgIndexInfo entity);
public void insertAvVoipAccountCfg(AvVoipAccountCfg entity);
public void saveAvVoipAccountCfg(AvVoipAccountCfg entity);
public void insertAvVoipKeywordCfg(CfgIndexInfo entity);
public void insertAvVoipKeywordCfg(NtcSubscribeIdCfg entity);
public void updateCfgIndexInfo(CfgIndexInfo entity);
public void updateAvVoipIp(CfgIndexInfo entity);

View File

@@ -671,12 +671,12 @@
#{lable,jdbcType=VARCHAR},
#{areaEffectiveIds,jdbcType=VARCHAR},
#{functionId,jdbcType=INTEGER},
#{avContUrlCfg.cfgKeywords,jdbcType=VARCHAR},
#{avContUrlCfg.cfgType,jdbcType=VARCHAR},
#{avContUrlCfg.cfgRegionCode,jdbcType=INTEGER},
#{avContUrlCfg.exprType,jdbcType=INTEGER},
#{avContUrlCfg.matchMethod,jdbcType=INTEGER},
#{avContUrlCfg.isHexbin,jdbcType=INTEGER},
#{cfgKeywords,jdbcType=VARCHAR},
#{cfgType,jdbcType=VARCHAR},
#{cfgRegionCode,jdbcType=INTEGER},
#{exprType,jdbcType=INTEGER},
#{matchMethod,jdbcType=INTEGER},
#{isHexbin,jdbcType=INTEGER},
#{doLog,jdbcType=INTEGER}
)
</insert>
@@ -743,6 +743,9 @@
<!-- insert cfgIndexInfox -->
<insert id="insertCfgIndexInfo" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
SELECT LAST_INSERT_ID()
</selectKey>
insert into cfg_index_info(
CFG_DESC,
ACTION,
@@ -843,18 +846,18 @@
#{lable,jdbcType=VARCHAR},
#{areaEffectiveIds,jdbcType=VARCHAR},
#{functionId,jdbcType=INTEGER},
#{voipIp.ipType,jdbcType=INTEGER},
#{voipIp.srcIpAddress,jdbcType=VARCHAR},
#{voipIp.ipPattern,jdbcType=INTEGER},
#{voipIp.portPattern,jdbcType=INTEGER},
#{voipIp.srcPort,jdbcType=VARCHAR},
#{voipIp.protocol,jdbcType=INTEGER},
#{voipIp.protocolId,jdbcType=INTEGER},
#{voipIp.direction,jdbcType=INTEGER},
#{voipIp.destPort,jdbcType=VARCHAR},
#{voipIp.destIpAddress,jdbcType=VARCHAR},
#{voipIp.cfgType,jdbcType=VARCHAR},
#{voipIp.cfgRegionCode,jdbcType=INTEGER}
#{ipType,jdbcType=INTEGER},
#{srcIpAddress,jdbcType=VARCHAR},
#{ipPattern,jdbcType=INTEGER},
#{portPattern,jdbcType=INTEGER},
#{srcPort,jdbcType=VARCHAR},
#{protocol,jdbcType=INTEGER},
#{protocolId,jdbcType=INTEGER},
#{direction,jdbcType=INTEGER},
#{destPort,jdbcType=VARCHAR},
#{destIpAddress,jdbcType=VARCHAR},
#{cfgType,jdbcType=VARCHAR},
#{cfgRegionCode,jdbcType=INTEGER}
)
</insert>
<!-- insert AV_VOIP_ACCOUNT_CFG表信息 -->
@@ -905,12 +908,12 @@
#{lable,jdbcType=VARCHAR},
#{areaEffectiveIds,jdbcType=VARCHAR},
#{functionId,jdbcType=INTEGER},
#{voipAccount.cfgKeywords,jdbcType=VARCHAR},
#{voipAccount.cfgType,jdbcType=VARCHAR},
#{voipAccount.cfgRegionCode,jdbcType=INTEGER},
#{voipAccount.exprType,jdbcType=INTEGER},
#{voipAccount.matchMethod,jdbcType=INTEGER},
#{voipAccount.isHexbin,jdbcType=INTEGER}
#{cfgKeywords,jdbcType=VARCHAR},
#{cfgType,jdbcType=VARCHAR},
#{cfgRegionCode,jdbcType=INTEGER},
#{exprType,jdbcType=INTEGER},
#{matchMethod,jdbcType=INTEGER},
#{isHexbin,jdbcType=INTEGER}
)
</insert>
<insert id="saveAvVoipAccountCfg" parameterType="com.nis.domain.configuration.AvVoipAccountCfg" >
@@ -1016,12 +1019,12 @@
#{lable,jdbcType=VARCHAR},
#{areaEffectiveIds,jdbcType=VARCHAR},
#{functionId,jdbcType=INTEGER},
#{ntcSubscribeIdCfg.cfgKeywords,jdbcType=VARCHAR},
#{ntcSubscribeIdCfg.cfgType,jdbcType=VARCHAR},
#{ntcSubscribeIdCfg.cfgRegionCode,jdbcType=INTEGER},
#{ntcSubscribeIdCfg.exprType,jdbcType=INTEGER},
#{ntcSubscribeIdCfg.matchMethod,jdbcType=INTEGER},
#{ntcSubscribeIdCfg.isHexbin,jdbcType=INTEGER}
#{cfgKeywords,jdbcType=VARCHAR},
#{cfgType,jdbcType=VARCHAR},
#{cfgRegionCode,jdbcType=INTEGER},
#{exprType,jdbcType=INTEGER},
#{matchMethod,jdbcType=INTEGER},
#{isHexbin,jdbcType=INTEGER}
)
</insert>
@@ -2107,7 +2110,7 @@
</where>
</select>
<update id="updateCfgValid" parameterType="com.nis.domain.configuration.BaseCfg">
update ${tableName} set is_valid = #{isValid,jdbcType=INTEGER},
update ${tableName} set is_valid = #{isValid,jdbcType=INTEGER},is_audit = #{isAudit,jdbcType=INTEGER},
editor_id = #{editorId,jdbcType=INTEGER} ,
edit_time = #{editTime,jdbcType=TIMESTAMP}
<trim prefix="WHERE" prefixOverrides="AND |OR ">

View File

@@ -222,16 +222,14 @@ public class AvContentCfgService extends BaseService{
}
if(entity.getNtcSubscribeIdCfgList()!=null){
for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
entity.setNtcSubscribeIdCfg(cfg);
avContentCfgDao.insertAvVoipKeywordCfg(entity);
}
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
avContentCfgDao.insertAvVoipKeywordCfg(cfg);
}
}
if(entity.getVoipAccounts()!=null&&entity.getVoipAccounts().size()>0){
for(AvVoipAccountCfg voipAccount : entity.getVoipAccounts()){
entity.setVoipAccount(voipAccount);
avContentCfgDao.insertAvVoipAccountCfg(entity);
for(AvVoipAccountCfg cfg:entity.getVoipAccounts()){
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
avContentCfgDao.insertAvVoipAccountCfg(cfg);
}
}
//保存区域IP信息
@@ -277,16 +275,14 @@ public class AvContentCfgService extends BaseService{
}
if(entity.getNtcSubscribeIdCfgList()!=null){
for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
entity.setNtcSubscribeIdCfg(cfg);
avContentCfgDao.insertAvVoipKeywordCfg(entity);
}
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
avContentCfgDao.insertAvVoipKeywordCfg(cfg);
}
}
if(entity.getVoipAccounts()!=null&&entity.getVoipAccounts().size()>0){
for (AvVoipAccountCfg voipAccount : entity.getVoipAccounts()) {
entity.setVoipAccount(voipAccount);
avContentCfgDao.insertAvVoipAccountCfg(entity);
for(AvVoipAccountCfg cfg:entity.getVoipAccounts()){
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
avContentCfgDao.insertAvVoipAccountCfg(cfg);
}
}
//保存区域IP信息
@@ -1419,6 +1415,12 @@ public class AvContentCfgService extends BaseService{
public void saveOrUpdateContUrl(CfgIndexInfo entity){
//设置区域运营商信息
setAreaEffectiveIds(entity);
int isValid=0;
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
isValid=1;
}
entity.setIsValid(0);//无效
entity.setIsAudit(0);//未审核
if(entity.getCfgId()==null){
@@ -1432,24 +1434,22 @@ public class AvContentCfgService extends BaseService{
entity.setCreateTime(new Date());
entity.setCreatorId(entity.getCurrentUser().getId());
avContentCfgDao.insertCfgIndexInfo(entity);
if(entity.getIpPortList()!=null){
if(!StringUtil.isEmpty(entity.getIpPortList())){
for(IpPortCfg cfg:entity.getIpPortList()){
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
avContentCfgDao.saveIpPortCfg(cfg);
}
}
if(entity.getNtcSubscribeIdCfgList()!=null){
if(!StringUtil.isEmpty(entity.getNtcSubscribeIdCfgList())){
for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
entity.setNtcSubscribeIdCfg(cfg);
avContentCfgDao.insertAvVoipKeywordCfg(entity);
}
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
avContentCfgDao.insertAvVoipKeywordCfg(cfg);
}
}
if(entity.getAvContUrlCfgList()!=null&&entity.getAvContUrlCfgList().size()>0){
for(AvContUrlCfg avContUrlCfg : entity.getAvContUrlCfgList()){
entity.setAvContUrlCfg(avContUrlCfg);
avContentCfgDao.saveAvContUrlCfg(entity);
if(!StringUtil.isEmpty(entity.getAvContUrlCfgList())){
for(AvContUrlCfg cfg:entity.getAvContUrlCfgList()){
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
avContentCfgDao.saveAvContUrlCfg(cfg);
}
}
//保存区域IP信息
@@ -1465,6 +1465,11 @@ public class AvContentCfgService extends BaseService{
logger.info("获取编译ID出错");
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
}
if(isValid==1) {
entity.setIsAudit(1);
entity.setIsValid(1);
auditContUrl(entity,entity.getIsAudit(), Constants.INSERT_ACTION);
}
}else{
entity.setEditTime(new Date());
@@ -1480,34 +1485,37 @@ public class AvContentCfgService extends BaseService{
areaIpCfgDao.deleteAreaIpCfg(area);
entity.setCreateTime(new Date());
entity.setCreatorId(entity.getCurrentUser().getId());
if(entity.getIpPortList()!=null){
if(!StringUtil.isEmpty(entity.getIpPortList())){
for(IpPortCfg cfg:entity.getIpPortList()){
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
avContentCfgDao.saveIpPortCfg(cfg);
}
}
if(entity.getNtcSubscribeIdCfgList()!=null){
if(!StringUtil.isEmpty(entity.getNtcSubscribeIdCfgList())){
for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
entity.setNtcSubscribeIdCfg(cfg);
avContentCfgDao.insertAvVoipKeywordCfg(entity);
}
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
avContentCfgDao.insertAvVoipKeywordCfg(cfg);
}
}
if(entity.getAvContUrlCfgList()!=null&&entity.getAvContUrlCfgList().size()>0){
for(AvContUrlCfg avContUrlCfg : entity.getAvContUrlCfgList()){
entity.setAvContUrlCfg(avContUrlCfg);
avContentCfgDao.saveAvContUrlCfg(entity);
if(!StringUtil.isEmpty(entity.getAvContUrlCfgList())){
for(AvContUrlCfg cfg:entity.getAvContUrlCfgList()){
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
avContentCfgDao.saveAvContUrlCfg(cfg);
}
}
//保存区域IP信息
if(entity.getAreaCfg()!=null){
for(AreaIpCfg cfg:entity.getAreaCfg()){
cfg.initDefaultValue();
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgDesc","cfgRegionCode","cfgType"});
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
areaIpCfgDao.saveAreaIpCfg(cfg);
}
}
if(isValid==1) {
entity.setIsAudit(1);
entity.setIsValid(1);
auditContUrl(entity,entity.getIsAudit(), Constants.INSERT_ACTION);
}
}
}
@@ -1558,32 +1566,16 @@ public class AvContentCfgService extends BaseService{
* @param functionId
*/
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
public void auditContUrl(Integer isAudit,Integer isValid,Integer functionId,String id,Date auditTime){
CfgIndexInfo entity = new CfgIndexInfo();
List<CfgIndexInfo> list = new ArrayList();
List<IpPortCfg> ipPortList =new ArrayList();
List <NtcSubscribeIdCfg> ntcList = new ArrayList();
List<AreaIpCfg> areaIpCfgList = new ArrayList();
List<AvContUrlCfg> avContUrlCfgList = new ArrayList();
CfgIndexInfo searchCfg=new CfgIndexInfo();
searchCfg.setCfgId(Long.parseLong(id));
entity = avContentCfgDao.getCfgIndexInfo(searchCfg);
public void auditContUrl(CfgIndexInfo entity,Integer isAudit,Integer opAction){
entity.setIsAudit(isAudit);
entity.setIsValid(isValid);
entity.setAuditorId(UserUtils.getUser().getId());
entity.setAuditTime(auditTime);
avContentCfgDao.updateAvVoipIp(entity);
avContentCfgDao.updateAvVoipKeywordCfgt(entity);
avContentCfgDao.updateCfgIndexInfo(entity);
entity.setTableName(CfgIndexInfo.getTablename());
entity.setAuditTime(new Date());
avContentCfgDao.updateCfgValid(entity);
AreaIpCfg areaIpCfg=new AreaIpCfg();
BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode","cfgType","cfgId"});
areaIpCfgDao.updateAreaIpCfg(areaIpCfg);
ipPortList = avContentCfgDao.getIpPortList(entity);
ntcList=stringCfgDao.findSubscribeIdCfgListByCfgIndexInfo(entity);
areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
avContUrlCfgList=avContentCfgDao.getAvContUrlList(entity);
ToMaatBean maatBean = new ToMaatBean();
MaatCfg maatCfg = new MaatCfg();
List<MaatCfg> configCompileList = new ArrayList();
@@ -1594,44 +1586,56 @@ public class AvContentCfgService extends BaseService{
List<DigestCfg> digestRegionList = new ArrayList();
List<IpCfg> areaIpRegionList = new ArrayList();
if(avContUrlCfgList!=null && avContUrlCfgList.size()>0){
entity.setAvContUrlCfgList(avContUrlCfgList);
if(entity.getNtcSubscribeIdCfgList()!=null && entity.getNtcSubscribeIdCfgList().size()>0){
NtcSubscribeIdCfg cfg = new NtcSubscribeIdCfg();
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
cfg.setTableName(NtcSubscribeIdCfg.getTablename());
avContentCfgDao.updateCfgValid(cfg);
if(isAudit==1){
Map<String,List> ntcMap = cfgConvert(strRegionList,entity.getNtcSubscribeIdCfgList(),2,entity,groupRelationList);
groupRelationList=ntcMap.get("groupList");
strRegionList=ntcMap.get("dstList");
}
}
if(entity.getAvContUrlCfgList()!=null && entity.getAvContUrlCfgList().size()>0){
AvContUrlCfg cfg = new AvContUrlCfg();
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
cfg.setTableName(AvContUrlCfg.getTablename());
avContentCfgDao.updateCfgValid(cfg);
if(isAudit==1){
Map<String,List> urlMap = cfgConvert(strRegionList,entity.getAvContUrlCfgList(),2,entity,groupRelationList);
groupRelationList=urlMap.get("groupList");
strRegionList=urlMap.get("dstList");
}
}
if(isAudit==1){
if(!StringUtil.isEmpty(ipPortList)){
IpPortCfg cfg = new IpPortCfg();
BeanUtils.copyProperties(entity, cfg, new String[] { "cfgId" });
cfg.setTableName(IpPortCfg.getTablename());
avContentCfgDao.updateCfgValid(cfg);
Map<String,List> ipMap = cfgConvert(ipRegionList,ipPortList,1,entity,groupRelationList);
if(!StringUtil.isEmpty(entity.getIpPortList())){
IpPortCfg cfg = new IpPortCfg();
BeanUtils.copyProperties(entity, cfg, new String[] { "cfgId" });
cfg.setTableName(IpPortCfg.getTablename());
avContentCfgDao.updateCfgValid(cfg);
if(isAudit==1){
Map<String,List> ipMap = cfgConvert(ipRegionList,entity.getIpPortList(),1,entity,groupRelationList);
groupRelationList=ipMap.get("groupList");
ipRegionList=ipMap.get("dstList");
if(ipMap.get("numRegionList")!=null){
numRegionList.addAll(ipMap.get("numRegionList"));
}
}
if(!StringUtil.isEmpty(avContUrlCfgList)){
Map<String,List> urlMap = cfgConvert(strRegionList,avContUrlCfgList,2,entity,groupRelationList);
groupRelationList=urlMap.get("groupList");
strRegionList=urlMap.get("dstList");
}
if(!StringUtil.isEmpty(ntcList)){
Map<String,List> ntcMap = cfgConvert(strRegionList,ntcList,2,entity,groupRelationList);
groupRelationList=ntcMap.get("groupList");
strRegionList=ntcMap.get("dstList");
}
if(!StringUtil.isEmpty(areaIpCfgList)){
Map<String,List> areaMap = cfgConvert(areaIpRegionList,areaIpCfgList,1,entity,groupRelationList);
groupRelationList=areaMap.get("groupList");
areaIpRegionList=areaMap.get("dstList");
}
//保存区域IP信息
List<AreaIpCfg> areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
if(!StringUtil.isEmpty(areaIpCfgList)){
AreaIpCfg cfg = new AreaIpCfg();
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
cfg.setTableName(AreaIpCfg.getTablename());
avContentCfgDao.updateCfgValid(cfg);
if(isAudit==1){
Map<String,List> map = cfgConvert(areaIpRegionList,areaIpCfgList,1,entity,groupRelationList);
groupRelationList=map.get("groupList");
areaIpRegionList=map.get("dstList");
}
}
@@ -1640,7 +1644,7 @@ public class AvContentCfgService extends BaseService{
maatCfg.initDefaultValue();
BeanUtils.copyProperties(entity, maatCfg);
maatCfg.setAction(entity.getAction());
maatCfg.setAuditTime(auditTime);
maatCfg.setAuditTime(entity.getAuditTime());
maatCfg.setIpRegionList(ipRegionList);
maatCfg.setStrRegionList(strRegionList);
maatCfg.setNumRegionList(numRegionList);
@@ -1651,7 +1655,7 @@ public class AvContentCfgService extends BaseService{
maatCfg.setIsValid(entity.getIsValid());
configCompileList.add(maatCfg);
maatBean.setConfigCompileList(configCompileList);
maatBean.setAuditTime(auditTime);
maatBean.setAuditTime(entity.getAuditTime());
maatBean.setCreatorName(entity.getCurrentUser().getName());
maatBean.setVersion(Constants.MAAT_VERSION);
maatBean.setOpAction(Constants.INSERT_ACTION);
@@ -1668,7 +1672,7 @@ public class AvContentCfgService extends BaseService{
maatCfg.setIsValid(0);//无效
configCompileList.add(maatCfg);
maatBean.setConfigCompileList(configCompileList);
maatBean.setAuditTime(auditTime);
maatBean.setAuditTime(entity.getAuditTime());
maatBean.setCreatorName(entity.getCurrentUser().getName());
maatBean.setVersion(Constants.MAAT_VERSION);
maatBean.setOpAction(Constants.UPDATE_ACTION);

View File

@@ -172,6 +172,8 @@
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
<input type="hidden" name="compileId" value="${_cfg.compileId}">
<input type="hidden" name="functionId" value="${_cfg.functionId}">
<input type="hidden" name="isValid" value="${_cfg.isValid}">
<input type="hidden" name="isAudit" value="${_cfg.isAudit}">
<input type="hidden" id="serviceId" name="serviceId"
value="${_cfg.serviceId}">
@@ -367,9 +369,23 @@
<div class="col-md-6">
<div class="row">
<div class="col-md-offset-3 col-md-8">
<button id="save" type="submit" class="btn green">
<spring:message code="submit" />
</button>
<c:set var="auditPermission" value="false"></c:set>
<!-- 拥有配置新增直接生效的功能权限 -->
<shiro:hasPermission name="save:audit:permission">
<c:set var="auditPermission" value="true"></c:set>
</shiro:hasPermission>
<c:choose>
<c:when test="${!(fns:getUser().isAdmin()) && auditPermission}">
<button id="audit" type="submit" class="btn green">
<spring:message code="submit" />
</button>
</c:when>
<c:otherwise>
<button id="save" type="submit" class="btn green">
<spring:message code="submit" />
</button>
</c:otherwise>
</c:choose>
<button id="cancel" type="button" class="btn default">
<spring:message code="cancel" />
</button>