package msg_code

import (
	"hongze/hongze_yb/models/tables/rddp"
)

// GetMsgCode 根据token获取信息
func GetMsgCode(mobile, code string) (item *MsgCode, err error) {
	err = rddp.GetDb().Where("mobile = ? and FROM_UNIXTIME(expired_in)>=NOW() ", mobile).Order("msg_code_id DESC").First(&item).Error
	return
}
