差评补款

This commit is contained in:
苏尹岚
2019-12-26 18:36:58 +08:00
parent c22581636d
commit cfb1a2e052
4 changed files with 95 additions and 1 deletions

View File

@@ -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
})
}