Commit 7950542f by 宋毅

tj

parent def1ad05
......@@ -9,6 +9,11 @@ class Dao {
preCreate(u) {
return u;
}
/**
*
* @param {*} u 对象
* @param {*} t 事务对象t
*/
async create(u, t) {
var u2 = this.preCreate(u);
if (t) {
......@@ -64,7 +69,7 @@ class Dao {
//return {"key":"include","value":{model:this.db.models.app}};
return [["created_at", "DESC"]];
}
buildAttributes(){
buildAttributes() {
return [];
}
buildQuery(qobj) {
......@@ -127,8 +132,8 @@ class Dao {
qc[extraFilter.key] = extraFilter.value;
}
var attributesObj = this.buildAttributes();
if(attributesObj && attributesObj.length>0){
qc.attributes=attributesObj;
if (attributesObj && attributesObj.length > 0) {
qc.attributes = attributesObj;
}
console.log("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm");
console.log(qc);
......
......@@ -6,6 +6,7 @@ class OrderService extends ServiceBase {
constructor() {
super("dborder", ServiceBase.getDaoName(OrderService));
this.logCtl = system.getObject("web.common.oplogCtl");
this.orderflowDao = system.getObject("db.dbapp.orderflowDao");
this.appproductDao = system.getObject("db.dbapp.appproductDao");
this.ordertmproductDao = system.getObject("db.dborder.ordertmproductDao");
this.receiptvoucherDao = system.getObject("db.dborder.receiptvoucherDao");
......@@ -135,6 +136,8 @@ class OrderService extends ServiceBase {
return await this.db.transaction(async function (t) {
await self.dao.updateByWhere({ orderPayStatus: payStatus, buyerMoblie: action_body.buyerMoblie || "" }, { where: { needNoOrderNo: action_body.needNoOrderNo, app_id: req.app.id } }, t);
await self.ordertmproductDao.updateByWhere({ payStatus: payStatus }, { where: { needNoOrderNo: action_body.needNoOrderNo, app_id: req.app.id } }, t);
var logMsg = { sourceOrderNo: result.deliveryOrderNo, opContent: "订单已成功支付", app_id: req.app.id };
await self.orderflowDao.create(logMsg, t);
return system.getResultSuccess({ deliveryOrderNo: result.deliveryOrderNo });
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment