package com.bizzan.bitrade.controller.option;

import com.bizzan.bitrade.annotation.AccessLog;
import com.bizzan.bitrade.constant.AdminModule;
import com.bizzan.bitrade.constant.PageModel;
import com.bizzan.bitrade.controller.common.BaseAdminController;
import com.bizzan.bitrade.model.screen.ContractOptionOrderScreen;
import com.bizzan.bitrade.util.MessageResult;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/option/order")
@Slf4j
public class ContractOptionOrderController extends BaseAdminController {

    /**
     * 分页查询所有订单
     * @param pageModel
     * @param screen
     * @return
     */
    @RequiresPermissions("option:order:page-query")
    @PostMapping("page-query")
    @AccessLog(module = AdminModule.CONTRACTOPTION, operation = "期权合约订单 列表")
    public MessageResult detail(
            PageModel pageModel,
            ContractOptionOrderScreen screen) {
        return null;
    }


    /**
     * 某期合约所有订单
     * @param optionId
     * @return
     */
    @RequiresPermissions("option:order:option-list")
    @PostMapping("option-list")
    @AccessLog(module = AdminModule.CONTRACTOPTION, operation = "期权合约订单 列表")
    public MessageResult queryByOptionId(Long optionId){
        return null;
    }

    /**
     * 某用户合约所有订单
     * @param memberId
     * @return
     */
    @RequiresPermissions("option:order:member-list")
    @PostMapping("member-list")
    @AccessLog(module = AdminModule.CONTRACTOPTION, operation = "期权合约订单 列表")
    public MessageResult queryByMember(Long memberId){
        return null;
    }
    @RequiresPermissions("option:order:setOptionOrder")
    @PostMapping("setOptionOrder")
    @AccessLog(module = AdminModule.CONTRACTOPTION, operation = "设置期权合约")
    public MessageResult setOptionOrder(Long memberId,Integer optionNo,Short optionNoChange,Short directionChange){
        return null;
    }

}
