select prescribe_id,prescribe_code_url ,prescribe_img_store_url,source,cycle,icd_code,prescribe_type ,recipe_type,patient_birthday,drug_doctor_sign_url,prescribe_doctor_id ,doctor_sign_url,prescribe_doctor_sign_url, inquiry_order_id, store_order_id , user_id, patient_id, prescribe_code, patient_descs, now_illness, history_illness , patient_age, patient_name, weight, is_history_allergic, history_allergic, liver_unusual , renal_unusual, is_lactation, patient_tel, patient_gender, record_pic, prescribe_img_url , audit_reason, diagnose, doctor_id,drug_doctor_id, create_time, status, audit_time,remark ,usage_json,store_id,doctor_confirm, start_operate_time,end_operate_time,operate_second,third_party_user_id,is_send_to_third_party from fs_prescribe insert into fs_prescribe prescribe_type, inquiry_order_id, store_order_id, user_id, patient_id, prescribe_code, patient_descs, now_illness, history_illness, patient_age, patient_name, weight, is_history_allergic, history_allergic, liver_unusual, renal_unusual, is_lactation, patient_tel, patient_gender, record_pic, prescribe_img_url, audit_reason, diagnose, doctor_id, drug_doctor_id, create_time, status, audit_time, remark, usage_json, store_id, prescribe_doctor_id, doctor_sign_url, prescribe_doctor_sign_url, drug_doctor_sign_url, patient_birthday, recipe_type, prescribe_code_url, cycle, icd_code, source, prescribe_img_store_url, doctor_confirm, start_operate_time, end_operate_time, operate_second, third_party_user_id, is_send_to_third_party, #{prescribeType}, #{inquiryOrderId}, #{storeOrderId}, #{userId}, #{patientId}, #{prescribeCode}, #{patientDescs}, #{nowIllness}, #{historyIllness}, #{patientAge}, #{patientName}, #{weight}, #{isHistoryAllergic}, #{historyAllergic}, #{liverUnusual}, #{renalUnusual}, #{isLactation}, #{patientTel}, #{patientGender}, #{recordPic}, #{prescribeImgUrl}, #{auditReason}, #{diagnose}, #{doctorId}, #{drugDoctorId}, #{createTime}, #{status}, #{auditTime}, #{remark}, #{usageJson}, #{storeId}, #{prescribeDoctorId}, #{doctorSignUrl}, #{prescribeDoctorSignUrl}, #{drugDoctorSignUrl}, #{patientBirthday}, #{recipeType}, #{prescribeCodeUrl}, #{cycle}, #{icdCode}, #{source}, #{prescribeImgStoreUrl}, #{doctorConfirm}, #{startOperateTime}, #{endOperateTime}, #{operateSecond}, #{thirdPartyUserId}, #{isSendToThirdParty}, update fs_prescribe prescribe_type = #{prescribeType}, inquiry_order_id = #{inquiryOrderId}, store_order_id = #{storeOrderId}, user_id = #{userId}, patient_id = #{patientId}, prescribe_code = #{prescribeCode}, patient_descs = #{patientDescs}, now_illness = #{nowIllness}, history_illness = #{historyIllness}, patient_age = #{patientAge}, patient_name = #{patientName}, weight = #{weight}, is_history_allergic = #{isHistoryAllergic}, history_allergic = #{historyAllergic}, liver_unusual = #{liverUnusual}, renal_unusual = #{renalUnusual}, is_lactation = #{isLactation}, patient_tel = #{patientTel}, patient_gender = #{patientGender}, record_pic = #{recordPic}, prescribe_img_url = #{prescribeImgUrl}, audit_reason = #{auditReason}, diagnose = #{diagnose}, doctor_id = #{doctorId}, drug_doctor_id = #{drugDoctorId}, create_time = #{createTime}, status = #{status}, audit_time = #{auditTime}, remark = #{remark}, usage_json = #{usageJson}, store_id = #{storeId}, prescribe_doctor_id = #{prescribeDoctorId}, doctor_sign_url = #{doctorSignUrl}, prescribe_doctor_sign_url = #{prescribeDoctorSignUrl}, drug_doctor_sign_url = #{drugDoctorSignUrl}, patient_birthday = #{patientBirthday}, recipe_type = #{recipeType}, prescribe_code_url = #{prescribeCodeUrl}, cycle = #{cycle}, icd_code = #{icdCode}, source = #{source}, prescribe_img_store_url = #{prescribeImgStoreUrl}, doctor_confirm = #{doctorConfirm}, start_operate_time = #{startOperateTime}, end_operate_time = #{endOperateTime}, operate_second = #{operateSecond}, third_party_user_id = #{thirdPartyUserId}, is_send_to_third_party = #{isSendToThirdParty}, where prescribe_id = #{prescribeId} delete from fs_prescribe where prescribe_id = #{prescribeId} delete from fs_prescribe where prescribe_id in #{prescribeId} update fs_prescribe set is_send_to_third_party = 1 where prescribe_id in #{prescribeId} and status = 1 and is_send_to_third_party = 0 and prescribe_img_url is not null