Commit 6ef838c9 by 王昆

gsb

parent 4db1ad84
...@@ -3,6 +3,7 @@ const settings=require("../../../../config/settings"); ...@@ -3,6 +3,7 @@ const settings=require("../../../../config/settings");
const uiconfig=system.getUiConfig2(settings.appKey); const uiconfig=system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => { module.exports = (db, DataTypes) => {
return db.define("saasmerchantaddr", { return db.define("saasmerchantaddr", {
saas_id: { type: DataTypes.STRING(32), allowNull: false, COMMENT: 'saas_id' },
saas_merchant_id: { type: DataTypes.STRING(32), allowNull: false, COMMENT: '商户id' }, saas_merchant_id: { type: DataTypes.STRING(32), allowNull: false, COMMENT: '商户id' },
mail_addr: { type: DataTypes.STRING(200), allowNull: false, COMMENT: '邮寄地址' }, mail_addr: { type: DataTypes.STRING(200), allowNull: false, COMMENT: '邮寄地址' },
mail_mobile: { type: DataTypes.STRING(45), allowNull: false, COMMENT: '邮寄电话' }, mail_mobile: { type: DataTypes.STRING(45), allowNull: false, COMMENT: '邮寄电话' },
......
...@@ -3,6 +3,7 @@ const settings=require("../../../../config/settings"); ...@@ -3,6 +3,7 @@ const settings=require("../../../../config/settings");
const uiconfig=system.getUiConfig2(settings.appKey); const uiconfig=system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => { module.exports = (db, DataTypes) => {
return db.define("saasmerchanttitle", { return db.define("saasmerchanttitle", {
saas_id: { type: DataTypes.STRING(32), allowNull: false, COMMENT: 'saasid' },
saas_merchant_id: { type: DataTypes.STRING(32), allowNull: false, COMMENT: '商户id' }, saas_merchant_id: { type: DataTypes.STRING(32), allowNull: false, COMMENT: '商户id' },
merchant_name: { type: DataTypes.STRING(45), allowNull: false, COMMENT: '商户名称' }, merchant_name: { type: DataTypes.STRING(45), allowNull: false, COMMENT: '商户名称' },
merchant_credit_code: { type: DataTypes.STRING(45), allowNull: false, COMMENT: '商户纳税人识别号' }, merchant_credit_code: { type: DataTypes.STRING(45), allowNull: false, COMMENT: '商户纳税人识别号' },
......
...@@ -287,6 +287,16 @@ class SaasMerchantService extends ServiceBase { ...@@ -287,6 +287,16 @@ class SaasMerchantService extends ServiceBase {
merchant_name: this.trim(params.merchant_name) merchant_name: this.trim(params.merchant_name)
}; };
} }
if (params.saas_merchant_id) {
where = {
saas_merchant_id: this.trim(params.saas_merchant_id)
};
}
if (params.saas_id) {
where = {
saas_id: this.trim(params.saas_id)
};
}
var orderby = [ var orderby = [
["id", 'desc'] ["id", 'desc']
]; ];
...@@ -341,7 +351,7 @@ class SaasMerchantService extends ServiceBase { ...@@ -341,7 +351,7 @@ class SaasMerchantService extends ServiceBase {
let saas_merchant_title_res = await this.saasmerchanttitleDao.getAllByMerchantId(_saasmerchant.id); let saas_merchant_title_res = await this.saasmerchanttitleDao.getAllByMerchantId(_saasmerchant.id);
let saas_merchant_addr_res = await this.saasmerchantaddrDao.getAllByMerchantId(_saasmerchant.id); let saas_merchant_addr_res = await this.saasmerchantaddrDao.getAllByMerchantId(_saasmerchant.id);
let _saasmerchanttitlePorperty = {saas_merchant_id:_saasmerchant.id}; let _saasmerchanttitlePorperty = {saas_merchant_id:_saasmerchant.id, saas_id: _saasmerchant.saas_id};
if (params.merchant_name) { if (params.merchant_name) {
_saasmerchanttitlePorperty.merchant_name = this.trim(params.merchant_name); _saasmerchanttitlePorperty.merchant_name = this.trim(params.merchant_name);
} }
...@@ -364,7 +374,7 @@ class SaasMerchantService extends ServiceBase { ...@@ -364,7 +374,7 @@ class SaasMerchantService extends ServiceBase {
_saasmerchanttitlePorperty.merchant_account = this.trim(params.merchant_account); _saasmerchanttitlePorperty.merchant_account = this.trim(params.merchant_account);
} }
let _saasmerchantaddrPorperty = {saas_merchant_id:_saasmerchant.id}; let _saasmerchantaddrPorperty = {saas_merchant_id:_saasmerchant.id, saas_id: _saasmerchant.saas_id};
if (params.mail_addr) { if (params.mail_addr) {
_saasmerchantaddrPorperty.mail_addr = this.trim(params.mail_addr); _saasmerchantaddrPorperty.mail_addr = this.trim(params.mail_addr);
} }
......
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