1
This commit is contained in:
parent
453e37bb7e
commit
d024d8bd7d
@ -26,6 +26,7 @@ func (this *MailApi) ListMail(c *gin.Context) {
|
|||||||
|
|
||||||
func (this *MailApi) AddMail(c *gin.Context) {
|
func (this *MailApi) AddMail(c *gin.Context) {
|
||||||
reqJson := struct {
|
reqJson := struct {
|
||||||
|
UniKey string `json:"unikey"`
|
||||||
MailType int32 `binding:"required" json:"mailtype"`
|
MailType int32 `binding:"required" json:"mailtype"`
|
||||||
SendTime int32 `json:"sendtime"`
|
SendTime int32 `json:"sendtime"`
|
||||||
ExpireTime int32 `json:"expiretime"`
|
ExpireTime int32 `json:"expiretime"`
|
||||||
@ -62,9 +63,13 @@ func (this *MailApi) AddMail(c *gin.Context) {
|
|||||||
mail.Content = reqJson.Content
|
mail.Content = reqJson.Content
|
||||||
mail.Attachments = reqJson.Attachments
|
mail.Attachments = reqJson.Attachments
|
||||||
mail.Recipients = reqJson.Recipients
|
mail.Recipients = reqJson.Recipients
|
||||||
|
mail.Tag1 = jccommon.MAIL_TAG1_CUSTOM
|
||||||
|
mail.Tag2 = jccommon.MAIL_TAG2_CUSTOM_NORMAL
|
||||||
mail.CreateTime = nowDaySeconds
|
mail.CreateTime = nowDaySeconds
|
||||||
mail.ModifyTime = nowDaySeconds
|
mail.ModifyTime = nowDaySeconds
|
||||||
f5.GetApp().GetOrmDb(constant.MAIL_DB).Create(mail)
|
if f5.GetApp().GetOrmDb(constant.MAIL_DB).Create(mail).Error == nil {
|
||||||
|
|
||||||
|
}
|
||||||
{
|
{
|
||||||
e := new(jccommon.MailEvent)
|
e := new(jccommon.MailEvent)
|
||||||
e.EventName = jccommon.EVENT_MAIL_UPDATE
|
e.EventName = jccommon.EVENT_MAIL_UPDATE
|
||||||
|
@ -33,6 +33,8 @@ type Mail struct {
|
|||||||
SendTime int32 `gorm:"column:sendtime" json:"sendtime"`
|
SendTime int32 `gorm:"column:sendtime" json:"sendtime"`
|
||||||
UserRegStartTime int32 `gorm:"column:user_reg_start_time" json:"user_reg_start_time"`
|
UserRegStartTime int32 `gorm:"column:user_reg_start_time" json:"user_reg_start_time"`
|
||||||
UserRegEndTime int32 `gorm:"column:user_reg_end_time" json:"user_reg_end_time"`
|
UserRegEndTime int32 `gorm:"column:user_reg_end_time" json:"user_reg_end_time"`
|
||||||
|
Tag1 int32 `gorm:"column:tag1" json:"tag1"`
|
||||||
|
Tag2 int32 `gorm:"column:tag2;<-:create" json:"tag2"`
|
||||||
ExpireTime int32 `gorm:"column:expiretime" json:"expiretime"`
|
ExpireTime int32 `gorm:"column:expiretime" json:"expiretime"`
|
||||||
CreateTime int32 `gorm:"column:createtime;<-:create" json:"createtime"`
|
CreateTime int32 `gorm:"column:createtime;<-:create" json:"createtime"`
|
||||||
ModifyTime int32 `gorm:"column:modifytime" json:"modifytime"`
|
ModifyTime int32 `gorm:"column:modifytime" json:"modifytime"`
|
||||||
|
@ -37,11 +37,14 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
MAIL_TAG1_CUSTOM = 1
|
||||||
MAIL_TAG1_HERO = 100
|
MAIL_TAG1_HERO = 100
|
||||||
MAIL_TAG1_GOLD_BULLION = 101
|
MAIL_TAG1_GOLD_BULLION = 101
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
MAIL_TAG2_CUSTOM_NORMAL = 1
|
||||||
|
|
||||||
MAIL_TAG2_HERO_MINT = 1
|
MAIL_TAG2_HERO_MINT = 1
|
||||||
MAIL_TAG2_HERO_LOCK = 2
|
MAIL_TAG2_HERO_LOCK = 2
|
||||||
MAIL_TAG2_HERO_UNLOCK = 3
|
MAIL_TAG2_HERO_UNLOCK = 3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user