Commit 98017be5 authored by 雍欢's avatar 雍欢

修复SQL中没有处理 person_kind和role_person_id 为空字符串的情况

parent d89d1324
...@@ -323,12 +323,12 @@ ...@@ -323,12 +323,12 @@
and a.role_id = r.id and a.role_id = r.id
and r.id = rp.role_id and r.id = rp.role_id
and ((case and ((case
when s.person_kind is null then when s.person_kind is null or s.person_kind='' then
'def' 'def'
else else
s.person_kind s.person_kind
end) = (case end) = (case
when r.role_person_kind is null then when r.role_person_kind is null or r.role_person_kind='' then
'def' 'def'
else else
r.role_person_kind r.role_person_kind
...@@ -383,12 +383,12 @@ ...@@ -383,12 +383,12 @@
and s.id = ? and s.id = ?
and p.full_id like concat(o.full_id, '%') and p.full_id like concat(o.full_id, '%')
and ((case and ((case
when s.person_kind is null then when s.person_kind is null or s.person_kind='' then
'def' 'def'
else else
s.person_kind s.person_kind
end) = (case end) = (case
when r.role_person_kind is null then when r.role_person_kind is null or r.role_person_kind='' then
'def' 'def'
else else
r.role_person_kind r.role_person_kind
...@@ -410,12 +410,12 @@ ...@@ -410,12 +410,12 @@
where p.person_id = s.id where p.person_id = s.id
and s.id = ? and s.id = ?
and ((case and ((case
when s.person_kind is null then when s.person_kind is null or s.person_kind='' then
'def' 'def'
else else
s.person_kind s.person_kind
end) = (case end) = (case
when r.role_person_kind is null then when r.role_person_kind is null or r.role_person_kind='' then
'def' 'def'
else else
r.role_person_kind r.role_person_kind
...@@ -433,12 +433,12 @@ ...@@ -433,12 +433,12 @@
where p.person_id = s.id where p.person_id = s.id
and s.id = ? and s.id = ?
and ((case and ((case
when s.person_kind is null then when s.person_kind is null or s.person_kind='' then
'def' 'def'
else else
s.person_kind s.person_kind
end) = (case end) = (case
when r.role_person_kind is null then when r.role_person_kind is null or r.role_person_kind='' then
'def' 'def'
else else
r.role_person_kind r.role_person_kind
...@@ -483,12 +483,12 @@ ...@@ -483,12 +483,12 @@
and s.id = :personId and s.id = :personId
and p.full_id like concat(o.full_id, '%') and p.full_id like concat(o.full_id, '%')
and ((case and ((case
when s.person_kind is null then when s.person_kind is null or s.person_kind='' then
'def' 'def'
else else
s.person_kind s.person_kind
end) = (case end) = (case
when r.role_person_kind is null then when r.role_person_kind is null or r.role_person_kind='' then
'def' 'def'
else else
r.role_person_kind r.role_person_kind
...@@ -539,12 +539,12 @@ ...@@ -539,12 +539,12 @@
and s.id = :personId and s.id = :personId
and p.full_id like concat(o.full_id, '%') and p.full_id like concat(o.full_id, '%')
and ((case and ((case
when s.person_kind is null then when s.person_kind is null or s.person_kind='' then
'def' 'def'
else else
s.person_kind s.person_kind
end) = (case end) = (case
when r.role_person_kind is null then when r.role_person_kind is null or r.role_person_kind='' then
'def' 'def'
else else
r.role_person_kind r.role_person_kind
...@@ -591,12 +591,12 @@ ...@@ -591,12 +591,12 @@
and s.id = :personId and s.id = :personId
and p.full_id like concat(o.full_id, '%') and p.full_id like concat(o.full_id, '%')
and ((case and ((case
when s.person_kind is null then when s.person_kind is null or s.person_kind='' then
'def' 'def'
else else
s.person_kind s.person_kind
end) = (case end) = (case
when r.role_person_kind is null then when r.role_person_kind is null or r.role_person_kind='' then
'def' 'def'
else else
r.role_person_kind r.role_person_kind
...@@ -629,12 +629,12 @@ ...@@ -629,12 +629,12 @@
and s.id = ? and s.id = ?
and p.full_id like concat(o.full_id, '%') and p.full_id like concat(o.full_id, '%')
and ((case and ((case
when s.person_kind is null then when s.person_kind is null or s.person_kind='' then
'def' 'def'
else else
s.person_kind s.person_kind
end) = (case end) = (case
when r.role_person_kind is null then when r.role_person_kind is null or r.role_person_kind='' then
'def' 'def'
else else
r.role_person_kind r.role_person_kind
...@@ -658,12 +658,12 @@ ...@@ -658,12 +658,12 @@
and s.id = ? and s.id = ?
and p.full_id like concat(o.full_id, '%') and p.full_id like concat(o.full_id, '%')
and ((case and ((case
when s.person_kind is null then when s.person_kind is null or s.person_kind='' then
'def' 'def'
else else
s.person_kind s.person_kind
end) = (case end) = (case
when r.role_person_kind is null then when r.role_person_kind is null or r.role_person_kind='' then
'def' 'def'
else else
r.role_person_kind r.role_person_kind
...@@ -690,12 +690,12 @@ ...@@ -690,12 +690,12 @@
and s.id = ? and s.id = ?
and p.full_id like concat(o.full_id, '%') and p.full_id like concat(o.full_id, '%')
and ((case and ((case
when s.person_kind is null then when s.person_kind is null or s.person_kind='' then
'def' 'def'
else else
s.person_kind s.person_kind
end) = (case end) = (case
when r.role_person_kind is null then when r.role_person_kind is null or r.role_person_kind='' then
'def' 'def'
else else
r.role_person_kind r.role_person_kind
...@@ -715,12 +715,12 @@ ...@@ -715,12 +715,12 @@
where p.person_id = s.id where p.person_id = s.id
and p.full_id like concat(o.full_id, '%') and p.full_id like concat(o.full_id, '%')
and ((case and ((case
when s.person_kind is null then when s.person_kind is null or s.person_kind='' then
'def' 'def'
else else
s.person_kind s.person_kind
end) = (case end) = (case
when r.role_person_kind is null then when r.role_person_kind is null or r.role_person_kind='' then
'def' 'def'
else else
r.role_person_kind r.role_person_kind
...@@ -1083,12 +1083,12 @@ ...@@ -1083,12 +1083,12 @@
where p.full_id like concat(o.full_id, '%') where p.full_id like concat(o.full_id, '%')
and p.person_id = s.id and p.person_id = s.id
and ((case and ((case
when s.person_kind is null then when s.person_kind is null or s.person_kind='' then
'def' 'def'
else else
s.person_kind s.person_kind
end) = (case end) = (case
when r.role_person_kind is null then when r.role_person_kind is null or r.role_person_kind='' then
'def' 'def'
else else
r.role_person_kind r.role_person_kind
...@@ -1121,12 +1121,12 @@ ...@@ -1121,12 +1121,12 @@
where p.full_id like concat(o.full_id, '%') where p.full_id like concat(o.full_id, '%')
and p.person_id = s.id and p.person_id = s.id
and ((case and ((case
when s.person_kind is null then when s.person_kind is null or s.person_kind='' then
'def' 'def'
else else
s.person_kind s.person_kind
end) = (case end) = (case
when r.role_person_kind is null then when r.role_person_kind is null or r.role_person_kind='' then
'def' 'def'
else else
r.role_person_kind r.role_person_kind
...@@ -1162,12 +1162,12 @@ ...@@ -1162,12 +1162,12 @@
where p.full_id like concat(o.full_id, '%') where p.full_id like concat(o.full_id, '%')
and p.person_id = s.id and p.person_id = s.id
and ((case and ((case
when s.person_kind is null then when s.person_kind is null or s.person_kind='' then
'def' 'def'
else else
s.person_kind s.person_kind
end) = (case end) = (case
when r.role_person_kind is null then when r.role_person_kind is null or r.role_person_kind='' then
'def' 'def'
else else
r.role_person_kind r.role_person_kind
...@@ -1190,12 +1190,12 @@ ...@@ -1190,12 +1190,12 @@
where p.full_id like concat(o.full_id, '%') where p.full_id like concat(o.full_id, '%')
and p.person_id = s.id and p.person_id = s.id
and ((case and ((case
when s.person_kind is null then when s.person_kind is null or s.person_kind='' then
'def' 'def'
else else
s.person_kind s.person_kind
end) = (case end) = (case
when r.role_person_kind is null then when r.role_person_kind is null or r.role_person_kind='' then
'def' 'def'
else else
r.role_person_kind r.role_person_kind
......
...@@ -323,12 +323,12 @@ ...@@ -323,12 +323,12 @@
and a.role_id = r.id and a.role_id = r.id
and r.id = rp.role_id and r.id = rp.role_id
and ((case and ((case
when s.person_kind is null then when s.person_kind is null or s.person_kind='' then
'def' 'def'
else else
s.person_kind s.person_kind
end) = (case end) = (case
when r.role_person_kind is null then when r.role_person_kind is null or r.role_person_kind='' then
'def' 'def'
else else
r.role_person_kind r.role_person_kind
...@@ -383,12 +383,12 @@ ...@@ -383,12 +383,12 @@
and s.id = ? and s.id = ?
and p.full_id like o.full_id + '%' and p.full_id like o.full_id + '%'
and ((case and ((case
when s.person_kind is null then when s.person_kind is null or s.person_kind='' then
'def' 'def'
else else
s.person_kind s.person_kind
end) = (case end) = (case
when r.role_person_kind is null then when r.role_person_kind is null or r.role_person_kind='' then
'def' 'def'
else else
r.role_person_kind r.role_person_kind
...@@ -410,12 +410,12 @@ ...@@ -410,12 +410,12 @@
where p.person_id = s.id where p.person_id = s.id
and s.id = ? and s.id = ?
and ((case and ((case
when s.person_kind is null then when s.person_kind is null or s.person_kind='' then
'def' 'def'
else else
s.person_kind s.person_kind
end) = (case end) = (case
when r.role_person_kind is null then when r.role_person_kind is null or r.role_person_kind='' then
'def' 'def'
else else
r.role_person_kind r.role_person_kind
...@@ -433,12 +433,12 @@ ...@@ -433,12 +433,12 @@
where p.person_id = s.id where p.person_id = s.id
and s.id = ? and s.id = ?
and ((case and ((case
when s.person_kind is null then when s.person_kind is null or s.person_kind='' then
'def' 'def'
else else
s.person_kind s.person_kind
end) = (case end) = (case
when r.role_person_kind is null then when r.role_person_kind is null or r.role_person_kind='' then
'def' 'def'
else else
r.role_person_kind r.role_person_kind
...@@ -483,12 +483,12 @@ ...@@ -483,12 +483,12 @@
and s.id = :personId and s.id = :personId
and p.full_id like o.full_id + '%' and p.full_id like o.full_id + '%'
and ((case and ((case
when s.person_kind is null then when s.person_kind is null or s.person_kind='' then
'def' 'def'
else else
s.person_kind s.person_kind
end) = (case end) = (case
when r.role_person_kind is null then when r.role_person_kind is null or r.role_person_kind='' then
'def' 'def'
else else
r.role_person_kind r.role_person_kind
...@@ -539,12 +539,12 @@ ...@@ -539,12 +539,12 @@
and s.id = :personId and s.id = :personId
and p.full_id like o.full_id + '%' and p.full_id like o.full_id + '%'
and ((case and ((case
when s.person_kind is null then when s.person_kind is null or s.person_kind='' then
'def' 'def'
else else
s.person_kind s.person_kind
end) = (case end) = (case
when r.role_person_kind is null then when r.role_person_kind is null or r.role_person_kind='' then
'def' 'def'
else else
r.role_person_kind r.role_person_kind
...@@ -591,12 +591,12 @@ ...@@ -591,12 +591,12 @@
and s.id = :personId and s.id = :personId
and p.full_id like o.full_id + '%' and p.full_id like o.full_id + '%'
and ((case and ((case
when s.person_kind is null then when s.person_kind is null or s.person_kind='' then
'def' 'def'
else else
s.person_kind s.person_kind
end) = (case end) = (case
when r.role_person_kind is null then when r.role_person_kind is null or r.role_person_kind='' then
'def' 'def'
else else
r.role_person_kind r.role_person_kind
...@@ -629,12 +629,12 @@ ...@@ -629,12 +629,12 @@
and s.id = ? and s.id = ?
and p.full_id like o.full_id + '%' and p.full_id like o.full_id + '%'
and ((case and ((case
when s.person_kind is null then when s.person_kind is null or s.person_kind='' then
'def' 'def'
else else
s.person_kind s.person_kind
end) = (case end) = (case
when r.role_person_kind is null then when r.role_person_kind is null or r.role_person_kind='' then
'def' 'def'
else else
r.role_person_kind r.role_person_kind
...@@ -658,12 +658,12 @@ ...@@ -658,12 +658,12 @@
and s.id = ? and s.id = ?
and p.full_id like o.full_id + '%' and p.full_id like o.full_id + '%'
and ((case and ((case
when s.person_kind is null then when s.person_kind is null or s.person_kind='' then
'def' 'def'
else else
s.person_kind s.person_kind
end) = (case end) = (case
when r.role_person_kind is null then when r.role_person_kind is null or r.role_person_kind='' then
'def' 'def'
else else
r.role_person_kind r.role_person_kind
...@@ -690,12 +690,12 @@ ...@@ -690,12 +690,12 @@
and s.id = ? and s.id = ?
and p.full_id like o.full_id + '%' and p.full_id like o.full_id + '%'
and ((case and ((case
when s.person_kind is null then when s.person_kind is null or s.person_kind='' then
'def' 'def'
else else
s.person_kind s.person_kind
end) = (case end) = (case
when r.role_person_kind is null then when r.role_person_kind is null or r.role_person_kind='' then
'def' 'def'
else else
r.role_person_kind r.role_person_kind
...@@ -715,12 +715,12 @@ ...@@ -715,12 +715,12 @@
where p.person_id = s.id where p.person_id = s.id
and p.full_id like o.full_id + '%' and p.full_id like o.full_id + '%'
and ((case and ((case
when s.person_kind is null then when s.person_kind is null or s.person_kind='' then
'def' 'def'
else else
s.person_kind s.person_kind
end) = (case end) = (case
when r.role_person_kind is null then when r.role_person_kind is null or r.role_person_kind='' then
'def' 'def'
else else
r.role_person_kind r.role_person_kind
...@@ -1083,12 +1083,12 @@ ...@@ -1083,12 +1083,12 @@
where p.full_id like o.full_id + '%' where p.full_id like o.full_id + '%'
and p.person_id = s.id and p.person_id = s.id
and ((case and ((case
when s.person_kind is null then when s.person_kind is null or s.person_kind='' then
'def' 'def'
else else
s.person_kind s.person_kind
end) = (case end) = (case
when r.role_person_kind is null then when r.role_person_kind is null or r.role_person_kind='' then
'def' 'def'
else else
r.role_person_kind r.role_person_kind
...@@ -1121,12 +1121,12 @@ ...@@ -1121,12 +1121,12 @@
where p.full_id like o.full_id + '%' where p.full_id like o.full_id + '%'
and p.person_id = s.id and p.person_id = s.id
and ((case and ((case
when s.person_kind is null then when s.person_kind is null or s.person_kind='' then
'def' 'def'
else else
s.person_kind s.person_kind
end) = (case end) = (case
when r.role_person_kind is null then when r.role_person_kind is null or r.role_person_kind='' then
'def' 'def'
else else
r.role_person_kind r.role_person_kind
...@@ -1162,12 +1162,12 @@ ...@@ -1162,12 +1162,12 @@
where p.full_id like o.full_id + '%' where p.full_id like o.full_id + '%'
and p.person_id = s.id and p.person_id = s.id
and ((case and ((case
when s.person_kind is null then when s.person_kind is null or s.person_kind='' then
'def' 'def'
else else
s.person_kind s.person_kind
end) = (case end) = (case
when r.role_person_kind is null then when r.role_person_kind is null or r.role_person_kind='' then
'def' 'def'
else else
r.role_person_kind r.role_person_kind
...@@ -1190,12 +1190,12 @@ ...@@ -1190,12 +1190,12 @@
where p.full_id like o.full_id + '%' where p.full_id like o.full_id + '%'
and p.person_id = s.id and p.person_id = s.id
and ((case and ((case
when s.person_kind is null then when s.person_kind is null or s.person_kind='' then
'def' 'def'
else else
s.person_kind s.person_kind
end) = (case end) = (case
when r.role_person_kind is null then when r.role_person_kind is null or r.role_person_kind='' then
'def' 'def'
else else
r.role_person_kind r.role_person_kind
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment