Andru
2024-01-11 79a4f2ac9feaba130ddfb412d9b377befad0c10f
提交 | 用户 | age
be3140 1 <?xml version="1.0" encoding="UTF-8" ?>
R 2 <!DOCTYPE mapper
3 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5 <!-- namespace:该mapper.xml映射文件的 唯一标识 -->
6 <mapper namespace="com.hx.phip.dao.mapper.AppointmentMapper">
7
8     <!-- 整个实体类修改,表字段=实体类字段-->
9     <sql id="Update_Column_All">
10         <trim prefixOverrides=",">
79a4f2 11             ,shopId = #{shopId},doctorId = #{doctorId},obeyDoctor = #{obeyDoctor},userId = #{userId},nurseId = #{nurseId},startTime = #{startTime},endTime = #{endTime},specialUser = #{specialUser},duration = #{duration},corpUserId = #{corpUserId},createCorpUserId = #{createCorpUserId},createRoleId = #{createRoleId},createRoleStr = #{createRoleStr},createManId = #{createManId},createManName = #{createManName},createManType = #{createManType},visitType = #{visitType},appType = #{appType},comDuration = #{comDuration},docComDuration = #{docComDuration},readyDuration = #{readyDuration},proDuration = #{proDuration},treatDuration = #{treatDuration},comRoomId = #{comRoomId},treatRoomId = #{treatRoomId},remark = #{remark},obeyTime = #{obeyTime},status = #{status},approveAdmin = #{approveAdmin},approveRoleCode = #{approveRoleCode},approveRemark = #{approveRemark},cancelApproveRemark = #{cancelApproveRemark},dayStr = #{dayStr},weekStr = #{weekStr},monthStr = #{monthStr},isSwitch = #{isSwitch},occupySwitch = #{occupySwitch},rulePreType = #{rulePreType},notifyStatus = #{notifyStatus},isModify = #{isModify},isApproveModify = #{isApproveModify},isMicApprove = #{isMicApprove},cancelStatus = #{cancelStatus},cancelType = #{cancelType},cancelRemark = #{cancelRemark},isArrive = #{isArrive},projectNames = #{projectNames},projectIds = #{projectIds},imgUrls = #{imgUrls},isReadyNotify = #{isReadyNotify},isUnArriveNotify = #{isUnArriveNotify},applyCancelTime = #{applyCancelTime},arriveTime = #{arriveTime},realDuration = #{realDuration},realComDuration = #{realComDuration},realProDuration = #{realProDuration},realDocComDuration = #{realDocComDuration},realTreatDuration = #{realTreatDuration},realReadyDuration = #{realReadyDuration},isAnaesthesia = #{isAnaesthesia},apiId = #{apiId},needSync = #{needSync},corpUserTeamId = #{corpUserTeamId},projectJson = #{projectJson},activityDayId = #{activityDayId},addMode = #{addMode},recordType = #{recordType},relationId = #{relationId},waitDuration = #{waitDuration},realWaitDuration = #{realWaitDuration},palsyDuration = #{palsyDuration},realPalsyDuration = #{realPalsyDuration},doctorZlDuration = #{doctorZlDuration},isLifeBeauty = #{isLifeBeauty},isSendMsg = #{isSendMsg},isArriveSendMsg = #{isArriveSendMsg},deductionNum = #{deductionNum},isPretriage = #{isPretriage},isAutoTriage = #{isAutoTriage},sourceId = #{sourceId},orStartTime = #{orStartTime},cancelTime = #{cancelTime},approveTime = #{approveTime},isUpOrder = #{isUpOrder},micRemark = #{micRemark},isDel = #{isDel},createTime = #{createTime},editTime = #{editTime}
be3140 12         </trim>
R 13     </sql>
14      
15     <!--  后续通过  namespace.id-->
16     <!--parameterType:输入参数的类型
17     resultType:查询返回结果值的类型  ,返回类型  -->
18     <insert id="insert" parameterType="com.hx.phiappt.model.Appointment">
19         <selectKey keyProperty="id" resultType="String" order="BEFORE">
20                select replace(uuid(),'-','') from dual
21         </selectKey>
79a4f2 22         insert into appointment (id,shopId,doctorId,obeyDoctor,userId,nurseId,startTime,endTime,specialUser,duration,corpUserId,createCorpUserId,createRoleId,createRoleStr,createManId,createManName,createManType,visitType,appType,comDuration,docComDuration,readyDuration,proDuration,treatDuration,comRoomId,treatRoomId,remark,obeyTime,status,approveAdmin,approveRoleCode,approveRemark,cancelApproveRemark,dayStr,weekStr,monthStr,isSwitch,occupySwitch,rulePreType,notifyStatus,isModify,isApproveModify,isMicApprove,cancelStatus,cancelType,cancelRemark,isArrive,projectNames,projectIds,imgUrls,isReadyNotify,isUnArriveNotify,applyCancelTime,arriveTime,realDuration,realComDuration,realProDuration,realDocComDuration,realTreatDuration,realReadyDuration,isAnaesthesia,apiId,needSync,corpUserTeamId,projectJson,activityDayId,addMode,recordType,relationId,waitDuration,realWaitDuration,palsyDuration,realPalsyDuration,doctorZlDuration,isLifeBeauty,isSendMsg,isArriveSendMsg,deductionNum,isPretriage,isAutoTriage,sourceId,orStartTime,cancelTime,approveTime,isUpOrder,micRemark,isDel,createTime,editTime)  values (#{id},#{shopId},#{doctorId},#{obeyDoctor},#{userId},#{nurseId},#{startTime},#{endTime},#{specialUser},#{duration},#{corpUserId},#{createCorpUserId},#{createRoleId},#{createRoleStr},#{createManId},#{createManName},#{createManType},#{visitType},#{appType},#{comDuration},#{docComDuration},#{readyDuration},#{proDuration},#{treatDuration},#{comRoomId},#{treatRoomId},#{remark},#{obeyTime},#{status},#{approveAdmin},#{approveRoleCode},#{approveRemark},#{cancelApproveRemark},#{dayStr},#{weekStr},#{monthStr},#{isSwitch},#{occupySwitch},#{rulePreType},#{notifyStatus},#{isModify},#{isApproveModify},#{isMicApprove},#{cancelStatus},#{cancelType},#{cancelRemark},#{isArrive},#{projectNames},#{projectIds},#{imgUrls},#{isReadyNotify},#{isUnArriveNotify},#{applyCancelTime},#{arriveTime},#{realDuration},#{realComDuration},#{realProDuration},#{realDocComDuration},#{realTreatDuration},#{realReadyDuration},#{isAnaesthesia},#{apiId},#{needSync},#{corpUserTeamId},#{projectJson},#{activityDayId},#{addMode},#{recordType},#{relationId},#{waitDuration},#{realWaitDuration},#{palsyDuration},#{realPalsyDuration},#{doctorZlDuration},#{isLifeBeauty},#{isSendMsg},#{isArriveSendMsg},#{deductionNum},#{isPretriage},#{isAutoTriage},#{sourceId},#{orStartTime},#{cancelTime},#{approveTime},#{isUpOrder},#{micRemark},#{isDel},#{createTime},#{editTime})
be3140 23     </insert>
9aa7e6 24
F 25     <insert id="insertById" parameterType="com.hx.phiappt.model.Appointment">
79a4f2 26         insert into appointment (id,shopId,doctorId,obeyDoctor,userId,nurseId,startTime,endTime,specialUser,duration,corpUserId,createCorpUserId,createRoleId,createRoleStr,createManId,createManName,createManType,visitType,appType,comDuration,docComDuration,readyDuration,proDuration,treatDuration,comRoomId,treatRoomId,remark,obeyTime,status,approveAdmin,approveRoleCode,approveRemark,cancelApproveRemark,dayStr,weekStr,monthStr,isSwitch,occupySwitch,rulePreType,notifyStatus,isModify,isApproveModify,isMicApprove,cancelStatus,cancelType,cancelRemark,isArrive,projectNames,projectIds,imgUrls,isReadyNotify,isUnArriveNotify,applyCancelTime,arriveTime,realDuration,realComDuration,realProDuration,realDocComDuration,realTreatDuration,realReadyDuration,isAnaesthesia,apiId,needSync,corpUserTeamId,projectJson,activityDayId,addMode,recordType,relationId,waitDuration,realWaitDuration,palsyDuration,realPalsyDuration,doctorZlDuration,isLifeBeauty,isSendMsg,isArriveSendMsg,deductionNum,isPretriage,isAutoTriage,sourceId,orStartTime,cancelTime,approveTime,isUpOrder,micRemark,isDel,createTime,editTime)  values (#{id},#{shopId},#{doctorId},#{obeyDoctor},#{userId},#{nurseId},#{startTime},#{endTime},#{specialUser},#{duration},#{corpUserId},#{createCorpUserId},#{createRoleId},#{createRoleStr},#{createManId},#{createManName},#{createManType},#{visitType},#{appType},#{comDuration},#{docComDuration},#{readyDuration},#{proDuration},#{treatDuration},#{comRoomId},#{treatRoomId},#{remark},#{obeyTime},#{status},#{approveAdmin},#{approveRoleCode},#{approveRemark},#{cancelApproveRemark},#{dayStr},#{weekStr},#{monthStr},#{isSwitch},#{occupySwitch},#{rulePreType},#{notifyStatus},#{isModify},#{isApproveModify},#{isMicApprove},#{cancelStatus},#{cancelType},#{cancelRemark},#{isArrive},#{projectNames},#{projectIds},#{imgUrls},#{isReadyNotify},#{isUnArriveNotify},#{applyCancelTime},#{arriveTime},#{realDuration},#{realComDuration},#{realProDuration},#{realDocComDuration},#{realTreatDuration},#{realReadyDuration},#{isAnaesthesia},#{apiId},#{needSync},#{corpUserTeamId},#{projectJson},#{activityDayId},#{addMode},#{recordType},#{relationId},#{waitDuration},#{realWaitDuration},#{palsyDuration},#{realPalsyDuration},#{doctorZlDuration},#{isLifeBeauty},#{isSendMsg},#{isArriveSendMsg},#{deductionNum},#{isPretriage},#{isAutoTriage},#{sourceId},#{orStartTime},#{cancelTime},#{approveTime},#{isUpOrder},#{micRemark},#{isDel},#{createTime},#{editTime})
9aa7e6 27     </insert>
be3140 28
R 29     <select id="selectList" resultType="com.hx.phiappt.model.Appointment" parameterType="com.hx.mybatisTool.SqlSentence" >
30         ${sqlSentence}
31     </select>
32
33     <select id="selectListMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" >
34             ${sqlSentence}
35     </select>
36
37     <select id="selectOne" resultType="com.hx.phiappt.model.Appointment" parameterType="com.hx.mybatisTool.SqlSentence" >
38         ${sqlSentence}
39     </select>
40
41     <select id="selectOneMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" >
42             ${sqlSentence}
43     </select>
44
45     <select id="selectCount" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" >
46             select
47                 COUNT(*)
48             from appointment
49                 WHERE ${sqlSentence}
50     </select>
51
52     <select id="selectCountSql" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" >
53             ${sqlSentence}
54      </select>
55
56     <select id="selectOneByKey" resultType="com.hx.phiappt.model.Appointment" parameterType="java.lang.Object" >
57         select 
79a4f2 58             id,shopId,doctorId,obeyDoctor,userId,nurseId,startTime,endTime,specialUser,duration,corpUserId,createCorpUserId,createRoleId,createRoleStr,createManId,createManName,createManType,visitType,appType,comDuration,docComDuration,readyDuration,proDuration,treatDuration,comRoomId,treatRoomId,remark,obeyTime,status,approveAdmin,approveRoleCode,approveRemark,cancelApproveRemark,dayStr,weekStr,monthStr,isSwitch,occupySwitch,rulePreType,notifyStatus,isModify,isApproveModify,isMicApprove,cancelStatus,cancelType,cancelRemark,isArrive,projectNames,projectIds,imgUrls,isReadyNotify,isUnArriveNotify,applyCancelTime,arriveTime,realDuration,realComDuration,realProDuration,realDocComDuration,realTreatDuration,realReadyDuration,isAnaesthesia,apiId,needSync,corpUserTeamId,projectJson,activityDayId,addMode,recordType,relationId,waitDuration,realWaitDuration,palsyDuration,realPalsyDuration,doctorZlDuration,isLifeBeauty,isSendMsg,isArriveSendMsg,deductionNum,isPretriage,isAutoTriage,sourceId,orStartTime,cancelTime,approveTime,isUpOrder,micRemark,isDel,createTime,editTime
be3140 59         from appointment
R 60         WHERE id = #{value}
61     </select>
62
63     <select id="selectOneByKeyBlob" resultType="com.hx.phiappt.model.Appointment" parameterType="java.lang.Object" >
64         select 
79a4f2 65             id,shopId,doctorId,obeyDoctor,userId,nurseId,startTime,endTime,specialUser,duration,corpUserId,createCorpUserId,createRoleId,createRoleStr,createManId,createManName,createManType,visitType,appType,comDuration,docComDuration,readyDuration,proDuration,treatDuration,comRoomId,treatRoomId,remark,obeyTime,status,approveAdmin,approveRoleCode,approveRemark,cancelApproveRemark,dayStr,weekStr,monthStr,isSwitch,occupySwitch,rulePreType,notifyStatus,isModify,isApproveModify,isMicApprove,cancelStatus,cancelType,cancelRemark,isArrive,projectNames,projectIds,imgUrls,isReadyNotify,isUnArriveNotify,applyCancelTime,arriveTime,realDuration,realComDuration,realProDuration,realDocComDuration,realTreatDuration,realReadyDuration,isAnaesthesia,apiId,needSync,corpUserTeamId,projectJson,activityDayId,addMode,recordType,relationId,waitDuration,realWaitDuration,palsyDuration,realPalsyDuration,doctorZlDuration,isLifeBeauty,isSendMsg,isArriveSendMsg,deductionNum,isPretriage,isAutoTriage,sourceId,orStartTime,cancelTime,approveTime,isUpOrder,micRemark,isDel,createTime,editTime
be3140 66         from appointment
R 67         WHERE id = #{value}
68     </select>
69
70     <update id="updateWhere" parameterType="com.hx.mybatisTool.SqlSentence">
71         update
72             appointment
73         SET ${sqlSentence}
74     </update>
75
76     <update id="updateAll" parameterType="com.hx.phiappt.model.Appointment">
77         update appointment
78             SET <include refid="Update_Column_All"/>
79         WHERE id = #{id}
80     </update>
81
82     <delete id="deleteWhere"  parameterType="com.hx.mybatisTool.SqlSentence">
83         delete from appointment WHERE ${sqlSentence}
84     </delete>
85
86     <delete id="deleteById"  parameterType="java.lang.Object">
87         delete from appointment WHERE id = #{value}
88     </delete>
89     
90 </mapper>