From 9ee568f85833844cf3c10e51986d9ee67532fe04 Mon Sep 17 00:00:00 2001 From: Leufolium Date: Fri, 21 Jun 2024 18:25:24 +0800 Subject: [PATCH] by Robin at 20240621 --- api/message/request/HYG10000001Req.go | 13 +++- api/message/request/HYG10000002Req.go | 13 +++- api/message/request/HYG10010001Req.go | 43 ++++++++++-- api/message/request/HYG10010002Req.go | 38 +++++++++++ api/message/request/HYGBaseReq.go | 6 ++ api/message/response/HYGBaseResponse.go | 5 +- api/proto/hvyogo/proto/hvyogo_api.go | 22 +++++- api/proto/hvyogo/proto/hvyogo_vo.go | 10 ++- app/mix/controller/hvyogo_api.go | 37 +++++++++- app/mix/controller/init.go | 1 + app/mix/service/apiservice.go | 67 +++++++++++++++++-- app/mix/service/hvyogoservice.go | 29 ++++++++ app/mix/service/utilservice.go | 10 +++ dbstruct/single_distribute_his.go | 2 + etc/mix/resource/esb_routing_table_config.xml | 1 + 15 files changed, 277 insertions(+), 20 deletions(-) create mode 100644 api/message/request/HYG10010002Req.go diff --git a/api/message/request/HYG10000001Req.go b/api/message/request/HYG10000001Req.go index 67ed211a..8d0f24f1 100644 --- a/api/message/request/HYG10000001Req.go +++ b/api/message/request/HYG10000001Req.go @@ -1,6 +1,9 @@ package request -import "service/api/message" +import ( + "service/api/message" + "service/library/validator" +) // 自由职业者网签查询报文 type HYG10000001Req struct { @@ -16,3 +19,11 @@ func (req *HYG10000001Req) GetArgList() []*message.JsonParamEntry { list = append(list, &message.JsonParamEntry{Name: "workerId", Value: req.WorkerId}) return list } + +func (p *HYG10000001Req) ProvideNotNullValue() (params []*validator.JsonParam) { + params = make([]*validator.JsonParam, 0) + params = append(params, validator.NewStringParam("商户id不可为空!", p.GetCooperatorId())) + params = append(params, validator.NewStringParam("时间戳不可为空!", p.Timestamp)) + params = append(params, validator.NewStringParam("职业者Id不可为空!", p.WorkerId)) + return params +} diff --git a/api/message/request/HYG10000002Req.go b/api/message/request/HYG10000002Req.go index 529cb812..12986cef 100644 --- a/api/message/request/HYG10000002Req.go +++ b/api/message/request/HYG10000002Req.go @@ -1,6 +1,9 @@ package request -import "service/api/message" +import ( + "service/api/message" + "service/library/validator" +) // 自由职业者信息详情查询 type HYG10000002Req struct { @@ -16,3 +19,11 @@ func (req *HYG10000002Req) GetArgList() []*message.JsonParamEntry { list = append(list, &message.JsonParamEntry{Name: "workerId", Value: req.WorkerId}) return list } + +func (p *HYG10000002Req) ProvideNotNullValue() (params []*validator.JsonParam) { + params = make([]*validator.JsonParam, 0) + params = append(params, validator.NewStringParam("商户id不可为空!", p.GetCooperatorId())) + params = append(params, validator.NewStringParam("时间戳不可为空!", p.Timestamp)) + params = append(params, validator.NewStringParam("职业者Id不可为空!", p.WorkerId)) + return params +} diff --git a/api/message/request/HYG10010001Req.go b/api/message/request/HYG10010001Req.go index e5ac793b..a489811e 100644 --- a/api/message/request/HYG10010001Req.go +++ b/api/message/request/HYG10010001Req.go @@ -1,6 +1,9 @@ package request -import "service/api/message" +import ( + "service/api/message" + "service/library/validator" +) // 下发(打款)报文 type HYG10010001Req struct { @@ -35,12 +38,38 @@ func (req *HYG10010001Req) GetArgList() []*message.JsonParamEntry { list = append(list, &message.JsonParamEntry{Name: "workerMobile", Value: req.WorkerMobile}) list = append(list, &message.JsonParamEntry{Name: "distributeAmount", Value: req.DistributeAmount}) list = append(list, &message.JsonParamEntry{Name: "requestNo", Value: req.RequestNo}) - list = append(list, &message.JsonParamEntry{Name: "callbackUrl", Value: req.CallbackUrl}) - list = append(list, &message.JsonParamEntry{Name: "remark", Value: req.Remark}) - list = append(list, &message.JsonParamEntry{Name: "workerContent", Value: req.WorkerContent}) - list = append(list, &message.JsonParamEntry{Name: "wageStatement", Value: req.WageStatement}) - list = append(list, &message.JsonParamEntry{Name: "workTime", Value: req.WorkTime}) + if req.CallbackUrl != "" { + list = append(list, &message.JsonParamEntry{Name: "callbackUrl", Value: req.CallbackUrl}) + } + if req.Remark != "" { + list = append(list, &message.JsonParamEntry{Name: "remark", Value: req.Remark}) + } + if req.WorkerContent != "" { + list = append(list, &message.JsonParamEntry{Name: "workerContent", Value: req.WorkerContent}) + } + if req.WageStatement != "" { + list = append(list, &message.JsonParamEntry{Name: "wageStatement", Value: req.WageStatement}) + } + if req.WorkTime != "" { + list = append(list, &message.JsonParamEntry{Name: "workTime", Value: req.WorkTime}) + } list = append(list, &message.JsonParamEntry{Name: "positionId", Value: req.PositionId}) - list = append(list, &message.JsonParamEntry{Name: "weChatAppId", Value: req.WeChatAppId}) + if req.WeChatAppId != "" { + list = append(list, &message.JsonParamEntry{Name: "weChatAppId", Value: req.WeChatAppId}) + } return list } + +func (p *HYG10010001Req) ProvideNotNullValue() (params []*validator.JsonParam) { + params = make([]*validator.JsonParam, 0) + params = append(params, validator.NewStringParam("商户id不可为空!", p.GetCooperatorId())) + params = append(params, validator.NewStringParam("时间戳不可为空!", p.Timestamp)) + params = append(params, validator.NewStringParam("收款人姓名不可为空!", p.WorkerName)) + params = append(params, validator.NewStringParam("收款人账号不可为空!", p.WorkerAccount)) + params = append(params, validator.NewStringParam("职业者身份证号码不可为空!", p.IdNumber)) + params = append(params, validator.NewStringParam("职业者手机号码不可为空!", p.WorkerMobile)) + params = append(params, validator.NewStringParam("打款金额不可为空!", p.DistributeAmount)) + params = append(params, validator.NewStringParam("下发请求单号不可为空!", p.RequestNo)) + params = append(params, validator.NewStringParam("任务ID不可为空!", p.PositionId)) + return params +} diff --git a/api/message/request/HYG10010002Req.go b/api/message/request/HYG10010002Req.go new file mode 100644 index 00000000..9da9de07 --- /dev/null +++ b/api/message/request/HYG10010002Req.go @@ -0,0 +1,38 @@ +package request + +import ( + "service/api/message" + "service/library/validator" +) + +// 自由职业者信息修改报文 +type HYG10010002Req struct { + *HYGBaseReq + Timestamp string `json:"timestamp"` // 时间戳 + WorkerId string `json:"workerId"` // 职业者id + WorkerMobile string `json:"workerMobile"` // 职业者手机号码 + BankCard string `json:"bankCard"` // 收款账号 + ReceiptChannel int `json:"receiptChannel"` // 收款渠道 +} + +func (req *HYG10010002Req) GetArgList() []*message.JsonParamEntry { + list := make([]*message.JsonParamEntry, 0) + list = append(list, &message.JsonParamEntry{Name: "cooperatorId", Value: req.HYGBaseReq.CooperatorId}) + list = append(list, &message.JsonParamEntry{Name: "timestamp", Value: req.Timestamp}) + list = append(list, &message.JsonParamEntry{Name: "workerId", Value: req.WorkerId}) + list = append(list, &message.JsonParamEntry{Name: "workerMobile", Value: req.WorkerMobile}) + list = append(list, &message.JsonParamEntry{Name: "bankCard", Value: req.BankCard}) + list = append(list, &message.JsonParamEntry{Name: "receiptChannel", Value: req.ReceiptChannel}) + + return list +} + +func (p *HYG10010002Req) ProvideNotNullValue() (params []*validator.JsonParam) { + params = make([]*validator.JsonParam, 0) + params = append(params, validator.NewStringParam("商户id不可为空!", p.GetCooperatorId())) + params = append(params, validator.NewStringParam("时间戳不可为空!", p.Timestamp)) + params = append(params, validator.NewStringParam("职业者Id不可为空!", p.WorkerId)) + params = append(params, validator.NewStringParam("职业者手机号码不可为空!", p.WorkerMobile)) + params = append(params, validator.NewStringParam("收款账号不可为空!", p.BankCard)) + return params +} diff --git a/api/message/request/HYGBaseReq.go b/api/message/request/HYGBaseReq.go index 6d80f909..8c86c003 100644 --- a/api/message/request/HYGBaseReq.go +++ b/api/message/request/HYGBaseReq.go @@ -6,9 +6,15 @@ type HYGBaseReq struct { } func (req *HYGBaseReq) SetSign(sign string) { + if req == nil { + return + } req.Sign = sign } func (req *HYGBaseReq) GetCooperatorId() string { + if req == nil { + return "" + } return req.CooperatorId } diff --git a/api/message/response/HYGBaseResponse.go b/api/message/response/HYGBaseResponse.go index 6c05ccf3..64025e5a 100644 --- a/api/message/response/HYGBaseResponse.go +++ b/api/message/response/HYGBaseResponse.go @@ -8,8 +8,9 @@ import ( ) const ( - StatusCodeSuccess = "000000" - StatusCodeFail = "999999" + StatusCodeSuccess = "000000" + StatusCodeFail = "999999" + StatusCodeInnerError = "-1" ) const ( diff --git a/api/proto/hvyogo/proto/hvyogo_api.go b/api/proto/hvyogo/proto/hvyogo_api.go index 2ae266d2..6dfee300 100644 --- a/api/proto/hvyogo/proto/hvyogo_api.go +++ b/api/proto/hvyogo/proto/hvyogo_api.go @@ -9,7 +9,7 @@ type ApiQueryAgreeStateReq struct { type ApiQueryAgreeStateData struct { StatusCode string `json:"status_code" deepcopier:"field:StatusCode"` // 返回码 StatusText string `json:"status_text" deepcopier:"field:StatusText"` // 返回信息 - AgreeState string `json:"agree_state" deepcopier:"field:AgreeState"` // 签约状态 + AgreeState int `json:"agree_state" deepcopier:"field:AgreeState"` // 签约状态 AgreeDesc string `json:"agree_desc" deepcopier:"field:AgreeDesc"` // 签约状态描述 } @@ -66,3 +66,23 @@ type ApiSingleDistributeResp struct { base.BaseResponse Data *ApiSingleDistributeData `json:"data"` } + +type ApiWorkerUpdateReq struct { + base.BaseRequest + WorkerMobile string `json:"worker_mobile"` // 自由职业者手机号 + BankCard string `json:"bank_card"` // 收款账号 + ReceiptChannel int64 `json:"receipt_channel"` // 收款渠道 +} + +type ApiWorkerUpdateData struct { + StatusCode string `json:"status_code" deepcopier:"field:StatusCode"` // 返回码 + StatusText string `json:"status_text" deepcopier:"field:StatusText"` // 返回信息 + WorkerId string `json:"worker_id" deepcopier:"field:WorkerId"` // 自由职业者ID + WorkerMobile string `json:"worker_mobile" deepcopier:"field:WorkerMobile"` // 自由职业者手机号 + BankCardNo string `json:"bank_card_no" deepcopier:"field:BankCardNo"` // 收款账号 +} + +type ApiWorkerUpdateResp struct { + base.BaseResponse + Data *ApiWorkerUpdateData `json:"data"` +} diff --git a/api/proto/hvyogo/proto/hvyogo_vo.go b/api/proto/hvyogo/proto/hvyogo_vo.go index 7d514be0..8d35fbb4 100644 --- a/api/proto/hvyogo/proto/hvyogo_vo.go +++ b/api/proto/hvyogo/proto/hvyogo_vo.go @@ -22,7 +22,7 @@ type WorkerAgreeStateVO struct { StatusCode string `json:"statusCode"` StatusText string `json:"statusText"` WorkerId string `json:"workerId"` - AgreeState string `json:"agreeState"` + AgreeState int `json:"agreeState"` AgreeDesc string `json:"agreeDesc"` IdCardFront string `json:"idCardFront"` IdCardBack string `json:"idCardBack"` @@ -54,3 +54,11 @@ type SingleDistributeVO struct { DistributeAmount string `json:"distributeAmount"` // 下发金额(与上送金额相同) DistributeId string `json:"distributeId"` // 慧用工平台处理单号 } + +type WorkerUpdateVO struct { + StatusCode string `json:"statusCode"` + StatusText string `json:"statusText"` + WorkerId string `json:"workerId"` // 自由职业者ID + WorkerMobile string `json:"workerMobile"` // 自由职业者手机号 + BankCardNo string `json:"bankCardNo"` // 收款账号 +} diff --git a/app/mix/controller/hvyogo_api.go b/app/mix/controller/hvyogo_api.go index 51cdf892..2970d0f3 100644 --- a/app/mix/controller/hvyogo_api.go +++ b/app/mix/controller/hvyogo_api.go @@ -15,7 +15,11 @@ func ApiHvyogoQueryAgreeState(ctx *gin.Context) { req := ctx.MustGet("client_req").(*hvyogoproto.ApiQueryAgreeStateReq) // 存入数据 - data, ec := service.DefaultService.ApiHvyogoQueryAgreeState(ctx, req) + data, ec, err := service.DefaultService.ApiHvyogoQueryAgreeState(ctx, req) + if err != nil { + ReplyErrorMsg(ctx, err.Error()) + return + } if ec != errcode.ErrCodeHvyogoSrvOk { logger.Error("ApiHygQueryAgreeState fail, req: %v, ec: %v", util.ToJson(req), ec) ReplyErrCodeMsg(ctx, ec) @@ -30,7 +34,11 @@ func ApiHvyogoWorkerFindDetail(ctx *gin.Context) { req := ctx.MustGet("client_req").(*hvyogoproto.ApiWorkerFindDetailReq) // 存入数据 - data, ec := service.DefaultService.ApiHvyogoWorkerFindDetail(ctx, req) + data, ec, err := service.DefaultService.ApiHvyogoWorkerFindDetail(ctx, req) + if err != nil { + ReplyErrorMsg(ctx, err.Error()) + return + } if ec != errcode.ErrCodeHvyogoSrvOk { logger.Error("ApiHygWorkerFindDetail fail, req: %v, ec: %v", util.ToJson(req), ec) ReplyErrCodeMsg(ctx, ec) @@ -45,7 +53,11 @@ func ApiHvyogoSingleDistribute(ctx *gin.Context) { req := ctx.MustGet("client_req").(*hvyogoproto.ApiSingleDistributeReq) // 存入数据 - data, ec := service.DefaultService.ApiHvyogoSingleDistribute(ctx, req) + data, ec, err := service.DefaultService.ApiHvyogoSingleDistribute(ctx, req) + if err != nil { + ReplyErrorMsg(ctx, err.Error()) + return + } if ec != errcode.ErrCodeHvyogoSrvOk { logger.Error("ApiHygSingleDistribute fail, req: %v, ec: %v", util.ToJson(req), ec) ReplyErrCodeMsg(ctx, ec) @@ -54,3 +66,22 @@ func ApiHvyogoSingleDistribute(ctx *gin.Context) { ReplyOk(ctx, data) } + +func ApiHvyogoWorkerUpdate(ctx *gin.Context) { + + req := ctx.MustGet("client_req").(*hvyogoproto.ApiWorkerUpdateReq) + + // 存入数据 + data, ec, err := service.DefaultService.ApiHvyogoWorkerUpdate(ctx, req) + if err != nil { + ReplyErrorMsg(ctx, err.Error()) + return + } + if ec != errcode.ErrCodeHvyogoSrvOk { + logger.Error("ApiHygWorkerUpdate fail, req: %v, ec: %v", util.ToJson(req), ec) + ReplyErrCodeMsg(ctx, ec) + return + } + + ReplyOk(ctx, data) +} diff --git a/app/mix/controller/init.go b/app/mix/controller/init.go index 8db76b5b..c0a0eb67 100644 --- a/app/mix/controller/init.go +++ b/app/mix/controller/init.go @@ -267,6 +267,7 @@ func Init(r *gin.Engine) { apiHvyogoGroup.POST("query_agree_state", middleware.JSONParamValidator(hvyogoproto.ApiQueryAgreeStateReq{}), middleware.JwtAuthenticator(), ApiHvyogoQueryAgreeState) apiHvyogoGroup.POST("worker_find_detail", middleware.JSONParamValidator(hvyogoproto.ApiWorkerFindDetailReq{}), middleware.JwtAuthenticator(), ApiHvyogoWorkerFindDetail) apiHvyogoGroup.POST("single_distribute", middleware.JSONParamValidator(hvyogoproto.ApiSingleDistributeReq{}), middleware.JwtAuthenticator(), ApiHvyogoSingleDistribute) + apiHvyogoGroup.POST("worker_update", middleware.JSONParamValidator(hvyogoproto.ApiWorkerUpdateReq{}), middleware.JwtAuthenticator(), ApiHvyogoWorkerUpdate) // =============================== 以下是服务,只允许内网调用 =============================== diff --git a/app/mix/service/apiservice.go b/app/mix/service/apiservice.go index 4b0330e1..dfd225c4 100644 --- a/app/mix/service/apiservice.go +++ b/app/mix/service/apiservice.go @@ -3258,7 +3258,7 @@ func (s *Service) ApiGetZoneCollaboratorList(ctx *gin.Context, req *zone_collabo return } -func (s *Service) ApiHvyogoQueryAgreeState(ctx *gin.Context, req *hvyogoproto.ApiQueryAgreeStateReq) (data *hvyogoproto.ApiQueryAgreeStateData, ec errcode.ErrCode) { +func (s *Service) ApiHvyogoQueryAgreeState(ctx *gin.Context, req *hvyogoproto.ApiQueryAgreeStateReq) (data *hvyogoproto.ApiQueryAgreeStateData, ec errcode.ErrCode, err error) { ec = errcode.ErrCodeHvyogoSrvOk @@ -3298,7 +3298,7 @@ func (s *Service) ApiHvyogoQueryAgreeState(ctx *gin.Context, req *hvyogoproto.Ap return } -func (s *Service) ApiHvyogoWorkerFindDetail(ctx *gin.Context, req *hvyogoproto.ApiWorkerFindDetailReq) (data *hvyogoproto.ApiWorkerFindDetailData, ec errcode.ErrCode) { +func (s *Service) ApiHvyogoWorkerFindDetail(ctx *gin.Context, req *hvyogoproto.ApiWorkerFindDetailReq) (data *hvyogoproto.ApiWorkerFindDetailData, ec errcode.ErrCode, err error) { ec = errcode.ErrCodeHvyogoSrvOk @@ -3338,7 +3338,7 @@ func (s *Service) ApiHvyogoWorkerFindDetail(ctx *gin.Context, req *hvyogoproto.A return } -func (s *Service) ApiHvyogoSingleDistribute(ctx *gin.Context, req *hvyogoproto.ApiSingleDistributeReq) (data *hvyogoproto.ApiSingleDistributeData, ec errcode.ErrCode) { +func (s *Service) ApiHvyogoSingleDistribute(ctx *gin.Context, req *hvyogoproto.ApiSingleDistributeReq) (data *hvyogoproto.ApiSingleDistributeData, ec errcode.ErrCode, err error) { ec = errcode.ErrCodeHvyogoSrvOk @@ -3411,9 +3411,68 @@ func (s *Service) ApiHvyogoSingleDistribute(ctx *gin.Context, req *hvyogoproto.A return } - // 8.组装返回结果 + // 8.更新至历史表 + err = _DefaultSingleDistributeHis.OpUpdate(ctx, &single_distribute_his_proto.OpUpdateReq{ + SingleDistributeHis: &dbstruct.SingleDistributeHis{ + Id: singleDistributeHis.Id, + StatusCode: goproto.String(resp.StatusCode), + StatusText: goproto.String(resp.StatusText), + DistributeId: goproto.String(resp.DistributeId), + DistributeAmount: goproto.String(resp.DistributeAmount), + }, + }) + if err != nil { + logger.Error("_DefaultSingleDistributeHis OpUpdate fail, err: %v", err) + ec = errcode.ErrCodeSingleDistributeHisSrvFail + return + } + + // 9.组装返回结果 data = &hvyogoproto.ApiSingleDistributeData{} deepcopier.Copy(resp).To(data) return } + +func (s *Service) ApiHvyogoWorkerUpdate(ctx *gin.Context, req *hvyogoproto.ApiWorkerUpdateReq) (data *hvyogoproto.ApiWorkerUpdateData, ec errcode.ErrCode, err error) { + + ec = errcode.ErrCodeHvyogoSrvOk + + // 1.查询workerId + workerId, err := _DefaultWorkerId.OpListByMid(ctx, &workeridproto.OpListByMidReq{ + BaseRequest: req.BaseRequest, + }) + if err != nil { + logger.Error("_DefaultWorkerId OpListByMid fail, err: %v", err) + ec = errcode.ErrCodeWorkerIdSrvFail + return + } + if workerId == nil { + logger.Error("No worker_id entity was found") + ec = errcode.ErrCodeWorkerIdNotExist + return + } + + // 2.组装查询报文 + msg := &request.HYG10010002Req{ + HYGBaseReq: &request.HYGBaseReq{}, + WorkerId: workerId.GetWorkerId(), + WorkerMobile: req.WorkerMobile, + BankCard: req.BankCard, + ReceiptChannel: int(req.ReceiptChannel), + } + + // 3.调用查询接口 + resp, err := DefaultHvyogoService.WorkerUpdate(msg) + if err != nil { + logger.Error("DefaultHvyogoService WorkerAgreeState fail, err: %v", err) + ec = errcode.ErrCodeHvyogoSrvFail + return + } + + // 4.组装返回结果 + data = &hvyogoproto.ApiWorkerUpdateData{} + deepcopier.Copy(resp).To(data) + + return +} diff --git a/app/mix/service/hvyogoservice.go b/app/mix/service/hvyogoservice.go index f87e1b90..d3b7d3eb 100644 --- a/app/mix/service/hvyogoservice.go +++ b/app/mix/service/hvyogoservice.go @@ -118,6 +118,35 @@ func (s *HvyogoService) SingleDistribute(req *request.HYG10010001Req) (vo *hvyog return } +func (s *HvyogoService) WorkerUpdate(req *request.HYG10010002Req) (vo *hvyogoproto.WorkerUpdateVO, err error) { + // 写参 + req.HYGBaseReq.CooperatorId = s.CooperatorId + req.Timestamp = fmt.Sprint(time.Now().UnixMilli()) + + // 加签 + msg, err := DefaultService.utilSignHvyogoMessage(req) + if err != nil { + logger.Error("utilSignHvyogoMessage fail, req: %v, err: %v", util.ToJson(req), err) + return + } + + // 发送消息 + resp, err := DefaultEsbService.SendMsg("HYG10010002", msg) + if err != nil { + logger.Error("SendMsg fail, req: %v, err: %v", util.ToJson(req), err) + return + } + + // 处理返回数据 + vo = &hvyogoproto.WorkerUpdateVO{} + err = afterReceiving(resp, vo) + if err != nil { + logger.Error("afterReceiving fail, req: %v, err: %v", util.ToJson(req), err) + return + } + return +} + func afterReceiving(resp []byte, vo any) (err error) { baseResponse := &response.HygBaseResponse{} diff --git a/app/mix/service/utilservice.go b/app/mix/service/utilservice.go index a130306f..177c007c 100644 --- a/app/mix/service/utilservice.go +++ b/app/mix/service/utilservice.go @@ -33,6 +33,7 @@ import ( "service/library/logger" "service/library/mycrypto" "service/library/redis" + "service/library/validator" "strconv" "strings" "time" @@ -2097,6 +2098,15 @@ func (s *Service) utilAssembleDailyStatementZoneInfo(zoneprofits, zonerefunds [] } func (s *Service) utilSignHvyogoMessage(msg interfaces.HvyogoSignable) ([]byte, error) { + + // 非空校验 + if notNullItem, ok := msg.(validator.NotNullItem); ok { + err := validator.GetDefaultNotNullValidator().Validate(notNullItem) + if err != nil { + return make([]byte, 0), fmt.Errorf("非空校验失败: %v", err) + } + } + // 1.RSA加密生成签名 sign, err := mycrypto.CryptoServiceInstance().HygSHA1WithRSA.Sign([]byte(util.SortParam(msg.GetArgList()))) if err != nil { diff --git a/dbstruct/single_distribute_his.go b/dbstruct/single_distribute_his.go index eb79a4a6..d1b8ac82 100644 --- a/dbstruct/single_distribute_his.go +++ b/dbstruct/single_distribute_his.go @@ -2,6 +2,8 @@ package dbstruct type SingleDistributeHis struct { Id *string `json:"id" bson:"_id"` // 慧用工下发打款历史表id + StatusCode *string `json:"status_code" bson:"status_code"` // 返回状态码 + StatusText *string `json:"status_text" bson:"status_text"` // 返回状态描述 Mid *int64 `json:"mid" bson:"mid"` // 用户id DistributeId *string `json:"distribute_id" bson:"distribute_id"` // 慧用工平台处理单号 DistributeStatus *int64 `json:"distribute_status" bson:"distribute_status"` // 下发状态 diff --git a/etc/mix/resource/esb_routing_table_config.xml b/etc/mix/resource/esb_routing_table_config.xml index 22d2021d..e2c42568 100644 --- a/etc/mix/resource/esb_routing_table_config.xml +++ b/etc/mix/resource/esb_routing_table_config.xml @@ -3,4 +3,5 @@ https://boapi.hvyogo.com/api/worker/agree/state https://boapi.hvyogo.com/api/v2/hire/worker/findDetails https://boapi.hvyogo.com/api/distribute/singleDistribute + https://boapi.hvyogo.com/api/v2/hire/worker/update \ No newline at end of file