service/api/message/request/HYG10010002Req.go

39 lines
1.7 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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
}