typedef NS_ENUM(NSInteger, ORDERSTATE) {
ORDERSTATE_NoStart = 1, //未开始
ORDERSTATE_StartGrab, //抢单
ORDERSTATE_HasGrabBySelf, //自己抢到
ORDERSTATE_HasGrabByOther, //已被别人抢走
ORDERSTATE_HasCommit, //已提交
ORDERSTATE_HasNoCommit, //未超时,已执行,未提交
ORDERSTATE_HasOverTime_NoneGrab, //已超时,未被抢单
ORDERSTATE_HasOverTime_NoCommit //抢到的单已超时,未提交
};
根据上面的枚举值,获取相应的字符串
NSString *GetOrderStatus(ORDERSTATE status) {
switch (status) {
case ORDERSTATE_NoStart:
return @"未开始";
case ORDERSTATE_StartGrab:
return @"待抢单";
case ORDERSTATE_HasGrabBySelf:
return @"待执行";
case ORDERSTATE_HasGrabByOther:
return @"已被抢";
case ORDERSTATE_HasCommit:
return