package com.ruoyi.web.controller.mch;

import com.fasterxml.jackson.annotation.JsonView;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.JsonViewProfile;
import com.ruoyi.ss.store.domain.StoreVo;
import com.ruoyi.ss.store.service.StoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author wjh
 * 2024/7/30
 */
@RestController
@RequestMapping("/mch/store")
public class MchStoreController extends BaseController {

    @Autowired
    private StoreService storeService;

    @GetMapping("/listByIds/{ids}")
    @JsonView(JsonViewProfile.AppMch.class)
    public AjaxResult listByIds(@PathVariable List<Long> ids) {
        List<StoreVo> list = storeService.selectSmStoreListByIds(ids, getUserId());
        return success(list);
    }

}
