DISTINCT *
and id = #{p.id}
and hospital_id = #{p.hospitalId}
and hospital_name like concat('%',#{p.hospitalName},'%')
and department_id = #{p.departmentId}
and department_name = #{p.departmentName}
and contract_no = #{p.contractNo}
and contract_title = #{p.contractTitle}
and contract_begin_time = #{p.contractBeginTime}
and contract_end_time = #{p.contractEndTime}
and contract_time = #{p.contractTime}
and is_del = #{p.isDel}
and enabled = #{p.enabled}
and update_time = #{p.updateTime}
and create_user_id = #{p.createUserId}
and create_user_name = #{p.createUserName}
and update_user_id = #{p.updateUserId}
and update_user_name = #{p.updateUserName}
and create_time = #{p.createTime}
or ( is_del = 0 and enabled=1)
AND
create_user_org_code = #{itemtoto.orgCode}
or (
create_user_org_code = #{itemtoto.orgCode}
and is_del = 0 and enabled=1
)
AND
create_user_org_code = #{itemto.object}
or (create_user_org_code = #{itemto.object} and is_del = 0 and enabled=1)
AND
create_user_org_code like '${itemto.object}%'
or (create_user_org_code like '${itemto.object}%' and is_del = 0 and enabled=1)
AND
create_user_id = #{itemto.object}
or (create_user_id = #{itemto.object} and is_del = 0 and enabled=1)
AND id is null
is_del=0
UPDATE product_order_record SET is_del=1,update_time=now() WHERE order_id= #{orderId};
UPDATE product_order_detail SET is_del=1,update_time=now() WHERE order_id= #{orderId};