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
8a6e617e
Commit
8a6e617e
authored
Jul 22, 2020
by
pansy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: [1003253]
parent
25c8c3d8
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
43 additions
and
17 deletions
+43
-17
AppletNewsBiz.java
...c/main/java/com/pcloud/book/applet/biz/AppletNewsBiz.java
+2
-1
AppletNewsBizImpl.java
...va/com/pcloud/book/applet/biz/impl/AppletNewsBizImpl.java
+15
-6
AppletLinkClickDao.java
...n/java/com/pcloud/book/applet/dao/AppletLinkClickDao.java
+2
-1
AppletLinkClickDaoImpl.java
...m/pcloud/book/applet/dao/impl/AppletLinkClickDaoImpl.java
+2
-1
AppletHomeFacade.java
.../java/com/pcloud/book/applet/facade/AppletHomeFacade.java
+4
-1
GiftCouponPackageBiz.java
.../com/pcloud/book/giftcoupon/biz/GiftCouponPackageBiz.java
+1
-1
GiftCouponPackageBizImpl.java
...ud/book/giftcoupon/biz/impl/GiftCouponPackageBizImpl.java
+7
-4
GiftCouponPackageFacade.java
...cloud/book/giftcoupon/facade/GiftCouponPackageFacade.java
+2
-1
AppletLinkClickMapper.xml
...rc/main/resources/mapper/applet/AppletLinkClickMapper.xml
+5
-1
AppletNews.xml
...vice-book/src/main/resources/mapper/applet/AppletNews.xml
+3
-0
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/applet/biz/AppletNewsBiz.java
View file @
8a6e617e
...
...
@@ -205,7 +205,8 @@ public interface AppletNewsBiz {
*/
PageBeanNew
<
AppletNewsDTO
>
listAppletNews4Analysis
(
Integer
currentPage
,
Integer
numPerPage
,
String
name
,
Long
firstClassify
,
Long
secondClassify
,
Long
gradeLabelId
,
Long
subjectLabelId
,
Integer
linkOnly
,
Long
rightsClassifyId
);
Long
subjectLabelId
,
Integer
linkOnly
,
Long
rightsClassifyId
,
String
source
,
Integer
browseQty
,
Integer
clickQty
);
/**
*
...
...
pcloud-service-book/src/main/java/com/pcloud/book/applet/biz/impl/AppletNewsBizImpl.java
View file @
8a6e617e
...
...
@@ -430,7 +430,7 @@ public class AppletNewsBizImpl implements AppletNewsBiz {
return
;
}
List
<
Long
>
newsIds
=
recordList
.
stream
().
filter
(
s
->
s
!=
null
).
map
(
AppletNewsDTO:
:
getId
).
distinct
().
collect
(
Collectors
.
toList
());
Map
<
Long
,
PvuvDTO
>
browseMap
=
appletLinkClickDao
.
mapPVUV
(
DataTypeEnum
.
news
.
code
,
DataRecordTypeEnum
.
browse
.
code
,
newsIds
);
Map
<
Long
,
PvuvDTO
>
browseMap
=
appletLinkClickDao
.
mapPVUV
(
DataTypeEnum
.
news
.
code
,
DataRecordTypeEnum
.
browse
.
code
,
newsIds
,
null
);
for
(
AppletNewsDTO
appletNewsDTO
:
recordList
)
{
Long
newsId
=
appletNewsDTO
.
getId
();
if
(!
MapUtils
.
isEmpty
(
browseMap
)
&&
browseMap
.
containsKey
(
newsId
))
{
...
...
@@ -604,7 +604,8 @@ public class AppletNewsBizImpl implements AppletNewsBiz {
}
@Override
public
PageBeanNew
<
AppletNewsDTO
>
listAppletNews4Analysis
(
Integer
currentPage
,
Integer
numPerPage
,
String
name
,
Long
firstClassify
,
Long
secondClassify
,
Long
gradeLabelId
,
Long
subjectLabelId
,
Integer
linkOnly
,
Long
rightsClassifyId
)
{
public
PageBeanNew
<
AppletNewsDTO
>
listAppletNews4Analysis
(
Integer
currentPage
,
Integer
numPerPage
,
String
name
,
Long
firstClassify
,
Long
secondClassify
,
Long
gradeLabelId
,
Long
subjectLabelId
,
Integer
linkOnly
,
Long
rightsClassifyId
,
String
source
,
Integer
browseQty
,
Integer
clickQty
)
{
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"name"
,
name
);
paramMap
.
put
(
"linkOnly"
,
linkOnly
);
...
...
@@ -625,13 +626,15 @@ public class AppletNewsBizImpl implements AppletNewsBiz {
paramMap
.
put
(
"gradeLabelId"
,
gradeLabelId
);
paramMap
.
put
(
"subjectLabelId"
,
subjectLabelId
);
}
paramMap
.
put
(
"source"
,
source
);
PageBeanNew
<
AppletNewsDTO
>
pageBeanNew
=
appletNewsDao
.
listPageNew
(
new
PageParam
(
currentPage
,
numPerPage
)
,
paramMap
,
"listAppletNews4Analysis"
);
if
(
null
==
pageBeanNew
||
ListUtils
.
isEmpty
(
pageBeanNew
.
getRecordList
())){
return
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
0
,
new
ArrayList
<>());
}
setLabelContent
(
pageBeanNew
.
getRecordList
());
fillStatistic
(
pageBeanNew
.
getRecordList
());
fillStatistic
(
pageBeanNew
.
getRecordList
()
,
browseQty
,
clickQty
);
return
pageBeanNew
;
}
...
...
@@ -641,13 +644,19 @@ public class AppletNewsBizImpl implements AppletNewsBiz {
* @date:2020/5/11 20:09
* * @param null
*/
private
void
fillStatistic
(
List
<
AppletNewsDTO
>
recordList
)
{
private
void
fillStatistic
(
List
<
AppletNewsDTO
>
recordList
,
Integer
browseQty
,
Integer
clickQty
)
{
if
(
ListUtils
.
isEmpty
(
recordList
))
{
return
;
}
if
(
null
!=
browseQty
&&
browseQty
.
intValue
()>
1
){
//等于1 值查询当天数据。大于1时,从昨天开始倒推7天,所以要+1
browseQty
+=
1
;
}
if
(
null
!=
clickQty
&&
clickQty
.
intValue
()
>
1
){
clickQty
+=
1
;
}
List
<
Long
>
newsIds
=
recordList
.
stream
().
filter
(
s
->
s
!=
null
).
map
(
AppletNewsDTO:
:
getId
).
distinct
().
collect
(
Collectors
.
toList
());
Map
<
Long
,
PvuvDTO
>
clickMap
=
appletLinkClickDao
.
mapPVUV
(
DataTypeEnum
.
news
.
code
,
DataRecordTypeEnum
.
click
.
code
,
newsIds
);
Map
<
Long
,
PvuvDTO
>
browseMap
=
appletLinkClickDao
.
mapPVUV
(
DataTypeEnum
.
news
.
code
,
DataRecordTypeEnum
.
browse
.
code
,
newsIds
);
Map
<
Long
,
PvuvDTO
>
clickMap
=
appletLinkClickDao
.
mapPVUV
(
DataTypeEnum
.
news
.
code
,
DataRecordTypeEnum
.
click
.
code
,
newsIds
,
clickQty
);
Map
<
Long
,
PvuvDTO
>
browseMap
=
appletLinkClickDao
.
mapPVUV
(
DataTypeEnum
.
news
.
code
,
DataRecordTypeEnum
.
browse
.
code
,
newsIds
,
browseQty
);
for
(
AppletNewsDTO
appletNewsDTO
:
recordList
)
{
Long
newsId
=
appletNewsDTO
.
getId
();
if
(!
MapUtils
.
isEmpty
(
clickMap
)
&&
clickMap
.
containsKey
(
newsId
))
{
...
...
pcloud-service-book/src/main/java/com/pcloud/book/applet/dao/AppletLinkClickDao.java
View file @
8a6e617e
...
...
@@ -21,8 +21,9 @@ public interface AppletLinkClickDao extends BaseDao<AppletLinkClick>{
* @author:zhuyajie
* @date:2020/5/12 10:44
* * @param null
* update: 增加参数intervalDaya(间隔天数) 2020/07/17 pansy
*/
Map
<
Long
,
PvuvDTO
>
mapPVUV
(
Integer
typeId
,
Integer
recordType
,
List
<
Long
>
fromIds
);
Map
<
Long
,
PvuvDTO
>
mapPVUV
(
Integer
typeId
,
Integer
recordType
,
List
<
Long
>
fromIds
,
Integer
intervalDaya
);
/**
* 优惠券使用量
* @author:zhuyajie
...
...
pcloud-service-book/src/main/java/com/pcloud/book/applet/dao/impl/AppletLinkClickDaoImpl.java
View file @
8a6e617e
...
...
@@ -22,11 +22,12 @@ import java.util.Map;
public
class
AppletLinkClickDaoImpl
extends
BaseDaoImpl
<
AppletLinkClick
>
implements
AppletLinkClickDao
{
@Override
public
Map
<
Long
,
PvuvDTO
>
mapPVUV
(
Integer
typeId
,
Integer
recordType
,
List
<
Long
>
fromIds
)
{
public
Map
<
Long
,
PvuvDTO
>
mapPVUV
(
Integer
typeId
,
Integer
recordType
,
List
<
Long
>
fromIds
,
Integer
intervalDaya
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"list"
,
fromIds
);
map
.
put
(
"recordType"
,
recordType
);
map
.
put
(
"typeId"
,
typeId
);
map
.
put
(
"intervalDaya"
,
intervalDaya
);
//
return
getSessionTemplate
().
selectMap
(
getStatement
(
"mapPVUV"
),
map
,
"fromId"
);
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/applet/facade/AppletHomeFacade.java
View file @
8a6e617e
...
...
@@ -720,6 +720,9 @@ public class AppletHomeFacade {
@RequestParam
(
value
=
"gradeLabelId"
,
required
=
false
)
@ApiParam
(
"年级标签"
)
Long
gradeLabelId
,
@RequestParam
(
value
=
"subjectLabelId"
,
required
=
false
)
@ApiParam
(
"科目标签"
)
Long
subjectLabelId
,
@RequestParam
(
value
=
"linkOnly"
,
required
=
false
)
@ApiParam
(
"只看第三方"
)
Integer
linkOnly
,
@RequestParam
(
value
=
"source"
,
required
=
false
)
@ApiParam
(
"来源"
)
String
source
,
@RequestParam
(
value
=
"browseQty"
,
required
=
false
)
@ApiParam
(
"浏览量"
)
Integer
browseQty
,
@RequestParam
(
value
=
"clickQty"
,
required
=
false
)
@ApiParam
(
"点击量"
)
Integer
clickQty
,
@RequestParam
(
value
=
"rightsClassifyId"
,
required
=
false
)
@ApiParam
(
"权益分类"
)
Long
rightsClassifyId
)
throws
PermissionException
{
SessionUtil
.
getInfoToken4Redis
(
token
);
...
...
@@ -727,7 +730,7 @@ public class AppletHomeFacade {
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"缺少分页参数"
);
}
return
new
ResponseDto
<>(
appletNewsBiz
.
listAppletNews4Analysis
(
currentPage
,
numPerPage
,
name
,
firstClassify
,
secondClassify
,
gradeLabelId
,
subjectLabelId
,
linkOnly
,
rightsClassifyId
));
subjectLabelId
,
linkOnly
,
rightsClassifyId
,
source
,
browseQty
,
clickQty
));
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/giftcoupon/biz/GiftCouponPackageBiz.java
View file @
8a6e617e
...
...
@@ -40,5 +40,5 @@ public interface GiftCouponPackageBiz {
* @date:2020/5/11 19:29
* * @param null
*/
PageBeanNew
<
GiftPackageDTO
>
listGiftPackage4Analysis
(
String
title
,
Integer
state
,
Integer
couponType
,
Integer
currentPage
,
Integer
numPerPage
,
Integer
linkOnly
);
PageBeanNew
<
GiftPackageDTO
>
listGiftPackage4Analysis
(
String
title
,
Integer
state
,
Integer
couponType
,
Integer
currentPage
,
Integer
numPerPage
,
Integer
linkOnly
,
Integer
clickQty
);
}
pcloud-service-book/src/main/java/com/pcloud/book/giftcoupon/biz/impl/GiftCouponPackageBizImpl.java
View file @
8a6e617e
...
...
@@ -212,7 +212,7 @@ public class GiftCouponPackageBizImpl implements GiftCouponPackageBiz {
}
@Override
public
PageBeanNew
<
GiftPackageDTO
>
listGiftPackage4Analysis
(
String
title
,
Integer
state
,
Integer
couponType
,
Integer
currentPage
,
Integer
numPerPage
,
Integer
linkOnly
)
{
public
PageBeanNew
<
GiftPackageDTO
>
listGiftPackage4Analysis
(
String
title
,
Integer
state
,
Integer
couponType
,
Integer
currentPage
,
Integer
numPerPage
,
Integer
linkOnly
,
Integer
clickQty
)
{
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"title"
,
title
);
paramMap
.
put
(
"state"
,
state
);
...
...
@@ -223,7 +223,7 @@ public class GiftCouponPackageBizImpl implements GiftCouponPackageBiz {
return
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
new
ArrayList
<>());
}
buildReceiveNum
(
pageBeanNew
.
getRecordList
());
fillUseAnalysis
(
pageBeanNew
.
getRecordList
());
fillUseAnalysis
(
pageBeanNew
.
getRecordList
()
,
clickQty
);
return
pageBeanNew
;
}
...
...
@@ -233,12 +233,15 @@ public class GiftCouponPackageBizImpl implements GiftCouponPackageBiz {
* @date:2020/5/11 19:43
* * @param null
*/
private
void
fillUseAnalysis
(
List
<
GiftPackageDTO
>
recordList
)
{
private
void
fillUseAnalysis
(
List
<
GiftPackageDTO
>
recordList
,
Integer
clickQty
)
{
if
(
ListUtils
.
isEmpty
(
recordList
)){
return
;
}
if
(
null
!=
clickQty
&&
clickQty
.
intValue
()
>
1
){
clickQty
+=
1
;
}
List
<
Long
>
ids
=
recordList
.
stream
().
filter
(
s
->
s
!=
null
).
map
(
GiftPackageDTO:
:
getId
).
distinct
().
collect
(
Collectors
.
toList
());
Map
<
Long
,
PvuvDTO
>
clickMap
=
appletLinkClickDao
.
mapPVUV
(
DataTypeEnum
.
gift_coupon
.
code
,
DataRecordTypeEnum
.
click
.
code
,
ids
);
Map
<
Long
,
PvuvDTO
>
clickMap
=
appletLinkClickDao
.
mapPVUV
(
DataTypeEnum
.
gift_coupon
.
code
,
DataRecordTypeEnum
.
click
.
code
,
ids
,
clickQty
);
Map
<
Long
,
PvuvDTO
>
useMap
=
appletLinkClickDao
.
mapCouponUseCount
(
ids
);
for
(
GiftPackageDTO
giftPackageDTO
:
recordList
)
{
Long
id
=
giftPackageDTO
.
getId
();
...
...
pcloud-service-book/src/main/java/com/pcloud/book/giftcoupon/facade/GiftCouponPackageFacade.java
View file @
8a6e617e
...
...
@@ -162,10 +162,11 @@ public class GiftCouponPackageFacade {
@RequestParam
(
value
=
"couponType"
,
required
=
false
)
@ApiParam
(
"券类型"
)
Integer
couponType
,
@RequestParam
(
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
"numPerPage"
)
Integer
numPerPage
,
@RequestParam
(
value
=
"clickQty"
,
required
=
false
)
@ApiParam
(
"点击量"
)
Integer
clickQty
,
@RequestParam
(
value
=
"linkOnly"
,
required
=
false
)
@ApiParam
(
"只看第三方"
)
Integer
linkOnly
)
throws
BizException
,
PermissionException
{
SessionUtil
.
getInfoToken4Redis
(
token
);
return
new
ResponseDto
<>(
giftCouponPackageBiz
.
listGiftPackage4Analysis
(
title
,
state
,
couponType
,
currentPage
,
numPerPage
,
linkOnly
));
return
new
ResponseDto
<>(
giftCouponPackageBiz
.
listGiftPackage4Analysis
(
title
,
state
,
couponType
,
currentPage
,
numPerPage
,
linkOnly
,
clickQty
));
}
}
pcloud-service-book/src/main/resources/mapper/applet/AppletLinkClickMapper.xml
View file @
8a6e617e
...
...
@@ -21,7 +21,8 @@
SELECT
from_id fromId,
COUNT(1) pv,
COUNT(DISTINCT wechat_user_id,create_date) uv
-- COUNT(DISTINCT wechat_user_id,create_date) uv
COUNT(DISTINCT wechat_user_id) uv
FROM applet_link_click
WHERE type_id = #{typeId}
AND record_type = #{recordType}
...
...
@@ -29,6 +30,9 @@
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
close=
")"
open=
"("
>
#{item}
</foreach>
<if
test=
"intervalDaya != null"
>
AND create_date between DATE_SUB(CURDATE(),INTERVAL #{intervalDaya} DAY) and DATE_SUB(CURDATE(),INTERVAL 1 DAY)
</if>
GROUP BY from_id
</select>
...
...
pcloud-service-book/src/main/resources/mapper/applet/AppletNews.xml
View file @
8a6e617e
...
...
@@ -403,6 +403,9 @@
<if
test=
"rightsClassifyId!=null"
>
AND n.rights_classify_id =#{rightsClassifyId}
</if>
<if
test=
"source!=null"
>
AND n.source =#{source}
</if>
ORDER BY n.create_time DESC
</select>
...
...
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