1
2
3
4
5 package gboat2.web.business.impl;
6
7 import gboat2.base.core.dao.QuerySupport;
8 import gboat2.base.core.service.BaseService;
9 import gboat2.web.business.IVersionMgrBusiness;
10 import gboat2.web.model.Version;
11
12 import java.util.HashMap;
13 import java.util.List;
14 import java.util.Map;
15
16 import org.springframework.stereotype.Service;
17 import org.springframework.transaction.annotation.Transactional;
18
19
20
21
22
23 @Transactional
24 @Service
25 public class VersionMgrBusinessImpl extends BaseService implements IVersionMgrBusiness {
26
27 public String getVersionCode() {
28 Map<String, Object> params = new HashMap<String, Object>();
29 params.put(QuerySupport.PARAM_TABLENAME, Version.class);
30 params.put("_dataStatus", "1");
31 params.put(QuerySupport.PARAM_ORDERBY, "recordTime desc");
32
33 List<Version> versions = (List<Version>) this.query(params);
34 if(versions!=null && versions.size()>0){
35 Version version = versions.get(0);
36 if(version!=null)return version.getVersionCode();
37 }
38
39 return "";
40 }
41
42
43
44 }