mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 02:48:34 +08:00
【feature】添加组织数据读取权限
This commit is contained in:
@@ -40,7 +40,7 @@ func (p *RuleChainApi) GetRuleChainList(rc *restfulx.ReqCtx) {
|
||||
rc.ResData = model.ResultPage{
|
||||
Total: total,
|
||||
PageNum: int64(pageNum),
|
||||
PageSize: int64(pageNum),
|
||||
PageSize: int64(pageSize),
|
||||
Data: list,
|
||||
}
|
||||
}
|
||||
@@ -64,6 +64,7 @@ func (p *RuleChainApi) InsertRuleChain(rc *restfulx.ReqCtx) {
|
||||
restfulx.BindJsonAndValid(rc, &data)
|
||||
data.Id = kgo.KStr.Uniqid("rule_")
|
||||
data.Owner = rc.LoginAccount.UserName
|
||||
data.OrgId = rc.LoginAccount.OrganizationId
|
||||
p.RuleChainApp.Insert(data)
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ func (p *RuleChainMsgLogApi) GetRuleChainMsgLogList(rc *restfulx.ReqCtx) {
|
||||
rc.ResData = model.ResultPage{
|
||||
Total: total,
|
||||
PageNum: int64(pageNum),
|
||||
PageSize: int64(pageNum),
|
||||
PageSize: int64(pageSize),
|
||||
Data: list,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,8 @@ type RuleChainBase struct {
|
||||
RuleName string `gorm:"ruleName;type:varchar(50);comment:名称" json:"ruleName"`
|
||||
RuleBase64 string `gorm:"ruleBase64;type:longtext;comment:Base64缩略图" json:"ruleBase64"` //缩略图 base64
|
||||
RuleRemark string `gorm:"ruleRemark;type:varchar(256);comment:说明" json:"ruleRemark"`
|
||||
|
||||
RoleId int64 `gorm:"-"` // 角色数据权限
|
||||
}
|
||||
|
||||
type RuleChain struct {
|
||||
@@ -30,12 +32,15 @@ func (RuleChain) TableName() string {
|
||||
|
||||
type RuleChainMsgLog struct {
|
||||
MessageId string `gorm:"message_id;type:varchar(64);comment:消息Id" json:"messageId"`
|
||||
OrgId int64 `json:"orgId" gorm:"type:int;comment:机构ID"`
|
||||
MsgType string `gorm:"msg_type;type:varchar(64);comment:消息类型" json:"msgType"`
|
||||
DeviceId string `gorm:"device_id;type:varchar(64);comment:设备ID" json:"deviceId"`
|
||||
DeviceName string `gorm:"device_name;type:varchar(255);comment:设备名称" json:"deviceName"`
|
||||
Ts time.Time `gorm:"ts;type:varchar(64);comment:时间" json:"ts"`
|
||||
Content string `gorm:"content;type:varchar(1024);comment:内容" json:"content"`
|
||||
CreatedAt time.Time `gorm:"column:create_at" json:"create_at"` // 创建时间
|
||||
|
||||
RoleId int64 `gorm:"-"` // 角色数据权限
|
||||
}
|
||||
|
||||
func (RuleChainMsgLog) TableName() string {
|
||||
|
||||
Reference in New Issue
Block a user