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
8c843902
Commit
8c843902
authored
Dec 20, 2021
by
郑永强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: [1006277] H5落地页新增新的风格
parent
dca47acc
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
318 additions
and
48 deletions
+318
-48
PromotionConsr.java
...va/com/pcloud/book/consumer/promotion/PromotionConsr.java
+26
-0
ResourcePageBookstoreBiz.java
...a/com/pcloud/book/group/biz/ResourcePageBookstoreBiz.java
+3
-2
ResourcePageBizImpl.java
...a/com/pcloud/book/group/biz/impl/ResourcePageBizImpl.java
+88
-16
ResourcePageBookstoreBizImpl.java
...oud/book/group/biz/impl/ResourcePageBookstoreBizImpl.java
+38
-8
ResourcePageConstants.java
...com/pcloud/book/group/constant/ResourcePageConstants.java
+2
-1
ResourcePageBookstoreDao.java
...a/com/pcloud/book/group/dao/ResourcePageBookstoreDao.java
+2
-2
ResourcePageDao.java
.../main/java/com/pcloud/book/group/dao/ResourcePageDao.java
+1
-1
ResourcePageBookstoreDaoImpl.java
...oud/book/group/dao/impl/ResourcePageBookstoreDaoImpl.java
+13
-4
ResourcePageDaoImpl.java
...a/com/pcloud/book/group/dao/impl/ResourcePageDaoImpl.java
+2
-1
NavigationParamDTO.java
...in/java/com/pcloud/book/group/dto/NavigationParamDTO.java
+4
-0
ResourcePage.java
.../main/java/com/pcloud/book/group/entity/ResourcePage.java
+5
-0
ResourcePageBookstore.java
...a/com/pcloud/book/group/entity/ResourcePageBookstore.java
+3
-0
ResourcePageNavigation.java
.../com/pcloud/book/group/entity/ResourcePageNavigation.java
+48
-2
ResourcePageFixtureTypeEnum.java
.../pcloud/book/group/enums/ResourcePageFixtureTypeEnum.java
+15
-0
ResourcePageBookstoreVO.java
...ava/com/pcloud/book/group/vo/ResourcePageBookstoreVO.java
+9
-0
ResourcePageVO.java
...rc/main/java/com/pcloud/book/group/vo/ResourcePageVO.java
+7
-0
UpdateResourcePageVO.java
...n/java/com/pcloud/book/group/vo/UpdateResourcePageVO.java
+3
-0
ResourcePageBookstore.Mapper.xml
...n/resources/mapper/group/ResourcePageBookstore.Mapper.xml
+13
-1
ResourcePageDao.xml
...-book/src/main/resources/mapper/group/ResourcePageDao.xml
+10
-3
ResourcePageNavigationDao.xml
...main/resources/mapper/group/ResourcePageNavigationDao.xml
+26
-7
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/consumer/promotion/PromotionConsr.java
View file @
8c843902
package
com
.
pcloud
.
book
.
consumer
.
promotion
;
package
com
.
pcloud
.
book
.
consumer
.
promotion
;
import
cn.hutool.core.collection.CollUtil
;
import
com.pcloud.common.core.aspect.ParamLog
;
import
com.pcloud.common.core.aspect.ParamLog
;
import
com.pcloud.common.exceptions.BizException
;
import
com.pcloud.common.exceptions.BizException
;
import
com.pcloud.common.utils.ResponseHandleUtil
;
import
com.pcloud.common.utils.ResponseHandleUtil
;
import
com.pcloud.promotion.couponsnew.dto.CouponMapRequestDto
;
import
com.pcloud.promotion.couponsnew.dto.CouponsNewDto
;
import
com.pcloud.promotion.couponsnew.service.CouponsNewService
;
import
com.pcloud.promotion.fission.dto.UpdateQrDTO
;
import
com.pcloud.promotion.fission.dto.UpdateQrDTO
;
import
com.pcloud.promotion.groupFission.service.GroupFissionService
;
import
com.pcloud.promotion.groupFission.service.GroupFissionService
;
...
@@ -11,6 +15,10 @@ import org.slf4j.LoggerFactory;
...
@@ -11,6 +15,10 @@ import org.slf4j.LoggerFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@Component
(
"promotionConsr"
)
@Component
(
"promotionConsr"
)
public
class
PromotionConsr
{
public
class
PromotionConsr
{
/**
/**
...
@@ -21,6 +29,8 @@ public class PromotionConsr {
...
@@ -21,6 +29,8 @@ public class PromotionConsr {
@Autowired
@Autowired
private
GroupFissionService
groupFissionService
;
private
GroupFissionService
groupFissionService
;
@Autowired
private
CouponsNewService
couponsNewService
;
@ParamLog
(
"获取备用二维码"
)
@ParamLog
(
"获取备用二维码"
)
public
String
getSpareQr
()
throws
BizException
{
public
String
getSpareQr
()
throws
BizException
{
...
@@ -40,4 +50,20 @@ public class PromotionConsr {
...
@@ -40,4 +50,20 @@ public class PromotionConsr {
LOGGER
.
warn
(
"同步更新二维码失败:"
+
e
.
getMessage
(),
e
);
LOGGER
.
warn
(
"同步更新二维码失败:"
+
e
.
getMessage
(),
e
);
}
}
}
}
@ParamLog
(
"获取优惠券信息"
)
public
Map
<
Long
,
CouponsNewDto
>
mapByCouponIds
(
List
<
Long
>
couponsIds
,
Long
wechatUserId
)
throws
BizException
{
if
(
CollUtil
.
isEmpty
(
couponsIds
)){
return
new
HashMap
<>();
}
try
{
CouponMapRequestDto
dto
=
new
CouponMapRequestDto
();
dto
.
setCouponIds
(
couponsIds
);
dto
.
setWechatUserId
(
wechatUserId
);
return
ResponseHandleUtil
.
parseMap
(
couponsNewService
.
mapByCouponIds
(
dto
),
Long
.
class
,
CouponsNewDto
.
class
);
}
catch
(
Exception
e
)
{
LOGGER
.
warn
(
"同步更新二维码失败:"
+
e
.
getMessage
(),
e
);
}
return
new
HashMap
<>();
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/ResourcePageBookstoreBiz.java
View file @
8c843902
package
com
.
pcloud
.
book
.
group
.
biz
;
package
com
.
pcloud
.
book
.
group
.
biz
;
import
com.pcloud.book.group.entity.ResourcePageBookstore
;
import
com.pcloud.book.group.entity.ResourcePageBookstore
;
import
com.pcloud.book.group.enums.ResourcePageFixtureTypeEnum
;
import
com.pcloud.book.group.vo.ResourcePageBookstoreVO
;
import
com.pcloud.book.group.vo.ResourcePageBookstoreVO
;
import
com.pcloud.common.page.PageBeanNew
;
import
com.pcloud.common.page.PageBeanNew
;
import
java.util.List
;
import
java.util.List
;
...
@@ -43,7 +44,7 @@ public interface ResourcePageBookstoreBiz {
...
@@ -43,7 +44,7 @@ public interface ResourcePageBookstoreBiz {
*/
*/
void
deleteById
(
Long
id
);
void
deleteById
(
Long
id
);
void
deleteByResourcePageId
(
Long
resourcePageId
);
void
deleteByResourcePageId
(
Long
resourcePageId
,
Integer
fixtureType
);
List
<
ResourcePageBookstoreVO
>
getByResourcePageId
(
Long
resourcePageId
,
Long
channelId
);
List
<
ResourcePageBookstoreVO
>
getByResourcePageId
(
Long
resourcePageId
,
Long
channelId
,
Long
wechatUserId
,
ResourcePageFixtureTypeEnum
fixtureTypeEnum
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/ResourcePageBizImpl.java
View file @
8c843902
package
com
.
pcloud
.
book
.
group
.
biz
.
impl
;
package
com
.
pcloud
.
book
.
group
.
biz
.
impl
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.pcloud.advertising.advertising.dto.AdvertisingSpaceDTO
;
import
com.pcloud.advertising.advertising.dto.AdvertisingSpaceDTO
;
...
@@ -89,6 +90,7 @@ import com.pcloud.book.group.entity.ResourcePageTool;
...
@@ -89,6 +90,7 @@ import com.pcloud.book.group.entity.ResourcePageTool;
import
com.pcloud.book.group.entity.ResourcePageWxwork
;
import
com.pcloud.book.group.entity.ResourcePageWxwork
;
import
com.pcloud.book.group.entity.ResourceRecomManage
;
import
com.pcloud.book.group.entity.ResourceRecomManage
;
import
com.pcloud.book.group.enums.PageLandingPageTypeEnum
;
import
com.pcloud.book.group.enums.PageLandingPageTypeEnum
;
import
com.pcloud.book.group.enums.ResourcePageFixtureTypeEnum
;
import
com.pcloud.book.group.mapper.ResourcePageShareMapper
;
import
com.pcloud.book.group.mapper.ResourcePageShareMapper
;
import
com.pcloud.book.group.tools.SendWeixinRequestTools
;
import
com.pcloud.book.group.tools.SendWeixinRequestTools
;
import
com.pcloud.book.group.vo.CrmContactQrcodeVO
;
import
com.pcloud.book.group.vo.CrmContactQrcodeVO
;
...
@@ -175,6 +177,7 @@ import java.util.concurrent.ExecutionException;
...
@@ -175,6 +177,7 @@ import java.util.concurrent.ExecutionException;
import
java.util.concurrent.Future
;
import
java.util.concurrent.Future
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeoutException
;
import
java.util.concurrent.TimeoutException
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollUtil
;
...
@@ -861,15 +864,17 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
...
@@ -861,15 +864,17 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
}
}
// 加载实体书购买
// 加载实体书购买
this
.
fillBookStore
(
resourcePageVO
);
this
.
fillBookStore
(
resourcePageVO
);
// 加载固定项
this
.
fillFixture
(
resourcePageVO
);
//加载导航
//加载导航
this
.
fillNavigation
(
resourcePageVO
);
this
.
fillNavigation
(
resourcePageVO
,
null
);
return
resourcePageVO
;
return
resourcePageVO
;
}
}
/**
/**
* 加载导航
* 加载导航
*/
*/
private
void
fillNavigation
(
ResourcePageVO
resourcePageVO
)
{
private
void
fillNavigation
(
ResourcePageVO
resourcePageVO
,
Long
wechatUserId
)
{
if
(
resourcePageVO
==
null
||
resourcePageVO
.
getId
()
==
null
){
if
(
resourcePageVO
==
null
||
resourcePageVO
.
getId
()
==
null
){
return
;
return
;
}
}
...
@@ -881,21 +886,80 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
...
@@ -881,21 +886,80 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
this
.
addDefaultBookServeNavigation
(
resourcePageId
);
this
.
addDefaultBookServeNavigation
(
resourcePageId
);
navigations
=
resourcePageNavigationDao
.
getByPageId
(
resourcePageId
);
navigations
=
resourcePageNavigationDao
.
getByPageId
(
resourcePageId
);
}
}
// 加载跳转数据
this
.
fillCustomServe
(
navigations
,
wechatUserId
);
resourcePageVO
.
setNavigationList
(
navigations
);
resourcePageVO
.
setNavigationList
(
navigations
);
}
}
}
}
/**
/**
* 加载菜单跳转应用数据
*/
private
void
fillCustomServe
(
List
<
ResourcePageNavigation
>
navigations
,
Long
wechatUserId
)
{
if
(
CollUtil
.
isEmpty
(
navigations
)){
return
;
}
List
<
Long
>
appIds
=
navigations
.
stream
().
filter
(
x
->
ObjectUtil
.
equal
(
ResourcePageConstants
.
NavigationTypeEnum
.
CUSTOM_SERVE
.
getCode
(),
x
.
getNavigationType
())
&&
ObjectUtil
.
equal
(
"APP"
,
x
.
getServeType
())).
map
(
x
->
x
.
getServeId
()).
collect
(
Collectors
.
toList
());
if
(
CollUtil
.
isEmpty
(
appIds
)){
return
;
}
// 对象转换
List
<
ResourcePageItemVO
>
list
=
CollUtil
.
toList
();
for
(
ResourcePageNavigation
navigation
:
navigations
)
{
if
(
ObjectUtil
.
notEqual
(
ResourcePageConstants
.
NavigationTypeEnum
.
CUSTOM_SERVE
.
getCode
(),
navigation
.
getNavigationType
())
||
ObjectUtil
.
notEqual
(
"APP"
,
navigation
.
getServeType
())){
continue
;
}
ResourcePageItemVO
itemVO
=
new
ResourcePageItemVO
();
itemVO
.
setServeId
(
navigation
.
getServeId
());
itemVO
.
setServeType
(
navigation
.
getServeType
());
itemVO
.
setLinkUrl
(
navigation
.
getLinkUrl
());
itemVO
.
setTypeCode
(
navigation
.
getTypeCode
());
itemVO
.
setCreateUser
(
navigation
.
getCreateUser
());
list
.
add
(
itemVO
);
}
// 填充应用跳转信息
this
.
fillAppProductServe
(
list
,
wechatUserId
);
Map
<
Long
,
ResourcePageItemVO
>
itemVOMap
=
list
.
stream
().
collect
(
Collectors
.
toMap
(
x
->
x
.
getServeId
(),
Function
.
identity
(),
(
v1
,
v2
)
->
v1
));
// 填充参数
for
(
ResourcePageNavigation
navigation
:
navigations
)
{
if
(
ObjectUtil
.
notEqual
(
ResourcePageConstants
.
NavigationTypeEnum
.
CUSTOM_SERVE
.
getCode
(),
navigation
.
getNavigationType
())
||
ObjectUtil
.
notEqual
(
"APP"
,
navigation
.
getServeType
())
||
!
itemVOMap
.
containsKey
(
navigation
.
getServeId
())){
continue
;
}
ResourcePageItemVO
itemVO
=
itemVOMap
.
get
(
navigation
.
getServeId
());
navigation
.
setServeName
(
itemVO
.
getServeName
());
navigation
.
setServePic
(
itemVO
.
getServePic
());
navigation
.
setTypeCode
(
itemVO
.
getTypeCode
());
navigation
.
setTypeName
(
itemVO
.
getTypeName
());
navigation
.
setHasThirdLink
(
itemVO
.
getHasThirdLink
());
navigation
.
setHasOfficialAccountsTool
(
itemVO
.
getHasOfficialAccountsTool
());
navigation
.
setResultUrl
(
itemVO
.
getResultUrl
());
}
}
/**
* 加载实体书购买
* 加载实体书购买
*/
*/
private
void
fillBookStore
(
ResourcePageVO
resourcePageVO
)
{
private
void
fillBookStore
(
ResourcePageVO
resourcePageVO
)
{
if
(
resourcePageVO
==
null
||
resourcePageVO
.
getId
()
==
null
){
if
(
resourcePageVO
==
null
||
resourcePageVO
.
getId
()
==
null
){
return
;
return
;
}
}
List
<
ResourcePageBookstoreVO
>
resourcePageBookstoreList
=
resourcePageBookstoreBiz
.
getByResourcePageId
(
resourcePageVO
.
getId
(),
resourcePageVO
.
getChannelId
());
List
<
ResourcePageBookstoreVO
>
resourcePageBookstoreList
=
resourcePageBookstoreBiz
.
getByResourcePageId
(
resourcePageVO
.
getId
(),
resourcePageVO
.
getChannelId
()
,
null
,
ResourcePageFixtureTypeEnum
.
BOOKSTORE
);
resourcePageVO
.
setResourcePageBookstoreList
(
resourcePageBookstoreList
);
resourcePageVO
.
setResourcePageBookstoreList
(
resourcePageBookstoreList
);
}
}
/**
* 加载固定项
*/
private
void
fillFixture
(
ResourcePageVO
resourcePageVO
)
{
if
(
resourcePageVO
==
null
||
resourcePageVO
.
getId
()
==
null
){
return
;
}
List
<
ResourcePageBookstoreVO
>
resourcePageBookstoreList
=
resourcePageBookstoreBiz
.
getByResourcePageId
(
resourcePageVO
.
getId
(),
resourcePageVO
.
getChannelId
(),
null
,
ResourcePageFixtureTypeEnum
.
COUPONS
);
resourcePageVO
.
setResourcePageCouponList
(
resourcePageBookstoreList
);
}
@Override
@Override
public
List
<
ResourceColumnAndServeVO
>
getColumnAndServeListByPageId
(
Long
resourcePageId
,
Long
wechatUserId
,
Long
bookId
,
Long
adviserId
,
Long
channelId
,
Integer
enableAdverting
,
Long
navigationId
)
{
public
List
<
ResourceColumnAndServeVO
>
getColumnAndServeListByPageId
(
Long
resourcePageId
,
Long
wechatUserId
,
Long
bookId
,
Long
adviserId
,
Long
channelId
,
Integer
enableAdverting
,
Long
navigationId
)
{
/* //上邮临时处理方案
/* //上邮临时处理方案
...
@@ -1652,14 +1716,9 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
...
@@ -1652,14 +1716,9 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
}
}
// 更新实体书购买
// 更新实体书购买
List
<
ResourcePageBookstore
>
resourcePageBookstoreList
=
updateResourcePageVO
.
getResourcePageBookstoreList
();
this
.
updateResourcePageBookstore
(
resourcePageId
,
updateResourcePageVO
.
getResourcePageBookstoreList
(),
ResourcePageFixtureTypeEnum
.
BOOKSTORE
);
resourcePageBookstoreBiz
.
deleteByResourcePageId
(
resourcePageId
);
// 更新优惠券
if
(
CollUtil
.
isNotEmpty
(
resourcePageBookstoreList
)){
this
.
updateResourcePageBookstore
(
resourcePageId
,
updateResourcePageVO
.
getResourcePageCouponList
(),
ResourcePageFixtureTypeEnum
.
COUPONS
);
for
(
ResourcePageBookstore
bookstore
:
resourcePageBookstoreList
)
{
bookstore
.
setResourcePageId
(
resourcePageId
);
}
resourcePageBookstoreBiz
.
insert
(
resourcePageBookstoreList
);
}
//发送编辑任务queue
//发送编辑任务queue
adviserTaskConsr
.
sendAdviserTaskQueue
(
updateResourcePageVO
.
getCreateUser
(),
AdviserTaskConstants
.
TargetTypeEnum
.
QRCODE
.
getValue
(),
adviserTaskConsr
.
sendAdviserTaskQueue
(
updateResourcePageVO
.
getCreateUser
(),
AdviserTaskConstants
.
TargetTypeEnum
.
QRCODE
.
getValue
(),
...
@@ -1673,6 +1732,16 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
...
@@ -1673,6 +1732,16 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
return
resourcePageId
;
return
resourcePageId
;
}
}
private
void
updateResourcePageBookstore
(
Long
resourcePageId
,
List
<
ResourcePageBookstore
>
resourcePageBookstoreList
,
ResourcePageFixtureTypeEnum
fixtureTypeEnum
)
{
resourcePageBookstoreBiz
.
deleteByResourcePageId
(
resourcePageId
,
fixtureTypeEnum
.
fixtureType
);
if
(
CollUtil
.
isNotEmpty
(
resourcePageBookstoreList
))
{
for
(
ResourcePageBookstore
bookstore
:
resourcePageBookstoreList
)
{
bookstore
.
setResourcePageId
(
resourcePageId
);
}
resourcePageBookstoreBiz
.
insert
(
resourcePageBookstoreList
);
}
}
/**
/**
* 配置会员活动,发topic
* 配置会员活动,发topic
* @author:zhuyajie
* @author:zhuyajie
...
@@ -1726,13 +1795,15 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
...
@@ -1726,13 +1795,15 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
ResourcePageCollect
collect
=
resourcePageCollectDao
.
getCollectRecordByUser
(
wechatUserId
,
resourcePageVO
.
getId
());
ResourcePageCollect
collect
=
resourcePageCollectDao
.
getCollectRecordByUser
(
wechatUserId
,
resourcePageVO
.
getId
());
resourcePageVO
.
setCollectState
(
null
==
collect
?
0
:
1
);
resourcePageVO
.
setCollectState
(
null
==
collect
?
0
:
1
);
// 实体店铺
// 实体店铺
resourcePageVO
.
setResourcePageBookstoreList
(
resourcePageBookstoreBiz
.
getByResourcePageId
(
resourcePageVO
.
getId
(),
resourcePageVO
.
getChannelId
()));
resourcePageVO
.
setResourcePageBookstoreList
(
resourcePageBookstoreBiz
.
getByResourcePageId
(
resourcePageVO
.
getId
(),
resourcePageVO
.
getChannelId
(),
wechatUserId
,
ResourcePageFixtureTypeEnum
.
BOOKSTORE
));
// 优惠券
resourcePageVO
.
setResourcePageCouponList
(
resourcePageBookstoreBiz
.
getByResourcePageId
(
resourcePageVO
.
getId
(),
resourcePageVO
.
getChannelId
(),
wechatUserId
,
ResourcePageFixtureTypeEnum
.
COUPONS
));
}
}
if
(
null
!=
resourcePageVO
.
getAdviserId
())
{
if
(
null
!=
resourcePageVO
.
getAdviserId
())
{
resourcePageVO
.
setPushTextOpenStatus
(
qrcodeSceneConsr
.
getPushTextOpenStatus
(
resourcePageVO
.
getAdviserId
()));
resourcePageVO
.
setPushTextOpenStatus
(
qrcodeSceneConsr
.
getPushTextOpenStatus
(
resourcePageVO
.
getAdviserId
()));
}
}
//加载导航
//加载导航
this
.
fillNavigation
(
resourcePageVO
);
this
.
fillNavigation
(
resourcePageVO
,
wechatUserId
);
//加载企业微信落地页信息
//加载企业微信落地页信息
this
.
fillWxworkPage
(
resourcePageVO
);
this
.
fillWxworkPage
(
resourcePageVO
);
return
resourcePageVO
;
return
resourcePageVO
;
...
@@ -1840,6 +1911,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
...
@@ -1840,6 +1911,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
resourcePageVO
.
setWatermarkStyle
(
resourcePage
.
getWatermarkStyle
());
resourcePageVO
.
setWatermarkStyle
(
resourcePage
.
getWatermarkStyle
());
resourcePageVO
.
setLandingPageType
(
resourcePage
.
getLandingPageType
());
resourcePageVO
.
setLandingPageType
(
resourcePage
.
getLandingPageType
());
resourcePageVO
.
setTransparency
(
resourcePage
.
getTransparency
());
resourcePageVO
.
setTransparency
(
resourcePage
.
getTransparency
());
resourcePageVO
.
setNavigationJumpType
(
resourcePage
.
getNavigationJumpType
());
}
}
return
resourcePageVO
;
return
resourcePageVO
;
}
}
...
@@ -2788,8 +2860,8 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
...
@@ -2788,8 +2860,8 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
this
.
updateOwnMessage4Qr
(
null
==
resourcePage
?
null
:
resourcePage
.
getSceneId
());
this
.
updateOwnMessage4Qr
(
null
==
resourcePage
?
null
:
resourcePage
.
getSceneId
());
});
});
}
}
//修改导航样式,版式
//修改导航样式,版式
,菜单跳转模式
resourcePageDao
.
updateNavigationFormat
(
navigationParamDTO
.
getResourcePageId
(),
navigationParamDTO
.
getNavigationColor
(),
navigationParamDTO
.
getNavigationFormat
());
resourcePageDao
.
updateNavigationFormat
(
navigationParamDTO
.
getResourcePageId
(),
navigationParamDTO
.
getNavigationColor
(),
navigationParamDTO
.
getNavigationFormat
()
,
navigationParamDTO
.
getNavigationJumpType
()
);
}
}
private
void
checkNavigationList
(
NavigationParamDTO
navigationParamDTO
)
{
private
void
checkNavigationList
(
NavigationParamDTO
navigationParamDTO
)
{
...
@@ -3163,7 +3235,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
...
@@ -3163,7 +3235,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
this
.
deleteNavigation
(
id
);
this
.
deleteNavigation
(
id
);
}
}
}
}
resourcePageBookstoreBiz
.
deleteByResourcePageId
(
resourcePage
.
getId
());
resourcePageBookstoreBiz
.
deleteByResourcePageId
(
resourcePage
.
getId
()
,
null
);
}
}
});
});
}
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/ResourcePageBookstoreBizImpl.java
View file @
8c843902
...
@@ -5,19 +5,21 @@ import cn.hutool.core.util.ObjectUtil;
...
@@ -5,19 +5,21 @@ import cn.hutool.core.util.ObjectUtil;
import
com.pcloud.appcenter.app.dto.AppDto
;
import
com.pcloud.appcenter.app.dto.AppDto
;
import
com.pcloud.book.consumer.app.AppConsr
;
import
com.pcloud.book.consumer.app.AppConsr
;
import
com.pcloud.book.consumer.channel.QrcodeSceneConsr
;
import
com.pcloud.book.consumer.channel.QrcodeSceneConsr
;
import
com.pcloud.book.consumer.promotion.PromotionConsr
;
import
com.pcloud.book.consumer.resource.ProductConsr
;
import
com.pcloud.book.consumer.resource.ProductConsr
;
import
com.pcloud.book.group.entity.ResourcePageBookstore
;
import
com.pcloud.book.group.entity.ResourcePageBookstore
;
import
com.pcloud.book.group.dao.ResourcePageBookstoreDao
;
import
com.pcloud.book.group.dao.ResourcePageBookstoreDao
;
import
com.pcloud.book.group.biz.ResourcePageBookstoreBiz
;
import
com.pcloud.book.group.biz.ResourcePageBookstoreBiz
;
import
com.pcloud.book.group.enums.ResourcePageFixtureTypeEnum
;
import
com.pcloud.book.group.tools.SendWeixinRequestTools
;
import
com.pcloud.book.group.tools.SendWeixinRequestTools
;
import
com.pcloud.book.group.vo.ResourcePageBookstoreVO
;
import
com.pcloud.book.group.vo.ResourcePageBookstoreVO
;
import
com.pcloud.channelcenter.wechat.dto.AccountSettingDto
;
import
com.pcloud.channelcenter.wechat.dto.AccountSettingDto
;
import
com.pcloud.common.core.aspect.ParamLog
;
import
com.pcloud.common.page.PageBeanNew
;
import
com.pcloud.common.page.PageBeanNew
;
import
com.pcloud.common.page.PageParam
;
import
com.pcloud.common.page.PageParam
;
import
com.pcloud.common.exceptions.BizException
;
import
com.pcloud.common.exceptions.BizException
;
import
com.pcloud.common.utils.ListUtils
;
import
com.pcloud.common.utils.ListUtils
;
import
com.pcloud.common.utils.NumberUtil
;
import
com.pcloud.common.utils.NumberUtil
;
import
com.pcloud.promotion.couponsnew.dto.CouponsNewDto
;
import
com.pcloud.resourcecenter.product.dto.ProductDto
;
import
com.pcloud.resourcecenter.product.dto.ProductDto
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -46,6 +48,8 @@ public class ResourcePageBookstoreBizImpl implements ResourcePageBookstoreBiz {
...
@@ -46,6 +48,8 @@ public class ResourcePageBookstoreBizImpl implements ResourcePageBookstoreBiz {
private
ProductConsr
productConsr
;
private
ProductConsr
productConsr
;
@Autowired
@Autowired
private
QrcodeSceneConsr
qrcodeSceneConsr
;
private
QrcodeSceneConsr
qrcodeSceneConsr
;
@Autowired
private
PromotionConsr
promotionConsr
;
@Override
@Override
public
ResourcePageBookstore
getById
(
Long
id
)
{
public
ResourcePageBookstore
getById
(
Long
id
)
{
...
@@ -89,16 +93,43 @@ public class ResourcePageBookstoreBizImpl implements ResourcePageBookstoreBiz {
...
@@ -89,16 +93,43 @@ public class ResourcePageBookstoreBizImpl implements ResourcePageBookstoreBiz {
}
}
@Override
@Override
public
void
deleteByResourcePageId
(
Long
resourcePageId
)
{
public
void
deleteByResourcePageId
(
Long
resourcePageId
,
Integer
fixtureType
)
{
resourcePageBookstoreDao
.
deleteByResourcePageId
(
resourcePageId
);
resourcePageBookstoreDao
.
deleteByResourcePageId
(
resourcePageId
,
fixtureType
);
}
}
@Override
@Override
public
List
<
ResourcePageBookstoreVO
>
getByResourcePageId
(
Long
resourcePageId
,
Long
channelId
)
{
public
List
<
ResourcePageBookstoreVO
>
getByResourcePageId
(
Long
resourcePageId
,
Long
channelId
,
Long
wechatUserId
,
ResourcePageFixtureTypeEnum
fixtureTypeEnum
)
{
List
<
ResourcePageBookstoreVO
>
list
=
resourcePageBookstoreDao
.
getByResourcePageId
(
resourcePageId
);
List
<
ResourcePageBookstoreVO
>
list
=
resourcePageBookstoreDao
.
getByResourcePageId
(
resourcePageId
,
fixtureTypeEnum
.
fixtureType
);
if
(
CollUtil
.
isEmpty
(
list
)
||
channelId
==
null
){
if
(
CollUtil
.
isEmpty
(
list
)){
return
CollUtil
.
toList
();
return
CollUtil
.
toList
();
}
}
switch
(
fixtureTypeEnum
){
case
BOOKSTORE:
if
(
channelId
!=
null
){
this
.
fillBookstore
(
list
,
channelId
);
}
break
;
case
COUPONS:
this
.
fillCoupons
(
list
,
wechatUserId
);
break
;
}
return
CollUtil
.
defaultIfEmpty
(
list
,
CollUtil
.
toList
());
}
private
void
fillCoupons
(
List
<
ResourcePageBookstoreVO
>
list
,
Long
wechatUserId
)
{
List
<
Long
>
couponIds
=
list
.
stream
().
map
(
x
->
x
.
getServeId
()).
collect
(
Collectors
.
toList
());
Map
<
Long
,
CouponsNewDto
>
couponsNewMap
=
promotionConsr
.
mapByCouponIds
(
couponIds
,
wechatUserId
);
for
(
int
i
=
list
.
size
()
-
1
;
i
>=
0
;
i
--)
{
ResourcePageBookstoreVO
vo
=
list
.
get
(
i
);
CouponsNewDto
couponsNewDto
=
couponsNewMap
.
get
(
vo
.
getServeId
());
if
(
couponsNewDto
.
getState
()
==
-
1
){
list
.
remove
(
vo
);
}
vo
.
setCouponsNewDto
(
couponsNewDto
);
}
}
private
void
fillBookstore
(
List
<
ResourcePageBookstoreVO
>
list
,
Long
channelId
)
{
List
<
Long
>
appIds
=
list
.
stream
().
filter
(
x
->
ObjectUtil
.
equal
(
x
.
getServeType
(),
"APP"
)).
map
(
x
->
x
.
getServeId
()).
collect
(
Collectors
.
toList
());
List
<
Long
>
appIds
=
list
.
stream
().
filter
(
x
->
ObjectUtil
.
equal
(
x
.
getServeType
(),
"APP"
)).
map
(
x
->
x
.
getServeId
()).
collect
(
Collectors
.
toList
());
List
<
Long
>
productIds
=
list
.
stream
().
filter
(
x
->
ObjectUtil
.
equal
(
x
.
getServeType
(),
"PRODUCT"
)).
map
(
x
->
x
.
getServeId
()).
collect
(
Collectors
.
toList
());
List
<
Long
>
productIds
=
list
.
stream
().
filter
(
x
->
ObjectUtil
.
equal
(
x
.
getServeType
(),
"PRODUCT"
)).
map
(
x
->
x
.
getServeId
()).
collect
(
Collectors
.
toList
());
Map
<
Long
,
AppDto
>
appDtoMap
=
appConsr
.
getBaseByIds
(
appIds
);
Map
<
Long
,
AppDto
>
appDtoMap
=
appConsr
.
getBaseByIds
(
appIds
);
...
@@ -106,7 +137,7 @@ public class ResourcePageBookstoreBizImpl implements ResourcePageBookstoreBiz {
...
@@ -106,7 +137,7 @@ public class ResourcePageBookstoreBizImpl implements ResourcePageBookstoreBiz {
AccountSettingDto
accountSettingDto
=
qrcodeSceneConsr
.
getWechatInfo
(
channelId
);
AccountSettingDto
accountSettingDto
=
qrcodeSceneConsr
.
getWechatInfo
(
channelId
);
if
(
null
==
accountSettingDto
)
{
if
(
null
==
accountSettingDto
)
{
LOGGER
.
info
(
"未配置公众号"
);
LOGGER
.
info
(
"未配置公众号"
);
return
CollUtil
.
toList
()
;
return
;
}
}
for
(
ResourcePageBookstoreVO
vo
:
list
)
{
for
(
ResourcePageBookstoreVO
vo
:
list
)
{
if
(
ObjectUtil
.
equal
(
vo
.
getServeType
(),
"APP"
)){
if
(
ObjectUtil
.
equal
(
vo
.
getServeType
(),
"APP"
)){
...
@@ -134,6 +165,5 @@ public class ResourcePageBookstoreBizImpl implements ResourcePageBookstoreBiz {
...
@@ -134,6 +165,5 @@ public class ResourcePageBookstoreBizImpl implements ResourcePageBookstoreBiz {
vo
.
setResultUrl
(
SendWeixinRequestTools
.
splitUrl
(
accountSettingDto
,
vo
.
getLinkUrl
()));
vo
.
setResultUrl
(
SendWeixinRequestTools
.
splitUrl
(
accountSettingDto
,
vo
.
getLinkUrl
()));
}
}
}
}
return
list
;
}
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/constant/ResourcePageConstants.java
View file @
8c843902
...
@@ -343,7 +343,8 @@ public class ResourcePageConstants {
...
@@ -343,7 +343,8 @@ public class ResourcePageConstants {
BOOK_SERVE
(
1
,
"本书配套"
),
BOOK_SERVE
(
1
,
"本书配套"
),
APPLET_QA
(
2
,
"书友互助"
),
APPLET_QA
(
2
,
"书友互助"
),
CUSTOM
(
3
,
"自定义"
),
CUSTOM
(
3
,
"自定义"
),
CLOCK
(
4
,
"阅读打卡"
);
CLOCK
(
4
,
"阅读打卡"
),
CUSTOM_SERVE
(
5
,
"自定义服务跳转"
);
private
Integer
code
;
private
Integer
code
;
private
String
name
;
private
String
name
;
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/dao/ResourcePageBookstoreDao.java
View file @
8c843902
...
@@ -13,8 +13,8 @@ import java.util.List;
...
@@ -13,8 +13,8 @@ import java.util.List;
*/
*/
public
interface
ResourcePageBookstoreDao
extends
BaseDao
<
ResourcePageBookstore
>
{
public
interface
ResourcePageBookstoreDao
extends
BaseDao
<
ResourcePageBookstore
>
{
Integer
deleteByResourcePageId
(
Long
resourcePageId
);
Integer
deleteByResourcePageId
(
Long
resourcePageId
,
Integer
fixtureType
);
List
<
ResourcePageBookstoreVO
>
getByResourcePageId
(
Long
resourcePageId
);
List
<
ResourcePageBookstoreVO
>
getByResourcePageId
(
Long
resourcePageId
,
Integer
fixtureType
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/dao/ResourcePageDao.java
View file @
8c843902
...
@@ -120,5 +120,5 @@ public interface ResourcePageDao extends BaseDao<ResourcePage>{
...
@@ -120,5 +120,5 @@ public interface ResourcePageDao extends BaseDao<ResourcePage>{
* @date:2021/8/18 16:46
* @date:2021/8/18 16:46
* * @param null
* * @param null
*/
*/
void
updateNavigationFormat
(
Long
resourcePageId
,
Integer
navigationColor
,
Integer
navigationFormat
);
void
updateNavigationFormat
(
Long
resourcePageId
,
Integer
navigationColor
,
Integer
navigationFormat
,
Integer
navigationJumpType
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/dao/impl/ResourcePageBookstoreDaoImpl.java
View file @
8c843902
...
@@ -6,7 +6,10 @@ import com.pcloud.book.group.vo.ResourcePageBookstoreVO;
...
@@ -6,7 +6,10 @@ import com.pcloud.book.group.vo.ResourcePageBookstoreVO;
import
com.pcloud.common.core.dao.BaseDaoImpl
;
import
com.pcloud.common.core.dao.BaseDaoImpl
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 实体书购买(ResourcePageBookstore)表数据库访问层
* 实体书购买(ResourcePageBookstore)表数据库访问层
...
@@ -18,12 +21,18 @@ import java.util.List;
...
@@ -18,12 +21,18 @@ import java.util.List;
public
class
ResourcePageBookstoreDaoImpl
extends
BaseDaoImpl
<
ResourcePageBookstore
>
implements
ResourcePageBookstoreDao
{
public
class
ResourcePageBookstoreDaoImpl
extends
BaseDaoImpl
<
ResourcePageBookstore
>
implements
ResourcePageBookstoreDao
{
@Override
@Override
public
Integer
deleteByResourcePageId
(
Long
resourcePageId
)
{
public
Integer
deleteByResourcePageId
(
Long
resourcePageId
,
Integer
fixtureType
)
{
return
super
.
sqlSessionTemplate
.
delete
(
getStatement
(
"deleteByResourcePageId"
),
resourcePageId
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"resourcePageId"
,
resourcePageId
);
params
.
put
(
"fixtureType"
,
fixtureType
);
return
super
.
sqlSessionTemplate
.
delete
(
getStatement
(
"deleteByResourcePageId"
),
params
);
}
}
@Override
@Override
public
List
<
ResourcePageBookstoreVO
>
getByResourcePageId
(
Long
resourcePageId
)
{
public
List
<
ResourcePageBookstoreVO
>
getByResourcePageId
(
Long
resourcePageId
,
Integer
fixtureType
)
{
return
super
.
sqlSessionTemplate
.
selectList
(
getStatement
(
"getByResourcePageId"
),
resourcePageId
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"resourcePageId"
,
resourcePageId
);
params
.
put
(
"fixtureType"
,
fixtureType
);
return
super
.
sqlSessionTemplate
.
selectList
(
getStatement
(
"getByResourcePageId"
),
params
);
}
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/dao/impl/ResourcePageDaoImpl.java
View file @
8c843902
...
@@ -140,11 +140,12 @@ public class ResourcePageDaoImpl extends BaseDaoImpl<ResourcePage> implements Re
...
@@ -140,11 +140,12 @@ public class ResourcePageDaoImpl extends BaseDaoImpl<ResourcePage> implements Re
}
}
@Override
@Override
public
void
updateNavigationFormat
(
Long
resourcePageId
,
Integer
navigationColor
,
Integer
navigationFormat
)
{
public
void
updateNavigationFormat
(
Long
resourcePageId
,
Integer
navigationColor
,
Integer
navigationFormat
,
Integer
navigationJumpType
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"id"
,
resourcePageId
);
map
.
put
(
"id"
,
resourcePageId
);
map
.
put
(
"navigationColor"
,
navigationColor
);
map
.
put
(
"navigationColor"
,
navigationColor
);
map
.
put
(
"navigationFormat"
,
navigationFormat
);
map
.
put
(
"navigationFormat"
,
navigationFormat
);
map
.
put
(
"navigationJumpType"
,
navigationJumpType
);
getSessionTemplate
().
update
(
getStatement
(
"updateNavigationFormat"
),
map
);
getSessionTemplate
().
update
(
getStatement
(
"updateNavigationFormat"
),
map
);
}
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/dto/NavigationParamDTO.java
View file @
8c843902
...
@@ -37,4 +37,8 @@ public class NavigationParamDTO {
...
@@ -37,4 +37,8 @@ public class NavigationParamDTO {
* 导航版式
* 导航版式
*/
*/
private
Integer
navigationFormat
;
private
Integer
navigationFormat
;
/**
* 导航跳转模式
*/
private
Integer
navigationJumpType
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/entity/ResourcePage.java
View file @
8c843902
...
@@ -95,4 +95,9 @@ public class ResourcePage extends BaseEntity {
...
@@ -95,4 +95,9 @@ public class ResourcePage extends BaseEntity {
* 透明度
* 透明度
*/
*/
private
Integer
transparency
;
private
Integer
transparency
;
/**
* 导航使用场景;1:菜单切换;2:功能跳转
*/
private
Integer
navigationJumpType
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/entity/ResourcePageBookstore.java
View file @
8c843902
...
@@ -28,6 +28,9 @@ public class ResourcePageBookstore extends BaseEntity {
...
@@ -28,6 +28,9 @@ public class ResourcePageBookstore extends BaseEntity {
@ApiModelProperty
(
"资源页id"
)
@ApiModelProperty
(
"资源页id"
)
private
Long
resourcePageId
;
private
Long
resourcePageId
;
@ApiModelProperty
(
"固定项类型;1:书店;2:优惠券;"
)
private
Integer
fixtureType
;
@ApiModelProperty
(
"服务id"
)
@ApiModelProperty
(
"服务id"
)
private
Long
serveId
;
private
Long
serveId
;
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/entity/ResourcePageNavigation.java
View file @
8c843902
...
@@ -4,6 +4,7 @@ import com.pcloud.common.entity.BaseEntity;
...
@@ -4,6 +4,7 @@ import com.pcloud.common.entity.BaseEntity;
import
java.util.Date
;
import
java.util.Date
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
/**
/**
...
@@ -40,4 +41,50 @@ public class ResourcePageNavigation extends BaseEntity {
...
@@ -40,4 +41,50 @@ public class ResourcePageNavigation extends BaseEntity {
*/
*/
private
Long
createUser
;
private
Long
createUser
;
}
/**
\ No newline at end of file
* 服务id
*/
private
Long
serveId
;
/**
* 服务类型
*/
private
String
serveType
;
/**
* 资源类型
*/
private
String
typeCode
;
/**
* 链接地址
*/
private
String
linkUrl
;
/**
* 是否隐藏
*/
private
Integer
isHide
;
@ApiModelProperty
(
"应用或作品图片"
)
private
String
servePic
;
@ApiModelProperty
(
"应用或作品名称"
)
private
String
serveName
;
@ApiModelProperty
(
"应用或作品类型名称"
)
private
String
typeName
;
@ApiModelProperty
(
"是否第三方链接"
)
private
Boolean
hasThirdLink
;
@ApiModelProperty
(
"跳转结果链接"
)
private
String
resultUrl
;
@ApiModelProperty
(
"是否配置了公众号工具"
)
private
Boolean
hasOfficialAccountsTool
;
}
pcloud-service-book/src/main/java/com/pcloud/book/group/enums/ResourcePageFixtureTypeEnum.java
0 → 100644
View file @
8c843902
package
com
.
pcloud
.
book
.
group
.
enums
;
public
enum
ResourcePageFixtureTypeEnum
{
BOOKSTORE
(
1
,
"书店"
),
COUPONS
(
2
,
"优惠券"
);
public
final
Integer
fixtureType
;
public
final
String
desc
;
ResourcePageFixtureTypeEnum
(
Integer
fixtureType
,
String
desc
)
{
this
.
fixtureType
=
fixtureType
;
this
.
desc
=
desc
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/vo/ResourcePageBookstoreVO.java
View file @
8c843902
...
@@ -3,9 +3,11 @@ package com.pcloud.book.group.vo;
...
@@ -3,9 +3,11 @@ package com.pcloud.book.group.vo;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
com.pcloud.common.entity.BaseEntity
;
import
com.pcloud.common.entity.BaseEntity
;
import
com.pcloud.promotion.couponsnew.dto.CouponsNewDto
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
/**
/**
...
@@ -23,6 +25,9 @@ public class ResourcePageBookstoreVO {
...
@@ -23,6 +25,9 @@ public class ResourcePageBookstoreVO {
@ApiModelProperty
(
"资源页id"
)
@ApiModelProperty
(
"资源页id"
)
private
Long
resourcePageId
;
private
Long
resourcePageId
;
@ApiModelProperty
(
"固定资源类型"
)
private
Integer
fixtureType
;
@ApiModelProperty
(
"服务id"
)
@ApiModelProperty
(
"服务id"
)
private
Long
serveId
;
private
Long
serveId
;
...
@@ -52,4 +57,8 @@ public class ResourcePageBookstoreVO {
...
@@ -52,4 +57,8 @@ public class ResourcePageBookstoreVO {
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
createTime
;
private
Date
createTime
;
@ApiModelProperty
(
"优惠券对象"
)
private
CouponsNewDto
couponsNewDto
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/vo/ResourcePageVO.java
View file @
8c843902
...
@@ -95,6 +95,9 @@ public class ResourcePageVO extends BaseDto {
...
@@ -95,6 +95,9 @@ public class ResourcePageVO extends BaseDto {
@ApiModelProperty
(
"实体书购买"
)
@ApiModelProperty
(
"实体书购买"
)
private
List
<
ResourcePageBookstoreVO
>
resourcePageBookstoreList
;
private
List
<
ResourcePageBookstoreVO
>
resourcePageBookstoreList
;
@ApiModelProperty
(
"优惠券"
)
private
List
<
ResourcePageBookstoreVO
>
resourcePageCouponList
;
/**
/**
* 导航
* 导航
*/
*/
...
@@ -128,4 +131,8 @@ public class ResourcePageVO extends BaseDto {
...
@@ -128,4 +131,8 @@ public class ResourcePageVO extends BaseDto {
* 透明度
* 透明度
*/
*/
private
Integer
transparency
;
private
Integer
transparency
;
/**
* 导航使用场景;1:菜单切换;2:功能跳转
*/
private
Integer
navigationJumpType
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/vo/UpdateResourcePageVO.java
View file @
8c843902
...
@@ -63,6 +63,9 @@ public class UpdateResourcePageVO {
...
@@ -63,6 +63,9 @@ public class UpdateResourcePageVO {
@ApiModelProperty
(
"实体书购买"
)
@ApiModelProperty
(
"实体书购买"
)
private
List
<
ResourcePageBookstore
>
resourcePageBookstoreList
;
private
List
<
ResourcePageBookstore
>
resourcePageBookstoreList
;
@ApiModelProperty
(
"优惠券"
)
private
List
<
ResourcePageBookstore
>
resourcePageCouponList
;
/**
/**
* 字体颜色
* 字体颜色
*/
*/
...
...
pcloud-service-book/src/main/resources/mapper/group/ResourcePageBookstore.Mapper.xml
View file @
8c843902
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
<resultMap
id=
"BaseResultMap"
type=
"com.pcloud.book.group.entity.ResourcePageBookstore"
>
<resultMap
id=
"BaseResultMap"
type=
"com.pcloud.book.group.entity.ResourcePageBookstore"
>
<id
column=
"id"
property=
"id"
jdbcType=
"BIGINT"
/>
<id
column=
"id"
property=
"id"
jdbcType=
"BIGINT"
/>
<result
column=
"resource_page_id"
property=
"resourcePageId"
jdbcType=
"BIGINT"
/>
<result
column=
"resource_page_id"
property=
"resourcePageId"
jdbcType=
"BIGINT"
/>
<result
column=
"fixture_type"
property=
"fixtureType"
jdbcType=
"INTEGER"
/>
<result
column=
"serve_id"
property=
"serveId"
jdbcType=
"BIGINT"
/>
<result
column=
"serve_id"
property=
"serveId"
jdbcType=
"BIGINT"
/>
<result
column=
"serve_type"
property=
"serveType"
jdbcType=
"VARCHAR"
/>
<result
column=
"serve_type"
property=
"serveType"
jdbcType=
"VARCHAR"
/>
<result
column=
"link_url"
property=
"linkUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"link_url"
property=
"linkUrl"
jdbcType=
"VARCHAR"
/>
...
@@ -15,7 +16,7 @@
...
@@ -15,7 +16,7 @@
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, resource_page_id, serve_id, serve_type, link_url, create_time
id, resource_page_id,
fixture_type,
serve_id, serve_type, link_url, create_time
</sql>
</sql>
<select
id=
"getById"
resultMap=
"BaseResultMap"
>
<select
id=
"getById"
resultMap=
"BaseResultMap"
>
...
@@ -30,6 +31,7 @@
...
@@ -30,6 +31,7 @@
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
FROM resource_page_bookstore
FROM resource_page_bookstore
WHERE resource_page_id = #{resourcePageId}
WHERE resource_page_id = #{resourcePageId}
AND fixture_type = #{fixtureType}
</select>
</select>
<select
id=
"getList"
resultMap=
"BaseResultMap"
>
<select
id=
"getList"
resultMap=
"BaseResultMap"
>
...
@@ -41,12 +43,14 @@
...
@@ -41,12 +43,14 @@
<insert
id=
"insert"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
<insert
id=
"insert"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
INSERT INTO resource_page_bookstore(
INSERT INTO resource_page_bookstore(
resource_page_id,
resource_page_id,
fixture_type,
serve_id,
serve_id,
serve_type,
serve_type,
link_url,
link_url,
create_time
create_time
) VALUES (
) VALUES (
#{resourcePageId, jdbcType=BIGINT},
#{resourcePageId, jdbcType=BIGINT},
#{fixtureType, jdbcType=INTEGER},
#{serveId, jdbcType=BIGINT},
#{serveId, jdbcType=BIGINT},
#{serveType, jdbcType=VARCHAR},
#{serveType, jdbcType=VARCHAR},
#{linkUrl, jdbcType=VARCHAR},
#{linkUrl, jdbcType=VARCHAR},
...
@@ -57,6 +61,7 @@
...
@@ -57,6 +61,7 @@
<insert
id=
"batchInsert"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
<insert
id=
"batchInsert"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
INSERT INTO resource_page_bookstore (
INSERT INTO resource_page_bookstore (
resource_page_id,
resource_page_id,
fixture_type,
serve_id,
serve_id,
serve_type,
serve_type,
link_url,
link_url,
...
@@ -65,6 +70,7 @@
...
@@ -65,6 +70,7 @@
<foreach
collection=
"list"
item=
"item"
separator=
","
>
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(
(
#{item.resourcePageId, jdbcType=BIGINT},
#{item.resourcePageId, jdbcType=BIGINT},
#{item.fixtureType, jdbcType=INTEGER},
#{item.serveId, jdbcType=BIGINT},
#{item.serveId, jdbcType=BIGINT},
#{item.serveType, jdbcType=VARCHAR},
#{item.serveType, jdbcType=VARCHAR},
#{item.linkUrl, jdbcType=VARCHAR},
#{item.linkUrl, jdbcType=VARCHAR},
...
@@ -80,6 +86,9 @@
...
@@ -80,6 +86,9 @@
<if
test=
"resourcePageId != null"
>
<if
test=
"resourcePageId != null"
>
resource_page_id = #{resourcePageId},
resource_page_id = #{resourcePageId},
</if>
</if>
<if
test=
"fixtureType != null"
>
fixture_type = #{fixtureType},
</if>
<if
test=
"serveId != null"
>
<if
test=
"serveId != null"
>
serve_id = #{serveId},
serve_id = #{serveId},
</if>
</if>
...
@@ -101,6 +110,9 @@
...
@@ -101,6 +110,9 @@
<!--通过主键删除-->
<!--通过主键删除-->
<delete
id=
"deleteByResourcePageId"
>
<delete
id=
"deleteByResourcePageId"
>
DELETE FROM resource_page_bookstore WHERE resource_page_id = #{resourcePageId}
DELETE FROM resource_page_bookstore WHERE resource_page_id = #{resourcePageId}
<if
test=
"fixtureType != null"
>
AND fixture_type = #{fixtureType}
</if>
</delete>
</delete>
</mapper>
</mapper>
pcloud-service-book/src/main/resources/mapper/group/ResourcePageDao.xml
View file @
8c843902
...
@@ -26,12 +26,13 @@
...
@@ -26,12 +26,13 @@
<result
property=
"watermarkStyle"
column=
"watermark_style"
jdbcType=
"TINYINT"
/>
<result
property=
"watermarkStyle"
column=
"watermark_style"
jdbcType=
"TINYINT"
/>
<result
property=
"landingPageType"
column=
"landing_page_type"
jdbcType=
"INTEGER"
/>
<result
property=
"landingPageType"
column=
"landing_page_type"
jdbcType=
"INTEGER"
/>
<result
property=
"transparency"
column=
"transparency"
jdbcType=
"INTEGER"
/>
<result
property=
"transparency"
column=
"transparency"
jdbcType=
"INTEGER"
/>
<result
property=
"navigationJumpType"
column=
"navigation_jump_type"
jdbcType=
"INTEGER"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, book_group_id, style, show_book, open_rays, open_food, create_time, update_time, create_user, qrcode_url, scene_id, official_scene_id,
id, book_group_id, style, show_book, open_rays, open_food, create_time, update_time, create_user, qrcode_url, scene_id, official_scene_id,
book_cover, book_id, channel_id, background_img, navigation_color, navigation_format, font_color,watermark, watermark_style, landing_page_type
book_cover, book_id, channel_id, background_img, navigation_color, navigation_format, font_color,watermark, watermark_style, landing_page_type
,transparency
,transparency
, navigation_jump_type
</sql>
</sql>
<!--查询单个-->
<!--查询单个-->
...
@@ -46,9 +47,9 @@
...
@@ -46,9 +47,9 @@
<!--新增所有列-->
<!--新增所有列-->
<insert
id=
"insert"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
<insert
id=
"insert"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
insert into book.resource_page(book_group_id, style, show_book, open_rays, open_food, create_time, update_time, create_user,
insert into book.resource_page(book_group_id, style, show_book, open_rays, open_food, create_time, update_time, create_user,
qrcode_url, scene_id, book_cover, book_id, channel_id, background_img, font_color, watermark, watermark_style, landing_page_type, transparency)
qrcode_url, scene_id, book_cover, book_id, channel_id, background_img, font_color, watermark, watermark_style, landing_page_type, transparency
, navigation_jump_type
)
values (#{bookGroupId}, #{style}, #{showBook}, #{openRays}, IFNULL(#{openFood},0), now(), now(), #{createUser}, #{qrcodeUrl}, #{sceneId}, #{bookCover},
values (#{bookGroupId}, #{style}, #{showBook}, #{openRays}, IFNULL(#{openFood},0), now(), now(), #{createUser}, #{qrcodeUrl}, #{sceneId}, #{bookCover},
#{bookId}, #{channelId}, #{backgroundImg}, #{fontColor}, #{watermark}, #{watermarkStyle}, IFNULL(#{landingPageType},1), IFNULL(#{transparency},0))
#{bookId}, #{channelId}, #{backgroundImg}, #{fontColor}, #{watermark}, #{watermarkStyle}, IFNULL(#{landingPageType},1), IFNULL(#{transparency},0)
, IFNULL(#{navigationJumpType},0)
)
</insert>
</insert>
<!--通过主键修改数据-->
<!--通过主键修改数据-->
...
@@ -94,6 +95,9 @@
...
@@ -94,6 +95,9 @@
<if
test=
"transparency != null"
>
<if
test=
"transparency != null"
>
transparency = #{transparency},
transparency = #{transparency},
</if>
</if>
<if
test=
"navigationJumpType != null"
>
navigation_jump_type = #{navigationJumpType},
</if>
</set>
</set>
where id = #{id}
where id = #{id}
</update>
</update>
...
@@ -310,6 +314,9 @@
...
@@ -310,6 +314,9 @@
<if
test=
"navigationFormat != null"
>
<if
test=
"navigationFormat != null"
>
navigation_format = #{navigationFormat},
navigation_format = #{navigationFormat},
</if>
</if>
<if
test=
"navigationJumpType != null"
>
navigation_jump_type = #{navigationJumpType},
</if>
update_time = NOW(),
update_time = NOW(),
</set>
</set>
where id = #{id}
where id = #{id}
...
...
pcloud-service-book/src/main/resources/mapper/group/ResourcePageNavigationDao.xml
View file @
8c843902
...
@@ -9,13 +9,18 @@
...
@@ -9,13 +9,18 @@
<result
property=
"navigationName"
column=
"navigation_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"navigationName"
column=
"navigation_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"navigationIcon"
column=
"navigation_icon"
jdbcType=
"VARCHAR"
/>
<result
property=
"navigationIcon"
column=
"navigation_icon"
jdbcType=
"VARCHAR"
/>
<result
property=
"navigationSeq"
column=
"navigation_seq"
jdbcType=
"INTEGER"
/>
<result
property=
"navigationSeq"
column=
"navigation_seq"
jdbcType=
"INTEGER"
/>
<result
property=
"serveId"
column=
"serve_id"
jdbcType=
"INTEGER"
/>
<result
property=
"serveType"
column=
"serve_type"
jdbcType=
"INTEGER"
/>
<result
property=
"typeCode"
column=
"type_code"
jdbcType=
"INTEGER"
/>
<result
property=
"linkUrl"
column=
"link_url"
jdbcType=
"INTEGER"
/>
<result
property=
"isHide"
column=
"is_hide"
jdbcType=
"INTEGER"
/>
<result
property=
"createUser"
column=
"create_user"
jdbcType=
"INTEGER"
/>
<result
property=
"createUser"
column=
"create_user"
jdbcType=
"INTEGER"
/>
<result
property=
"createTime"
column=
"create_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"createTime"
column=
"create_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"updateTime"
column=
"update_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"updateTime"
column=
"update_time"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, resource_page_id, navigation_type, navigation_name, navigation_icon, navigation_seq
id, resource_page_id, navigation_type, navigation_name, navigation_icon, navigation_seq
, serve_id, serve_type, type_code, link_url, is_hide
</sql>
</sql>
<!--查询单个-->
<!--查询单个-->
<select
id=
"getById"
resultMap=
"ResourcePageNavigationMap"
>
<select
id=
"getById"
resultMap=
"ResourcePageNavigationMap"
>
...
@@ -27,15 +32,15 @@
...
@@ -27,15 +32,15 @@
<!--新增所有列-->
<!--新增所有列-->
<insert
id=
"insert"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
<insert
id=
"insert"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
insert into book.resource_page_navigation(resource_page_id, navigation_type, navigation_name, navigation_icon, navigation_seq, create_user, create_time, update_time)
insert into book.resource_page_navigation(resource_page_id, navigation_type, navigation_name, navigation_icon, navigation_seq, create_user,
serve_id, serve_type, type_code, link_url, is_hide,
create_time, update_time)
values (#{resourcePageId}, #{navigationType}, #{navigationName}, #{navigationIcon}, #{navigationSeq}, #{createUser}, now(), now())
values (#{resourcePageId}, #{navigationType}, #{navigationName}, #{navigationIcon}, #{navigationSeq}, #{createUser},
#{serveId}, #{serveType}, #{typeCode}, #{linkUrl}, IFNULL(#{isHide},0),
now(), now())
</insert>
</insert>
<insert
id=
"batchInsert"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
<insert
id=
"batchInsert"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
insert into book.resource_page_navigation(resource_page_id, navigation_type, navigation_name, navigation_icon, navigation_seq, create_user, create_time, update_time)
insert into book.resource_page_navigation(resource_page_id, navigation_type, navigation_name, navigation_icon, navigation_seq, create_user,
serve_id, serve_type, type_code, link_url, is_hide,
create_time, update_time)
values
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(#{item.resourcePageId}, #{item.navigationType}, #{item.navigationName}, #{item.navigationIcon}, #{item.navigationSeq}, #{item.createUser}, now(), now())
(#{item.resourcePageId}, #{item.navigationType}, #{item.navigationName}, #{item.navigationIcon}, #{item.navigationSeq}, #{item.createUser},
#{item.serveId}, #{item.serveType}, #{item.typeCode}, #{item.linkUrl}, IFNULL(#{item.isHide}, 0),
now(), now())
</foreach>
</foreach>
</insert>
</insert>
...
@@ -50,6 +55,21 @@
...
@@ -50,6 +55,21 @@
<if
test=
"navigationSeq != null"
>
<if
test=
"navigationSeq != null"
>
navigation_seq = #{navigationSeq},
navigation_seq = #{navigationSeq},
</if>
</if>
<if
test=
"serveId != null"
>
serve_id = #{serveId},
</if>
<if
test=
"serveType != null"
>
serve_type = #{serveType},
</if>
<if
test=
"typeCode != null"
>
type_code = #{typeCode},
</if>
<if
test=
"isHide != null"
>
is_hide = #{isHide},
</if>
<if
test=
"linkUrl != null"
>
link_url = #{linkUrl},
</if>
update_time = now(),
update_time = now(),
</set>
</set>
where id = #{id}
where id = #{id}
...
@@ -156,4 +176,4 @@
...
@@ -156,4 +176,4 @@
update_time = now()
update_time = now()
where id = #{id}
where id = #{id}
</update>
</update>
</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