Пример #1
0
func Delete(id int) (affacted int64, err error) {
	if affacted, err = persondao.Delete(id); err != nil {
		return
	}
	// update person ( factory and customer's id is nocollapse)
	suggest.Delete(suggest.Customer, id)
	suggest.Delete(suggest.Factory, id)
	return
}
Пример #2
0
func (s *ProductService) DeleteProduct(id int) (affacted int64, err error) {
	if affacted, err = productdao.Delete(id); err != nil {
		return -1, err
	} else {
		suggest.Delete(suggest.Product, id)
		return
	}
}