花5分钟码完代码,收工睡觉。

modify0322.jpg

    time1, _ := strconv.Atoi(c.PostForm("time1"))
    time2, _ := strconv.Atoi(c.PostForm("time2"))
    shopid, _ := strconv.Atoi(c.PostForm("shopid"))
    if (time1 == 0 && time2 != 0) || (time1 != 0 && time2 == 0) {
        reply.Response(500, "时间参数错误")
        return
    }
    if time1 != 0 {
        extracond += " and o.time>=? and o.time<=?"
        args = append(args, time1, time2)
    }
    if shopid != 0 {
        extracond += " and sd.shopid=?"
        args = append(args, shopid)
    }

标签: none

添加新评论

*如果只是需要与我沟通联系,请telegram @ohyessure, 而不要用评论方式,因为没有你的个人资料,我无法回复及联络你。