|
|
@@ -7,6 +7,7 @@ import com.izouma.nineth.domain.GiftOrder;
|
|
|
import com.izouma.nineth.dto.AssetDTO;
|
|
|
import com.izouma.nineth.dto.PageQuery;
|
|
|
import com.izouma.nineth.dto.UserHistory;
|
|
|
+import com.izouma.nineth.dto.WhetherMetaCanUse;
|
|
|
import com.izouma.nineth.enums.CollectionType;
|
|
|
import com.izouma.nineth.exception.BusinessException;
|
|
|
import com.izouma.nineth.repo.AssetRepo;
|
|
|
@@ -37,11 +38,11 @@ import java.util.concurrent.ExecutionException;
|
|
|
@RequestMapping("/asset")
|
|
|
@AllArgsConstructor
|
|
|
public class AssetController extends BaseController {
|
|
|
- private AssetService assetService;
|
|
|
- private AssetRepo assetRepo;
|
|
|
+ private AssetService assetService;
|
|
|
+ private AssetRepo assetRepo;
|
|
|
private GiftOrderService giftOrderService;
|
|
|
- private OrderRepo orderRepo;
|
|
|
- private CacheService cacheService;
|
|
|
+ private OrderRepo orderRepo;
|
|
|
+ private CacheService cacheService;
|
|
|
|
|
|
//@PreAuthorize("hasRole('ADMIN')")
|
|
|
// @PostMapping("/save")
|
|
|
@@ -193,9 +194,10 @@ public class AssetController extends BaseController {
|
|
|
|
|
|
@ApiOperation("销毁")
|
|
|
@PostMapping("/destroy")
|
|
|
- public void destroy(@RequestParam Long id ,@RequestParam String tradeCode) {
|
|
|
- assetService.destroy(id, SecurityUtils.getAuthenticatedUser().getId(),tradeCode);
|
|
|
+ public void destroy(@RequestParam Long id, @RequestParam String tradeCode) {
|
|
|
+ assetService.destroy(id, SecurityUtils.getAuthenticatedUser().getId(), tradeCode);
|
|
|
}
|
|
|
+
|
|
|
@ApiOperation("开盲盒")
|
|
|
@PostMapping("/open")
|
|
|
public void open(@RequestParam Long id) {
|
|
|
@@ -234,6 +236,11 @@ public class AssetController extends BaseController {
|
|
|
public void giveBonus() {
|
|
|
assetService.giveBonus();
|
|
|
}
|
|
|
+
|
|
|
+ @GetMapping("/whetherMetaCanUse/{userId}")
|
|
|
+ public List<WhetherMetaCanUse> whetherMetaCanUse(@PathVariable Long userId) {
|
|
|
+ return assetService.whetherMetaCanUse(userId);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|