| | |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.crm.common.service.OssService; |
| | | import com.zy.crm.common.utils.FileSaveExampleUtil; |
| | | import com.zy.crm.common.web.BaseController; |
| | | import com.zy.crm.manager.entity.Plan; |
| | |
| | | |
| | | @Autowired |
| | | private AppVersionService appVersionService; |
| | | @Autowired |
| | | private OssService ossService; |
| | | |
| | | @RequestMapping(value = "/appVersion/{id}/auth") |
| | | @ManagerAuth |
| | |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(AppVersion.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | // if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | wrapper.orderBy("id", false); |
| | | return R.ok(appVersionService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | |
| | | return R.error("已是最新版本"); |
| | | } |
| | | |
| | | String download = ossService.download(latestApp.getPath()); |
| | | latestApp.setUrl(download); |
| | | |
| | | return R.ok("有新版本,需要更新").add(latestApp); |
| | | } |
| | | |