123456789101112131415161718192021222324252627282930313233343536 |
- package data_manage
- import (
- "github.com/beego/beego/v2/client/orm"
- "time"
- )
- type CygxActivitySpecialInheritPointsCompany struct {
- Id int `orm:"column(id);pk"`
- CompanyId int // 公司ID
- CompanyName string // 公司名称
- Points int // 公司剩余点数
- CreateTime time.Time // 创建时间
- ModifyTime time.Time // 更新时间
- ChartPermissionId int // 品种ID
- ChartPermissionName string // 品种名称
- }
- func AddCygxActivitySpecialInheritPointsCompanyMulti(items []*CygxActivitySpecialInheritPointsCompany) (err error) {
- o := orm.NewOrmUsingDB("hz_cygx")
- _, err = o.InsertMulti(1, items)
- return
- }
- func GetCygxActivitySpecialInheritPointsByCompanyId(companyId int) (list []*CygxActivitySpecialInheritPointsCompany, err error) {
- o := orm.NewOrmUsingDB("hz_cygx")
- sql := ` SELECT * FROM cygx_activity_special_inherit_points_company WHERE company_id = ? `
- _, err = o.Raw(sql,companyId).QueryRows(&list)
- return
- }
- func DelCygxActivitySpecialInheritPointsByCompanyId(companyId int) (err error) {
- o := orm.NewOrmUsingDB("hz_cygx")
- sql := ` DELETE FROM cygx_activity_special_inherit_points_company WHERE company_id = ? `
- _, err = o.Raw(sql,companyId).Exec()
- return
- }
|