feat(app): update
This commit is contained in:
28
pkg/dto/inner/OrderRechargeRequest.go
Normal file
28
pkg/dto/inner/OrderRechargeRequest.go
Normal file
@ -0,0 +1,28 @@
|
||||
package inner
|
||||
|
||||
import "errors"
|
||||
|
||||
type OrderRechargeRequest struct {
|
||||
OrderId string
|
||||
PayType string // 支付方式
|
||||
RechargeChannel string // 充值平台 1 = APP-iOS 2= APP-Android 3= 微信公众号 4= 支付宝服务窗
|
||||
ClientRealIp string // 客户端真实IP
|
||||
DeviceOs string // 设备类型
|
||||
}
|
||||
|
||||
// 参数合法性检验
|
||||
func (request *OrderRechargeRequest) CheckParameter() (err error) {
|
||||
if len(request.OrderId) == 0 {
|
||||
err = errors.New("OrderId不能为空")
|
||||
return
|
||||
}
|
||||
if len(request.PayType) == 0 {
|
||||
err = errors.New("PayType不能为空")
|
||||
return
|
||||
}
|
||||
if len(request.RechargeChannel) == 0 {
|
||||
err = errors.New("RechargeChannel不能为空")
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user