|
@@ -24,7 +24,6 @@ class PointService extends CrudService {
|
|
|
return total;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 添加积分;将处理添加至事务之中
|
|
|
* @param {String} orderDetail_id 订单详情id
|
|
@@ -51,6 +50,11 @@ class PointService extends CrudService {
|
|
|
const num = await this.model.count({ customer, source_id, source });
|
|
|
return num > 0;
|
|
|
}
|
|
|
+
|
|
|
+ async refundPoint({ customer, money, source, source_id }, tran) {
|
|
|
+ const data = { customer, money, time: moment().format('YYYY-MM-DD HH:mm:ss'), status: '1', source, source_id };
|
|
|
+ tran.insert(data);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
module.exports = PointService;
|