修改接口查询参数

This commit is contained in:
yangjun 2025-10-22 10:05:27 +08:00
parent 08790c3bf0
commit af7222f22e
2 changed files with 5 additions and 2 deletions

View File

@ -90,8 +90,7 @@ public class CgdInfoEntity implements Serializable {
private String medicationId;
/**物料图片*/
private String materialImg;
@TableField(exist = false)
private String tagType;
@TableField(exist = false)
private String tagName;
private String wlParamInfo;
}

View File

@ -378,6 +378,10 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
BeanUtils.copyProperties(cgdInfoEntityDto,nuInvoicingCgdInfo);
QueryWrapper<NuInvoicingCgdInfo> queryWrapper = QueryGenerator.initQueryWrapper("a",nuInvoicingCgdInfo, req.getParameterMap());
Page<NuInvoicingCgdInfo> page = new Page<>(pageNo, pageSize);
queryWrapper.apply(StringUtils.isNotBlank(cgdInfoEntityDto.getWlParamInfo())," b.material_name like concat('%', '"+cgdInfoEntityDto.getWlParamInfo()+"' , '%') or\n" +
" b.pinyin like concat('%', '"+cgdInfoEntityDto.getWlParamInfo()+"' , '%') or\n" +
" b.material_no like concat('%', '"+cgdInfoEntityDto.getWlParamInfo()+"' , '%') or\n" +
" b.specification_model like concat('%', '"+cgdInfoEntityDto.getWlParamInfo()+"' , '%')");
List<NuInvoicingCgdInfo> list = cgdInfoMapper.queryCgdInfoList(page,queryWrapper);
IPage<CgdInfoEntity> entityPage = new Page<>(page.getCurrent(), page.getSize(), page.getTotal());
entityPage.setRecords(BeanUtil.copyToList(list, CgdInfoEntity.class));