添加用户提现操作

This commit is contained in:
邹宗楠
2022-07-11 15:16:10 +08:00
parent efc987d932
commit 780fca768e
7 changed files with 326 additions and 43 deletions

View File

@@ -248,3 +248,18 @@ func (c *QBiDaExpressController) DeleteOrder() {
return count, "", err
})
}
// TryAgainOrderByOldOrder 用户再来一单
// @Title Q必达
// @Description 再来一单
// @Param token header string true "用户token"
// @Param oldNo formData string true "旧的订单Id"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /TryAgainOrderByOldOrder [post]
func (c *QBiDaExpressController) TryAgainOrderByOldOrder() {
c.callTryAgainOrderByOldOrder(func(params *tExpressTryAgainOrderByOldOrderParams) (interface{}, string, error) {
newOrder, err := bidaServer.TryAgainOrder(params.Ctx, params.OldNo)
return newOrder, "", err
})
}

View File

@@ -1,6 +1,7 @@
package controllers
import (
"errors"
"git.rosy.net.cn/jx-callback/business/model"
withdreawal "git.rosy.net.cn/jx-callback/business/q_bida"
"github.com/astaxie/beego/server/web"
@@ -92,7 +93,7 @@ func (c *WithdrawalRecordController) GetWithdrawalRecord() {
// @router /GetWithdrawalList [post]
func (c *WithdrawalRecordController) GetWithdrawalList() {
c.callGetWithdrawalList(func(params *tWithdrawalGetWithdrawalListParams) (interface{}, string, error) {
data, count, err := withdreawal.GetUserWithdrawalList(&withdreawal.OrderListParam{
data, count, err := withdreawal.GetUserWithdrawalList(&model.OrderListParam{
PageSize: params.PageSize,
PageNum: params.PageNum,
UserId: params.UserId,
@@ -111,4 +112,25 @@ func (c *WithdrawalRecordController) GetWithdrawalList() {
})
}
//
// ExamineWithdrawalOrder
// 管理员审核提现申请
// @Title 审核提现申请
// @Description 审核提现申请
// @Param token header string true "认证token"
// @Param phone formData string true "当前审核人员电话号码"
// @Param orderId formData string true "被审核订单Id"
// @Param examineStatus formData int true "1-通过"
// @Param remark formData string false "不通过原因"
// @Param userId formData string false "提现人员Id"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /ExamineWithdrawalOrder [post]
func (c *WithdrawalRecordController) ExamineWithdrawalOrder() {
c.callExamineWithdrawalOrder(func(params *tWithdrawalExamineWithdrawalOrderParams) (interface{}, string, error) {
if DefaultMobile[params.Phone] != "ok" {
return nil, "", errors.New("当前用户不具备操作权限,请联系管理员")
}
err := withdreawal.ManagerExamineWithdrawal(params.UserId, params.OrderId, params.ExamineStatus, params.Phone, params.Remark)
return nil, "", err
})
}