sql
This commit is contained in:
parent
9478a5f1f7
commit
00ae026f8a
@ -12,6 +12,7 @@ import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.lang.random.R;
|
||||
import org.springframework.http.HttpStatus;
|
||||
@ -78,7 +79,7 @@ public class MaterialController {
|
||||
@Operation(summary = "查询所有物料列表")
|
||||
public List<Material> all(@Parameter(description = "类型") @RequestParam(required = false, defaultValue = "") String type) {
|
||||
return materialService.list(Wrappers.<Material>lambdaQuery()
|
||||
.likeLeft(Material::getType, type));
|
||||
.likeLeft(StringUtils.isNotBlank(type), Material::getType, type));
|
||||
}
|
||||
|
||||
@GetMapping("material/{id}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user