query.go 310 B

1234567891011
  1. package msg_code
  2. import (
  3. "hongze/hongze_yb_en_api/global"
  4. )
  5. // GetMsgCode 根据token获取信息
  6. func GetMsgCode(mobile, code string) (item *MsgCode, err error) {
  7. err = global.MYSQL["rddp"].Where("mobile = ? and code = ? and FROM_UNIXTIME(expired_in)>=NOW() ", mobile, code).First(&item).Error
  8. return
  9. }