fix(public): 新增 parent_id 参数
This commit is contained in:
@@ -43,7 +43,8 @@ public class PublicController {
|
||||
@ApiParam(value = "月份") @RequestParam(value="month") Integer month,
|
||||
@ApiParam(value = "关键字") @RequestParam(value="keyword", required = false) String keyword,
|
||||
@ApiParam(value = "名称") @RequestParam(value="name", required = false) String name,
|
||||
@ApiParam(value = "规格") @RequestParam(value="spec", required = false) String spec
|
||||
@ApiParam(value = "规格") @RequestParam(value="spec", required = false) String spec,
|
||||
@ApiParam(value = "父id") @RequestParam(value="parent_id", required = false) String parentId
|
||||
) throws Exception {
|
||||
LambdaQueryWrapper<PricePublish> query = pricePublishService.getQuery(year, month, null, name, spec, PricePublishType.CURRENT);
|
||||
if (keyword != null && ObjectUtil.isNotEmpty(keyword)) {
|
||||
@@ -52,6 +53,11 @@ public class PublicController {
|
||||
.like(PricePublish::getSpec, keyword)
|
||||
);
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(parentId)) {
|
||||
var materialParentId = parentId.replace(".00", "");
|
||||
query.likeRight(PricePublish::getMaterialId, materialParentId);
|
||||
}
|
||||
|
||||
var currentData = pricePublishService.list(query);
|
||||
|
||||
LambdaQueryWrapper<PricePublish> queryPrevious = pricePublishService.getQuery(year - 1, month, null, name, spec, PricePublishType.CURRENT);
|
||||
|
Reference in New Issue
Block a user