Example #1
0
func (dao *Dao) searchADCFPager(f *searchADCFPagerFilter) (items []*m.ADCF, err error) {
	items = make([]*m.ADCF, 0)
	if err = f.GetPageQuery(dao.getDb()).Find(&items); err != nil {
		log.Error(err.Error())
	}
	return
}
Example #2
0
func (dao *Dao) getADCF(f *searchADCFFilter) (*m.ADCF, error) {
	item := new(m.ADCF)
	has, err := f.GetQuery(dao.getDb()).Get(item)
	if err != nil {
		log.Error(err.Error())
		return nil, err
	}
	if !has {
		return nil, nil
	}
	return item, nil
}
Example #3
0
func (dao *Dao) CreateADCF(a_a_a string, b_b_b string, c_c_c int,
) (item *m.ADCF, err error) {
	item = new(m.ADCF)

	item.AAA = a_a_a
	item.BBB = b_b_b
	item.CCC = c_c_c

	if err = dao.insert(item); err != nil {
		log.Error(err.Error())
	}
	return
}
Example #4
0
func (dao *Dao) DeleteADCF(id int) (err error) {
	if err = dao.deleteByIds(new(m.ADCF), id); err != nil {
		log.Error(err.Error())
	}
	return
}