Commit 0815ac0f by mushishixian

库存对比

parent 609b1e3d
Showing with 2 additions and 1 deletions
......@@ -101,6 +101,7 @@ func main() {
goodsId := data.Get("goods_id").Int()
goodsIdStr := data.Get("goods_id").String()
stock := data.Get("stock").Int()
moq := data.Get("moq").Int()
//联营
var goodsUrl string
mainUrl := "https://www.ichunt.com"
......@@ -110,7 +111,7 @@ func main() {
goodsUrl = mainUrl + "/item/" + goodsIdStr + ".html"
}
//如果库存大于0,就去通知用户
if stock > 0 {
if stock > 0 && stock > moq {
//通知完成以后就修改这条记录
goodsName := data.Get("goods_name").String()
content := "您关注的商品型号" + goodsName + "已经到货,快去购买吧。链接 : " + goodsUrl
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment