package com.dy.pmsWechat.product; import com.dy.common.webUtil.BaseResponse; import com.dy.common.webUtil.BaseResponseUtils; import com.dy.common.webUtil.QueryResultVo; import com.dy.pmsGlobal.aop.Log; import com.dy.pmsGlobal.pojoPlt.PltProduct; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; /** * 产品管理 */ @Slf4j @RestController @RequestMapping(path = "product") @SuppressWarnings("unchecked") public class ProductCtrl { private ProductSv proSv; @Autowired public void setProSv(ProductSv proSv){ this.proSv = proSv; } /** * 根据ID查询产品信息 * @return */ @GetMapping(path="one") @Log("根据ID查询产品信息") public BaseResponse one(String id){ PltProduct pro=proSv.selectById(id); return BaseResponseUtils.buildSuccess(pro); } /** * 查询产品信息 * @param vo * @return */ @PostMapping(path="some") @Log("分页查询产品信息") public BaseResponse>> some(@RequestBody QueryVo vo){ QueryResultVo> list = proSv.selectSome(vo); return BaseResponseUtils.buildSuccess(list); } }