123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330 |
- syntax = "v1"
- info(
- title: // TODO: add title
- desc: // TODO: add description
- author: "double.huang"
- email: "2637309949@qq.com"
- )
- type PageResult {
- Page int `json:"page"`
- Rows int `json:"rows"`
- TotalSize int64 `json:"totalSize"`
- TotalPageSize int64 `json:"totalPageSize"`
- Content []map[string]interface{} `json:"content"`
- }
- type WXLoginResponse {
- OpenID string `json:"openid"`
- SessionKey string `json:"session_key"`
- UnionID string `json:"unionid"`
- ErrCode int `json:"errcode"`
- ErrMsg string `json:"errmsg"`
- }
- type Watermark {
- AppID string `json:"appid"`
- TimeStamp int64 `json:"timestamp"`
- }
- type WXUserInfo {
- OpenID string `json:"openId,omitempty"`
- SessionKey string `json:"SessionKey"`
- NickName string `json:"nickName"`
- AvatarUrl string `json:"avatarUrl"`
- Gender int64 `json:"gender"`
- Country string `json:"country"`
- Province string `json:"province"`
- City string `json:"city"`
- UnionID string `json:"unionId,omitempty"`
- Language string `json:"language"`
- Watermark Watermark `json:"watermark,omitempty"`
- }
- type ResUserInfo {
- UserInfo WXUserInfo `json:"userInfo"`
- RawData string `json:"rawData"`
- Signature string `json:"signature"`
- EncryptedData string `json:"encryptedData"`
- IV string `json:"iv"`
- }
- type loginByWeixinRequest {
- Code string `json:"code"`
- // UserInfo ResUserInfo `json:"userInfo"`
- }
- type AuthUserInfo {
- ID int64 `json:"id"`
- Mobile string `json:"mobile"`
- UserName string `json:"username"`
- NickName string `json:"nickname"`
- Gender int64 `json:"gender"`
- Avatar string `json:"avatar"`
- Birthday int64 `json:"birthday"`
- ErpRoleType int64 `json:"erp_role_type"`
- ErpRole string `json:"erp_role"`
- MkId string `json:"mk_id"`
- }
- type loginByWeixinResponse {
- Token string `json:"token"`
- UserInfo AuthUserInfo `json:"userInfo"`
- }
- type jzQrcodeResponse {
- Id int64 `json:"id"`
- FileId string `json:"fileId"`
- }
- type bindMobileRequest {
- Iv string `json:"iv"`
- EncryptedData string `json:"encryptedData"`
- }
- type bindMobileResponse {
- Id int64 `json:"id"`
- }
- type partTimeUserAddRequest {
- Name string `json:"name"`
- IponeNumber string `json:"ipone_number"`
- Sex int64 `json:"sex"`
- MkId string `json:"mk_id"`
- CityId int64 `json:"city_id"` // 城市
- }
- type infoResponse {
- ID int64 `json:"id"`
- Mobile string `json:"mobile"`
- UserName string `json:"username"`
- CityName string `json:"cityname"`
- NickName string `json:"nickname"`
- Gender int64 `json:"gender"`
- Avatar string `json:"avatar"`
- Birthday int64 `json:"birthday"`
- ErpRoleType int64 `json:"erpRoleType"`
- }
- type punchClockRequest {
- Lat string `json:"lat"`
- Address string `json:"address"`
- Type int64 `json:"type"`
- }
- type enrollRequest {
- Scene string `json:"scene"`
- Name string `json:"name"`
- ContactName string `json:"contactName"`
- ContactPhone string `json:"contactPhone"`
- SchId int64 `json:"schId"`
- Location string `json:"location"`
- }
- type enrollAddReq {
- StuName string `json:"stu_name"`
- AgeGroup int `json:"age_group,optional"`
- StuLinkPerson int `json:"stu_link_person"`
- StuPhone string `json:"stu_phone"`
- SchId int `json:"sch_id,optional"`
- Address string `json:"address"`
- Sign string `json:"sign"`
- Remark string `json:"remark"`
- }
- type Response {
- Code int `json:"code"`
- Msg string `json:"msg"`
- Data interface{} `json:"data"`
- }
- type GetErpOptionsetReq {
- Code string `json:"code"`
- }
- // 认证模块
- @server(
- group: auth
- )
- service i2bill-api {
- @handler Hello
- get /api/hello
-
- @handler LoginByWeixin
- post /api/auth/loginByWeixin(loginByWeixinRequest) returns(loginByWeixinResponse)
- }
- // 用户模块
- @server(
- jwt: JwtAuth
- group: user
- )
- service i2bill-api {
- @handler JzQrCode
- get /api/user/share/jzQrcode returns(jzQrcodeResponse)
-
- @handler BindMobile
- post /api/user/bindMobile(bindMobileRequest) returns(Response)
-
- @handler GetUser
- get /api/user/info returns(infoResponse)
-
- @handler UpdateUser
- post /api/user/update returns(Response)
-
- @handler PunchClock
- post /api/user/punchClock(punchClockRequest) returns(Response)
-
- @handler PunchClockPage
- get /api/user/punchClock/page returns(Response)
-
- @handler PunchClockGet
- get /api/user/punchClock/get_to_day returns(Response)
-
- }
- // 兼职模块
- @server(
- jwt: JwtAuth
- group: mkt_part_time_user
- )
- service i2bill-api {
- @handler MktPartTimeUserAdd
- post /api/v1/part_time_user/add (partTimeUserAddRequest) returns(Response)
-
- @handler MktPartTimeUserUpdate
- post /api/v1/part_time_user/update (partTimeUserAddRequest) returns(Response)
-
- @handler MktPartTimeUserGet
- get /api/v1/part_time_user/get returns(Response)
-
- }
- @server(
- group: mkt_qr
- )
- service i2bill-api {
- @handler MktQrAdd
- post /api/v1/mkt_qr/add returns(Response)
-
- @handler MktQrGet
- get /api/v1/mkt_qr/get returns(Response)
- }
- // 收单模块
- @server(
- jwt: JwtAuth
- group: acquirer
- )
- service i2bill-api {
- @handler Enroll
- post /api/acquirer/enroll(enrollRequest) returns(Response)
-
- }
- @server(
- jwt: JwtAuth
- group: acquirer_student
- )
- service i2bill-api{
- @handler AcquirerStudentPage
- get /api/v1/acquirer_student/page returns(Response)
-
- @handler AcquirerStudentTotal
- get /api/v1/acquirer_student/total returns(Response)
-
- @handler AcquirerStudentRemark
- post /api/v1/acquirer_student/remark returns(Response)
- }
- @server(
- group: acquirer_student
- )
- service i2bill-api {
- @handler AcquirerStudentAdd
- post /api/v1/acquirer_student/add(enrollAddReq) returns(Response)
- }
- //收单二维码
- @server(
- jwt: JwtAuth
- group: acquirer_mkt_qr
- )
- service i2bill-api {
- @handler AcquirerMktQrUpdate
- post /api/v1/acquirer_mkt_qr/update returns(Response)
-
- @handler AcquirerMktQrGet
- get /api/v1/acquirer_mkt_qr/get returns(Response)
- }
- //系统
- @server(
- jwt: JwtAuth
- group: system
- )
- service i2bill-api {
- @handler SystemFileUpload
- post /api/v1/system_file/upload returns(Response)
-
- @handler SystemFileDownload
- get /api/v1/system_file/download returns(Response)
- }
- // 城市树
- @server(
- jwt: JwtAuth
- group: base_organ
- )
- service i2bill-api{
- @handler GetErpCityTree
- get /api/v1/base_organ/get_erp_city_tree returns(Response)
- }
- //erp 字典
- @server(
- jwt: JwtAuth
- group: sys_optionset
- )
- service i2bill-api{
- @handler GetErpOptionset
- get /api/v1/sys_optionset/get_erp_optionset returns(Response)
- }
- //erp 渠道细分
- @server(
- jwt: JwtAuth
- group: mkt_network_detail
- )
- service i2bill-api{
- @handler GetErpMktNetworkDetail
- get /api/v1/mkt_network_detail/get_erp_mkt_network_detail returns(Response)
- }
- //erp 收单资源校区
- @server(
- jwt: JwtAuth
- group: base_organ_school
- )
- service i2bill-api{
- @handler GetErpSchPerm
- get /api/v1/base_organ_school/get_erp_sch_perm returns(Response)
- @handler GetErpSchTree
- get /api/v1/base_organ_school/get_organ_school_tree returns(Response)
- }
- //erp 校区活动
- @server(
- jwt: JwtAuth
- group: mkt_active
- )
- service i2bill-api{
- @handler GetErpMktActive
- get /api/v1/mkt_active/get_erp_mkt_active returns(Response)
- }
|