Commit 241cf685 by cwq0219

出货统计

1 parent 886f5a0a
......@@ -18,8 +18,16 @@ module.exports = app => {
type: DataTypes.INTEGER(11),
allowNull: false
},
shop_merchant_name: {
type: DataTypes.STRING(100),
allowNull: false
},
merchant_id: {
type: DataTypes.INTEGER(11),
allowNull: true
},
merchant_name: {
type: DataTypes.STRING(100),
allowNull: false
},
biz_type: {
......@@ -39,13 +47,21 @@ module.exports = app => {
type: DataTypes.INTEGER(11),
allowNull: true,
defaultValue: '0'
},
create_time: {
type: DataTypes.DATE,
allowNull: true
},
update_time: {
type: DataTypes.DATE,
allowNull: true
}
}, {
tableName: 'glsx_biz_delivery'
});
Model.associate = function() {
}
return Model;
......
......@@ -2,7 +2,7 @@
* @Author: chenwq
* @Date: 2020-06-16 10:02:28
* @Last Modified by: chenwq
* @Last Modified time: 2020-06-19 13:51:21
* @Last Modified time: 2020-06-19 17:26:03
* 出货统计
*/
const Service = require("egg").Service;
......@@ -64,7 +64,7 @@ class deliveryServices extends Service {
sqlName: 'merchant_name'
}, {
name: 'shopMerchantName',
sqlName: 'merchant_name'
sqlName: 'shop_merchant_name'
}]
let equalArr = [{
name: 'deviceType',
......
......@@ -2,7 +2,7 @@
* @Author: chenwq
* @Date: 2020-06-16 10:02:39
* @Last Modified by: chenwq
* @Last Modified time: 2020-06-18 17:52:25
* @Last Modified time: 2020-06-19 16:14:30
* 设备信息
*/
......@@ -95,7 +95,7 @@ class DevicesService extends Service {
where[item.sqlName] = searcher[item.name]
}
})
return await this.GBDE.findAndCountAll({
let date = await this.GBDE.findAndCountAll({
attributes: {
include: [
[col('dj_system_merchant.merchant_name'), 'shop_merchant_name']
......@@ -115,6 +115,10 @@ class DevicesService extends Service {
})
}]
})
date.rows && date.rows.forEach(item => {
item.address = ''
})
return date
}
}
module.exports = DevicesService;
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!