Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
T
tanpu-community
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
探普后端
tanpu-community
Commits
b1fe8056
Commit
b1fe8056
authored
Aug 04, 2021
by
刘基明
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
e76f61b4
41cba0d0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
VisitLogMapper.java
.../tanpu/community/dao/mapper/community/VisitLogMapper.java
+2
-2
VisitLogService.java
...ain/java/com/tanpu/community/service/VisitLogService.java
+1
-1
No files found.
community-service/src/main/java/com/tanpu/community/dao/mapper/community/VisitLogMapper.java
View file @
b1fe8056
...
@@ -21,8 +21,8 @@ import java.util.List;
...
@@ -21,8 +21,8 @@ import java.util.List;
* @since 2021-07-28
* @since 2021-07-28
*/
*/
public
interface
VisitLogMapper
extends
BaseMapper
<
VisitLogEntity
>
{
public
interface
VisitLogMapper
extends
BaseMapper
<
VisitLogEntity
>
{
@Select
(
"select * from visit_log where ident=#{ident} and ref_id=#{refId}"
)
@Select
(
"select * from visit_log where ident=#{ident} and ref_id=#{refId}
and ref_type=#{refType}
"
)
VisitLogEntity
selectByIdentAndRefId
(
@Param
(
"ident"
)
String
ident
,
@Param
(
"refId"
)
String
refId
);
VisitLogEntity
selectByIdentAndRefId
(
@Param
(
"ident"
)
String
ident
,
@Param
(
"refId"
)
String
refId
,
@Param
(
"refType"
)
String
refType
);
@Update
(
"update visit_log set duration=duration+#{duration} where ident=#{ident}"
)
@Update
(
"update visit_log set duration=duration+#{duration} where ident=#{ident}"
)
void
updateDurByIdent
(
@Param
(
"duration"
)
Integer
dur
,
@Param
(
"ident"
)
String
ident
);
void
updateDurByIdent
(
@Param
(
"duration"
)
Integer
dur
,
@Param
(
"ident"
)
String
ident
);
...
...
community-service/src/main/java/com/tanpu/community/service/VisitLogService.java
View file @
b1fe8056
...
@@ -58,7 +58,7 @@ public class VisitLogService {
...
@@ -58,7 +58,7 @@ public class VisitLogService {
@Transactional
@Transactional
public
void
insertOrUpdateDur
(
VisitLogEntity
vs
)
{
public
void
insertOrUpdateDur
(
VisitLogEntity
vs
)
{
if
(
visitLogMapper
.
selectByIdentAndRefId
(
vs
.
getIdent
(),
vs
.
getRefId
())
==
null
)
{
if
(
visitLogMapper
.
selectByIdentAndRefId
(
vs
.
getIdent
(),
vs
.
getRef
Type
(),
vs
.
getRef
Id
())
==
null
)
{
visitLogMapper
.
insert
(
vs
);
visitLogMapper
.
insert
(
vs
);
}
else
{
}
else
{
visitLogMapper
.
updateDurByIdent
(
vs
.
getDuration
(),
vs
.
getIdent
());
visitLogMapper
.
updateDurByIdent
(
vs
.
getDuration
(),
vs
.
getIdent
());
...
...
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