From 4dc455244338160e411338a1795f2ba21d7c3506 Mon Sep 17 00:00:00 2001 From: zhaotianfeng <12345678> Date: Sat, 14 Sep 2024 10:44:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E9=93=B6=E5=8F=B0=20=E5=95=86?= =?UTF-8?q?=E5=93=81controller?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CashRegisterGoodsController.java | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/cashierGoods/controller/CashRegisterGoodsController.java 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); + } + + +}