|
@@ -42,20 +42,6 @@ type CygxUserYanxuanPermissionLog struct {
|
|
|
ModifyTime time.Time `description:"修改时间"`
|
|
|
}
|
|
|
|
|
|
-// 添加
|
|
|
-func AddCygxUserYanxuanPermission(item *CygxUserYanxuanPermission) (lastId int64, err error) {
|
|
|
- o := orm.NewOrm()
|
|
|
- lastId, err = o.Insert(item)
|
|
|
- return
|
|
|
-}
|
|
|
-
|
|
|
-// 添加日志记录
|
|
|
-func AddCygxUserYanxuanPermissionLog(item *CygxUserYanxuanPermissionLog) (lastId int64, err error) {
|
|
|
- o := orm.NewOrm()
|
|
|
- lastId, err = o.Insert(item)
|
|
|
- return
|
|
|
-}
|
|
|
-
|
|
|
// 根据用户ID获取是否开通过研选权限
|
|
|
func GetCygxUserYanxuanPermissionCountByUserId(userId int) (count int, err error) {
|
|
|
o := orm.NewOrm()
|
|
@@ -64,18 +50,6 @@ func GetCygxUserYanxuanPermissionCountByUserId(userId int) (count int, err error
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-// 将研选权限状态改为未开通
|
|
|
-func UpdateCygxUserYanxuanPermissionClose(userId int) (err error) {
|
|
|
- o := orm.NewOrm()
|
|
|
- sql := ` UPDATE cygx_user_yanxuan_permission
|
|
|
- SET
|
|
|
- status ='未开通',
|
|
|
- modify_time = ?
|
|
|
- WHERE user_id = ? `
|
|
|
- _, err = o.Raw(sql, time.Now(), userId).Exec()
|
|
|
- return
|
|
|
-}
|
|
|
-
|
|
|
// 列表
|
|
|
func GetCygxUserYanxuanPermissionList(condition string, pars []interface{}, startSize, pageSize int) (items []*CygxUserYanxuanPermission, err error) {
|
|
|
o := orm.NewOrm()
|