diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/cashierGoods/controller/CashRegisterGoodsController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/cashierGoods/controller/CashRegisterGoodsController.java new file mode 100644 index 000000000..da2196ecc --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/cashierGoods/controller/CashRegisterGoodsController.java @@ -0,0 +1,52 @@ +package com.fuint.business.cashierGoods.controller; + + +import com.fuint.business.cashierGoods.entity.MtGoods; +import com.fuint.business.cashierGoods.service.CashRegisterGoodsService; +import com.fuint.common.service.GoodsService; +import com.fuint.common.util.TokenUtil; +import com.fuint.framework.exception.BusinessCheckException; +import com.fuint.framework.web.BaseController; +import com.fuint.framework.web.ResponseObject; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import javax.servlet.http.HttpServletRequest; +import java.util.HashMap; +import java.util.List; + +/** + * 收银端 商品相关业务接口 + */ +@RestController +@RequestMapping(value = "/cashRegisterGoods") +public class CashRegisterGoodsController extends BaseController { + + /** + * 商品服务接口 + */ + @Autowired + private CashRegisterGoodsService cashRegisterGoodsService; + + + /** + * 获取店铺相关商品列表 + */ + @ApiOperation(value = "获取商品列表") + @RequestMapping(value = "/list", method = RequestMethod.GET) + public ResponseObject list(HttpServletRequest request) throws BusinessCheckException { + + HashMap map = new HashMap<>(); + map.put("store_id", TokenUtil.getNowAccountInfo().getStoreId()); + List mtGoods = cashRegisterGoodsService.selectListByMap(map); + + return getSuccessResult(mtGoods); + } + + +}