fix(consultation): 修复达梦数据库关键字冲突问题

- 将 SQL 中的 `type` 字段使用双引号转义为 `\"TYPE\"`
- 解决达梦数据库保留关键字导致的查询异常
- 影响模块:
  - ConDoctorSchedulingMapper.xml
  - ConDepartmentMapper.xml
This commit is contained in:
2026-03-09 10:53:35 +08:00
parent 10d5e6ca4a
commit 8fd4cd9253
6 changed files with 8 additions and 8 deletions
@@ -38,7 +38,7 @@ public interface ConDoctorSchedulingMapper extends BaseMapper<ConDoctorSchedulin
@Update("update con_doctor_scheduling set del_flag = 1 WHERE status = '1' and del_flag = '0' and user_id = #{userId}")
public int deleteDoctorSchedule(String userId);
@Select("SELECT * FROM con_doctor_scheduling WHERE status = '1' and del_flag = '0' and user_id = #{userId} and scheduling_date >= DATE(NOW()) and week = #{week}")
@Select("SELECT * FROM con_doctor_scheduling WHERE status = '1' and del_flag = '0' and user_id = #{userId} and scheduling_date >= TRUNC(SYSDATE) and week = #{week}")
public List<ConDoctorSchedulingDO> selectDoctorSchedulingByWeekAndUserId(String userId, String week);
Boolean updateBatchById(@Param("list") List<ConDoctorScheduling> schedulingList);
@@ -137,12 +137,11 @@
<select id="selectHospitalDepartmentId" resultType="com.renkang.consultation.entity.ConDepartmentDO">
select
distinct a.department_id as "id",
a.department_id as "id",
b.department_name as "departmentName"
from hospital_department a left join con_department b on a.department_id = b.id
where a.hospital_id = #{hospitalId} and b.office_level = 1
GROUP BY a.department_id,b.department_name
order by b.tf_top desc,b.sort
</select>
<select id="getMedicalDepartmentList" resultType="com.renkang.consultation.vo.MedicalDepartmentVO">
@@ -6,7 +6,7 @@
UPDATE con_doctor_scheduling
SET
week = #{item.week},
`type` = #{item.type},
"TYPE" = #{item.type},
am_num = #{item.amNum},
pm_num = #{item.pmNum},
tf_jump_holiday = #{item.tfJumpHoliday},
@@ -31,8 +31,8 @@
</select>
<select id="selectBatchIds" resultType="com.renkang.consultation.entity.ConResource">
SELECT id, resource_name, longitude, latitude, type, second_type, aidrange, gd_id, url, province, city, area,
address, level, img, synopsis, sort, status, del_flag, create_by, create_time, update_by, update_time, memo,
SELECT id, resource_name, longitude, latitude, "TYPE", second_type, aidrange, gd_id, url, province, city, area,
address, "LEVEL", img, synopsis, sort, "STATUS", del_flag, create_by, create_time, update_by, update_time, memo,
key_departments, user_score, user_score_num, resource_detail, tf_top
FROM con_resource
WHERE id IN
@@ -55,7 +55,7 @@
<!--@mbg.generated-->
id, member_id, from_account, to_account, end_time, content_type, reservation_time,
session_type, from_name, member_name, to_name, im_id, session_time, third_account,
third_name, cost, char_date, medical_records_id, `status`, del_flag, create_by, create_time,
third_name, cost, char_date, medical_records_id, "STATUS", del_flag, create_by, create_time,
update_by, update_time, memo, content_status, session_date, week, am_pm, scheduling_date_id,
job_status, member_sex, member_age, session_status, doctor_start_time, doctor_end_time,
reject_reason, reason_type, org_code, from_type, tf_reply, reply_time, user_tf_reply,
@@ -2,9 +2,10 @@ package com.renkang;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration;
import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication(scanBasePackages = {"com.renkang", "org.jeecg"})
@SpringBootApplication(scanBasePackages = {"com.renkang", "org.jeecg"},exclude = QuartzAutoConfiguration .class)
@EnableFeignClients(basePackages = {"com.renkang", "org.jeecg"})
public class HealthConsultationCloudApplication {