Commit 171bd856 by mushishixian

修复

parent 11db0ad1
Showing with 11 additions and 1 deletions
......@@ -94,11 +94,21 @@ func main() {
//还要去判断是否是bool
if data.IsObject() {
goodsId := data.Get("goods_id").Int()
goodsIdStr := data.Get("goods_id").String()
stock := data.Get("stock").Int()
//联营
var goodsUrl string
mainUrl := "https://www.ichunt.com"
if len(goodsIdStr) == 19 {
goodsUrl = mainUrl + "/goods_" + goodsIdStr + ".html"
} else {
goodsUrl = mainUrl + "/item/" + goodsIdStr + ".html"
}
//如果库存大于0,就去通知用户
if stock > 0 {
//通知完成以后就修改这条记录
content := data.Get("goods_name").String()
goodsName := data.Get("goods_name").String()
content := "您关注的商品型号" + goodsName + "已经到货,快去购买吧。链接 : " + goodsUrl
if service.SendMessage(int(goodsIdUserIdMap[goodsId]), content) {
messageCount++
if messageCount >= MaxMessageNumber {
......
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