|
|
@@ -1,8 +1,10 @@
|
|
|
package com.izouma.nineth.web;
|
|
|
|
|
|
+import com.izouma.nineth.domain.Asset;
|
|
|
import com.izouma.nineth.domain.MetaGameCopy;
|
|
|
import com.izouma.nineth.domain.MetaGameProcess;
|
|
|
import com.izouma.nineth.domain.MetaZombie;
|
|
|
+import com.izouma.nineth.dto.CommonMatchDTO;
|
|
|
import com.izouma.nineth.dto.MetaRestResult;
|
|
|
import com.izouma.nineth.dto.PageQuery;
|
|
|
import com.izouma.nineth.enums.GameCopyType;
|
|
|
@@ -11,12 +13,15 @@ import com.izouma.nineth.exception.BusinessException;
|
|
|
import com.izouma.nineth.repo.MetaGameCopyRepo;
|
|
|
import com.izouma.nineth.repo.MetaGameProcessRepo;
|
|
|
import com.izouma.nineth.repo.MetaZombieRepo;
|
|
|
+import com.izouma.nineth.service.AssetService;
|
|
|
import com.izouma.nineth.service.MetaGameCopyService;
|
|
|
import com.izouma.nineth.utils.ObjUtils;
|
|
|
+import com.izouma.nineth.utils.SecurityUtils;
|
|
|
import com.izouma.nineth.utils.excel.ExcelUtils;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.springframework.data.domain.Page;
|
|
|
+import org.springframework.data.domain.Pageable;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
@@ -38,6 +43,8 @@ public class MetaGameCopyController extends BaseController {
|
|
|
|
|
|
private MetaGameProcessRepo metaGameProcessRepo;
|
|
|
|
|
|
+ private AssetService assetService;
|
|
|
+
|
|
|
//@PreAuthorize("hasRole('ADMIN')")
|
|
|
@PostMapping("/save")
|
|
|
public MetaGameCopy save(@RequestBody MetaGameCopy record) {
|
|
|
@@ -142,5 +149,15 @@ public class MetaGameCopyController extends BaseController {
|
|
|
}
|
|
|
return MetaRestResult.returnSuccess(metaGameProcess.getPoint());
|
|
|
}
|
|
|
+
|
|
|
+ @GetMapping("/queryAsset")
|
|
|
+ public MetaRestResult<Page<Asset>> queryAsset(@RequestParam Long id, @RequestParam(defaultValue = "1") Long companyId, Pageable pageable) {
|
|
|
+ MetaGameCopy metaGameCopy = metaGameCopyRepo.findByIdAndDelAndPublish(id, false, true);
|
|
|
+ if (Objects.isNull(metaGameCopy)) {
|
|
|
+ return MetaRestResult.returnError("查询不到配置");
|
|
|
+ }
|
|
|
+ return MetaRestResult.returnSuccess(assetService.findMintActivityAssetsCommon(SecurityUtils.getAuthenticatedUser().getId(), companyId,
|
|
|
+ new CommonMatchDTO(metaGameCopy.getRule(), metaGameCopy.isAudit(), metaGameCopy.getCollectionName()), pageable));
|
|
|
+ }
|
|
|
}
|
|
|
|