This commit is contained in:
zhouwentao 2024-04-15 20:44:36 +08:00
parent 53abae670a
commit f315000789
1 changed files with 16 additions and 6 deletions

View File

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