'定时刷新商店库存和营业时间(暂饿百和美团)'

This commit is contained in:
Rosy-zhudan
2019-07-29 10:58:19 +08:00
parent 07d72b538c
commit e7f618859d
4 changed files with 58 additions and 19 deletions

View File

@@ -10,6 +10,7 @@ import (
"git.rosy.net.cn/jx-callback/business/model/dao"
"git.rosy.net.cn/jx-callback/globals/api"
"github.com/astaxie/beego"
"git.rosy.net.cn/jx-callback/business/jxstore/misc"
)
type TempOpController struct {
@@ -271,3 +272,20 @@ func (c *TempOpController) TestIt() {
return retVal, "", err
})
}
// @Title 开启或结束所有平台商店的额外时间
// @Description 开启或结束所有平台商店的额外时间并且修改所有商品库存为0或99999(开启0 结束99999)
// @Param token header string true "认证token"
// @Param startOrEndStore query bool true "开启或结束"
// @Param startTime query int false "开始营业时间(格式930代表早上9点30分)"
// @Param endTime query int false "结束营业时间"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /TestStartOrEndOpStore [get]
func (c *TempOpController) TestStartOrEndOpStore() {
c.callTestStartOrEndOpStore(func(params *tTempopTestStartOrEndOpStoreParams) (retVal interface{}, errCode string, err error) {
misc.SetStoreOptime(int16(params.StartTime), int16(params.EndTime))
misc.StartOrEndOpStore(params.StartOrEndStore)
return retVal, "", err
})
}