Beispiel #1
0
// 保存页面
func (this *contentRep) SavePage(merchantId int, v *content.Page) (int, error) {
	var err error
	var orm = this.Connector.GetOrm()
	if v.Id > 0 {
		_, _, err = orm.Save(v.Id, v)
	} else {
		var id2 int64
		_, id2, err = orm.Save(nil, v)
		v.Id = int(id2)
	}
	return v.Id, err
}
Beispiel #2
0
// 设置值
func (this *pageImpl) SetValue(v *content.Page) error {
	v.Id = this.GetDomainId()
	this._value = v
	return nil
}