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