Merge remote-tracking branch 'origin/mark' into don
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
"time"
|
||||
|
||||
@@ -321,63 +320,63 @@ func (c *StoreSkuController) GetStoresSkusSaleInfo() {
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 得到商家商品修改价格请求信息
|
||||
// @Description 得到商家商品修改价格请求信息
|
||||
// @Param token header string true "认证token"
|
||||
// @Param fromTime query string false "申请开始时间"
|
||||
// @Param toTime query string false "申请结束时间"
|
||||
// @Param keyword query string false "查询关键字(可以为空,为空表示不限制)"
|
||||
// @Param storeIDs query string false "门店ID列表"
|
||||
// @Param itemIDs query string false "id列表对象,当前指skuname id"
|
||||
// @Param types query string false "类型列表对象"
|
||||
// @Param statuss query string false "状态列表对象"
|
||||
// @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 /GetStoreOpRequests [get]
|
||||
func (c *StoreSkuController) GetStoreOpRequests() {
|
||||
c.callGetStoreOpRequests(func(params *tStoreSkuGetStoreOpRequestsParams) (retVal interface{}, errCode string, err error) {
|
||||
var (
|
||||
timeList []time.Time
|
||||
storeIDs, typeList, statusList, itemIDs []int
|
||||
)
|
||||
if timeList, err = jxutils.BatchStr2Time(params.FromTime, params.ToTime); err != nil {
|
||||
return retVal, "", err
|
||||
}
|
||||
if err = jxutils.Strings2Objs(params.StoreIDs, &storeIDs, params.Types, &typeList, params.Statuss, &statusList, params.ItemIDs, &itemIDs); err != nil {
|
||||
return retVal, "", err
|
||||
}
|
||||
retVal, err = cms.GetStoreOpRequests(params.Ctx, timeList[0], timeList[1], params.Keyword, storeIDs, itemIDs, typeList, statusList, params.Offset, params.PageSize)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
// // @Title 得到商家商品修改价格请求信息
|
||||
// // @Description 得到商家商品修改价格请求信息
|
||||
// // @Param token header string true "认证token"
|
||||
// // @Param fromTime query string false "申请开始时间"
|
||||
// // @Param toTime query string false "申请结束时间"
|
||||
// // @Param keyword query string false "查询关键字(可以为空,为空表示不限制)"
|
||||
// // @Param storeIDs query string false "门店ID列表"
|
||||
// // @Param itemIDs query string false "id列表对象,当前指skuname id"
|
||||
// // @Param types query string false "类型列表对象"
|
||||
// // @Param statuss query string false "状态列表对象"
|
||||
// // @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 /GetStoreOpRequests [get]
|
||||
// func (c *StoreSkuController) GetStoreOpRequests() {
|
||||
// c.callGetStoreOpRequests(func(params *tStoreSkuGetStoreOpRequestsParams) (retVal interface{}, errCode string, err error) {
|
||||
// var (
|
||||
// timeList []time.Time
|
||||
// storeIDs, typeList, statusList, itemIDs []int
|
||||
// )
|
||||
// if timeList, err = jxutils.BatchStr2Time(params.FromTime, params.ToTime); err != nil {
|
||||
// return retVal, "", err
|
||||
// }
|
||||
// if err = jxutils.Strings2Objs(params.StoreIDs, &storeIDs, params.Types, &typeList, params.Statuss, &statusList, params.ItemIDs, &itemIDs); err != nil {
|
||||
// return retVal, "", err
|
||||
// }
|
||||
// retVal, err = cms.GetStoreOpRequests(params.Ctx, timeList[0], timeList[1], params.Keyword, storeIDs, itemIDs, typeList, statusList, params.Offset, params.PageSize)
|
||||
// return retVal, "", err
|
||||
// })
|
||||
// }
|
||||
|
||||
// @Title 处理商家商品价格申请
|
||||
// @Description 处理商家商品价格申请
|
||||
// @Param token header string true "认证token"
|
||||
// @Param reqIDs formData string true "请求ID列表对象"
|
||||
// @Param handleType formData int true "-1拒绝,1批准"
|
||||
// @Param rejectReason formData string false "拒绝理由,拒绝时要求"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /HandleStoreOpRequest [put]
|
||||
func (c *StoreSkuController) HandleStoreOpRequest() {
|
||||
c.callHandleStoreOpRequest(func(params *tStoreSkuHandleStoreOpRequestParams) (retVal interface{}, errCode string, err error) {
|
||||
var reqIDs []int
|
||||
if err = jxutils.Strings2Objs(params.ReqIDs, &reqIDs); err != nil {
|
||||
return retVal, "", err
|
||||
}
|
||||
if params.HandleType == 1 {
|
||||
err = cms.AcceptStoreOpRequests(params.Ctx, reqIDs)
|
||||
} else if params.HandleType == -1 {
|
||||
err = cms.RejectStoreOpRequests(params.Ctx, reqIDs, params.RejectReason)
|
||||
} else {
|
||||
err = fmt.Errorf("handleType=%d是非法值", params.HandleType)
|
||||
}
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
// // @Title 处理商家商品价格申请
|
||||
// // @Description 处理商家商品价格申请
|
||||
// // @Param token header string true "认证token"
|
||||
// // @Param reqIDs formData string true "请求ID列表对象"
|
||||
// // @Param handleType formData int true "-1拒绝,1批准"
|
||||
// // @Param rejectReason formData string false "拒绝理由,拒绝时要求"
|
||||
// // @Success 200 {object} controllers.CallResult
|
||||
// // @Failure 200 {object} controllers.CallResult
|
||||
// // @router /HandleStoreOpRequest [put]
|
||||
// func (c *StoreSkuController) HandleStoreOpRequest() {
|
||||
// c.callHandleStoreOpRequest(func(params *tStoreSkuHandleStoreOpRequestParams) (retVal interface{}, errCode string, err error) {
|
||||
// var reqIDs []int
|
||||
// if err = jxutils.Strings2Objs(params.ReqIDs, &reqIDs); err != nil {
|
||||
// return retVal, "", err
|
||||
// }
|
||||
// if params.HandleType == 1 {
|
||||
// err = cms.AcceptStoreOpRequests(params.Ctx, reqIDs)
|
||||
// } else if params.HandleType == -1 {
|
||||
// err = cms.RejectStoreOpRequests(params.Ctx, reqIDs, params.RejectReason)
|
||||
// } else {
|
||||
// err = fmt.Errorf("handleType=%d是非法值", params.HandleType)
|
||||
// }
|
||||
// return retVal, "", err
|
||||
// })
|
||||
// }
|
||||
|
||||
// @Title 根据厂家门店商品信息相应刷新本地数据
|
||||
// @Description 根据厂家门店商品信息相应刷新本地数据
|
||||
|
||||
Reference in New Issue
Block a user