|
@@ -1,6 +1,7 @@
|
|
|
package com.gis.mapper.provider;
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
+import com.gis.common.util.RegexUtil;
|
|
|
import com.gis.domain.dto.AgePageDto;
|
|
|
import com.gis.domain.dto.PageDto;
|
|
|
import lombok.extern.log4j.Log4j2;
|
|
@@ -17,23 +18,23 @@ public class WorkProvider {
|
|
|
StringBuffer sql = new StringBuffer("select * from tb_work where is_delete = 0 and status > 0");
|
|
|
|
|
|
if(StrUtil.isNotBlank(userId)){
|
|
|
- sql.append(" and ( user_id = '").append(userId).append("' )");
|
|
|
+ sql.append(" and ( user_id = '").append(RegexUtil.escapeChar(userId)).append("' )");
|
|
|
}
|
|
|
|
|
|
String searchKey = param.getSearchKey();
|
|
|
if(!StringUtils.isAllBlank(searchKey)){
|
|
|
- sql.append(" and ( name like '%").append(searchKey).append("%' )");
|
|
|
+ sql.append(" and ( name like '%").append(RegexUtil.escapeChar(searchKey)).append("%' )");
|
|
|
}
|
|
|
|
|
|
String phone = param.getUserId();
|
|
|
if (StrUtil.isNotBlank(phone)){
|
|
|
- sql.append(" and ( user_id like '%").append(phone).append("%' )");
|
|
|
+ sql.append(" and ( user_id like '%").append(RegexUtil.escapeChar(phone)).append("%' )");
|
|
|
}
|
|
|
|
|
|
// 2023-01-30 作品码查询
|
|
|
String workId = param.getWorkId();
|
|
|
if (StrUtil.isNotBlank(workId)){
|
|
|
- sql.append(" and ( id like '%").append(workId).append("%' )");
|
|
|
+ sql.append(" and ( id like '%").append( RegexUtil.escapeChar(workId)).append("%' )");
|
|
|
}
|
|
|
|
|
|
String startTime = param.getStartTime();
|