Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hilo-user
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenweijian
hilo-user
Commits
46ddc687
Commit
46ddc687
authored
Jun 13, 2023
by
hujiebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
纪念日的时间
parent
f5f4c255
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
19 deletions
+22
-19
anniversary.go
cv/cp_cv/anniversary.go
+9
-8
anniversary.go
domain/model/cp_m/anniversary.go
+2
-2
anniversary.go
route/cp_r/anniversary.go
+11
-9
No files found.
cv/cp_cv/anniversary.go
View file @
46ddc687
...
...
@@ -16,7 +16,8 @@ type CvCpAnniversary struct {
CpInfo
*
CvCpBase
`json:"cpInfo,omitempty"`
// cp信息,type=1(头像)时候用到
Id
uint64
`json:"id"`
// 记录id
Content
string
`json:"content"`
// 纪念日内容
Timestamp
int64
`json:"timestamp"`
// 纪念日时间戳
OriginTimestamp
int64
`json:"originTimestamp"`
// 纪念日的时间
Timestamp
int64
`json:"timestamp"`
// 下次纪念日时间戳
IsRemind
bool
`json:"isRemind"`
// 是否提醒
CanDel
bool
`json:"canDel"`
// 能否删除
IsTop
bool
`json:"isTop"`
// 是否置顶
...
...
domain/model/cp_m/anniversary.go
View file @
46ddc687
...
...
@@ -34,10 +34,10 @@ func InitCpAnniversary(model *domain.Model, cp CpRelationTmp) error {
if
err
:=
AddCpAnniversary
(
model
,
cp_e
.
AnniversaryItemTypeNormal
,
cp
,
"我们在一起"
,
time
.
Now
()
.
Unix
(),
true
,
100
);
err
!=
nil
{
return
err
}
if
err
:=
AddCpAnniversary
(
model
,
cp_e
.
AnniversaryItemTypeAnniversary
,
cp
,
fmt
.
Sprintf
(
"%s的生日"
,
users
[
cp
.
UserId1
]
.
Nick
),
int64
(
users
[
cp
.
UserId1
]
.
Birthday
)
,
true
,
0
);
err
!=
nil
{
if
err
:=
AddCpAnniversary
(
model
,
cp_e
.
AnniversaryItemTypeAnniversary
,
cp
,
fmt
.
Sprintf
(
"%s的生日"
,
users
[
cp
.
UserId1
]
.
Nick
),
0
,
true
,
0
);
err
!=
nil
{
return
err
}
if
err
:=
AddCpAnniversary
(
model
,
cp_e
.
AnniversaryItemTypeAnniversary
,
cp
,
fmt
.
Sprintf
(
"%s的生日"
,
users
[
cp
.
UserId2
]
.
Nick
),
int64
(
users
[
cp
.
UserId2
]
.
Birthday
)
,
true
,
0
);
err
!=
nil
{
if
err
:=
AddCpAnniversary
(
model
,
cp_e
.
AnniversaryItemTypeAnniversary
,
cp
,
fmt
.
Sprintf
(
"%s的生日"
,
users
[
cp
.
UserId2
]
.
Nick
),
0
,
true
,
0
);
err
!=
nil
{
return
err
}
if
err
:=
AddCpAnniversary
(
model
,
cp_e
.
AnniversaryItemTypeNormal
,
cp
,
"第一次说我爱你"
,
0
,
false
,
0
);
err
!=
nil
{
...
...
route/cp_r/anniversary.go
View file @
46ddc687
...
...
@@ -114,6 +114,7 @@ func PageAnniversary(c *gin.Context) (*mycontext.MyContext, error) {
UserInfo
:
*
userInfo
,
CpUserInfo
:
*
cpUserInfo
,
},
OriginTimestamp
:
cpRelation
.
CreatedTime
.
Unix
(),
Timestamp
:
cpRelation
.
CreatedTime
.
Unix
(),
CanDel
:
false
,
})
...
...
@@ -134,6 +135,7 @@ func PageAnniversary(c *gin.Context) (*mycontext.MyContext, error) {
Id
:
v
.
ID
,
Content
:
v
.
Content
,
Timestamp
:
timestamp
,
OriginTimestamp
:
v
.
Timestamp
,
IsRemind
:
v
.
IsRemind
,
CanDel
:
true
,
IsTop
:
v
.
Sort
>
0
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment