package shop.alien.second.platform;

import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiOperationSupport;
import io.swagger.annotations.ApiSort;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import shop.alien.entity.result.R;
import shop.alien.entity.second.vo.SecondTradeRecordVo;
import shop.alien.second.service.PlatformSecondTradeService;

import java.util.List;

@Slf4j
@Api(tags = {"平台-账号冻结"})
@ApiSort(1)
@CrossOrigin
@RequiredArgsConstructor
@RestController
@RequestMapping("/userFreeze")
public class PlatformSecondUserFreezeController {

    private final PlatformSecondTradeService secondTradeRecordService;

    @ApiOperation("交易列表(分页)")
    @ApiOperationSupport(order = 1)
    @PostMapping("/getTradeRecordPage")
    public R<IPage<SecondTradeRecordVo>> getTradeRecordPage(@RequestBody SecondTradeRecordVo vo) throws Exception {
        log.info("PlatformSecondTradeController.getTradeRecordPage?vo={}", vo.toString());
        return R.data(secondTradeRecordService.getTradeRecordPage(vo));
    }



}
