|
|
@ -1,13 +1,17 @@ |
|
|
|
package com.win.module.wms.controller.systemInstallPackage; |
|
|
|
|
|
|
|
import cn.hutool.json.JSONObject; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.win.framework.common.pojo.CommonResult; |
|
|
|
import com.win.framework.common.pojo.PageResult; |
|
|
|
import com.win.framework.excel.core.util.ExcelUtils; |
|
|
|
import com.win.framework.operatelog.core.annotations.OperateLog; |
|
|
|
import com.win.module.system.util.StringUtils; |
|
|
|
import com.win.module.wms.controller.systemInstallPackage.vo.*; |
|
|
|
import com.win.module.wms.convert.systemInstallPackage.SystemInstallPackageConvert; |
|
|
|
import com.win.module.wms.dal.dataobject.purchase.PurchaseMainDO; |
|
|
|
import com.win.module.wms.dal.dataobject.systemInstallPackage.SystemInstallPackageDO; |
|
|
|
import com.win.module.wms.dal.mysql.systemInstallPackage.SystemInstallPackageMapper; |
|
|
|
import com.win.module.wms.service.systemInstallPackage.SystemInstallPackageService; |
|
|
|
import io.swagger.v3.oas.annotations.Operation; |
|
|
|
import io.swagger.v3.oas.annotations.Parameter; |
|
|
@ -43,6 +47,10 @@ public class SystemInstallPackageController { |
|
|
|
@Resource |
|
|
|
private SystemInstallPackageService systemInstallPackageService; |
|
|
|
|
|
|
|
@Resource |
|
|
|
private SystemInstallPackageMapper systemInstallPackageMapper; |
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/create") |
|
|
|
@Operation(summary = "创建安装包信息") |
|
|
|
@PreAuthorize("@ss.hasPermission('wms:system-install-package:create')") |
|
|
@ -95,4 +103,19 @@ public class SystemInstallPackageController { |
|
|
|
public CommonResult<JSONObject> returnNewFileSystemInstallPackage() { |
|
|
|
return success(systemInstallPackageService.returnNewFileSystemInstallPackage()); |
|
|
|
} |
|
|
|
|
|
|
|
@GetMapping("/downloadApk") |
|
|
|
@Operation(summary = "下载apk") |
|
|
|
public void downloadApk(HttpServletResponse response) throws IOException { |
|
|
|
String url = ""; |
|
|
|
QueryWrapper<SystemInstallPackageDO> purchaseMainDOQueryWrapper = new QueryWrapper<>(); |
|
|
|
purchaseMainDOQueryWrapper.orderByDesc("create_time"); |
|
|
|
List<SystemInstallPackageDO> systemInstallPackageDOList = systemInstallPackageMapper.selectList(purchaseMainDOQueryWrapper); |
|
|
|
if (systemInstallPackageDOList != null && systemInstallPackageDOList.size() > 0) { |
|
|
|
if (StringUtils.isNotEmpty(systemInstallPackageDOList.get(0).getInstallPackageUrl())) { |
|
|
|
url = systemInstallPackageDOList.get(0).getInstallPackageUrl(); |
|
|
|
} |
|
|
|
} |
|
|
|
response.sendRedirect(url); |
|
|
|
} |
|
|
|
} |
|
|
|