소스 검색

更改一生搜索条件

刘韬 6 년 전
부모
커밋
c9bf4c1429
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      DataFusion/src/com/zskk/control/ViewController.java
  2. 1 1
      DataFusion/src/com/zskk/task/DataTask.java

+ 1 - 1
DataFusion/src/com/zskk/control/ViewController.java

@@ -62,7 +62,7 @@ public class ViewController extends Controller {
 		if (name == null) {
 			return "1";
 		}
-		Doctors doctors = Doctors.dao.use("zskk").findFirst("SELECT * FROM doctors where realname like ? and institution_id=73090001",name);
+		Doctors doctors = Doctors.dao.use("zskk").findFirst("SELECT * FROM doctors where instr(?,realname) and institution_id=73090001",name);
 		if (doctors == null) {
 			return "1";
 		}

+ 1 - 1
DataFusion/src/com/zskk/task/DataTask.java

@@ -69,7 +69,7 @@ public class DataTask implements ITask {
 		if (name == null) {
 			return "1";
 		}
-		Doctors doctors = Doctors.dao.use("zskk").findFirst("SELECT * FROM doctors where realname like ? and institution_id=73090001",name);
+		Doctors doctors = Doctors.dao.use("zskk").findFirst("SELECT * FROM doctors where instr(?,realname) and institution_id=73090001",name);
 		if (doctors == null) {
 			return "1";
 		}