新接口

This commit is contained in:
苏尹岚
2020-08-06 18:20:15 +08:00
parent 3e4ef8ecb6
commit b998498ae3
4 changed files with 41 additions and 0 deletions

View File

@@ -1345,3 +1345,10 @@ func GetAfsOrdersByPage(db *DaoDB, vendorOrderID, afsOrderID, userID string, fro
}
return afsOrderList, totalCount, err
}
func GetSupplySupportStoreSkus(db *DaoDB, fromDate, toDate time.Time, fromStoreID, storeID int) (storeSkuBind []*model.StoreSkuBind, err error) {
// sql := `
// `
return storeSkuBind, err
}

View File

@@ -1787,3 +1787,11 @@ func buildJxOrderInfo(order *model.GoodsOrder, orderSkus []*model.OrderSku) (jxO
jxOrder.OrderType = model.OrderTypeMatter
return jxOrder
}
func GetSupplySupportStoreSkus(ctx *jxcontext.Context, fromDate, toDate string, fromStoreID, storeID int) (storeSkuBinds []*model.StoreSkuBind, err error) {
var (
db = dao.GetDB()
)
storeSkuBinds, err = dao.GetSupplySupportStoreSkus(db, utils.Str2Time(fromDate), utils.Str2Time(toDate), fromStoreID, storeID)
return storeSkuBinds, err
}

View File

@@ -222,3 +222,20 @@ func (c *JxOrderController) SendFailedMatterOrder() {
return retVal, "", err
})
}
// @Title 根据时间获取进货辅助工具里的商品,用于加入购物车
// @Description 根据时间获取进货辅助工具里的商品,用于加入购物车
// @Param token header string true "认证token"
// @Param fromDate query string false "开始日期包含格式2006-01-02如果订单号为空此项必须要求"
// @Param toDate query string false "结束日期包含格式2006-01-02如果订单号为空此项必须要求"
// @Param fromStoreID query int false "进货门店ID"
// @Param storeID query int false "货源门店ID"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /GetSupplySupportStoreSkus [get]
func (c *JxOrderController) GetSupplySupportStoreSkus() {
c.callGetSupplySupportStoreSkus(func(params *tJxorderGetSupplySupportStoreSkusParams) (retVal interface{}, errCode string, err error) {
retVal, err = localjx.GetSupplySupportStoreSkus(params.Ctx, params.FromDate, params.ToDate, params.FromStoreID, params.StoreID)
return retVal, "", err
})
}

View File

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