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.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<YxVipSku> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(YxVipSku::getSaleable, "1");
queryWrapper.orderByDesc(YxVipSku::getSkuPrice);
List<YxVipSku> list = yxVipSkuService.list(queryWrapper);
return Result.OK(list);
public Result<?> skuAll(@RequestParam String provider){
if (StringUtils.isNotBlank(provider) && "toutiao".equals(provider)) {
LambdaQueryWrapper<YxVipSku> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(YxVipSku::getSkuName,"测试体验卡");
queryWrapper.orderByDesc(YxVipSku::getSkuPrice);
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")