-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #283 from ArtisanCloud/dev/michaelhu
虚拟币和会籍模块
- Loading branch information
Showing
85 changed files
with
2,706 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,161 @@ | ||
syntax = "v1" | ||
|
||
info( | ||
title: "品牌故事" | ||
desc: "品牌故事" | ||
author: "MichaelHu" | ||
email: "[email protected]" | ||
version: "v1" | ||
) | ||
|
||
|
||
@server( | ||
group: admin/crm/market/brandstory | ||
prefix: /api/v1/admin/market | ||
middleware: EmployeeJWTAuth | ||
) | ||
|
||
service PowerX { | ||
@doc "查询品牌故事列表" | ||
@handler ListStoresPage | ||
get /brand-stories/page-list (ListStoresPageRequest) returns (ListStoresPageReply) | ||
|
||
@doc "查询品牌故事详情" | ||
@handler GetStore | ||
get /brand-stories/:id (GetStoreRequest) returns (GetStoreReply) | ||
|
||
|
||
@doc "创建品牌故事" | ||
@handler CreateStore | ||
post /brand-stories (CreateStoreRequest) returns (CreateStoreReply) | ||
|
||
|
||
@doc "全量品牌故事" | ||
@handler PutStore | ||
put /brand-stories/:id (PutStoreRequest) returns (PutStoreReply) | ||
|
||
|
||
@doc "删除品牌故事" | ||
@handler DeleteStore | ||
delete /brand-stories/:id (DeleteStoreRequest) returns (DeleteStoreReply) | ||
|
||
|
||
} | ||
|
||
type ( | ||
StoreArtisanSpecific { | ||
ArtisanId int64 `json:"artisanId,optional"` | ||
} | ||
|
||
|
||
|
||
StoreArtisan { | ||
EmployeeId int64 `json:"employeeId,optional"` | ||
Name string `json:"name,optional"` | ||
Level int8 `json:"level,optional"` | ||
Gender bool `json:"gender,optional"` | ||
birthday string `json:"birthday,optional"` | ||
PhoneNumber string `json:"phoneNumber,optional"` | ||
CoverURL string `json:"coverURL,optional"` | ||
WorkNo string `json:"workNo,optional"` | ||
Email string `json:"email,optional"` | ||
Experience string `json:"experience,optional"` | ||
Specialty string `json:"specialty,optional"` | ||
Certificate string `json:"certificate,optional"` | ||
Address string `json:"address,optional"` | ||
ArtisanSpecific StoreArtisanSpecific `json:"artisanSpecific,optional"` | ||
} | ||
|
||
Store { | ||
Id int64 `json:"id,optional"` | ||
Name string `json:"name"` | ||
StoreEmployeeId int64 `json:"storeEmployeeId,optional"` | ||
ContactNumber string `json:"contactNumber"` | ||
Email string `json:"email,optional"` | ||
Address string `json:"address"` | ||
Description string `json:"description,optional"` | ||
Longitude float32 `json:"longitude,optional"` | ||
Latitude float32 `json:"latitude,optional"` | ||
StartWork string `json:"startWork,optional"` | ||
EndWork string `json:"endWork,optional"` | ||
Artisans []*StoreArtisan `json:"artisans,optional"` | ||
CreatedAt string `json:"createdAt,optional"` | ||
|
||
CoverImageId int64 `json:"coverImageId,optional"` | ||
CoverImage *MediaResource `json:"coverImage,optional"` | ||
DetailImageIds []int64 `json:"detailImageIds,optional"` | ||
DetailImages []*MediaResource `json:"detailImages,optional"` | ||
} | ||
) | ||
type ( | ||
ListStoresPageRequest struct { | ||
Ids []int64 `form:"ids,optional"` | ||
LikeName string `form:"likeName,optional"` | ||
OrderBy string `form:"orderBy,optional"` | ||
PageIndex int `form:"pageIndex,optional"` | ||
PageSize int `form:"pageSize,optional"` | ||
} | ||
|
||
|
||
ListStoresPageReply struct { | ||
List []*Store `json:"list"` | ||
PageIndex int `json:"pageIndex"` | ||
PageSize int `json:"pageSize"` | ||
Total int64 `json:"total"` | ||
} | ||
) | ||
|
||
type ( | ||
CreateStoreRequest struct { | ||
Store | ||
} | ||
|
||
CreateStoreReply struct { | ||
StoreId int64 `json:"id"` | ||
} | ||
) | ||
|
||
type ( | ||
GetStoreRequest struct { | ||
StoreId int64 `path:"id"` | ||
} | ||
|
||
GetStoreReply struct { | ||
*Store | ||
} | ||
) | ||
|
||
|
||
type ( | ||
PutStoreRequest struct { | ||
StoreId int64 `path:"id"` | ||
Store | ||
} | ||
|
||
PutStoreReply struct { | ||
*Store | ||
} | ||
) | ||
|
||
|
||
type ( | ||
DeleteStoreRequest struct { | ||
StoreId int64 `path:"id"` | ||
} | ||
|
||
DeleteStoreReply struct { | ||
StoreId int64 `json:"id"` | ||
} | ||
) | ||
|
||
|
||
type ( | ||
AssignStoreManagerRequest { | ||
Id int64 `path:"id"` | ||
EmployeeId int64 `json:"employeeId"` | ||
} | ||
|
||
AssignStoreManagerReply { | ||
Store | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
syntax = "v1" | ||
|
||
info( | ||
title: "会籍管理" | ||
desc: "会籍管理" | ||
author: "MichaelHu" | ||
email: "[email protected]" | ||
version: "v1" | ||
) | ||
|
||
@server( | ||
group: admin/crm/membership | ||
prefix: /api/v1/admin/membership | ||
middleware: EmployeeJWTAuth | ||
) | ||
|
||
service PowerX { | ||
@doc "查询会籍" | ||
@handler GetCustomer | ||
get /customers/:id (GetMembershipRequest) returns (GetMembershipReply) | ||
} | ||
|
||
type ( | ||
Membership { | ||
Id int64 `json:"id,optional"` | ||
|
||
Name string `json:"name,optional"` | ||
MainMembershipId int64 `json:"mainMembershipId,optional"` | ||
OrderId int64 `json:"orderId,optional"` | ||
OrderItemId int64 `json:"orderItemId,optional"` | ||
CustomerId int64 `json:"customerId,optional"` | ||
ProductId int64 `json:"productId,optional"` | ||
StartDate string `json:"startDate,optional"` | ||
EndDate string `json:"endDate,optional"` | ||
Status int `json:"status,optional"` | ||
Type int `json:"type,optional"` | ||
ExtendPeriod bool `json:"extendPeriod,optional"` | ||
Plan int `json:"plan,optional"` | ||
|
||
} | ||
|
||
GetMembershipRequest{ | ||
Id int64 `path:"id"` | ||
} | ||
|
||
GetMembershipReply { | ||
*Membership | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
syntax = "v1" | ||
|
||
info( | ||
title: "客户服务" | ||
desc: "客户服务" | ||
author: "MichaelHu" | ||
email: "[email protected]" | ||
version: "v1" | ||
) | ||
|
||
|
||
@server( | ||
group: mp/crm/customer | ||
prefix: /api/v1/mp/customer | ||
middleware: MPCustomerJWTAuth, MPCustomerGet | ||
) | ||
|
||
service PowerX { | ||
@doc "获取用户信息" | ||
@handler GetUserInfo | ||
get /user-info returns (GetUserInfoReplyForMP) | ||
} | ||
|
||
type GetUserInfoReplyForMP{ | ||
*Customer | ||
} |
Oops, something went wrong.