temporay up
This commit is contained in:
@@ -8,6 +8,8 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"git.rosy.net.cn/baseapi/platformapi/wxpayapi"
|
||||||
|
|
||||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/jd"
|
"git.rosy.net.cn/jx-callback/business/partner/purchase/jd"
|
||||||
|
|
||||||
"git.rosy.net.cn/jx-callback/globals/api/apimanager"
|
"git.rosy.net.cn/jx-callback/globals/api/apimanager"
|
||||||
@@ -967,3 +969,85 @@ func WriteToExcelJd(task *tasksch.SeqTask, jd []JdUserStruct) (err error) {
|
|||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UpdateUserWxNoAndPercent(user *model.User, isReceiver bool) (num int64, err error) {
|
||||||
|
db := dao.GetDB()
|
||||||
|
user2, err := dao.GetUserByID(db, "user_id", user.UserID)
|
||||||
|
auth, err := dao.GetUserBindAuthInfo(db, user.UserID, model.AuthBindTypeAuth, []string{"weixinmini"}, "", "")
|
||||||
|
if len(auth) == 0 {
|
||||||
|
return 0, fmt.Errorf("未找到此用户的微信验证方式!用户ID:[%v]\n", user.UserID)
|
||||||
|
}
|
||||||
|
dao.Begin(db)
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil || err != nil {
|
||||||
|
dao.Rollback(db)
|
||||||
|
if r != nil {
|
||||||
|
panic(r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
user2.DividePercentage = user.DividePercentage
|
||||||
|
num2, err := dao.UpdateEntity(db, user2, "DividePercentage")
|
||||||
|
num += num2
|
||||||
|
if err != nil {
|
||||||
|
dao.Rollback(db)
|
||||||
|
}
|
||||||
|
if isReceiver {
|
||||||
|
param := &wxpayapi.ProfitSharingReceiverParam{
|
||||||
|
Receiver: wxpayapi.CData(`{
|
||||||
|
"type":"` + wxpayapi.AccountTypeOpen + `",
|
||||||
|
"account":"` + auth[0].AuthID + `",
|
||||||
|
"relation_type":" ` + wxpayapi.Relation + `"
|
||||||
|
}`),
|
||||||
|
}
|
||||||
|
_, err := api.WxpayAPI.AddProfitSharingReceiver(param)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
} else {
|
||||||
|
user2.IsReceiver = 1
|
||||||
|
num3, err := dao.UpdateEntity(db, user2, "IsReceiver")
|
||||||
|
num += num3
|
||||||
|
if err != nil {
|
||||||
|
dao.Rollback(db)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dao.Commit(db)
|
||||||
|
return num, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func DeleteProfitSharingReceiver(ctx *jxcontext.Context, userID string) (err error) {
|
||||||
|
db := dao.GetDB()
|
||||||
|
auth, err := dao.GetUserBindAuthInfo(db, userID, model.AuthBindTypeAuth, []string{"weixinmini"}, "", "")
|
||||||
|
if len(auth) == 0 {
|
||||||
|
return fmt.Errorf("未找到此用户的微信验证方式!用户ID:[%v]\n", userID)
|
||||||
|
}
|
||||||
|
dao.Begin(db)
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil || err != nil {
|
||||||
|
dao.Rollback(db)
|
||||||
|
if r != nil {
|
||||||
|
panic(r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
param := &wxpayapi.ProfitSharingReceiverParam{
|
||||||
|
Receiver: wxpayapi.CData(`{
|
||||||
|
"type":"` + wxpayapi.AccountTypeOpen + `",
|
||||||
|
"account":"` + auth[0].AuthID + `"
|
||||||
|
}`),
|
||||||
|
}
|
||||||
|
_, err = api.WxpayAPI.DeleteProfitSharingReceiver(param)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
} else {
|
||||||
|
user2, err := dao.GetUserByID(db, "user_id", userID)
|
||||||
|
user2.IsReceiver = 0
|
||||||
|
_, err = dao.UpdateEntity(db, user2, "IsReceiver")
|
||||||
|
if err != nil {
|
||||||
|
dao.Rollback(db)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dao.Commit(db)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|||||||
@@ -82,6 +82,8 @@ func AddOperateEventDetail(db *dao.DaoDB, operateEventDetail *model.OperateEvent
|
|||||||
panic(r)
|
panic(r)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
operateEventDetail.BeforeData = utils.LimitUTF8StringLen(operateEventDetail.BeforeData, 3200)
|
||||||
|
operateEventDetail.AfterData = utils.LimitUTF8StringLen(operateEventDetail.AfterData, 3200)
|
||||||
err = dao.CreateEntity(db, operateEventDetail)
|
err = dao.CreateEntity(db, operateEventDetail)
|
||||||
dao.Commit(db)
|
dao.Commit(db)
|
||||||
return err
|
return err
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
|
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/partner/purchase/jd"
|
||||||
|
"git.rosy.net.cn/jx-callback/globals/api/apimanager"
|
||||||
|
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||||
@@ -260,10 +262,33 @@ func BeginSavePriceRefer(ctx *jxcontext.Context, cityCodes, skuIDs []int, isAsyn
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
dao.Commit(db)
|
dao.Commit(db)
|
||||||
|
case 3:
|
||||||
|
dao.Begin(db)
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil || err != nil {
|
||||||
|
dao.Rollback(db)
|
||||||
|
if r != nil {
|
||||||
|
panic(r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
priceReferSnapshotList, err = dao.GetPriceReferSnapshotNoPage(db, []int{0}, nil, nil, snapshotAt)
|
||||||
|
for _, v := range priceReferSnapshotList {
|
||||||
|
for _, appOrg := range apimanager.CurAPIManager.GetAppOrgCodeList(model.VendorIDJD) {
|
||||||
|
directPrice, err := jd.GetAPI(appOrg).GetJdSkuDirectPrice(v.SkuID)
|
||||||
|
if err != nil || directPrice == 0 {
|
||||||
|
continue
|
||||||
|
} else {
|
||||||
|
v.JdDirectPrice = int(directPrice)
|
||||||
|
dao.UpdateEntity(db, v, "JdDirectPrice")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dao.Commit(db)
|
||||||
}
|
}
|
||||||
return result, err
|
return result, err
|
||||||
}
|
}
|
||||||
taskSeq := tasksch.NewSeqTask2("生成每日价格统计", ctx, isContinueWhenError, taskSeqFunc, 3)
|
taskSeq := tasksch.NewSeqTask2("生成每日价格统计", ctx, isContinueWhenError, taskSeqFunc, 4)
|
||||||
tasksch.HandleTask(taskSeq, nil, true).Run()
|
tasksch.HandleTask(taskSeq, nil, true).Run()
|
||||||
if !isAsync {
|
if !isAsync {
|
||||||
_, err = taskSeq.GetResult(0)
|
_, err = taskSeq.GetResult(0)
|
||||||
|
|||||||
@@ -63,6 +63,11 @@ type tGoodsAndOrder struct {
|
|||||||
PromotionType int `json:"promotionType"` // todo 当前是用于记录京东的PromotionType(生成jxorder用),没有做转换
|
PromotionType int `json:"promotionType"` // todo 当前是用于记录京东的PromotionType(生成jxorder用),没有做转换
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type GoodsOrderPay struct {
|
||||||
|
model.GoodsOrder
|
||||||
|
TransactionID string `orm:"column(transaction_id)" json:"transactionID"`
|
||||||
|
}
|
||||||
|
|
||||||
//actID指结算活动的id
|
//actID指结算活动的id
|
||||||
func QueryOrders(db *DaoDB, vendorOrderID string, actID int, vendorIDs []int, storeID int, fromDate, toDate time.Time) (orderList []*model.GoodsOrder, err error) {
|
func QueryOrders(db *DaoDB, vendorOrderID string, actID int, vendorIDs []int, storeID int, fromDate, toDate time.Time) (orderList []*model.GoodsOrder, err error) {
|
||||||
sqlParams := []interface{}{}
|
sqlParams := []interface{}{}
|
||||||
@@ -1187,3 +1192,25 @@ func GetJxOrderCount(db *DaoDB, storeID int, orderID string, date time.Time) (co
|
|||||||
err = GetRow(db, &count, sql, sqlParams...)
|
err = GetRow(db, &count, sql, sqlParams...)
|
||||||
return count, err
|
return count, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func GetOrdersForJxPay(db *DaoDB, finishTimeBegin, finishTimeEnd time.Time) (goods []*GoodsOrderPay, err error) {
|
||||||
|
sql := `
|
||||||
|
SELECT a.*,b.transaction_id
|
||||||
|
FROM goods_order a
|
||||||
|
JOIN order_pay b ON a.vendor_order_id = b.vendor_order_id AND a.vendor_id = b.vendor_id
|
||||||
|
JOIN user c ON c.user_id = a.user_id
|
||||||
|
WHERE a.vendor_id = ?
|
||||||
|
AND a.order_finished_at >= ?
|
||||||
|
AND a.order_finished_at <= ?
|
||||||
|
AND a.status = ?
|
||||||
|
AND c.parent_mobile <> ''
|
||||||
|
`
|
||||||
|
sqlParams := []interface{}{
|
||||||
|
model.VendorIDJX,
|
||||||
|
finishTimeBegin,
|
||||||
|
finishTimeEnd,
|
||||||
|
model.OrderStatusFinished,
|
||||||
|
}
|
||||||
|
err = GetRows(db, &goods, sql, sqlParams...)
|
||||||
|
return goods, err
|
||||||
|
}
|
||||||
|
|||||||
@@ -472,6 +472,7 @@ type PriceReferSnapshot struct {
|
|||||||
MaxVendorPrice int `json:"maxVendorPrice"`
|
MaxVendorPrice int `json:"maxVendorPrice"`
|
||||||
MinVendorPrice int `json:"minVendorPrice"`
|
MinVendorPrice int `json:"minVendorPrice"`
|
||||||
AvgVendorPrice int `json:"avgVendorPrice"`
|
AvgVendorPrice int `json:"avgVendorPrice"`
|
||||||
|
JdDirectPrice int `json:"jdDirectPrice"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (*PriceReferSnapshot) TableUnique() [][]string {
|
func (*PriceReferSnapshot) TableUnique() [][]string {
|
||||||
|
|||||||
@@ -49,6 +49,10 @@ type User struct {
|
|||||||
LastLoginAt *time.Time `orm:"null" json:"lastLoginAt"`
|
LastLoginAt *time.Time `orm:"null" json:"lastLoginAt"`
|
||||||
LastLoginIP string `orm:"size(64);column(last_login_ip)" json:"lastLoginIP"`
|
LastLoginIP string `orm:"size(64);column(last_login_ip)" json:"lastLoginIP"`
|
||||||
LastLoginType string `orm:"size(16)" json:"lastLoginType"`
|
LastLoginType string `orm:"size(16)" json:"lastLoginType"`
|
||||||
|
|
||||||
|
ParentMobile string `orm:"size(32)" json:"parentMobile"`
|
||||||
|
DividePercentage int `json:"dividePercentage"`
|
||||||
|
IsReceiver int `json:"isReceiver"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (*User) TableUnique() [][]string {
|
func (*User) TableUnique() [][]string {
|
||||||
|
|||||||
@@ -2,11 +2,20 @@ package localjx
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/md5"
|
"crypto/md5"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"math"
|
"math"
|
||||||
"sort"
|
"sort"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"git.rosy.net.cn/baseapi/platformapi/wxpayapi"
|
||||||
|
|
||||||
|
"git.rosy.net.cn/jx-callback/globals/api"
|
||||||
|
|
||||||
|
"git.rosy.net.cn/jx-callback/business/jxutils/ddmsg"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
|
||||||
|
|
||||||
|
"git.rosy.net.cn/baseapi/platformapi/dingdingapi"
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
"git.rosy.net.cn/baseapi/utils/errlist"
|
"git.rosy.net.cn/baseapi/utils/errlist"
|
||||||
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
|
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
|
||||||
@@ -615,3 +624,96 @@ func GetOrderPay(ctx *jxcontext.Context, vendorOrderID string) (payList []*model
|
|||||||
payList, err = dao.GetOrderPayList(db, vendorOrderID, jxutils.GetPossibleVendorIDFromVendorOrderID(vendorOrderID))
|
payList, err = dao.GetOrderPayList(db, vendorOrderID, jxutils.GetPossibleVendorIDFromVendorOrderID(vendorOrderID))
|
||||||
return payList, err
|
return payList, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func PayForPopluarMan(ctx *jxcontext.Context, transactionID, vendorOrderID, userID string) (err error) {
|
||||||
|
db := dao.GetDB()
|
||||||
|
user, err := dao.GetUserByID(db, "user_id", userID)
|
||||||
|
if user == nil {
|
||||||
|
return fmt.Errorf("未找到此用户!用户ID:[%v]\n", userID)
|
||||||
|
}
|
||||||
|
auth, err := dao.GetUserBindAuthInfo(db, userID, model.AuthBindTypeAuth, []string{"weixinmini"}, "", "")
|
||||||
|
if len(auth) == 0 {
|
||||||
|
return fmt.Errorf("未找到此用户的微信验证方式!用户ID:[%v]\n", userID)
|
||||||
|
}
|
||||||
|
goods, err := dao.QueryOrders(db, vendorOrderID, 0, []int{model.VendorIDJX}, 0, utils.ZeroTimeValue, utils.ZeroTimeValue)
|
||||||
|
if len(goods) == 0 {
|
||||||
|
return fmt.Errorf("未找到此订单!订单ID:[%v]\n", vendorOrderID)
|
||||||
|
}
|
||||||
|
param := &wxpayapi.MultiProfitSharingParam{
|
||||||
|
TransactionID: transactionID,
|
||||||
|
OutOrderNo: vendorOrderID,
|
||||||
|
}
|
||||||
|
param.Receivers = wxpayapi.CData(`[{"type":"` + wxpayapi.AccountTypeOpen + `","account":"` + auth[0].AuthID + `","amount":` + utils.Int2Str(int(goods[0].ActualPayPrice)*user.DividePercentage/100) + `,"description":"每日订单打款分到个人"}]`)
|
||||||
|
_, err = api.WxpayAPI.MultiProfitSharing(param)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
//自动打款给市场推广人
|
||||||
|
func AutoPayForPopluarMan(ctx *jxcontext.Context, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||||
|
var (
|
||||||
|
db = dao.GetDB()
|
||||||
|
fromDateStr = time.Now().AddDate(0, 0, -1).Format("2006-1-2") + " 00:00:00"
|
||||||
|
toDateStr = time.Now().AddDate(0, 0, -1).Format("2006-1-2") + " 23:59:59"
|
||||||
|
)
|
||||||
|
result, err := dao.GetOrdersForJxPay(db, utils.Str2Time(fromDateStr), utils.Str2Time(toDateStr))
|
||||||
|
fmt.Println(result)
|
||||||
|
task := tasksch.NewParallelTask("AutoPayForPopluarMan", tasksch.NewParallelConfig().SetIsContinueWhenError(isContinueWhenError), ctx,
|
||||||
|
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||||
|
goods := batchItemList[0].(*dao.GoodsOrderPay)
|
||||||
|
var (
|
||||||
|
errMsg string
|
||||||
|
param = &wxpayapi.MultiProfitSharingParam{
|
||||||
|
TransactionID: goods.TransactionID,
|
||||||
|
OutOrderNo: goods.VendorOrderID,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
user, err := dao.GetUserByID(db, "user_id", goods.UserID)
|
||||||
|
if user.ParentMobile == "" {
|
||||||
|
return retVal, err
|
||||||
|
}
|
||||||
|
user2, err := dao.GetUserByID(db, "mobile", user.ParentMobile)
|
||||||
|
auth, err := dao.GetUserBindAuthInfo(db, user2.UserID, model.AuthBindTypeAuth, []string{"weixinmini"}, "", "")
|
||||||
|
if err != nil {
|
||||||
|
return retVal, err
|
||||||
|
}
|
||||||
|
if len(auth) == 0 {
|
||||||
|
errMsg += fmt.Sprintf("打款失败!未找到此用户的微信验证方式!订单号:[%v],用户ID:[%v]\n", goods.VendorOrderID, user2.UserID)
|
||||||
|
} else {
|
||||||
|
param.Receivers = wxpayapi.CData(`[{"type":"` + wxpayapi.AccountTypeOpen + `","account":"` + auth[0].AuthID + `","amount":` + utils.Int2Str(int(goods.ActualPayPrice)*user2.DividePercentage/100) + `,"description":"每日订单打款分到个人"}]`)
|
||||||
|
_, err := api.WxpayAPI.MultiProfitSharing(param)
|
||||||
|
if err != nil {
|
||||||
|
return retVal, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if user2.ParentMobile != "" {
|
||||||
|
user3, err := dao.GetUserByID(db, "mobile", user2.ParentMobile)
|
||||||
|
auth, err := dao.GetUserBindAuthInfo(db, user3.UserID, model.AuthBindTypeAuth, []string{"weixinmini"}, "", "")
|
||||||
|
if err != nil {
|
||||||
|
return retVal, err
|
||||||
|
}
|
||||||
|
if len(auth) == 0 {
|
||||||
|
errMsg += fmt.Sprintf("打款失败!未找到此用户的微信验证方式!订单号:[%v],用户ID:[%v]\n", goods.VendorOrderID, user3.UserID)
|
||||||
|
} else {
|
||||||
|
param.Receivers = wxpayapi.CData(`[{"type":"` + wxpayapi.AccountTypeOpen + `","account":"` + auth[0].AuthID + `","amount":` + utils.Int2Str(int(goods.ActualPayPrice)*user3.DividePercentage/100) + `,"description":"每日订单打款分到个人"}]`)
|
||||||
|
_, err := api.WxpayAPI.MultiProfitSharing(param)
|
||||||
|
if err != nil {
|
||||||
|
return retVal, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return retVal, errors.New(errMsg)
|
||||||
|
}, result)
|
||||||
|
tasksch.HandleTask(task, nil, true).Run()
|
||||||
|
if isAsync {
|
||||||
|
hint = task.GetID()
|
||||||
|
} else {
|
||||||
|
_, err = task.GetResult(0)
|
||||||
|
user, _ := dao.GetUserByID(dao.GetDB(), "mobile", "18160030913")
|
||||||
|
noticeMsg := err.Error()
|
||||||
|
if user != nil && err != nil {
|
||||||
|
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, user.UserID, "每日打款错误", noticeMsg)
|
||||||
|
}
|
||||||
|
hint = "1"
|
||||||
|
}
|
||||||
|
return hint, err
|
||||||
|
}
|
||||||
|
|||||||
@@ -447,3 +447,36 @@ func (c *User2Controller) GetJdUsers() {
|
|||||||
return retVal, "", err
|
return retVal, "", err
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Title 更新用户分成比例
|
||||||
|
// @Description 更新用户分成比例
|
||||||
|
// @Param token header string true "认证token"
|
||||||
|
// @Param userID formData string true "用户userID"
|
||||||
|
// @Param dividePercentage formData int fasle "用户分成比例"
|
||||||
|
// @Param isReceiver formData bool true "是否加入分账接收方,默认是"
|
||||||
|
// @Success 200 {object} controllers.CallResult
|
||||||
|
// @Failure 200 {object} controllers.CallResult
|
||||||
|
// @router /UpdateUserWxNoAndPercent [put]
|
||||||
|
func (c *User2Controller) UpdateUserWxNoAndPercent() {
|
||||||
|
c.callUpdateUserWxNoAndPercent(func(params *tUser2UpdateUserWxNoAndPercentParams) (retVal interface{}, errCode string, err error) {
|
||||||
|
retVal, err = cms.UpdateUserWxNoAndPercent(&model.User{
|
||||||
|
UserID: params.UserID,
|
||||||
|
DividePercentage: params.DividePercentage,
|
||||||
|
}, params.IsReceiver)
|
||||||
|
return retVal, "", err
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Title 删除分账接收方
|
||||||
|
// @Description 删除分账接收方
|
||||||
|
// @Param token header string true "认证token"
|
||||||
|
// @Param userID query string true "用户userID"
|
||||||
|
// @Success 200 {object} controllers.CallResult
|
||||||
|
// @Failure 200 {object} controllers.CallResult
|
||||||
|
// @router /DeleteProfitSharingReceiver [delete]
|
||||||
|
func (c *User2Controller) DeleteProfitSharingReceiver() {
|
||||||
|
c.callDeleteProfitSharingReceiver(func(params *tUser2DeleteProfitSharingReceiverParams) (retVal interface{}, errCode string, err error) {
|
||||||
|
err = cms.DeleteProfitSharingReceiver(params.Ctx, params.UserID)
|
||||||
|
return retVal, "", err
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -130,3 +130,34 @@ func (c *JxOrderController) GetMyOrderCountInfo() {
|
|||||||
return retVal, "", err
|
return retVal, "", err
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Title 每日订单分账
|
||||||
|
// @Description 每日订单分账
|
||||||
|
// @Param token header string true "认证token"
|
||||||
|
// @Param isAsync formData bool false "是否异步操作"
|
||||||
|
// @Param isContinueWhenError formData bool false "单个同步失败是否继续,缺省false"
|
||||||
|
// @Success 200 {object} controllers.CallResult
|
||||||
|
// @Failure 200 {object} controllers.CallResult
|
||||||
|
// @router /AutoPayForPopluarMan [post]
|
||||||
|
func (c *JxOrderController) AutoPayForPopluarMan() {
|
||||||
|
c.callAutoPayForPopluarMan(func(params *tJxorderAutoPayForPopluarManParams) (retVal interface{}, errCode string, err error) {
|
||||||
|
retVal, err = localjx.AutoPayForPopluarMan(params.Ctx, params.IsAsync, params.IsContinueWhenError)
|
||||||
|
return retVal, "", err
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Title 订单分账
|
||||||
|
// @Description 订单分账
|
||||||
|
// @Param token header string true "认证token"
|
||||||
|
// @Param transactionID formData string true "微信订单ID"
|
||||||
|
// @Param vendorOrderID formData string true "订单ID"
|
||||||
|
// @Param userID formData string true "userID"
|
||||||
|
// @Success 200 {object} controllers.CallResult
|
||||||
|
// @Failure 200 {object} controllers.CallResult
|
||||||
|
// @router /PayForPopluarMan [post]
|
||||||
|
func (c *JxOrderController) PayForPopluarMan() {
|
||||||
|
c.callPayForPopluarMan(func(params *tJxorderPayForPopluarManParams) (retVal interface{}, errCode string, err error) {
|
||||||
|
err = localjx.PayForPopluarMan(params.Ctx, params.TransactionID, params.VendorOrderID, params.UserID)
|
||||||
|
return retVal, "", err
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -610,6 +610,15 @@ func init() {
|
|||||||
Filters: nil,
|
Filters: nil,
|
||||||
Params: nil})
|
Params: nil})
|
||||||
|
|
||||||
|
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JxOrderController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JxOrderController"],
|
||||||
|
beego.ControllerComments{
|
||||||
|
Method: "AutoPayForPopluarMan",
|
||||||
|
Router: `/AutoPayForPopluarMan`,
|
||||||
|
AllowHTTPMethods: []string{"post"},
|
||||||
|
MethodParams: param.Make(),
|
||||||
|
Filters: nil,
|
||||||
|
Params: nil})
|
||||||
|
|
||||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JxOrderController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JxOrderController"],
|
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JxOrderController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JxOrderController"],
|
||||||
beego.ControllerComments{
|
beego.ControllerComments{
|
||||||
Method: "BuyerCancelOrder",
|
Method: "BuyerCancelOrder",
|
||||||
@@ -673,6 +682,15 @@ func init() {
|
|||||||
Filters: nil,
|
Filters: nil,
|
||||||
Params: nil})
|
Params: nil})
|
||||||
|
|
||||||
|
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JxOrderController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JxOrderController"],
|
||||||
|
beego.ControllerComments{
|
||||||
|
Method: "PayForPopluarMan",
|
||||||
|
Router: `/PayForPopluarMan`,
|
||||||
|
AllowHTTPMethods: []string{"post"},
|
||||||
|
MethodParams: param.Make(),
|
||||||
|
Filters: nil,
|
||||||
|
Params: nil})
|
||||||
|
|
||||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JxShopController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JxShopController"],
|
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JxShopController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JxShopController"],
|
||||||
beego.ControllerComments{
|
beego.ControllerComments{
|
||||||
Method: "JxMsg",
|
Method: "JxMsg",
|
||||||
@@ -2250,6 +2268,15 @@ func init() {
|
|||||||
Filters: nil,
|
Filters: nil,
|
||||||
Params: nil})
|
Params: nil})
|
||||||
|
|
||||||
|
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:User2Controller"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:User2Controller"],
|
||||||
|
beego.ControllerComments{
|
||||||
|
Method: "DeleteProfitSharingReceiver",
|
||||||
|
Router: `/DeleteProfitSharingReceiver`,
|
||||||
|
AllowHTTPMethods: []string{"delete"},
|
||||||
|
MethodParams: param.Make(),
|
||||||
|
Filters: nil,
|
||||||
|
Params: nil})
|
||||||
|
|
||||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:User2Controller"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:User2Controller"],
|
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:User2Controller"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:User2Controller"],
|
||||||
beego.ControllerComments{
|
beego.ControllerComments{
|
||||||
Method: "DeleteRoles4User",
|
Method: "DeleteRoles4User",
|
||||||
@@ -2403,6 +2430,15 @@ func init() {
|
|||||||
Filters: nil,
|
Filters: nil,
|
||||||
Params: nil})
|
Params: nil})
|
||||||
|
|
||||||
|
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:User2Controller"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:User2Controller"],
|
||||||
|
beego.ControllerComments{
|
||||||
|
Method: "UpdateUserWxNoAndPercent",
|
||||||
|
Router: `/UpdateUserWxNoAndPercent`,
|
||||||
|
AllowHTTPMethods: []string{"put"},
|
||||||
|
MethodParams: param.Make(),
|
||||||
|
Filters: nil,
|
||||||
|
Params: nil})
|
||||||
|
|
||||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:YongHuiController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:YongHuiController"],
|
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:YongHuiController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:YongHuiController"],
|
||||||
beego.ControllerComments{
|
beego.ControllerComments{
|
||||||
Method: "GetWeimobOrders",
|
Method: "GetWeimobOrders",
|
||||||
|
|||||||
Reference in New Issue
Block a user