package com.hzs.sale.index.controller.api;

import com.hzs.common.core.web.domain.AjaxResult;
import com.hzs.common.security.utils.SecurityUtils;
import com.hzs.sale.order.service.ISaOrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 会员首页
 */
@Slf4j
@RequestMapping("/api/order")
@RestController
public class ApiIndexController {

    @Autowired
    private ISaOrderService iSaOrderService;

    /**
     * 我的市场
     *
     * @return AjaxResult
     */
    @GetMapping("/index-myMarket")
    public AjaxResult selectMyMarket() {
        return AjaxResult.success(iSaOrderService.selectMyMarket(SecurityUtils.getUserId(), SecurityUtils.getPkCountry()));
    }


}
