Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
midjourney-proxy
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
徐少华
midjourney-proxy
Commits
1f451baa
Commit
1f451baa
authored
Aug 06, 2021
by
田超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/1005169' into 'master'
feat:[1005169]小程序首页和我的交互优化 See merge request rays/pcloud-book!1376
parents
45e6adde
ffe036ee
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
74 additions
and
0 deletions
+74
-0
AppletRecordBiz.java
...main/java/com/pcloud/book/applet/biz/AppletRecordBiz.java
+8
-0
AppletRecordBizImpl.java
.../com/pcloud/book/applet/biz/impl/AppletRecordBizImpl.java
+21
-0
AppletRecordServeDao.java
...java/com/pcloud/book/applet/dao/AppletRecordServeDao.java
+3
-0
AppletRecordServeDaoImpl.java
...pcloud/book/applet/dao/impl/AppletRecordServeDaoImpl.java
+6
-0
AppletRecordFacade.java
...ava/com/pcloud/book/applet/facade/AppletRecordFacade.java
+9
-0
AppletRecordServe.Mapper.xml
...main/resources/mapper/applet/AppletRecordServe.Mapper.xml
+27
-0
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/applet/biz/AppletRecordBiz.java
View file @
1f451baa
...
@@ -119,4 +119,12 @@ public interface AppletRecordBiz {
...
@@ -119,4 +119,12 @@ public interface AppletRecordBiz {
* @param trackDTO 埋点信息
* @param trackDTO 埋点信息
*/
*/
void
track
(
Long
wechatUserId
,
Long
officialAccountsId
,
AppletTrackDTO
trackDTO
);
void
track
(
Long
wechatUserId
,
Long
officialAccountsId
,
AppletTrackDTO
trackDTO
);
/**
* 最近一条足迹
* @author:zhuyajie
* @date:2021/8/4 10:42
* * @param null
*/
AppletRecordDTO
getLatestAppletRecord
(
Long
wechatUserId
,
Long
officialAccountsId
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/applet/biz/impl/AppletRecordBizImpl.java
View file @
1f451baa
...
@@ -76,6 +76,7 @@ import org.springframework.stereotype.Service;
...
@@ -76,6 +76,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Iterator
;
import
java.util.Iterator
;
...
@@ -896,4 +897,24 @@ public class AppletRecordBizImpl implements AppletRecordBiz {
...
@@ -896,4 +897,24 @@ public class AppletRecordBizImpl implements AppletRecordBiz {
JedisClusterUtils
.
set
(
HANDLE_APPLET_RECORD_TYPE_CODE_STATUS_KEY
,
"stop"
,
3600
);
JedisClusterUtils
.
set
(
HANDLE_APPLET_RECORD_TYPE_CODE_STATUS_KEY
,
"stop"
,
3600
);
}
}
@Override
public
AppletRecordDTO
getLatestAppletRecord
(
Long
wechatUserId
,
Long
officialAccountsId
)
{
List
<
Long
>
wechatUserIds
=
readerConsr
.
getRelateUserIdList
(
wechatUserId
,
officialAccountsId
);
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
List
<
Integer
>
recordTypes
=
Arrays
.
asList
(
AppletRecordTypeEnum
.
APP
.
value
,
AppletRecordTypeEnum
.
PRODUCT
.
value
,
AppletRecordTypeEnum
.
BOOK
.
value
);
paramMap
.
put
(
"wechatUserIds"
,
wechatUserIds
);
paramMap
.
put
(
"recordTypes"
,
recordTypes
);
paramMap
.
put
(
"limit"
,
10
);
List
<
AppletRecordDTO
>
recordList
=
appletRecordServeDao
.
listAppletRecordLimit
(
paramMap
);
if
(
ListUtils
.
isEmpty
(
recordList
))
{
return
new
AppletRecordDTO
();
}
fillAppletRecord
(
recordList
,
YesOrNoNumEnum
.
NO
.
getValue
());
recordList
=
recordList
.
stream
().
filter
(
x
->
x
.
getSourceDelete
()
==
0
).
collect
(
Collectors
.
toList
());
if
(
ListUtils
.
isEmpty
(
recordList
))
{
return
new
AppletRecordDTO
();
}
return
recordList
.
get
(
0
);
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/applet/dao/AppletRecordServeDao.java
View file @
1f451baa
...
@@ -25,4 +25,6 @@ public interface AppletRecordServeDao extends BaseDao<AppletRecordServe> {
...
@@ -25,4 +25,6 @@ public interface AppletRecordServeDao extends BaseDao<AppletRecordServe> {
void
batchUpdate
(
List
<
AppletRecordDTO
>
recordList
);
void
batchUpdate
(
List
<
AppletRecordDTO
>
recordList
);
List
<
AppletRecordServe
>
getUserRecordListByType
(
Long
wechatUserId
,
Integer
recordType
);
List
<
AppletRecordServe
>
getUserRecordListByType
(
Long
wechatUserId
,
Integer
recordType
);
List
<
AppletRecordDTO
>
listAppletRecordLimit
(
Map
<
String
,
Object
>
map
);
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/applet/dao/impl/AppletRecordServeDaoImpl.java
View file @
1f451baa
...
@@ -51,4 +51,9 @@ public class AppletRecordServeDaoImpl extends BaseDaoImpl<AppletRecordServe> imp
...
@@ -51,4 +51,9 @@ public class AppletRecordServeDaoImpl extends BaseDaoImpl<AppletRecordServe> imp
paramMap
.
put
(
"recordType"
,
recordType
);
paramMap
.
put
(
"recordType"
,
recordType
);
return
getSessionTemplate
().
selectList
(
getStatement
(
"getUserRecordListByType"
),
paramMap
);
return
getSessionTemplate
().
selectList
(
getStatement
(
"getUserRecordListByType"
),
paramMap
);
}
}
@Override
public
List
<
AppletRecordDTO
>
listAppletRecordLimit
(
Map
<
String
,
Object
>
map
)
{
return
getSessionTemplate
().
selectList
(
getStatement
(
"listAppletRecordLimit"
),
map
);
}
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/applet/facade/AppletRecordFacade.java
View file @
1f451baa
...
@@ -162,4 +162,12 @@ public class AppletRecordFacade {
...
@@ -162,4 +162,12 @@ public class AppletRecordFacade {
return
new
ResponseDto
<>();
return
new
ResponseDto
<>();
}
}
@ApiOperation
(
"最近一条足迹"
)
@GetMapping
(
"getLatestAppletRecord"
)
public
ResponseDto
<?>
getLatestAppletRecord
(
@CookieValue
(
"userInfo"
)
String
userInfo
){
Long
wechatUserId
=
Cookie
.
getId
(
userInfo
,
Cookie
.
_WECHAT_USER_ID
);
Long
officialAccountsId
=
Cookie
.
getId
(
userInfo
,
Cookie
.
_OFFICIAL_ACCOUNTS_ID
);
return
new
ResponseDto
<>(
appletRecordBiz
.
getLatestAppletRecord
(
wechatUserId
,
officialAccountsId
));
}
}
}
\ No newline at end of file
pcloud-service-book/src/main/resources/mapper/applet/AppletRecordServe.Mapper.xml
View file @
1f451baa
...
@@ -290,4 +290,30 @@
...
@@ -290,4 +290,30 @@
is_delete = 0
is_delete = 0
order by create_time desc
order by create_time desc
</select>
</select>
<select
id=
"listAppletRecordLimit"
parameterType=
"map"
resultMap=
"com.pcloud.book.applet.dao.impl.AppletRecordDaoImpl.BaseResultMap4DTO"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM
`applet_record_serve`
WHERE
is_delete = 0
<if
test=
"wechatUserIds != null"
>
and wechat_user_id IN
<foreach
collection=
"wechatUserIds"
separator=
","
open=
"("
close=
")"
index=
"index"
item=
"wechatUserId"
>
${wechatUserId}
</foreach>
</if>
<if
test=
"recordTypes != null"
>
and record_type in
<foreach
collection=
"recordTypes"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
${item}
</foreach>
</if>
and
create_date
>
DATE_SUB(curdate(),INTERVAL 30 day)
ORDER BY
create_time DESC
limit #{limit}
</select>
</mapper>
</mapper>
\ No newline at end of file
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