活动:支付宝支付
This commit is contained in:
@@ -28,6 +28,15 @@ export default class UserOrder extends BaseModel {
|
||||
@prop({ required: true })
|
||||
message: string; // 信息
|
||||
|
||||
|
||||
//保存平台订单号
|
||||
public static async saveOrderID(roleId: string, localOrderID: string, aliOrderID: string) {
|
||||
let result: UserOrderModelType = await UserOrderModel.findOneAndUpdate({ roleId, localOrderID },
|
||||
{ $set: { orderID: aliOrderID } },
|
||||
{ new: true }).lean(true);
|
||||
return result;
|
||||
}
|
||||
|
||||
//校验订单
|
||||
public static async check(roleId: string, localOrderID: string, message: string = '') {
|
||||
let result: UserOrderModelType = await UserOrderModel.findOneAndUpdate({ roleId, localOrderID, state: { $ne: ORDER_STATE.RESULT_SUCCESS } },
|
||||
|
||||
Reference in New Issue
Block a user