Commit 5f52e07d authored by hezhen's avatar hezhen

app自动更新

parent 9db4f363
......@@ -85,6 +85,18 @@ public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> {
return ObjectRestResponse.succ();
}
public ObjectRestResponse getVersionH5(Integer type){
Example example =new Example(AppVersion.class);
example.createCriteria().andEqualTo("isDel",0).andEqualTo("downloadSwitch",0).andEqualTo("sysType",type);
example.setOrderByClause("version DESC");
List<AppVersion> list=selectByExample(example);
if (list.size()>0){
AppVersion appVersion=list.get(0);
return new ObjectRestResponse().status(RestCode.SUCCESS.getStatus()).msg(RestCode.SUCCESS.getMsg()).data(appVersion).rel(false);
}
return ObjectRestResponse.succ();
}
public RestResponse uploadDrivingLicense(MultipartFile file) throws IOException {
DateTime now = DateTime.now();
String dirPathToday = File.separator + now.toString(DEFAULT_DATE_TIME_FORMATTER);
......
......@@ -46,9 +46,16 @@ public class AppVersionController extends BaseController<AppVersionBiz,AppVersio
@IgnoreUserToken
public ObjectRestResponse info(
@RequestParam(value = "type",defaultValue = "0") Integer type,
@RequestParam(value = "version",defaultValue = "") String version
@RequestParam(value = "version",defaultValue = "") String version,
@RequestParam(value = "isH5",defaultValue = "0") Integer isH5
){
return baseBiz.getVersion(version,type);
ObjectRestResponse restResponse=null;
if (isH5!=null&&isH5==1){
restResponse= baseBiz.getVersion(version,type);
}else {
restResponse=baseBiz.getVersionH5(type);
}
return restResponse;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment