use of com.itrus.portal.db.ApplicationInfoExample in project portal by ixinportal.
the class MobileApplyConfigController method creatForm.
// 返回新建页面
@RequestMapping(params = "form", produces = "text/html")
public String creatForm(Model uiModel) {
// 得到所有应用
List<ApplicationInfo> applicationInfos = applicationInfoService.selectByExample(new ApplicationInfoExample());
uiModel.addAttribute("applicationInfos", applicationInfos);
Iterator<ApplicationInfo> iterator = applicationInfos.iterator();
while (iterator.hasNext()) {
ApplicationInfo mobileApply = iterator.next();
MobileApplyConfigManage appserviceChargings = mobileApplyConfigService.selectByappId(mobileApply.getAppId());
if (null != appserviceChargings) {
iterator.remove();
}
}
uiModel.addAttribute("applicationInfos", applicationInfos);
// 得到所有RA 服务信息
List<RaAccount> accounts = raAccountService.getRaAccounts();
uiModel.addAttribute("accounts", accounts);
return "applyconfig/create";
}
use of com.itrus.portal.db.ApplicationInfoExample in project portal by ixinportal.
the class MobileApplyConfigController method list.
// 列表显示
@RequestMapping(produces = "text/html")
public String list(@RequestParam(value = "appId", required = false) Long appId, @RequestParam(value = "queryDate1", required = false) Date queryDate1, @RequestParam(value = "queryDate2", required = false) Date queryDate2, @RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model uiModel) {
if (queryDate1 == null && queryDate2 == null) {
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.DATE, 1);
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);
calendar.add(Calendar.MILLISECOND, -1);
queryDate2 = calendar.getTime();
calendar.add(Calendar.MILLISECOND, 1);
calendar.add(Calendar.MONTH, -1);
queryDate1 = calendar.getTime();
}
// 返回页面搜索条件
uiModel.addAttribute("appId", appId);
uiModel.addAttribute("queryDate1", queryDate1);
uiModel.addAttribute("queryDate2", queryDate2);
Map<String, Object> param = new HashMap<String, Object>();
// page,size
if (page == null || page < 1)
page = 1;
if (size == null || size < 1)
size = 10;
Integer offset = size * (page - 1);
param.put("offset", offset);
param.put("limit", size);
param.put("appId", appId);
param.put("queryDate1", queryDate1);
param.put("queryDate2", queryDate2);
Integer count = mobileApplyConfigService.selectMobileApplyConfigManageListCountByMap(param);
uiModel.addAttribute("count", count);
uiModel.addAttribute("pages", (count + size - 1) / size);
// page, size
if (page > 1 && size * (page - 1) >= count) {
page = (count + size - 1) / size;
}
uiModel.addAttribute("page", page);
uiModel.addAttribute("size", size);
List<Map<String, Object>> applyConfigManages = mobileApplyConfigService.selectMobileApplyConfigManageListByMap(param);
uiModel.addAttribute("applyConfigManages", applyConfigManages);
// 得到所有应用
List<ApplicationInfo> applicationInfos = applicationInfoService.selectByExample(new ApplicationInfoExample());
uiModel.addAttribute("applicationInfos", applicationInfos);
return "applyconfig/list";
}
use of com.itrus.portal.db.ApplicationInfoExample in project portal by ixinportal.
the class CertificationChargingServiceImpl method getApplicationInfoByAppId.
/**
* 根据appid,获取ApplicationInfo
*
* @param appId
* @return
*/
public ApplicationInfo getApplicationInfoByAppId(String appId) {
ApplicationInfo applicationInfo = new ApplicationInfo();
ApplicationInfoExample aie = new ApplicationInfoExample();
ApplicationInfoExample.Criteria criteria = aie.or();
criteria.andAppIdEqualTo(appId);
applicationInfo = sqlSession.selectOne("com.itrus.portal.db.ApplicationInfoMapper.selectByExample", aie);
return applicationInfo;
}
use of com.itrus.portal.db.ApplicationInfoExample in project portal by ixinportal.
the class MobileUserController method list.
// 列表
@RequestMapping(produces = "text/html")
public String list(@RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, @RequestParam(value = "userId", required = false) String userId, @RequestParam(value = "name", required = false) String name, @RequestParam(value = "phone", required = false) String phone, @RequestParam(value = "idNumber", required = false) String idNumber, @RequestParam(value = "appId", required = false) Long appId, @RequestParam(value = "queryDate1", required = false) Date queryDate1, @RequestParam(value = "queryDate2", required = false) Date queryDate2, Model uiModel) {
if (queryDate1 == null && queryDate2 == null) {
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.DATE, 1);
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);
calendar.add(Calendar.MILLISECOND, -1);
queryDate2 = calendar.getTime();
calendar.add(Calendar.MILLISECOND, 1);
calendar.add(Calendar.MONTH, -1);
queryDate1 = calendar.getTime();
}
// 返回页面搜索条件
uiModel.addAttribute("appId", appId);
uiModel.addAttribute("userId", userId);
uiModel.addAttribute("name", name);
uiModel.addAttribute("phone", phone);
uiModel.addAttribute("idNumber", idNumber);
uiModel.addAttribute("queryDate1", queryDate1);
uiModel.addAttribute("queryDate2", queryDate2);
Map<String, Object> param = new HashMap<String, Object>();
// page,size
if (page == null || page < 1)
page = 1;
if (size == null || size < 1)
size = 10;
Integer offset = size * (page - 1);
param.put("offset", offset);
param.put("limit", size);
param.put("appId", appId);
param.put("queryDate1", queryDate1);
param.put("queryDate2", queryDate2);
if (StringUtils.isNotEmpty(userId)) {
param.put("userId", "%" + userId + "%");
}
if (StringUtils.isNotEmpty(name)) {
param.put("name", "%" + name + "%");
}
if (StringUtils.isNotEmpty(phone)) {
param.put("phone", "%" + phone + "%");
}
if (StringUtils.isNotEmpty(idNumber)) {
param.put("idNumber", "%" + idNumber + "%");
}
Integer count = mobileUserService.selectMobileUserListCountByMap(param);
uiModel.addAttribute("count", count);
uiModel.addAttribute("pages", (count + size - 1) / size);
// page, size
if (page > 1 && size * (page - 1) >= count) {
page = (count + size - 1) / size;
}
uiModel.addAttribute("page", page);
uiModel.addAttribute("size", size);
List<MobileUser> mobileUsers = mobileUserService.selectMobileUserListByMap(param);
uiModel.addAttribute("mobileUsers", mobileUsers);
// 得到所有应用
List<ApplicationInfo> applicationInfos = applicationInfoService.selectByExample(new ApplicationInfoExample());
uiModel.addAttribute("applicationInfos", applicationInfos);
return "mobileuser/list";
}
use of com.itrus.portal.db.ApplicationInfoExample in project portal by ixinportal.
the class TakeChargingServiceImpl method getApplicationInfoByAppId.
/**
* 根据appid,获取ApplicationInfo
*
* @param appId
* @return
*/
public ApplicationInfo getApplicationInfoByAppId(String appId) {
ApplicationInfo applicationInfo = new ApplicationInfo();
ApplicationInfoExample aie = new ApplicationInfoExample();
ApplicationInfoExample.Criteria criteria = aie.or();
criteria.andAppIdEqualTo(appId);
applicationInfo = sqlSession.selectOne("com.itrus.portal.db.ApplicationInfoMapper.selectByExample", aie);
return applicationInfo;
}
Aggregations