活动:大额累计充值活动

This commit is contained in:
qiaoxin
2021-06-02 18:21:21 +08:00
parent f708599855
commit f3cd916e28
10 changed files with 351 additions and 4 deletions

View File

@@ -93,6 +93,13 @@ export default class UserOrder extends BaseModel {
return result;
}
//查询订单详情
public static async findOrderList(serverId: number, roleId: string, begin: number, count: number) {
let result: UserOrderModelType[] = await UserOrderModel.find({ serverId, roleId, state: ORDER_STATE.RESULT_SUCCESS }, { price: 1, createdAt: 1, productID: 1 }).skip(begin).limit(count).sort({ createdAt: -1 }).lean(true);
return result;
}
//新增订单
public static async applyOrder(serverId: number, roleId: string, productID: string, localOrderID: string, orderID: string, price: number, payType: number, activityId: number, message: string = '') {
let result: UserOrderModelType = await UserOrderModel.findOneAndUpdate({ serverId, roleId, productID, localOrderID, orderID, payType, activityId },