|
@@ -69,7 +69,8 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
|
|
.in(Material::getClassifyId, classifyIds)
|
|
.in(Material::getClassifyId, classifyIds)
|
|
.apply(Func.isNotEmpty(condition.get("code")), "instr(`code`, '" + condition.get("code") + "') > 0")
|
|
.apply(Func.isNotEmpty(condition.get("code")), "instr(`code`, '" + condition.get("code") + "') > 0")
|
|
.apply(Func.isNotEmpty(condition.get("name")), "instr(`name`, '" + condition.get("name") + "') > 0")
|
|
.apply(Func.isNotEmpty(condition.get("name")), "instr(`name`, '" + condition.get("name") + "') > 0")
|
|
- .and(Func.isNotEmpty(condition.get("keyword")), o -> o.apply("instr(`code`, '" + condition.get("keyword") + "') > 0").or().apply("instr(`name`, '" + condition.get("keyword") + "') > 0"));
|
|
|
|
|
|
+ .and(Func.isNotEmpty(condition.get("keyword")), o -> o.apply("instr(`code`, '" + condition.get("keyword") + "') > 0").or().apply("instr(`name`, '" + condition.get("keyword") + "') > 0"))
|
|
|
|
+ .orderByDesc(Material::getId);
|
|
|
|
|
|
return page(condition, wrapper);
|
|
return page(condition, wrapper);
|
|
}
|
|
}
|