From a43aaa3e73a2711f8523dbb2f6f3319bf15139f5 Mon Sep 17 00:00:00 2001 From: SongZhang <2064194730@qq.com> Date: Thu, 26 Sep 2024 15:58:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/cashierservice/controller/ProductController.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/controller/ProductController.java b/src/main/java/com/chaozhanggui/system/cashierservice/controller/ProductController.java index 0c97755..3dc9fe1 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/controller/ProductController.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/controller/ProductController.java @@ -2,6 +2,7 @@ package com.chaozhanggui.system.cashierservice.controller; import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSONObject; import com.chaozhanggui.system.cashierservice.entity.dto.ChoseCountDTO; import com.chaozhanggui.system.cashierservice.entity.dto.ChoseEatModelDTO; @@ -42,8 +43,11 @@ public class ProductController { @RequestParam(required = false) String lat, @RequestParam(required = false) String lng, @RequestParam(required = false) String code, - @RequestParam Integer shopId + @RequestParam(required = false) Integer shopId ) { + if (shopId == null && StrUtil.isNotBlank(code)) { + return Result.fail("参数缺失"); + } return productService.queryShopIdByTableCode(userId, openId, code,lat,lng, shopId); }