@@ -1,14 +1,15 @@ | |||||
package model | package model | ||||
type FlexibleEmploymentPupiaoBasic struct { | type FlexibleEmploymentPupiaoBasic struct { | ||||
Id int `json:"id" xorm:"not null pk autoincr INT(11)"` | |||||
MasterId int `json:"master_id" xorm:"not null default 0 comment('站长ID') INT(11)"` | |||||
AppId string `json:"app_id" xorm:"not null default '' comment('appId') VARCHAR(255)"` | |||||
AppSecret string `json:"app_secret" xorm:"not null default '' comment('appSecret') VARCHAR(255)"` | |||||
HrCompanyId string `json:"hr_company_id" xorm:"not null default '' comment('hrcompanyId') VARCHAR(255)"` | |||||
SettleAccountId string `json:"settle_account_id" xorm:"not null default '' comment('settleAccountId') VARCHAR(255)"` | |||||
CallbackUrl string `json:"callback_url" xorm:"not null default '' comment('回调地址') VARCHAR(255)"` | |||||
WithdrawalType int `json:"withdrawal_type" xorm:"not null default 1 comment('提现方式(1:支付宝 2:银行卡)') TINYINT(1)"` | |||||
CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('创建时间') DATETIME"` | |||||
UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('更新时间') DATETIME"` | |||||
Id int `json:"id" xorm:"not null pk autoincr INT(11)"` | |||||
MasterId int `json:"master_id" xorm:"not null default 0 comment('站长ID') INT(11)"` | |||||
AppId string `json:"app_id" xorm:"not null default '' comment('appId') VARCHAR(255)"` | |||||
AppSecret string `json:"app_secret" xorm:"not null default '' comment('appSecret') VARCHAR(255)"` | |||||
HrCompanyId string `json:"hr_company_id" xorm:"not null default '' comment('hrcompanyId') VARCHAR(255)"` | |||||
SettleAccountId string `json:"settle_account_id" xorm:"not null default '' comment('settleAccountId') VARCHAR(255)"` | |||||
SettleAccountIdForAli string `json:"settle_account_id_for_ali" xorm:"not null default '' comment('settleAccountId') VARCHAR(255)"` | |||||
CallbackUrl string `json:"callback_url" xorm:"not null default '' comment('回调地址') VARCHAR(255)"` | |||||
WithdrawalType int `json:"withdrawal_type" xorm:"not null default 1 comment('提现方式(1:支付宝 2:银行卡)') TINYINT(1)"` | |||||
CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('创建时间') DATETIME"` | |||||
UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('更新时间') DATETIME"` | |||||
} | } |
@@ -129,10 +129,14 @@ func handleFlexibleEmploymentWithdrawForPupiaoConsume(msgData []byte) error { | |||||
} | } | ||||
str, _ := json.Marshal(userAESData) | str, _ := json.Marshal(userAESData) | ||||
itemAESContent, _ := aes.AesEncryptByECB([]byte(basic.AppSecret), string(str)) | itemAESContent, _ := aes.AesEncryptByECB([]byte(basic.AppSecret), string(str)) | ||||
settleAccountId := basic.SettleAccountId | |||||
if flexibleEmploymentPupiaoOrd.SettleType == "ALIPAY" { | |||||
settleAccountId = basic.SettleAccountIdForAli | |||||
} | |||||
result, err := puPiao.Curl(enum.OpenApiPaymentReceiveOrder, map[string]interface{}{ | result, err := puPiao.Curl(enum.OpenApiPaymentReceiveOrder, map[string]interface{}{ | ||||
"outBatchNo": flexibleEmploymentPupiaoOrd.OutBatchNo, | "outBatchNo": flexibleEmploymentPupiaoOrd.OutBatchNo, | ||||
"hrcompanyId": basic.HrCompanyId, | "hrcompanyId": basic.HrCompanyId, | ||||
"settleAccountId": basic.SettleAccountId, | |||||
"settleAccountId": settleAccountId, | |||||
"totalCount": "1", | "totalCount": "1", | ||||
"totalAmount": flexibleEmploymentPupiaoOrd.TotalAmount, | "totalAmount": flexibleEmploymentPupiaoOrd.TotalAmount, | ||||
"itemAESContent": itemAESContent, | "itemAESContent": itemAESContent, | ||||