del conversation bug fix

This commit is contained in:
Gordon 2022-08-05 14:42:39 +08:00
parent 319631b5c4
commit 87c64bdb2b

View File

@ -79,7 +79,7 @@ func DelSuperGroupMsg(c *gin.Context) {
resp api.DelSuperGroupMsgResp resp api.DelSuperGroupMsgResp
) )
rpcReq := &rpc.DelSuperGroupMsgReq{} rpcReq := &rpc.DelSuperGroupMsgReq{}
utils.CopyStructFields(req, &req) utils.CopyStructFields(rpcReq, &req)
if err := c.BindJSON(&req); err != nil { if err := c.BindJSON(&req); err != nil {
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
return return
@ -141,7 +141,7 @@ func DelSuperGroupMsg(c *gin.Context) {
log.Info(req.OperationID, "", "api DelSuperGroupMsg call, api call rpc...") log.Info(req.OperationID, "", "api DelSuperGroupMsg call, api call rpc...")
if req.IsAllDelete { if req.IsAllDelete {
RpcResp, err := client.DelSuperGroupMsg(context.Background(),rpcReq) RpcResp, err := client.DelSuperGroupMsg(context.Background(), rpcReq)
if err != nil { if err != nil {
log.NewError(req.OperationID, "call delete DelSuperGroupMsg rpc server failed", err.Error()) log.NewError(req.OperationID, "call delete DelSuperGroupMsg rpc server failed", err.Error())
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call DelSuperGroupMsg rpc server failed"}) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call DelSuperGroupMsg rpc server failed"})
@ -152,7 +152,7 @@ func DelSuperGroupMsg(c *gin.Context) {
resp.ErrMsg = RpcResp.ErrMsg resp.ErrMsg = RpcResp.ErrMsg
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), resp) log.NewInfo(req.OperationID, utils.GetSelfFuncName(), resp)
c.JSON(http.StatusOK, resp) c.JSON(http.StatusOK, resp)
}else{ } else {
RpcResp, err := client.SendMsg(context.Background(), &pbData) RpcResp, err := client.SendMsg(context.Background(), &pbData)
if err != nil { if err != nil {
log.NewError(req.OperationID, "call delete UserSendMsg rpc server failed", err.Error()) log.NewError(req.OperationID, "call delete UserSendMsg rpc server failed", err.Error())