use of com.itrus.portal.db.SysConfigExample in project portal by ixinportal.
the class SysConfigController method list.
// 列表所有信息
@RequestMapping(produces = "text/html")
public String list(@RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model uiModel) {
SysConfigExample sysconfigex = new SysConfigExample();
// sysconfigex.or().andIdIsNotNull();
List sysconfigall = sqlSession.selectList("com.itrus.portal.db.SysConfigMapper.selectByExample", sysconfigex);
uiModel.addAttribute("sysconfigs", sysconfigall);
List<String> sysConfigList = sqlSession.selectList("com.itrus.portal.db.SysConfigMapper.selectTypes");
uiModel.addAttribute("sflit", sysConfigList);
return "sysconfigs/list";
}
use of com.itrus.portal.db.SysConfigExample in project portal by ixinportal.
the class GetRaInfoTask method isSyncGetRa.
/**
* true表示可以往下执行,false表示不能继续往下执行
*
* @return
*/
public boolean isSyncGetRa() {
SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
String timeStr = format.format(new Date());
String random = getRandomStr();
String syncRaInfo = timeStr + "_" + random;
SysConfig conf = new SysConfig();
conf.setConfig(syncRaInfo);
Map<String, Object> retmap = new HashMap<String, Object>();
retmap.put("record", conf);
SysConfigExample example = new SysConfigExample();
SysConfigExample.Criteria criteria = example.or();
criteria.andTypeEqualTo("syncRaInfo");
criteria.andConfigNotLike(timeStr + "_%");
retmap.put("example", example);
sqlSession.update("com.itrus.portal.db.SysConfigMapper.updateByExampleSelective", retmap);
example = new SysConfigExample();
criteria = example.or();
criteria.andTypeEqualTo("syncRaInfo");
criteria.andConfigEqualTo(syncRaInfo);
SysConfig config = sqlSession.selectOne("com.itrus.portal.db.SysConfigMapper.selectByExample", example);
if (null == config) {
return false;
} else {
return true;
}
}
Aggregations