|
@@ -31,11 +31,9 @@ class TransactionService extends CrudService {
|
|
|
market_username = market_user.name;
|
|
|
}
|
|
|
const newdata = { ...data, username, product_name, market_username };
|
|
|
- const tran = await this.model.create(newdata);
|
|
|
-
|
|
|
- const operationlogdata = { transaction: tran, type: '1' };
|
|
|
+ const operationlogdata = { transaction: data, type: '1' };
|
|
|
this.omodel.create(operationlogdata);
|
|
|
- return tran;
|
|
|
+ return await this.model.create(newdata);
|
|
|
}
|
|
|
async findTransactionList({ product_id }) {
|
|
|
const product = await this.model.find({ product_id });
|