Buggy code:
public interface PrescriptionDao { @ Insert ( "insert<seq2seq4repair_space>prescription(uuid,<seq2seq4repair_space>outer_id,<seq2seq4repair_space>hospital_id,<seq2seq4repair_space>patient_name,<seq2seq4repair_space>sex,<seq2seq4repair_space>packet_num,<seq2seq4repair_space>price,<seq2seq4repair_space>create_time,<seq2seq4repair_space>class_of_medicines,<seq2seq4repair_space>need_decoct_first,<seq2seq4repair_space>" + ( ( ( "need_decoct_later,<seq2seq4repair_space>need_wrapped_decoct,<seq2seq4repair_space>need_take_drenched,<seq2seq4repair_space>need_melt,<seq2seq4repair_space>need_decoct_alone,<seq2seq4repair_space>process,<seq2seq4repair_space>process_id)<seq2seq4repair_space>" + "values(#{prs.uuid},<seq2seq4repair_space>#{prs.outer_id},<seq2seq4repair_space>#{prs.hospital_id},<seq2seq4repair_space>#{prs.patient_name},<seq2seq4repair_space>#{prs.sex},<seq2seq4repair_space>#{prs.packet_num},<seq2seq4repair_space>#{prs.price},<seq2seq4repair_space>#{prs.create_time},<seq2seq4repair_space>" ) + "#{prs.class_of_medicines},<seq2seq4repair_space>#{prs.need_decoct_first},<seq2seq4repair_space>#{prs.need_decoct_later},<seq2seq4repair_space>#{prs.need_wrapped_decoct},<seq2seq4repair_space>#{prs.need_take_drenched},<seq2seq4repair_space>" ) + "#{prs.need_melt},<seq2seq4repair_space>#{prs.need_decoct_alone},<seq2seq4repair_space>#{prs.process},<seq2seq4repair_space>#{prs.process_id})" ) ) int createPrescription ( @ Param ( "prs" ) Prescription prs ) { } @ Select ( "select<seq2seq4repair_space>p.*,<seq2seq4repair_space>h.name<seq2seq4repair_space>as<seq2seq4repair_space>hospital_name<seq2seq4repair_space>from<seq2seq4repair_space>prescription<seq2seq4repair_space>as<seq2seq4repair_space>p,<seq2seq4repair_space>hospital<seq2seq4repair_space>as<seq2seq4repair_space>h<seq2seq4repair_space>" + "where<seq2seq4repair_space>p.id<seq2seq4repair_space>=<seq2seq4repair_space>#{id}<seq2seq4repair_space>and<seq2seq4repair_space>p.hospital_id<seq2seq4repair_space>=<seq2seq4repair_space>h.id" ) Prescription getPrescriptionByID ( @ Param ( "id" ) int id ) { } @ Select ( "select<seq2seq4repair_space>p.*,<seq2seq4repair_space>h.name<seq2seq4repair_space>as<seq2seq4repair_space>hospital_name<seq2seq4repair_space>from<seq2seq4repair_space>prescription<seq2seq4repair_space>as<seq2seq4repair_space>p,<seq2seq4repair_space>hospital<seq2seq4repair_space>as<seq2seq4repair_space>h<seq2seq4repair_space>where<seq2seq4repair_space>p.uuid<seq2seq4repair_space>=<seq2seq4repair_space>#{uuid}<seq2seq4repair_space>and<seq2seq4repair_space>p.hospital_id<seq2seq4repair_space>=<seq2seq4repair_space>h.id" ) Prescription getPrescriptionByUUID ( @ Param ( "uuid" ) String uuid ) { } @ Select ( "select<seq2seq4repair_space>p.*,<seq2seq4repair_space>h.name<seq2seq4repair_space>as<seq2seq4repair_space>hospital_name<seq2seq4repair_space>from<seq2seq4repair_space>prescription<seq2seq4repair_space>as<seq2seq4repair_space>p,<seq2seq4repair_space>hospital<seq2seq4repair_space>as<seq2seq4repair_space>h<seq2seq4repair_space>where<seq2seq4repair_space>p.process<seq2seq4repair_space>=<seq2seq4repair_space>#{process}<seq2seq4repair_space>and<seq2seq4repair_space>p.hospital_id<seq2seq4repair_space>=<seq2seq4repair_space>h.id" ) List < Prescription > getPrescriptionsByProcess ( @ Param ( "process" ) int process ) { } @ Select ( "select<seq2seq4repair_space>p.*,<seq2seq4repair_space>h.name<seq2seq4repair_space>as<seq2seq4repair_space>hospital_name<seq2seq4repair_space>from<seq2seq4repair_space>prescription<seq2seq4repair_space>as<seq2seq4repair_space>p,<seq2seq4repair_space>hospital<seq2seq4repair_space>as<seq2seq4repair_space>h<seq2seq4repair_space>where<seq2seq4repair_space>p.process<seq2seq4repair_space>=<seq2seq4repair_space>#{process}<seq2seq4repair_space>and<seq2seq4repair_space>p.hospital_id<seq2seq4repair_space>=<seq2seq4repair_space>h.id<seq2seq4repair_space>and<seq2seq4repair_space>p.create_time<seq2seq4repair_space>>=<seq2seq4repair_space>#{start}<seq2seq4repair_space>and<seq2seq4repair_space>p.finish_time<seq2seq4repair_space><=<seq2seq4repair_space>#{end}" ) List < Prescription > getPrescriptionsByProcessAndTime ( @ Param ( "process" ) int process , @ Param ( "start" ) String start , @ Param ( "end" ) String end ) { } @ Select ( "select<seq2seq4repair_space>p.*,<seq2seq4repair_space>h.name<seq2seq4repair_space>as<seq2seq4repair_space>hospital_name<seq2seq4repair_space>from<seq2seq4repair_space>prescription<seq2seq4repair_space>as<seq2seq4repair_space>p,<seq2seq4repair_space>hospital<seq2seq4repair_space>as<seq2seq4repair_space>h<seq2seq4repair_space>" + "where<seq2seq4repair_space>p.process<seq2seq4repair_space>=<seq2seq4repair_space>#{process}<seq2seq4repair_space>and<seq2seq4repair_space>h.id<seq2seq4repair_space>=<seq2seq4repair_space>#{hospitalId}<seq2seq4repair_space>and<seq2seq4repair_space>p.hospital_id<seq2seq4repair_space>=<seq2seq4repair_space>h.id<seq2seq4repair_space>and<seq2seq4repair_space>p.create_time<seq2seq4repair_space>>=<seq2seq4repair_space>#{start}<seq2seq4repair_space>and<seq2seq4repair_space>p.finish_time<seq2seq4repair_space><=<seq2seq4repair_space>#{end}" ) List < Prescription > getPrescriptionsByParamswithTime ( @ Param ( "process" ) int process , @ Param ( "hospitalId" ) int hospitalId , @ Param ( "start" ) String start , @ Param ( "end" ) String end ) { } @ Select ( "select<seq2seq4repair_space>p.*,<seq2seq4repair_space>h.name<seq2seq4repair_space>as<seq2seq4repair_space>hospital_name<seq2seq4repair_space>from<seq2seq4repair_space>prescription<seq2seq4repair_space>as<seq2seq4repair_space>p,<seq2seq4repair_space>hospital<seq2seq4repair_space>as<seq2seq4repair_space>h<seq2seq4repair_space>where<seq2seq4repair_space>p.process<seq2seq4repair_space>=<seq2seq4repair_space>#{process}<seq2seq4repair_space>and<seq2seq4repair_space>h.id<seq2seq4repair_space>=<seq2seq4repair_space>#{hospitalId}<seq2seq4repair_space>and<seq2seq4repair_space>p.hospital_id<seq2seq4repair_space>=<seq2seq4repair_space>h.id" ) List < Prescription > getPrescriptionsByParams ( @ Param ( "process" ) int process , @ Param ( "hospitalId<seq2seq4repair_space>" ) int hospitalId ) { } @ Select ( "select<seq2seq4repair_space>p.*,<seq2seq4repair_space>h.name<seq2seq4repair_space>as<seq2seq4repair_space>hospital_name<seq2seq4repair_space>from<seq2seq4repair_space>prescription<seq2seq4repair_space>as<seq2seq4repair_space>p,<seq2seq4repair_space>hospital<seq2seq4repair_space>as<seq2seq4repair_space>h<seq2seq4repair_space>" + "where<seq2seq4repair_space>h.id<seq2seq4repair_space>=<seq2seq4repair_space>#{hospitalId}<seq2seq4repair_space>and<seq2seq4repair_space>h.id<seq2seq4repair_space>=<seq2seq4repair_space>p.hospital_id<seq2seq4repair_space>and<seq2seq4repair_space>p.process<seq2seq4repair_space><<seq2seq4repair_space>11" ) List < Prescription > getPrescriptionByHospitalName ( @ Param ( "hospitalId" ) int hospitalId ) { } @ Select ( "select<seq2seq4repair_space>p.*,<seq2seq4repair_space>h.name<seq2seq4repair_space>as<seq2seq4repair_space>hospital_name<seq2seq4repair_space>from<seq2seq4repair_space>prescription<seq2seq4repair_space>as<seq2seq4repair_space>p,<seq2seq4repair_space>hospital<seq2seq4repair_space>as<seq2seq4repair_space>h<seq2seq4repair_space>" + "where<seq2seq4repair_space>p.process<seq2seq4repair_space><<seq2seq4repair_space>11<seq2seq4repair_space>and<seq2seq4repair_space>p.hospital_id<seq2seq4repair_space>=<seq2seq4repair_space>h.id<seq2seq4repair_space>" ) List < Prescription > getPrescriptionsUnfinished ( ) { } <START_BUG> @ Select ( "select<seq2seq4repair_space>count(*)<seq2seq4repair_space>from<seq2seq4repair_space>prescription<seq2seq4repair_space>as<seq2seq4repair_space>p,<seq2seq4repair_space>hospital<seq2seq4repair_space>as<seq2seq4repair_space>h<seq2seq4repair_space>where<seq2seq4repair_space>h.id<seq2seq4repair_space>=<seq2seq4repair_space>#{hospitalId}<seq2seq4repair_space>and<seq2seq4repair_space>p.hospital_id<seq2seq4repair_space>=<seq2seq4repair_space>h.id<seq2seq4repair_space>and<seq2seq4repair_space>p.process<seq2seq4repair_space>=<seq2seq4repair_space>#{process}<seq2seq4repair_space>" + "and<seq2seq4repair_space>p.create_time<seq2seq4repair_space>><seq2seq4repair_space>#{start}<seq2seq4repair_space>and<seq2seq4repair_space>p.finish_time<seq2seq4repair_space><<seq2seq4repair_space>#{end}" ) <END_BUG> int countPrsNumForHospital ( @ Param ( "hospitalId" ) int hospitalId , @ Param ( "process" ) int process , @ Param ( "start" ) String start , @ Param ( "end" ) String end ) ; @ Select ( "select<seq2seq4repair_space>*<seq2seq4repair_space>from<seq2seq4repair_space>prescription<seq2seq4repair_space>where<seq2seq4repair_space>hospital_id<seq2seq4repair_space>=<seq2seq4repair_space>#{hospital_id}<seq2seq4repair_space>and<seq2seq4repair_space>process<seq2seq4repair_space>=<seq2seq4repair_space>#{process}" ) List < Prescription > getPrescriptionByHospitalwithProcess ( @ Param ( "hospital_id" ) int hospital_id , @ Param ( "process" ) int process ) { } @ Update ( "update<seq2seq4repair_space>prescription<seq2seq4repair_space>set<seq2seq4repair_space>process<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.process},<seq2seq4repair_space>process_id<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.process_id}<seq2seq4repair_space>where<seq2seq4repair_space>id<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.id}" ) int updatePrescriptionProcess ( @ Param ( "prs" ) Prescription prs ) { } @ Update ( "update<seq2seq4repair_space>prescription<seq2seq4repair_space>set<seq2seq4repair_space>outer_id<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.outer_id},<seq2seq4repair_space>hospital_id<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.hospital_id},<seq2seq4repair_space>patient_name<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.patient_name},<seq2seq4repair_space>" + "sex<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.sex},<seq2seq4repair_space>packet_num<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.packet_num},<seq2seq4repair_space>price<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.price}<seq2seq4repair_space>where<seq2seq4repair_space>id<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.id}" ) int updatePrescriptionByPhase1 ( @ Param ( "prs" ) Prescription prs ) { } @ Update ( "update<seq2seq4repair_space>prescription<seq2seq4repair_space>set<seq2seq4repair_space>class_of_medicines<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.class_of_medicines},<seq2seq4repair_space>need_decoct_first<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.need_decoct_first},<seq2seq4repair_space>" + ( ( ( "decoct_first_list<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.decoct_first_list},<seq2seq4repair_space>need_decoct_later<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.need_decoct_later},<seq2seq4repair_space>decoct_later_list<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.decoct_later_list},<seq2seq4repair_space>" + "need_wrapped_decoct<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.need_wrapped_decoct},<seq2seq4repair_space>wrapped_decoct_list<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.wrapped_decoct_list},<seq2seq4repair_space>need_take_drenched<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.need_take_drenched},<seq2seq4repair_space>" ) + "take_drenched_list<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.take_drenched_list},<seq2seq4repair_space>need_melt<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.need_melt},<seq2seq4repair_space>melt_list<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.melt_list},<seq2seq4repair_space>need_decoct_alone<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.need_decoct_alone},<seq2seq4repair_space>" ) + "decoct_alone_list<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.decoct_alone_list}<seq2seq4repair_space>where<seq2seq4repair_space>uuid<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.uuid}" ) ) int updatePrescriptionMethods ( @ Param ( "prs" ) Prescription prs ) { } @ Update ( "update<seq2seq4repair_space>prescription<seq2seq4repair_space>set<seq2seq4repair_space>finish_time<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.finish_time}<seq2seq4repair_space>where<seq2seq4repair_space>uuid<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.uuid}" ) int updatePrescriptionFinishTime ( @ Param ( "prs" ) Prescription prs ) { } @ Select ( "select<seq2seq4repair_space>p.*,<seq2seq4repair_space>h.name<seq2seq4repair_space>as<seq2seq4repair_space>hospital_name<seq2seq4repair_space>from<seq2seq4repair_space>prescription<seq2seq4repair_space>as<seq2seq4repair_space>p,<seq2seq4repair_space>hospital<seq2seq4repair_space>as<seq2seq4repair_space>h<seq2seq4repair_space>where<seq2seq4repair_space>p.id<seq2seq4repair_space>=<seq2seq4repair_space>(select<seq2seq4repair_space>max(id)<seq2seq4repair_space>from<seq2seq4repair_space>prescription)<seq2seq4repair_space>and<seq2seq4repair_space>p.hospital_id<seq2seq4repair_space>=<seq2seq4repair_space>h.id" ) Prescription getLastestPrescription ( ) { } @ Select ( "select<seq2seq4repair_space>count(*)<seq2seq4repair_space>from<seq2seq4repair_space>prescription<seq2seq4repair_space>as<seq2seq4repair_space>p,<seq2seq4repair_space>hospital<seq2seq4repair_space>as<seq2seq4repair_space>h<seq2seq4repair_space>where<seq2seq4repair_space>h.name<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.hospital_name}<seq2seq4repair_space>and<seq2seq4repair_space>p.outer_id<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.outer_id}<seq2seq4repair_space>and<seq2seq4repair_space>p.hospital_id<seq2seq4repair_space>=<seq2seq4repair_space>h.id" ) int countPrescriptionWithHospitalInfo ( @ Param ( "prs" ) Prescription prs ) { } @ Delete ( "delete<seq2seq4repair_space>from<seq2seq4repair_space>prescription<seq2seq4repair_space>where<seq2seq4repair_space>id<seq2seq4repair_space>=<seq2seq4repair_space>#{prsId}" ) int deletePrescription ( @ Param ( "prsId" ) int prsId ) { } @ Select ( "select<seq2seq4repair_space>p.*,<seq2seq4repair_space>h.name<seq2seq4repair_space>as<seq2seq4repair_space>hospital_name<seq2seq4repair_space>from<seq2seq4repair_space>prescription<seq2seq4repair_space>as<seq2seq4repair_space>p,<seq2seq4repair_space>hospital<seq2seq4repair_space>as<seq2seq4repair_space>h<seq2seq4repair_space>" + "where<seq2seq4repair_space>p.process<seq2seq4repair_space>=<seq2seq4repair_space>#{process}<seq2seq4repair_space>and<seq2seq4repair_space>p.process_id<seq2seq4repair_space>=<seq2seq4repair_space>-1<seq2seq4repair_space>and<seq2seq4repair_space>p.hospital_id<seq2seq4repair_space>=<seq2seq4repair_space>h.id" ) List < Prescription > getPrsListWithProcess_Ship ( @ Param ( "process" ) int process ) { } @ Select ( "select<seq2seq4repair_space>p.*,<seq2seq4repair_space>h.name<seq2seq4repair_space>as<seq2seq4repair_space>hospital_name<seq2seq4repair_space>from<seq2seq4repair_space>prescription<seq2seq4repair_space>as<seq2seq4repair_space>p,<seq2seq4repair_space>hospital<seq2seq4repair_space>as<seq2seq4repair_space>h<seq2seq4repair_space>" + "where<seq2seq4repair_space>p.process<seq2seq4repair_space>=<seq2seq4repair_space>#{process}<seq2seq4repair_space>and<seq2seq4repair_space>p.hospital_id<seq2seq4repair_space>=<seq2seq4repair_space>h.id" ) List < Prescription > getPrsListWithProcess ( @ Param ( "process" ) int process ) { } @ Select ( "select<seq2seq4repair_space>p.*,<seq2seq4repair_space>h.name<seq2seq4repair_space>as<seq2seq4repair_space>hospital_name<seq2seq4repair_space>from<seq2seq4repair_space>prescription<seq2seq4repair_space>as<seq2seq4repair_space>p,<seq2seq4repair_space>hospital<seq2seq4repair_space>as<seq2seq4repair_space>h<seq2seq4repair_space>" + "where<seq2seq4repair_space>p.id<seq2seq4repair_space>=<seq2seq4repair_space>#{id}<seq2seq4repair_space>and<seq2seq4repair_space>p.hospital_id<seq2seq4repair_space>=<seq2seq4repair_space>h.id" ) Prescription getPrswithIdNoUser ( @ Param ( "id" ) int id ) { } @ Select ( "select<seq2seq4repair_space>p.*,<seq2seq4repair_space>h.name<seq2seq4repair_space>as<seq2seq4repair_space>hospital_name<seq2seq4repair_space>from<seq2seq4repair_space>prescription<seq2seq4repair_space>as<seq2seq4repair_space>p,<seq2seq4repair_space>hospital<seq2seq4repair_space>as<seq2seq4repair_space>h<seq2seq4repair_space>" + "where<seq2seq4repair_space>p.process<seq2seq4repair_space>=<seq2seq4repair_space>#{process}<seq2seq4repair_space>and<seq2seq4repair_space>p.process_id<seq2seq4repair_space>=<seq2seq4repair_space>-1<seq2seq4repair_space>and<seq2seq4repair_space>h.id<seq2seq4repair_space>=<seq2seq4repair_space>#{hospitalId}<seq2seq4repair_space>and<seq2seq4repair_space>p.hospital_id<seq2seq4repair_space>=<seq2seq4repair_space>h.id" ) List < Prescription > getPrsListWithProAndHospital_Ship ( @ Param ( "process" ) int process , @ Param ( "hospitalId" ) int hospitalId ) { } @ Select ( "select<seq2seq4repair_space>p.*,<seq2seq4repair_space>h.name<seq2seq4repair_space>as<seq2seq4repair_space>hospital_name<seq2seq4repair_space>from<seq2seq4repair_space>prescription<seq2seq4repair_space>as<seq2seq4repair_space>p,<seq2seq4repair_space>hospital<seq2seq4repair_space>as<seq2seq4repair_space>h<seq2seq4repair_space>" + "where<seq2seq4repair_space>p.process<seq2seq4repair_space>=<seq2seq4repair_space>#{process}<seq2seq4repair_space>and<seq2seq4repair_space>h.id<seq2seq4repair_space>=<seq2seq4repair_space>#{hospitalId}<seq2seq4repair_space>and<seq2seq4repair_space>p.hospital_id<seq2seq4repair_space>=<seq2seq4repair_space>h.id" ) List < Prescription > getPrsListWithProAndHospital ( @ Param ( "process" ) int process , @ Param ( "hospitalId" ) int hospitalId ) { } @ Select ( "select<seq2seq4repair_space>h.id<seq2seq4repair_space>from<seq2seq4repair_space>prescription<seq2seq4repair_space>as<seq2seq4repair_space>p,<seq2seq4repair_space>hospital<seq2seq4repair_space>as<seq2seq4repair_space>h<seq2seq4repair_space>" + "where<seq2seq4repair_space>p.process<seq2seq4repair_space>=<seq2seq4repair_space>#{process}<seq2seq4repair_space>and<seq2seq4repair_space>p.hospital_id<seq2seq4repair_space>=<seq2seq4repair_space>h.id" ) List < Integer > listInProgressHospitalwithProcess ( @ Param ( "process" ) int process ) { } @ Update ( ( ( ( "update<seq2seq4repair_space>prescription<seq2seq4repair_space>set<seq2seq4repair_space>finish_time<seq2seq4repair_space>=<seq2seq4repair_space>#{currentTime},<seq2seq4repair_space>process<seq2seq4repair_space>=<seq2seq4repair_space>" + ( Constants . FINISH ) ) + "<seq2seq4repair_space>where<seq2seq4repair_space>process<seq2seq4repair_space>=<seq2seq4repair_space>" ) + ( Constants . SHIP ) ) + "<seq2seq4repair_space>and<seq2seq4repair_space>process_id<seq2seq4repair_space>=<seq2seq4repair_space>#{orderId}" ) int finishPrescription ( @ Param ( "orderId" ) int orderId , @ Param ( "currentTime" ) String currentTime ) { } @ Update ( "update<seq2seq4repair_space>prescription<seq2seq4repair_space>set<seq2seq4repair_space>finish_time<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.finish_time},<seq2seq4repair_space>process<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.process},<seq2seq4repair_space>process_id<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.process_id}<seq2seq4repair_space>where<seq2seq4repair_space>id<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.id}" ) int markPrsFinished ( @ Param ( "prs" ) Prescription prs ) { } @ Select ( "select<seq2seq4repair_space>count(*)<seq2seq4repair_space>from<seq2seq4repair_space>prescription<seq2seq4repair_space>as<seq2seq4repair_space>p,<seq2seq4repair_space>process<seq2seq4repair_space>as<seq2seq4repair_space>pro,<seq2seq4repair_space>user<seq2seq4repair_space>as<seq2seq4repair_space>u<seq2seq4repair_space>where<seq2seq4repair_space>p.process<seq2seq4repair_space>=<seq2seq4repair_space>11<seq2seq4repair_space>and<seq2seq4repair_space>u.id<seq2seq4repair_space>=<seq2seq4repair_space>#{userId}<seq2seq4repair_space>and<seq2seq4repair_space>pro.process_type<seq2seq4repair_space>=<seq2seq4repair_space>#{process_type}<seq2seq4repair_space>" + "and<seq2seq4repair_space>pro.prescription_id<seq2seq4repair_space>=<seq2seq4repair_space>p.id<seq2seq4repair_space>and<seq2seq4repair_space>pro.user_id<seq2seq4repair_space>=<seq2seq4repair_space>u.id<seq2seq4repair_space>and<seq2seq4repair_space>p.create_time<seq2seq4repair_space>><seq2seq4repair_space>#{start}<seq2seq4repair_space>and<seq2seq4repair_space>p.finish_time<seq2seq4repair_space><<seq2seq4repair_space>#{end}" ) int countPrsDealByUser ( @ Param ( "userId" ) int userId , @ Param ( "process_type" ) int process_type , @ Param ( "start" ) String start , @ Param ( "end" ) String end ) { } @ Select ( "select<seq2seq4repair_space>p.*,<seq2seq4repair_space>h.name<seq2seq4repair_space>as<seq2seq4repair_space>hospital_name<seq2seq4repair_space>from<seq2seq4repair_space>prescription<seq2seq4repair_space>as<seq2seq4repair_space>p,<seq2seq4repair_space>process<seq2seq4repair_space>as<seq2seq4repair_space>pro,<seq2seq4repair_space>user<seq2seq4repair_space>as<seq2seq4repair_space>u,<seq2seq4repair_space>hospital<seq2seq4repair_space>as<seq2seq4repair_space>h<seq2seq4repair_space>where<seq2seq4repair_space>p.process<seq2seq4repair_space>=<seq2seq4repair_space>11<seq2seq4repair_space>and<seq2seq4repair_space>u.id<seq2seq4repair_space>=<seq2seq4repair_space>#{userId}<seq2seq4repair_space>and<seq2seq4repair_space>pro.process_type<seq2seq4repair_space>=<seq2seq4repair_space>#{process_type}<seq2seq4repair_space>" + "and<seq2seq4repair_space>p.hospital_id<seq2seq4repair_space>=<seq2seq4repair_space>h.id<seq2seq4repair_space>and<seq2seq4repair_space>pro.prescription_id<seq2seq4repair_space>=<seq2seq4repair_space>p.id<seq2seq4repair_space>and<seq2seq4repair_space>pro.user_id<seq2seq4repair_space>=<seq2seq4repair_space>u.id<seq2seq4repair_space>and<seq2seq4repair_space>p.create_time<seq2seq4repair_space>>=<seq2seq4repair_space>#{start}<seq2seq4repair_space>and<seq2seq4repair_space>p.finish_time<seq2seq4repair_space><=<seq2seq4repair_space>#{end}" ) List < Prescription > listPrsByUser ( @ Param ( "userId" ) int userId , @ Param ( "process_type" ) int process_type , @ Param ( "start" ) String start , @ Param ( "end" ) String end ) { } @ Select ( "select<seq2seq4repair_space>count(*)<seq2seq4repair_space>from<seq2seq4repair_space>prescription<seq2seq4repair_space>as<seq2seq4repair_space>p,<seq2seq4repair_space>process<seq2seq4repair_space>as<seq2seq4repair_space>pro,<seq2seq4repair_space>user<seq2seq4repair_space>as<seq2seq4repair_space>u<seq2seq4repair_space>where<seq2seq4repair_space>p.process<seq2seq4repair_space>=<seq2seq4repair_space>11<seq2seq4repair_space>and<seq2seq4repair_space>u.id<seq2seq4repair_space>=<seq2seq4repair_space>#{userId}<seq2seq4repair_space>and<seq2seq4repair_space>pro.error_type<seq2seq4repair_space>><seq2seq4repair_space>0<seq2seq4repair_space>" + "and<seq2seq4repair_space>pro.prescription_id<seq2seq4repair_space>=<seq2seq4repair_space>p.id<seq2seq4repair_space>and<seq2seq4repair_space>pro.user_id<seq2seq4repair_space>=<seq2seq4repair_space>u.id<seq2seq4repair_space>and<seq2seq4repair_space>p.create_time<seq2seq4repair_space>>=<seq2seq4repair_space>#{start}<seq2seq4repair_space>and<seq2seq4repair_space>p.finish_time<seq2seq4repair_space><=<seq2seq4repair_space>#{end}" ) int countProcsErrorByUser ( @ Param ( "userId" ) int userId , @ Param ( "start" ) String start , @ Param ( "end" ) String end ) { } @ Select ( "select<seq2seq4repair_space>*<seq2seq4repair_space>from<seq2seq4repair_space>prescription<seq2seq4repair_space>where<seq2seq4repair_space>hospital_id<seq2seq4repair_space>=<seq2seq4repair_space>#{hospital_id}" ) List < Prescription > getPrescriptionByHospital ( @ Param ( "hospital_id" ) int hospital_id ) { } @ Update ( "update<seq2seq4repair_space>prescription<seq2seq4repair_space>set<seq2seq4repair_space>class_of_medicines<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.class_of_medicines},<seq2seq4repair_space>process<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.process},<seq2seq4repair_space>process_id<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.process_id},<seq2seq4repair_space>" + ( ( ( ( ( ( "need_decoct_first<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.need_decoct_first},<seq2seq4repair_space>decoct_first_list<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.decoct_first_list,<seq2seq4repair_space>jdbcType=LONGVARCHAR}," + "need_decoct_later<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.need_decoct_later},<seq2seq4repair_space>decoct_later_list<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.decoct_later_list,<seq2seq4repair_space>jdbcType=LONGVARCHAR}," ) + "need_wrapped_decoct<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.need_wrapped_decoct},<seq2seq4repair_space>wrapped_decoct_list<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.wrapped_decoct_list,<seq2seq4repair_space>jdbcType=LONGVARCHAR}," ) + "need_take_drenched<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.need_take_drenched},<seq2seq4repair_space>take_drenched_list<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.take_drenched_list,<seq2seq4repair_space>jdbcType=LONGVARCHAR}," ) + "need_melt<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.need_melt},<seq2seq4repair_space>melt_list<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.melt_list,<seq2seq4repair_space>jdbcType=LONGVARCHAR}," ) + "need_decoct_alone<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.need_decoct_alone},<seq2seq4repair_space>decoct_alone_list<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.decoct_alone_list,<seq2seq4repair_space>jdbcType=LONGVARCHAR}" ) + "<seq2seq4repair_space>where<seq2seq4repair_space>id<seq2seq4repair_space>=<seq2seq4repair_space>#{prs.id}" ) ) int updatePrescription ( @ Param ( "prs" ) Prescription prs ) { } }

Fix:
@ Select ( "select<seq2seq4repair_space>count(*)<seq2seq4repair_space>from<seq2seq4repair_space>prescription<seq2seq4repair_space>as<seq2seq4repair_space>p,<seq2seq4repair_space>hospital<seq2seq4repair_space>as<seq2seq4repair_space>h<seq2seq4repair_space>where<seq2seq4repair_space>h.id<seq2seq4repair_space>=<seq2seq4repair_space>#{hospitalId}<seq2seq4repair_space>and<seq2seq4repair_space>p.hospital_id<seq2seq4repair_space>=<seq2seq4repair_space>h.id<seq2seq4repair_space>and<seq2seq4repair_space>p.process<seq2seq4repair_space>=<seq2seq4repair_space>#{process}<seq2seq4repair_space>" + "and<seq2seq4repair_space>p.create_time<seq2seq4repair_space>>=<seq2seq4repair_space>#{start}<seq2seq4repair_space>and<seq2seq4repair_space>p.finish_time<seq2seq4repair_space><=<seq2seq4repair_space>#{end}" )