use of com.itrus.portal.db.AppServiceExample in project portal by ixinportal.
the class SaveServiceController method updateForm.
// 返回修改页面
@RequestMapping(value = "/{id}", params = "form", produces = "text/html")
public String updateForm(@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/update";
}
use of com.itrus.portal.db.AppServiceExample in project portal by ixinportal.
the class SaveServiceController 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 AppServiceAuthenticationController 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 CertificationChargingController method show.
// 根据应用id,查询应用下的所有计费规则信息
@RequestMapping(value = "/show/{id}")
public String show(@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 appServiceExample = new AppServiceExample();
AppServiceExample.Criteria criteria = appServiceExample.or();
criteria.andTypeEqualTo(ComNames.SERVICE_TYPE_CERTIFICATION);
appServices = sqlSession.selectList("com.itrus.portal.db.AppServiceMapper.selectByExample", appServiceExample);
uiModel.addAttribute("appServices", appServices);
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/show";
}
use of com.itrus.portal.db.AppServiceExample in project portal by ixinportal.
the class AppServiceExtImpl method selectAppServiceByAppServiceId.
/**
* 根据服务编号,得到服务
* @param appServiceId
* @return
*/
public AppService selectAppServiceByAppServiceId(String appServiceId) {
AppServiceExample appServiceExample = new AppServiceExample();
AppServiceExample.Criteria aec = appServiceExample.createCriteria();
aec.andAppServiceIdEqualTo(appServiceId);
return this.selectOneByExample(appServiceExample);
}
Aggregations