Merge remote-tracking branch 'origin/mark' into yonghui

This commit is contained in:
苏尹岚
2019-12-18 15:19:39 +08:00
11 changed files with 77 additions and 17 deletions

View File

@@ -295,8 +295,7 @@ func (c *ActController) RefreshPageActs() {
// @router /DeleteSkusFromAct [delete]
func (c *ActController) DeleteSkusFromAct() {
c.callDeleteSkusFromAct(func(params *tActDeleteSkusFromActParams) (retVal interface{}, errCode string, err error) {
var skuIDs []int
var types []int
var skuIDs, types []int
if err = jxutils.Strings2Objs(params.SkuIDs, &skuIDs, params.Types, &types); err == nil {
retVal, err = act.DeleteSkusFromAct(params.Ctx, params.VendorID, types, skuIDs, params.IsAsync, params.IsContinueWhenError)
}
@@ -310,6 +309,7 @@ func (c *ActController) DeleteSkusFromAct() {
// @Param type formData int true "活动类型3直降4秒杀美团当前不支持秒杀"
// @Param vendorID formData int true "厂商ID当前只支持京东0京西用于记录活动信息9"
// @Param actStoreSkuList formData string true "活动门店商品信息"
// @Param lockTime formData string false "平台价格锁定截止时间"
// @Param isAsync formData bool false "是否异步,缺省否(暂时只支持同步)"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
@@ -318,7 +318,10 @@ func (c *ActController) ForceUpdateVendorPrice() {
c.callForceUpdateVendorPrice(func(params *tActForceUpdateVendorPriceParams) (retVal interface{}, errCode string, err error) {
var actStoreSkuList []*act.ActStoreSkuParam
if err = jxutils.Strings2Objs(params.ActStoreSkuList, &actStoreSkuList); err == nil {
retVal, err = act.ForceUpdateVendorPrice(params.Ctx, params.VendorID, params.Type, actStoreSkuList, params.IsAsync)
timeList, err2 := jxutils.BatchStr2Time(params.LockTime)
if err = err2; err == nil {
retVal, err = act.ForceUpdateVendorPrice(params.Ctx, params.VendorID, params.Type, actStoreSkuList, timeList[0], params.IsAsync)
}
}
return retVal, "", err
})

View File

@@ -43,6 +43,7 @@ type StoreSkuController struct {
// @Param jdSyncStatus query int false "京东同步标识"
// @Param ebaiSyncStatus query int false "饿百同步标识"
// @Param mtwmSyncStatus query int false "美团外卖同步标识"
// @Param lockTime query string false "价格锁定时间"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /GetStoreSkus [get]
@@ -83,6 +84,7 @@ func (c *StoreSkuController) GetStoreSkus() {
// @Param jdSyncStatus query int false "京东同步标识"
// @Param ebaiSyncStatus query int false "饿百同步标识"
// @Param mtwmSyncStatus query int false "美团外卖同步标识"
// @Param lockTime query string false "价格锁定时间"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /GetStoresSkus [get,post]