|
|
|
|
@ -1,6 +1,5 @@ |
|
|
|
|
package org.springblade.wms.controller; |
|
|
|
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
|
|
|
@ -70,11 +69,6 @@ public class StGoodsController extends BladeController { |
|
|
|
|
QueryWrapper<StGoods> wrapper = Condition.getQueryWrapper(stGoods, StGoods.class); |
|
|
|
|
wrapper.eq("is_deleted", 0) |
|
|
|
|
.orderByDesc("create_time"); |
|
|
|
|
|
|
|
|
|
String goodsCodeAndGoodsName = StrUtil.toString(stGoods.get("goodsCodeAndGoodsName")); |
|
|
|
|
if (StrUtil.isNotBlank(goodsCodeAndGoodsName)) { |
|
|
|
|
wrapper.and(w -> w.like("goods_code", goodsCodeAndGoodsName).or().like("goods_name", goodsCodeAndGoodsName)); |
|
|
|
|
} |
|
|
|
|
IPage<StGoods> pages = stGoodsService.page(Condition.getPage(query), wrapper); |
|
|
|
|
return R.data(StGoodsWrapper.build().pageVO(pages)); |
|
|
|
|
} |
|
|
|
|
|