Accept Merge Request #3: (don -> mark)
Merge Request: 门店评分 Created By: @zhudan Accepted By: @xujianhua URL: https://rosydev.coding.net/p/jx-callback/d/jx-callback/git/merge/3
This commit is contained in:
@@ -3,6 +3,7 @@ package controllers
|
||||
import (
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/misc"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/netprinter"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
@@ -422,3 +423,36 @@ func (c *StoreController) SyncStoresQualify() {
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 门店评分
|
||||
// @Description 门店评分
|
||||
// @Param token header string true "认证token"
|
||||
// @Param storeIDs formData string false "京西门店ID列表"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /ScoreStore [post]
|
||||
func (c *StoreController) ScoreStore() {
|
||||
c.callScoreStore(func(params *tStoreScoreStoreParams) (retVal interface{}, errCode string, err error) {
|
||||
var storeIDList []int
|
||||
if err = jxutils.Strings2Objs(params.StoreIDs, &storeIDList); err == nil {
|
||||
misc.ScoreStore(params.Ctx, storeIDList)
|
||||
}
|
||||
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 得到门店近期周平均分数数据
|
||||
// @Description 得到门店近期周平均分数数据
|
||||
// @Param token header string true "认证token"
|
||||
// @Param storeID query int true "京西门店ID"
|
||||
// @Param weekIndex query int true "周索引(起始索引为0, -1为所有周数据)"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /GetWeeklyStoreScore [get]
|
||||
func (c *StoreController) GetWeeklyStoreScore() {
|
||||
c.callGetWeeklyStoreScore(func(params *tStoreGetWeeklyStoreScoreParams) (retVal interface{}, errCode string, err error) {
|
||||
retVal, err = misc.GetWeeklyStoreScore(params.StoreID, params.WeekIndex)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user