Merge branch 'master' of git.oa00.com:supply-chain/service

finance
杨赟 2 years ago
commit bb5458ee0e

@ -1,5 +1,8 @@
package customer
import "git.oa00.com/supply-chain/service/customer/service"
type Customer struct {
User user
Service service.Service
}

@ -1,7 +1,5 @@
package customer
import "git.oa00.com/supply-chain/service/customer/service"
type serviceId uint
const (
@ -12,7 +10,3 @@ const (
UserServiceStatusAdopt = 2 // 审核通过
UserServiceStatusReject = 3 // 审核驳回
)
type Service struct {
Audit service.Audit
}

@ -3,14 +3,13 @@ package service
import (
"context"
"git.oa00.com/supply-chain/service/client"
"git.oa00.com/supply-chain/service/customer/service/audit"
audit2 "git.oa00.com/supply-chain/service/customer/service/audit"
"git.oa00.com/supply-chain/service/lib/bean"
)
type Audit struct {
Supply audit.Supply
type audit struct {
audit2.Audit
}
type AuditSearch struct {
Status uint // 审核状态 1=未审核 2=通过 3=驳回
Name string // 用户名称
@ -36,7 +35,7 @@ type ReplyAuditLists struct {
}
// Lists @Title 服务审核列表
func (a *Audit) Lists(ctx context.Context, args ArgsAuditLists) (reply ReplyAuditLists, err error) {
func (a *audit) Lists(ctx context.Context, args ArgsAuditLists) (reply ReplyAuditLists, err error) {
xClient, err := client.GetClient(a)
if err != nil {
return

@ -0,0 +1,5 @@
package audit
type Audit struct {
Supply supply
}

@ -5,11 +5,11 @@ import (
"git.oa00.com/supply-chain/service/client"
)
type Supply struct {
type supply struct {
}
type ArgsSupplyApply struct {
ApplyId uint // 申请人id
ApplyUserId uint // 申请人id
CustomerId uint // 客户id
RateId uint // 费率id
ExpirationAt int64 // 到期时间
@ -17,7 +17,7 @@ type ArgsSupplyApply struct {
}
// Apply @Title 申请
func (s *Supply) Apply(ctx context.Context, args ArgsSupplyApply) error {
func (s *supply) Apply(ctx context.Context, args ArgsSupplyApply) error {
reply := 0
xClient, err := client.GetClient(s)
if err != nil {
@ -27,12 +27,12 @@ func (s *Supply) Apply(ctx context.Context, args ArgsSupplyApply) error {
}
type ArgsSupplyAdopt struct {
AuditId uint // 审核人id
AuditUserId uint // 审核人id
UserServiceId uint // 客户服务id
}
// Adopt @Title 审核通过
func (s *Supply) Adopt(ctx context.Context, args ArgsSupplyAdopt) error {
func (s *supply) Adopt(ctx context.Context, args ArgsSupplyAdopt) error {
reply := 0
xClient, err := client.GetClient(s)
if err != nil {
@ -42,13 +42,13 @@ func (s *Supply) Adopt(ctx context.Context, args ArgsSupplyAdopt) error {
}
type ArgsSupplyReject struct {
AuditId uint // 审核人id
AuditUserId uint // 审核人id
UserServiceId uint // 客户服务id
Reason string // 驳回原因
}
// Reject @Title 驳回
func (s *Supply) Reject(ctx context.Context, args ArgsSupplyReject) error {
func (s *supply) Reject(ctx context.Context, args ArgsSupplyReject) error {
reply := 0
xClient, err := client.GetClient(s)
if err != nil {
@ -74,7 +74,7 @@ type ReplySupplyInfo struct {
}
// Info @Title 详情
func (s *Supply) Info(ctx context.Context, userServiceId uint) (reply ReplySupplyInfo, err error) {
func (s *supply) Info(ctx context.Context, userServiceId uint) (reply ReplySupplyInfo, err error) {
xClient, err := client.GetClient(s)
if err != nil {
return

@ -0,0 +1,5 @@
package service
type Service struct {
Audit audit
}

@ -63,3 +63,21 @@ func (c *category) Select(ctx context.Context) (reply []CategoryItem, err error)
err = xClient.Call(ctx, "Select", args, &reply)
return
}
type ArgsCategoryImport struct {
First string
Second string
Third string
SupplyCategoryId uint
}
// Import @Title 导入
func (*category) Import(ctx context.Context, args []ArgsCategoryImport) (err error) {
reply := 0
xClient, err := client.GetClient(ctx)
if err != nil {
return
}
err = xClient.Call(ctx, "Import", args, &reply)
return
}

Loading…
Cancel
Save