差评补款
This commit is contained in:
@@ -909,3 +909,45 @@ func (c *OrderController) ComplaintRider() {
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 查询门店订单扣款记录
|
||||
// @Description 查询门店订单扣款记录
|
||||
// @Param token header string true "认证token"
|
||||
// @Param storeIDs query string true "门店ID列表"
|
||||
// @Param vendorOrderID query string true "订单ID"
|
||||
// @Param vendorIDs query string true "订单所属厂商ID列表"
|
||||
// @Param fromTime query string false "开始日期(包含),格式(2006-01-02),如果订单号为空此项必须要求"
|
||||
// @Param toTime query string false "结束日期(包含),格式(2006-01-02),如果订单号为空此项必须要求"
|
||||
// @Param status query int false "账单状态,0是未结账,1是已结账,2是冲账"
|
||||
// @Param type query int false "扣款类型,1为差评补贴,2为优惠券"
|
||||
// @Param offset query int false "结果起始序号(以0开始,缺省为0)"
|
||||
// @Param pageSize query int false "结果页大小(缺省为50,-1表示全部)"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /GetOrdersSupplement [get]
|
||||
func (c *OrderController) GetOrdersSupplement() {
|
||||
var vendorIDList, storeIDList []int
|
||||
c.callGetOrdersSupplement(func(params *tOrderGetOrdersSupplementParams) (retVal interface{}, errCode string, err error) {
|
||||
if err = jxutils.Strings2Objs(params.VendorIDs, &vendorIDList, params.StoreIDs, &storeIDList); err == nil {
|
||||
retVal, err = orderman.GetOrdersSupplement(params.Ctx, storeIDList, vendorIDList, params.VendorOrderID, params.FromTime, params.ToTime, params.Status, params.Type, params.Offset, params.PageSize)
|
||||
}
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 新增修改扣款记录
|
||||
// @Description 新增修改扣款记录
|
||||
// @Param token header string true "认证token"
|
||||
// @Param payload formData string true "json数据,格式为OrdersSupplement"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /AddUpdateOrdersSupplement [post]
|
||||
func (c *OrderController) AddUpdateOrdersSupplement() {
|
||||
c.callAddUpdateOrdersSupplement(func(params *tOrderAddUpdateOrdersSupplementParams) (retVal interface{}, errCode string, err error) {
|
||||
ordersSupplement := &model.OrderSupplementFee{}
|
||||
if err = utils.UnmarshalUseNumber([]byte(params.Payload), ordersSupplement); err == nil {
|
||||
retVal, err = orderman.AddUpdateOrdersSupplement(params.Ctx, ordersSupplement)
|
||||
}
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user