const system = require("../../../system");
const Dao = require("../../dao.base");
class PlatformchannelDao extends Dao {
    constructor() {
        super(Dao.getModelName(PlatformchannelDao));
    }

    async findByamong(params) {
        var sql = "SELECT pc.platform_id,pc.channel_id,cm.origin_merchant_id,cm.origin_id,cm.merchant_name from ch_platform_channel pc JOIN ch_channel_merchant cm ON pc.channel_id = cm.channel_id WHERE pc.created_at >='"+params.begin+"' AND pc.created_at <= '"+params.end+"'";
       return await this.customQuery(sql) || [];
    }


}
module.exports = PlatformchannelDao;
