邮件签名
This commit is contained in:
parent
0cf03224a5
commit
b50c0bfee2
@ -70,6 +70,7 @@ func GetMonthStartEnd() (int64, int64) {
|
||||
return _d1, _d2
|
||||
}
|
||||
func Test_Main(t *testing.T) {
|
||||
|
||||
ids := utils.RandomNumbers(0, 10, 5)
|
||||
for _, v := range ids {
|
||||
fmt.Printf("%d", v)
|
||||
|
@ -41,21 +41,17 @@ func (this *Api_Comp) CreateMail(c *engine.Context) {
|
||||
}
|
||||
defer c.JSON(http.StatusOK, &Respond{Code: code, Message: msg, Data: data})
|
||||
if sign := gin.ParamSign(this.options.Key, map[string]interface{}{
|
||||
"Uid": req.Uid,
|
||||
"Title": req.Title,
|
||||
"Contex": req.Contex,
|
||||
"Cid": req.Cid,
|
||||
"uid": req.Uid,
|
||||
"title": req.Title,
|
||||
"contex": req.Contex,
|
||||
"cid": req.Cid,
|
||||
}); sign != req.Sign {
|
||||
this.module.Errorf("LoginByCaptchaReq SignError sgin:%s", sign)
|
||||
code = pb.ErrorCode_SignError
|
||||
msg = pb.GetErrorCodeMsg(code)
|
||||
return
|
||||
}
|
||||
if len(req.Title) == 0 {
|
||||
code = pb.ErrorCode_ReqParameterError
|
||||
msg = pb.GetErrorCodeMsg(code)
|
||||
return
|
||||
}
|
||||
|
||||
mail := &pb.DBMailData{
|
||||
ObjId: primitive.NewObjectID().Hex(),
|
||||
Uid: req.Uid,
|
||||
@ -82,5 +78,6 @@ func (this *Api_Comp) CreateMail(c *engine.Context) {
|
||||
mail, nil); err != nil {
|
||||
this.module.Errorln(err)
|
||||
code = pb.ErrorCode_RpcFuncExecutionError
|
||||
msg = pb.GetErrorCodeMsg(code)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user