|
|
@@ -285,21 +285,21 @@ func (Quoter) TableName() string {
|
|
|
|
|
|
// Arearole 机构角色表
|
|
|
type Arearole struct {
|
|
|
- Userid int64 `json:"userid" xorm:"'USERID'" binding:"required"` // 机构用户ID其他做市关系,都设置为 1
|
|
|
- Roletype int32 `json:"roletype" xorm:"'ROLETYPE'" binding:"required"` // 角色类型 - 1:交易所 2:运营机构 3:营销中心 4:仓库机构 5:三方服务机构 6:自营会员 7:经纪会员 8:做市会员 9:产业会员 10:金融机构 11:商城店铺 12:子机构 13:报价商 14:积分服务商 15:供货商 16:圈内会员 17:物流机构 18:报价配置机构 19:场外期权做市商 20:组织机构 21:顶级机构
|
|
|
- Tradeaccountid int64 `json:"tradeaccountid" xorm:"'TRADEACCOUNTID'"` // 默认交易资金账号ID(做市会员被动接单使用、商城店铺默认资金账 号、圈内会员默认资金账号) - 作废, 使用UserReckonAccount
|
|
|
- Createtime time.Time `json:"createtime" xorm:"'CREATETIME'"` // 创建时间
|
|
|
- Creatorid int64 `json:"creatorid" xorm:"'CREATORID'"` // 创建人ID
|
|
|
- Modifytime time.Time `json:"modifytime" xorm:"'MODIFYTIME'"` // 修改时间
|
|
|
- Modifierid int64 `json:"modifierid" xorm:"'MODIFIERID'"` // 修改人ID
|
|
|
- Shoppassword string `json:"shoppassword" xorm:"'SHOPPASSWORD'"` // 商城店铺登陆密码(商城店铺角色使用)
|
|
|
- Isreturnscore int32 `json:"isreturnscore" xorm:"'ISRETURNSCORE'"` // 是否返还积分 [经纪会员-辽东湾] - 0:不返还 1:返还
|
|
|
- Transurl string `json:"transurl" xorm:"'TRANSURL'"` // 物流地址(物流机构)
|
|
|
- Outuserid string `json:"outuserid" xorm:"'OUTUSERID'"` // 外部账户[场外期权做市商]
|
|
|
- Parentuserid int64 `json:"parentuserid" xorm:"'PARENTUSERID'"` // 上级组织机构(组织机构)
|
|
|
- Rootuserid int64 `json:"rootuserid" xorm:"'ROOTUSERID'"` // 顶级组织机构用户ID(组织机构)
|
|
|
- Sublevelpath string `json:"sublevelpath" xorm:"'SUBLEVELPATH'"` // 组织机构层级路径(逗号分隔,首尾加逗号)
|
|
|
- Orgtype int32 `json:"orgtype" xorm:"'ORGTYPE'"` // 组织机构类型 1:机构 2:交易员
|
|
|
+ Userid int64 `json:"userid" xorm:"USERID" binding:"required"` // 机构用户ID其他做市关系,都设置为 1
|
|
|
+ Roletype int32 `json:"roletype" xorm:"ROLETYPE" binding:"required"` // 角色类型 - 1:交易所 2:运营机构 3:营销中心 4:仓库机构 5:三方服务机构 6:自营会员 7:经纪会员 8:做市会员 9:产业会员 10:金融机构 11:商城店铺 12:子机构 13:报价商 14:积分服务商 15:供货商 16:圈内会员 17:物流机构 18:报价配置机构 19:场外期权做市商 20:组织机构 21:顶级机构 22:业务员 23:跟单员 24:交易员
|
|
|
+ Tradeaccountid int64 `json:"tradeaccountid" xorm:"TRADEACCOUNTID"` // 默认交易资金账号ID(做市会员被动接单使用、商城店铺默认资金账 号、圈内会员默认资金账号) - 作废, 使用UserReckonAccount
|
|
|
+ Createtime time.Time `json:"createtime" xorm:"CREATETIME"` // 创建时间
|
|
|
+ Creatorid int64 `json:"creatorid" xorm:"CREATORID"` // 创建人ID
|
|
|
+ Modifytime time.Time `json:"modifytime" xorm:"MODIFYTIME"` // 修改时间
|
|
|
+ Modifierid int64 `json:"modifierid" xorm:"MODIFIERID"` // 修改人ID
|
|
|
+ Shoppassword string `json:"shoppassword" xorm:"SHOPPASSWORD"` // 商城店铺登陆密码(商城店铺角色使用)
|
|
|
+ Isreturnscore int32 `json:"isreturnscore" xorm:"ISRETURNSCORE"` // 是否返还积分 [经纪会员-辽东湾] - 0:不返还 1:返还
|
|
|
+ Transurl string `json:"transurl" xorm:"TRANSURL"` // 物流地址(物流机构)
|
|
|
+ Outuserid string `json:"outuserid" xorm:"OUTUSERID"` // 外部账户[场外期权做市商]
|
|
|
+ Parentuserid int64 `json:"parentuserid" xorm:"PARENTUSERID"` // 上级组织机构(组织机构)
|
|
|
+ Rootuserid int64 `json:"rootuserid" xorm:"ROOTUSERID"` // 顶级组织机构用户ID(组织机构)
|
|
|
+ Sublevelpath string `json:"sublevelpath" xorm:"SUBLEVELPATH"` // 组织机构层级路径(逗号分隔,首尾加逗号)
|
|
|
+ Orgtype int32 `json:"orgtype" xorm:"ORGTYPE"` // 组织机构类型 1:机构 2:交易员
|
|
|
}
|
|
|
|
|
|
// TableName is AREAROLE
|
|
|
@@ -307,6 +307,17 @@ func (Arearole) TableName() string {
|
|
|
return "AREAROLE"
|
|
|
}
|
|
|
|
|
|
+// 获取目标账号的相关角色信息
|
|
|
+func (r *Arearole) GetAreaRolesByUserID(UserID int) ([]Arearole, error) {
|
|
|
+ areaRoles := make([]Arearole, 0)
|
|
|
+
|
|
|
+ if err := db.GetEngine().Where("USERID = ?", UserID).Find(&areaRoles); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+
|
|
|
+ return areaRoles, nil
|
|
|
+}
|
|
|
+
|
|
|
// Taaccountlog 资金账户记账流水表 - 导历史
|
|
|
type Taaccountlog struct {
|
|
|
Autoid int64 `json:"autoid" xorm:"'AUTOID'" binding:"required"` // 流水ID(220+Unix秒时间戳(10位)+xxxxxx)
|