批量下发功能增加,delRow.tag中暂时不打开此功能。
app topic domain和app domain业务修改domain存储cfgkeyword属性。 摘要修改level属性存储为下发的最终数值。 同步的单域配置的增加时间和状态属性从entity中获取
This commit is contained in:
@@ -10,6 +10,7 @@ import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.apache.taglibs.standard.functions.Functions;
|
||||
@@ -148,28 +149,56 @@ public class AppFeatureCfgController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"auditAppFeatureCfg"})
|
||||
public String auditAppFeatureCfg(Integer isAudit,Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes) {
|
||||
AppFeatureIndex entity = new AppFeatureIndex();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity = appMultiFeatureCfgService.getAppFeatureIndex(Long.parseLong(id));
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
entity.setFunctionId(functionId);
|
||||
try {
|
||||
appMultiFeatureCfgService.auditAppFeatureCfg(entity,isAudit);
|
||||
} catch (MaatConvertException e) {
|
||||
e.printStackTrace();
|
||||
logger.error("app 特征配置下发失败:"+e.getMessage());
|
||||
addMessage(redirectAttributes,"error", "request_service_failed");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("app 特征配置下发失败:"+e.getMessage());
|
||||
addMessage(redirectAttributes,"error", "audit_failed");
|
||||
public String auditAppFeatureCfg(Model model,@ModelAttribute("cfg")AppFeatureIndex cfg,
|
||||
Integer isValid,
|
||||
Integer isAudit,
|
||||
String ids,
|
||||
Integer functionId,
|
||||
RedirectAttributes redirectAttributes,
|
||||
HttpServletResponse response,
|
||||
HttpServletRequest request) {
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
AppFeatureIndex entity = new AppFeatureIndex();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity = appMultiFeatureCfgService.getAppFeatureIndex(Long.parseLong(id));
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
entity.setFunctionId(functionId);
|
||||
try {
|
||||
appMultiFeatureCfgService.auditAppFeatureCfg(entity,isAudit);
|
||||
} catch (MaatConvertException e) {
|
||||
e.printStackTrace();
|
||||
logger.error("app 特征配置下发失败:"+e.getMessage());
|
||||
addMessage(redirectAttributes,"error", "request_service_failed");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("app 特征配置下发失败:"+e.getMessage());
|
||||
addMessage(redirectAttributes,"error", "audit_failed");
|
||||
}
|
||||
}
|
||||
}else {
|
||||
Page<AppPolicyCfg> searchPage=new Page<AppPolicyCfg>(request,response,"r");
|
||||
Page<AppPolicyCfg> auditPage=new Page<AppPolicyCfg>(request,response,"r");
|
||||
|
||||
try {
|
||||
BeanUtils.copyProperties(searchPage, auditPage);
|
||||
auditAll(auditPage,isValid , cfg);
|
||||
} catch (Exception e) {
|
||||
logger.error("配置下发失败:",e);
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,"error", "request_service_failed");
|
||||
}else {
|
||||
addMessage(redirectAttributes,"error", "audit_failed");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return multiFeatureCfgList(model, cfg, request, response);
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/app/feature/multiFeatureCfgList?functionId="+functionId;
|
||||
}
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user