|
|
@@ -6,6 +6,7 @@ import com.izouma.nineth.domain.GiftOrder;
|
|
|
import com.izouma.nineth.dto.PageQuery;
|
|
|
import com.izouma.nineth.exception.BusinessException;
|
|
|
import com.izouma.nineth.repo.AssetRepo;
|
|
|
+import com.izouma.nineth.repo.TokenHistoryRepo;
|
|
|
import com.izouma.nineth.service.AssetService;
|
|
|
import com.izouma.nineth.service.GiftOrderService;
|
|
|
import com.izouma.nineth.utils.ObjUtils;
|
|
|
@@ -14,6 +15,7 @@ import com.izouma.nineth.utils.excel.ExcelUtils;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import org.springframework.data.domain.Page;
|
|
|
+import org.springframework.data.domain.Pageable;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
@@ -28,6 +30,7 @@ public class AssetController extends BaseController {
|
|
|
private AssetService assetService;
|
|
|
private AssetRepo assetRepo;
|
|
|
private GiftOrderService giftOrderService;
|
|
|
+ private TokenHistoryRepo tokenHistoryRepo;
|
|
|
|
|
|
//@PreAuthorize("hasRole('ADMIN')")
|
|
|
@PostMapping("/save")
|
|
|
@@ -106,7 +109,11 @@ public class AssetController extends BaseController {
|
|
|
return assetService.tokenHistory(tokenId, assetId);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ @GetMapping("/userHistory")
|
|
|
+ @ApiOperation("交易历史")
|
|
|
+ public Page<TokenHistory> userHistory(Pageable pageable) {
|
|
|
+ return tokenHistoryRepo.userHistory(SecurityUtils.getAuthenticatedUser().getId(), pageable);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|