参数 undefined的情况

This commit is contained in:
2024-08-23 10:11:06 +08:00
parent 37fffa0f98
commit c0078222f5
3 changed files with 4 additions and 4 deletions

View File

@@ -83,7 +83,7 @@ public class ProductController {
@RequestParam("shopId") String shopId,
@RequestParam("productId") String productId,
@RequestParam("spec_tag") String spec_tag,
@RequestParam("isVip") Integer isVip
@RequestParam("isVip") String isVip
) {
return productService.queryProductSku(code,shopId, productId, spec_tag,isVip);
}

View File

@@ -26,7 +26,7 @@ public interface TbProductMapper {
List<TbProduct> selectByIds(@Param("list") List<String> ids);
Integer selectByQcode(@Param("code") String code,@Param("productId") Integer productId,@Param("shopId") String shopId);
Integer selectByCodeAndSkuId(@Param("code") String code,@Param("skuId") Integer skuId,@Param("shopId") String shopId,@Param("isVip") Integer isVip);
Integer selectByCodeAndSkuId(@Param("code") String code,@Param("skuId") Integer skuId,@Param("shopId") String shopId,@Param("isVip") String isVip);
Integer selectByNewQcode(@Param("code") String code,@Param("productId") Integer productId,@Param("shopId") String shopId,@Param("list") List<String> list);
List<ShopGroupInfoVo> selGroups(@Param("proName") String proName,@Param("type") String type,

View File

@@ -464,8 +464,8 @@ public class ProductService {
}
public Result queryProductSku(String code, String shopId, String productId, String spec_tag,Integer isVip) {
if (ObjectUtil.isEmpty(shopId) || ObjectUtil.isEmpty(productId) || ObjectUtil.isEmpty(isVip)) {
public Result queryProductSku(String code, String shopId, String productId, String spec_tag,String isVip) {
if (ObjectUtil.isEmpty(shopId) || ObjectUtil.isEmpty(productId) || StringUtils.isEmpty(isVip)|| isVip.equals("undefined") ) {
return Result.fail("参数错误");
}
TbProductSkuWithBLOBs tbProductSkuWithBLOBs = tbProductSkuMapper.selectByShopIdAndProductIdAndSpec(shopId, productId, spec_tag);