Fix Bug #574: fallback修复
This commit is contained in:
@@ -51,34 +51,30 @@ public interface OrderMapper {
|
||||
* @param orderId 医嘱主键
|
||||
* @return 包含医嘱详情的 Map
|
||||
*/
|
||||
@Select("SELECT o.*, d.total_unit_name AS total_unit " +
|
||||
"FROM his_order o " +
|
||||
"LEFT JOIN diagnosis_item d ON o.item_id = d.id " +
|
||||
@Select("SELECT o.*, d.total_unit_name AS total_unit FROM his_order o " +
|
||||
"LEFT JOIN his_diagnosis d ON o.diagnosis_id = d.id " +
|
||||
"WHERE o.id = #{orderId}")
|
||||
Map<String, Object> selectOrderDetailById(@Param("orderId") Long orderId);
|
||||
|
||||
/**
|
||||
* 将医嘱状态更新为已支付。
|
||||
* 将医嘱状态更新为已取消(CANCELLED)。
|
||||
*
|
||||
* @param orderId 医嘱主键
|
||||
* @param status 状态码,建议使用 {@link #ORDER_STATUS_PAID}
|
||||
* @param status 取消状态码,建议使用 {@link #ORDER_STATUS_CANCELLED}
|
||||
* @return 受影响的行数
|
||||
*/
|
||||
@Update("UPDATE his_order SET status = #{status} WHERE id = #{orderId}")
|
||||
int updateOrderStatusToCancelled(@Param("orderId") Long orderId,
|
||||
@Param("status") String status);
|
||||
|
||||
/**
|
||||
* 将医嘱状态更新为已支付(PAID)。
|
||||
*
|
||||
* @param orderId 医嘱主键
|
||||
* @param status 已支付状态码,建议使用 {@link #ORDER_STATUS_PAID}
|
||||
* @return 受影响的行数
|
||||
*/
|
||||
@Update("UPDATE his_order SET status = #{status} WHERE id = #{orderId}")
|
||||
int updateOrderStatusToPaid(@Param("orderId") Long orderId,
|
||||
@Param("status") String status);
|
||||
|
||||
/**
|
||||
* 将医嘱状态更新为取消(诊前退号)。
|
||||
*
|
||||
* <p>此方法使用 PRD 中统一的 {@link #ORDER_STATUS_CANCELLED} 状态码,取代之前硬编码的
|
||||
* {@code 'RETURNED'},确保数据库状态与生产环境定义保持一致,修复 Bug #506。</p>
|
||||
*
|
||||
* @param orderId 医嘱主键
|
||||
* @param status 状态码,建议使用 {@link #ORDER_STATUS_CANCELLED}
|
||||
* @return 受影响的行数
|
||||
*/
|
||||
@Update("UPDATE his_order SET status = #{status} WHERE id = #{orderId}")
|
||||
int updateOrderStatusToCancelled(@Param("orderId") Long orderId,
|
||||
@Param("status") String status);
|
||||
}
|
||||
|
||||
@@ -53,7 +53,6 @@ public class RegistrationServiceImpl implements RegistrationService {
|
||||
throw new RuntimeException("号源状态更新为已取号失败,orderId=" + orderId);
|
||||
}
|
||||
|
||||
// 3. (可选)如果还有其他业务,如累计预约数,可在此调用
|
||||
// registrationMapper.incrementBookedNumByOrderId(orderId);
|
||||
// 3. (可选)如果还有其他业务,如累计预约数,可在此继续调用对应 Mapper 方法
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user