Browse Source

feat:查看状态时间格式修改

duxin 2 years ago
parent
commit
d377073d66
1 changed files with 3 additions and 2 deletions
  1. 3 2
      jyBXSubscribe/rpc/internal/logic/getviewstatuslogic.go

+ 3 - 2
jyBXSubscribe/rpc/internal/logic/getviewstatuslogic.go

@@ -78,10 +78,11 @@ func (l *GetViewStatusLogic) GetViewStatus(in *bxsubscribe.GetViewStatusReq) (*b
 				visittime := common.InterfaceToStr(v["visittime"])
 				date := common.Int64All(v["date"])
 				if visittime != "" {
-					visittime = strings.Split(visittime, " ")[0]
+					visittime = strings.Replace(visittime, " ", "\n", -1)
 				}
 				if date > 0 {
-					da.Date = time.Unix(date, 0).Format("2006-01-02 15:04:05")
+					dateTime := time.Unix(date, 0).Format("2006-01-02 15:04:05")
+					da.Date = strings.Replace(dateTime, " ", "\n", -1)
 				}
 				da.Visittime = visittime
 				da.Id = common.Int64All(userid)