This commit is contained in:
苏尹岚
2021-03-08 16:00:20 +08:00
parent 74db22c236
commit 4c06b4a8c6
3 changed files with 50 additions and 0 deletions

View File

@@ -383,3 +383,24 @@ func GetManageState(ctx *jxcontext.Context, cityCodes []int, vendorID int) (getM
}
return getManageStateResult, err
}
type GetStoreManageStateResult struct {
StoreID int `json:"storeID"`
StoreName string `json:"storeName"`
CoverArea int `json:"coverArea"`
MarketScale int `json:"marketScale"` //市场规模
OpenTime int `json:"openTime"` //营业时长
SkuCount int `json:"skuCount"` //商品数
HighSkuCount int `json:"highSkuCount"` //虚高商品数
ActAmple int `json:"actAmple"` //活动丰富的
NullOrderCount int `json:"nullOrderCount"` //无效订单数
RefuseOrderCount int `json:"refuseOrderCount"` //拒绝订单数
RepurchaseRate int `json:"repurchaseRate"` //复购率(转化率)
}
func GetStoreManageState(ctx *jxcontext.Context, storeIDs []int, vendorID int, fromTime, toTime string) (getStoreManageStateResult *GetStoreManageStateResult, err error) {
return &GetStoreManageStateResult{
StoreID: 1,
StoreName: "1",
}, err
}

View File

@@ -114,3 +114,23 @@ func (c *ReportController) GetManageState() {
return retVal, "", err
})
}
// @Title 查询门店经营数据
// @Description 查询门店经营数据
// @Param token header string true "认证token"
// @Param storeIDs query string false "门店ID列表[1,2,3]"
// @Param vendorID query int true "平台ID"
// @Param fromTime formData string true "开始日期包含格式2006-01-02 00:00:00)"
// @Param toTime formData string true "结束日期包含格式2006-01-02 00:00:00)"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /GetStoreManageState [get]
func (c *ReportController) GetStoreManageState() {
c.callGetStoreManageState(func(params *tReportGetStoreManageStateParams) (retVal interface{}, errCode string, err error) {
var storeIDs []int
if err = jxutils.Strings2Objs(params.StoreIDs, &storeIDs); err == nil {
retVal, err = report.GetStoreManageState(params.Ctx, storeIDs, params.VendorID, params.FromTime, params.ToTime)
}
return retVal, "", err
})
}

View File

@@ -1593,6 +1593,15 @@ func init() {
Filters: nil,
Params: nil})
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:ReportController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:ReportController"],
beego.ControllerComments{
Method: "GetStoreManageState",
Router: `/GetStoreManageState`,
AllowHTTPMethods: []string{"get"},
MethodParams: param.Make(),
Filters: nil,
Params: nil})
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:ReportController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:ReportController"],
beego.ControllerComments{
Method: "PriceRefer",