const Dao = require("../../dao.base");

class MerchantaccountDao extends Dao {
    constructor() {
        super(Dao.getModelName(MerchantaccountDao));
    }


    async addtomerchantrmb(params){
        var sql = [];
        sql.push("UPDATE");
        sql.push(this.model.tableName);
        sql.push("SET balance_amount = balance_amount+ : amount");
        sql.push("AND available_amount = available_amount + :available_amount");
        sql.push("WHERE merchant_id = :merchant_id")
        return await this.customQuery(sql.join(" "), params);
    }
}

module.exports = MerchantaccountDao;
