use of com.itrus.portal.db.AppServiceExample in project portal by ixinportal.
the class CertificationChargingServiceImpl method getAppServiceByAppServiceId.
/**
* 根据appServiceId获取AppService
*
* @param appServiceId
* @return
*/
public AppService getAppServiceByAppServiceId(String appServiceId) {
AppService appService = new AppService();
AppServiceExample ase = new AppServiceExample();
AppServiceExample.Criteria criteria = ase.or();
criteria.andAppServiceIdEqualTo(appServiceId);
appService = sqlSession.selectOne("com.itrus.portal.db.AppServiceMapper.selectByExample", ase);
return appService;
}
use of com.itrus.portal.db.AppServiceExample in project portal by ixinportal.
the class AppServiceAuthenticationController 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 CertificationChargingController method update.
// 返回修改页面
@RequestMapping(value = "/update/{id}")
public String update(@PathVariable("id") Long id, Model uiModel, HttpServletRequest request) {
ApplicationInfo applicationInfo = sqlSession.selectOne("com.itrus.portal.db.ApplicationInfoMapper.selectByPrimaryKey", id);
uiModel.addAttribute("applicationInfo", applicationInfo);
// 系统配置的实名认证服务集合
List<AppService> appServices = new ArrayList<AppService>();
AppServiceExample ase = new AppServiceExample();
AppServiceExample.Criteria criteria = ase.or();
// 筛选实名认证类型的服务
criteria.andTypeEqualTo(ComNames.SERVICE_TYPE_CERTIFICATION);
appServices = sqlSession.selectList("com.itrus.portal.db.AppServiceMapper.selectByExample", ase);
uiModel.addAttribute("appServices", appServices);
Map<String, Object> map = new HashMap<>();
map.put("serviceType", 1);
// 系统配置的实名认证服务集合-企业
List<AppService> appServices_e = new ArrayList<AppService>();
appServices_e = sqlSession.selectList("com.itrus.portal.db.CertificationChargingMapper.selectAppServiceByServiceType", map);
// 系统配置的实名认证服务集合-个人
map.put("serviceType", 2);
List<AppService> appServices_p = new ArrayList<AppService>();
appServices_p = sqlSession.selectList("com.itrus.portal.db.CertificationChargingMapper.selectAppServiceByServiceType", map);
uiModel.addAttribute("appServices_e", appServices_e);
uiModel.addAttribute("appServices_p", appServices_p);
List<CertificationCharging> certificationChargings = new ArrayList<CertificationCharging>();
certificationChargings = certificationChargingService.selectList(id, ComNames.CHARGING_TYPE_SMRZ_1);
CertificationChargingWrap certificationChargingWrap = new CertificationChargingWrap();
List<CertificationChargingList> certificationChargingLists = new ArrayList<CertificationChargingList>();
for (int i = 0; i < certificationChargings.size(); i++) {
CertificationChargingList certificationChargingList = new CertificationChargingList();
List<ServiceName> serviceNames = new ArrayList<ServiceName>();
serviceNames = serviceNameService.selectListByCertificationCharging(certificationChargings.get(i));
List<ServiceNameList> serviceNameLists = new ArrayList<ServiceNameList>();
for (int j = 0; j < serviceNames.size(); j++) {
List<ChargingPrice> chargingPrices = chargingPriceService.selectListByOneServiceName(serviceNames.get(j));
ServiceNameList serviceNameList = new ServiceNameList();
ChargingPriceList chargingPriceList = new ChargingPriceList();
// 1
chargingPriceList.setChargingPriceLists(chargingPrices);
// 2
serviceNameList.setServiceName(serviceNames.get(j));
serviceNameList.setChargingPriceList(chargingPriceList);
serviceNameLists.add(serviceNameList);
}
certificationChargingList.setCertificationCharging(certificationChargings.get(i));
certificationChargingList.setServiceNameLists(serviceNameLists);
certificationChargingLists.add(certificationChargingList);
}
certificationChargingWrap.setCertificationChargingLists(certificationChargingLists);
uiModel.addAttribute("ccw", certificationChargingWrap);
Map<Long, AppService> appServiceMap = sqlSession.selectMap("com.itrus.portal.db.AppServiceMapper.selectByExample", null, "id");
uiModel.addAttribute("appServiceMap", appServiceMap);
returnParam(request, uiModel);
return "certificationcharging/update";
}
use of com.itrus.portal.db.AppServiceExample in project portal by ixinportal.
the class OutServiceConfigController 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 create.
// 新建处理
@RequestMapping(method = RequestMethod.POST, produces = "text/html")
public String create(@ModelAttribute("evidenceSaveService") EvidenceSaveService evidenceSaveService, @ModelAttribute("appService") AppService appService, BindingResult bindingResult, Model uiModel, HttpServletRequest httpServletRequest) {
if (bindingResult.hasErrors()) {
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";
}
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.saveEvidenceSaveService(evidenceSaveService, appService, getAdmin().getId());
String oper = "添加存证服务配置";
String info = "存证服务配置名称: " + appService.getAppServiceName();
LogUtil.evidencelog(sqlSession, null, oper, info);
return "redirect:saveservice/" + evidenceSaveService.getId();
}
Aggregations