Search in sources :

Example 1 with AppServiceExample

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;
}
Also used : AppServiceExample(com.itrus.portal.db.AppServiceExample) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Example 2 with AppServiceExample

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";
}
Also used : AppService(com.itrus.portal.db.AppService) AppServiceExample(com.itrus.portal.db.AppServiceExample) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 3 with AppServiceExample

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";
}
Also used : AppService(com.itrus.portal.db.AppService) EvidenceSaveService(com.itrus.portal.db.EvidenceSaveService) AppServiceExample(com.itrus.portal.db.AppServiceExample) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 4 with AppServiceExample

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;
}
Also used : AppServiceExample(com.itrus.portal.db.AppServiceExample) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Example 5 with AppServiceExample

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();
}
Also used : AppService(com.itrus.portal.db.AppService) AppServiceExample(com.itrus.portal.db.AppServiceExample) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

AppServiceExample (com.itrus.portal.db.AppServiceExample)17 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)13 AppService (com.itrus.portal.db.AppService)10 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)6 ApplicationInfo (com.itrus.portal.db.ApplicationInfo)2 CertificationCharging (com.itrus.portal.db.CertificationCharging)2 ChargingPrice (com.itrus.portal.db.ChargingPrice)2 EvidenceSaveService (com.itrus.portal.db.EvidenceSaveService)2 ServiceName (com.itrus.portal.db.ServiceName)2 CertificationChargingList (com.itrus.portal.entity.CertificationChargingList)2 CertificationChargingWrap (com.itrus.portal.entity.CertificationChargingWrap)2 ChargingPriceList (com.itrus.portal.entity.ChargingPriceList)2 ServiceNameList (com.itrus.portal.entity.ServiceNameList)2 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)1