master
howell 3 years ago
parent 7e10880f4d
commit c3ce77d246

@ -33,6 +33,7 @@ type queryOrderListResponse struct {
TotalGoodsCount uint `json:"totalGoodsCount"`
GoodsList []order.GoodsDetail `json:"goodsList"`
OrderType string `json:"orderType"` // 订单类型,线上订单(配送) or 门店订单(自提)
CanPay bool `json:"can_pay"`
}
var TypeMap = map[uint]string{
@ -108,6 +109,7 @@ func QueryAllOrders(c *gin.Context) {
TotalGoodsCount: totalGoodsCount,
GoodsList: goodsList,
OrderType: TypeMap[orderInfoList[i1].ShippingMethod],
CanPay: v1.CanPay,
})
}
back.Suc(c, "", list)
@ -417,6 +419,7 @@ type queryOrderDetailResponse struct {
StatusList []goodsStatus `json:"status_list"`
MakeUpText string `json:"make_up_text"`
MakeUpAmount decimal.Decimal `json:"make_up_amount"`
CanPay bool `json:"can_pay"`
}
type goodsStatus struct {
@ -636,6 +639,7 @@ func QueryOrderDetail(c *gin.Context) {
StatusList: statusList,
MakeUpText: o.Reason,
MakeUpAmount: o.Amount,
CanPay: temp.CanPay,
})
}

@ -181,6 +181,11 @@ func (o Proxy) CompanyApplyList(c *gin.Context) {
})
}
func (o Proxy) CompanyAllAmount(c *gin.Context) {
id, _ := common.GetAppUserId(c)
back.Suc(c, "ok", jyy.Logic.CompanyAllAmount(id))
}
func (o Proxy) CompanyApply(c *gin.Context) {
var args company.Apply
if err := tools.ParseParams(&args, c); err != nil {

@ -700,3 +700,10 @@ func (o logic) CompanyApply(args company.Apply) error {
args.CompanyID = int(company.ID)
return mysql.Db.Create(&args).Error
}
type Data struct {
}
func (o logic) CompanyAllAmount(id uint) error {
return nil
}

@ -86,6 +86,7 @@ type Info struct {
UserID uint `json:"-"`
Password string `json:"password"`
Tax decimal.Decimal `json:"tax"`
TaxBillType string `json:"tax_bill_type"`
}
func (o *Info) TableName() string {

@ -297,6 +297,7 @@ func routerApp(appRouter *gin.RouterGroup) {
{
companyController.POST("info", proxy.CompanyInfo)
companyController.POST("apply/list", proxy.CompanyApplyList) // 提现列表
companyController.POST("apply/all_amount", proxy.CompanyAllAmount)
companyController.POST("apply", proxy.CompanyApply) // 提现
companyController.POST("deposit", proxy.CompanyDespoit) // 充值
companyController.POST("deposit/list", proxy.DespoitInfo) // 充值列表

Loading…
Cancel
Save