From ec23ec3d3dc4ec1ba7d79ba4f46ae2c31d5a16a9 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期三, 07 一月 2026 10:49:10 +0800
Subject: [PATCH] 【市一】调整mapper获取ordid
---
smartor/src/main/resources/mapper/smartor/SchemeTaskMapper.xml | 5
smartor/src/main/resources/mapper/smartor/HeCategoryMapper.xml | 7
smartor/src/main/resources/mapper/smartor/PatHetaskRelevanceMapper.xml | 7
smartor/src/main/resources/mapper/smartor/PatMedWeightMapper.xml | 5
smartor/src/main/resources/mapper/smartor/HeLibraryAssortMapper.xml | 7
smartor/src/main/resources/mapper/smartor/IvrLibaExtemplateMapper.xml | 7
smartor/src/main/resources/mapper/smartor/IvrSceneIntentMapper.xml | 7
smartor/src/main/resources/mapper/smartor/SvyTaskScriptMapper.xml | 5
smartor/src/main/resources/mapper/smartor/IvrLibaTemplateScriptMapper.xml | 11
smartor/src/main/resources/mapper/smartor/PatMedBloodsugarMapper.xml | 5
smartor/src/main/resources/mapper/smartor/ServiceSubtaskPreachformMapper.xml | 12
smartor/src/main/resources/mapper/smartor/SvyTaskScriptoptionMapper.xml | 5
smartor/src/main/resources/mapper/smartor/IvrLibaTargetoptionMapper.xml | 9
smartor/src/main/resources/mapper/smartor/ServiceSubtaskDetailMapper.xml | 7
smartor/src/main/resources/mapper/smartor/IvrLibaTemplateAssortMapper.xml | 7
smartor/src/main/resources/mapper/smartor/HeLocallibraryMapper.xml | 7
smartor/src/main/resources/mapper/smartor/PatWildcardMapper.xml | 5
smartor/src/main/resources/mapper/smartor/IvrLibaTemplateTagMapper.xml | 7
smartor/src/main/resources/mapper/smartor/SchemeLocallibraryMapper.xml | 5
smartor/src/main/resources/mapper/smartor/SvyLibResultMapper.xml | 5
smartor/src/main/resources/mapper/smartor/IvrLibaExtemplateCategoryMapper.xml | 7
smartor/src/main/resources/mapper/smartor/IvrSceneGlobalconfigMapper.xml | 5
ruoyi-system/src/main/resources/mapper/system/SysLogininforMapper.xml | 5
smartor/src/main/resources/mapper/smartor/ServiceTaskoperMapper.xml | 7
smartor/src/main/resources/mapper/smartor/SvyTaskTemplateMapper.xml | 7
smartor/src/main/resources/mapper/smartor/IvrLibIntentMapper.xml | 5
smartor/src/main/resources/mapper/smartor/PatArchivetagMapper.xml | 12
smartor/src/main/resources/mapper/smartor/IvrSceneRecallMapper.xml | 5
smartor/src/main/resources/mapper/smartor/PatMedOuthospProvisionalMapper.xml | 7
smartor/src/main/resources/mapper/smartor/TemplateDeptMapper.xml | 6
smartor/src/main/resources/mapper/smartor/HospitalRecordMapper.xml | 9
smartor/src/main/resources/mapper/smartor/IvrTasksmsMapper.xml | 5
smartor/src/main/resources/mapper/smartor/ServiceSubtaskAnswerMapper.xml | 5
smartor/src/main/resources/mapper/smartor/PatMedInspectionItemMapper.xml | 5
ruoyi-system/src/main/resources/mapper/system/SysConfigMapper.xml | 10
smartor/src/main/resources/mapper/smartor/IvrLibaScriptTargetMapper.xml | 7
smartor/src/main/resources/mapper/smartor/SchemeTriggerruleMapper.xml | 7
smartor/src/main/resources/mapper/smartor/PatArchiveImportMapper.xml | 7
smartor/src/main/resources/mapper/smartor/BaseOrganizationMapper.xml | 7
smartor/src/main/resources/mapper/smartor/IvrLibaExtemplatescriptMapper.xml | 12
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml | 7
smartor/src/main/resources/mapper/smartor/SvyLibScriptOptionMapper.xml | 7
smartor/src/main/resources/mapper/smartor/SchemeTaskrepeatconfigMapper.xml | 5
ruoyi-system/src/main/resources/mapper/system/SmsParamMapper.xml | 5
smartor/src/main/resources/mapper/smartor/ServiceTaskdeptMapper.xml | 17
smartor/src/main/resources/mapper/smartor/IvrLibaTargetAssortMapper.xml | 5
ruoyi-system/src/main/resources/mapper/system/SmsTempletMapper.xml | 5
smartor/src/main/resources/mapper/smartor/IvrTaskTemplateScriptMapper.xml | 9
smartor/src/main/resources/mapper/smartor/ServiceCheckMapper.xml | 7
smartor/src/main/resources/mapper/smartor/MedicalHistoryMapper.xml | 5
smartor/src/main/resources/mapper/smartor/SvyLibExceptionMapper.xml | 5
ruoyi-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml | 5
smartor/src/main/resources/mapper/smartor/IvrSceneFlownodeMapper.xml | 5
smartor/src/main/resources/mapper/smartor/IvrScenecategoryMapper.xml | 5
smartor/src/main/resources/mapper/smartor/SvyTopicoptionMapper.xml | 5
smartor/src/main/resources/mapper/smartor/BaseTagMapper.xml | 10
smartor/src/main/resources/mapper/smartor/ServiceThirdDataMapper.xml | 5
smartor/src/main/resources/mapper/smartor/SvyLibTemplateTagMapper.xml | 7
smartor/src/main/resources/mapper/smartor/PatArchivecontactMapper.xml | 9
smartor/src/main/resources/mapper/smartor/HospitalUserinfoMapper.xml | 5
smartor/src/main/resources/mapper/smartor/IvrSceneMapper.xml | 5
ruoyi-system/src/main/resources/mapper/system/SysNoticeMapper.xml | 5
smartor/src/main/resources/mapper/smartor/IvrLibaScriptTagMapper.xml | 5
smartor/src/main/resources/mapper/smartor/IvrLibScriptmodelMapper.xml | 5
ruoyi-system/src/main/resources/mapper/system/EquipmentinfoMapper.xml | 5
smartor/src/main/resources/mapper/smartor/SvyLibTemplateTargetoptionWjxMapper.xml | 7
smartor/src/main/resources/mapper/smartor/ServiceOutPathMapper.xml | 7
smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml | 39
smartor/src/main/resources/mapper/smartor/SchemeTaskrecordCalldetailMapper.xml | 5
smartor/src/main/resources/mapper/smartor/IvrTaskcallrecordMapper.xml | 5
smartor/src/main/resources/mapper/smartor/IvrSceneExecuteconfigMapper.xml | 5
smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml | 236 ++++----
smartor/src/main/resources/mapper/smartor/PatMedInspectionMapper.xml | 5
smartor/src/main/resources/mapper/smartor/IvrLibaTargetMapper.xml | 14
ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml | 5
ruoyi-system/src/main/resources/mapper/system/SysDictDataMapper.xml | 5
smartor/src/main/resources/mapper/smartor/IvrLibaTemplateMapper.xml | 9
smartor/src/main/resources/mapper/smartor/SvyTaskAnswerMapper.xml | 5
smartor/src/main/resources/mapper/smartor/SvyTaskMapper.xml | 11
smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml | 120 ++--
smartor/src/main/resources/mapper/smartor/IvrLibIntentcategoryMapper.xml | 5
smartor/src/main/resources/mapper/smartor/BaseTagcategoryMapper.xml | 14
smartor/src/main/resources/mapper/smartor/SvyLibTemplateScriptMapper.xml | 7
smartor/src/main/resources/mapper/smartor/SvyLibTemplateScriptWjxMapper.xml | 5
smartor/src/main/resources/mapper/smartor/IvrLibScriptMapper.xml | 5
smartor/src/main/resources/mapper/smartor/ServiceSubtaskRecordMapper.xml | 5
smartor/src/main/resources/mapper/smartor/IvrTaskTemplateMapper.xml | 9
smartor/src/main/resources/mapper/smartor/PatSpeciallistMapper.xml | 5
smartor/src/main/resources/mapper/smartor/SchemeTriggersceneMapper.xml | 5
smartor/src/main/resources/mapper/smartor/ServicePatientTempMapper.xml | 5
smartor/src/main/resources/mapper/smartor/PatSatisfactionMapper.xml | 7
smartor/src/main/resources/mapper/smartor/MinioFileMapper.xml | 7
smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml | 36
smartor/src/main/resources/mapper/smartor/IvrLibScriptcategoryMapper.xml | 5
smartor/src/main/resources/mapper/smartor/SysUserImportMapper.xml | 5
smartor/src/main/resources/mapper/smartor/IvrSceneScriptMapper.xml | 5
smartor/src/main/resources/mapper/smartor/SvyCategoryMapper.xml | 14
smartor/src/main/resources/mapper/smartor/Icd10Mapper.xml | 7
smartor/src/main/resources/mapper/smartor/HeLibraryTagMapper.xml | 7
smartor/src/main/resources/mapper/smartor/SvyLibTemplageCategoryMapper.xml | 7
smartor/src/main/resources/mapper/smartor/IvrLibaTargetTagMapper.xml | 7
ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml | 37
ruoyi-system/src/main/resources/mapper/system/BaseUserInfoMapper.xml | 7
smartor/src/main/resources/mapper/smartor/Icd10AssociationMapper.xml | 9
smartor/src/main/resources/mapper/smartor/IvrLibaTemplateTargetoptionMapper.xml | 9
smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml | 81 +-
smartor/src/main/resources/mapper/smartor/SvyFinishtopicMapper.xml | 5
smartor/src/main/resources/mapper/smartor/SvyLibTemplateWjxMapper.xml | 5
smartor/src/main/resources/mapper/smartor/PatMedHypertensionMapper.xml | 5
ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml | 5
smartor/src/main/resources/mapper/smartor/IvrLibaScriptTargetoptionMapper.xml | 9
smartor/src/main/resources/mapper/smartor/PatMedRegistrationMapper.xml | 7
smartor/src/main/resources/mapper/smartor/SvyLibScriptTagMapper.xml | 7
smartor/src/main/resources/mapper/smartor/HNGatherPatArchiveMapper.xml | 49 +
smartor/src/main/resources/mapper/smartor/IvrSceneScriptmodelMapper.xml | 5
smartor/src/main/resources/mapper/smartor/SchemePlanMapper.xml | 5
smartor/src/main/resources/mapper/smartor/IvrLibaScriptAssortMapper.xml | 5
smartor/src/main/resources/mapper/smartor/PatFilterlistMapper.xml | 5
smartor/src/main/resources/mapper/smartor/BaseDictOperationMapper.xml | 3
smartor/src/main/resources/mapper/smartor/IvrSceneFlownodebranchMapper.xml | 5
smartor/src/main/resources/mapper/smartor/SvyLibScriptMapper.xml | 7
smartor/src/main/resources/mapper/smartor/SchemeAutofinshruleMapper.xml | 5
smartor/src/main/resources/mapper/smartor/IvrTaskTemplateTargetoptionMapper.xml | 7
smartor/src/main/resources/mapper/smartor/SvyLibTopicdirectionMapper.xml | 5
ruoyi-system/src/main/resources/mapper/system/SmsRecordsMapper.xml | 9
smartor/src/main/resources/mapper/smartor/IvrTaskVisitResultMapper.xml | 7
smartor/src/main/resources/mapper/smartor/PatArchiveOutMapper.xml | 19
smartor/src/main/resources/mapper/smartor/SvyTopicMapper.xml | 5
ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml | 5
smartor/src/main/resources/mapper/smartor/SchemeCategoryMapper.xml | 5
smartor/src/main/resources/mapper/smartor/SchemeTaskconfigMapper.xml | 5
smartor/src/main/resources/mapper/smartor/SvyTaskTemplateTargetoptionMapper.xml | 9
smartor/src/main/resources/mapper/smartor/PatSpeciallistCategoryMapper.xml | 5
smartor/src/main/resources/mapper/smartor/SvyFinishoptionMapper.xml | 5
smartor/src/main/resources/mapper/smartor/BaseSmsaccountMapper.xml | 5
smartor/src/main/resources/mapper/smartor/PatMedPhysicalMapper.xml | 5
smartor/src/main/resources/mapper/smartor/PatMedOperationMapper.xml | 11
smartor/src/main/resources/mapper/smartor/SvyLibTemplateMapper.xml | 7
smartor/src/main/resources/mapper/smartor/IvrLibaScriptMapper.xml | 9
ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml | 5
ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml | 5
smartor/src/main/resources/mapper/smartor/SchemeTaskrecordMapper.xml | 5
smartor/src/main/resources/mapper/smartor/SvyTaskSingleMapper.xml | 7
smartor/src/main/resources/mapper/smartor/SvyFinishMapper.xml | 5
ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml | 7
smartor/src/main/resources/mapper/smartor/PatMedDrugMapper.xml | 5
smartor/src/main/resources/mapper/smartor/SvyLibTemplateTargetoptionMapper.xml | 9
smartor/src/main/resources/mapper/smartor/PatMedOperationItemMapper.xml | 5
smartor/src/main/resources/mapper/smartor/SysUserDeptMapper.xml | 7
smartor/src/main/resources/mapper/smartor/IvrSceneFlowMapper.xml | 5
smartor/src/main/resources/mapper/smartor/ServiceTaskdiagMapper.xml | 7
smartor/src/main/resources/mapper/smartor/SvyTaskTemplateScriptMapper.xml | 7
smartor/src/main/resources/mapper/smartor/SvyLibTopicCategoryMapper.xml | 7
smartor/src/main/resources/mapper/smartor/HeLibraryMapper.xml | 7
smartor/src/main/resources/mapper/smartor/SysUserRole2Mapper.xml | 5
155 files changed, 893 insertions(+), 686 deletions(-)
diff --git a/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml b/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml
index 65cfcd6..d5aabcf 100644
--- a/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml
+++ b/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml
@@ -59,7 +59,8 @@
<select id="selectGenTableList" parameterType="GenTable" resultMap="GenTableResult">
<include refid="selectGenTableVo"/>
- <where>
+ WHERE 1=1
+
<if test="tableName != null and tableName != ''">
AND lower(table_name) like lower(concat('%', #{tableName}, '%'))
</if>
@@ -72,7 +73,7 @@
<if test="params.endTime != null and params.endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� -->
AND date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
</if>
- </where>
+
</select>
<select id="selectDbTableList" parameterType="GenTable" resultMap="GenTableResult">
diff --git a/ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml b/ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml
index bb424fa..0dd6b83 100644
--- a/ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml
+++ b/ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml
@@ -366,24 +366,27 @@
<select id="yhyjsxx" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserRoleResult">
select user_id, role_id, orgid
FROM healthy_user_role
- <where>
+ WHERE 1=1
+
<if test="hisUserId != null ">and user_id = #{hisUserId}</if>
- </where>
+
</select>
<select id="yhyksxx" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserDeptResult">
select user_id , user_code , dept_type ,dept_code,dept_name,deptparent,del_flag,orgid
FROM healthy_user_dept
- <where>
- user_id != 'admin'
+ WHERE 1=1
+
+ AND user_id != 'admin'
<if test="hisUserId != null ">and user_id = #{hisUserId}</if>
- </where>
+
</select>
<select id="selectPatArchiveList" parameterType="com.smartor.domain.PatArchive" resultMap="PatArchiveResult">
<include refid="selectPatArchiveVo"/>
- <where>
+ WHERE 1=1
+
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
<if test="idcardno != null and idcardno != ''">and idcardno = #{idcardno}</if>
<if test="sourcefrom != null ">and sourcefrom = #{sourcefrom}</if>
@@ -422,7 +425,7 @@
<if test="pageSize != null and pageSize!='' ">and rownum<#{pageSize}</if>
- </where>
+
</select>
@@ -495,7 +498,8 @@
FROM
healthy_inhosp b
- <where>
+ WHERE 1=1
+
<if test="startOutHospTime != null ">
and to_char(b.endtime, 'YYYY-MM-DD HH24:MI:SS') >=to_char(#{startOutHospTime},'YYYY-MM-DD HH24:MI:SS')
@@ -525,7 +529,7 @@
<if test="lastEndTime != null and lastEndTime != ''">
and to_char(last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') <= #{lastEndTime}
</if>
- </where>
+
</select>
@@ -552,7 +556,8 @@
patname,
mainsuit
from healthy_outhosp
- <where>
+ WHERE 1=1
+
<if test="beginTime != null ">
and to_char(admitdate, 'YYYY-MM-DD HH24:MI:SS') >= to_char(#{beginTime}, 'YYYY-MM-DD HH24:MI:SS')
@@ -566,7 +571,7 @@
<if test="lastEndTime != null and lastEndTime != ''">
and to_char(last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') <= #{lastEndTime}
</if>
- </where>
+
</select>
@@ -579,7 +584,8 @@
icdname,
icdpym
from healthy_disease
- <where>
+ WHERE 1=1
+
<if test="icdcode != null and icdcode != ''">and icdcode = #{icdcode}</if>
<if test="lastflag != null and lastflag != ''">and lastflag = #{lastflag}</if>
<if test="chimedflag != null and chimedflag != ''">and chimedflag = #{chimedflag}</if>
@@ -590,7 +596,7 @@
<if test="pid != null ">and pid = #{pid}</if>
<if test="guid != null and guid != ''">and guid = #{guid}</if>
<if test="hisIcdid != null and hisIcdid != ''">and his_icdid = #{hisIcdid}</if>
- </where>
+
</select>
@@ -600,7 +606,8 @@
u.nick_name, u.user_name, u.email,u.id_card, u.avatar,
u.birthday,u.orgid,u.job_phone,u.phonenumber, u.sex, u.status
from healthy_user u
- <where>
+ WHERE 1=1
+
<if test="userId != null and userId != 0">
AND u.user_id = #{userId}
</if>
@@ -631,7 +638,7 @@
<if test="phonenumber != null and phonenumber != ''">
AND u.phonenumber like concat('%', #{phonenumber}, '%')
</if>
- </where>
+
</select>
<select id="selectDeptList" parameterType="com.ruoyi.common.core.domain.entity.SysDept" resultMap="SysDeptResult">
diff --git a/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml b/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml
index 6353674..112dee1 100644
--- a/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml
+++ b/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml
@@ -22,7 +22,8 @@
<select id="selectJobLogList" parameterType="com.ruoyi.quartz.domain.SysJobLog" resultMap="SysJobLogResult">
<include refid="selectJobLogVo"/>
- <where>
+ WHERE 1=1
+
<if test="jobName != null and jobName != ''">
AND job_name like concat('%', #{jobName}, '%')
</if>
@@ -41,7 +42,7 @@
<if test="params.endTime != null and params.endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� -->
and date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
</if>
- </where>
+
</select>
<select id="selectJobLogAll" resultMap="SysJobLogResult">
diff --git a/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml b/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml
index 5605c44..5ebb1d0 100644
--- a/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml
+++ b/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml
@@ -27,7 +27,8 @@
<select id="selectJobList" parameterType="SysJob" resultMap="SysJobResult">
<include refid="selectJobVo"/>
- <where>
+ WHERE 1=1
+
<if test="jobName != null and jobName != ''">
AND job_name like concat('%', #{jobName}, '%')
</if>
@@ -40,7 +41,7 @@
<if test="invokeTarget != null and invokeTarget != ''">
AND invoke_target like concat('%', #{invokeTarget}, '%')
</if>
- </where>
+
</select>
<select id="selectJobAll" resultMap="SysJobResult">
diff --git a/ruoyi-system/src/main/resources/mapper/system/BaseUserInfoMapper.xml b/ruoyi-system/src/main/resources/mapper/system/BaseUserInfoMapper.xml
index a642513..76209e2 100644
--- a/ruoyi-system/src/main/resources/mapper/system/BaseUserInfoMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/BaseUserInfoMapper.xml
@@ -76,7 +76,8 @@
<select id="selectBaseUserInfoList" parameterType="com.ruoyi.system.domain.BaseUserInfo"
resultMap="BaseUserInfoResult">
<include refid="selectBaseUserInfoVo"/>
- <where>
+ WHERE 1=1
+
<if test="usercode != null and usercode != ''">and usercode = #{usercode}</if>
<if test="account != null and account != ''">and account = #{account}</if>
<if test="guid != null and guid != ''">and guid = #{guid}</if>
@@ -93,7 +94,7 @@
<if test="wardname != null and wardname != ''">and wardname like concat('%', #{wardname}, '%')</if>
<if test="usertype != null ">and usertype = #{usertype}</if>
<if test="usertypename != null and usertypename != ''">and usertypename like concat('%', #{usertypename},
- '%')
+ AND '%')
</if>
<if test="dwpermission != null ">and dwpermission = #{dwpermission}</if>
<if test="isopenlowerorg != null ">and isopenlowerorg = #{isopenlowerorg}</if>
@@ -104,7 +105,7 @@
<if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
<if test="deptpermission != null and deptpermission != ''">and deptpermission = #{deptpermission}</if>
<if test="wardpermission != null and wardpermission != ''">and wardpermission = #{wardpermission}</if>
- </where>
+
</select>
<select id="selectBaseUserInfoByUserid" parameterType="Long" resultMap="BaseUserInfoResult">
diff --git a/ruoyi-system/src/main/resources/mapper/system/EquipmentinfoMapper.xml b/ruoyi-system/src/main/resources/mapper/system/EquipmentinfoMapper.xml
index 1efe6f1..2a66ac6 100644
--- a/ruoyi-system/src/main/resources/mapper/system/EquipmentinfoMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/EquipmentinfoMapper.xml
@@ -27,7 +27,8 @@
<select id="selectEquipmentinfoList" parameterType="Equipmentinfo" resultMap="EquipmentinfoResult">
<include refid="selectEquipmentinfoVo"/>
- <where>
+ WHERE 1=1
+
<if test="devtype != null "> and devtype = #{devtype}</if>
<if test="equipmentname != null and equipmentname != ''"> and equipmentname like concat('%', #{equipmentname}, '%')</if>
<if test="modnum != null and modnum != ''"> and modnum = #{modnum}</if>
@@ -40,7 +41,7 @@
<if test="storePlace != null and storePlace != ''"> and storePlace = #{storePlace}</if>
<if test="technData != null and technData != ''"> and technData = #{technData}</if>
<if test="statusid != null "> and statusid = #{statusid}</if>
- </where>
+
</select>
<select id="selectEquipmentinfoById" parameterType="Long" resultMap="EquipmentinfoResult">
diff --git a/ruoyi-system/src/main/resources/mapper/system/SmsParamMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SmsParamMapper.xml
index 76df18d..5d4fd03 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SmsParamMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SmsParamMapper.xml
@@ -27,7 +27,8 @@
<select id="selectSmsParamList" parameterType="SmsParam" resultMap="SmsParamResult">
<include refid="selectSmsParamVo"/>
- <where>
+ WHERE 1=1
+
<if test="paramname != null and paramname != ''"> and paramname like concat('%', #{paramname}, '%')</if>
<if test="paramval != null and paramval != ''"> and paramval = #{paramval}</if>
<if test="descirbe != null and descirbe != ''"> and descirbe = #{descirbe}</if>
@@ -35,7 +36,7 @@
<if test="isupload != null "> and isupload = #{isupload}</if>
<if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
<if test="orgid != null "> and orgid = #{orgid}</if>
- </where>
+
</select>
<select id="selectSmsParamByParamid" parameterType="Long" resultMap="SmsParamResult">
diff --git a/ruoyi-system/src/main/resources/mapper/system/SmsRecordsMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SmsRecordsMapper.xml
index 5d54eff..a23e8c4 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SmsRecordsMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SmsRecordsMapper.xml
@@ -69,8 +69,9 @@
<select id="selectSmsRecordsList" parameterType="com.ruoyi.system.domain.SmsRecords" resultMap="SmsRecordsResult">
<include refid="selectSmsRecordsVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="userid != null and userid != ''">and userid = #{userid}</if>
<if test="username != null and username != ''">and username like concat('%', #{username}, '%')</if>
<if test="phone != null and phone != ''">and phone = #{phone}</if>
@@ -92,9 +93,9 @@
<if test="isupload != null ">and isupload = #{isupload}</if>
<if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
<if test="visitTime != null ">and date_format(visit_time,'%y%m%d') =
- date_format(#{visitTime},'%y%m%d')
+ AND date_format(#{visitTime},'%y%m%d')
</if>
- </where>
+
</select>
<select id="selectSmsRecordsByRecordid" parameterType="Long" resultMap="SmsRecordsResult">
diff --git a/ruoyi-system/src/main/resources/mapper/system/SmsTempletMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SmsTempletMapper.xml
index 7d3e789..57bb6ae 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SmsTempletMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SmsTempletMapper.xml
@@ -26,13 +26,14 @@
<select id="selectSmsTempletList" parameterType="SmsTemplet" resultMap="SmsTempletResult">
<include refid="selectSmsTempletVo"/>
- <where>
+ WHERE 1=1
+
<if test="templetno != null and templetno != ''"> and templetno = #{templetno}</if>
<if test="templetname != null and templetname != ''"> and templetname like concat('%', #{templetname}, '%')</if>
<if test="templetcontent != null and templetcontent != ''"> and templetcontent = #{templetcontent}</if>
<if test="isupload != null "> and isupload = #{isupload}</if>
<if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
- </where>
+
</select>
<select id="selectSmsTempletByTempletid" parameterType="Long" resultMap="SmsTempletResult">
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysConfigMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysConfigMapper.xml
index 2c1a4f2..db41c31 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysConfigMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysConfigMapper.xml
@@ -36,7 +36,8 @@
<!-- 鏌ヨ鏉′欢 -->
<sql id="sqlwhereSearch">
- <where>
+ WHERE 1=1
+
<if test="configId !=null">
and config_id = #{configId}
</if>
@@ -46,7 +47,7 @@
<if test="orgid !=null and orgid != ''">
and orgid = #{orgid}
</if>
- </where>
+
</sql>
<select id="selectConfig" parameterType="SysConfig" resultMap="SysConfigResult">
@@ -56,7 +57,8 @@
<select id="selectConfigList" parameterType="SysConfig" resultMap="SysConfigResult">
<include refid="selectConfigVo"/>
- <where>
+ WHERE 1=1
+
<if test="configName != null and configName != ''">
AND config_name like concat('%', #{configName}, '%')
</if>
@@ -75,7 +77,7 @@
<if test="params.endTime != null and params.endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� -->
and date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
</if>
- </where>
+
</select>
<select id="selectConfigById" parameterType="Long" resultMap="SysConfigResult">
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysDictDataMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysDictDataMapper.xml
index 8c4c61f..b6af70b 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysDictDataMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysDictDataMapper.xml
@@ -42,7 +42,8 @@
<select id="selectDictDataList" parameterType="SysDictData" resultMap="SysDictDataResult">
<include refid="selectDictDataVo"/>
- <where>
+ WHERE 1=1
+
<if test="dictType != null and dictType != ''">
AND dict_type = #{dictType}
</if>
@@ -57,7 +58,7 @@
</if> <if test="orgid != null and orgid != ''">
AND orgid = #{orgid}
</if>
- </where>
+
order by dict_sort asc
</select>
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml
index 8e3e86f..509dc05 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml
@@ -24,7 +24,8 @@
<select id="selectDictTypeList" parameterType="SysDictType" resultMap="SysDictTypeResult">
<include refid="selectDictTypeVo"/>
- <where>
+ WHERE 1=1
+
<if test="dictName != null and dictName != ''">
AND dict_name like concat('%', #{dictName}, '%')
</if>
@@ -40,7 +41,7 @@
<if test="params.endTime != null and params.endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� -->
and date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
</if>
- </where>
+
</select>
<select id="selectDictTypeAll" resultMap="SysDictTypeResult">
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysLogininforMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysLogininforMapper.xml
index a0f071f..c514824 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysLogininforMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysLogininforMapper.xml
@@ -25,7 +25,8 @@
<select id="selectLogininforList" parameterType="SysLogininfor" resultMap="SysLogininforResult">
select info_id, user_name, ipaddr, login_location, browser, os, status, msg, login_time from sys_logininfor
- <where>
+ WHERE 1=1
+
<if test="ipaddr != null and ipaddr != ''">
AND ipaddr like concat('%', #{ipaddr}, '%')
</if>
@@ -41,7 +42,7 @@
<if test="params.endTime != null and params.endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� -->
and date_format(login_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
</if>
- </where>
+
order by info_id desc
</select>
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml
index 71653f4..9702821 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml
@@ -52,7 +52,8 @@
<select id="selectMenuList" parameterType="SysMenu" resultMap="SysMenuResult">
<include refid="selectMenuVo"/>
- <where>
+ WHERE 1=1
+
<if test="menuName != null and menuName != ''">
AND menu_name like concat('%', #{menuName}, '%')
</if>
@@ -62,7 +63,7 @@
<if test="status != null and status != ''">
AND status = #{status}
</if>
- </where>
+
order by parent_id, order_num
</select>
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysNoticeMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysNoticeMapper.xml
index cd51b5a..c17fd18 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysNoticeMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysNoticeMapper.xml
@@ -42,7 +42,8 @@
<select id="selectNoticeList" parameterType="SysNotice" resultMap="SysNoticeResult">
<include refid="selectNoticeVo"/>
- <where>
+ WHERE 1=1
+
<if test="noticeTitle != null and noticeTitle != ''">
AND notice_title like concat('%', #{noticeTitle}, '%')
</if>
@@ -55,7 +56,7 @@
<if test="orgid != null and orgid != ''">
AND orgid = #{orgid}
</if>
- </where>
+
</select>
<insert id="insertNotice" parameterType="SysNotice">
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml
index 51c3d11..4bd1410 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml
@@ -37,7 +37,8 @@
<select id="selectOperLogList" parameterType="SysOperLog" resultMap="SysOperLogResult">
<include refid="selectOperLogVo"/>
- <where>
+ WHERE 1=1
+
<if test="title != null and title != ''">
AND title like concat('%', #{title}, '%')
</if>
@@ -47,7 +48,7 @@
<if test="businessTypes != null and businessTypes.length > 0">
AND business_type in
<foreach collection="businessTypes" item="businessType" open="(" separator="," close=")">
- #{businessType}
+ #{businessType}
</foreach>
</if>
<if test="status != null">
@@ -62,7 +63,7 @@
<if test="params.endTime != null and params.endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� -->
and date_format(oper_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
</if>
- </where>
+
order by oper_id desc
</select>
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml
index e2df278..b7a9ac2 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml
@@ -35,7 +35,8 @@
<select id="selectPostList" parameterType="com.ruoyi.system.domain.SysPost" resultMap="SysPostResult">
<include refid="selectPostVo"/>
- <where>
+ WHERE 1=1
+
<if test="postCode != null and postCode != ''">
AND post_code like concat('%', #{postCode}, '%')
</if>
@@ -48,7 +49,7 @@
<if test="postName != null and postName != ''">
AND post_name like concat('%', #{postName}, '%')
</if>
- </where>
+
</select>
<select id="selectPostAll" resultMap="SysPostResult">
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
index 3c24a94..105ca50 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
@@ -321,8 +321,9 @@
<select id="selectUserByUserNameByCondition" parameterType="String" resultMap="SysUserResult">
<include refid="selectUserVo"/>
- <where>
- u.del_flag = '0'
+ WHERE 1=1
+
+ AND u.del_flag = '0'
<if test="userName != null and userName != ''">
AND u.user_name = #{userName}
</if>
@@ -332,7 +333,7 @@
<if test="deptId != null and deptId != ''">
AND u.dept_id = #{deptId}
</if>
- </where>
+
</select>
<select id="selectUserById" parameterType="Long" resultMap="SysUserResult">
diff --git a/smartor/src/main/resources/mapper/smartor/BaseDictOperationMapper.xml b/smartor/src/main/resources/mapper/smartor/BaseDictOperationMapper.xml
index 9de5a95..23123ec 100644
--- a/smartor/src/main/resources/mapper/smartor/BaseDictOperationMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/BaseDictOperationMapper.xml
@@ -54,7 +54,7 @@
<select id="selectBaseDictOperationList" parameterType="com.smartor.domain.BaseDictOperation"
resultMap="BaseDictOperationResult">
<include refid="selectBaseDictOperationVo"/>
- <where>
+ WHERE 1=1
<if test="opid != null ">
and opid = #{opid}
</if>
@@ -97,7 +97,6 @@
<if test="pid != null ">
and pid = #{pid}
</if>
- </where>
</select>
<select id="selectBaseDictOperationById" parameterType="Long"
diff --git a/smartor/src/main/resources/mapper/smartor/BaseOrganizationMapper.xml b/smartor/src/main/resources/mapper/smartor/BaseOrganizationMapper.xml
index eacaf7f..0e311fa 100644
--- a/smartor/src/main/resources/mapper/smartor/BaseOrganizationMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/BaseOrganizationMapper.xml
@@ -84,8 +84,9 @@
<select id="selectBaseOrganizationList" parameterType="com.smartor.domain.BaseOrganization"
resultMap="BaseOrganizationResult">
<include refid="selectBaseOrganizationVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="OrganizationName != null and OrganizationName != ''">
and OrganizationName like concat('%', #{OrganizationName}, '%')
</if>
@@ -173,7 +174,7 @@
<if test="orgid != null ">
and orgid = #{orgid}
</if>
- </where>
+
</select>
<select id="selectBaseOrganizationByID" parameterType="Long"
diff --git a/smartor/src/main/resources/mapper/smartor/BaseSmsaccountMapper.xml b/smartor/src/main/resources/mapper/smartor/BaseSmsaccountMapper.xml
index da4fecc..6ff4738 100644
--- a/smartor/src/main/resources/mapper/smartor/BaseSmsaccountMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/BaseSmsaccountMapper.xml
@@ -43,7 +43,8 @@
<select id="selectBaseSmsaccountList" parameterType="BaseSmsaccount" resultMap="BaseSmsaccountResult">
<include refid="selectBaseSmsaccountVo"/>
- <where>
+ WHERE 1=1
+
<if test="smsname != null and smsname != ''">and smsname like concat('%', #{smsname}, '%')</if>
<if test="account != null and account != ''">and account = #{account}</if>
<if test="password != null and password != ''">and password = #{password}</if>
@@ -51,7 +52,7 @@
<if test="isupload != null ">and isupload = #{isupload}</if>
<if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
<if test="isenable != null ">and isenable = #{isenable}</if>
- </where>
+
</select>
<select id="selectBaseSmsaccountBySmsacountid" parameterType="Long" resultMap="BaseSmsaccountResult">
diff --git a/smartor/src/main/resources/mapper/smartor/BaseTagMapper.xml b/smartor/src/main/resources/mapper/smartor/BaseTagMapper.xml
index f1e3884..838fd9d 100644
--- a/smartor/src/main/resources/mapper/smartor/BaseTagMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/BaseTagMapper.xml
@@ -41,7 +41,8 @@
<select id="selectBaseTagList" parameterType="com.smartor.domain.BaseTag" resultMap="BaseTagResult">
<include refid="selectBaseTagVo"/>
- <where>
+ WHERE 1=1
+
<if test="tagcategoryid != null ">and tagcategoryid = #{tagcategoryid}</if>
<if test="tagname != null and tagname != ''">and tagname like concat('%', #{tagname}, '%')</if>
<if test="tagdescription != null and tagdescription != ''">and tagdescription = #{tagdescription}</if>
@@ -49,11 +50,12 @@
<if test="isupload != null ">and isupload = #{isupload}</if>
<if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
<if test="isenable != null ">and isenable = #{isenable}</if>
- </where>
+
</select>
<select id="selectBaseTagListByTagname" parameterType="com.smartor.domain.BaseTag" resultMap="BaseTagResult">
<include refid="selectBaseTagVo"/>
- <where>
+ WHERE 1=1
+
<if test="tagcategoryid != null ">and tagcategoryid = #{tagcategoryid}</if>
<if test="tagname != null and tagname != ''">and tagname =#{tagname}</if>
<if test="tagdescription != null and tagdescription != ''">and tagdescription = #{tagdescription}</if>
@@ -61,7 +63,7 @@
<if test="isupload != null ">and isupload = #{isupload}</if>
<if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
<if test="isenable != null ">and isenable = #{isenable}</if>
- </where>
+
</select>
<select id="selectBaseTagByTagid" parameterType="Long" resultMap="BaseTagResult">
diff --git a/smartor/src/main/resources/mapper/smartor/BaseTagcategoryMapper.xml b/smartor/src/main/resources/mapper/smartor/BaseTagcategoryMapper.xml
index 19f75e8..946fc07 100644
--- a/smartor/src/main/resources/mapper/smartor/BaseTagcategoryMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/BaseTagcategoryMapper.xml
@@ -40,16 +40,17 @@
<select id="selectBaseTagcategoryList" parameterType="com.smartor.domain.BaseTagcategory"
resultMap="BaseTagcategoryResult">
<include refid="selectBaseTagcategoryVo"/>
- <where>
+ WHERE 1=1
+
<if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
<if test="pym != null and pym != ''">and pym = #{pym}</if>
<if test="wbm != null and wbm != ''">and wbm = #{wbm}</if>
<if test="isupload != null ">and isupload = #{isupload}</if>
<if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
<if test="categoryname != null and categoryname != ''">and categoryname like concat('%', #{categoryname},
- '%')
+ AND '%')
</if>
- </where>
+
</select>
<select id="selectBaseTagcategoryByTagcategoryid" parameterType="Long" resultMap="BaseTagcategoryResult">
@@ -129,11 +130,12 @@
count(b.tagid) as tagNum
from base_tagcategory a left join base_tag b
on a.tagcategoryid = b.tagcategoryid
- <where>
+ WHERE 1=1
+
<if test="categoryname != null and categoryname != ''">a.categoryname like concat('%', #{categoryname},
- '%')
+ AND '%')
</if>
- </where>
+
GROUP BY a.tagcategoryid,a.categoryname
</select>
</mapper>
diff --git a/smartor/src/main/resources/mapper/smartor/HNGatherPatArchiveMapper.xml b/smartor/src/main/resources/mapper/smartor/HNGatherPatArchiveMapper.xml
index 30fe095..59f240b 100644
--- a/smartor/src/main/resources/mapper/smartor/HNGatherPatArchiveMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/HNGatherPatArchiveMapper.xml
@@ -367,25 +367,28 @@
<select id="yhyjsxx" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserRoleResult">
select user_id, role_id, orgid
FROM yhyjsxx
- <where>
+ WHERE 1=1
+
<if test="hisUserId != null ">and user_id = #{hisUserId}</if>
- </where>
+
</select>
<select id="yhyksxx" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserDeptResult">
select user_id, user_code, dept_type,department_id as
dept_id,dept_name,deptparent,del_flag,orgid,create_time,create_by,update_time,update_by
FROM yhyksxx
- <where>
- user_id != 'admin'
+ WHERE 1=1
+
+ AND user_id != 'admin'
<if test="hisUserId != null ">and user_id = #{hisUserId}</if>
- </where>
+
</select>
<select id="selectPatArchiveList" parameterType="com.smartor.domain.PatArchive" resultMap="PatArchiveResult">
<include refid="selectPatArchiveVo"/>
- <where>
+ WHERE 1=1
+
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
<if test="idcardno != null and idcardno != ''">and idcardno = #{idcardno}</if>
<if test="sourcefrom != null ">and sourcefrom = #{sourcefrom}</if>
@@ -415,7 +418,7 @@
<if test="casePersonAge != null ">and case_person_age = #{casePersonAge}</if>
<if test="filterDrname != null ">and filter_drname = #{filterDrname}</if>
<if test="filterDrcode != null ">and filter_drcode = #{filterDrcode}</if>
- </where>
+
</select>
@@ -494,19 +497,20 @@
b.fuadvice
FROM
cryxx b
- <where>
+ WHERE 1=1
+
<if test="startOutHospTime != null ">and to_char(b.endtime,'YYMMDD') >=
- to_char(#{startOutHospTime}::date,'YYMMDD')
+ AND to_char(#{startOutHospTime}::date,'YYMMDD')
</if>
<if test="endOutHospTime != null ">and to_char(b.endtime,'YYMMDD') <=
- to_char(#{endOutHospTime}::date,'YYMMDD')
+ AND to_char(#{endOutHospTime}::date,'YYMMDD')
</if>
<if test="startInHospTime != null ">and to_char(b.starttime,'YYMMDD') >=
- to_char(#{startInHospTime}::date,'%y%m%d')
+ AND to_char(#{startInHospTime}::date,'%y%m%d')
</if>
<if test="endInHospTime != null ">and to_char(b.starttime,'YYMMDD') <=
- to_char(#{endInHospTime}::date,'YYMMDD')
+ AND to_char(#{endInHospTime}::date,'YYMMDD')
</if>
<if test="inhospno != null ">and b.inhospno = #{inhospno}</if>
<if test="fuflag != null ">and b.fuflag = #{fuflag}</if>
@@ -518,7 +522,7 @@
<if test="outWayId != null ">and b.out_way_id = #{outWayId}</if>
<if test="outWayName != null ">and b.out_way_name = #{outWayName}</if>
<if test="orgid != null ">and b.orgid = #{orgid}</if>
- </where>
+
</select>
@@ -552,16 +556,17 @@
patname,
mainsuit
from mzxx
- <where>
+ WHERE 1=1
+
<if test="beginTime != null ">and to_char( admitdate,'YYMMDD') >=
- to_char(#{beginTime}::date,'YYMMDD')
+ AND to_char(#{beginTime}::date,'YYMMDD')
</if>
<if test="endTime != null ">and to_char( admitdate,'YYMMDD') <=
- to_char(#{endTime}::date,'YYMMDD')
+ AND to_char(#{endTime}::date,'YYMMDD')
</if>
- </where>
+
</select>
@@ -574,7 +579,8 @@
icdname,
icdpym
from jbxx
- <where>
+ WHERE 1=1
+
<if test="icdcode != null and icdcode != ''">and icdcode = #{icdcode}</if>
<if test="lastflag != null and lastflag != ''">and lastflag = #{lastflag}</if>
<if test="chimedflag != null and chimedflag != ''">and chimedflag = #{chimedflag}</if>
@@ -585,7 +591,7 @@
<if test="pid != null ">and pid = #{pid}</if>
<if test="guid != null and guid != ''">and guid = #{guid}</if>
<if test="hisIcdid != null and hisIcdid != ''">and his_icdid = #{hisIcdid}</if>
- </where>
+
</select>
@@ -596,7 +602,8 @@
u.birthday,u.orgid,u.job_phone,u.phonenumber, u.sex, u.status,
u.login_ip, u.login_date, u.create_by, u.create_time, u.remark
from ryxx u
- <where>
+ WHERE 1=1
+
<if test="userId != null and userId != 0">
AND u.user_id = #{userId}
</if>
@@ -627,7 +634,7 @@
<if test="phonenumber != null and phonenumber != ''">
AND u.phonenumber like concat('%', #{phonenumber}, '%')
</if>
- </where>
+
</select>
<select id="selectDeptList" parameterType="com.ruoyi.common.core.domain.entity.SysDept" resultMap="SysDeptResult">
diff --git a/smartor/src/main/resources/mapper/smartor/HeCategoryMapper.xml b/smartor/src/main/resources/mapper/smartor/HeCategoryMapper.xml
index 9604209..933073d 100644
--- a/smartor/src/main/resources/mapper/smartor/HeCategoryMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/HeCategoryMapper.xml
@@ -37,14 +37,15 @@
<select id="selectHeCategoryList" parameterType="com.smartor.domain.HeCategory" resultMap="HeCategoryResult">
<include refid="selectHeCategoryVo"/>
- <where>
+ WHERE 1=1
+
<if test="categoryname != null and categoryname != ''">and categoryname like concat('%', #{categoryname},
- '%')
+ AND '%')
</if>
<if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
<if test="id != null">and id = #{id}</if>
<if test="pid != null">and pid = #{pid}</if>
- </where>
+
</select>
<select id="selectHeCategoryById" parameterType="Long" resultMap="HeCategoryResult">
diff --git a/smartor/src/main/resources/mapper/smartor/HeLibraryAssortMapper.xml b/smartor/src/main/resources/mapper/smartor/HeLibraryAssortMapper.xml
index c74078e..aac6770 100644
--- a/smartor/src/main/resources/mapper/smartor/HeLibraryAssortMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/HeLibraryAssortMapper.xml
@@ -42,8 +42,9 @@
<select id="selectHeLibraryAssortList" parameterType="com.smartor.domain.HeLibraryAssort"
resultMap="HeLibraryAssortResult">
<include refid="selectHeLibraryAssortVo"/>
- <where>
- del_flag != 1
+ WHERE 1=1
+
+ AND del_flag != 1
<if test="assortname != null and assortname != ''">and assortname like concat('%', #{assortname}, '%')</if>
<if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
<if test="isupload != null ">and isupload = #{isupload}</if>
@@ -53,7 +54,7 @@
<if test="seqno != null ">and seqno = #{seqno}</if>
<if test="hetype != null ">and hetype = #{hetype}</if>
- </where>
+
order by seqno asc
</select>
diff --git a/smartor/src/main/resources/mapper/smartor/HeLibraryMapper.xml b/smartor/src/main/resources/mapper/smartor/HeLibraryMapper.xml
index 2df9355..8766d43 100644
--- a/smartor/src/main/resources/mapper/smartor/HeLibraryMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/HeLibraryMapper.xml
@@ -85,8 +85,9 @@
<select id="selectHeLibraryList" parameterType="com.smartor.domain.HeLibrary" resultMap="HeLibraryResult">
<include refid="selectHeLibraryVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="id != null ">and id = #{id}</if>
<if test="classification != null and classification != ''">and classification = #{classification}</if>
<if test="assortid != null ">and assortid = #{assortid}</if>
@@ -121,7 +122,7 @@
<if test="richText != null and richText != ''">and rich_text = #{richText}</if>
<if test="hetype != null and hetype != ''">and hetype = #{hetype}</if>
<if test="htmlRichText != null and htmlRichText != ''">and html_rich_text = #{htmlRichText}</if>
- </where>
+
</select>
<select id="selectHeLibraryById" parameterType="Long" resultMap="HeLibraryResult">
diff --git a/smartor/src/main/resources/mapper/smartor/HeLibraryTagMapper.xml b/smartor/src/main/resources/mapper/smartor/HeLibraryTagMapper.xml
index 9db09a7..d10bc53 100644
--- a/smartor/src/main/resources/mapper/smartor/HeLibraryTagMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/HeLibraryTagMapper.xml
@@ -43,8 +43,9 @@
<select id="selectHeLibraryTagList" parameterType="com.smartor.domain.HeLibraryTag" resultMap="HeLibraryTagResult">
<include refid="selectHeLibraryTagVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="tagcategoryid != null ">and tagcategoryid = #{tagcategoryid}</if>
<if test="tagid != null ">and tagid = #{tagid}</if>
<if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
@@ -54,7 +55,7 @@
<if test="pid != null ">and pid = #{pid}</if>
<if test="guid != null and guid != ''">and guid = #{guid}</if>
<if test="tagname != null and tagname != ''">and tagname = #{tagname}</if>
- </where>
+
</select>
<select id="selectHeLibraryTagById" parameterType="Long" resultMap="HeLibraryTagResult">
diff --git a/smartor/src/main/resources/mapper/smartor/HeLocallibraryMapper.xml b/smartor/src/main/resources/mapper/smartor/HeLocallibraryMapper.xml
index 1bb682f..770b446 100644
--- a/smartor/src/main/resources/mapper/smartor/HeLocallibraryMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/HeLocallibraryMapper.xml
@@ -61,8 +61,9 @@
<select id="selectHeLocallibraryList" parameterType="com.smartor.domain.HeLocallibrary"
resultMap="HeLocallibraryResult">
<include refid="selectHeLocallibraryVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="preachcategoryid != null ">and preachcategoryid = #{preachcategoryid}</if>
<if test="preachname != null and preachname != ''">and preachname like concat('%', #{preachname}, '%')</if>
<if test="version != null ">and version = #{version}</if>
@@ -83,7 +84,7 @@
<if test="centerlibrarycode != null and centerlibrarycode != ''">and centerlibrarycode =
#{centerlibrarycode}
</if>
- </where>
+
</select>
<select id="selectHeLocallibraryById" parameterType="Long" resultMap="HeLocallibraryResult">
diff --git a/smartor/src/main/resources/mapper/smartor/HospitalRecordMapper.xml b/smartor/src/main/resources/mapper/smartor/HospitalRecordMapper.xml
index 7bbd5a9..f4ae969 100644
--- a/smartor/src/main/resources/mapper/smartor/HospitalRecordMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/HospitalRecordMapper.xml
@@ -134,7 +134,8 @@
<select id="selectHospitalRecordList" parameterType="com.smartor.domain.HospitalRecord"
resultMap="HospitalRecordResult">
<include refid="selectHospitalRecordVo"/>
- <where>
+ WHERE 1=1
+
<if test="ID != null and ID != ''">and ID = #{ID}</if>
<if test="sourceSystem != null and sourceSystem != ''">and SourceSystem = #{sourceSystem}</if>
<if test="messageID != null and messageID != ''">and MessageID = #{messageID}</if>
@@ -174,7 +175,7 @@
<if test="encAdmSource != null and encAdmSource != ''">and EncAdmSource = #{encAdmSource}</if>
<if test="encInhostype != null and encInhostype != ''">and EncInhostype = #{encInhostype}</if>
<if test="encDietName != null and encDietName != ''">and EncDietName like concat('%', #{encDietName},
- '%')
+ AND '%')
</if>
<if test="encOuthostype != null and encOuthostype != ''">and EncOuthostype = #{encOuthostype}</if>
<if test="encVisitnum != null and encVisitnum != ''">and EncVisitnum = #{encVisitnum}</if>
@@ -202,7 +203,7 @@
<if test="encDiagList != null and encDiagList != ''">and EncDiagList = #{encDiagList}</if>
<if test="directorCode != null and directorCode != ''">and DirectorCode = #{directorCode}</if>
<if test="directorName != null and directorName != ''">and DirectorName like concat('%', #{directorName},
- '%')
+ AND '%')
</if>
<if test="dncDiagnosisCode != null and dncDiagnosisCode != ''">and EncDiagnosisCode = #{dncDiagnosisCode}
</if>
@@ -214,7 +215,7 @@
</if>
<if test="taskStatus != null and taskStatus != ''">and taskStatus = #{taskStatus}</if>
<if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
- </where>
+
</select>
<select id="selectHospitalRecordByID" parameterType="String" resultMap="HospitalRecordResult">
diff --git a/smartor/src/main/resources/mapper/smartor/HospitalUserinfoMapper.xml b/smartor/src/main/resources/mapper/smartor/HospitalUserinfoMapper.xml
index 3a23219..676a074 100644
--- a/smartor/src/main/resources/mapper/smartor/HospitalUserinfoMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/HospitalUserinfoMapper.xml
@@ -183,7 +183,8 @@
<select id="selectHospitalUserinfoList" parameterType="HospitalUserinfo" resultMap="HospitalUserinfoResult">
<include refid="selectHospitalUserinfoVo"/>
- <where>
+ WHERE 1=1
+
<if test="SourceSystem != null and SourceSystem != ''">and SourceSystem = #{SourceSystem}</if>
<if test="MessageID != null and MessageID != ''">and MessageID = #{MessageID}</if>
<if test="CreateTime != null and CreateTime != ''">and CreateTime = #{CreateTime}</if>
@@ -283,7 +284,7 @@
<if test="Bednur != null and Bednur != ''">and Bednur = #{Bednur}</if>
<if test="Regdoc != null and Regdoc != ''">and Regdoc = #{Regdoc}</if>
<if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
- </where>
+
</select>
<select id="selectHospitalUserinfoByID" parameterType="Long" resultMap="HospitalUserinfoResult">
diff --git a/smartor/src/main/resources/mapper/smartor/Icd10AssociationMapper.xml b/smartor/src/main/resources/mapper/smartor/Icd10AssociationMapper.xml
index ebba189..5740e88 100644
--- a/smartor/src/main/resources/mapper/smartor/Icd10AssociationMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/Icd10AssociationMapper.xml
@@ -59,7 +59,8 @@
<select id="selectIcd10AssociationList" parameterType="com.smartor.domain.Icd10Association"
resultMap="Icd10AssociationResult">
<include refid="selectIcd10AssociationVo"/>
- <where>
+ WHERE 1=1
+
<if test="icd10id != null ">and icd10id = #{icd10id}</if>
<if test="icd10code != null and icd10code != ''">and icd10code = #{icd10code}</if>
<if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
@@ -76,14 +77,14 @@
#{chineseMedicineDiagnoseSign}
</if>
<if test="chineseMedicineDiagnoseAssortCode != null and chineseMedicineDiagnoseAssortCode != ''">and
- chinese_medicine_diagnose_assort_code = #{chineseMedicineDiagnoseAssortCode}
+ AND chinese_medicine_diagnose_assort_code = #{chineseMedicineDiagnoseAssortCode}
</if>
<if test="chineseMedicineDiagnoseAssortName != null and chineseMedicineDiagnoseAssortName != ''">and
- chinese_medicine_diagnose_assort_name = #{chineseMedicineDiagnoseAssortName}
+ AND chinese_medicine_diagnose_assort_name = #{chineseMedicineDiagnoseAssortName}
</if>
<if test="outpatientUseAssort != null">and outpatient_use_assort = #{outpatientUseAssort}</if>
<if test="inpatientUseAssort != null">and inpatient_use_assort = #{inpatientUseAssort}</if>
- </where>
+
</select>
<select id="selectIcd10AssociationById" parameterType="Long" resultMap="Icd10AssociationResult">
diff --git a/smartor/src/main/resources/mapper/smartor/Icd10Mapper.xml b/smartor/src/main/resources/mapper/smartor/Icd10Mapper.xml
index ef995e2..38f107d 100644
--- a/smartor/src/main/resources/mapper/smartor/Icd10Mapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/Icd10Mapper.xml
@@ -45,8 +45,9 @@
<select id="selectIcd10List" parameterType="com.smartor.domain.Icd10" resultMap="Icd10Result">
<include refid="selectIcd10Vo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="icdcode != null and icdcode != ''">and icdcode = #{icdcode}</if>
<if test="lastflag != null and lastflag != ''">and lastflag = #{lastflag}</if>
<if test="chimedflag != null and chimedflag != ''">and chimedflag = #{chimedflag}</if>
@@ -57,7 +58,7 @@
<if test="pid != null ">and pid = #{pid}</if>
<if test="guid != null and guid != ''">and guid = #{guid}</if>
<if test="hisIcdid != null and hisIcdid != ''">and his_icdid = #{hisIcdid}</if>
- </where>
+
</select>
<select id="selectIcd10ByIcdid" parameterType="Long" resultMap="Icd10Result">
diff --git a/smartor/src/main/resources/mapper/smartor/IvrLibIntentMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrLibIntentMapper.xml
index 958ecb9..9273335 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrLibIntentMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrLibIntentMapper.xml
@@ -27,7 +27,8 @@
<select id="selectIvrLibIntentList" parameterType="IvrLibIntent" resultMap="IvrLibIntentResult">
<include refid="selectIvrLibIntentVo"/>
- <where>
+ WHERE 1=1
+
<if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
<if test="intentionname != null and intentionname != ''"> and intentionname like concat('%', #{intentionname}, '%')</if>
<if test="categoryid != null "> and categoryid = #{categoryid}</if>
@@ -35,7 +36,7 @@
<if test="intentionword != null and intentionword != ''"> and intentionword = #{intentionword}</if>
<if test="isupload != null "> and isupload = #{isupload}</if>
<if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
- </where>
+
</select>
<select id="selectIvrLibIntentByIntentid" parameterType="Long" resultMap="IvrLibIntentResult">
diff --git a/smartor/src/main/resources/mapper/smartor/IvrLibIntentcategoryMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrLibIntentcategoryMapper.xml
index 6855113..7ce4e09 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrLibIntentcategoryMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrLibIntentcategoryMapper.xml
@@ -24,12 +24,13 @@
<select id="selectIvrLibIntentcategoryList" parameterType="IvrLibIntentcategory" resultMap="IvrLibIntentcategoryResult">
<include refid="selectIvrLibIntentcategoryVo"/>
- <where>
+ WHERE 1=1
+
<if test="categoryname != null and categoryname != ''"> and categoryname like concat('%', #{categoryname}, '%')</if>
<if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
<if test="isupload != null "> and isupload = #{isupload}</if>
<if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
- </where>
+
</select>
<select id="selectIvrLibIntentcategoryByIntertcatid" parameterType="Long" resultMap="IvrLibIntentcategoryResult">
diff --git a/smartor/src/main/resources/mapper/smartor/IvrLibScriptMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrLibScriptMapper.xml
index fe2191c..06b68f3 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrLibScriptMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrLibScriptMapper.xml
@@ -29,7 +29,8 @@
<select id="selectIvrLibScriptList" parameterType="IvrLibScript" resultMap="IvrLibScriptResult">
<include refid="selectIvrLibScriptVo"/>
- <where>
+ WHERE 1=1
+
<if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
<if test="categoryid != null "> and categoryid = #{categoryid}</if>
<if test="categoryname != null and categoryname != ''"> and categoryname like concat('%', #{categoryname}, '%')</if>
@@ -39,7 +40,7 @@
<if test="speakname != null and speakname != ''"> and speakname like concat('%', #{speakname}, '%')</if>
<if test="isupload != null "> and isupload = #{isupload}</if>
<if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
- </where>
+
</select>
<select id="selectIvrLibScriptByScriptid" parameterType="Long" resultMap="IvrLibScriptResult">
diff --git a/smartor/src/main/resources/mapper/smartor/IvrLibScriptcategoryMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrLibScriptcategoryMapper.xml
index 56b2e9b..7ad5a05 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrLibScriptcategoryMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrLibScriptcategoryMapper.xml
@@ -24,12 +24,13 @@
<select id="selectIvrLibScriptcategoryList" parameterType="IvrLibScriptcategory" resultMap="IvrLibScriptcategoryResult">
<include refid="selectIvrLibScriptcategoryVo"/>
- <where>
+ WHERE 1=1
+
<if test="categoryname != null and categoryname != ''"> and categoryname like concat('%', #{categoryname}, '%')</if>
<if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
<if test="isupload != null "> and isupload = #{isupload}</if>
<if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
- </where>
+
</select>
<select id="selectIvrLibScriptcategoryByCategoryid" parameterType="Long" resultMap="IvrLibScriptcategoryResult">
diff --git a/smartor/src/main/resources/mapper/smartor/IvrLibScriptmodelMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrLibScriptmodelMapper.xml
index 3e8809f..2ec08f6 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrLibScriptmodelMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrLibScriptmodelMapper.xml
@@ -34,7 +34,8 @@
<select id="selectIvrLibScriptmodelList" parameterType="IvrLibScriptmodel" resultMap="IvrLibScriptmodelResult">
<include refid="selectIvrLibScriptmodelVo"/>
- <where>
+ WHERE 1=1
+
<if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
<if test="scriptid != null "> and scriptid = #{scriptid}</if>
<if test="speaktype != null "> and speaktype = #{speaktype}</if>
@@ -49,7 +50,7 @@
<if test="isupload != null "> and isupload = #{isupload}</if>
<if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
<if test="speakvariable != null and speakvariable != ''"> and speakvariable = #{speakvariable}</if>
- </where>
+
</select>
<select id="selectIvrLibScriptmodelByModelid" parameterType="Long" resultMap="IvrLibScriptmodelResult">
diff --git a/smartor/src/main/resources/mapper/smartor/IvrLibaExtemplateCategoryMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrLibaExtemplateCategoryMapper.xml
index e9c3c1e..613cf37 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrLibaExtemplateCategoryMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrLibaExtemplateCategoryMapper.xml
@@ -40,9 +40,10 @@
<select id="selectIvrLibaExtemplateCategoryList" parameterType="com.smartor.domain.IvrLibaExtemplateCategory"
resultMap="IvrLibaExtemplateCategoryResult">
<include refid="selectIvrLibaExtemplateCategoryVo"/>
- <where>
+ WHERE 1=1
+
<if test="categoryname != null and categoryname != ''">and categoryname like concat('%', #{categoryname},
- '%')
+ AND '%')
</if>
<if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
<if test="isupload != null ">and isupload = #{isupload}</if>
@@ -51,7 +52,7 @@
<if test="guid != null and guid != ''">and guid = #{guid}</if>
<if test="seqno != null ">and seqno = #{seqno}</if>
and del_flag = 0
- </where>
+
order by seqno asc
</select>
diff --git a/smartor/src/main/resources/mapper/smartor/IvrLibaExtemplateMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrLibaExtemplateMapper.xml
index 711ac83..d8524f6 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrLibaExtemplateMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrLibaExtemplateMapper.xml
@@ -33,8 +33,9 @@
<select id="selectIvrLibaExtemplateList" parameterType="com.smartor.domain.IvrLibaExtemplate"
resultMap="IvrLibaExtemplateResult">
<include refid="selectIvrLibaExtemplateVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="extName != null and extName != ''">and extName like concat('%', #{extName}, '%')</if>
<if test="language != null and language != ''">and language = #{language}</if>
<if test="note != null and note != ''">and note = #{note}</if>
@@ -46,7 +47,7 @@
<if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
<if test="pid != null ">and pid = #{pid}</if>
<if test="guid != null and guid != ''">and guid = #{guid}</if>
- </where>
+
</select>
<select id="selectIvrLibaExtemplateByID" parameterType="String" resultMap="IvrLibaExtemplateResult">
diff --git a/smartor/src/main/resources/mapper/smartor/IvrLibaExtemplatescriptMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrLibaExtemplatescriptMapper.xml
index ad8ca58..267177f 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrLibaExtemplatescriptMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrLibaExtemplatescriptMapper.xml
@@ -56,7 +56,8 @@
<select id="selectIvrLibaExtemplatescriptList" parameterType="com.smartor.domain.IvrLibaExtemplatescript"
resultMap="IvrLibaExtemplatescriptResult">
<include refid="selectIvrLibaExtemplatescriptVo"/>
- <where>
+ WHERE 1=1
+
<if test="extID != null">and extID = #{extID}</if>
<if test="switchID != null ">and switchID = #{switchID}</if>
<if test="switchText != null and switchText != ''">and switchText = #{switchText}</if>
@@ -70,21 +71,22 @@
<if test="pid != null ">and pid = #{pid}</if>
<if test="guid != null and guid != ''">and guid = #{guid}</if>
<if test="isEnd != null">and is_end = #{isEnd}</if>
- </where>
+
</select>
<select id="queryIvrLibaExtemplatescriptList" parameterType="com.smartor.domain.IvrLibaExtemplatescript"
resultMap="IvrLibaExtemplatescriptResult">
<include refid="selectIvrLibaExtemplatescriptVo"/>
- <where>
- del_flag = 0
+ WHERE 1=1
+
+ AND del_flag = 0
<if test="IDs != null">
and extID in
<foreach collection="IDs" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
- </where>
+
</select>
<select id="selectIvrLibaExtemplatescriptByID" parameterType="String" resultMap="IvrLibaExtemplatescriptResult">
diff --git a/smartor/src/main/resources/mapper/smartor/IvrLibaScriptAssortMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrLibaScriptAssortMapper.xml
index 899f400..e5af116 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrLibaScriptAssortMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrLibaScriptAssortMapper.xml
@@ -24,13 +24,14 @@
<select id="selectIvrLibaScriptAssortList" parameterType="com.smartor.domain.IvrLibaScriptAssort"
resultMap="IvrLibaScriptAssortResult">
<include refid="selectIvrLibaScriptAssortVo"/>
- <where>
+ WHERE 1=1
+
<if test="indexAssortName != null and indexAssortName != ''">and index_assort_name like concat('%',
#{indexAssortName}, '%')
</if>
<if test="pid != null ">and pid = #{pid}</if>
and del_flag=0
- </where>
+
order by seqno asc
</select>
diff --git a/smartor/src/main/resources/mapper/smartor/IvrLibaScriptMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrLibaScriptMapper.xml
index abf54a3..1e4f6c4 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrLibaScriptMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrLibaScriptMapper.xml
@@ -90,13 +90,14 @@
<select id="selectIvrLibaScriptList" parameterType="com.smartor.domain.IvrLibaScript"
resultMap="IvrLibaScriptResult">
<include refid="selectIvrLibaScriptVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="id != null ">and id = #{id}</if>
<if test="deptIds != null and deptIds != ''">and deptIds = #{deptIds}</if>
<if test="deptNames != null and deptNames != ''">and deptNames like concat('%', #{deptNames}, '%')</if>
<if test="scriptTopic != null and scriptTopic != ''">and script_topic like concat('%', #{scriptTopic},
- '%')
+ AND '%')
</if>
<if test="campus != null and campus != ''">and campus = #{campus}</if>
<if test="tag != null and tag != ''">and tag = #{tag}</if>
@@ -133,7 +134,7 @@
<if test="pid != null ">and pid = #{pid}</if>
<if test="guid != null and guid != ''">and guid = #{guid}</if>
<if test="otherdata != null and otherdata != ''">and otherdata = #{otherdata}</if>
- </where>
+
</select>
<select id="selectIvrLibaScriptByQuestionid" parameterType="String" resultMap="IvrLibaScriptResult">
diff --git a/smartor/src/main/resources/mapper/smartor/IvrLibaScriptTagMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrLibaScriptTagMapper.xml
index b2bc49e..b6f1c9c 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrLibaScriptTagMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrLibaScriptTagMapper.xml
@@ -46,7 +46,8 @@
<select id="selectIvrLibaScriptTagList" parameterType="com.smartor.domain.IvrLibaScriptTag"
resultMap="IvrLibaScriptTagResult">
<include refid="selectIvrLibaScriptTagVo"/>
- <where>
+ WHERE 1=1
+
<if test="tagcategoryid != null ">and tagcategoryid = #{tagcategoryid}</if>
<if test="scriptid != null ">and scriptid = #{scriptid}</if>
<if test="tagid != null ">and tagid = #{tagid}</if>
@@ -56,7 +57,7 @@
<if test="targetid != null ">and targetid = #{targetid}</if>
<if test="pid != null ">and pid = #{pid}</if>
<if test="guid != null and guid != ''">and guid = #{guid}</if>
- </where>
+
</select>
<select id="selectIvrLibaScriptTagById" parameterType="Long" resultMap="IvrLibaScriptTagResult">
diff --git a/smartor/src/main/resources/mapper/smartor/IvrLibaScriptTargetMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrLibaScriptTargetMapper.xml
index 62e59ce..24bebec 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrLibaScriptTargetMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrLibaScriptTargetMapper.xml
@@ -70,12 +70,13 @@
<select id="selectIvrLibaScriptTargetList" parameterType="com.smartor.domain.IvrLibaScriptTarget"
resultMap="IvrLibaScriptTargetResult">
<include refid="selectIvrLibaScriptTargetVo"/>
- <where>
+ WHERE 1=1
+
<if test="scriptid != null ">and scriptid = #{scriptid}</if>
<if test="targetID != null ">and targetID = #{targetID}</if>
<if test="targetType != null and targetType != ''">and targetType = #{targetType}</if>
<if test="categoryName != null and categoryName != ''">and categoryName like concat('%', #{categoryName},
- '%')
+ AND '%')
</if>
<if test="targetValue != null and targetValue != ''">and targetValue = #{targetValue}</if>
<if test="basicRegex != null and basicRegex != ''">and basicRegex = #{basicRegex}</if>
@@ -95,7 +96,7 @@
<if test="warnup != null ">and warnup = #{warnup}</if>
<if test="warndown != null">and warndown = #{warndown}</if>
<if test="picturePath != null and picturePath != ''">and picture_path = #{picturePath}</if>
- </where>
+
</select>
<select id="selectIvrLibaScriptTargetByQuestionTargetID" parameterType="String"
diff --git a/smartor/src/main/resources/mapper/smartor/IvrLibaScriptTargetoptionMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrLibaScriptTargetoptionMapper.xml
index ba14879..21272ee 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrLibaScriptTargetoptionMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrLibaScriptTargetoptionMapper.xml
@@ -62,14 +62,15 @@
<select id="selectIvrLibaScriptTargetoptionList" parameterType="com.smartor.domain.IvrLibaScriptTargetoption"
resultMap="IvrLibaScriptTargetoptionResult">
<include refid="selectIvrLibaScriptTargetoptionVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="targetid != null and targetid != ''">and targetid = #{targetid}</if>
<if test="targetname != null and targetname != ''">and targetname = #{targetname}</if>
<if test="scriptid != null ">and scriptid = #{scriptid}</if>
<if test="targettype != null and targettype != ''">and targettype = #{targettype}</if>
<if test="categoryName != null and categoryName != ''">and categoryName like concat('%', #{categoryName},
- '%')
+ AND '%')
</if>
<if test="targetvalue != null and targetvalue != ''">and targetvalue = #{targetvalue}</if>
<if test="targetregex != null and targetregex != ''">and targetregex = #{targetregex}</if>
@@ -92,7 +93,7 @@
<if test="appendflag != null">and appendflag = #{appendflag}</if>
<if test="appenddesc != null">and appenddesc = #{appenddesc}</if>
<if test="picturePath != null">and picture_path = #{picturePath}</if>
- </where>
+
</select>
<select id="selectIvrLibaScriptTargetoptionByTargetoptionid" parameterType="String"
diff --git a/smartor/src/main/resources/mapper/smartor/IvrLibaTargetAssortMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrLibaTargetAssortMapper.xml
index 848ef8a..6fc4e72 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrLibaTargetAssortMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrLibaTargetAssortMapper.xml
@@ -24,13 +24,14 @@
<select id="selectIvrLibaTargetAssortList" parameterType="com.smartor.domain.IvrLibaTargetAssort"
resultMap="IvrLibaTargetAssortResult">
<include refid="selectIvrLibaTargetAssortVo"/>
- <where>
+ WHERE 1=1
+
<if test="indexAssortName != null and indexAssortName != ''">and index_assort_name like concat('%',
#{indexAssortName}, '%')
</if>
<if test="pid != null ">and pid = #{pid}</if>
and del_flag=0
- </where>
+
order by seqno asc
</select>
diff --git a/smartor/src/main/resources/mapper/smartor/IvrLibaTargetMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrLibaTargetMapper.xml
index bf05b21..51e7c20 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrLibaTargetMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrLibaTargetMapper.xml
@@ -107,8 +107,9 @@
<select id="selectIvrLibaTargetList" parameterType="com.smartor.domain.IvrLibaTarget"
resultMap="IvrLibaTargetResult">
<include refid="selectIvrLibaTargetVo"/>
- <where>
- del_flag =0
+ WHERE 1=1
+
+ AND del_flag =0
<if test="id != null ">and id = #{id}</if>
<if test="groupid != null and groupid != ''">and groupid = #{groupid}</if>
<if test="targettype != null and targettype != ''">and targettype = #{targettype}</if>
@@ -134,7 +135,7 @@
<if test="parameter != null and parameter != ''">and parameter = #{parameter}</if>
<if test="optionDesc != null and optionDesc != ''">and option_desc = #{optionDesc}</if>
- </where>
+
order by update_time desc
</select>
@@ -170,8 +171,9 @@
from ivr_liba_target a
LEFT JOIN ivr_liba_targetoption b
on a.id = b.targetid
- <where>
- a.del_flag != 1 and b.del_flag != 1
+ WHERE 1=1
+
+ AND a.del_flag != 1 and b.del_flag != 1
<if test="groupid != null and groupid != ''">and a.groupid = #{groupid}</if>
<if test="targettype != null and targettype != ''">and a.targettype = #{targettype}</if>
<if test="targetname != null and targetname != ''">and a.targetname like concat('%', #{targetname}, '%')
@@ -195,7 +197,7 @@
<if test="parameter != null and parameter != ''">a.parameter = #{parameter}</if>
<if test="optionDesc != null and optionDesc != ''">a.option_desc = #{optionDesc}</if>
- </where>
+
ORDER BY a.targetID
</select>
diff --git a/smartor/src/main/resources/mapper/smartor/IvrLibaTargetTagMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrLibaTargetTagMapper.xml
index 4333d15..9c9b5af 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrLibaTargetTagMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrLibaTargetTagMapper.xml
@@ -44,8 +44,9 @@
<select id="selectIvrLibaTargetTagList" parameterType="com.smartor.domain.IvrLibaTargetTag"
resultMap="IvrLibaTargetTagResult">
<include refid="selectIvrLibaTargetTagVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="tagcategoryid != null ">and tagcategoryid = #{tagcategoryid}</if>
<if test="tagid != null ">and tagid = #{tagid}</if>
<if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
@@ -55,7 +56,7 @@
<if test="pid != null ">and pid = #{pid}</if>
<if test="tagname != null ">and tagname = #{tagname}</if>
<if test="guid != null and guid != ''">and guid = #{guid}</if>
- </where>
+
</select>
<select id="selectIvrLibaTargetTagById" parameterType="Long" resultMap="IvrLibaTargetTagResult">
diff --git a/smartor/src/main/resources/mapper/smartor/IvrLibaTargetoptionMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrLibaTargetoptionMapper.xml
index 91884b1..9588a8d 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrLibaTargetoptionMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrLibaTargetoptionMapper.xml
@@ -61,12 +61,13 @@
<select id="selectIvrLibaTargetoptionList" parameterType="com.smartor.domain.IvrLibaTargetoption"
resultMap="IvrLibaTargetoptionResult">
<include refid="selectIvrLibaTargetoptionVo"/>
- <where>
- del_flag != 1
+ WHERE 1=1
+
+ AND del_flag != 1
<if test="targetid != null ">and targetid = #{targetid}</if>
<if test="targettype != null and targettype != ''">and targettype = #{targettype}</if>
<if test="categoryName != null and categoryName != ''">and categoryName like concat('%', #{categoryName},
- '%')
+ AND '%')
</if>
<if test="targetvalue != null and targetvalue != ''">and targetvalue = #{targetvalue}</if>
<if test="targetregex != null and targetregex != ''">and targetregex = #{targetregex}</if>
@@ -90,7 +91,7 @@
<if test="appenddesc != null">and appenddesc = #{appenddesc}</if>
<if test="picturePath != null">and picture_path = #{picturePath}</if>
<if test="isEnd != null ">and is_end = #{isEnd}</if>
- </where>
+
order by guid asc
</select>
diff --git a/smartor/src/main/resources/mapper/smartor/IvrLibaTemplateAssortMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrLibaTemplateAssortMapper.xml
index 288b66a..f111ebb 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrLibaTemplateAssortMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrLibaTemplateAssortMapper.xml
@@ -24,13 +24,14 @@
<select id="selectIvrLibaTemplateAssortList" parameterType="com.smartor.domain.IvrLibaTemplateAssort"
resultMap="IvrLibaTemplateAssortResult">
<include refid="selectIvrLibaTemplateAssortVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="indexAssortName != null and indexAssortName != ''">and index_assort_name like concat('%',
#{indexAssortName}, '%')
</if>
<if test="pid != null ">and pid = #{pid}</if>
- </where>
+
order by seqno asc
</select>
diff --git a/smartor/src/main/resources/mapper/smartor/IvrLibaTemplateMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrLibaTemplateMapper.xml
index ed7b034..de78d29 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrLibaTemplateMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrLibaTemplateMapper.xml
@@ -71,10 +71,11 @@
<select id="selectIvrLibaTemplateList" parameterType="com.smartor.domain.IvrLibaTemplate"
resultMap="IvrLibaTemplateResult">
<include refid="selectIvrLibaTemplateVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="templateName != null and templateName != ''">and templateName like concat('%', #{templateName},
- '%')
+ AND '%')
</if>
<if test="id != null ">and id = #{id}</if>
<if test="sendDay != null ">and send_day = #{sendDay}</if>
@@ -112,7 +113,7 @@
<if test="noVoiceNum != null and noVoiceNum > 0">and no_voice_num = #{noVoiceNum}</if>
<if test="silencetime != null">and silencetime = #{silencetime}</if>
<if test="deptCode != null">and dept_code = #{deptCode}</if>
- </where>
+
</select>
<select id="selectIvrLibaTemplateByID" parameterType="Long" resultMap="IvrLibaTemplateResult">
diff --git a/smartor/src/main/resources/mapper/smartor/IvrLibaTemplateScriptMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrLibaTemplateScriptMapper.xml
index 31351c6..5ccafde 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrLibaTemplateScriptMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrLibaTemplateScriptMapper.xml
@@ -101,8 +101,9 @@
<select id="selectIvrLibaTemplateScriptList" parameterType="com.smartor.domain.IvrLibaTemplateScript"
resultMap="IvrLibaTemplateScriptResult">
<include refid="selectIvrLibaTemplateScriptVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="scriptno != null ">and scriptno = #{scriptno}</if>
<if test="assortid != null ">and assortid = #{assortid}</if>
<if test="groupName != null ">and group_name = #{groupName}</if>
@@ -126,11 +127,11 @@
#{branchNextscriptno}
</if>
<if test="categoryName != null and categoryName != ''">and categoryName like concat('%', #{categoryName},
- '%')
+ AND '%')
</if>
<if test="scriptTopic != null and scriptTopic != ''">and script_topic like concat('%',
#{scriptTopic},
- '%')
+ AND '%')
</if>
<if test="playWavOnly != null ">and playWavOnly = #{playWavOnly}</if>
<if test="valueType != null ">and value_type = #{valueType}</if>
@@ -145,7 +146,7 @@
<if test="scriptType != null">and script_type = #{scriptType}</if>
<if test="sort != null">and sort = #{sort}</if>
<if test="score != null">and score = #{score}</if>
- </where>
+
</select>
<select id="selectIvrLibaTemplateScriptByID" parameterType="Long" resultMap="IvrLibaTemplateScriptResult">
diff --git a/smartor/src/main/resources/mapper/smartor/IvrLibaTemplateTagMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrLibaTemplateTagMapper.xml
index 761185d..5853bfd 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrLibaTemplateTagMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrLibaTemplateTagMapper.xml
@@ -46,8 +46,9 @@
<select id="selectIvrLibaTemplateTagList" parameterType="com.smartor.domain.IvrLibaTemplateTag"
resultMap="IvrLibaTemplateTagResult">
<include refid="selectIvrLibaTemplateTagVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="tagcategoryid != null ">and tagcategoryid = #{tagcategoryid}</if>
<if test="templateid != null ">and templateid = #{templateid}</if>
<if test="tagid != null ">and tagid = #{tagid}</if>
@@ -57,7 +58,7 @@
<if test="targetid != null ">and targetid = #{targetid}</if>
<if test="pid != null ">and pid = #{pid}</if>
<if test="guid != null and guid != ''">and guid = #{guid}</if>
- </where>
+
</select>
<select id="selectIvrLibaTemplateTagById" parameterType="Long" resultMap="IvrLibaTemplateTagResult">
diff --git a/smartor/src/main/resources/mapper/smartor/IvrLibaTemplateTargetoptionMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrLibaTemplateTargetoptionMapper.xml
index 48c6dee..4d3eab6 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrLibaTemplateTargetoptionMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrLibaTemplateTargetoptionMapper.xml
@@ -72,8 +72,9 @@
<select id="selectIvrLibaTemplateTargetoptionList" parameterType="com.smartor.domain.IvrLibaTemplateTargetoption"
resultMap="IvrLibaTemplateTargetoptionResult">
<include refid="selectIvrLibaTemplateTargetoptionVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="targetid != null ">and targetid = #{targetid}</if>
<if test="isEnd != null ">and is_end = #{isEnd}</if>
<if test="score != null ">and score = #{score}</if>
@@ -82,7 +83,7 @@
<if test="scriptid != null ">and scriptid = #{scriptid}</if>
<if test="targettype != null and targettype != ''">and targettype = #{targettype}</if>
<if test="categoryName != null and categoryName != ''">and categoryName like concat('%', #{categoryName},
- '%')
+ AND '%')
</if>
<if test="targetvalue != null and targetvalue != ''">and targetvalue = #{targetvalue}</if>
<if test="targetregex != null and targetregex != ''">and targetregex = #{targetregex}</if>
@@ -104,7 +105,7 @@
<if test="optionNo != null">and option_no = #{optionNo}</if>
<if test="sendTaskid != null">and send_taskid= #{sendTaskid}</if>
<if test="sendTaskname != null">and send_taskname = #{sendTaskname}</if>
- </where>
+
</select>
<select id="selectIvrLibaTemplateTargetoptionById" parameterType="Long"
diff --git a/smartor/src/main/resources/mapper/smartor/IvrSceneExecuteconfigMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrSceneExecuteconfigMapper.xml
index 5b25a3e..7f293e0 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrSceneExecuteconfigMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrSceneExecuteconfigMapper.xml
@@ -33,7 +33,8 @@
<select id="selectIvrSceneExecuteconfigList" parameterType="IvrSceneExecuteconfig" resultMap="IvrSceneExecuteconfigResult">
<include refid="selectIvrSceneExecuteconfigVo"/>
- <where>
+ WHERE 1=1
+
<if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
<if test="sourcetype != null "> and sourcetype = #{sourcetype}</if>
<if test="globalid != null "> and globalid = #{globalid}</if>
@@ -47,7 +48,7 @@
<if test="executeconditionscode != null and executeconditionscode != ''"> and executeconditionscode = #{executeconditionscode}</if>
<if test="executeresultcode != null and executeresultcode != ''"> and executeresultcode = #{executeresultcode}</if>
<if test="flownodeid != null "> and flownodeid = #{flownodeid}</if>
- </where>
+
</select>
<select id="selectIvrSceneExecuteconfigByScenecfgid" parameterType="Long" resultMap="IvrSceneExecuteconfigResult">
diff --git a/smartor/src/main/resources/mapper/smartor/IvrSceneFlowMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrSceneFlowMapper.xml
index a71853f..182c422 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrSceneFlowMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrSceneFlowMapper.xml
@@ -33,7 +33,8 @@
<select id="selectIvrSceneFlowList" parameterType="IvrSceneFlow" resultMap="IvrSceneFlowResult">
<include refid="selectIvrSceneFlowVo"/>
- <where>
+ WHERE 1=1
+
<if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
<if test="isupload != null "> and isupload = #{isupload}</if>
<if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
@@ -47,7 +48,7 @@
<if test="sort != null "> and sort = #{sort}</if>
<if test="startnode != null "> and startnode = #{startnode}</if>
<if test="oldid != null "> and oldid = #{oldid}</if>
- </where>
+
</select>
<select id="selectIvrSceneFlowByFlowid" parameterType="Long" resultMap="IvrSceneFlowResult">
diff --git a/smartor/src/main/resources/mapper/smartor/IvrSceneFlownodeMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrSceneFlownodeMapper.xml
index 0299899..d65ddc2 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrSceneFlownodeMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrSceneFlownodeMapper.xml
@@ -37,7 +37,8 @@
<select id="selectIvrSceneFlownodeList" parameterType="IvrSceneFlownode" resultMap="IvrSceneFlownodeResult">
<include refid="selectIvrSceneFlownodeVo"/>
- <where>
+ WHERE 1=1
+
<if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
<if test="isupload != null "> and isupload = #{isupload}</if>
<if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
@@ -55,7 +56,7 @@
<if test="flowcode != null and flowcode != ''"> and flowcode = #{flowcode}</if>
<if test="targetid != null "> and targetid = #{targetid}</if>
<if test="oldid != null "> and oldid = #{oldid}</if>
- </where>
+
</select>
<select id="selectIvrSceneFlownodeByFlownodeid" parameterType="Long" resultMap="IvrSceneFlownodeResult">
diff --git a/smartor/src/main/resources/mapper/smartor/IvrSceneFlownodebranchMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrSceneFlownodebranchMapper.xml
index 7dcdb02..c041642 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrSceneFlownodebranchMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrSceneFlownodebranchMapper.xml
@@ -32,7 +32,8 @@
<select id="selectIvrSceneFlownodebranchList" parameterType="IvrSceneFlownodebranch" resultMap="IvrSceneFlownodebranchResult">
<include refid="selectIvrSceneFlownodebranchVo"/>
- <where>
+ WHERE 1=1
+
<if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
<if test="isupload != null "> and isupload = #{isupload}</if>
<if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
@@ -45,7 +46,7 @@
<if test="nodetype != null "> and nodetype = #{nodetype}</if>
<if test="targetid != null "> and targetid = #{targetid}</if>
<if test="oldid != null "> and oldid = #{oldid}</if>
- </where>
+
</select>
<select id="selectIvrSceneFlownodebranchByBranchid" parameterType="Long" resultMap="IvrSceneFlownodebranchResult">
diff --git a/smartor/src/main/resources/mapper/smartor/IvrSceneGlobalconfigMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrSceneGlobalconfigMapper.xml
index d44f07b..3ea31ab 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrSceneGlobalconfigMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrSceneGlobalconfigMapper.xml
@@ -31,7 +31,8 @@
<select id="selectIvrSceneGlobalconfigList" parameterType="IvrSceneGlobalconfig" resultMap="IvrSceneGlobalconfigResult">
<include refid="selectIvrSceneGlobalconfigVo"/>
- <where>
+ WHERE 1=1
+
<if test="sceneid != null "> and sceneid = #{sceneid}</if>
<if test="configname != null and configname != ''"> and configname like concat('%', #{configname}, '%')</if>
<if test="description != null and description != ''"> and description = #{description}</if>
@@ -43,7 +44,7 @@
<if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
<if test="isupload != null "> and isupload = #{isupload}</if>
<if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
- </where>
+
</select>
<select id="selectIvrSceneGlobalconfigByGblconfigid" parameterType="Long" resultMap="IvrSceneGlobalconfigResult">
diff --git a/smartor/src/main/resources/mapper/smartor/IvrSceneIntentMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrSceneIntentMapper.xml
index 13d6937..ad6a4e1 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrSceneIntentMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrSceneIntentMapper.xml
@@ -63,7 +63,8 @@
<select id="selectIvrSceneIntentList" parameterType="IvrSceneIntent" resultMap="IvrSceneIntentResult">
<include refid="selectIvrSceneIntentVo"/>
- <where>
+ WHERE 1=1
+
<if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
<if test="sourcetype != null ">and sourcetype = #{sourcetype}</if>
<if test="gbiconfigid != null ">and gbiconfigid = #{gbiconfigid}</if>
@@ -80,13 +81,13 @@
<if test="verifyrule != null and verifyrule != ''">and verifyrule = #{verifyrule}</if>
<if test="orand != null ">and orand = #{orand}</if>
<if test="parentresultconditionsid != null and parentresultconditionsid != ''">and parentresultconditionsid
- = #{parentresultconditionsid}
+ AND = #{parentresultconditionsid}
</if>
<if test="groupnumber != null ">and groupnumber = #{groupnumber}</if>
<if test="grouporand != null ">and grouporand = #{grouporand}</if>
<if test="isupload != null ">and isupload = #{isupload}</if>
<if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
- </where>
+
</select>
<select id="selectIvrSceneIntentBySceneintentid" parameterType="Long" resultMap="IvrSceneIntentResult">
diff --git a/smartor/src/main/resources/mapper/smartor/IvrSceneMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrSceneMapper.xml
index 87ff05c..a77e680 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrSceneMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrSceneMapper.xml
@@ -36,7 +36,8 @@
<select id="selectIvrSceneList" parameterType="IvrScene" resultMap="IvrSceneResult">
<include refid="selectIvrSceneVo"/>
- <where>
+ WHERE 1=1
+
<if test="categoryid != null and categoryid != ''"> and categoryid = #{categoryid}</if>
<if test="scenename != null and scenename != ''"> and scenename like concat('%', #{scenename}, '%')</if>
<if test="version != null and version != ''"> and version = #{version}</if>
@@ -53,7 +54,7 @@
<if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
<if test="releasenotes != null and releasenotes != ''"> and releasenotes = #{releasenotes}</if>
<if test="draftid != null "> and draftid = #{draftid}</if>
- </where>
+
</select>
<select id="selectIvrSceneBySceneid" parameterType="Long" resultMap="IvrSceneResult">
diff --git a/smartor/src/main/resources/mapper/smartor/IvrSceneRecallMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrSceneRecallMapper.xml
index 3ad7b9a..fcad437 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrSceneRecallMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrSceneRecallMapper.xml
@@ -28,7 +28,8 @@
<select id="selectIvrSceneRecallList" parameterType="IvrSceneRecall" resultMap="IvrSceneRecallResult">
<include refid="selectIvrSceneRecallVo"/>
- <where>
+ WHERE 1=1
+
<if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
<if test="sceneid != null "> and sceneid = #{sceneid}</if>
<if test="recalltype != null and recalltype != ''"> and recalltype = #{recalltype}</if>
@@ -37,7 +38,7 @@
<if test="recallunit != null "> and recallunit = #{recallunit}</if>
<if test="isupload != null "> and isupload = #{isupload}</if>
<if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
- </where>
+
</select>
<select id="selectIvrSceneRecallByRecallid" parameterType="Long" resultMap="IvrSceneRecallResult">
diff --git a/smartor/src/main/resources/mapper/smartor/IvrSceneScriptMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrSceneScriptMapper.xml
index fd1a8f3..b83d1c1 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrSceneScriptMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrSceneScriptMapper.xml
@@ -32,7 +32,8 @@
<select id="selectIvrSceneScriptList" parameterType="IvrSceneScript" resultMap="IvrSceneScriptResult">
<include refid="selectIvrSceneScriptVo"/>
- <where>
+ WHERE 1=1
+
<if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
<if test="sourcetype != null "> and sourcetype = #{sourcetype}</if>
<if test="globalid != null "> and globalid = #{globalid}</if>
@@ -45,7 +46,7 @@
<if test="speakname != null and speakname != ''"> and speakname like concat('%', #{speakname}, '%')</if>
<if test="isupload != null "> and isupload = #{isupload}</if>
<if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
- </where>
+
</select>
<select id="selectIvrSceneScriptByScenescrid" parameterType="Long" resultMap="IvrSceneScriptResult">
diff --git a/smartor/src/main/resources/mapper/smartor/IvrSceneScriptmodelMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrSceneScriptmodelMapper.xml
index 09f100c..6953698 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrSceneScriptmodelMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrSceneScriptmodelMapper.xml
@@ -35,7 +35,8 @@
<select id="selectIvrSceneScriptmodelList" parameterType="IvrSceneScriptmodel" resultMap="IvrSceneScriptmodelResult">
<include refid="selectIvrSceneScriptmodelVo"/>
- <where>
+ WHERE 1=1
+
<if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
<if test="scenescrid != null "> and scenescrid = #{scenescrid}</if>
<if test="speaktype != null "> and speaktype = #{speaktype}</if>
@@ -51,7 +52,7 @@
<if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
<if test="speakvariable != null and speakvariable != ''"> and speakvariable = #{speakvariable}</if>
<if test="sceneid != null "> and sceneid = #{sceneid}</if>
- </where>
+
</select>
<select id="selectIvrSceneScriptmodelByScenemodid" parameterType="Long" resultMap="IvrSceneScriptmodelResult">
diff --git a/smartor/src/main/resources/mapper/smartor/IvrScenecategoryMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrScenecategoryMapper.xml
index 95ecb36..8b612eb 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrScenecategoryMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrScenecategoryMapper.xml
@@ -24,12 +24,13 @@
<select id="selectIvrScenecategoryList" parameterType="IvrScenecategory" resultMap="IvrScenecategoryResult">
<include refid="selectIvrScenecategoryVo"/>
- <where>
+ WHERE 1=1
+
<if test="categoryname != null and categoryname != ''"> and categoryname like concat('%', #{categoryname}, '%')</if>
<if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
<if test="isupload != null "> and isupload = #{isupload}</if>
<if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
- </where>
+
</select>
<select id="selectIvrScenecategoryByScenecatid" parameterType="Long" resultMap="IvrScenecategoryResult">
diff --git a/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateMapper.xml
index 554cc72..84d1879 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateMapper.xml
@@ -91,8 +91,9 @@
<select id="selectIvrTaskTemplateList" parameterType="com.smartor.domain.IvrTaskTemplate"
resultMap="IvrTaskTemplateResult">
<include refid="selectIvrTaskTemplateVo"/>
- <where>
- del_flag = 0
+ WHERE 1=1
+
+ AND del_flag = 0
<if test="taskid != null ">and taskid = #{taskid}</if>
<if test="sendDay != null ">and send_day = #{sendDay}</if>
<if test="id != null ">and id = #{id}</if>
@@ -100,7 +101,7 @@
<if test="targetid != null ">and targetid = #{targetid}</if>
<if test="targetname != null and targetname != ''">and targetname like concat('%', #{targetname}, '%')</if>
<if test="templateName != null and templateName != ''">and templateName like concat('%', #{templateName},
- '%')
+ AND '%')
</if>
<if test="silencetime != null ">and silencetime = #{silencetime}</if>
<if test="recallcount != null ">and recallcount = #{recallcount}</if>
@@ -150,7 +151,7 @@
<if test="recallcount != null">and recallcount = #{prologrecallcountue}</if>
<if test="deptCode != null">and dept_code = #{deptCode}</if>
<if test="longTemp != null">and long_temp = #{longTemp}</if>
- </where>
+
</select>
<select id="selectIvrTaskTemplateByID" parameterType="Long" resultMap="IvrTaskTemplateResult">
diff --git a/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateScriptMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateScriptMapper.xml
index 7db4ec5..c69fd7d 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateScriptMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateScriptMapper.xml
@@ -82,8 +82,9 @@
<select id="selectIvrTaskTemplateScriptList" parameterType="com.smartor.domain.IvrTaskTemplateScript"
resultMap="IvrTaskTemplateScriptResult">
<include refid="selectIvrTaskTemplateScriptVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="taskid != null ">and taskid = #{taskid}</if>
<if test="assortid != null ">and assortid = #{assortid}</if>
<if test="score != null ">and score = #{score}</if>
@@ -101,7 +102,7 @@
<if test="noClearlyText != null and noClearlyText != ''">and noClearlyText = #{noClearlyText}</if>
<if test="noClearlyVoice != null and noClearlyVoice != ''">and noClearlyVoice = #{noClearlyVoice}</if>
<if test="categoryName != null and categoryName != ''">and categoryName like concat('%', #{categoryName},
- '%')
+ AND '%')
</if>
<if test="targetOptions != null and targetOptions != ''">and targetOptions = #{targetOptions}</if>
<if test="language != null and language != ''">and language = #{language}</if>
@@ -125,7 +126,7 @@
<if test="branchNextscriptno != null and branchNextscriptno != ''">and branch_nextscriptno =
#{branchNextscriptno}
</if>
- </where>
+
</select>
<select id="selectIvrTaskTemplateScriptByID" parameterType="Long" resultMap="IvrTaskTemplateScriptResult">
diff --git a/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateTargetoptionMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateTargetoptionMapper.xml
index 2dca21e..4a7df20 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateTargetoptionMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateTargetoptionMapper.xml
@@ -71,7 +71,8 @@
<select id="selectIvrTaskTemplateTargetoptionList" parameterType="com.smartor.domain.IvrTaskTemplateTargetoption"
resultMap="IvrTaskTemplateTargetoptionResult">
<include refid="selectIvrTaskTemplateTargetoptionVo"/>
- <where>
+ WHERE 1=1
+
<if test="taskid != null ">and taskid = #{taskid}</if>
<if test="isEnd != null ">and is_end = #{isEnd}</if>
<if test="templateID != null ">and templateID = #{templateID}</if>
@@ -79,7 +80,7 @@
<if test="targetname != null and targetname != ''">and targetname like concat('%', #{targetname}, '%')</if>
<if test="targettype != null and targettype != ''">and targettype = #{targettype}</if>
<if test="categoryName != null and categoryName != ''">and categoryName like concat('%', #{categoryName},
- '%')
+ AND '%')
</if>
<if test="targetvalue != null and targetvalue != ''">and targetvalue = #{targetvalue}</if>
<if test="targetregex2 != null and targetregex2 != ''">and targetregex2 = #{targetregex2}</if>
@@ -108,7 +109,7 @@
<if test="score != null ">and score = #{score}</if>
<if test="sendTaskid != null">and send_taskid= #{sendTaskid}</if>
<if test="sendTaskname != null">and send_taskname = #{sendTaskname}</if>
- </where>
+
</select>
<select id="selectIvrTaskTemplateTargetoptionById" parameterType="Long"
diff --git a/smartor/src/main/resources/mapper/smartor/IvrTaskVisitResultMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrTaskVisitResultMapper.xml
index 5a727c0..689b33f 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrTaskVisitResultMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrTaskVisitResultMapper.xml
@@ -60,7 +60,8 @@
<select id="selectIvrTaskVisitResultList" parameterType="com.smartor.domain.IvrTaskVisitResult"
resultMap="IvrTaskVisitResultResult">
<include refid="selectIvrTaskVisitResultVo"/>
- <where>
+ WHERE 1=1
+
<if test="sendname != null and sendname != ''">and sendname like concat('%', #{sendname}, '%')</if>
<if test="phone != null and phone != ''">and phone = #{phone}</if>
<if test="sex != null and sex != ''">and sex = #{sex}</if>
@@ -70,7 +71,7 @@
<if test="taskid != null ">and taskid = #{taskid}</if>
<if test="templateid != null and templateid != ''">and templateid = #{templateid}</if>
<if test="templatename != null and templatename != ''">and templatename like concat('%', #{templatename},
- '%')
+ AND '%')
</if>
<if test="senddate != null ">and senddate = #{senddate}</if>
<if test="userid != null and userid != ''">and userid = #{userid}</if>
@@ -79,7 +80,7 @@
<if test="patientAnswer != null and patientAnswer != ''">and patient_answer = #{patientAnswer}</if>
<if test="optionResult != null and optionResult != ''">and option_result = #{optionResult}</if>
<if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
- </where>
+
</select>
<select id="selectIvrTaskVisitResultById" parameterType="Long" resultMap="IvrTaskVisitResultResult">
diff --git a/smartor/src/main/resources/mapper/smartor/IvrTaskcallrecordMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrTaskcallrecordMapper.xml
index 498153d..606e90d 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrTaskcallrecordMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrTaskcallrecordMapper.xml
@@ -84,7 +84,8 @@
<select id="selectIvrTaskcallrecordList" parameterType="com.smartor.domain.IvrTaskcallrecord"
resultMap="IvrTaskcallrecordResult">
<include refid="selectIvrTaskcallrecordVo"/>
- <where>
+ WHERE 1=1
+
<if test="displayno != null and displayno != ''">and displayno = #{displayno}</if>
<if test="phone != null and phone != ''">and phone = #{phone}</if>
<if test="taskid != null and taskid != ''">and taskid = #{taskid}</if>
@@ -113,7 +114,7 @@
<if test="isupload != null ">and isupload = #{isupload}</if>
<if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
<if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
- </where>
+
</select>
<select id="selectIvrTaskcallrecordByUuid" parameterType="String" resultMap="IvrTaskcallrecordResult">
diff --git a/smartor/src/main/resources/mapper/smartor/IvrTasksmsMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrTasksmsMapper.xml
index a8681cf..266b53d 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrTasksmsMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrTasksmsMapper.xml
@@ -51,7 +51,8 @@
<select id="selectIvrTasksmsList" parameterType="com.smartor.domain.IvrTasksms" resultMap="IvrTasksmsResult">
<include refid="selectIvrTasksmsVo"/>
- <where>
+ WHERE 1=1
+
<if test="taskid != null ">and taskid = #{taskid}</if>
<if test="type != null ">and type = #{type}</if>
<if test="smstemplateid != null ">and smstemplateid = #{smstemplateid}</if>
@@ -68,7 +69,7 @@
<if test="isupload != null ">and isupload = #{isupload}</if>
<if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
<if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
- </where>
+
</select>
<select id="selectIvrTasksmsById" parameterType="Long" resultMap="IvrTasksmsResult">
diff --git a/smartor/src/main/resources/mapper/smartor/MedicalHistoryMapper.xml b/smartor/src/main/resources/mapper/smartor/MedicalHistoryMapper.xml
index 2527ff8..4207024 100644
--- a/smartor/src/main/resources/mapper/smartor/MedicalHistoryMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/MedicalHistoryMapper.xml
@@ -28,7 +28,8 @@
<select id="selectMedicalHistoryList" parameterType="com.smartor.domain.MedicalHistory" resultMap="MedicalHistoryResult">
<include refid="selectMedicalHistoryVo"/>
- <where>
+ WHERE 1=1
+
<if test="pastIllnesses != null and pastIllnesses != ''"> and past_illnesses = #{pastIllnesses}</if>
<if test="drugAllergy != null and drugAllergy != ''"> and drug_allergy = #{drugAllergy}</if>
<if test="familyHistory != null and familyHistory != ''"> and family_history = #{familyHistory}</if>
@@ -42,7 +43,7 @@
<if test="psychology != null and psychology != ''"> and psychology = #{psychology}</if>
<if test="pid != null "> and pid = #{pid}</if>
<if test="orgid != null "> and orgid = #{orgid}</if>
- </where>
+
</select>
<select id="selectMedicalHistoryById" parameterType="Long" resultMap="MedicalHistoryResult">
diff --git a/smartor/src/main/resources/mapper/smartor/MinioFileMapper.xml b/smartor/src/main/resources/mapper/smartor/MinioFileMapper.xml
index 3de25fe..4740285 100644
--- a/smartor/src/main/resources/mapper/smartor/MinioFileMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/MinioFileMapper.xml
@@ -41,12 +41,13 @@
<select id="selectMinioFileList" parameterType="com.smartor.domain.MinioFile" resultMap="MinioFileResult">
<include refid="selectMinioFileVo"/>
- <where>
+ WHERE 1=1
+
<if test="originalFileName != null and originalFileName != ''">and original_file_name like concat('%',
#{originalFileName}, '%')
</if>
<if test="fileExtName != null and fileExtName != ''">and file_ext_name like concat('%', #{fileExtName},
- '%')
+ AND '%')
</if>
<if test="fileSize != null ">and file_size = #{fileSize}</if>
<if test="orgid != null ">and orgid = #{orgid}</if>
@@ -54,7 +55,7 @@
<if test="mime != null and mime != ''">and mime = #{mime}</if>
<if test="fileUrl != null and fileUrl != ''">and file_url = #{fileUrl}</if>
<if test="isDelete != null ">and is_delete = #{isDelete}</if>
- </where>
+
</select>
<select id="selectMinioFileById" parameterType="Long" resultMap="MinioFileResult">
diff --git a/smartor/src/main/resources/mapper/smartor/PatArchiveImportMapper.xml b/smartor/src/main/resources/mapper/smartor/PatArchiveImportMapper.xml
index a6155e6..29c046d 100644
--- a/smartor/src/main/resources/mapper/smartor/PatArchiveImportMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatArchiveImportMapper.xml
@@ -54,8 +54,9 @@
<select id="selectPatArchiveImportList" parameterType="com.smartor.domain.PatArchiveImport"
resultMap="PatArchiveImportResult">
<include refid="selectPatArchiveImportVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="patientno != null and patientno != ''">
and patientno = #{patientno}
</if>
@@ -89,7 +90,7 @@
<if test="batchNo != null and batchNo != ''">
and batch_no = #{batchNo}
</if>
- </where>
+
ORDER BY create_time desc
</select>
diff --git a/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml b/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
index d10139b..4d78dc0 100644
--- a/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
@@ -180,8 +180,9 @@
<select id="selectPatArchiveList" parameterType="com.smartor.domain.PatArchive" resultMap="PatArchiveResult">
<include refid="selectPatArchiveVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
<if test="idcardno != null and idcardno != ''">and idcardno = #{idcardno}</if>
<if test="sourcefrom != null ">and sourcefrom = #{sourcefrom}</if>
@@ -212,7 +213,7 @@
<if test="filterDrname != null ">and filter_drname = #{filterDrname}</if>
<if test="filterDrcode != null ">and filter_drcode = #{filterDrcode}</if>
<if test="campusid != null ">and campusid = #{campusid}</if>
- </where>
+
</select>
@@ -250,9 +251,10 @@
a.filter_drcode,
a.case_person_age
from pat_archive a,pat_archivetag b ,base_tag c
- <where>
- a.del_flag=0 and
- a.id = b.patid and b.tagid = c.tagid
+ WHERE 1=1
+
+ AND a.del_flag=0 and
+ AND a.id = b.patid and b.tagid = c.tagid
<if test="filterDrname != null ">and filter_drname = #{filterDrname}</if>
<if test="filterDrcode != null ">and filter_drcode = #{filterDrcode}</if>
<if test="name != null and name != ''">and a.name like concat('%', #{name}, '%')</if>
@@ -264,7 +266,7 @@
#{tagId}
</foreach>
</if>
- </where>
+
</select>
<select id="selectPatArchiveByPatid" parameterType="Long" resultMap="PatArchiveResult">
@@ -513,8 +515,9 @@
FROM
pat_archive a
LEFT JOIN pat_archivetag b ON a.id = b.patid AND b.del_flag = 0
- <where>
- a.del_flag = 0
+ WHERE 1=1
+
+ AND a.del_flag = 0
and a.orgid = #{orgid}
<if test="name != null and name != ''">and a.name like concat('%', #{name}, '%')</if>
<if test="idcardno != null and idcardno != ''">and a.idcardno = #{idcardno}</if>
@@ -528,7 +531,7 @@
#{tagId}
</foreach>
</if>
- </where>
+
order by a.update_time desc
<if test="pn != null and ps != null">limit ${pn},${ps}</if>
@@ -596,8 +599,9 @@
LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag where del_flag=0 GROUP BY patid
) t ON t.patid =
d.patid
- <where>
- d.del_flag != 1
+ WHERE 1=1
+
+ AND d.del_flag != 1
AND a.del_flag != 1
and d.orgid = #{orgid}
<if test="name != null and name != ''">and a.name like concat('%', #{name}, '%')</if>
@@ -637,14 +641,14 @@
<if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size()>0">
AND d.leavehospitaldistrictcode IN
<foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator=","
- close=")">
+ AND close=")">
#{leavehospitaldistrictcode}
</foreach>
</if>
<if test="leaveldeptcodes != null and leaveldeptcodes.size() > 0">
AND d.leaveldeptcode IN
<foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator=","
- close=")">
+ AND close=")">
#{leaveldeptcode}
</foreach>
</if>
@@ -652,14 +656,14 @@
<if test="hospitaldistrictcodes != null and hospitaldistrictcodes.size()>0">
AND d.hospitaldistrictcode IN
<foreach collection="hospitaldistrictcodes" item="hospitaldistrictcode" open="(" separator=","
- close=")">
+ AND close=")">
#{hospitaldistrictcode}
</foreach>
</if>
<if test="deptcodes != null and deptcodes.size() > 0">
AND d.deptcode IN
<foreach collection="deptcodes" item="deptcode" open="(" separator=","
- close=")">
+ AND close=")">
#{deptcode}
</foreach>
</if>
@@ -672,7 +676,7 @@
<if test="isFilter == true">
AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid)
</if>
- </where>
+
-- order by a.update_time desc
<if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if>
@@ -728,8 +732,9 @@
LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag where del_flag=0 GROUP BY patid
) t ON t.patid =
d.patid
- <where>
- d.del_flag != 1
+ WHERE 1=1
+
+ AND d.del_flag != 1
AND a.del_flag != 1
and d.orgid = #{orgid}
<if test="pid != null and pid != ''">and a.id = #{pid}</if>
@@ -766,7 +771,7 @@
<if test="isFilter == true">
AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid)
</if>
- </where>
+
-- order by a.update_time desc
<if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if>
</select>
@@ -822,8 +827,9 @@
LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag where del_flag=0 GROUP BY patid
) t ON t.patid =
d.patid
- <where>
- d.del_flag != 1
+ WHERE 1=1
+
+ AND d.del_flag != 1
AND a.del_flag != 1
and d.orgid = #{orgid}
<if test="pid != null and pid != ''">and a.id = #{pid}</if>
@@ -861,7 +867,7 @@
<if test="isFilter == true">
AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid)
</if>
- </where>
+
-- order by a.update_time desc
<if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if>
</select>
@@ -930,8 +936,9 @@
LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag where del_flag=0 GROUP BY patid
) t ON t.patid =
d.patid
- <where>
- d.del_flag != 1
+ WHERE 1=1
+
+ AND d.del_flag != 1
AND a.del_flag != 1
and d.orgid = #{orgid}
<if test="name != null and name != ''">and a.name like concat('%', #{name}, '%')</if>
@@ -975,28 +982,28 @@
<if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size()>0">
AND d.leavehospitaldistrictcode IN
<foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator=","
- close=")">
+ AND close=")">
#{leavehospitaldistrictcode}
</foreach>
</if>
<if test="leaveldeptcodes != null and leaveldeptcodes.size() > 0">
AND d.leaveldeptcode IN
<foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator=","
- close=")">
+ AND close=")">
#{leaveldeptcode}
</foreach>
</if>
<if test="hospitaldistrictcodes != null and hospitaldistrictcodes.size()>0">
AND d.hospitaldistrictcode IN
<foreach collection="hospitaldistrictcodes" item="hospitaldistrictcode" open="(" separator=","
- close=")">
+ AND close=")">
#{hospitaldistrictcode}
</foreach>
</if>
<if test="deptcodes != null and deptcodes.size() > 0">
AND d.deptcode IN
<foreach collection="deptcodes" item="deptcode" open="(" separator=","
- close=")">
+ AND close=")">
#{deptcode}
</foreach>
</if>
@@ -1010,7 +1017,7 @@
<if test="isFilter == true">
AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid)
</if>
- </where>
+
<if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if>
) as tmp
</select>
@@ -1066,8 +1073,9 @@
LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag where del_flag=0 GROUP BY patid
) t ON t.patid =
d.patid
- <where>
- d.del_flag != 1
+ WHERE 1=1
+
+ AND d.del_flag != 1
AND a.del_flag != 1
and d.orgid = #{orgid}
<if test="pid != null and pid != ''">and a.id = #{pid}</if>
@@ -1107,7 +1115,7 @@
<if test="isFilter == true">
AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid)
</if>
- </where>
+
<if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if>
</select>
@@ -1162,8 +1170,9 @@
LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag where del_flag=0 GROUP BY patid
) t ON t.patid =
d.patid
- <where>
- d.del_flag != 1
+ WHERE 1=1
+
+ AND d.del_flag != 1
AND a.del_flag != 1
and d.orgid = #{orgid}
<if test="pid != null and pid != ''">and a.id = #{pid}</if>
@@ -1201,7 +1210,7 @@
<if test="isFilter == true">
AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid)
</if>
- </where>
+
-- order by a.update_time desc
<if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if>
</select>
diff --git a/smartor/src/main/resources/mapper/smartor/PatArchiveOutMapper.xml b/smartor/src/main/resources/mapper/smartor/PatArchiveOutMapper.xml
index ea37b26..705f198 100644
--- a/smartor/src/main/resources/mapper/smartor/PatArchiveOutMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatArchiveOutMapper.xml
@@ -76,7 +76,8 @@
<select id="selectPatArchiveOutList" parameterType="com.smartor.domain.PatArchiveOut"
resultMap="PatArchiveOutResult">
<include refid="selectPatArchiveOutVo"/>
- <where>
+ WHERE 1=1
+
<if test="patientno != null and patientno != ''">and patientno = #{patientno}</if>
<if test="pattype != null and pattype != ''">and pattype = #{pattype}</if>
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
@@ -104,7 +105,7 @@
<if test="pid != null ">and pid = #{pid}</if>
<if test="guid != null and guid != ''">and guid = #{guid}</if>
<if test="membertype != null and membertype != ''">and membertype = #{membertype}</if>
- </where>
+
</select>
<select id="selectPatArchiveOutByPatid" parameterType="Long" resultMap="PatArchiveOutResult">
@@ -116,8 +117,9 @@
select aa.name1 as name, aa.count as count
from (
SELECT "浣忛櫌" as name1, count(1) as count FROM `pat_med_inhosp`
- <where>
- del_flag = 0 and endtime = null
+ WHERE 1=1
+
+ AND del_flag = 0 and endtime = null
<if test="deptIds != null ">and deptId in
<foreach collection="deptIds" item="deptId" open="(" separator="," close=")">
#{deptId}
@@ -128,11 +130,12 @@
#{drCode}
</foreach>
</if>
- </where>
+
union
select "鍑洪櫌" name1, count(1) as count FROM `pat_med_inhosp`
- <where>
- del_flag=0 and endtime != null
+ WHERE 1=1
+
+ AND del_flag=0 and endtime != null
<if test="deptIds != null ">and deptId in
<foreach collection="deptIds" item="deptId" open="(" separator="," close=")">
#{deptId}
@@ -143,7 +146,7 @@
#{drCode}
</foreach>
</if>
- </where>
+
union
select "闂ㄨ瘖" name1, count(1) as count FROM `pat_med_outhosp`
where del_flag=0
diff --git a/smartor/src/main/resources/mapper/smartor/PatArchivecontactMapper.xml b/smartor/src/main/resources/mapper/smartor/PatArchivecontactMapper.xml
index e2d6121..dbc1a6c 100644
--- a/smartor/src/main/resources/mapper/smartor/PatArchivecontactMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatArchivecontactMapper.xml
@@ -48,8 +48,9 @@
<select id="selectPatArchivecontactList" parameterType="com.smartor.domain.PatArchivecontact"
resultMap="PatArchivecontactResult">
<include refid="selectPatArchivecontactVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="patid != null ">and patid = #{patid}</if>
<if test="contactway != null and contactway != ''">and contactway = #{contactway}</if>
<if test="relation != null ">and relation = #{relation}</if>
@@ -59,11 +60,11 @@
<if test="isupload != null ">and isupload = #{isupload}</if>
<if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
<if test="contactname != null and contactname != ''">and contactname like concat('%', #{contactname},
- '%')
+ AND '%')
</if>
<if test="pid != null ">and pid = #{pid}</if>
<if test="guid != null and guid != ''">and guid = #{guid}</if>
- </where>
+
</select>
<select id="selectPatArchivecontactById" parameterType="Long" resultMap="PatArchivecontactResult">
diff --git a/smartor/src/main/resources/mapper/smartor/PatArchivetagMapper.xml b/smartor/src/main/resources/mapper/smartor/PatArchivetagMapper.xml
index 9dcda39..099904b 100644
--- a/smartor/src/main/resources/mapper/smartor/PatArchivetagMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatArchivetagMapper.xml
@@ -56,15 +56,16 @@
a.patid,
b.tagname
from pat_archivetag a ,base_tag b
- <where>
- a.tagid=b.tagid
+ WHERE 1=1
+
+ AND a.tagid=b.tagid
<if test="tagcategoryid != null ">and a.tagcategoryid = #{tagcategoryid}</if>
<if test="tagid != null ">and a.tagid = #{tagid}</if>
<if test="orgid != null and orgid != ''">and a.orgid = #{orgid}</if>
<if test="isupload != null ">and a.isupload = #{isupload}</if>
<if test="uploadTime != null ">and a.upload_time = #{uploadTime}</if>
<if test="patid != null ">and a.patid = #{patid}</if>
- </where>
+
</select>
<select id="selectPatArchivetagById" parameterType="Long" resultMap="PatArchivetagResult">
@@ -132,10 +133,11 @@
<trim prefix="SET" suffixOverrides=",">
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
</trim>
- <where>
+ WHERE 1=1
+
<if test="tagid != null">and tagid = #{tagid}</if>
<if test="patid != null">and patid = #{patid}</if>
- </where>
+
</delete>
<delete id="deletePatArchivetagByIds" parameterType="String">
diff --git a/smartor/src/main/resources/mapper/smartor/PatFilterlistMapper.xml b/smartor/src/main/resources/mapper/smartor/PatFilterlistMapper.xml
index ee8d89d..2414842 100644
--- a/smartor/src/main/resources/mapper/smartor/PatFilterlistMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatFilterlistMapper.xml
@@ -33,7 +33,8 @@
<select id="selectPatFilterlistList" parameterType="com.smartor.domain.PatFilterlist" resultMap="PatFilterlistResult">
<include refid="selectPatFilterlistVo"/>
- <where>
+ WHERE 1=1
+
<if test="patid != null "> and patid = #{patid}</if>
<if test="filtertype != null and filtertype != ''"> and filtertype = #{filtertype}</if>
<if test="filterdesc != null and filterdesc != ''"> and filterdesc = #{filterdesc}</if>
@@ -48,7 +49,7 @@
<if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
<if test="pid != null "> and pid = #{pid}</if>
<if test="guid != null and guid != ''"> and guid = #{guid}</if>
- </where>
+
</select>
<select id="selectPatFilterlistById" parameterType="Long" resultMap="PatFilterlistResult">
diff --git a/smartor/src/main/resources/mapper/smartor/PatHetaskRelevanceMapper.xml b/smartor/src/main/resources/mapper/smartor/PatHetaskRelevanceMapper.xml
index 05ce141..a59471e 100644
--- a/smartor/src/main/resources/mapper/smartor/PatHetaskRelevanceMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatHetaskRelevanceMapper.xml
@@ -58,8 +58,9 @@
<select id="selectPatTaskRelevanceList" parameterType="com.smartor.domain.PatTaskRelevance"
resultMap="PatTaskRelevanceResult">
<include refid="selectPatTaskRelevanceVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="patid != null ">and pat_id = #{patid}</if>
<if test="orgid != null ">and orgid = #{orgid}</if>
<if test="taskId != null ">and task_id = #{taskId}</if>
@@ -77,7 +78,7 @@
<if test="visitTime != null ">and visit_time = #{visitTime}</if>
<if test="receiveTime != null ">and receive_time = #{receiveTime}</if>
<if test="operatePerson != null and operatePerson != ''">and operate_person = #{operatePerson}</if>
- </where>
+
</select>
<select id="selectPatTaskRelevanceById" parameterType="Long" resultMap="PatTaskRelevanceResult">
diff --git a/smartor/src/main/resources/mapper/smartor/PatMedBloodsugarMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedBloodsugarMapper.xml
index bf83bc7..e0bf568 100644
--- a/smartor/src/main/resources/mapper/smartor/PatMedBloodsugarMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatMedBloodsugarMapper.xml
@@ -52,7 +52,8 @@
<select id="selectPatMedBloodsugarList" parameterType="com.smartor.domain.PatMedBloodsugar"
resultMap="PatMedBloodsugarResult">
<include refid="selectPatMedBloodsugarVo"/>
- <where>
+ WHERE 1=1
+
<if test="serialnum != null and serialnum != ''">and serialnum = #{serialnum}</if>
<if test="recordtime != null ">and recordtime = #{recordtime}</if>
<if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
@@ -65,7 +66,7 @@
<if test="sugarlevelempty != null ">and sugarlevelempty = #{sugarlevelempty}</if>
<if test="visittype != null ">and visittype = #{visittype}</if>
<if test="visitid != null ">and visitid = #{visitid}</if>
- </where>
+
</select>
<select id="selectPatMedBloodsugarByBloodsugarid" parameterType="Long" resultMap="PatMedBloodsugarResult">
diff --git a/smartor/src/main/resources/mapper/smartor/PatMedDrugMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedDrugMapper.xml
index 8fb6260..fb31b90 100644
--- a/smartor/src/main/resources/mapper/smartor/PatMedDrugMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatMedDrugMapper.xml
@@ -61,7 +61,8 @@
<select id="selectPatMedDrugList" parameterType="com.smartor.domain.PatMedDrug" resultMap="PatMedDrugResult">
<include refid="selectPatMedDrugVo"/>
- <where>
+ WHERE 1=1
+
<if test="serialnum != null and serialnum != ''">and serialnum = #{serialnum}</if>
<if test="patid != null ">and patid = #{patid}</if>
<if test="drugname != null and drugname != ''">and drugname like concat('%', #{drugname}, '%')</if>
@@ -79,7 +80,7 @@
<if test="visitid != null ">and visitid = #{visitid}</if>
<if test="schemestatus != null ">and schemestatus = #{schemestatus}</if>
<if test="schemetime != null ">and schemetime = #{schemetime}</if>
- </where>
+
</select>
<select id="selectPatMedDrugById" parameterType="Long" resultMap="PatMedDrugResult">
diff --git a/smartor/src/main/resources/mapper/smartor/PatMedHypertensionMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedHypertensionMapper.xml
index 2cbe423..ade59f9 100644
--- a/smartor/src/main/resources/mapper/smartor/PatMedHypertensionMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatMedHypertensionMapper.xml
@@ -54,7 +54,8 @@
<select id="selectPatMedHypertensionList" parameterType="com.smartor.domain.PatMedHypertension"
resultMap="PatMedHypertensionResult">
<include refid="selectPatMedHypertensionVo"/>
- <where>
+ WHERE 1=1
+
<if test="serialnum != null and serialnum != ''">and serialnum = #{serialnum}</if>
<if test="recordtime != null ">and recordtime = #{recordtime}</if>
<if test="typename != null and typename != ''">and typename like concat('%', #{typename}, '%')</if>
@@ -68,7 +69,7 @@
<if test="heartrate != null ">and heartrate = #{heartrate}</if>
<if test="visittype != null ">and visittype = #{visittype}</if>
<if test="visitid != null ">and visitid = #{visitid}</if>
- </where>
+
</select>
<select id="selectPatMedHypertensionById" parameterType="Long" resultMap="PatMedHypertensionResult">
diff --git a/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
index 540e215..3f8270b 100644
--- a/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
@@ -214,28 +214,29 @@
pat_archive a ON a.id = b.patid
LEFT JOIN
pat_archivetag c ON c.patid = a.id AND (c.del_flag = 0 OR c.del_flag IS NULL)
- <where>
- a.del_flag = 0
+ WHERE 1=1
+
+ AND a.del_flag = 0
AND b.del_flag = 0
AND a.idcardno IS NOT NULL
<if test="startOutHospTime != null ">and date_format(b.endtime,'%y%m%d') >=
- date_format(#{startOutHospTime},'%y%m%d')
+ AND date_format(#{startOutHospTime},'%y%m%d')
</if>
<if test="endOutHospTime != null ">and date_format(b.endtime,'%y%m%d') <=
- date_format(#{endOutHospTime},'%y%m%d')
+ AND date_format(#{endOutHospTime},'%y%m%d')
</if>
<if test="startInHospTime != null ">and date_format(b.starttime,'%y%m%d') >=
- date_format(#{startInHospTime},'%y%m%d')
+ AND date_format(#{startInHospTime},'%y%m%d')
</if>
<if test="endInHospTime != null ">and date_format(b.starttime,'%y%m%d') <=
- date_format(#{endInHospTime},'%y%m%d')
+ AND date_format(#{endInHospTime},'%y%m%d')
</if>
<if test="hospitalname != null and hospitalname != ''">and hospitalname like concat('%', #{hospitalname},
- '%')
+ AND '%')
</if>
<if test="patname != null and patname != ''">and patname like concat('%', #{patname}, '%')</if>
<if test="hospitaldistrictname != null and hospitaldistrictname != ''">and hospitaldistrictname like
- concat('%', #{hospitaldistrictname}, '%')
+ AND concat('%', #{hospitaldistrictname}, '%')
</if>
<if test="endtime != null ">and b.endtime = #{endtime}</if>
<if test="managementDoctor != null ">and b.management_doctor = #{managementDoctor}</if>
@@ -272,24 +273,24 @@
<if test="patid != null and patid != ''">and a.id =#{patid}
</if>
<if test="leavehospitaldistrictname != null and leavehospitaldistrictname != ''">and
- b.leavehospitaldistrictname like concat('%', #{leavehospitaldistrictname}, '%')
+ AND b.leavehospitaldistrictname like concat('%', #{leavehospitaldistrictname}, '%')
</if>
<if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size()>0">
AND b.leavehospitaldistrictcode IN
<foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator=","
- close=")">
+ AND close=")">
#{leavehospitaldistrictcode}
</foreach>
</if>
<if test="leaveldeptcodes != null and leaveldeptcodes.size()>0">
AND b.leaveldeptcode IN
<foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator=","
- close=")">
+ AND close=")">
#{leaveldeptcode}
</foreach>
</if>
- </where>
+
GROUP BY
b.inhospid,
a.age,
@@ -371,10 +372,11 @@
FROM
pat_med_inhosp b
- <where>
+ WHERE 1=1
+
<if test="serialnum != null ">and b.serialnum = #{serialnum}</if>
- </where>
+
order by b.inhospid desc
</select>
@@ -448,19 +450,20 @@
FROM
pat_med_inhosp b,
pat_archive a
- <where>
- a.del_flag=0
+ WHERE 1=1
+
+ AND a.del_flag=0
and b.del_flag=0
and a.id = b.patid
AND a.idcardno != ''
<if test="hospitalname != null and hospitalname != ''">and hospitalname like concat('%', #{hospitalname},
- '%')
+ AND '%')
</if>
<if test="managementDoctor != null ">and b.management_doctor = #{managementDoctor}</if>
<if test="managementDoctorCode != null ">and b.management_doctor_code = #{managementDoctorCode}</if>
<if test="patname != null and patname != ''">and patname like concat('%', #{patname}, '%')</if>
<if test="hospitaldistrictname != null and hospitaldistrictname != ''">and hospitaldistrictname like
- concat('%', #{hospitaldistrictname}, '%')
+ AND concat('%', #{hospitaldistrictname}, '%')
</if>
<if test="endtime != null ">and b.endtime = #{endtime}</if>
<if test="serialnum != null ">and b.serialnum = #{serialnum}</if>
@@ -481,18 +484,18 @@
<if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size()>0">
AND b.leavehospitaldistrictcode IN
<foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator=","
- close=")">
+ AND close=")">
#{leavehospitaldistrictcode}
</foreach>
</if>
<if test="leaveldeptcodes != null and leaveldeptcodes.size()>0">
AND b.leaveldeptcode IN
<foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator=","
- close=")">
+ AND close=")">
#{leaveldeptcode}
</foreach>
</if>
- </where>
+
order by b.inhospid desc
</select>
@@ -857,15 +860,16 @@
<if test="mz != null">
SELECT deptname
FROM pat_med_outhosp
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="deptcodeList != null and deptcodeList.size() > 0">
and deptcode in
<foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")">
- #{deptcode}
+ #{deptcode}
</foreach>
</if>
- </where>
+
</if>
<if test="mz != null and zy != null">
UNION ALL
@@ -873,46 +877,49 @@
<if test="zy != null">
SELECT deptname
FROM pat_med_inhosp
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
and inhospstate=0
<if test="deptcodeList != null and deptcodeList.size() > 0">
and deptcode in
<foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")">
- #{deptcode}
+ #{deptcode}
</foreach>
</if>
- </where>
+
</if>
<if test="cy != null and zy != null">
UNION ALL
SELECT deptname
FROM pat_med_inhosp
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
and inhospstate=1
<if test="deptcodeList != null and deptcodeList.size() > 0">
and deptcode in
<foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")">
- #{deptcode}
+ #{deptcode}
</foreach>
</if>
- </where>
+
</if>
<if test="mz != null and zy != null and cy==null">
UNION ALL
SELECT deptname
FROM pat_med_inhosp
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
and inhospstate=1
<if test="deptcodeList != null and deptcodeList.size() > 0">
and deptcode in
<foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")">
- #{deptcode}
+ #{deptcode}
</foreach>
</if>
- </where>
+
</if>
) AS combined
GROUP BY deptname;
@@ -934,8 +941,9 @@
0 AS zbsf
FROM
pat_med_inhosp
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="orgid != null">
AND orgid = #{orgid}
</if>
@@ -946,7 +954,7 @@
<if test="deptcodeList != null and deptcodeList.size() > 0">
and deptcode in
<foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")">
- #{deptcode}
+ #{deptcode}
</foreach>
</if>
</if>
@@ -957,11 +965,11 @@
<if test="deptcodeList != null and deptcodeList.size() > 0">
and leaveldeptcode in
<foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")">
- #{deptcode}
+ #{deptcode}
</foreach>
</if>
</if>
- </where>
+
<!-- 闅忚鏈嶅姟浜烘暟 -->
union all
select
@@ -972,8 +980,9 @@
0 AS zbsf
FROM
service_subtask
- <where>
- del_flag = 0
+ WHERE 1=1
+
+ AND del_flag = 0
and service_type=2
<if test="orgid != null">
AND orgid = #{orgid}
@@ -990,7 +999,7 @@
#{deptcode}
</foreach>
</if>
- </where>
+
<!-- 棣栨闅忚浜烘暟 -->
union all
select
@@ -1001,8 +1010,9 @@
0 AS zbsf
FROM
service_subtask
- <where>
- del_flag = 0
+ WHERE 1=1
+
+ AND del_flag = 0
and service_type=2
and is_visit_again = 0
<if test="orgid != null">
@@ -1020,7 +1030,7 @@
#{deptcode}
</foreach>
</if>
- </where>
+
<!-- 鍐嶆闅忚浜烘暟 -->
union all
select
@@ -1031,8 +1041,9 @@
0 AS zbsf
FROM
service_subtask
- <where>
- del_flag = 0
+ WHERE 1=1
+
+ AND del_flag = 0
and service_type=2
and is_visit_again = 1
<if test="orgid != null">
@@ -1050,7 +1061,7 @@
#{deptcode}
</foreach>
</if>
- </where>
+
<!-- 涓撶梾闅忚浜烘暟 -->
union all
select
@@ -1061,8 +1072,9 @@
count(1) AS zbsf
FROM
service_subtask
- <where>
- del_flag = 0
+ WHERE 1=1
+
+ AND del_flag = 0
and service_type=13
<if test="orgid != null">
AND orgid = #{orgid}
@@ -1079,7 +1091,7 @@
#{deptcode}
</foreach>
</if>
- </where>
+
) AS combined_data
</select>
diff --git a/smartor/src/main/resources/mapper/smartor/PatMedInspectionItemMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedInspectionItemMapper.xml
index 14392f7..adee17d 100644
--- a/smartor/src/main/resources/mapper/smartor/PatMedInspectionItemMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatMedInspectionItemMapper.xml
@@ -74,7 +74,8 @@
<select id="selectPatMedInspectionItemList" parameterType="com.smartor.domain.PatMedInspectionItem"
resultMap="PatMedInspectionItemResult">
<include refid="selectPatMedInspectionItemVo"/>
- <where>
+ WHERE 1=1
+
<if test="inspectionid != null and inspectionid != ''">and inspectionid = #{inspectionid}</if>
<if test="inspectionName != null and inspectionName != ''">and inspection_name = #{inspectionName}</if>
<if test="reportid != null and reportid != ''">and reportid = #{reportid}</if>
@@ -104,7 +105,7 @@
<if test="pguid != null and pguid != ''">and pguid = #{pguid}</if>
<if test="guid != null and guid != ''">and guid = #{guid}</if>
<if test="pid != null and pid != ''">and pid = #{pid}</if>
- </where>
+
-- order by update_time desc
</select>
diff --git a/smartor/src/main/resources/mapper/smartor/PatMedInspectionMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedInspectionMapper.xml
index ecab3cc..b006a1a 100644
--- a/smartor/src/main/resources/mapper/smartor/PatMedInspectionMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatMedInspectionMapper.xml
@@ -98,7 +98,8 @@
<select id="selectPatMedInspectionList" parameterType="com.smartor.domain.PatMedInspection"
resultMap="PatMedInspectionResult">
<include refid="selectPatMedInspectionVo"/>
- <where>
+ WHERE 1=1
+
<if test="projecttype != null">and projecttype = #{projecttype}</if>
<if test="inhospno != null">and inhospno = #{inhospno}</if>
<if test="patidHis != null">and patid_his = #{patidHis}</if>
@@ -140,7 +141,7 @@
<if test="pguid != null">and pguid = #{pguid}</if>
<if test="guid != null">and guid = #{guid}</if>
<if test="pid != null">and pid = #{pid}</if>
- </where>
+
-- order by update_time desc
</select>
diff --git a/smartor/src/main/resources/mapper/smartor/PatMedOperationItemMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedOperationItemMapper.xml
index afc4fc1..961aacf 100644
--- a/smartor/src/main/resources/mapper/smartor/PatMedOperationItemMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatMedOperationItemMapper.xml
@@ -37,7 +37,8 @@
<select id="selectPatMedOperationItemList" parameterType="com.smartor.domain.PatMedOperationItem"
resultMap="PatMedOperationItemResult">
<include refid="selectPatMedOperationItemVo"/>
- <where>
+ WHERE 1=1
+
<if test="operationid != null ">
and operationid = #{operationid}
</if>
@@ -86,7 +87,7 @@
<if test="pid != null ">
and pid = #{pid}
</if>
- </where>
+
</select>
<select id="selectPatMedOperationItemById" parameterType="Long"
diff --git a/smartor/src/main/resources/mapper/smartor/PatMedOperationMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedOperationMapper.xml
index aba4680..74e12f5 100644
--- a/smartor/src/main/resources/mapper/smartor/PatMedOperationMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatMedOperationMapper.xml
@@ -156,8 +156,9 @@
<select id="selectPatMedOperationList" parameterType="com.smartor.domain.PatMedOperation"
resultMap="PatMedOperationResult">
<include refid="selectPatMedOperationVo"/>
- <where>
- del_flag='0'
+ WHERE 1=1
+
+ AND del_flag='0'
<if test="patid != null ">
and patid = #{patid}
</if>
@@ -186,10 +187,10 @@
<!-- and operatortime = #{operatortime}-->
<!-- </if>-->
<if test="beginTime != null ">and date_format(operatortime,'%y%m%d') >=
- date_format(#{beginTime},'%y%m%d')
+ AND date_format(#{beginTime},'%y%m%d')
</if>
<if test="endTime != null ">and date_format(operatortime,'%y%m%d') <=
- date_format(#{endTime},'%y%m%d')
+ AND date_format(#{endTime},'%y%m%d')
</if>
<if test="opreqtime != null ">
and opreqtime = #{opreqtime}
@@ -356,7 +357,7 @@
<if test="opleveldesc != null and opleveldesc != ''">
and opleveldesc = #{opleveldesc}
</if>
- </where>
+
</select>
<select id="selectPatMedOperationById" parameterType="Long"
diff --git a/smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml
index 68bc33f..2034557 100644
--- a/smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml
@@ -121,19 +121,20 @@
pmo.patname,
pmo.mainsuit
from pat_med_outhosp pmo
- <where>
- pmo.del_flag=0
+ WHERE 1=1
+
+ AND pmo.del_flag=0
<if test="orgid != null ">and pmo.orgid = #{orgid}</if>
<if test="serialnum != null ">and pmo.serialnum = #{serialnum}</if>
<if test="serverState != null ">and pmo.server_state = #{serverState}</if>
<if test="hospitalname != null and hospitalname != ''">and pmo.hospitalname like concat('%',
#{hospitalname},
- '%')
+ AND '%')
</if>
<if test="deptcodes != null and deptcodes.size()>0">
AND pmo.deptcode IN
<foreach collection="deptcodes" item="deptcode" open="(" separator=","
- close=")">
+ AND close=")">
#{deptcode}
</foreach>
</if>
@@ -141,10 +142,10 @@
<if test="drname != null and drname != ''">and pmo.drname like concat('%', #{drname}, '%')</if>
<if test="patname != null and patname != ''">and pmo.patname like concat('%', #{patname}, '%')</if>
<if test="beginTime != null ">and date_format(pmo.admitdate,'%y%m%d') >=
- date_format(#{beginTime},'%y%m%d')
+ AND date_format(#{beginTime},'%y%m%d')
</if>
<if test="endTime != null ">and date_format(pmo.admitdate,'%y%m%d') <=
- date_format(#{endTime},'%y%m%d')
+ AND date_format(#{endTime},'%y%m%d')
</if>
<if test="patid != null ">and pmo.patid = #{patid}</if>
<if test="campusid != null ">and pmo.campusid = #{campusid}</if>
@@ -153,7 +154,7 @@
<if test="outhospno != null and outhospno != ''">and pmo.outhospno = #{outhospno}</if>
<if test="diagcheckFlag != null and diagcheckFlag != ''">and pmo.diagcheck_flag = #{diagcheckFlag}</if>
<if test="diagname != null and diagname != ''">and pmo.diagname like concat('%',#{diagname}, '%')</if>
- </where>
+
order by pmo.update_time desc
</select>
@@ -460,8 +461,9 @@
0 AS rs
FROM
pat_med_outhosp
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="orgid != null">
and orgid = #{orgid}
</if>
@@ -473,15 +475,16 @@
#{deptcode}
</foreach>
</if>
- </where>
+
union all
select
0 AS rc,
count(1) AS rs
FROM
service_subtask
- <where>
- del_flag = 0
+ WHERE 1=1
+
+ AND del_flag = 0
and service_type=3
<if test="orgid != null">
and orgid = #{orgid}
@@ -498,15 +501,16 @@
#{deptcode}
</foreach>
</if>
- </where>
+
) AS combined_data
</select>
<select id="getDeptRanking" parameterType="com.smartor.domain.PatMedReq" resultType="com.smartor.domain.PatMedRes">
SELECT deptname, COUNT(1) AS rc
FROM pat_med_outhosp
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="inhospstate != null">
and inhospstate= #{inhospstate}
</if>
@@ -519,7 +523,7 @@
#{deptcode}
</foreach>
</if>
- </where>
+
</select>
<!-- PatMedOuthospMapper.xml -->
diff --git a/smartor/src/main/resources/mapper/smartor/PatMedOuthospProvisionalMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedOuthospProvisionalMapper.xml
index c2d0e9c..c696836 100644
--- a/smartor/src/main/resources/mapper/smartor/PatMedOuthospProvisionalMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatMedOuthospProvisionalMapper.xml
@@ -53,8 +53,9 @@
<select id="selectPatMedOuthospProvisionalList" parameterType="com.smartor.domain.PatMedOuthospProvisional"
resultMap="PatMedOuthospProvisionalResult">
<include refid="selectPatMedOuthospProvisionalVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="outhospno != null and outhospno != ''">
and outhospno = #{outhospno}
</if>
@@ -148,7 +149,7 @@
<if test="campusid != null and campusid != ''">
and campusid = #{campusid}
</if>
- </where>
+
</select>
<select id="selectPatMedOuthospProvisionalById" parameterType="Long"
diff --git a/smartor/src/main/resources/mapper/smartor/PatMedPhysicalMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedPhysicalMapper.xml
index 2969c66..9df3e5a 100644
--- a/smartor/src/main/resources/mapper/smartor/PatMedPhysicalMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatMedPhysicalMapper.xml
@@ -42,7 +42,8 @@
<select id="selectPatMedPhysicalList" parameterType="com.smartor.domain.PatMedPhysical" resultMap="PatMedPhysicalResult">
<include refid="selectPatMedPhysicalVo"/>
- <where>
+ WHERE 1=1
+
<if test="hospitalname != null and hospitalname != ''"> and hospitalname like concat('%', #{hospitalname}, '%')</if>
<if test="physicaldate != null "> and physicaldate = #{physicaldate}</if>
<if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
@@ -50,7 +51,7 @@
<if test="deptname != null and deptname != ''"> and deptname like concat('%', #{deptname}, '%')</if>
<if test="patname != null and patname != ''"> and patname like concat('%', #{patname}, '%')</if>
<if test="projectname != null and projectname != ''"> and projectname like concat('%', #{projectname}, '%')</if>
- </where>
+
</select>
<select id="selectPatMedPhysicalById" parameterType="Long" resultMap="PatMedPhysicalResult">
diff --git a/smartor/src/main/resources/mapper/smartor/PatMedRegistrationMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedRegistrationMapper.xml
index 97ab1e8..3e6275a 100644
--- a/smartor/src/main/resources/mapper/smartor/PatMedRegistrationMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatMedRegistrationMapper.xml
@@ -62,11 +62,12 @@
<select id="selectPatMedRegistrationList" parameterType="com.smartor.domain.PatMedRegistration"
resultMap="PatMedRegistrationResult">
<include refid="selectPatMedRegistrationVo"/>
- <where>
+ WHERE 1=1
+
<if test="serialnum != null and serialnum != ''">and serialnum = #{serialnum}</if>
<if test="patid != null ">and patid = #{patid}</if>
<if test="hospitalname != null and hospitalname != ''">and hospitalname like concat('%', #{hospitalname},
- '%')
+ AND '%')
</if>
<if test="hospitalcode != null and hospitalcode != ''">and hospitalcode = #{hospitalcode}</if>
<if test="deptcode != null and deptcode != ''">and deptcode = #{deptcode}</if>
@@ -83,7 +84,7 @@
<if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
<if test="pid != null ">and pid = #{pid}</if>
<if test="guid != null and guid != ''">and guid = #{guid}</if>
- </where>
+
order by create_time desc
</select>
diff --git a/smartor/src/main/resources/mapper/smartor/PatMedWeightMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedWeightMapper.xml
index eb5be69..8457aba 100644
--- a/smartor/src/main/resources/mapper/smartor/PatMedWeightMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatMedWeightMapper.xml
@@ -31,7 +31,8 @@
<select id="selectPatMedWeightList" parameterType="com.smartor.domain.PatMedWeight" resultMap="PatMedWeightResult">
<include refid="selectPatMedWeightVo"/>
- <where>
+ WHERE 1=1
+
<if test="serialnum != null and serialnum != ''"> and serialnum = #{serialnum}</if>
<if test="fatweight != null "> and fatweight = #{fatweight}</if>
<if test="bodyweight != null "> and bodyweight = #{bodyweight}</if>
@@ -43,7 +44,7 @@
<if test="sourcename != null and sourcename != ''"> and sourcename like concat('%', #{sourcename}, '%')</if>
<if test="visittype != null "> and visittype = #{visittype}</if>
<if test="visitid != null "> and visitid = #{visitid}</if>
- </where>
+
</select>
<select id="selectPatMedWeightById" parameterType="Long" resultMap="PatMedWeightResult">
diff --git a/smartor/src/main/resources/mapper/smartor/PatSatisfactionMapper.xml b/smartor/src/main/resources/mapper/smartor/PatSatisfactionMapper.xml
index 6619965..9761ccd 100644
--- a/smartor/src/main/resources/mapper/smartor/PatSatisfactionMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatSatisfactionMapper.xml
@@ -58,8 +58,9 @@
<select id="selectPatSatisfactionList" parameterType="com.smartor.domain.PatSatisfaction"
resultMap="PatSatisfactionResult">
<include refid="selectPatSatisfactionVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="patName != null and patName != ''">
and pat_name like concat('%', #{patName}, '%')
</if>
@@ -114,7 +115,7 @@
<if test="endTime != null">
AND date_format(update_time,'%y%m%d') <= date_format(#{endTime},'%y%m%d')
</if>
- </where>
+
</select>
<select id="selectPatSatisfactionById" parameterType="Long"
diff --git a/smartor/src/main/resources/mapper/smartor/PatSpeciallistCategoryMapper.xml b/smartor/src/main/resources/mapper/smartor/PatSpeciallistCategoryMapper.xml
index 21a55c1..fa08823 100644
--- a/smartor/src/main/resources/mapper/smartor/PatSpeciallistCategoryMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatSpeciallistCategoryMapper.xml
@@ -36,13 +36,14 @@
<select id="selectPatSpeciallistCategoryList" parameterType="com.smartor.domain.PatSpeciallistCategory"
resultMap="PatSpeciallistCategoryResult">
<include refid="selectPatSpeciallistCategoryVo"/>
- <where>
+ WHERE 1=1
+
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
<if test="seqno != null ">and seqno = #{seqno}</if>
<if test="pid != null ">and pid = #{pid}</if>
<if test="guid != null and guid != ''">and guid = #{guid}</if>
<if test="orgid != null ">and orgid = #{orgid}</if>
- </where>
+
</select>
<select id="selectPatSpeciallistCategoryById" parameterType="Long" resultMap="PatSpeciallistCategoryResult">
diff --git a/smartor/src/main/resources/mapper/smartor/PatSpeciallistMapper.xml b/smartor/src/main/resources/mapper/smartor/PatSpeciallistMapper.xml
index 187b28d..066e778 100644
--- a/smartor/src/main/resources/mapper/smartor/PatSpeciallistMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatSpeciallistMapper.xml
@@ -33,7 +33,8 @@
<select id="selectPatSpeciallistList" parameterType="com.smartor.domain.PatSpeciallist" resultMap="PatSpeciallistResult">
<include refid="selectPatSpeciallistVo"/>
- <where>
+ WHERE 1=1
+
<if test="patid != null "> and patid = #{patid}</if>
<if test="sdtype != null and sdtype != ''"> and sdtype = #{sdtype}</if>
<if test="sddesc != null and sddesc != ''"> and sddesc = #{sddesc}</if>
@@ -48,7 +49,7 @@
<if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
<if test="pid != null "> and pid = #{pid}</if>
<if test="guid != null and guid != ''"> and guid = #{guid}</if>
- </where>
+
</select>
<select id="selectPatSpeciallistById" parameterType="Long" resultMap="PatSpeciallistResult">
diff --git a/smartor/src/main/resources/mapper/smartor/PatWildcardMapper.xml b/smartor/src/main/resources/mapper/smartor/PatWildcardMapper.xml
index 1e55fde..eec1313 100644
--- a/smartor/src/main/resources/mapper/smartor/PatWildcardMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatWildcardMapper.xml
@@ -33,10 +33,11 @@
<select id="selectPatWildcardList" parameterType="com.smartor.domain.PatWildcard" resultMap="PatWildcardResult">
<include refid="selectPatWildcardVo"/>
- <where>
+ WHERE 1=1
+
<if test="wildcard != null and wildcard != ''">and wildcard = #{wildcard}</if>
<if test="patField != null and patField != ''">and pat_field = #{patField}</if>
- </where>
+
</select>
<select id="selectPatWildcardById" parameterType="Long" resultMap="PatWildcardResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SchemeAutofinshruleMapper.xml b/smartor/src/main/resources/mapper/smartor/SchemeAutofinshruleMapper.xml
index e321ebe..33d6114 100644
--- a/smartor/src/main/resources/mapper/smartor/SchemeAutofinshruleMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SchemeAutofinshruleMapper.xml
@@ -40,12 +40,13 @@
<select id="selectSchemeAutofinshruleList" parameterType="SchemeAutofinshrule"
resultMap="SchemeAutofinshruleResult">
<include refid="selectSchemeAutofinshruleVo"/>
- <where>
+ WHERE 1=1
+
<if test="schemeid != null ">and schemeid = #{schemeid}</if>
<if test="ruletype != null ">and ruletype = #{ruletype}</if>
<if test="rulevalue != null and rulevalue != ''">and rulevalue = #{rulevalue}</if>
<if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
- </where>
+
</select>
<select id="selectSchemeAutofinshruleById" parameterType="Long" resultMap="SchemeAutofinshruleResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SchemeCategoryMapper.xml b/smartor/src/main/resources/mapper/smartor/SchemeCategoryMapper.xml
index 36bbd99..19359ea 100644
--- a/smartor/src/main/resources/mapper/smartor/SchemeCategoryMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SchemeCategoryMapper.xml
@@ -25,11 +25,12 @@
<select id="selectSchemeCategoryList" parameterType="SchemeCategory" resultMap="SchemeCategoryResult">
<include refid="selectSchemeCategoryVo"/>
- <where>
+ WHERE 1=1
+
<if test="categoryname != null and categoryname != ''"> and categoryname like concat('%', #{categoryname}, '%')</if>
<if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
<if test="iscurrency != null "> and iscurrency = #{iscurrency}</if>
- </where>
+
</select>
<select id="selectSchemeCategoryById" parameterType="Long" resultMap="SchemeCategoryResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SchemeLocallibraryMapper.xml b/smartor/src/main/resources/mapper/smartor/SchemeLocallibraryMapper.xml
index f0d043c..008622b 100644
--- a/smartor/src/main/resources/mapper/smartor/SchemeLocallibraryMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SchemeLocallibraryMapper.xml
@@ -47,7 +47,8 @@
<select id="selectSchemeLocallibraryList" parameterType="SchemeLocallibrary" resultMap="SchemeLocallibraryResult">
<include refid="selectSchemeLocallibraryVo"/>
- <where>
+ WHERE 1=1
+
<if test="schemecategoryid != null "> and schemecategoryid = #{schemecategoryid}</if>
<if test="schemename != null and schemename != ''"> and schemename like concat('%', #{schemename}, '%')</if>
<if test="description != null and description != ''"> and description = #{description}</if>
@@ -75,7 +76,7 @@
<if test="centerlibrarycode != null and centerlibrarycode != ''"> and centerlibrarycode = #{centerlibrarycode}</if>
<if test="islocal != null "> and islocal = #{islocal}</if>
<if test="iscurrency != null "> and iscurrency = #{iscurrency}</if>
- </where>
+
</select>
<select id="selectSchemeLocallibraryById" parameterType="Long" resultMap="SchemeLocallibraryResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SchemePlanMapper.xml b/smartor/src/main/resources/mapper/smartor/SchemePlanMapper.xml
index d4f5fad..202fdcd 100644
--- a/smartor/src/main/resources/mapper/smartor/SchemePlanMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SchemePlanMapper.xml
@@ -37,7 +37,8 @@
<select id="selectSchemePlanList" parameterType="SchemePlan" resultMap="SchemePlanResult">
<include refid="selectSchemePlanVo"/>
- <where>
+ WHERE 1=1
+
<if test="schemeid != null "> and schemeid = #{schemeid}</if>
<if test="schemecode != null and schemecode != ''"> and schemecode = #{schemecode}</if>
<if test="patientid != null "> and patientid = #{patientid}</if>
@@ -55,7 +56,7 @@
<if test="relationid != null "> and relationid = #{relationid}</if>
<if test="isupload != null "> and isupload = #{isupload}</if>
<if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
- </where>
+
</select>
<select id="selectSchemePlanById" parameterType="Long" resultMap="SchemePlanResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SchemeTaskMapper.xml b/smartor/src/main/resources/mapper/smartor/SchemeTaskMapper.xml
index f978172..4b8c729 100644
--- a/smartor/src/main/resources/mapper/smartor/SchemeTaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SchemeTaskMapper.xml
@@ -61,7 +61,8 @@
<select id="selectSchemeTaskList" parameterType="SchemeTask" resultMap="SchemeTaskResult">
<include refid="selectSchemeTaskVo"/>
- <where>
+ WHERE 1=1
+
<if test="schemeid != null "> and schemeid = #{schemeid}</if>
<if test="schemeplanid != null "> and schemeplanid = #{schemeplanid}</if>
<if test="patientid != null "> and patientid = #{patientid}</if>
@@ -103,7 +104,7 @@
<if test="ismanual != null "> and ismanual = #{ismanual}</if>
<if test="losstime != null "> and losstime = #{losstime}</if>
<if test="relationlistid != null and relationlistid != ''"> and relationlistid = #{relationlistid}</if>
- </where>
+
</select>
<select id="selectSchemeTaskById" parameterType="Long" resultMap="SchemeTaskResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SchemeTaskconfigMapper.xml b/smartor/src/main/resources/mapper/smartor/SchemeTaskconfigMapper.xml
index 00ce0bd..8222c10 100644
--- a/smartor/src/main/resources/mapper/smartor/SchemeTaskconfigMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SchemeTaskconfigMapper.xml
@@ -63,7 +63,8 @@
<select id="selectSchemeTaskconfigList" parameterType="SchemeTaskconfig" resultMap="SchemeTaskconfigResult">
<include refid="selectSchemeTaskconfigVo"/>
- <where>
+ WHERE 1=1
+
<if test="schemeid != null "> and schemeid = #{schemeid}</if>
<if test="triggersceneid != null "> and triggersceneid = #{triggersceneid}</if>
<if test="triggerruleid != null "> and triggerruleid = #{triggerruleid}</if>
@@ -107,7 +108,7 @@
<if test="relationlistid != null and relationlistid != ''"> and relationlistid = #{relationlistid}</if>
<if test="relationcode != null and relationcode != ''"> and relationcode = #{relationcode}</if>
<if test="isrepeat != null "> and isrepeat = #{isrepeat}</if>
- </where>
+
</select>
<select id="selectSchemeTaskconfigById" parameterType="Long" resultMap="SchemeTaskconfigResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SchemeTaskrecordCalldetailMapper.xml b/smartor/src/main/resources/mapper/smartor/SchemeTaskrecordCalldetailMapper.xml
index da67945..7194c03 100644
--- a/smartor/src/main/resources/mapper/smartor/SchemeTaskrecordCalldetailMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SchemeTaskrecordCalldetailMapper.xml
@@ -51,7 +51,8 @@
<select id="selectSchemeTaskrecordCalldetailList" parameterType="SchemeTaskrecordCalldetail" resultMap="SchemeTaskrecordCalldetailResult">
<include refid="selectSchemeTaskrecordCalldetailVo"/>
- <where>
+ WHERE 1=1
+
<if test="uuid != null and uuid != ''"> and uuid = #{uuid}</if>
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
<if test="operate != null and operate != ''"> and operate = #{operate}</if>
@@ -83,7 +84,7 @@
<if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
<if test="isupload != null "> and isupload = #{isupload}</if>
<if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
- </where>
+
</select>
<select id="selectSchemeTaskrecordCalldetailById" parameterType="Long" resultMap="SchemeTaskrecordCalldetailResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SchemeTaskrecordMapper.xml b/smartor/src/main/resources/mapper/smartor/SchemeTaskrecordMapper.xml
index cf44ccc..c52d14c 100644
--- a/smartor/src/main/resources/mapper/smartor/SchemeTaskrecordMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SchemeTaskrecordMapper.xml
@@ -41,7 +41,8 @@
<select id="selectSchemeTaskrecordList" parameterType="SchemeTaskrecord" resultMap="SchemeTaskrecordResult">
<include refid="selectSchemeTaskrecordVo"/>
- <where>
+ WHERE 1=1
+
<if test="recordtype != null "> and recordtype = #{recordtype}</if>
<if test="taskid != null "> and taskid = #{taskid}</if>
<if test="result != null and result != ''"> and result = #{result}</if>
@@ -63,7 +64,7 @@
<if test="seatsid != null "> and seatsid = #{seatsid}</if>
<if test="handletype != null "> and handletype = #{handletype}</if>
<if test="guid != null "> and guid = #{guid}</if>
- </where>
+
</select>
<select id="selectSchemeTaskrecordById" parameterType="Long" resultMap="SchemeTaskrecordResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SchemeTaskrepeatconfigMapper.xml b/smartor/src/main/resources/mapper/smartor/SchemeTaskrepeatconfigMapper.xml
index acb025a..2ac3b69 100644
--- a/smartor/src/main/resources/mapper/smartor/SchemeTaskrepeatconfigMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SchemeTaskrepeatconfigMapper.xml
@@ -36,7 +36,8 @@
<select id="selectSchemeTaskrepeatconfigList" parameterType="SchemeTaskrepeatconfig" resultMap="SchemeTaskrepeatconfigResult">
<include refid="selectSchemeTaskrepeatconfigVo"/>
- <where>
+ WHERE 1=1
+
<if test="schemeid != null "> and schemeid = #{schemeid}</if>
<if test="triggersceneid != null "> and triggersceneid = #{triggersceneid}</if>
<if test="triggerruleid != null "> and triggerruleid = #{triggerruleid}</if>
@@ -53,7 +54,7 @@
<if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
<if test="isupload != null "> and isupload = #{isupload}</if>
<if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
- </where>
+
</select>
<select id="selectSchemeTaskrepeatconfigById" parameterType="Long" resultMap="SchemeTaskrepeatconfigResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SchemeTriggerruleMapper.xml b/smartor/src/main/resources/mapper/smartor/SchemeTriggerruleMapper.xml
index c55a7c3..ad58372 100644
--- a/smartor/src/main/resources/mapper/smartor/SchemeTriggerruleMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SchemeTriggerruleMapper.xml
@@ -63,12 +63,13 @@
<select id="selectSchemeTriggerruleList" parameterType="SchemeTriggerrule" resultMap="SchemeTriggerruleResult">
<include refid="selectSchemeTriggerruleVo"/>
- <where>
+ WHERE 1=1
+
<if test="conditionstype != null ">and conditionstype = #{conditionstype}</if>
<if test="orand != null ">and orand = #{orand}</if>
<if test="ruleconditions != null and ruleconditions != ''">and ruleconditions = #{ruleconditions}</if>
<if test="parentresultconditionsid != null and parentresultconditionsid != ''">and parentresultconditionsid
- = #{parentresultconditionsid}
+ AND = #{parentresultconditionsid}
</if>
<if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
<if test="isupload != null ">and isupload = #{isupload}</if>
@@ -88,7 +89,7 @@
<if test="groupnumber != null ">and groupnumber = #{groupnumber}</if>
<if test="grouporand != null ">and grouporand = #{grouporand}</if>
<if test="isrequired != null ">and isrequired = #{isrequired}</if>
- </where>
+
</select>
<select id="selectSchemeTriggerruleById" parameterType="Long" resultMap="SchemeTriggerruleResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SchemeTriggersceneMapper.xml b/smartor/src/main/resources/mapper/smartor/SchemeTriggersceneMapper.xml
index a8ba07a..7b7c916 100644
--- a/smartor/src/main/resources/mapper/smartor/SchemeTriggersceneMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SchemeTriggersceneMapper.xml
@@ -41,7 +41,8 @@
<select id="selectSchemeTriggersceneList" parameterType="SchemeTriggerscene" resultMap="SchemeTriggersceneResult">
<include refid="selectSchemeTriggersceneVo"/>
- <where>
+ WHERE 1=1
+
<if test="schemeid != null ">and schemeid = #{schemeid}</if>
<if test="baselinetime != null ">and baselinetime = #{baselinetime}</if>
<if test="triggerornot != null ">and triggerornot = #{triggerornot}</if>
@@ -49,7 +50,7 @@
<if test="isupload != null ">and isupload = #{isupload}</if>
<if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
<if test="ismain != null ">and ismain = #{ismain}</if>
- </where>
+
</select>
<select id="selectSchemeTriggersceneById" parameterType="Long" resultMap="SchemeTriggersceneResult">
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceCheckMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceCheckMapper.xml
index 69f0e5b..372d991 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceCheckMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceCheckMapper.xml
@@ -30,8 +30,9 @@
<select id="selectServiceCheckList" parameterType="com.smartor.domain.ServiceCheck"
resultMap="ServiceCheckResult">
<include refid="selectServiceCheckVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="deptCode != null and deptCode != ''">
and dept_code = #{deptCode}
</if>
@@ -44,7 +45,7 @@
<if test="orgid != null and orgid != ''">
and orgid = #{orgid}
</if>
- </where>
+
</select>
<select id="selectServiceCheckById" parameterType="Long"
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceOutPathMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceOutPathMapper.xml
index 54cb39c..2061b52 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceOutPathMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceOutPathMapper.xml
@@ -36,8 +36,9 @@
<select id="selectServiceOutPathList" parameterType="com.smartor.domain.ServiceOutPath"
resultMap="ServiceOutPathResult">
<include refid="selectServiceOutPathVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
and orgid is null
<if test="param1 != null ">
and param1 = #{param1}
@@ -58,7 +59,7 @@
and radix=#{radix}
</if>
- </where>
+
</select>
<select id="selectServiceOutPathById" parameterType="Long"
diff --git a/smartor/src/main/resources/mapper/smartor/ServicePatientTempMapper.xml b/smartor/src/main/resources/mapper/smartor/ServicePatientTempMapper.xml
index 749d101..7c09d6a 100644
--- a/smartor/src/main/resources/mapper/smartor/ServicePatientTempMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServicePatientTempMapper.xml
@@ -38,7 +38,8 @@
<select id="selectServicePatientTempList" parameterType="com.smartor.domain.ServicePatientTemp"
resultMap="ServicePatientTempResult">
<include refid="selectServicePatientTempVo"/>
- <where>
+ WHERE 1=1
+
<if test="userId != null ">
and user_id = #{userId}
</if>
@@ -60,7 +61,7 @@
<if test="orgid != null ">
and orgid = #{orgid}
</if>
- </where>
+
</select>
<select id="selectServicePatientTempById" parameterType="Long"
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskAnswerMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskAnswerMapper.xml
index 9194230..e42762f 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskAnswerMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskAnswerMapper.xml
@@ -52,7 +52,8 @@
<select id="selectServiceSubtaskAnswerList" parameterType="com.smartor.domain.ServiceSubtaskAnswer"
resultMap="ServiceSubtaskAnswerResult">
<include refid="selectServiceSubtaskAnswerVo"/>
- <where>
+ WHERE 1=1
+
<if test="taskid != null ">and taskid = #{taskid}</if>
<if test="patId != null ">and pat_id = #{patId}</if>
<if test="orgid != null ">and orgid = #{orgid}</if>
@@ -68,7 +69,7 @@
<if test="pid != null and pid != ''">and pid = #{pid}</if>
<if test="guid != null and guid != ''">and guid = #{guid}</if>
<if test="answerps != null and answerps != ''">and answerps = #{answerps}</if>
- </where>
+
</select>
<select id="selectServiceSubtaskAnswerById" parameterType="Long" resultMap="ServiceSubtaskAnswerResult">
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskDetailMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskDetailMapper.xml
index dd283ea..6d1f984 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskDetailMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskDetailMapper.xml
@@ -120,7 +120,8 @@
<select id="selectServiceSubtaskDetailList" parameterType="com.smartor.domain.ServiceSubtaskDetail"
resultMap="ServiceSubtaskDetailResult">
<include refid="selectServiceSubtaskDetailVo"/>
- <where>
+ WHERE 1=1
+
<if test="subId != null">and sub_id = #{subId}</if>
<if test="targetid != null">and targetid = #{targetid}</if>
<if test="extemplateText != null">and extemplate_text = #{extemplateText}</if>
@@ -152,7 +153,7 @@
<if test="questiontext != null and questiontext != ''">and questiontext = #{questiontext}</if>
<if test="questionvoice != null and questionvoice != ''">and questionvoice = #{questionvoice}</if>
<if test="categoryname != null and categoryname != ''">and categoryname like concat('%', #{categoryname},
- '%')
+ AND '%')
</if>
<if test="targetoptions != null and targetoptions != ''">and targetoptions = #{targetoptions}</if>
<if test="targetvalue != null and targetvalue != ''">and targetvalue = #{targetvalue}</if>
@@ -166,7 +167,7 @@
<if test="comment != null and comment != ''">and comment = #{comment}</if>
<if test="scriptid != null ">and scriptid = #{scriptid}</if>
<if test=" patid != null">and patid = #{patid}</if>
- </where>
+
</select>
<select id="selectServiceSubtaskDetailByCalldetailid" parameterType="String" resultMap="ServiceSubtaskDetailResult">
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
index fe4f4ed..9c943e6 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
@@ -210,32 +210,34 @@
resultMap="ServiceSubtaskResult">
<include refid="selectServiceSubtaskVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="taskid != null ">and taskid = #{taskid}</if>
<if test="serviceType != null ">and service_type = #{serviceType}</if>
<if test="patid != null ">and patid = #{patid}</if>
<if test="sendstates!=null">
AND sendstate IN
<foreach collection="sendstates" item="sendstate" open="(" separator=","
- close=")">
+ AND close=")">
#{sendstate}
</foreach>
</if>
- </where>
+
</select>
<select id="queryServiceSubtaskList" parameterType="com.smartor.domain.ServiceSubtaskVO"
resultMap="ServiceSubtaskResult">
<include refid="selectServiceSubtaskVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="taskid != null ">and taskid = #{taskid}</if>
<if test="visitTime != null">
AND date_format(visit_time,'%y%m%d') <= date_format(#{visitTime},'%y%m%d')
</if>
<if test="sendstate != null ">and sendstate = #{sendstate}</if>
- </where>
+
</select>
@@ -243,15 +245,16 @@
<select id="selectServiceSubtaskList" parameterType="com.smartor.domain.ServiceSubtaskVO"
resultMap="ServiceSubtaskResult">
<include refid="selectServiceSubtaskVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="sendname != null and sendname != ''">and sendname like concat('%', #{sendname}, '%')</if>
<if test="phone != null and phone != ''">and phone = #{phone}</if>
<if test="leavehospitaldistrictcode != null and leavehospitaldistrictcode != ''">and
- leavehospitaldistrictcode = #{leavehospitaldistrictcode}
+ AND leavehospitaldistrictcode = #{leavehospitaldistrictcode}
</if>
<if test="leavehospitaldistrictname != null and leavehospitaldistrictname != ''">and
- leavehospitaldistrictname = #{leavehospitaldistrictname}
+ AND leavehospitaldistrictname = #{leavehospitaldistrictname}
</if>
<if test="leavediagname != null and leavediagname != ''">and leavediagname like concat('%',
#{leavediagname}, '%')
@@ -277,7 +280,7 @@
<if test="taskid != null ">and taskid = #{taskid}</if>
<if test="templateid != null and templateid != ''">and templateid = #{templateid}</if>
<if test="templatename != null and templatename != ''">and templatename like concat('%', #{templatename},
- '%')
+ AND '%')
</if>
<if test="startOutHospTime != null">
AND date_format(endtime,'%y%m%d') >= date_format(#{startOutHospTime},'%y%m%d')
@@ -299,16 +302,16 @@
<if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0">
AND leavehospitaldistrictcode IN
<foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="("
- separator=","
- close=")">
- #{leavehospitaldistrictcode}
+ AND separator=","
+ AND close=")">
+ #{leavehospitaldistrictcode}
</foreach>
</if>
<if test=" leaveldeptcodes != null and leaveldeptcodes.size()>0">
AND deptcode IN
<foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator=","
- close=")">
- #{leaveldeptcode}
+ AND close=")">
+ #{leaveldeptcode}
</foreach>
</if>
</if>
@@ -316,16 +319,16 @@
<if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0">
AND (leavehospitaldistrictcode IN
<foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="("
- separator=","
- close=")">
- #{leavehospitaldistrictcode}
+ AND separator=","
+ AND close=")">
+ #{leavehospitaldistrictcode}
</foreach>
</if>
<if test=" leaveldeptcodes != null and leaveldeptcodes.size()>0">
OR deptcode IN
<foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator=","
- close="))">
- #{leaveldeptcode}
+ AND close="))">
+ #{leaveldeptcode}
</foreach>
</if>
</if>
@@ -391,12 +394,12 @@
<if test="visitCount != null and visitCount > 1 and visitDeptCodes != null and visitDeptCodes.size() > 0">
AND visit_dept_code IN
<foreach collection="visitDeptCodes" item="visitDeptCodes" open="("
- separator=","
- close=")">
+ AND separator=","
+ AND close=")">
#{visitDeptCodes}
</foreach>
</if>
- </where>
+
<if test="sort != null and sort==0">order by endtime asc</if>
<if test="sort != null and sort==1">order by endtime desc</if>
<if test="sort != null and sort==2">order by long_send_time asc</if>
@@ -411,24 +414,25 @@
<select id="getCompensateServiceSubtaskList" parameterType="com.smartor.domain.ServiceSubtaskVO"
resultMap="ServiceSubtaskResult">
<include refid="selectServiceSubtaskVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="visitTime != null">
AND date_format(visit_time,'%y%m%d') <= date_format(#{visitTime},'%y%m%d')
</if>
<if test="sendstate != null ">and sendstate = #{sendstate}</if>
- </where>
+
</select>
<select id="selectServiceSubtaskListByCreateTime" parameterType="com.smartor.domain.ServiceSubtaskVO"
resultMap="ServiceSubtaskResult">
<include refid="selectServiceSubtaskVo"/>
- <where>
- del_flag=0
- <if test="createStartTime != null and createEndTime != null">and create_time BETWEEN #{createStartTime} AND
- #{createEndTime}
+ WHERE 1=1
+ and del_flag=0
+ <if test="createStartTime != null and createEndTime != null">
+ and create_time BETWEEN #{createStartTime} AND #{createEndTime}
</if>
<if test="createBy != null ">and create_by = #{createBy}</if>
<if test="sendname != null ">and sendname = #{sendname}</if>
@@ -443,20 +447,18 @@
<if test="managementDoctor != null">and management_doctor = #{managementDoctor}</if>
<if test="currentPreachform != null">and current_preachform = #{currentPreachform}</if>
<if test="isabnormal != null">and isabnormal = #{isabnormal}</if>
- </where>
-
</select>
<select id="selectServiceSubtaskListAgain" parameterType="com.smartor.domain.ServiceSubtaskVO"
resultMap="ServiceSubtaskResult">
<include refid="selectServiceSubtaskVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+ AND del_flag=0
and upid is not null
and visit_count > 1
- <if test="createStartTime != null and createEndTime != null">and create_time BETWEEN #{createStartTime} AND
- #{createEndTime}
+ <if test="createStartTime != null and createEndTime != null">
+ and create_time BETWEEN #{createStartTime} AND #{createEndTime}
</if>
<if test="senddate != null ">and senddate = #{senddate}</if>
<if test="senduuid != null and senduuid != ''">and senduuid = #{senduuid}</if>
@@ -501,21 +503,20 @@
<if test="managementDoctorCode != null">and management_doctor_code = #{managementDoctorCode}</if>
<if test="isabnormal != null">and isabnormal = #{isabnormal}</if>
<if test="managementDoctor != null">and management_doctor like concat('%',#{managementDoctor}, '%')</if>
- </where>
-
</select>
<select id="selectSendstateByCondition" parameterType="com.smartor.domain.ServiceSubtask" resultType="Integer">
SELECT b.sendstate
from service_task a
JOIN service_subtask b on a.taskid = b.taskid and a.pat_cycle = 0 and b.del_flag = 0
- <where>b.taskid = #{taskid}
+ WHERE 1=1
+AND b.taskid = #{taskid}
and b.patid = #{patid}
<if test="createTime != null and createTime != ''">
- DATE_FORMAT(b.create_time, '%Y-%m-%d') LIKE CONCAT(#{createTimeNew}, '%')
+ AND DATE_FORMAT(b.create_time, '%Y-%m-%d') LIKE CONCAT(#{createTimeNew}, '%')
</if>
<if test="sendstate != null ">and b.sendstate = #{sendstate}</if>
- </where>
+
</select>
<select id="selectTimelyRate" parameterType="com.smartor.domain.ServiceSubtask" resultType="double">
@@ -550,16 +551,17 @@
<select id="selectTimelyRateDetail" parameterType="com.smartor.domain.ServiceSubtask"
resultMap="ServiceSubtaskResult">
<include refid="selectServiceSubtaskVo"/>
- <where>
- id in (
- SELECT id FROM
- (SELECT id, visit_time, finishtime,
- (CASE WHEN ( DATE_FORMAT( visit_time, '%y%m%d' ) < DATE_FORMAT( IF ( ISNULL( finishtime ), NOW(),
- finishtime
- ), '%y%m%d' ) )
- THEN 1 ELSE 0 END ) finished,1 AS tasknumber FROM service_subtask
- WHERE del_flag=0
- -- AND visit_time < NOW()
+ WHERE 1=1
+
+ AND id in (
+ AND SELECT id FROM
+ AND (SELECT id, visit_time, finishtime,
+ AND (CASE WHEN ( DATE_FORMAT( visit_time, '%y%m%d' ) < DATE_FORMAT( IF ( ISNULL( finishtime ), NOW(),
+ AND finishtime
+ AND ), '%y%m%d' ) )
+ AND THEN 1 ELSE 0 END ) finished,1 AS tasknumber FROM service_subtask
+ AND WHERE del_flag=0
+ AND -- AND visit_time < NOW()
<if test="starttime != null and endtime!=null">
AND date_format(visit_time,'%y%m%d') >= date_format(#{starttime},'%y%m%d')
AND date_format(visit_time,'%y%m%d') <= date_format(#{endtime},'%y%m%d')
@@ -569,15 +571,15 @@
<if test="deptcode != null and deptcode != ''">and deptcode = #{deptcode}</if>
<if test="deptname != null and deptname != ''">and deptname = #{deptname}</if>
<if test="leavehospitaldistrictcode != null and leavehospitaldistrictcode != ''">and
- leavehospitaldistrictcode = #{leavehospitaldistrictcode}
+ AND leavehospitaldistrictcode = #{leavehospitaldistrictcode}
</if>
<if test="leavehospitaldistrictname != null and leavehospitaldistrictname != ''">and
- leavehospitaldistrictname = #{leavehospitaldistrictname}
+ AND leavehospitaldistrictname = #{leavehospitaldistrictname}
</if>
<if test="managementDoctorCode != null">and management_doctor_code = #{managementDoctorCode}</if>
<if test="managementDoctor != null">and management_doctor like concat('%',#{managementDoctor}, '%')</if>
- ) a where a.finished =1)
- </where>
+ AND ) a where a.finished =1)
+
</select>
<select id="selectServiceSubtaskById" parameterType="Long" resultMap="ServiceSubtaskResult">
@@ -957,10 +959,11 @@
<if test="taskSituation != null">task_situation=#{taskSituation},</if>
<if test="isabnormal != null">isabnormal=#{isabnormal},</if>
</trim>
- <where>
+ WHERE 1=1
+
<if test="patid != null ">and patid = #{patid}</if>
<if test="taskid != null ">and taskid = #{taskid}</if>
- </where>
+
</update>
<update id="updateServiceSubtaskByCondition" parameterType="com.smartor.domain.ServiceSubtask">
@@ -1165,26 +1168,27 @@
<select id="getSfStatistics" parameterType="com.smartor.domain.ServiceSubtaskCountReq"
resultMap="ServiceSubtaskResult">
<include refid="selectServiceSubtaskVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0">
AND leavehospitaldistrictcode IN
<foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator=","
- close=")">
+ AND close=")">
#{leavehospitaldistrictcode}
</foreach>
</if>
<if test="deptcodes != null and deptcodes.size() > 0">
AND deptcode IN
<foreach collection="deptcodes" item="deptcode" open="(" separator=","
- close=")">
+ AND close=")">
#{deptcode}
</foreach>
</if>
<if test="serviceType != null and serviceType.size() > 0">
AND service_type IN
<foreach collection="serviceType" item="serviceType" open="(" separator=","
- close=")">
+ AND close=")">
#{serviceType}
</foreach>
</if>
@@ -1195,7 +1199,7 @@
<if test="visitDeptCode != null">and visit_dept_code = #{visitDeptCode}</if>
<if test="visitDeptName != null">abd visit_dept_name = #{visitDeptName}</if>
<if test="isabnormal != null">abd isabnormal = #{isabnormal}</if>
- </where>
+
</select>
<select id="getSfStatisticsJoy" parameterType="com.smartor.domain.ServiceSubtaskCountReq"
@@ -1205,26 +1209,27 @@
config_key='joyCount')) joyAllCount
FROM service_subtask_detail a
WHERE sub_id IN(SELECT id FROM service_subtask t
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0">
AND leavehospitaldistrictcode IN
<foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator=","
- close=")">
+ AND close=")">
#{leavehospitaldistrictcode}
</foreach>
</if>
<if test="deptcodes != null and deptcodes.size() > 0">
AND deptcode IN
<foreach collection="deptcodes" item="deptcode" open="(" separator=","
- close=")">
+ AND close=")">
#{deptcode}
</foreach>
</if>
<if test="serviceType != null and serviceType.size() > 0">
AND service_type IN
<foreach collection="serviceType" item="serviceType" open="(" separator=","
- close=")">
+ AND close=")">
#{serviceType}
</foreach>
</if>
@@ -1235,7 +1240,7 @@
<if test="visitDeptCode != null">and visit_dept_code = #{visitDeptCode}</if>
<if test="visitDeptName != null">abd visit_dept_name = #{visitDeptName}</if>
<if test="isabnormal != null">abd isabnormal = #{isabnormal}</if>
- </where>
+
)
AND targetid IN ( SELECT id FROM ivr_liba_target WHERE assortid IN (SELECT config_value FROM sys_config WHERE
config_key='joyCount'))
@@ -1247,26 +1252,27 @@
SELECT joyName,joyCount,joyAllCount,ROUND(joyCount/joyAllCount,2) joyTotal FROM (
SELECT targetname joyName,
(select COUNT(sub_id) FROM service_subtask_detail WHERE sub_id IN(SELECT id FROM service_subtask t
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0">
AND leavehospitaldistrictcode IN
<foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator=","
- close=")">
+ AND close=")">
#{leavehospitaldistrictcode}
</foreach>
</if>
<if test="deptcodes != null and deptcodes.size() > 0">
AND deptcode IN
<foreach collection="deptcodes" item="deptcode" open="(" separator=","
- close=")">
+ AND close=")">
#{deptcode}
</foreach>
</if>
<if test="serviceType != null and serviceType.size() > 0">
AND service_type IN
<foreach collection="serviceType" item="serviceType" open="(" separator=","
- close=")">
+ AND close=")">
#{serviceType}
</foreach>
</if>
@@ -1274,30 +1280,31 @@
AND date_format(visit_time,'%y%m%d') >= date_format(#{startTime},'%y%m%d')
AND date_format(visit_time,'%y%m%d') <= date_format(#{endTime},'%y%m%d')
</if>
- </where>
+
) AND targetid=a.id) joyCount , (SELECT COUNT(*) from (select sub_id FROM service_subtask_detail
WHERE sub_id IN(SELECT id FROM service_subtask t
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0">AND
- leavehospitaldistrictcode IN
+ AND leavehospitaldistrictcode IN
<foreach
- collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator=","
- close=")">
+ AND collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator=","
+ AND close=")">
#{leavehospitaldistrictcode}
</foreach>
</if>
<if test="deptcodes != null and deptcodes.size() > 0">
AND deptcode IN
<foreach collection="deptcodes" item="deptcode" open="(" separator=","
- close=")">
+ AND close=")">
#{deptcode}
</foreach>
</if>
<if test="serviceType != null and serviceType.size() > 0">
AND service_type IN
<foreach collection="serviceType" item="serviceType" open="(" separator=","
- close=")">
+ AND close=")">
#{serviceType}
</foreach>
</if>
@@ -1305,7 +1312,7 @@
AND date_format(visit_time,'%y%m%d') >= date_format(#{startTime},'%y%m%d')
AND date_format(visit_time,'%y%m%d') <= date_format(#{endTime},'%y%m%d')
</if>
- </where>
+
GROUP BY sub_id ) ) ta ) joyAllCount
FROM ivr_liba_target a
WHERE assortid IN (SELECT config_value FROM sys_config WHERE config_key=
@@ -1323,27 +1330,28 @@
COUNT(sub_id) joyCount
FROM service_subtask_detail a
INNER JOIN service_subtask t ON a.sub_id = t.id
- <where>
- a.del_flag=0
+ WHERE 1=1
+
+ AND a.del_flag=0
AND t.del_flag=0
<if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0">
AND t.leavehospitaldistrictcode IN
<foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator=","
- close=")">
+ AND close=")">
#{leavehospitaldistrictcode}
</foreach>
</if>
<if test="deptcodes != null and deptcodes.size() > 0">
AND t.deptcode IN
<foreach collection="deptcodes" item="deptcode" open="(" separator=","
- close=")">
+ AND close=")">
#{deptcode}
</foreach>
</if>
<if test="serviceType != null and serviceType.size() > 0">
AND t.service_type IN
<foreach collection="serviceType" item="serviceType" open="(" separator=","
- close=")">
+ AND close=")">
#{serviceType}
</foreach>
</if>
@@ -1364,7 +1372,7 @@
<if test="type != null">
and t.type = #{type}
</if>
- </where>
+
GROUP BY a.sub_id
</select>
@@ -1448,28 +1456,29 @@
FROM
service_subtask_detail ssd
INNER JOIN service_subtask ss ON ssd.sub_id = ss.id
- <where>
- ss.del_flag=0
+ WHERE 1=1
+
+ AND ss.del_flag=0
AND IFNULL(ssd.matchedtext,ssd.asrtext) IS NOT NULL
AND IFNULL(ssd.matchedtext,ssd.asrtext) != ''
<if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0">
AND ss.leavehospitaldistrictcode IN
<foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator=","
- close=")">
+ AND close=")">
#{leavehospitaldistrictcode}
</foreach>
</if>
<if test="deptcodes != null and deptcodes.size() > 0">
AND ss.deptcode IN
<foreach collection="deptcodes" item="deptcode" open="(" separator=","
- close=")">
+ AND close=")">
#{deptcode}
</foreach>
</if>
<if test="serviceType != null and serviceType.size() > 0">
AND ss.service_type IN
<foreach collection="serviceType" item="serviceType" open="(" separator=","
- close=")">
+ AND close=")">
#{serviceType}
</foreach>
</if>
@@ -1484,7 +1493,7 @@
<if test="configValue != null and configValue != ''">
AND ssd.categoryid IN (${configValue})
</if>
- </where>
+
group by ssd.scriptid, IFNULL(ssd.matchedtext,ssd.asrtext)
</select>
@@ -1841,8 +1850,9 @@
SUM(CASE WHEN sendstate = 1 THEN 1 ELSE 0 END) AS blq,
SUM(CASE WHEN excep IS NOT NULL AND excep != '0' THEN 1 ELSE 0 END) AS yc
FROM service_subtask
- <where>
- del_flag = 0
+ WHERE 1=1
+
+ AND del_flag = 0
<if test="sendname != null and sendname != ''">
AND sendname LIKE CONCAT('%', #{sendname}, '%')
</if>
@@ -1853,16 +1863,16 @@
<if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0">
AND leavehospitaldistrictcode IN
<foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="("
- separator=","
- close=")">
- #{leavehospitaldistrictcode}
+ AND separator=","
+ AND close=")">
+ #{leavehospitaldistrictcode}
</foreach>
</if>
<if test=" leaveldeptcodes != null and leaveldeptcodes.size()>0">
AND deptcode IN
<foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator=","
- close=")">
- #{leaveldeptcode}
+ AND close=")">
+ #{leaveldeptcode}
</foreach>
</if>
</if>
@@ -1870,16 +1880,16 @@
<if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0">
AND (leavehospitaldistrictcode IN
<foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="("
- separator=","
- close=")">
- #{leavehospitaldistrictcode}
+ AND separator=","
+ AND close=")">
+ #{leavehospitaldistrictcode}
</foreach>
</if>
<if test=" leaveldeptcodes != null and leaveldeptcodes.size()>0">
OR deptcode IN
<foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator=","
- close="))">
- #{leaveldeptcode}
+ AND close="))">
+ #{leaveldeptcode}
</foreach>
</if>
</if>
@@ -1965,14 +1975,14 @@
<if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0">
AND leavehospitaldistrictcode IN
<foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="("
- separator="," close=")">
- #{leavehospitaldistrictcode}
+ AND separator="," close=")">
+ #{leavehospitaldistrictcode}
</foreach>
</if>
<if test="leaveldeptcodes != null and leaveldeptcodes.size() > 0">
AND deptcode IN
<foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator="," close=")">
- #{leaveldeptcode}
+ #{leaveldeptcode}
</foreach>
</if>
</if>
@@ -2000,7 +2010,7 @@
<if test="visitCount != null and visitCount > 1">
AND visit_count > 1
</if>
- </where>
+
</select>
</mapper>
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskPreachformMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskPreachformMapper.xml
index 26e3ff8..84a2104 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskPreachformMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskPreachformMapper.xml
@@ -42,8 +42,8 @@
<select id="selectServiceSubtaskPreachformList" parameterType="com.smartor.domain.ServiceSubtaskPreachform"
resultMap="ServiceSubtaskPreachformResult">
<include refid="selectServiceSubtaskPreachformVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+ AND del_flag=0
<if test="subid != null ">
and subid = #{subid}
</if>
@@ -56,7 +56,7 @@
<if test="sendstate != null and sendstate != ''">
and sendstate = #{sendstate}
</if>
- <if test="orgid != null and orgid != ''">
+ <if test="orgid != null and orgid != ''">
and orgid = #{orgid}
</if>
<if test="sort != null ">
@@ -65,7 +65,6 @@
<if test="compensateTime != null ">
and compensate_time = #{compensateTime}
</if>
- </where>
</select>
<select id="selectServiceSubtaskPreachformById" parameterType="Long"
@@ -229,7 +228,8 @@
#{compensateTime},
</if>
</trim>
- <where>
+ WHERE 1=1
+
<if test="subid != null">subid =
#{subid},
</if>
@@ -245,7 +245,7 @@
<if test="orgid != null">orgid =
#{orgid},
</if>
- </where>
+
</update>
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskRecordMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskRecordMapper.xml
index 2a72f0d..1b1720e 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskRecordMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskRecordMapper.xml
@@ -56,7 +56,8 @@
<select id="selectServiceSubtaskRecordList" parameterType="com.smartor.domain.ServiceSubtaskRecord"
resultMap="ServiceSubtaskRecordResult">
<include refid="selectServiceSubtaskRecordVo"/>
- <where>
+ WHERE 1=1
+
<if test="taskid != null and taskid != ''">and taskid = #{taskid}</if>
<if test="subtaskId != null ">and subtask_id = #{subtaskId}</if>
<if test="uuid != null and uuid != ''">and uuid = #{uuid}</if>
@@ -72,7 +73,7 @@
<if test="pid != null ">and pid = #{pid}</if>
<if test="guid != null and guid != ''">and guid = #{guid}</if>
<if test="remark != null and remark != ''">and remark = #{remark}</if>
- </where>
+
</select>
<select id="selectServiceSubtaskRecordById" parameterType="Long" resultMap="ServiceSubtaskRecordResult">
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml
index f1bca5b..c65d2c1 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml
@@ -122,18 +122,19 @@
<select id="selectServiceTaskList" parameterType="com.smartor.domain.ServiceTask" resultMap="ServiceTaskResult">
<include refid="selectServiceTaskVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="taskName != null and taskName != ''">and task_name like concat('%', #{taskName}, '%')</if>
<if test="taskid != null">and taskid = #{taskid}</if>
<if test="sendTimeSlot != null and sendTimeSlot != ''">and send_time_slot like concat('%', #{sendTimeSlot},
- '%')
+ AND '%')
</if>
<if test="templateid != null and templateid != ''">and templateid = #{templateid}</if>
<if test="longTask != null and longTask != ''">and long_task = #{longTask}</if>
<if test="serviceType != null and serviceType != ''">and service_type = #{serviceType}</if>
<if test="templatename != null and templatename != ''">and templatename like concat('%', #{templatename},
- '%')
+ AND '%')
</if>
<if test="labelinfo != null and labelinfo != ''">and labelinfo = #{labelinfo}</if>
<if test="count != null ">and count = #{count}</if>
@@ -180,18 +181,18 @@
<if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size()>0">
AND leavehospitaldistrictcode IN
<foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator=","
- close=")">
+ AND close=")">
#{leavehospitaldistrictcode}
</foreach>
</if>
<if test="leaveldeptcodes != null and leaveldeptcodes.size()>0">
AND deptcode IN
<foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator=","
- close=")">
+ AND close=")">
#{leaveldeptcode}
</foreach>
</if>
- </where>
+
order by update_time desc,taskid desc
</select>
@@ -251,11 +252,13 @@
service_task.nexttaskid,
service_task.nexttaskname,
service_task.orgid from service_task
- <where>
- service_task.del_flag=0
+ WHERE 1=1
+
+ AND service_task.del_flag=0
<!-- and taskid in (-->
<!-- select task_id from service_taskdept-->
- <!-- <where>-->
+ <!-- WHERE 1=1
+-->
<!-- <if test="leaveldeptcodes != null and leaveldeptcodes.size()>0">-->
<!-- dept_code in-->
<!-- <foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator=","-->
@@ -263,21 +266,21 @@
<!-- #{leaveldeptcode}-->
<!-- </foreach>-->
<!-- </if>-->
- <!-- </where>-->
+ <!-- -->
<!-- )-->
<if test="taskName != null and taskName != ''">and service_task.task_name like concat('%', #{taskName},
- '%')
+ AND '%')
</if>
<if test="sendTimeSlot != null and sendTimeSlot != ''">and service_task.send_time_slot like concat('%',
#{sendTimeSlot},
- '%')
+ AND '%')
</if>
<if test="templateid != null and templateid != ''">and service_task.templateid = #{templateid}</if>
<if test="longTask != null and longTask != ''">and service_task.long_task = #{longTask}</if>
<if test="serviceType != null and serviceType != ''">and service_task.service_type = #{serviceType}</if>
<if test="templatename != null and templatename != ''">and service_task.templatename like concat('%',
#{templatename},
- '%')
+ AND '%')
</if>
<if test="labelinfo != null and labelinfo != ''">and service_task.labelinfo = #{labelinfo}</if>
<if test="count != null ">and service_task.count = #{count}</if>
@@ -292,13 +295,13 @@
<if test="sendDay != null ">and service_task.send_day = #{sendDay}</if>
<if test="type != null and type != ''">and service_task.type = #{type}</if>
<if test="typename != null and typename != ''">and service_task.typename like concat('%', #{typename},
- '%')
+ AND '%')
</if>
<if test="beginTime != null ">and date_format( service_task.update_time,'%y%m%d') >=
- date_format(#{beginTime},'%y%m%d')
+ AND date_format(#{beginTime},'%y%m%d')
</if>
<if test="endTime != null ">and date_format( service_task.update_time,'%y%m%d') <=
- date_format(#{endTime},'%y%m%d')
+ AND date_format(#{endTime},'%y%m%d')
</if>
<if test="deptcode != null and deptcode != ''">and service_task.deptcode = #{deptcode}</if>
@@ -329,7 +332,7 @@
#{leavehospitaldistrictcode}
</if>
- </where>
+
order by update_time desc,taskid desc
</select>
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceTaskdeptMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceTaskdeptMapper.xml
index a858e13..cf2dd24 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceTaskdeptMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceTaskdeptMapper.xml
@@ -40,8 +40,9 @@
<select id="selectServiceTaskdeptList" parameterType="com.smartor.domain.ServiceTaskdept"
resultMap="ServiceTaskdeptResult">
<include refid="selectServiceTaskdeptVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="taskId != null ">
and task_id = #{taskId}
</if>
@@ -69,7 +70,7 @@
<if test="orgid != null and orgid != ''">
and orgid = #{orgid}
</if>
- </where>
+
</select>
<select id="selectServiceTaskdeptById" parameterType="Long"
@@ -172,10 +173,11 @@
<if test="orgid != null">orgid = #{orgid},
</if>
</trim>
- <where>
+ WHERE 1=1
+
<if test="id != null">and id = #{id}</if>
<if test="taskId != null">and task_id = #{taskId}</if>
- </where>
+
</update>
<update id="deleteServiceTaskdeptById" parameterType="Long">
@@ -192,10 +194,11 @@
del_flag =1,
update_time = sysdate()
</trim>
- <where>
+ WHERE 1=1
+
<if test="id != null">and id = #{id}</if>
<if test="taskId != null">and task_id = #{taskId}</if>
- </where>
+
</update>
<update id="deleteServiceTaskdeptByIds" parameterType="String">
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceTaskdiagMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceTaskdiagMapper.xml
index 6892c29..29d5c31 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceTaskdiagMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceTaskdiagMapper.xml
@@ -44,8 +44,9 @@
<select id="selectServiceTaskdiagList" parameterType="com.smartor.domain.ServiceTaskdiag"
resultMap="ServiceTaskdiagResult">
<include refid="selectServiceTaskdiagVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="taskId != null ">
and task_id = #{taskId}
</if>
@@ -79,7 +80,7 @@
<if test="pid != null ">
and pid = #{pid}
</if>
- </where>
+
</select>
<select id="selectServiceTaskdiagById" parameterType="Long"
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceTaskoperMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceTaskoperMapper.xml
index 16c8a2f..648eddc 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceTaskoperMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceTaskoperMapper.xml
@@ -44,8 +44,9 @@
<select id="selectServiceTaskoperList" parameterType="com.smartor.domain.ServiceTaskoper"
resultMap="ServiceTaskoperResult">
<include refid="selectServiceTaskoperVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="taskId != null ">
and task_id = #{taskId}
</if>
@@ -79,7 +80,7 @@
<if test="pid != null ">
and pid = #{pid}
</if>
- </where>
+
</select>
<select id="selectServiceTaskoperById" parameterType="Long"
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceThirdDataMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceThirdDataMapper.xml
index cc22d96..8d1dabb 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceThirdDataMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceThirdDataMapper.xml
@@ -35,7 +35,8 @@
<select id="selectServiceThirdDataList" parameterType="com.smartor.domain.ServiceThirdData"
resultMap="ServiceThirdDataResult">
<include refid="selectServiceThirdDataVo"/>
- <where>
+ WHERE 1=1
+
<if test="dataType != null and dataType != ''">and data_type = #{dataType}</if>
<if test="dataTypeExplain != null and dataTypeExplain != ''">and data_type_explain = #{dataTypeExplain}
</if>
@@ -44,7 +45,7 @@
<if test="isDeal != null">and is_deal = #{isDeal}</if>
<if test="orgid != null">and orgid = #{orgid}</if>
<if test="createTime != null ">and create_time <= #{createTime}</if>
- </where>
+
</select>
<insert id="insertThirdData" parameterType="com.smartor.domain.ServiceThirdData">
diff --git a/smartor/src/main/resources/mapper/smartor/SvyCategoryMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyCategoryMapper.xml
index 4b1a2da..d08619c 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyCategoryMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyCategoryMapper.xml
@@ -37,12 +37,13 @@
<select id="selectSvyCategoryList" parameterType="com.smartor.domain.SvyCategory" resultMap="SvyCategoryResult">
<include refid="selectSvyCategoryVo"/>
- <where>
+ WHERE 1=1
+
<if test="categoryname != null and categoryname != ''">and categoryname like concat('%', #{categoryname},
- '%')
+ AND '%')
</if>
<if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
- </where>
+
</select>
<select id="selectSvyCategoryById" parameterType="String" resultType="com.smartor.domain.SvyCategory">
@@ -58,12 +59,13 @@
a.upload_time,
count(b.svyid) svyNum
from svy_category a,svy_lib_title b
- <where>
- a.id = b.categoryid
+ WHERE 1=1
+
+ AND a.id = b.categoryid
<if test="categoryname != null and categoryname != ''">
and categoryname = #{categoryname}
</if>
- </where>
+
group by a.categoryname
</select>
diff --git a/smartor/src/main/resources/mapper/smartor/SvyFinishMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyFinishMapper.xml
index 92552ff..c1c6897 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyFinishMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyFinishMapper.xml
@@ -33,12 +33,13 @@
<select id="selectSvyFinishList" parameterType="SvyFinish" resultMap="SvyFinishResult">
<include refid="selectSvyFinishVo"/>
- <where>
+ WHERE 1=1
+
<if test="svytitle != null and svytitle != ''"> and svytitle = #{svytitle}</if>
<if test="totalscore != null "> and totalscore = #{totalscore}</if>
<if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
<if test="isabnormal != null "> and isabnormal = #{isabnormal}</if>
- </where>
+
</select>
<select id="selectSvyFinishById" parameterType="Long" resultMap="SvyFinishResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SvyFinishoptionMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyFinishoptionMapper.xml
index cb89174..973e174 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyFinishoptionMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyFinishoptionMapper.xml
@@ -29,12 +29,13 @@
<select id="selectSvyFinishoptionList" parameterType="SvyFinishoption" resultMap="SvyFinishoptionResult">
<include refid="selectSvyFinishoptionVo"/>
- <where>
+ WHERE 1=1
+
<if test="psqoptionid != null "> and psqoptionid = #{psqoptionid}</if>
<if test="content != null and content != ''"> and content = #{content}</if>
<if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
<if test="isrobot != null "> and isrobot = #{isrobot}</if>
- </where>
+
</select>
<select id="selectSvyFinishoptionById" parameterType="Long" resultMap="SvyFinishoptionResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SvyFinishtopicMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyFinishtopicMapper.xml
index 2ed6fa1..bff463c 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyFinishtopicMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyFinishtopicMapper.xml
@@ -27,13 +27,14 @@
<select id="selectSvyFinishtopicList" parameterType="SvyFinishtopic" resultMap="SvyFinishtopicResult">
<include refid="selectSvyFinishtopicVo"/>
- <where>
+ WHERE 1=1
+
<if test="topicid != null "> and topicid = #{topicid}</if>
<if test="score != null "> and score = #{score}</if>
<if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
<if test="isupload != null "> and isupload = #{isupload}</if>
<if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
- </where>
+
</select>
<select id="selectSvyFinishtopicById" parameterType="Long" resultMap="SvyFinishtopicResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SvyLibExceptionMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyLibExceptionMapper.xml
index 2809012..ed6bca2 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyLibExceptionMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyLibExceptionMapper.xml
@@ -35,7 +35,8 @@
<select id="selectSvyLibExceptionList" parameterType="SvyLibException" resultMap="SvyLibExceptionResult">
<include refid="selectSvyLibExceptionVo"/>
- <where>
+ WHERE 1=1
+
<if test="oldid != null "> and oldid = #{oldid}</if>
<if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
<if test="questionoptionid != null "> and questionoptionid = #{questionoptionid}</if>
@@ -51,7 +52,7 @@
<if test="istrack != null "> and istrack = #{istrack}</if>
<if test="isupload != null "> and isupload = #{isupload}</if>
<if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
- </where>
+
</select>
<select id="selectSvyLibExceptionByEcid" parameterType="Long" resultMap="SvyLibExceptionResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SvyLibResultMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyLibResultMapper.xml
index fa85ffc..35af1d3 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyLibResultMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyLibResultMapper.xml
@@ -28,7 +28,8 @@
<select id="selectSvyLibResultList" parameterType="SvyLibResult" resultMap="SvyLibResultResult">
<include refid="selectSvyLibResultVo"/>
- <where>
+ WHERE 1=1
+
<if test="svyid != null "> and svyid = #{svyid}</if>
<if test="resultcontent != null and resultcontent != ''"> and resultcontent = #{resultcontent}</if>
<if test="orand != null "> and orand = #{orand}</if>
@@ -37,7 +38,7 @@
<if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
<if test="isupload != null "> and isupload = #{isupload}</if>
<if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
- </where>
+
</select>
<select id="selectSvyLibResultByResultid" parameterType="Long" resultMap="SvyLibResultResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SvyLibScriptMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyLibScriptMapper.xml
index 4749185..f03f4b7 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyLibScriptMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyLibScriptMapper.xml
@@ -79,8 +79,9 @@
<select id="selectSvyLibScriptList" parameterType="com.smartor.domain.SvyLibScript" resultMap="SvyLibScriptResult">
<include refid="selectSvyLibScriptVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="id != null ">and id = #{id}</if>
<if test="scriptType != null and scriptType != ''">and script_type = #{scriptType}</if>
<if test="categoryid != null ">and categoryid = #{categoryid}</if>
@@ -101,7 +102,7 @@
<if test="targetname != null and targetname != ''">and targetname = #{targetname}</if>
<if test="targettype != null and targettype != ''">and targettype = #{targettype}</if>
<if test="targetoptions != null and targetoptions != ''">and targetoptions = #{targetoptions}</if>
- </where>
+
order by id desc
</select>
diff --git a/smartor/src/main/resources/mapper/smartor/SvyLibScriptOptionMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyLibScriptOptionMapper.xml
index d76942c..224b51a 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyLibScriptOptionMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyLibScriptOptionMapper.xml
@@ -84,8 +84,9 @@
<select id="selectSvyLibScriptOptionList" parameterType="com.smartor.domain.SvyLibScriptOption"
resultMap="SvyLibScriptOptionResult">
<include refid="selectSvyLibScriptOptionVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="topicid != null ">and topicid = #{topicid}</if>
<if test="svyid != null ">and svyid = #{svyid}</if>
<if test="topictype != null ">and topictype = #{topictype}</if>
@@ -114,7 +115,7 @@
<if test="appendflag != null">and appendflag = #{appendflag}</if>
<if test="appenddesc != null">and appenddesc = #{appenddesc}</if>
<if test="picturePath != null">and picture_path = #{picturePath}</if>
- </where>
+
</select>
<select id="selectSvyLibScriptOptionByOptionid" parameterType="Long" resultMap="SvyLibScriptOptionResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SvyLibScriptTagMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyLibScriptTagMapper.xml
index 09f246f..e080728 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyLibScriptTagMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyLibScriptTagMapper.xml
@@ -44,8 +44,9 @@
<select id="selectSvyLibScriptTagList" parameterType="com.smartor.domain.SvyLibScriptTag"
resultMap="SvyLibScriptTagResult">
<include refid="selectSvyLibScriptTagVo"/>
- <where>
- del_flag = 0
+ WHERE 1=1
+
+ AND del_flag = 0
<if test="tagcategoryid != null ">and tagcategoryid = #{tagcategoryid}</if>
<if test="scriptid != null ">and scriptid = #{scriptid}</if>
<if test="tagid != null ">and tagid = #{tagid}</if>
@@ -55,7 +56,7 @@
<if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
<if test="pid != null ">and pid = #{pid}</if>
<if test="guid != null and guid != ''">and guid = #{guid}</if>
- </where>
+
</select>
<select id="selectSvyLibScriptTagById" parameterType="Long" resultMap="SvyLibScriptTagResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SvyLibTemplageCategoryMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyLibTemplageCategoryMapper.xml
index b0d9401..995dc6f 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyLibTemplageCategoryMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyLibTemplageCategoryMapper.xml
@@ -36,15 +36,16 @@
<select id="selectSvyLibTemplateCategoryList" parameterType="com.smartor.domain.SvyLibTemplateCategory"
resultMap="SvyLibTemplateCategoryResult">
<include refid="selectSvyLibTemplateCategoryVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
<if test="pid != null ">and pid = #{pid}</if>
<if test="guid != null and guid != ''">and guid = #{guid}</if>
<if test="orgid != null ">and orgid = #{orgid}</if>
<if test="seqno != null ">and seqno = #{seqno}</if>
- </where>
+
</select>
<select id="selectSvyLibTemplateCategoryById" parameterType="Long" resultMap="SvyLibTemplateCategoryResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SvyLibTemplateMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyLibTemplateMapper.xml
index f7c88ce..ffe4b4b 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyLibTemplateMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyLibTemplateMapper.xml
@@ -123,8 +123,9 @@
LEFT JOIN (select outid,GROUP_CONCAT(icd10code) as icd10code,GROUP_CONCAT(icd10name) as icd10name from
icd10_association group by outid) b ON a.del_flag = 0
AND a.svyid = b.outid
- <where>
- a.del_flag=0
+ WHERE 1=1
+
+ AND a.del_flag=0
<if test="categoryid != null ">and a.categoryid = #{categoryid}</if>
<if test="svyid != null ">and a.svyid = #{svyid}</if>
<if test="longTemp != null ">and a.long_temp = #{longTemp}</if>
@@ -132,7 +133,7 @@
<if test="svyname != null and svyname != ''">and a.svyname like concat('%', #{svyname}, '%')</if>
<if test="description != null and description != ''">and b.icd10name like concat('%', #{description}, '%')
</if>
- </where>
+
order by a.create_time desc
</select>
diff --git a/smartor/src/main/resources/mapper/smartor/SvyLibTemplateScriptMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyLibTemplateScriptMapper.xml
index b928d09..7e107c5 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyLibTemplateScriptMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyLibTemplateScriptMapper.xml
@@ -92,8 +92,9 @@
<select id="selectSvyLibTemplateScriptList" parameterType="com.smartor.domain.SvyLibTemplateScript"
resultMap="SvyLibTemplateScriptResult">
<include refid="selectSvyLibTemplateScriptVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="nextScriptno != null ">and next_scriptno = #{nextScriptno}</if>
<if test="scriptType != null and scriptType != ''">and script_type = #{scriptType}</if>
<if test="scriptno != null and scriptno != ''">and scriptno = #{scriptno}</if>
@@ -130,7 +131,7 @@
<if test="targetoptions != null and targetoptions != ''">and targetoptions = #{targetoptions}</if>
<if test="score != null">and score = #{score}</if>
<if test="groupName != null">and group_name = #{groupName}</if>
- </where>
+
</select>
<select id="selectSvyLibTemplateScriptByTopicid" parameterType="Long" resultMap="SvyLibTemplateScriptResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SvyLibTemplateScriptWjxMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyLibTemplateScriptWjxMapper.xml
index c29d7f2..638bc31 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyLibTemplateScriptWjxMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyLibTemplateScriptWjxMapper.xml
@@ -47,7 +47,8 @@
<select id="selectSvyLibTemplateScriptWjxList" parameterType="com.smartor.domain.SvyLibTemplateScriptWjx" resultMap="SvyLibTemplateScriptWjxResult">
<include refid="selectSvyLibTemplateScriptWjxVo"/>
- <where>
+ WHERE 1=1
+
<if test="oldid != null "> and oldid = #{oldid}</if>
<if test="svyid != null "> and svyid = #{svyid}</if>
<if test="scriptType != null and scriptType != ''"> and script_type = #{scriptType}</if>
@@ -76,7 +77,7 @@
<if test="scoretype != null and scoretype != ''"> and scoretype = #{scoretype}</if>
<if test="score != null and score != ''"> and score = #{score}</if>
<if test="scriptDesc != null and scriptDesc != ''"> and script_desc = #{scriptDesc}</if>
- </where>
+
</select>
<select id="selectSvyLibTemplateScriptWjxById" parameterType="Long" resultMap="SvyLibTemplateScriptWjxResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SvyLibTemplateTagMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyLibTemplateTagMapper.xml
index 753ca27..bc82d84 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyLibTemplateTagMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyLibTemplateTagMapper.xml
@@ -44,8 +44,9 @@
<select id="selectSvyLibTemplateTagList" parameterType="com.smartor.domain.SvyLibTemplateTag"
resultMap="SvyLibTemplateTagResult">
<include refid="selectSvyLibTemplateTagVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="tagcategoryid != null ">and tagcategoryid = #{tagcategoryid}</if>
<if test="templateid != null ">and templateid = #{templateid}</if>
<if test="tagid != null ">and tagid = #{tagid}</if>
@@ -55,7 +56,7 @@
<if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
<if test="pid != null ">and pid = #{pid}</if>
<if test="guid != null and guid != ''">and guid = #{guid}</if>
- </where>
+
</select>
<select id="selectSvyLibTemplateTagById" parameterType="Long" resultMap="SvyLibTemplateTagResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SvyLibTemplateTargetoptionMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyLibTemplateTargetoptionMapper.xml
index 43e4337..08d3f55 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyLibTemplateTargetoptionMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyLibTemplateTargetoptionMapper.xml
@@ -77,11 +77,12 @@
<select id="selectSvyLibTemplateTargetoptionList" parameterType="com.smartor.domain.SvyLibTemplateTargetoption"
resultMap="SvyLibTemplateTargetoptionResult">
<include refid="selectSvyLibTemplateTargetoptionVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="groupid != null and groupid != ''">and groupid = #{groupid}</if>
<if test="categoryName != null and categoryName != ''">and categoryName like concat('%', #{categoryName},
- '%')
+ AND '%')
</if>
<if test="scriptid != null ">and scriptid = #{scriptid}</if>
<if test="prompt != null ">and prompt = #{prompt}</if>
@@ -115,7 +116,7 @@
<if test="optionNo != null">and option_no = #{optionNo}</if>
<if test="sendTaskid != null">and send_taskid= #{sendTaskid}</if>
<if test="sendTaskname != null">and send_taskname = #{sendTaskname}</if>
- </where>
+
</select>
<select id="selectSvyLibTemplateTargetoptionById" parameterType="Long" resultMap="SvyLibTemplateTargetoptionResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SvyLibTemplateTargetoptionWjxMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyLibTemplateTargetoptionWjxMapper.xml
index 718353e..5e2267b 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyLibTemplateTargetoptionWjxMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyLibTemplateTargetoptionWjxMapper.xml
@@ -69,10 +69,11 @@
parameterType="com.smartor.domain.SvyLibTemplateTargetoptionWjx"
resultMap="SvyLibTemplateTargetoptionWjxResult">
<include refid="selectSvyLibTemplateTargetoptionWjxVo"/>
- <where>
+ WHERE 1=1
+
<if test="groupid != null and groupid != ''">and groupid = #{groupid}</if>
<if test="categoryName != null and categoryName != ''">and categoryName like concat('%', #{categoryName},
- '%')
+ AND '%')
</if>
<if test="scriptid != null ">and scriptid = #{scriptid}</if>
<if test="templateID != null ">and templateID = #{templateID}</if>
@@ -101,7 +102,7 @@
<if test="appendflag != null and appendflag != ''">and appendflag = #{appendflag}</if>
<if test="appenddesc != null and appenddesc != ''">and appenddesc = #{appenddesc}</if>
<if test="sort != null">and sort = #{sort}</if>
- </where>
+
</select>
<select id="selectSvyLibTemplateTargetoptionWjxById" parameterType="Long"
diff --git a/smartor/src/main/resources/mapper/smartor/SvyLibTemplateWjxMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyLibTemplateWjxMapper.xml
index d96f6ed..d723f5c 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyLibTemplateWjxMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyLibTemplateWjxMapper.xml
@@ -82,7 +82,8 @@
<select id="selectSvyLibTemplateWjxList" parameterType="com.smartor.domain.SvyLibTemplateWjx"
resultMap="SvyLibTemplateWjxResult">
<include refid="selectSvyLibTemplateWjxVo"/>
- <where>
+ WHERE 1=1
+
<if test="templateid != null ">and templateid = #{templateid}</if>
<if test="categoryid != null ">and categoryid = #{categoryid}</if>
<if test="svycode != null and svycode != ''">and svycode = #{svycode}</if>
@@ -113,7 +114,7 @@
<if test="reply != null and reply != ''">and reply = #{reply}</if>
<if test="scriptScore != null and scriptScore != ''">and script_score = #{scriptScore}</if>
<if test="scoreType != null and scoreType != ''">and score_type = #{scoreType}</if>
- </where>
+
</select>
<select id="selectSvyLibTemplateWjxBySvyid" parameterType="Long" resultMap="SvyLibTemplateWjxResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SvyLibTopicCategoryMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyLibTopicCategoryMapper.xml
index c14ba52..615ca80 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyLibTopicCategoryMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyLibTopicCategoryMapper.xml
@@ -38,15 +38,16 @@
<select id="selectSvyLibScriptCategoryList" parameterType="com.smartor.domain.SvyLibScriptCategory"
resultMap="SvyLibScriptCategoryResult">
<include refid="selectSvyLibScriptCategoryVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
<if test="topicid != null ">and topicid = #{topicid}</if>
<if test="pid != null ">and pid = #{pid}</if>
<if test="guid != null and guid != ''">and guid = #{guid}</if>
<if test="orgid != null ">and orgid = #{orgid}</if>
<if test="seqno != null ">and seqno = #{seqno}</if>
- </where>
+
order by seqno asc
</select>
diff --git a/smartor/src/main/resources/mapper/smartor/SvyLibTopicdirectionMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyLibTopicdirectionMapper.xml
index c3aa74b..d44bb7c 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyLibTopicdirectionMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyLibTopicdirectionMapper.xml
@@ -19,11 +19,12 @@
<select id="selectSvyLibTopicdirectionList" parameterType="com.smartor.domain.SvyLibTopicdirection" resultMap="SvyLibTopicdirectionResult">
<include refid="selectSvyLibTopicdirectionVo"/>
- <where>
+ WHERE 1=1
+
<if test="topicid != null "> and topicid = #{topicid}</if>
<if test="transverse != null and transverse != ''"> and transverse = #{transverse}</if>
<if test="direction != null and direction != ''"> and direction = #{direction}</if>
- </where>
+
</select>
<select id="selectSvyLibTopicdirectionById" parameterType="Long" resultMap="SvyLibTopicdirectionResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SvyTaskAnswerMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyTaskAnswerMapper.xml
index 90b61a4..d86bd38 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyTaskAnswerMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyTaskAnswerMapper.xml
@@ -54,7 +54,8 @@
<select id="selectSvyTaskAnswerList" parameterType="com.smartor.domain.SvyTaskAnswer"
resultMap="SvyTaskAnswerResult">
<include refid="selectSvyTaskAnswerVo"/>
- <where>
+ WHERE 1=1
+
<if test="taskid != null ">and taskid = #{taskid}</if>
<if test="singleid != null ">and singleid = #{singleid}</if>
<if test="scriptid != null ">and scriptid = #{scriptid}</if>
@@ -69,7 +70,7 @@
<if test="pid != null and pid != ''">and pid = #{pid}</if>
<if test="guid != null and guid != ''">and guid = #{guid}</if>
<if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
- </where>
+
</select>
<select id="selectSvyTaskAnswerById" parameterType="Long" resultMap="SvyTaskAnswerResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SvyTaskMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyTaskMapper.xml
index 6d2da2b..8589030 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyTaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyTaskMapper.xml
@@ -107,12 +107,13 @@
<select id="selectSvyTaskList" parameterType="com.smartor.domain.SvyTask" resultMap="SvyTaskResult">
<include refid="selectSvyTaskVo"/>
- <where>
+ WHERE 1=1
+
<if test="svrtaskid != null ">and svrtaskid = #{svrtaskid}</if>
<if test="taskName != null and taskName != ''">and task_name like concat('%', #{taskName}, '%')</if>
<if test="templateid != null and templateid != ''">and templateid = #{templateid}</if>
<if test="templatename != null and templatename != ''">and templatename like concat('%', #{templatename},
- '%')
+ AND '%')
</if>
<if test="labelinfo != null and labelinfo != ''">and labelinfo = #{labelinfo}</if>
<if test="state != null ">and state = #{state}</if>
@@ -122,7 +123,7 @@
<if test="fail != null ">and fail = #{fail}</if>
<if test="patientid != null and patientid != ''">and patientid = #{patientid}</if>
<if test="patientname != null and patientname != ''">and patientname like concat('%', #{patientname},
- '%')
+ AND '%')
</if>
<if test="addtime != null ">and addtime = #{addtime}</if>
<if test="checkuserid != null and checkuserid != ''">and checkuserid = #{checkuserid}</if>
@@ -146,11 +147,11 @@
<if test="sendState != null and sendState != ''">and send_state = #{sendState}</if>
<if test="param != null and param != ''">and param = #{param}</if>
<if test="sendTimeSlot != null and sendTimeSlot != ''">and send_time_slot like concat('%', #{sendTimeSlot},
- '%')
+ AND '%')
</if>
<if test="libtemplateid != null ">and libtemplateid = #{libtemplateid}</if>
<if test="libtemplatename != null and libtemplatename != ''">and libtemplatename = #{libtemplatename}</if>
- </where>
+
</select>
<select id="selectSvyTaskByTaskid" parameterType="Long" resultMap="SvyTaskResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SvyTaskScriptMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyTaskScriptMapper.xml
index 40ac9bd..f2a1837 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyTaskScriptMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyTaskScriptMapper.xml
@@ -40,7 +40,8 @@
<select id="selectSvyTaskScriptList" parameterType="com.smartor.domain.SvyTaskScript" resultMap="SvyTaskScriptResult">
<include refid="selectSvyTaskScriptVo"/>
- <where>
+ WHERE 1=1
+
<if test="scriptType != null "> and script_type = #{scriptType}</if>
<if test="scriptCode != null and scriptCode != ''"> and script_code = #{scriptCode}</if>
<if test="script != null and script != ''"> and script = #{script}</if>
@@ -62,7 +63,7 @@
<if test="score != null and score != ''"> and score = #{score}</if>
<if test="showtype != null and showtype != ''"> and showtype = #{showtype}</if>
<if test="picturePath != null and picturePath != ''"> and picture_path = #{picturePath}</if>
- </where>
+
</select>
<select id="selectSvyTaskScriptById" parameterType="Long" resultMap="SvyTaskScriptResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SvyTaskScriptoptionMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyTaskScriptoptionMapper.xml
index 712201f..60eb399 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyTaskScriptoptionMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyTaskScriptoptionMapper.xml
@@ -54,7 +54,8 @@
<select id="selectSvyTaskScriptoptionList" parameterType="com.smartor.domain.SvyTaskScriptoption" resultMap="SvyTaskScriptoptionResult">
<include refid="selectSvyTaskScriptoptionVo"/>
- <where>
+ WHERE 1=1
+
<if test="taskScriptId != null "> and task_script_id = #{taskScriptId}</if>
<if test="svyid != null "> and svyid = #{svyid}</if>
<if test="scriptType != null "> and script_type = #{scriptType}</if>
@@ -90,7 +91,7 @@
<if test="scoretype != null and scoretype != ''"> and scoretype = #{scoretype}</if>
<if test="showtype != null and showtype != ''"> and showtype = #{showtype}</if>
<if test="picturePath != null and picturePath != ''"> and picture_path = #{picturePath}</if>
- </where>
+
</select>
<select id="selectSvyTaskScriptoptionById" parameterType="Long" resultMap="SvyTaskScriptoptionResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SvyTaskSingleMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyTaskSingleMapper.xml
index dd787d7..e302a76 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyTaskSingleMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyTaskSingleMapper.xml
@@ -144,7 +144,8 @@
<select id="selectSvyTaskSingleList" parameterType="com.smartor.domain.SvyTaskSingle"
resultMap="SvyTaskSingleResult">
<include refid="selectSvyTaskSingleVo"/>
- <where>
+ WHERE 1=1
+
<if test="sendname != null and sendname != ''">and sendname like concat('%', #{sendname}, '%')</if>
<if test="phone != null and phone != ''">and phone = #{phone}</if>
<if test="sex != null and sex != ''">and sex = #{sex}</if>
@@ -156,7 +157,7 @@
<if test="taskid != null ">and taskid = #{taskid}</if>
<if test="templateid != null and templateid != ''">and templateid = #{templateid}</if>
<if test="templatename != null and templatename != ''">and templatename like concat('%', #{templatename},
- '%')
+ AND '%')
</if>
<if test="senddate != null ">and senddate = #{senddate}</if>
<if test="sendlimitabegin != null and sendlimitabegin != ''">and sendlimitabegin = #{sendlimitabegin}</if>
@@ -207,7 +208,7 @@
<if test="roomno != null and roomno != ''">and roomno = #{roomno}</if>
<if test="bedno != null and bedno != ''">and bedno = #{bedno}</if>
<if test="patid != null ">and patid = #{patid}</if>
- </where>
+
</select>
<select id="selectSvyTaskSingleById" parameterType="Long" resultMap="SvyTaskSingleResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateMapper.xml
index 4091b73..f8cec26 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateMapper.xml
@@ -92,8 +92,9 @@
<select id="selectSvyTaskTemplateList" parameterType="com.smartor.domain.SvyTaskTemplate"
resultMap="SvyTaskTemplateResult">
<include refid="selectSvyTaskTemplateVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="templateid != null ">and templateid = #{templateid}</if>
<if test="id != null ">and id = #{id}</if>
<if test="categoryid != null ">and categoryid = #{categoryid}</if>
@@ -127,7 +128,7 @@
<if test="deptCode != null ">and dept_code = #{deptCode}</if>
<if test="longTemp != null ">and long_temp = #{longTemp}</if>
<if test="sendDay != null ">and send_day = #{sendDay}</if>
- </where>
+
</select>
<select id="selectSvyTaskTemplateBySvyid" parameterType="Long" resultMap="SvyTaskTemplateResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateScriptMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateScriptMapper.xml
index f0737c4..657a5f2 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateScriptMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateScriptMapper.xml
@@ -72,7 +72,8 @@
<select id="selectSvyTaskTemplateScriptList" parameterType="com.smartor.domain.SvyTaskTemplateScript"
resultMap="SvyTaskTemplateScriptResult">
<include refid="selectSvyTaskTemplateScriptVo"/>
- <where>
+ WHERE 1=1
+
<if test="taskid != null ">and taskid = #{taskid}</if>
<if test="categoryid != null ">and categoryid = #{categoryid}</if>
<if test="ishide != null ">and ishide = #{ishide}</if>
@@ -82,7 +83,7 @@
<if test="scriptDesc != null and scriptDesc != ''">and script_desc = #{scriptDesc}</if>
<if test="language != null and language != ''">and language = #{language}</if>
<if test="categoryName != null and categoryName != ''">and categoryName like concat('%', #{categoryName},
- '%')
+ AND '%')
</if>
<if test="scriptContent != null and scriptContent != ''">and script_content = #{scriptContent}</if>
<if test="isMust != null and isMust != ''">and is_must = #{isMust}</if>
@@ -110,7 +111,7 @@
<if test="branchNextscriptno != null and branchNextscriptno != ''">and branch_nextscriptno =
#{branchNextscriptno}
</if>
- </where>
+
</select>
<select id="selectSvyTaskTemplateScriptByID" parameterType="Long" resultMap="SvyTaskTemplateScriptResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateTargetoptionMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateTargetoptionMapper.xml
index 46702b3..f1c2555 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateTargetoptionMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateTargetoptionMapper.xml
@@ -72,8 +72,9 @@
<select id="selectSvyTaskTemplateTargetoptionList" parameterType="com.smartor.domain.SvyTaskTemplateTargetoption"
resultMap="SvyTaskTemplateTargetoptionResult">
<include refid="selectSvyTaskTemplateTargetoptionVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
<if test="taskid != null ">and taskid = #{taskid}</if>
<if test="score != null ">and score = #{score}</if>
<if test="prompt != null ">and prompt = #{prompt}</if>
@@ -82,7 +83,7 @@
<if test="targetname != null and targetname != ''">and targetname like concat('%', #{targetname}, '%')</if>
<if test="targettype != null and targettype != ''">and targettype = #{targettype}</if>
<if test="categoryName != null and categoryName != ''">and categoryName like concat('%', #{categoryName},
- '%')
+ AND '%')
</if>
<if test="targetvalue != null and targetvalue != ''">and targetvalue = #{targetvalue}</if>
<if test="targetregex2 != null and targetregex2 != ''">and targetregex2 = #{targetregex2}</if>
@@ -109,7 +110,7 @@
<if test="appenddesc != null">and appenddesc = #{appenddesc}</if>
<if test="sendTaskid != null">and send_taskid= #{sendTaskid}</if>
<if test="sendTaskname != null">and send_taskname = #{sendTaskname}</if>
- </where>
+
</select>
<select id="selectSvyTaskTemplateTargetoptionById" parameterType="Long"
diff --git a/smartor/src/main/resources/mapper/smartor/SvyTopicMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyTopicMapper.xml
index b71d149..5cd24e5 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyTopicMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyTopicMapper.xml
@@ -47,7 +47,8 @@
<select id="selectSvyTopicList" parameterType="com.smartor.domain.SvyTopic" resultMap="SvyTopicResult">
<include refid="selectSvyTopicVo"/>
- <where>
+ WHERE 1=1
+
<if test="topictype != null ">and topictype = #{topictype}</if>
<if test="topiccode != null and topiccode != ''">and topiccode = #{topiccode}</if>
<if test="topic != null and topic != ''">and topic = #{topic}</if>
@@ -58,7 +59,7 @@
<if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
<if test="isupload != null ">and isupload = #{isupload}</if>
<if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
- </where>
+
</select>
<select id="selectSvyTopicByTopicid" parameterType="Long" resultMap="SvyTopicResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SvyTopicoptionMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyTopicoptionMapper.xml
index 3f492aa..05ea2cd 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyTopicoptionMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyTopicoptionMapper.xml
@@ -78,7 +78,8 @@
<select id="selectSvyTopicoptionList" parameterType="com.smartor.domain.SvyTopicoption"
resultMap="SvyTopicoptionResult">
<include refid="selectSvyTopicoptionVo"/>
- <where>
+ WHERE 1=1
+
<if test="topicid != null ">and topicid = #{topicid}</if>
<if test="svyid != null ">and svyid = #{svyid}</if>
<if test="topictype != null ">and topictype = #{topictype}</if>
@@ -104,7 +105,7 @@
<if test="oldid != null ">and oldid = #{oldid}</if>
<if test="isupload != null ">and isupload = #{isupload}</if>
<if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
- </where>
+
</select>
<select id="selectSvyTopicoptionByOptionid" parameterType="Long" resultMap="SvyTopicoptionResult">
diff --git a/smartor/src/main/resources/mapper/smartor/SysUserDeptMapper.xml b/smartor/src/main/resources/mapper/smartor/SysUserDeptMapper.xml
index 0c57056..48a330f 100644
--- a/smartor/src/main/resources/mapper/smartor/SysUserDeptMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SysUserDeptMapper.xml
@@ -47,8 +47,9 @@
<select id="selectSysUserDeptList" parameterType="com.ruoyi.common.core.domain.entity.SysUserDept"
resultMap="SysUserDeptResult">
<include refid="selectSysUserDeptVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+
+ AND del_flag=0
and orgid=#{orgid}
<if test="userId != null ">
and user_id = #{userId}
@@ -74,7 +75,7 @@
<if test="campusid != null ">
and campusid = #{campusid}
</if>
- </where>
+
</select>
<select id="selectSysUserDeptById" parameterType="Long"
diff --git a/smartor/src/main/resources/mapper/smartor/SysUserImportMapper.xml b/smartor/src/main/resources/mapper/smartor/SysUserImportMapper.xml
index d0cd5b7..c2cbf56 100644
--- a/smartor/src/main/resources/mapper/smartor/SysUserImportMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SysUserImportMapper.xml
@@ -116,7 +116,8 @@
<select id="selectSysUserImportList" parameterType="com.smartor.domain.SysUserImport"
resultMap="SysUserImportResult">
<include refid="selectSysUserImportVo"/>
- <where>
+ WHERE 1=1
+
<if test="subId != null ">
and sub_id = #{subId}
</if>
@@ -249,7 +250,7 @@
<if test="defaultWardName != null and defaultWardName != ''">
and default_ward_name = #{defaultWardName}
</if>
- </where>
+
</select>
<select id="selectSysUserImportById" parameterType="Long"
diff --git a/smartor/src/main/resources/mapper/smartor/SysUserRole2Mapper.xml b/smartor/src/main/resources/mapper/smartor/SysUserRole2Mapper.xml
index 8f4154a..cf56145 100644
--- a/smartor/src/main/resources/mapper/smartor/SysUserRole2Mapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SysUserRole2Mapper.xml
@@ -26,11 +26,12 @@
<select id="selectUserRoleByRoleIdAndUserId" resultMap="SysUserRoleResult">
select user_id,role_id,guid,orgid
from sys_user_role
- <where>
+ WHERE 1=1
+
<if test="roleId != null ">and role_id = #{roleId}</if>
<if test="userId != null ">and user_id = #{userId}</if>
- </where>
+
</select>
<delete id="deleteUserRole" parameterType="Long">
diff --git a/smartor/src/main/resources/mapper/smartor/TemplateDeptMapper.xml b/smartor/src/main/resources/mapper/smartor/TemplateDeptMapper.xml
index 8c84d8f..b8f41de 100644
--- a/smartor/src/main/resources/mapper/smartor/TemplateDeptMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/TemplateDeptMapper.xml
@@ -38,8 +38,8 @@
<select id="selectTemplateDeptList" parameterType="com.smartor.domain.TemplateDept"
resultMap="TemplateDeptResult">
<include refid="selectTemplateDeptVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+ AND del_flag=0
<if test="type != null ">
and type = #{type}
</if>
@@ -61,7 +61,7 @@
<if test="longTemp != null and longTemp != ''">
and long_temp = #{longTemp}
</if>
- </where>
+
</select>
<select id="selectTemplateDeptById" parameterType="Long"
--
Gitblit v1.9.3