|
@@ -121,7 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<include refid="selectFsUserInformationCollectionVo"/>
|
|
<include refid="selectFsUserInformationCollectionVo"/>
|
|
|
where package_order_code = #{orderCode}
|
|
where package_order_code = #{orderCode}
|
|
|
</select>
|
|
</select>
|
|
|
- <select id="selectListByIsPayAndConfirmStatus" resultType="com.fs.his.domain.FsUserInformationCollection">
|
|
|
|
|
|
|
+ <select id="selectListByIsPay" resultType="com.fs.his.domain.FsUserInformationCollection">
|
|
|
SELECT
|
|
SELECT
|
|
|
fuic.id,
|
|
fuic.id,
|
|
|
fuic.question_id,
|
|
fuic.question_id,
|
|
@@ -158,20 +158,48 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
fuic.store_order_id
|
|
fuic.store_order_id
|
|
|
FROM fs_user_information_collection fuic
|
|
FROM fs_user_information_collection fuic
|
|
|
LEFT JOIN fs_store_order fso ON fuic.store_order_id = fso.order_id
|
|
LEFT JOIN fs_store_order fso ON fuic.store_order_id = fso.order_id
|
|
|
- WHERE (
|
|
|
|
|
- (
|
|
|
|
|
- fso.status > 1
|
|
|
|
|
- AND (fuic.doctor_confirm = 0 OR fuic.doctor_type2_confirm = 0)
|
|
|
|
|
|
|
+ WHERE fso.status > 1
|
|
|
|
|
+ AND fuic.doctor_type2_confirm = 0
|
|
|
AND fso.pay_time <= NOW() - INTERVAL 1 HOUR
|
|
AND fso.pay_time <= NOW() - INTERVAL 1 HOUR
|
|
|
- )
|
|
|
|
|
- OR
|
|
|
|
|
- -- 条件2:用户已确认超过1小时
|
|
|
|
|
- (
|
|
|
|
|
- fuic.user_confirm = 1
|
|
|
|
|
- AND fuic.user_confirm_time <= NOW() - INTERVAL 1 HOUR
|
|
|
|
|
- )
|
|
|
|
|
- )
|
|
|
|
|
- -- 确保没有重复记录(如果两个条件可能同时满足)
|
|
|
|
|
|
|
+ GROUP BY fuic.id
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <select id="selectListByUserConfirmStatus" resultType="com.fs.his.domain.FsUserInformationCollection">
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ fuic.id,
|
|
|
|
|
+ fuic.question_id,
|
|
|
|
|
+ fuic.user_id,
|
|
|
|
|
+ fuic.json_info,
|
|
|
|
|
+ fuic.user_confirm,
|
|
|
|
|
+ fuic.user_confirm_time,
|
|
|
|
|
+ fuic.doctor_confirm,
|
|
|
|
|
+ fuic.create_time,
|
|
|
|
|
+ fuic.update_time,
|
|
|
|
|
+ fuic.doctor_id,
|
|
|
|
|
+ fuic.company_user_id,
|
|
|
|
|
+ fuic.package_id,
|
|
|
|
|
+ fuic.pay_type,
|
|
|
|
|
+ fuic.amount,
|
|
|
|
|
+ fuic.is_package,
|
|
|
|
|
+ fuic.user_confirm2,
|
|
|
|
|
+ fuic.package_order_code,
|
|
|
|
|
+ fuic.package_order_id,
|
|
|
|
|
+ fuic.status,
|
|
|
|
|
+ fuic.user_advice,
|
|
|
|
|
+ fuic.doctor_advice,
|
|
|
|
|
+ fuic.doctor_sign,
|
|
|
|
|
+ fuic.doctor_confirm_time,
|
|
|
|
|
+ fuic.sex,
|
|
|
|
|
+ fuic.user_name,
|
|
|
|
|
+ fuic.user_phone_four,
|
|
|
|
|
+ fuic.allergy,
|
|
|
|
|
+ fuic.remark,
|
|
|
|
|
+ fuic.patient_id,
|
|
|
|
|
+ fuic.doctor_type2_id,
|
|
|
|
|
+ fuic.doctor_type2_confirm,
|
|
|
|
|
+ fuic.doctor_type2_sign,
|
|
|
|
|
+ fuic.store_order_id
|
|
|
|
|
+ FROM fs_user_information_collection fuic
|
|
|
|
|
+ WHERE fuic.user_confirm = 1 AND fuic.doctor_confirm = 0 AND fuic.user_confirm_time <= NOW() - INTERVAL 1 HOUR
|
|
|
GROUP BY fuic.id
|
|
GROUP BY fuic.id
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|