diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mini/controller/MiniVipController.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mini/controller/MiniVipController.java index b370fd0..c954903 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mini/controller/MiniVipController.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mini/controller/MiniVipController.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang.StringUtils; import org.apache.shiro.SecurityUtils; import org.jeecg.common.api.vo.Result; import org.jeecg.common.exception.JeecgBootException; @@ -58,12 +59,21 @@ public class MiniVipController { @GetMapping(value = "/sku/all") @ApiOperation(value = "获取全部商品信息") - public Result skuAll(){ - LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.eq(YxVipSku::getSaleable, "1"); - queryWrapper.orderByDesc(YxVipSku::getSkuPrice); - List list = yxVipSkuService.list(queryWrapper); - return Result.OK(list); + public Result skuAll(@RequestParam String provider){ + if (StringUtils.isNotBlank(provider) && "toutiao".equals(provider)) { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(YxVipSku::getSkuName,"测试体验卡"); + queryWrapper.orderByDesc(YxVipSku::getSkuPrice); + List list = yxVipSkuService.list(queryWrapper); + return Result.OK(list); + }else{ + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(YxVipSku::getSaleable, "1"); + queryWrapper.orderByDesc(YxVipSku::getSkuPrice); + queryWrapper.ne(YxVipSku::getSkuName,"测试体验卡"); + List list = yxVipSkuService.list(queryWrapper); + return Result.OK(list); + } } @PostMapping(value = "/card/activation")