- pending store op price change request.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
"time"
|
||||
|
||||
@@ -213,3 +214,57 @@ func (c *StoreSkuController) GetStoresSkusSaleInfo() {
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 得到商家商品修改价格请求信息
|
||||
// @Description 得到商家商品修改价格请求信息
|
||||
// @Param token header string true "认证token"
|
||||
// @Param fromTime query string true "申请开始时间"
|
||||
// @Param toTime query string false "申请结束时间"
|
||||
// @Param keyword query string false "查询关键字(可以为空,为空表示不限制)"
|
||||
// @Param storeIDs query string false "门店ID列表"
|
||||
// @Param itemIDs query string false "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
|
||||
)
|
||||
if timeList, err = jxutils.BatchStr2Time(params.FromTime, params.ToTime); err != nil {
|
||||
return retVal, "", err
|
||||
}
|
||||
retVal, err = cms.GetStoreOpRequests(params.Ctx, timeList[0], timeList[1], params.Keyword, params.MapData, 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 = utils.UnmarshalUseNumber([]byte(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
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user