refactor(sale): 优化审核流程接口返回值
- 修改 Append、Change 和 Benefit 函数的返回类型 - 从返回错误改为同时返回 workflowId 和错误 - 移除了不必要的 reply 变量,直接使用 workflowId 接收结果
This commit is contained in:
parent
1ec6a5ca32
commit
144ac0bb5d
@ -36,13 +36,12 @@ func (a *audit) Cancel(ctx context.Context, args ArgsAuditSubmit) (err error) {
|
||||
}
|
||||
|
||||
// Append @TITLE 追加商品审核
|
||||
func (a *audit) Append(ctx context.Context, args ArgsAuditSubmit) (err error) {
|
||||
func (a *audit) Append(ctx context.Context, args ArgsAuditSubmit) (workflowId int64, err error) {
|
||||
xClient, err := client.GetClient(a)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
err = xClient.Call(ctx, "Append", args, &reply)
|
||||
err = xClient.Call(ctx, "Append", args, &workflowId)
|
||||
return
|
||||
}
|
||||
|
||||
@ -58,13 +57,12 @@ type ChangeProductItem struct {
|
||||
}
|
||||
|
||||
// Change @TITLE 编辑商品审核
|
||||
func (a *audit) Change(ctx context.Context, args ArgsAuditChange) (err error) {
|
||||
func (a *audit) Change(ctx context.Context, args ArgsAuditChange) (workflowId int64, err error) {
|
||||
xClient, err := client.GetClient(a)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
err = xClient.Call(ctx, "Change", args, &reply)
|
||||
err = xClient.Call(ctx, "Change", args, &workflowId)
|
||||
return
|
||||
}
|
||||
|
||||
@ -76,12 +74,11 @@ type ArgsAuditBenefit struct {
|
||||
}
|
||||
|
||||
// Benefit @TITLE 效益测算审核
|
||||
func (a *audit) Benefit(ctx context.Context, args ArgsAuditBenefit) (err error) {
|
||||
func (a *audit) Benefit(ctx context.Context, args ArgsAuditBenefit) (workflowId int64, err error) {
|
||||
xClient, err := client.GetClient(a)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
err = xClient.Call(ctx, "Benefit", args, &reply)
|
||||
err = xClient.Call(ctx, "Benefit", args, &workflowId)
|
||||
return
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user