use of com.itrus.portal.db.AppServiceExample in project portal by ixinportal.
the class OutServiceConfigController method isRepeatAppServiceName.
/**
* 判断服务名称是否重复
* @param appServiceName
* @param uiModel
* @return
*/
@RequestMapping(value = "/isRepeatAppServiceName")
@ResponseBody
public String isRepeatAppServiceName(@RequestParam(required = false, value = "appServiceName") String appServiceName, Model uiModel) {
AppServiceExample appServiceExample = new AppServiceExample();
AppServiceExample.Criteria ac = appServiceExample.createCriteria();
ac.andAppServiceNameEqualTo(appServiceName);
int count = appServiceImpl.countByExample(appServiceExample);
if (count > 0) {
return "此应用服务名称已存在";
}
return null;
}
use of com.itrus.portal.db.AppServiceExample in project portal by ixinportal.
the class SaveServiceController method create.
// 返回新建页面
@RequestMapping(params = "form", produces = "text/html")
public String create(Model uiModel) {
AppServiceExample ase = new AppServiceExample();
AppServiceExample.Criteria asec = ase.createCriteria();
asec.andTypeEqualTo(3L);
asec.andServiceConfigNameEqualTo("EvidenceOutServiceConfig");
List<AppService> appServiceList = sqlSession.selectList("com.itrus.portal.db.AppServiceMapper.selectByExample", ase);
uiModel.addAttribute("appServiceList", appServiceList);
return "saveservice/create";
}
use of com.itrus.portal.db.AppServiceExample in project portal by ixinportal.
the class SaveServiceController method show.
// 显示详情
@RequestMapping(value = "/{id}", produces = "text/html")
public String show(@PathVariable("id") Long id, Model uiModel) {
EvidenceSaveService saveService = saveServiceImpl.selectServiceById(id);
uiModel.addAttribute("saveService", saveService);
AppService appService = appServiceImpl.selectById(saveService.getAppService());
uiModel.addAttribute("appService", appService);
AppServiceExample ase = new AppServiceExample();
AppServiceExample.Criteria asec = ase.createCriteria();
asec.andTypeEqualTo(3L);
asec.andServiceConfigNameEqualTo("EvidenceOutServiceConfig");
List<AppService> appServiceList = sqlSession.selectList("com.itrus.portal.db.AppServiceMapper.selectByExample", ase);
uiModel.addAttribute("appServiceList", appServiceList);
return "saveservice/show";
}
use of com.itrus.portal.db.AppServiceExample in project portal by ixinportal.
the class SaveServiceController method isRepeatAppServiceId.
/**
* 判断服务编号是否重复
* @param appServiceId
* @param uiModel
* @return
*/
@RequestMapping(value = "/isRepeatAppServiceId")
@ResponseBody
public String isRepeatAppServiceId(@RequestParam(required = false, value = "appServiceId") String appServiceId, Model uiModel) {
AppServiceExample appServiceExample = new AppServiceExample();
AppServiceExample.Criteria ac = appServiceExample.createCriteria();
ac.andAppServiceIdEqualTo(appServiceId);
int count = appServiceImpl.countByExample(appServiceExample);
if (count > 0) {
return "此应用服务编号已存在";
}
return null;
}
use of com.itrus.portal.db.AppServiceExample in project portal by ixinportal.
the class SaveServiceController method update.
// 修改处理
@RequestMapping(method = RequestMethod.PUT, produces = "text/html")
public String update(@ModelAttribute("evidenceSaveService") EvidenceSaveService evidenceSaveService, @ModelAttribute("appService") AppService appService, BindingResult bindingResult, Model uiModel, HttpServletRequest httpServletRequest) {
if (bindingResult.hasErrors()) {
uiModel.addAttribute("evidenceSaveService", evidenceSaveService);
uiModel.addAttribute("appService", appService);
AppServiceExample ase = new AppServiceExample();
AppServiceExample.Criteria asec = ase.createCriteria();
asec.andTypeEqualTo(3L);
asec.andServiceConfigNameEqualTo("EvidenceOutServiceConfig");
List<AppService> appServiceList = sqlSession.selectList("com.itrus.portal.db.AppServiceMapper.selectByExample", ase);
uiModel.addAttribute("appServiceList", appServiceList);
return "saveservice/update";
}
String factor = getFactorContent(evidenceSaveService);
evidenceSaveService.setFactorContent(factor);
if (evidenceSaveService.getEncryptionWay() == 0) {
evidenceSaveService.setEncryptionWay(null);
}
if (evidenceSaveService.getFixationWay() == 0) {
evidenceSaveService.setFixationWay(null);
}
if (evidenceSaveService.getSaveTime() == 0) {
evidenceSaveService.setSaveTime(null);
}
if (evidenceSaveService.getAppServiceName() == 0) {
evidenceSaveService.setAppServiceName(null);
}
saveServiceImpl.updateEvidenceSaveService(evidenceSaveService, appService, getAdmin().getId());
String oper = "修改存证服务";
String info = "存证服务名称: " + appService.getAppServiceName();
LogUtil.evidencelog(sqlSession, null, oper, info);
return "redirect:saveservice/" + evidenceSaveService.getId();
}
Aggregations