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
Expand all
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
;
import
cn.hutool.core.collection.CollUtil
;
import
com.pcloud.common.core.aspect.ParamLog
;
import
com.pcloud.common.exceptions.BizException
;
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.groupFission.service.GroupFissionService
;
...
...
@@ -11,6 +15,10 @@ import org.slf4j.LoggerFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@Component
(
"promotionConsr"
)
public
class
PromotionConsr
{
/**
...
...
@@ -21,6 +29,8 @@ public class PromotionConsr {
@Autowired
private
GroupFissionService
groupFissionService
;
@Autowired
private
CouponsNewService
couponsNewService
;
@ParamLog
(
"获取备用二维码"
)
public
String
getSpareQr
()
throws
BizException
{
...
...
@@ -40,4 +50,20 @@ public class PromotionConsr {
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
;
import
com.pcloud.book.group.entity.ResourcePageBookstore
;
import
com.pcloud.book.group.enums.ResourcePageFixtureTypeEnum
;
import
com.pcloud.book.group.vo.ResourcePageBookstoreVO
;
import
com.pcloud.common.page.PageBeanNew
;
import
java.util.List
;
...
...
@@ -43,7 +44,7 @@ public interface ResourcePageBookstoreBiz {
*/
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
This diff is collapsed.
Click to expand it.
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;
import
com.pcloud.appcenter.app.dto.AppDto
;
import
com.pcloud.book.consumer.app.AppConsr
;
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.group.entity.ResourcePageBookstore
;
import
com.pcloud.book.group.dao.ResourcePageBookstoreDao
;
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.vo.ResourcePageBookstoreVO
;
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.PageParam
;
import
com.pcloud.common.exceptions.BizException
;
import
com.pcloud.common.utils.ListUtils
;
import
com.pcloud.common.utils.NumberUtil
;
import
com.pcloud.promotion.couponsnew.dto.CouponsNewDto
;
import
com.pcloud.resourcecenter.product.dto.ProductDto
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -46,6 +48,8 @@ public class ResourcePageBookstoreBizImpl implements ResourcePageBookstoreBiz {
private
ProductConsr
productConsr
;
@Autowired
private
QrcodeSceneConsr
qrcodeSceneConsr
;
@Autowired
private
PromotionConsr
promotionConsr
;
@Override
public
ResourcePageBookstore
getById
(
Long
id
)
{
...
...
@@ -89,16 +93,43 @@ public class ResourcePageBookstoreBizImpl implements ResourcePageBookstoreBiz {
}
@Override
public
void
deleteByResourcePageId
(
Long
resourcePageId
)
{
resourcePageBookstoreDao
.
deleteByResourcePageId
(
resourcePageId
);
public
void
deleteByResourcePageId
(
Long
resourcePageId
,
Integer
fixtureType
)
{
resourcePageBookstoreDao
.
deleteByResourcePageId
(
resourcePageId
,
fixtureType
);
}
@Override
public
List
<
ResourcePageBookstoreVO
>
getByResourcePageId
(
Long
resourcePageId
,
Long
channelId
)
{
List
<
ResourcePageBookstoreVO
>
list
=
resourcePageBookstoreDao
.
getByResourcePageId
(
resourcePageId
);
if
(
CollUtil
.
isEmpty
(
list
)
||
channelId
==
null
){
public
List
<
ResourcePageBookstoreVO
>
getByResourcePageId
(
Long
resourcePageId
,
Long
channelId
,
Long
wechatUserId
,
ResourcePageFixtureTypeEnum
fixtureTypeEnum
)
{
List
<
ResourcePageBookstoreVO
>
list
=
resourcePageBookstoreDao
.
getByResourcePageId
(
resourcePageId
,
fixtureTypeEnum
.
fixtureType
);
if
(
CollUtil
.
isEmpty
(
list
)){
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
>
productIds
=
list
.
stream
().
filter
(
x
->
ObjectUtil
.
equal
(
x
.
getServeType
(),
"PRODUCT"
)).
map
(
x
->
x
.
getServeId
()).
collect
(
Collectors
.
toList
());
Map
<
Long
,
AppDto
>
appDtoMap
=
appConsr
.
getBaseByIds
(
appIds
);
...
...
@@ -106,7 +137,7 @@ public class ResourcePageBookstoreBizImpl implements ResourcePageBookstoreBiz {
AccountSettingDto
accountSettingDto
=
qrcodeSceneConsr
.
getWechatInfo
(
channelId
);
if
(
null
==
accountSettingDto
)
{
LOGGER
.
info
(
"未配置公众号"
);
return
CollUtil
.
toList
()
;
return
;
}
for
(
ResourcePageBookstoreVO
vo
:
list
)
{
if
(
ObjectUtil
.
equal
(
vo
.
getServeType
(),
"APP"
)){
...
...
@@ -134,6 +165,5 @@ public class ResourcePageBookstoreBizImpl implements ResourcePageBookstoreBiz {
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 {
BOOK_SERVE
(
1
,
"本书配套"
),
APPLET_QA
(
2
,
"书友互助"
),
CUSTOM
(
3
,
"自定义"
),
CLOCK
(
4
,
"阅读打卡"
);
CLOCK
(
4
,
"阅读打卡"
),
CUSTOM_SERVE
(
5
,
"自定义服务跳转"
);
private
Integer
code
;
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;
*/
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>{
* @date:2021/8/18 16:46
* * @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;
import
com.pcloud.common.core.dao.BaseDaoImpl
;
import
org.springframework.stereotype.Repository
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 实体书购买(ResourcePageBookstore)表数据库访问层
...
...
@@ -18,12 +21,18 @@ import java.util.List;
public
class
ResourcePageBookstoreDaoImpl
extends
BaseDaoImpl
<
ResourcePageBookstore
>
implements
ResourcePageBookstoreDao
{
@Override
public
Integer
deleteByResourcePageId
(
Long
resourcePageId
)
{
return
super
.
sqlSessionTemplate
.
delete
(
getStatement
(
"deleteByResourcePageId"
),
resourcePageId
);
public
Integer
deleteByResourcePageId
(
Long
resourcePageId
,
Integer
fixtureType
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"resourcePageId"
,
resourcePageId
);
params
.
put
(
"fixtureType"
,
fixtureType
);
return
super
.
sqlSessionTemplate
.
delete
(
getStatement
(
"deleteByResourcePageId"
),
params
);
}
@Override
public
List
<
ResourcePageBookstoreVO
>
getByResourcePageId
(
Long
resourcePageId
)
{
return
super
.
sqlSessionTemplate
.
selectList
(
getStatement
(
"getByResourcePageId"
),
resourcePageId
);
public
List
<
ResourcePageBookstoreVO
>
getByResourcePageId
(
Long
resourcePageId
,
Integer
fixtureType
)
{
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
}
@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
.
put
(
"id"
,
resourcePageId
);
map
.
put
(
"navigationColor"
,
navigationColor
);
map
.
put
(
"navigationFormat"
,
navigationFormat
);
map
.
put
(
"navigationJumpType"
,
navigationJumpType
);
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 {
* 导航版式
*/
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 {
* 透明度
*/
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 {
@ApiModelProperty
(
"资源页id"
)
private
Long
resourcePageId
;
@ApiModelProperty
(
"固定项类型;1:书店;2:优惠券;"
)
private
Integer
fixtureType
;
@ApiModelProperty
(
"服务id"
)
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;
import
java.util.Date
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
...
...
@@ -40,4 +41,50 @@ public class ResourcePageNavigation extends BaseEntity {
*/
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;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
com.pcloud.common.entity.BaseEntity
;
import
com.pcloud.promotion.couponsnew.dto.CouponsNewDto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
...
...
@@ -23,6 +25,9 @@ public class ResourcePageBookstoreVO {
@ApiModelProperty
(
"资源页id"
)
private
Long
resourcePageId
;
@ApiModelProperty
(
"固定资源类型"
)
private
Integer
fixtureType
;
@ApiModelProperty
(
"服务id"
)
private
Long
serveId
;
...
...
@@ -52,4 +57,8 @@ public class ResourcePageBookstoreVO {
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
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 {
@ApiModelProperty
(
"实体书购买"
)
private
List
<
ResourcePageBookstoreVO
>
resourcePageBookstoreList
;
@ApiModelProperty
(
"优惠券"
)
private
List
<
ResourcePageBookstoreVO
>
resourcePageCouponList
;
/**
* 导航
*/
...
...
@@ -128,4 +131,8 @@ public class ResourcePageVO extends BaseDto {
* 透明度
*/
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 {
@ApiModelProperty
(
"实体书购买"
)
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 @@
<resultMap
id=
"BaseResultMap"
type=
"com.pcloud.book.group.entity.ResourcePageBookstore"
>
<id
column=
"id"
property=
"id"
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_type"
property=
"serveType"
jdbcType=
"VARCHAR"
/>
<result
column=
"link_url"
property=
"linkUrl"
jdbcType=
"VARCHAR"
/>
...
...
@@ -15,7 +16,7 @@
</resultMap>
<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>
<select
id=
"getById"
resultMap=
"BaseResultMap"
>
...
...
@@ -30,6 +31,7 @@
<include
refid=
"Base_Column_List"
/>
FROM resource_page_bookstore
WHERE resource_page_id = #{resourcePageId}
AND fixture_type = #{fixtureType}
</select>
<select
id=
"getList"
resultMap=
"BaseResultMap"
>
...
...
@@ -41,12 +43,14 @@
<insert
id=
"insert"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
INSERT INTO resource_page_bookstore(
resource_page_id,
fixture_type,
serve_id,
serve_type,
link_url,
create_time
) VALUES (
#{resourcePageId, jdbcType=BIGINT},
#{fixtureType, jdbcType=INTEGER},
#{serveId, jdbcType=BIGINT},
#{serveType, jdbcType=VARCHAR},
#{linkUrl, jdbcType=VARCHAR},
...
...
@@ -57,6 +61,7 @@
<insert
id=
"batchInsert"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
INSERT INTO resource_page_bookstore (
resource_page_id,
fixture_type,
serve_id,
serve_type,
link_url,
...
...
@@ -65,6 +70,7 @@
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(
#{item.resourcePageId, jdbcType=BIGINT},
#{item.fixtureType, jdbcType=INTEGER},
#{item.serveId, jdbcType=BIGINT},
#{item.serveType, jdbcType=VARCHAR},
#{item.linkUrl, jdbcType=VARCHAR},
...
...
@@ -80,6 +86,9 @@
<if
test=
"resourcePageId != null"
>
resource_page_id = #{resourcePageId},
</if>
<if
test=
"fixtureType != null"
>
fixture_type = #{fixtureType},
</if>
<if
test=
"serveId != null"
>
serve_id = #{serveId},
</if>
...
...
@@ -101,6 +110,9 @@
<!--通过主键删除-->
<delete
id=
"deleteByResourcePageId"
>
DELETE FROM resource_page_bookstore WHERE resource_page_id = #{resourcePageId}
<if
test=
"fixtureType != null"
>
AND fixture_type = #{fixtureType}
</if>
</delete>
</mapper>
pcloud-service-book/src/main/resources/mapper/group/ResourcePageDao.xml
View file @
8c843902
...
...
@@ -26,12 +26,13 @@
<result
property=
"watermarkStyle"
column=
"watermark_style"
jdbcType=
"TINYINT"
/>
<result
property=
"landingPageType"
column=
"landing_page_type"
jdbcType=
"INTEGER"
/>
<result
property=
"transparency"
column=
"transparency"
jdbcType=
"INTEGER"
/>
<result
property=
"navigationJumpType"
column=
"navigation_jump_type"
jdbcType=
"INTEGER"
/>
</resultMap>
<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,
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>
<!--查询单个-->
...
...
@@ -46,9 +47,9 @@
<!--新增所有列-->
<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,
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},
#{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>
<!--通过主键修改数据-->
...
...
@@ -94,6 +95,9 @@
<if
test=
"transparency != null"
>
transparency = #{transparency},
</if>
<if
test=
"navigationJumpType != null"
>
navigation_jump_type = #{navigationJumpType},
</if>
</set>
where id = #{id}
</update>
...
...
@@ -310,6 +314,9 @@
<if
test=
"navigationFormat != null"
>
navigation_format = #{navigationFormat},
</if>
<if
test=
"navigationJumpType != null"
>
navigation_jump_type = #{navigationJumpType},
</if>
update_time = NOW(),
</set>
where id = #{id}
...
...
pcloud-service-book/src/main/resources/mapper/group/ResourcePageNavigationDao.xml
View file @
8c843902
...
...
@@ -9,13 +9,18 @@
<result
property=
"navigationName"
column=
"navigation_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"navigationIcon"
column=
"navigation_icon"
jdbcType=
"VARCHAR"
/>
<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=
"createTime"
column=
"create_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"updateTime"
column=
"update_time"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<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>
<!--查询单个-->
<select
id=
"getById"
resultMap=
"ResourcePageNavigationMap"
>
...
...
@@ -27,15 +32,15 @@
<!--新增所有列-->
<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)
values (#{resourcePageId}, #{navigationType}, #{navigationName}, #{navigationIcon}, #{navigationSeq}, #{createUser}, now(), now())
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},
#{serveId}, #{serveType}, #{typeCode}, #{linkUrl}, IFNULL(#{isHide},0),
now(), now())
</insert>
<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
<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>
</insert>
...
...
@@ -50,6 +55,21 @@
<if
test=
"navigationSeq != null"
>
navigation_seq = #{navigationSeq},
</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(),
</set>
where id = #{id}
...
...
@@ -156,4 +176,4 @@
update_time = now()
where id = #{id}
</update>
</mapper>
\ No newline at end of file
</mapper>
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