package com.fs.app.controller;


import com.fs.app.annotation.Login;
import com.fs.common.core.domain.R;
import com.fs.his.domain.FsStore;
import com.fs.his.param.FsStoreProductAttrValueListDParam;
import com.fs.his.service.IFsStoreProductAttrValueService;
import com.fs.his.service.IFsStoreProductService;
import com.fs.his.service.IFsStoreService;
import com.fs.his.vo.FsDoctorPrescribeListDVO;
import com.fs.his.vo.FsStoreProductAttrValueListDVO;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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;

import javax.servlet.http.HttpServletRequest;
import java.util.List;


@Api("药品接口")
@RestController
@RequestMapping(value="/app/storeProduct")
public class StoreProductController extends  AppBaseController {
	@Autowired
	private IFsStoreService storeService;
	@Autowired
	private IFsStoreProductAttrValueService storeProductAttrValueService;
	@Login
	@ApiOperation("获取店铺商品列表")
	@GetMapping("/getStoreProductList")
	public R getStoreProductList(FsStoreProductAttrValueListDParam param, HttpServletRequest request){
		PageHelper.startPage(param.getPageNum(), param.getPageSize());
		List<FsStoreProductAttrValueListDVO> list=storeProductAttrValueService.selectFsStoreProductAttrValueListDVO(param);
		PageInfo<FsStoreProductAttrValueListDVO> listPageInfo=new PageInfo<>(list);
		return R.ok().put("data",listPageInfo);
	}

}
