void doBusiness() { long userId = 22222; string orderId = ""; int state = 1; int newState = 2; var orderStateHelper = new OrderStateHelper(userId, orderId, state); var isChange = orderStateHelper.ChangState(newState); }
/// <summary> /// 待审核可以变成审核通过状态,所以重写审核通过方法 /// </summary> /// <param name="helper">订单状态操作类</param> /// <returns></returns> public override bool AuditPass(OrderStateHelper helper) { return(UpdateState(helper, OrderStateEnum.AuditPass)); }
/// <summary> /// 待提交可以变成待审核状态,所以重写待审核方法 /// </summary> /// <param name="helper"></param> /// <returns></returns> public override bool PendingAudit(OrderStateHelper helper) { return(UpdateState(helper, OrderStateEnum.PendingAudit)); }