2023年4月16日 修复查询

This commit is contained in:
bai 2023-04-16 14:18:36 +08:00
parent dec46aa362
commit 160d02a288
2 changed files with 9 additions and 0 deletions

View File

@ -9,6 +9,8 @@ import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang.StringUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
@ -68,6 +70,9 @@ public class KcKechengbiaoController extends JeecgController<KcKechengbiao, IKcK
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<KcKechengbiao> queryWrapper = QueryGenerator.initQueryWrapper(kcKechengbiao, req.getParameterMap());
if(StringUtils.isNotBlank(kcKechengbiao.getSearchInput())){
queryWrapper.apply(String.format("(kcmc like CONCAT('%',%s,'%') or skjs like CONCAT('%',%s,'%'))",kcKechengbiao.getSearchInput()));
}
Page<KcKechengbiao> page = new Page<KcKechengbiao>(pageNo, pageSize);
IPage<KcKechengbiao> pageList = kcKechengbiaoService.page(page, queryWrapper);
return Result.OK(pageList);

View File

@ -232,4 +232,8 @@ public class KcKechengbiao implements Serializable {
@ApiModelProperty(value = "状态")
private java.lang.String zt;
/**课程名称或教师名*/
@TableField(exist = false)
private java.lang.String searchInput;
}