package model

import (
	"fmt"
	"mtp20_assisted/global"
)

// GetTotalAddressByDistrictID 通过地区ID获取完整地址
func (t *Division) GetTotalAddressByDistrictID(address string) (totalAddress string, err error) {
	has, err := global.M2A_DB.Where("AUTOID = ?", t.AUTOID).Get(t)
	if err == nil && has {
		totalAddress = fmt.Sprintf("%v%v", t.PATHNAME, address)
	}

	return
}

// Get 获取CONFIGID获取信息
func (t *Wskhopenaccountconfig) Get() (has bool, err error) {
	return global.M2A_DB.Where("CONFIGID = ?", t.CONFIGID).Get(t)
}
