You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: sqlengine.go
    path of file: ./repos/faygo/ext/db/directsqlx
    
    the code of the file until where you have to start completion: /**
* func   : 动态SQL执行引擎
* author : 畅雨参数校验函数
* date   : 2016.06.13
* desc   : 关联关系全部通Id进行关联
* history :
           2017.03.22
			-增加两种类型的sql，处
    
func (m *TModel) bacthMultiExecMap(se *TSql, mp map[string][]map[string]interface{}) error {
	return transact(m.DB, func(tx *sqlx.Tx) error {
		// 循環每個sql定義
		for _, cmd := range se.Cmds {
			// 循環其批量參數
			if sp, ok := mp[cmd.Pin]; ok {
				for _, p := range sp {
					faygo.Debug("BacthMultiExecMap :" + cmd.Sql)
					if _, err := tx.NamedExec(cmd.Sql, p); err != nil {
						return err
					}
				}
			} else {
				return errors.New("错误：传入的参数与SQL节点定义的sql.pin名称不匹配！")
			}
		}
		return nil
	})
}