调整音视频文本所有areaIpCfg相关信息根据compileId处理

This commit is contained in:
duandongmei
2018-06-06 14:27:37 +08:00
parent 1e4f717bc7
commit 59ad691c1e
7 changed files with 34 additions and 16 deletions

View File

@@ -154,7 +154,7 @@ public class AvContentController extends BaseController {
@RequiresPermissions(value={"avContIp:config"})
public String contIpForm(Model model,HttpServletRequest request,HttpServletResponse response,String ids,@ModelAttribute("cfg")BaseIpCfg cfg){
if(!StringUtil.isEmpty(ids)){
cfg.setCfgId(Long.parseLong(ids));
cfg.setCompileId(Integer.parseInt(ids));
cfg = avContentCfgService.getContIpCfgById(cfg);
initUpdateFormCondition(model, cfg);
}else{
@@ -218,7 +218,7 @@ public class AvContentController extends BaseController {
@RequiresPermissions(value={"avPicIp:config"})
public String picIpForm(Model model,HttpServletRequest request,HttpServletResponse response,String ids,@ModelAttribute("cfg")BaseIpCfg cfg){
if(!StringUtil.isEmpty(ids)){
cfg.setCfgId(Long.parseLong(ids));
cfg.setCompileId(Integer.parseInt(ids));
cfg = avContentCfgService.getPicIpCfgById(cfg);
initUpdateFormCondition(model, cfg);
}else{
@@ -283,7 +283,7 @@ public class AvContentController extends BaseController {
@RequiresPermissions(value={"avContUrl:config"})
public String contUrlForm(Model model,HttpServletRequest request,HttpServletResponse response,String ids,@ModelAttribute("cfg")BaseStringCfg cfg){
if(!StringUtil.isEmpty(ids)){
cfg.setCfgId(Long.parseLong(ids));
cfg.setCompileId(Integer.parseInt(ids));
cfg = avContentCfgService.getContUrlCfgById(cfg);
initUpdateFormCondition(model, cfg);
}else{
@@ -348,7 +348,7 @@ public class AvContentController extends BaseController {
@RequiresPermissions(value={"avPicUrl:config"})
public String picUrlForm(Model model,HttpServletRequest request,HttpServletResponse response,String ids,@ModelAttribute("cfg")BaseStringCfg cfg){
if(!StringUtil.isEmpty(ids)){
cfg.setCfgId(Long.parseLong(ids));
cfg.setCompileId(Integer.parseInt(ids));
cfg = avContentCfgService.getPicUrlCfgById(cfg);
initUpdateFormCondition(model, cfg);
}else{

View File

@@ -957,6 +957,9 @@
<if test="cfgId != null">
and r.cfg_id=#{cfgId,jdbcType=INTEGER}
</if>
<if test="compileId != null">
and r.compile_id=#{compileId,jdbcType=INTEGER}
</if>
<choose>
<when test="isValid != null">
and r.is_valid=#{isValid,jdbcType=INTEGER}
@@ -1134,6 +1137,9 @@
<if test="cfgId != null" >
and cfg_id = #{cfgId,jdbcType=INTEGER}
</if>
<if test="compileId != null" >
and compile_id = #{compileId,jdbcType=INTEGER}
</if>
<if test="functionId != null" >
and function_id = #{functionId,jdbcType=INTEGER}
</if>
@@ -1255,6 +1261,9 @@
<if test="cfgId != null">
and r.cfg_id=#{cfgId,jdbcType=INTEGER}
</if>
<if test="compileId != null">
and r.compile_id=#{compileId,jdbcType=INTEGER}
</if>
<choose>
<when test="isValid != null">
and r.is_valid=#{isValid,jdbcType=INTEGER}
@@ -1405,6 +1414,9 @@
<if test="cfgId != null" >
and cfg_id = #{cfgId,jdbcType=INTEGER}
</if>
<if test="compileId != null" >
and compile_id = #{compileId,jdbcType=INTEGER}
</if>
<if test="functionId != null" >
and function_id = #{functionId,jdbcType=INTEGER}
</if>

View File

@@ -353,6 +353,7 @@ public class AvContentCfgService extends BaseService{
if(isAudit==1){
if(!StringUtil.isEmpty(voipIpList)){
//TODO DELETE后期删除
entity.setAreaEffectiveIds(StringUtils.isEmpty(entity.getAreaEffectiveIds()) ? "0":entity.getAreaEffectiveIds());
for (AvVoipIpCfg ipCfg : voipIpList) {
ipCfg.setCfgType("MM_VOIP_IP");
}
@@ -363,6 +364,7 @@ public class AvContentCfgService extends BaseService{
if(!StringUtil.isEmpty(voipAccountList)){
//TODO DELETE后期删除
entity.setAreaEffectiveIds(StringUtils.isEmpty(entity.getAreaEffectiveIds()) ? "0":entity.getAreaEffectiveIds());
for (AvVoipAccountCfg accountCfg : voipAccountList) {
accountCfg.setCfgType("MM_VOIP_ACCOUNT");
}
@@ -582,7 +584,7 @@ public class AvContentCfgService extends BaseService{
entity.setTableName("av_cont_ip_cfg");
String[] idArray = ids.split(",");
for(String id :idArray){
entity.setCfgId(Long.parseLong(id));
entity.setCompileId(Integer.parseInt(id));
entity.setFunctionId(functionId);
entity.setIsAudit(isAudit);
entity.setIsValid(isValid);
@@ -609,7 +611,7 @@ public class AvContentCfgService extends BaseService{
List<BaseIpCfg> list = new ArrayList();
List<AreaIpCfg> areaIpCfgList = new ArrayList();
entity.setCfgId(Long.parseLong(id));
entity.setCompileId(Integer.parseInt(id));
entity = avContentCfgDao.findIpCfgById(entity);
entity.setTableName("av_cont_ip_cfg");
entity.setIsAudit(isAudit);
@@ -651,6 +653,7 @@ public class AvContentCfgService extends BaseService{
if(isAudit==1){
if(!StringUtil.isEmpty(list)){
//TODO DELETE后期删除
entity.setAreaEffectiveIds(StringUtils.isEmpty(entity.getAreaEffectiveIds()) ? "0":entity.getAreaEffectiveIds());
for (BaseIpCfg ipCfg : list) {
ipCfg.setCfgType("MM_AV_IP");
}
@@ -869,7 +872,7 @@ public class AvContentCfgService extends BaseService{
entity.setTableName("av_pic_ip_cfg");
String[] idArray = ids.split(",");
for(String id :idArray){
entity.setCfgId(Long.parseLong(id));
entity.setCompileId(Integer.parseInt(id));
entity.setFunctionId(functionId);
entity.setIsAudit(isAudit);
entity.setIsValid(isValid);
@@ -895,7 +898,7 @@ public class AvContentCfgService extends BaseService{
List<BaseIpCfg> list = new ArrayList();
List<AreaIpCfg> areaIpCfgList = new ArrayList();
entity.setCfgId(Long.parseLong(id));
entity.setCompileId(Integer.parseInt(id));
entity = avContentCfgDao.findIpCfgById(entity);
entity.setTableName("av_pic_ip_cfg");
entity.setIsAudit(isAudit);
@@ -938,6 +941,7 @@ public class AvContentCfgService extends BaseService{
if(!StringUtil.isEmpty(list)){
//TODO DELETE后期删除
entity.setAreaEffectiveIds(StringUtils.isEmpty(entity.getAreaEffectiveIds()) ? "0":entity.getAreaEffectiveIds());
for (BaseIpCfg ipCfg : list) {
ipCfg.setCfgType("MM_PIC_IP");
}
@@ -1131,7 +1135,7 @@ public class AvContentCfgService extends BaseService{
entity.setTableName("av_cont_url_cfg");
String[] idArray = ids.split(",");
for(String id :idArray){
entity.setCfgId(Long.parseLong(id));
entity.setCompileId(Integer.parseInt(id));
entity.setFunctionId(functionId);
entity.setIsAudit(isAudit);
entity.setIsValid(isValid);
@@ -1157,7 +1161,7 @@ public class AvContentCfgService extends BaseService{
List<BaseStringCfg> list = new ArrayList();
List<AreaIpCfg> areaIpCfgList = new ArrayList();
entity.setCfgId(Long.parseLong(id));
entity.setCompileId(Integer.parseInt(id));
entity = avContentCfgDao.findStringCfgById(entity);
entity.setTableName("av_cont_url_cfg");
entity.setIsAudit(isAudit);
@@ -1190,6 +1194,7 @@ public class AvContentCfgService extends BaseService{
if(isAudit==1){
if(!StringUtil.isEmpty(list)){
//TODO DELETE后期删除
entity.setAreaEffectiveIds(StringUtils.isEmpty(entity.getAreaEffectiveIds()) ? "0":entity.getAreaEffectiveIds());
for (BaseStringCfg strCfg : list) {
strCfg.setCfgType("MM_AV_URL");
}
@@ -1382,7 +1387,7 @@ public class AvContentCfgService extends BaseService{
entity.setTableName("av_pic_url_cfg");
String[] idArray = ids.split(",");
for(String id :idArray){
entity.setCfgId(Long.parseLong(id));
entity.setCompileId(Integer.parseInt(id));
entity.setFunctionId(functionId);
entity.setIsAudit(isAudit);
entity.setIsValid(isValid);
@@ -1408,7 +1413,7 @@ public class AvContentCfgService extends BaseService{
List<BaseStringCfg> list = new ArrayList();
List<AreaIpCfg> areaIpCfgList = new ArrayList();
entity.setCfgId(Long.parseLong(id));
entity.setCompileId(Integer.parseInt(id));
entity = avContentCfgDao.findStringCfgById(entity);
entity.setTableName("av_pic_url_cfg");
entity.setIsAudit(isAudit);
@@ -1441,6 +1446,7 @@ public class AvContentCfgService extends BaseService{
if(isAudit==1){
if(!StringUtil.isEmpty(list)){
//TODO DELETE后期删除
entity.setAreaEffectiveIds(StringUtils.isEmpty(entity.getAreaEffectiveIds()) ? "0":entity.getAreaEffectiveIds());
for (BaseStringCfg strCfg : list) {
strCfg.setCfgType("MM_PIC_URL");
}