zhangjinli 3 years ago
parent 5736045131
commit dbfcfc31f8

@ -39,7 +39,10 @@ public interface TaskMapper extends BaseMapper<Task> {
"</if>" +
"<if test='openid!=null'>"+
"and t1.id in (SELECT taskId from taskDepartment inner JOIN user on user.openid =#{openid} and user.main_department = taskDepartment.departmentId) "+
"and IF((SELECT count(*)!=0 FROM taskDepartment WHERE taskId = t1.id)>0," +
"t1.id in (SELECT taskId from taskDepartment inner JOIN user on user.openid =#{openid} " +
"and user.main_department = taskDepartment.departmentId), " +
" 1=1)"+
"</if>"+
"<if test='ew != null'>" +

@ -55,7 +55,11 @@
)
</if>
<if test='openid!=null'>
and t1.id in (SELECT taskId from taskDepartment inner JOIN user on user.openid =#{openid} and user.main_department = taskDepartment.departmentId)
and
IF((SELECT count(*)!=0 FROM taskDepartment WHERE taskId = t1.id)>0,
t1.id in (SELECT taskId from taskDepartment inner JOIN user on user.openid =#{openid}
and user.main_department = taskDepartment.departmentId),
1=1)
</if>
<if test='ew != null'>
<if test='ew.nonEmptyOfWhere'>

Loading…
Cancel
Save