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
cebf62ba
Commit
cebf62ba
authored
Sep 30, 2020
by
吴博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: [1003652] 第三方资源在书刊详情页引导显示价格和人数
parent
18bc3cd9
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
103 additions
and
15 deletions
+103
-15
AppletNewsBiz.java
...c/main/java/com/pcloud/book/applet/biz/AppletNewsBiz.java
+2
-0
AppletNewsBizImpl.java
...va/com/pcloud/book/applet/biz/impl/AppletNewsBizImpl.java
+5
-1
AppletNewsDTO.java
...c/main/java/com/pcloud/book/applet/dto/AppletNewsDTO.java
+6
-0
AppletNews.java
...c/main/java/com/pcloud/book/applet/entity/AppletNews.java
+6
-0
BookGroupBizImpl.java
...java/com/pcloud/book/group/biz/impl/BookGroupBizImpl.java
+4
-0
RightsSettingBizImpl.java
...oud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
+14
-1
RightsNowItem.java
...a/com/pcloud/book/rightsSetting/entity/RightsNowItem.java
+10
-0
AppletNews.xml
...vice-book/src/main/resources/mapper/applet/AppletNews.xml
+56
-13
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/applet/biz/AppletNewsBiz.java
View file @
cebf62ba
...
@@ -309,4 +309,6 @@ public interface AppletNewsBiz {
...
@@ -309,4 +309,6 @@ public interface AppletNewsBiz {
* @return
* @return
*/
*/
Map
<
Long
,
AppletNewsDTO
>
getByIds4Record
(
List
<
Long
>
newsIds
);
Map
<
Long
,
AppletNewsDTO
>
getByIds4Record
(
List
<
Long
>
newsIds
);
void
fillBrowseCount
(
List
<
AppletNewsDTO
>
recordList
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/applet/biz/impl/AppletNewsBizImpl.java
View file @
cebf62ba
...
@@ -549,6 +549,9 @@ public class AppletNewsBizImpl implements AppletNewsBiz {
...
@@ -549,6 +549,9 @@ public class AppletNewsBizImpl implements AppletNewsBiz {
//非第一页 获取第一页的数据 并排除
//非第一页 获取第一页的数据 并排除
pageBeanNew
=
getAppletNewsDTOPageBeanNew
(
currentPage
,
numPerPage
,
newsClassifyId
,
paramMap
,
subKey
);
pageBeanNew
=
getAppletNewsDTOPageBeanNew
(
currentPage
,
numPerPage
,
newsClassifyId
,
paramMap
,
subKey
);
}
}
if
(!
ListUtils
.
isEmpty
(
pageBeanNew
.
getRecordList
()))
{
fillBrowseCount
(
pageBeanNew
.
getRecordList
());
}
return
pageBeanNew
;
return
pageBeanNew
;
}
}
...
@@ -730,7 +733,8 @@ public class AppletNewsBizImpl implements AppletNewsBiz {
...
@@ -730,7 +733,8 @@ public class AppletNewsBizImpl implements AppletNewsBiz {
* 点击量浏览量
* 点击量浏览量
* * @param null
* * @param null
*/
*/
private
void
fillBrowseCount
(
List
<
AppletNewsDTO
>
recordList
)
{
@Override
public
void
fillBrowseCount
(
List
<
AppletNewsDTO
>
recordList
)
{
if
(
ListUtils
.
isEmpty
(
recordList
))
{
if
(
ListUtils
.
isEmpty
(
recordList
))
{
return
;
return
;
}
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/applet/dto/AppletNewsDTO.java
View file @
cebf62ba
...
@@ -145,4 +145,10 @@ public class AppletNewsDTO extends BaseDto {
...
@@ -145,4 +145,10 @@ public class AppletNewsDTO extends BaseDto {
private
String
cityCode
;
private
String
cityCode
;
@ApiModelProperty
(
"城市名"
)
@ApiModelProperty
(
"城市名"
)
private
String
city
;
private
String
city
;
@ApiModelProperty
(
"划线价"
)
private
String
crossedPrice
;
@ApiModelProperty
(
"评估价"
)
private
String
appraisalPrice
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/applet/entity/AppletNews.java
View file @
cebf62ba
...
@@ -112,4 +112,10 @@ public class AppletNews extends BaseTempletClassify {
...
@@ -112,4 +112,10 @@ public class AppletNews extends BaseTempletClassify {
@ApiModelProperty
(
"第三方资源"
)
@ApiModelProperty
(
"第三方资源"
)
List
<
AppletThirdResourcesRelation
>
thirdResourcesRelations
;
List
<
AppletThirdResourcesRelation
>
thirdResourcesRelations
;
@ApiModelProperty
(
"划线价"
)
private
String
crossedPrice
;
@ApiModelProperty
(
"评估价"
)
private
String
appraisalPrice
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/BookGroupBizImpl.java
View file @
cebf62ba
...
@@ -5229,6 +5229,10 @@ public class BookGroupBizImpl implements BookGroupBiz {
...
@@ -5229,6 +5229,10 @@ public class BookGroupBizImpl implements BookGroupBiz {
map
.
put
(
"coverImg"
,
bookDto
.
getCoverImg
());
map
.
put
(
"coverImg"
,
bookDto
.
getCoverImg
());
}
}
map
.
put
(
"isXIAORUI"
,
isXIAORUI
);
map
.
put
(
"isXIAORUI"
,
isXIAORUI
);
//资源数量
List
<
BookServeDTO
>
serveDTOList
=
this
.
getBookAndBookGroupServeIds
(
adviserId
,
bookId
,
channelId
);
this
.
removeCanNotBuy
(
serveDTOList
);
map
.
put
(
"resourceCount"
,
ListUtils
.
isEmpty
(
serveDTOList
)
?
0
:
serveDTOList
.
size
());
return
map
;
return
map
;
}
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
View file @
cebf62ba
...
@@ -1340,10 +1340,20 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
...
@@ -1340,10 +1340,20 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
Long
bookId
,
Integer
type
,
Long
officialAccountsId
)
{
Long
bookId
,
Integer
type
,
Long
officialAccountsId
)
{
FillRightsSettingAppletsDTO
applets
=
getFillRightsSettingApplets
(
rightsSettingId
,
wechatUserId
,
rightsClassifyId
,
top
,
bookId
,
officialAccountsId
);
FillRightsSettingAppletsDTO
applets
=
getFillRightsSettingApplets
(
rightsSettingId
,
wechatUserId
,
rightsClassifyId
,
top
,
bookId
,
officialAccountsId
);
List
<
AppletNews
>
news
=
applets
.
getDesignatedNews
();
List
<
AppletNews
>
news
=
applets
.
getDesignatedNews
();
if
(
ListUtils
.
isEmpty
(
news
))
{
return
;
}
List
<
AppletNewsDTO
>
appletNewsDTOList
=
new
ArrayList
<>();
BeanUtils
.
copyListProperties
(
news
,
appletNewsDTOList
,
AppletNewsDTO
.
class
);
appletNewsBiz
.
fillBrowseCount
(
appletNewsDTOList
);
Map
<
Long
,
Integer
>
newsBrowseCountMap
=
appletNewsDTOList
.
stream
().
collect
(
Collectors
.
toMap
(
AppletNewsDTO:
:
getId
,
AppletNewsDTO:
:
getBrowseCount
,(
key1
,
key2
)
->
key2
));
for
(
AppletNews
appletNews
:
news
)
{
for
(
AppletNews
appletNews
:
news
)
{
Integer
browseCount
=
MapUtils
.
isEmpty
(
newsBrowseCountMap
)
||
null
==
newsBrowseCountMap
.
get
(
appletNews
.
getId
())
?
0
:
newsBrowseCountMap
.
get
(
appletNews
.
getId
());
items
.
add
(
RightsNowItem
.
builder
().
serveId
(
appletNews
.
getId
()).
serveName
(
appletNews
.
getNewsName
()).
serveType
(
RightsServeTypeEnum
.
NEWS
.
name
())
items
.
add
(
RightsNowItem
.
builder
().
serveId
(
appletNews
.
getId
()).
serveName
(
appletNews
.
getNewsName
()).
serveType
(
RightsServeTypeEnum
.
NEWS
.
name
())
.
serveTypeName
(
"资讯"
).
servePic
(
appletNews
.
getPic1
()).
type
(
type
).
jumpType
(
appletNews
.
getJumpType
())
.
serveTypeName
(
"资讯"
).
servePic
(
appletNews
.
getPic1
()).
type
(
type
).
jumpType
(
appletNews
.
getJumpType
())
.
jumpUrl
(
appletNews
.
getJumpUrl
()).
newsType
(
appletNews
.
getType
()).
build
());
.
jumpUrl
(
appletNews
.
getJumpUrl
()).
newsType
(
appletNews
.
getType
()).
crossedPrice
(
appletNews
.
getCrossedPrice
()).
appraisalPrice
(
appletNews
.
getAppraisalPrice
()).
borwseCount
(
browseCount
).
build
());
}
}
}
}
...
@@ -1565,6 +1575,9 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
...
@@ -1565,6 +1575,9 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
item
.
setDigest
(
appletNewsDTO
.
getDigest
());
item
.
setDigest
(
appletNewsDTO
.
getDigest
());
item
.
setDigest
(
appletNewsDTO
.
getDigest
());
item
.
setDigest
(
appletNewsDTO
.
getDigest
());
item
.
setUrlNumber
(
appletNewsDTO
.
getUrlNumber
());
item
.
setUrlNumber
(
appletNewsDTO
.
getUrlNumber
());
item
.
setCrossedPrice
(
appletNewsDTO
.
getCrossedPrice
());
item
.
setAppraisalPrice
(
appletNewsDTO
.
getAppraisalPrice
());
item
.
setBorwseCount
(
appletNewsDTO
.
getBrowseCount
());
}
}
}
}
}
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/entity/RightsNowItem.java
View file @
cebf62ba
...
@@ -117,4 +117,14 @@ public class RightsNowItem extends BaseEntity {
...
@@ -117,4 +117,14 @@ public class RightsNowItem extends BaseEntity {
private
Boolean
hasThirdLink
;
private
Boolean
hasThirdLink
;
@ApiModelProperty
(
"跳转外链编号"
)
@ApiModelProperty
(
"跳转外链编号"
)
private
String
urlNumber
;
private
String
urlNumber
;
@ApiModelProperty
(
"划线价"
)
private
String
crossedPrice
;
@ApiModelProperty
(
"评估价"
)
private
String
appraisalPrice
;
@ApiModelProperty
(
"资讯浏览量"
)
private
Integer
borwseCount
;
}
}
pcloud-service-book/src/main/resources/mapper/applet/AppletNews.xml
View file @
cebf62ba
...
@@ -33,13 +33,16 @@
...
@@ -33,13 +33,16 @@
<result
column=
"business_card_type"
property=
"businessCardType"
jdbcType=
"TINYINT"
/>
<result
column=
"business_card_type"
property=
"businessCardType"
jdbcType=
"TINYINT"
/>
<result
column=
"business_card_isOpen"
property=
"businessCardIsOpen"
jdbcType=
"TINYINT"
/>
<result
column=
"business_card_isOpen"
property=
"businessCardIsOpen"
jdbcType=
"TINYINT"
/>
<result
column=
"city_code"
property=
"cityCode"
jdbcType=
"VARCHAR"
/>
<result
column=
"city_code"
property=
"cityCode"
jdbcType=
"VARCHAR"
/>
<result
column=
"agent_id"
property=
"agentId"
jdbcType=
"BIGINT"
/>
<result
column=
"crossed_price"
property=
"agentId"
jdbcType=
"VARCHAR"
/>
<result
column=
"appraisal_price"
property=
"appraisalPrice"
jdbcType=
"VARCHAR"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
news.id, news.news_name, news.source, news.news_classify_id, news.pro_label_id, news.dep_label_id, news.pur_label_id, news.type, news.digest,
news.id, news.news_name, news.source, news.news_classify_id, news.pro_label_id, news.dep_label_id, news.pur_label_id, news.type, news.digest,
pic1, pic2, pic3, news.content, show_state, news.create_time, news.update_time, news.first_classify, news.second_classify, news.grade_label_id, news.subject_label_id, news.rights_classify_id,
pic1, pic2, pic3, news.content, show_state, news.create_time, news.update_time, news.first_classify, news.second_classify, news.grade_label_id, news.subject_label_id, news.rights_classify_id,
news.jump_type, news.jump_url, news.url_number, news.custom_tag_id, news.show_source, news.show_link,news.business_card_id,news.business_card_type,news.business_card_isOpen,city_code,agent_id
news.jump_type, news.jump_url, news.url_number, news.custom_tag_id, news.show_source, news.show_link,news.business_card_id,news.business_card_type,news.business_card_isOpen,city_code,agent_id,
crossed_price,
appraisal_price
</sql>
</sql>
<sql
id=
"sql_news"
>
<sql
id=
"sql_news"
>
m.id,
m.id,
...
@@ -74,13 +77,17 @@
...
@@ -74,13 +77,17 @@
insert into applet_news(
insert into applet_news(
news_name, source, news_classify_id, pro_label_id, dep_label_id, pur_label_id, type, digest,
news_name, source, news_classify_id, pro_label_id, dep_label_id, pur_label_id, type, digest,
pic1, pic2, pic3, content, show_state, create_time, update_time , first_classify, second_classify, grade_label_id, subject_label_id, rights_classify_id,
pic1, pic2, pic3, content, show_state, create_time, update_time , first_classify, second_classify, grade_label_id, subject_label_id, rights_classify_id,
jump_type, jump_url,url_number, custom_tag_id, show_source, show_link,business_card_id,business_card_type,business_card_isOpen,city_code, agent_id
jump_type, jump_url,url_number, custom_tag_id, show_source, show_link,business_card_id,business_card_type,business_card_isOpen,city_code, agent_id,
crossed_price,
appraisal_price
)
)
values (
values (
#{newsName}, #{source}, #{newsClassifyId}, #{proLabelId}, #{depLabelId}, #{purLabelId}, #{type}, #{digest},
#{newsName}, #{source}, #{newsClassifyId}, #{proLabelId}, #{depLabelId}, #{purLabelId}, #{type}, #{digest},
#{pic1}, #{pic2}, #{pic3}, #{content}, #{showState}, NOW(), NOW(), #{firstClassify,jdbcType=BIGINT}, #{secondClassify,jdbcType=BIGINT},
#{pic1}, #{pic2}, #{pic3}, #{content}, #{showState}, NOW(), NOW(), #{firstClassify,jdbcType=BIGINT}, #{secondClassify,jdbcType=BIGINT},
#{gradeLabelId,jdbcType=BIGINT}, #{subjectLabelId,jdbcType=BIGINT}, #{rightsClassifyId,jdbcType=BIGINT},
#{gradeLabelId,jdbcType=BIGINT}, #{subjectLabelId,jdbcType=BIGINT}, #{rightsClassifyId,jdbcType=BIGINT},
#{jumpType}, #{jumpUrl}, #{urlNumber}, #{customTagId}, #{showSource}, #{showLink}, #{businessCardId}, #{businessCardType}, #{businessCardIsOpen}, #{cityCode}, #{agentId}
#{jumpType}, #{jumpUrl}, #{urlNumber}, #{customTagId}, #{showSource}, #{showLink}, #{businessCardId}, #{businessCardType}, #{businessCardIsOpen}, #{cityCode}, #{agentId},
#{crossedPrice},
#{appraisalPrice}
)
)
</insert>
</insert>
...
@@ -132,7 +139,13 @@
...
@@ -132,7 +139,13 @@
business_card_id = #{businessCardId},
business_card_id = #{businessCardId},
business_card_type = #{businessCardType},
business_card_type = #{businessCardType},
business_card_isOpen = #{businessCardIsOpen},
business_card_isOpen = #{businessCardIsOpen},
update_time=NOW()
update_time=NOW(),
<if
test=
"crossedPrice != null"
>
crossed_price = #{crossedPrice},
</if>
<if
test=
"appraisalPrice != null"
>
appraisal_price = #{appraisalPrice},
</if>
</set>
</set>
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</update>
...
@@ -326,7 +339,9 @@
...
@@ -326,7 +339,9 @@
n.jump_url jumpUrl,
n.jump_url jumpUrl,
n.url_number urlNumber,
n.url_number urlNumber,
n.show_source showSource,
n.show_source showSource,
n.show_link showLink
n.show_link showLink,
n.crossed_price crossedPrice,
n.appraisal_price appraisalPrice
FROM applet_news n
FROM applet_news n
LEFT JOIN applet_news_category category on n.id = category.applet_news_id
LEFT JOIN applet_news_category category on n.id = category.applet_news_id
WHERE 1=1
WHERE 1=1
...
@@ -550,7 +565,9 @@
...
@@ -550,7 +565,9 @@
n.jump_url jumpUrl,
n.jump_url jumpUrl,
n.url_number urlNumber,
n.url_number urlNumber,
n.show_source showSource,
n.show_source showSource,
n.show_link showLink
n.show_link showLink,
n.crossed_price crossedPrice,
n.appraisal_price appraisalPrice
FROM applet_news n
FROM applet_news n
LEFT JOIN applet_news_classify c ON n.news_classify_id=c.id
LEFT JOIN applet_news_classify c ON n.news_classify_id=c.id
LEFT JOIN rights_setting_classify d ON n.rights_classify_id = d.id
LEFT JOIN rights_setting_classify d ON n.rights_classify_id = d.id
...
@@ -617,13 +634,22 @@
...
@@ -617,13 +634,22 @@
n.jump_url jumpUrl,
n.jump_url jumpUrl,
n.url_number urlNumber,
n.url_number urlNumber,
n.show_source showSource,
n.show_source showSource,
n.show_link showLink
n.show_link showLink,
n.crossed_price crossedPrice,
n.appraisal_price appraisalPrice,
count(n.id) browseCount
FROM applet_news n
FROM applet_news n
left join
applet_link_click c on n.id = c.from_id
WHERE n.show_state = 1 and n.is_delete = 0
WHERE n.show_state = 1 and n.is_delete = 0
and
type_id = 1
AND record_type = 2
AND n.id IN
AND n.id IN
<foreach
collection=
"list"
item=
"item"
separator=
","
open=
"("
close=
")"
>
<foreach
collection=
"list"
item=
"item"
separator=
","
open=
"("
close=
")"
>
${item}
${item}
</foreach>
</foreach>
group by n.id
ORDER BY n.update_time DESC
ORDER BY n.update_time DESC
</select>
</select>
...
@@ -654,7 +680,9 @@
...
@@ -654,7 +680,9 @@
n.jump_type jumpType,
n.jump_type jumpType,
n.jump_url jumpUrl,
n.jump_url jumpUrl,
n.show_source showSource,
n.show_source showSource,
n.show_link showLink
n.show_link showLink,
n.crossed_price crossedPrice,
n.appraisal_price appraisalPrice
FROM applet_news n
FROM applet_news n
LEFT JOIN applet_news_classify c ON n.news_classify_id=c.id
LEFT JOIN applet_news_classify c ON n.news_classify_id=c.id
WHERE n.show_state = 1 and n.is_delete = 0
WHERE n.show_state = 1 and n.is_delete = 0
...
@@ -779,7 +807,9 @@
...
@@ -779,7 +807,9 @@
n.jump_url jumpUrl,
n.jump_url jumpUrl,
n.url_number urlNumber,
n.url_number urlNumber,
n.show_source showSource,
n.show_source showSource,
n.show_link showLink
n.show_link showLink,
n.crossed_price crossedPrice,
n.appraisal_price appraisalPrice
FROM applet_news n
FROM applet_news n
LEFT JOIN applet_news_category category on n.id = category.applet_news_id
LEFT JOIN applet_news_category category on n.id = category.applet_news_id
WHERE 1=1
WHERE 1=1
...
@@ -836,7 +866,9 @@
...
@@ -836,7 +866,9 @@
n.url_number urlNumber,
n.url_number urlNumber,
n.show_source showSource,
n.show_source showSource,
n.show_link showLink,
n.show_link showLink,
n.city_code cityCode
n.city_code cityCode,
n.crossed_price crossedPrice,
n.appraisal_price appraisalPrice
FROM
FROM
applet_news n
applet_news n
LEFT JOIN rights_setting_item_detail d ON d.serve_id = n.id
LEFT JOIN rights_setting_item_detail d ON d.serve_id = n.id
...
@@ -936,7 +968,9 @@
...
@@ -936,7 +968,9 @@
n.url_number urlNumber,
n.url_number urlNumber,
n.show_source showSource,
n.show_source showSource,
n.city_code cityCode,
n.city_code cityCode,
n.show_link showLink
n.show_link showLink,
n.crossed_price crossedPrice,
n.appraisal_price appraisalPrice
FROM applet_news n
FROM applet_news n
WHERE n.show_state = 1 and n.is_delete = 0
WHERE n.show_state = 1 and n.is_delete = 0
AND n.city_code = #{cityId}
AND n.city_code = #{cityId}
...
@@ -981,9 +1015,18 @@
...
@@ -981,9 +1015,18 @@
n.url_number urlNumber,
n.url_number urlNumber,
n.show_source showSource,
n.show_source showSource,
n.show_link showLink,
n.show_link showLink,
n.is_delete isDelete
n.is_delete isDelete,
n.crossed_price crossedPrice,
n.appraisal_price appraisalPrice,
count(n.id) browseCount
FROM applet_news n
FROM applet_news n
left join
applet_link_click c on n.id = c.from_id
WHERE
WHERE
type_id = 1
AND
record_type = 2
and
n.id IN
n.id IN
<foreach
collection=
"list"
item=
"item"
separator=
","
open=
"("
close=
")"
>
<foreach
collection=
"list"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
#{item}
...
...
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