Documentation ¶
Index ¶
- func AddDept(m *SysDept) error
- func AddDict(m *SysDict) error
- func AddDictDetail(m *SysDictDetail) error
- func AddJob(m *SysJob) error
- func AddLog(m *SysLog) error
- func AddMaterial(m *SysMaterial) error
- func AddMaterialGroup(m *SysMaterialGroup) error
- func AddMenu(m *SysMenu) error
- func AddNideshopAd(m *NideshopAd) error
- func AddProduct(m *YshopStorePic) error
- func AddRole(m *SysRole) error
- func AddUser(m *SysUser) error
- func AddWechatUser(m *YshopUser) error
- func BatchRoleMenuAdd(menu dto2.RoleMenu) error
- func DelByDept(ids []int64) error
- func DelByDict(ids []int64) error
- func DelByDictDetail(ids []int64) error
- func DelByJob(ids []int64) error
- func DelByMaterial(ids []int64) error
- func DelByMaterialGroup(ids []int64) error
- func DelByMenu(ids []int64) error
- func DelByProduct(ids []int64) error
- func DelByRole(ids []int64) error
- func DelByUser(ids []int64) error
- func DelByWechatUser(ids []int64) error
- func DelBylog(ids []int64) error
- func DelNideshopAd(ids []int64) error
- func FindByUserId(id int64) ([]string, error)
- func Setup()
- func UpdateByDept(m *SysDept) error
- func UpdateByDict(m *SysDict) error
- func UpdateByDictDetail(m *SysDictDetail) error
- func UpdateByJob(m *SysJob) error
- func UpdateByMaterial(m *SysMaterial) error
- func UpdateByMaterialGroup(m *SysMaterialGroup) error
- func UpdateByMenu(m *SysMenu) error
- func UpdateByProduct(id int64, m YshopStorePic) error
- func UpdateByRole(m *SysRole) error
- func UpdateByUser(m *SysUser) error
- func UpdateByWechatUsere(id int64, m *YshopUser) error
- func UpdateCurrentUser(m *SysUser) (err error)
- func UpdateNideshopAd(m *NideshopAd) error
- type BaseModel
- type BaseModelNew
- type NideshopAd
- type RoleId
- type RoleIdList
- type SysDept
- type SysDict
- type SysDictDetail
- type SysJob
- type SysLog
- type SysMaterial
- type SysMaterialGroup
- type SysMenu
- type SysRole
- type SysRolesDepts
- type SysRolesMenus
- type SysUser
- type SysUsersRoles
- type YshopStorePic
- type YshopUser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDictDetail ¶
func AddDictDetail(m *SysDictDetail) error
func AddMaterial ¶
func AddMaterial(m *SysMaterial) error
func AddMaterialGroup ¶
func AddMaterialGroup(m *SysMaterialGroup) error
func AddNideshopAd ¶
func AddNideshopAd(m *NideshopAd) error
func AddProduct ¶
func AddProduct(m *YshopStorePic) error
func AddWechatUser ¶
func BatchRoleMenuAdd ¶
func DelByDictDetail ¶
func DelByMaterial ¶
func DelByMaterialGroup ¶
func DelByProduct ¶
func DelByWechatUser ¶
func DelNideshopAd ¶
func FindByUserId ¶
func UpdateByDept ¶
func UpdateByDict ¶
func UpdateByDictDetail ¶
func UpdateByDictDetail(m *SysDictDetail) error
func UpdateByJob ¶
func UpdateByMaterial ¶
func UpdateByMaterial(m *SysMaterial) error
func UpdateByMaterialGroup ¶
func UpdateByMaterialGroup(m *SysMaterialGroup) error
func UpdateByMenu ¶
func UpdateByProduct ¶
func UpdateByProduct(id int64, m YshopStorePic) error
func UpdateByRole ¶
func UpdateByUser ¶
func UpdateByWechatUsere ¶
func UpdateCurrentUser ¶
func UpdateNideshopAd ¶
func UpdateNideshopAd(m *NideshopAd) error
Types ¶
type BaseModel ¶
type BaseModel struct { Id int64 `gorm:"primary_key;autoIncrement" json:"id"` // 主键id UpdateTime time.Time `json:"updateTime" gorm:"autoUpdateTime"` // 更新时间 CreateTime time.Time `json:"createTime" gorm:"autoCreateTime"` // 创建时间 IsDel soft_delete.DeletedAt `json:"isDel" gorm:"softDelete:flag"` // 删除标签 0 未删除 1 已删除 }
type BaseModelNew ¶
type BaseModelNew struct { Id int64 `gorm:"primary_key;autoIncrement" json:"id"` // 主键id UpdateTime *time.Time `json:"updateTime" gorm:"autoUpdateTime"` // 更新时间 CreateTime *time.Time `json:"createTime" gorm:"autoCreateTime"` // 创建时间 IsDel soft_delete.DeletedAt `json:"isDel" gorm:"softDelete:flag"` // 删除标签 0 未删除 1 已删除 }
type NideshopAd ¶
type NideshopAd struct { AdPositionId int `json:"ad_position_id"` Content string `json:"content"` Enabled int `json:"enabled"` EndTime int `json:"end_time"` Id int `json:"id"` ImageUrl string `json:"image_url"` Link string `json:"link"` MediaType int `json:"media_type"` Name string `json:"name"` UpdateTime time.Time `json:"updateTime" gorm:"autoUpdateTime"` CreateTime time.Time `json:"createTime" gorm:"autoCreateTime"` IsDel soft_delete.DeletedAt `json:"isDel" gorm:"softDelete:flag"` }
func GetAllNideshopAds ¶
func GetAllNideshopAds(pageNUm int, pageSize int, maps interface{}) (int64, []NideshopAd)
get all
func GetNideShopAd ¶
func GetNideShopAd(id int64) *NideshopAd
func (NideshopAd) TableName ¶
func (NideshopAd) TableName() string
type RoleIdList ¶
type RoleIdList struct {
Id int64
}
type SysDept ¶
type SysDept struct { Name string `json:"name" valid:"Required;"` Pid int64 `json:"pid"` Enabled int8 `json:"enabled" ` Children []SysDept `gorm:"-" json:"children"` Label string `gorm:"-" json:"label"` BaseModel }
func GetAllDepts ¶
func GetAllDepts(maps interface{}) []SysDept
type SysDict ¶
type SysDict struct { Name string `json:"name" valid:"Required;"` Remark string `json:"remark" valid:"Required;"` BaseModel }
func GetAllDict ¶
get all
type SysDictDetail ¶
type SysDictDetail struct { Label string `json:"label" valid:"Required;"` Value string `json:"value" valid:"Required;"` Sort int `json:"sort"` DictId int64 `json:"dictId"` DictName string `json:"dictName"` BaseModel }
func GetAllDictDetail ¶
func GetAllDictDetail(pageNUm int, pageSize int, maps interface{}) (int64, []SysDictDetail)
get all
func (SysDictDetail) TableName ¶
func (SysDictDetail) TableName() string
type SysJob ¶
type SysJob struct { Name string `json:"name" valid:"Required;"` Enabled int8 `json:"enabled"` Sort int `json:"sort"` DeptId int64 `json:"deptId"` Dept *SysDept `json:"dept" gorm:"foreignKey:DeptId;association_autoupdate:false;association_autocreate:false"` BaseModel }
type SysLog ¶
type SysLog struct { Description string `json:"description"` Method string `json:"method"` RequestIp string `json:"requestIp"` Username string `json:"username"` Address string `json:"address"` Browser string `json:"browser"` Type int8 `json:"type"` Uid int64 `json:"uid"` Time int64 `json:"time"` BaseModel }
type SysMaterial ¶
type SysMaterial struct { Name string `json:"name" valid:"Required;"` Type string `json:"type"` Url string `json:"url"` GroupId int64 `json:"groupId"` CreateId int64 `json:"create_id"` BaseModel }
func GetAllMaterial ¶
func GetAllMaterial(pageNUm int, pageSize int, maps interface{}) (int64, []SysMaterial)
func (SysMaterial) TableName ¶
func (SysMaterial) TableName() string
type SysMaterialGroup ¶
type SysMaterialGroup struct { Name string `json:"name" valid:"Required;"` CreateId int64 `json:"create_id"` BaseModel }
func GetAllGroup ¶
func GetAllGroup(maps interface{}) []SysMaterialGroup
func (SysMaterialGroup) TableName ¶
func (SysMaterialGroup) TableName() string
type SysMenu ¶
type SysMenu struct { Name string `json:"name" valid:"Required;"` IFrame int8 `json:"iframe"` Component string `json:"component"` Pid int64 `json:"pid"` Sort int32 `json:"sort"` Icon string `json:"icon"` Path string `json:"path"` Cache int8 `json:"cache"` Hidden int8 `json:"hidden"` ComponentName string `json:"componentName"` Permission string `json:"permission"` Type int32 `json:"type"` Router string `json:"router"` RouterMethod string `json:"routerMethod"` Children []SysMenu `json:"children" gorm:"-"` Label string `gorm:"-" json:"label"` BaseModel }
func BuildMenus ¶
func GetAllMenus ¶
func GetAllMenus(maps interface{}) []SysMenu
func GetOneMenuById ¶
type SysRole ¶
type SysRole struct { Name string `json:"name" valid:"Required;"` Remark string `json:"remark"` DataScope string `json:"dataScope"` Level int32 `json:"level"` Permission string `json:"permission"` Users []*SysUser `gorm:"many2many:sys_users_roles;association_autoupdate:false;association_autocreate:false"` Menus []*SysMenu `json:"menus" gorm:"many2many:sys_roles_menus;association_autoupdate:false;association_autocreate:false"` Depts []*SysDept `gorm:"many2many:sys_roles_depts;association_autoupdate:false;association_autocreate:false"` BaseModel }
func GetAllRole ¶
get all
func GetOneRole ¶
type SysRolesDepts ¶
type SysRolesMenus ¶
type SysUser ¶
type SysUser struct { Avatar string `json:"avatar"` Email string `json:"email"` Enabled int8 `json:"enabled"` Password string `json:"password"` Username string `json:"username" valid:"Required;"` DeptId int32 `json:"deptId"` Phone string `json:"phone"` JobId int32 `json:"jobId"` NickName string `json:"nickName"` Sex string `json:"sex"` Roles []*SysRole `json:"roles" gorm:"many2many:sys_users_roles;association_autoupdate:false;association_autocreate:false"` Jobs *SysJob `json:"job" gorm:"foreignKey:JobId;association_autoupdate:false;association_autocreate:false"` Depts *SysDept `json:"dept" gorm:"foreignKey:DeptId;association_autoupdate:false;association_autocreate:false"` Permissions []string `gorm:"-"` RoleIds []int64 `json:"roleIds" gorm:"-"` BaseModel }
func GetAllUser ¶
get all
func GetUserById ¶
GetUserById retrieves User by Id. Returns error if Id doesn't exist
type SysUsersRoles ¶
type YshopStorePic ¶
type YshopStorePic struct { Id int64 `json:"id"` ListPicUrl string `json:"list_pic_url"` // 商品列表图 PrimaryPicUrl string `json:"primary_pic_url"` // 主图 Mobile string `json:"mobile"` Wechat string `json:"wechat"` PicType int `json:"pic_type"` UpdateTime time.Time `json:"updateTime" gorm:"autoUpdateTime"` CreateTime time.Time `json:"createTime" gorm:"autoCreateTime"` }
func GetAllProduct ¶
func GetAllProduct(pageNUm int, pageSize int, maps interface{}) (int64, []YshopStorePic)
get all
func GetProduct ¶
func GetProduct(id int64) YshopStorePic
func (YshopStorePic) TableName ¶
func (YshopStorePic) TableName() string
type YshopUser ¶
type YshopUser struct { Username string `json:"username"` Password string `json:"password"` RealName string `json:"real_name"` Birthday int `json:"birthday"` CardId string `json:"card_id"` Mark string `json:"mark"` Nickname string `json:"nickname"` Avatar string `json:"avatar"` Phone string `json:"phone"` AddIp string `json:"add_ip"` LastIp string `json:"last_ip"` NowMoney float64 `json:"nowMoney"` BrokeragePrice float64 `json:"brokeragePrice"` Integral int `json:"integral"` SignNum int `json:"sign_num"` Status int8 `json:"status"` Level int8 `json:"level"` SpreadUid string `json:"spreadUid"` SpreadTime time.Time `json:"spread_time"` UserType string `json:"userType"` PayCount int `json:"payCount"` SpreadCount int `json:"spread_count"` Address string `json:"address"` LoginType string `json:"login_type"` WxProfile datatypes.JSON `json:"wx_profile"` BaseModel }
func GetAllWechatUser ¶
get all
Source Files ¶
Click to show internal directories.
Click to hide internal directories.