2024-06-15 11:41:12 +08:00
|
|
|
|
package request
|
2024-06-15 19:06:47 +08:00
|
|
|
|
|
2024-06-21 18:25:24 +08:00
|
|
|
|
import (
|
|
|
|
|
"service/api/message"
|
|
|
|
|
"service/library/validator"
|
|
|
|
|
)
|
2024-06-18 17:10:42 +08:00
|
|
|
|
|
2024-06-15 19:06:47 +08:00
|
|
|
|
// 下发(打款)报文
|
|
|
|
|
type HYG10010001Req struct {
|
2024-06-17 22:25:43 +08:00
|
|
|
|
*HYGBaseReq
|
2024-06-15 19:06:47 +08:00
|
|
|
|
Timestamp string `json:"timestamp"` // 时间戳
|
|
|
|
|
WorkerName string `json:"workerName"` // 收款人姓名
|
|
|
|
|
ReceiptChannel int `json:"receiptChannel"` // 收款渠道
|
|
|
|
|
WorkerAccount string `json:"workerAccount"` // 收款人账号
|
|
|
|
|
WorkerType int `json:"workerType"` // 职业者证件类型
|
|
|
|
|
IdNumber string `json:"idNumber"` // 职业者身份证号码
|
|
|
|
|
WorkerMobile string `json:"workerMobile"` // 职业者手机号码
|
|
|
|
|
DistributeAmount string `json:"distributeAmount"` // 打款金额
|
|
|
|
|
RequestNo string `json:"requestNo"` // 下发请求单号
|
|
|
|
|
CallbackUrl string `json:"callbackUrl"` // 下发结果回调地址
|
|
|
|
|
Remark string `json:"remark"` // 备注
|
|
|
|
|
WorkerContent string `json:"workerContent"` // 任务描述
|
|
|
|
|
WageStatement string `json:"wageStatement"` // 服务费说明
|
|
|
|
|
WorkTime string `json:"workTime"` // 服务时间
|
|
|
|
|
PositionId string `json:"positionId"` // 任务ID
|
|
|
|
|
WeChatAppId string `json:"weChatAppId"` // 微信下发指定AppID
|
2024-06-17 22:25:43 +08:00
|
|
|
|
}
|
|
|
|
|
|
2024-06-18 17:10:42 +08:00
|
|
|
|
func (req *HYG10010001Req) 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: "workerName", Value: req.WorkerName})
|
|
|
|
|
list = append(list, &message.JsonParamEntry{Name: "receiptChannel", Value: req.ReceiptChannel})
|
|
|
|
|
list = append(list, &message.JsonParamEntry{Name: "workerAccount", Value: req.WorkerAccount})
|
|
|
|
|
list = append(list, &message.JsonParamEntry{Name: "workerType", Value: req.WorkerType})
|
|
|
|
|
list = append(list, &message.JsonParamEntry{Name: "idNumber", Value: req.IdNumber})
|
|
|
|
|
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})
|
2024-06-21 18:25:24 +08:00
|
|
|
|
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})
|
|
|
|
|
}
|
2024-06-18 17:10:42 +08:00
|
|
|
|
list = append(list, &message.JsonParamEntry{Name: "positionId", Value: req.PositionId})
|
2024-06-21 18:25:24 +08:00
|
|
|
|
if req.WeChatAppId != "" {
|
|
|
|
|
list = append(list, &message.JsonParamEntry{Name: "weChatAppId", Value: req.WeChatAppId})
|
|
|
|
|
}
|
2024-06-18 17:10:42 +08:00
|
|
|
|
return list
|
2024-06-15 19:06:47 +08:00
|
|
|
|
}
|
2024-06-21 18:25:24 +08:00
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
}
|