Ejemplo n.º 1
0
func (o LayerManager) GetLayerBySession(sessionId int, db *mgo.Database, code string) map[string]interface{} {
	dictionaryManager := dictionary.GetInstance()
	result := dictionaryManager.GetDictionaryBySession(db, code)
	if result == nil {
		programDictionaryManager := dictionary.GetProgramDictionaryInstance()
		result = programDictionaryManager.GetProgramDictionaryBySession(sessionId, db, code)
	}
	return result
}
Ejemplo n.º 2
0
func (c Component) Dicttest() revel.Result {
	dictionaryManager := dictionary.GetInstance()
	result := dictionaryManager.GetDictionary("D_DICTTEST")
	c.Response.ContentType = "application/json; charset=utf-8"
	return c.RenderJson(result)
}