| | |
| | | * @throws BaseException |
| | | */ |
| | | public FieldSetEntity checkVersion(String version) throws BaseException{ |
| | | String filter="version>?"; |
| | | DataTableEntity dt =baseDao.listTable(MobileCoreConst.TABLE_APP_MANAGER, filter, new String[] {version},"version"); |
| | | |
| | | String s[]=version.split("\\."); |
| | | String sql="select * from (\r\n" |
| | | + "SELECT *,\r\n" |
| | | + "SUBSTRING_INDEX(version,'.', 1) a,\r\n" |
| | | + "SUBSTRING_INDEX(SUBSTRING_INDEX(version,'.', 2),'.', -1) b,\r\n" |
| | | + "SUBSTRING_INDEX(version,'.', -1) c\r\n" |
| | | + "FROM product_sys_app_version ) b where a>? or b>? or c>? order by a desc ,b desc ,c desc"; |
| | | DataTableEntity dt =baseDao.listTable(sql, s); |
| | | FieldSetEntity fs=new FieldSetEntity(); |
| | | fs.setTableName(MobileCoreConst.TABLE_APP_MANAGER); |
| | | if(DataTableEntity.isEmpty(dt)) { |