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