syntax = "v1" info ( title: "剑鱼标讯" // TODO: add title desc: "订阅模块"// TODO: add description author: "wangshan" email: "wangshan@topnet.net.cn" ) type ( //订阅列表 subscribeReq { AppId string `header:"appId"` UserId string `header:"userId"` EntId string `header:"entId,optional"` EntUserId string `header:"entUserId,optional"` DeptId string `header:"deptId,optional"` //部门id PageNum int64 `json:"pageNum,optional"` PageSize int64 `json:"pageSize,optional"` SelectTime string `json:"selectTime,optional"` Area string `json:"area,optional"` City string `json:"city,optional"` Industry string `json:"industry,optional"` BuyerClass string `json:"buyerClass,optional"` KeyWords string `json:"keyWords,optional"` Subtype string `json:"subtype,optional"` Price string `json:"price,optional"` FileExists string `json:"fileExists,optional"` Source string `json:"source,optional"` //信息来源 IsRead string `json:"isRead,optional"` //是否已读 Staffs string `json:"staffs,optional"` //分发的员工 UserType string `path:"userType,default=fType,options=fType|vType|mType|eType"` //fType:普通用户;vType:超级订阅用户;mType:大会员用户;eType:商机管理用户; NewUserId int64 `header:"newUserId"` IsEnt bool `json:"isEnt,optional"` SelectIds string `json:"selectIds,optional"` PositionType int64 `header:"positionType,optional"` NotReturnCount int64 `json:"notReturnCount,optional"` Item map[string]interface{} `json:"item,optional"` AccountId string `header:"accountId,optional"` PositionId string `header:"positionId,optional"` MgoUserId string `header:"mgoUserId,optional"` //原userId } // someInfoReq { AppId string `header:"appId"` UserType string `path:"userType"` UserId string `header:"userId,optional"` NewUserId string `header:"newUserId,optional"` EntId string `header:"entId,optional"` AccountId string `header:"accountId,optional"` PositionType string `header:"positionType,optional"` PositionId string `header:"positionId,optional"` } // commonResp { Err_code int64 `json:"error_code"` Err_msg string `json:"error_msg"` Data interface{} `json:"data"` TimeData interface{} `json:"timeData"` } // subscribeUpdateReq { Area map[string]interface{} `json:"area,optional"` //地区 Buyerclass []string `json:"buyerclass,optional"` //采购单位类型 Items []map[string]interface{} `json:"items,optional"` //关键词 Infotype []string `json:"infotype,optional"` //信息类型 Matchway string `json:"matchway,optional"` //匹配方式 1标题 2正文 Projectmatch string `json:"projectmatch,optional"` //项目匹配 1开始 0关闭 Ratemode string `json:"ratemode,optional"` // 1:实时推送,2:每天9点推送,3:每周推送,4:每月推送 5:每日推送两次 Apppush string `json:"apppush,optional"` //app推送 1开启 0关闭 Mailpush string `json:"mailpush,optional"` //邮箱推送 1开启 0关闭 Mail string `json:"mail,optional"` //邮箱 Otherbuyerclass string `json:"otherbuyerclass,optional"` //匹配未分类类型 1匹配 0不匹配 AppId string `header:"appId,optional"` UserType string `path:"userType,optional"` UserId string `header:"userId,optional"` PositionType int64 `header:"positionType,optional"` NewUserId int64 `header:"newUserId,optional"` EntId int64 `header:"entId,optional"` AccountId int64 `header:"accountId,optional"` PositionId int64 `header:"positionId,optional"` } SetReadReq { AppId string `header:"appId"` UserId string `header:"userId"` EntId string `header:"entId,optional"` EntUserId string `header:"entUserId,optional"` DeptId string `header:"deptId,optional"` //部门id Vsid int64 `form:"vsid"` NewUserId int64 `header:"newUserId"` IsEnt bool `form:"isEnt,optional"` UserType string `path:"userType,optional"` PositionType int64 `header:"positionType,optional"` } GetKeyReq { AppId string `header:"appId"` UserId string `header:"userId"` EntId string `header:"entId,optional"` EntUserId string `header:"entUserId,optional"` DeptId string `header:"deptId,optional"` //部门id NewUserId int64 `header:"newUserId"` IsEnt bool `form:"isEnt,optional"` UserType string `path:"userType,optional"` VipPower int64 `form:"ent_buy_vip ,optional"` MemberPower int64 `form:"ent_buy_member ,optional"` PowerSource int64 `form:"powerSource,optional"` UserPower int64 `form:"userPower,optional"` PositionType int64 `header:"positionType,optional"` } DistributorReq { AppId string `header:"appId"` EntId string `header:"entId,optional"` EntUserId string `header:"entUserId,optional"` UserType string `path:"userType,optional"` Region string `json:"region,optional"` SelectIds string `json:"selectIds,optional"` QueryType string `json:"queryType,optional"` } viewStatusReq { AppId string `header:"appId"` EntId string `header:"entId,optional"` EntUserId string `header:"entUserId,optional"` UserType string `path:"userType,optional"` InfoId string `json:"infoId,optional"` } msgDistributor { AppId string `header:"appId"` EntId string `header:"entId,optional"` EntUserId string `header:"entUserId,optional"` MessageId string `json:"messageId"` Staffs string `json:"staffs"` } GetUserReq { AppId string `header:"appId"` EntId int64 `header:"entId,optional"` EntUserId int64 `header:"entUserId,optional"` PositionType int64 `header:"positionType,optional"` UserId string `header:"mgoUserId,optional"` BaseUserId int64 `header:"newUserId,optional"` ServiceType string `json:"serviceType,optional"` PositionId int64 `header:"positionId,optional"` AccountId int64 `header:"accountId,optional"` MgoUserId string `header:"mgoUserId,optional"` //原userId } SetUserReq { AppId string `header:"appId"` EntId int64 `header:"entId,optional"` EntUserId int64 `header:"entUserId,optional"` PositionType int64 `header:"positionType,optional"` UserId string `header:"userId,optional"` Mail string `json:"mail,optional"` } SetPushSetReq { AppId string `header:"appId"` EntId int64 `header:"entId,optional"` EntUserId int64 `header:"entUserId,optional"` PositionType int64 `header:"positionType,optional"` UserId string `header:"mgoUserId,optional"` Item string `json:"item,optional"` SetType string `json:"setType"` Ratemode int64 `json:"ratemode,optional"` Times []string `json:"times,optional"` PushType string `json:"pushType,optional"` PushValue int64 `json:"pushValue,optional"` Interested int64 `json:"interested,optional"` } GetStaffSubscribeListReq { AppId string `header:"appId"` EntId int64 `header:"entId,optional"` EntUserId int64 `header:"entUserId,optional"` EStatus int64 `json:"e_status,optional"` PStatus int64 `json:"p_status,optional"` Search string `json:"search,optional"` PageNum int64 `json:"pageNum,optional"` PageSize int64 `json:"pageSize,optional"` } GetStaffSubscribeDetailReq { AppId string `header:"appId"` EntId int64 `header:"entId,optional"` EntUserId int64 `header:"entUserId,optional"` Token string `json:"token,optional"` } StaffSubscribeCommonResp { Err_code int64 `json:"error_code"` Err_msg string `json:"error_msg"` Data interface{} `json:"data"` } BidDistributor { AppId string `header:"appId"` EntId string `header:"entId,optional"` EntUserId string `header:"entUserId,optional"` Infoids []string `json:"infoids"` Staffs string `json:"staffs"` } ) service bxsubscribe-api { @handler subscribeList post /jybx/subscribe/:userType/list(subscribeReq) returns (commonResp) @handler someInfo post /jybx/subscribe/:userType/someInfo(someInfoReq) returns (commonResp) @handler subscribeUpdate post /jybx/subscribe/:userType/update(subscribeUpdateReq) returns (commonResp) @handler ByPushHistory post /jybx/subscribe/:userType/byPushHistory(subscribeReq) returns (commonResp) @handler SetRead post /jybx/subscribe/:userType/setRead(SetReadReq) returns (commonResp) @handler getKey post /jybx/subscribe/:userType/getKey(GetKeyReq) returns (commonResp) @handler distributor post /jybx/subscribe/:userType/distributor(DistributorReq) returns (commonResp) @handler viewStatus post /jybx/subscribe/:userType/viewStatus(viewStatusReq) returns (commonResp) @handler msgDistributor post /jybx/subscribe/msgDistributor(msgDistributor) returns (commonResp) @handler getUser //查询用户信息 post /jybx/subscribe/getUser (GetUserReq) returns (commonResp) @handler setUser //设置用户信息 post /jybx/subscribe/setUser (SetUserReq) returns (commonResp) @handler getPushSet //推送设置查询 post /jybx/subscribe/getPushSet (GetUserReq) returns (commonResp) @handler setPushSet //推送设置修改 post /jybx/subscribe/setPushSet (SetPushSetReq) returns (commonResp) @handler getStaffSubscribeList //查询企业员工订阅状态 post /jybx/subscribe/getStaffSubscribe (GetStaffSubscribeListReq) returns (StaffSubscribeCommonResp) @handler getStaffSubscribeDetail //查询企业员工订阅详情 post /jybx/subscribe/getStaffSubscribeDetail (GetStaffSubscribeDetailReq) returns (StaffSubscribeCommonResp) @handler bidDistributor //标讯分发 post /jybx/subscribe/bidDistributor(BidDistributor) returns (commonResp) }