活动:结算奖励
This commit is contained in:
@@ -1,3 +1,48 @@
|
||||
import { UserOrderModel } from '../db/UserOrder';
|
||||
import { ActivitySignInModel, ActivitySignInModelType } from '../db/ActivitySignIn';
|
||||
import { SignInData, SignInItem } from '../domain/activityField/signInField';
|
||||
import { ACTIVITY_TYPE, ORDER_STATE } from '../consts';
|
||||
import { dicRMB } from '../pubUtils/dictionary/DicRMB';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 结算账单
|
||||
* @param localOrderID 本地订单号
|
||||
*/
|
||||
export async function makeOrder(localOrderID: string) {
|
||||
let orderInfo = await UserOrderModel.findOrder(localOrderID);
|
||||
if (!orderInfo) {
|
||||
return '查无此订单';
|
||||
}
|
||||
if (orderInfo.state == ORDER_STATE.RESULT_SUCCESS) {
|
||||
return '结算过';
|
||||
}
|
||||
//商品价格信息
|
||||
let productInfo = dicRMB.get(orderInfo.productID)
|
||||
if (!productInfo) {
|
||||
return '无效商品';
|
||||
}
|
||||
|
||||
let productType = productInfo.type;//类型
|
||||
let price = orderInfo.price;//下单时的价格
|
||||
let payType = orderInfo.payType;//支付类型
|
||||
let roleId = orderInfo.roleId;//角色
|
||||
|
||||
switch (productType) {
|
||||
case ACTIVITY_TYPE.NEW_PLAYER_LIMIT_PACKAGE:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case ACTIVITY_TYPE.LIMIT_PACKAGE_SHOP_DAILY:
|
||||
case ACTIVITY_TYPE.LIMIT_PACKAGE_SHOP_WEEKLY:
|
||||
{
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return '未知商品类型';
|
||||
}
|
||||
return { goods: [], addHeros: [] }
|
||||
}
|
||||
Reference in New Issue
Block a user