Exemple #1
0
// is this correct?
func GetCustomer(customerId int) *model.Customer {
	person, _ := persondao.Get(persondao.EntityManager().PK, customerId)
	if nil == person {
		return nil
	}
	customer := model.Customer{
		Person: *person,
	}
	return &customer
}
Exemple #2
0
// is this correct?
func GetProducer(id int) *model.Producer {
	person, _ := persondao.Get(persondao.EntityManager().PK, id)
	if nil == person {
		return nil
	}
	producer := model.Producer{
		Person: *person,
	}
	return &producer
}
Exemple #3
0
func (s *PersonService) Get(field string, value interface{}) (*model.Person, error) {
	return persondao.Get(field, value)
}