package order import "fusenapi/constants" // 获取订单生产状态 func GetOrderStatus(orderStatus int64, deliveryMethod int64) int64 { switch orderStatus { //已支付 case constants.STATUS_NEW_PART_PAY, constants.STATUS_NEW_PAY_COMPLETED, constants.STATUS_NEW_SURE: return constants.STATUS_FONT_PAID //生产中 case constants.STATUS_NEW_PRODUTING, constants.STATUS_NEW_PRODUT_COMPLETED: return constants.STATUS_FONT_PRODUCTION //运输中-直邮单 case constants.STATUS_NEW_DELIVER, constants.STATUS_NEW_UPS: return constants.STATUS_FONT_SHIPPED //到达-云仓 case constants.STATUS_NEW_ARRIVAL: return constants.STATUS_FONT_INVENTORY //订单完成 case constants.STATUS_NEW_COMPLETED: if deliveryMethod == constants.DELIVERY_METHOD_CLOUD { return constants.STATUS_FONT_COMPLETED_CLOUD } return constants.STATUS_FONT_COMPLETED //订单关闭 default: return constants.STATUS_FONT_CLOSED } }