名称模糊查询
This commit is contained in:
parent
980415c8ca
commit
24c50f7f17
|
|
@ -4,12 +4,14 @@ import com.engine.salary.entity.base.BaseQueryParam;
|
|||
import com.engine.salary.enums.SalaryOnOffEnum;
|
||||
import com.engine.salary.enums.SalaryValueTypeEnum;
|
||||
import com.engine.salary.enums.salaryitem.SalaryDataTypeEnum;
|
||||
import com.engine.salary.util.db.DBType;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.stream.Collectors;
|
||||
|
|
@ -71,13 +73,15 @@ public class SalaryItemSearchParam extends BaseQueryParam {
|
|||
|
||||
String sqlWhere = " t.delete_type = 0 ";
|
||||
|
||||
DBType dbType = DBType.get(new RecordSet().getDBType());
|
||||
|
||||
String name = searchParam.getName();
|
||||
if (StringUtils.isNotBlank(name)) {
|
||||
sqlWhere += " AND t.name = " + name;
|
||||
sqlWhere += " AND t.name " + dbType.like(name);
|
||||
}
|
||||
String description = searchParam.getDescription();
|
||||
if (StringUtils.isNotBlank(description)) {
|
||||
sqlWhere += " AND t.description = " + description;
|
||||
sqlWhere += " AND t.description " + dbType.like(description);
|
||||
}
|
||||
Integer useInEmployeeSalary = searchParam.getUseInEmployeeSalary();
|
||||
if (useInEmployeeSalary != null) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue