- add PendingUnitPrice and PendingOpType in GetStoreSkus result, when param isGetOpRequest is true

- fix some API result to lower camel case
This commit is contained in:
gazebo
2018-12-20 21:27:39 +08:00
parent 2952b3f3b5
commit ae9bc84921
4 changed files with 99 additions and 57 deletions

View File

@@ -37,6 +37,7 @@ type StoreSkuController struct {
// @Param stToTime query string false "统计SKU结束时间"
// @Param stFromCount query int false "统计SKU结果集起始数量包括"
// @Param stToCount query int false "统计SKU结果集结束数量包括"
// @Param isGetOpRequest query bool false "是否返回相应的待审核变动请求缺省为false不返回"
// @Param offset query int false "门店列表起始序号以0开始缺省为0"
// @Param pageSize query int false "门店列表页大小缺省为50-1表示全部"
// @Success 200 {object} controllers.CallResult
@@ -220,11 +221,11 @@ func (c *StoreSkuController) GetStoresSkusSaleInfo() {
// @Title 得到商家商品修改价格请求信息
// @Description 得到商家商品修改价格请求信息
// @Param token header string true "认证token"
// @Param fromTime query string true "申请开始时间"
// @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列表对象"
// @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"
@@ -235,12 +236,19 @@ func (c *StoreSkuController) GetStoresSkusSaleInfo() {
func (c *StoreSkuController) GetStoreOpRequests() {
c.callGetStoreOpRequests(func(params *tStoreSkuGetStoreOpRequestsParams) (retVal interface{}, errCode string, err error) {
var (
timeList []time.Time
timeList []time.Time
storeIDs []int
typeList []int
statusList []int
itemIDs []int
)
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)
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
})
}