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
4cd4f800
Commit
4cd4f800
authored
Sep 10, 2021
by
朱亚洁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:[1005387]本书服务页优化
parent
debe368e
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
72 additions
and
11 deletions
+72
-11
AppConsr.java
.../src/main/java/com/pcloud/book/consumer/app/AppConsr.java
+13
-0
TradeConsr.java
.../main/java/com/pcloud/book/consumer/trade/TradeConsr.java
+42
-0
ResourcePageBiz.java
.../main/java/com/pcloud/book/group/biz/ResourcePageBiz.java
+3
-3
ResourcePageBizImpl.java
...a/com/pcloud/book/group/biz/impl/ResourcePageBizImpl.java
+0
-0
ResourcePageFacade.java
...com/pcloud/book/group/facade/impl/ResourcePageFacade.java
+9
-7
ResourcePageItemVO.java
...ain/java/com/pcloud/book/group/vo/ResourcePageItemVO.java
+4
-0
RightsSettingBizImpl.java
...oud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
+1
-1
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/consumer/app/AppConsr.java
View file @
4cd4f800
...
...
@@ -6,6 +6,7 @@ import com.pcloud.appcenter.app.dto.AppDto;
import
com.pcloud.appcenter.app.dto.AppIdTypeDTO
;
import
com.pcloud.appcenter.app.dto.AppRaysDTO
;
import
com.pcloud.appcenter.app.dto.AppTypeDto
;
import
com.pcloud.appcenter.app.dto.app.MapBaseStatusDTO
;
import
com.pcloud.appcenter.app.service.AppService
;
import
com.pcloud.appcenter.app.service.AppTypeService
;
import
com.pcloud.appcenter.base.dto.AppPriceCacheDTO
;
...
...
@@ -293,4 +294,16 @@ public class AppConsr {
}
return
new
HashMap
<>();
}
@ParamLog
(
description
=
"获取应用状态与价格"
,
isAfterReturn
=
false
)
public
Map
<
Long
,
MapBaseStatusDTO
>
mapBaseStatusById
(
List
<
Long
>
appIds
){
if
(
ListUtils
.
isEmpty
(
appIds
))
return
null
;
try
{
Map
<
Long
,
MapBaseStatusDTO
>
appBaseStatus
=
ResponseHandleUtil
.
parseMap
(
appService
.
mapBaseStatusById
(
appIds
),
Long
.
class
,
MapBaseStatusDTO
.
class
);
return
appBaseStatus
;
}
catch
(
Exception
e
){
LOGGER
.
error
(
"获取应用状态与价格失败"
+
e
.
getMessage
(),
e
);
}
return
null
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/consumer/trade/TradeConsr.java
View file @
4cd4f800
...
...
@@ -329,4 +329,46 @@ public class TradeConsr {
}
return
new
HashMap
<>();
}
/**
* 应用作品购买状态
* @author:zhuyajie
* @date:2021/9/6 15:48
* * @param null
*/
public
Map
<
Long
,
Boolean
>
mapAppProductBuyState
(
Long
wechatUserId
,
List
<
Long
>
appIds
,
List
<
Long
>
productIds
)
{
if
(
null
==
wechatUserId
||
(
ListUtils
.
isEmpty
(
appIds
)
&&
ListUtils
.
isEmpty
(
productIds
)))
{
return
new
HashMap
<>();
}
OrderSearchDto
orderSearchDto
=
new
OrderSearchDto
();
orderSearchDto
.
setAppIds
(
appIds
);
orderSearchDto
.
setProductIds
(
productIds
);
orderSearchDto
.
setWechatUserId
(
wechatUserId
);
try
{
return
ResponseHandleUtil
.
parseMap
(
orderFormService
.
mapAppProductBuyState
(
orderSearchDto
),
Long
.
class
,
Boolean
.
class
);
}
catch
(
Exception
e
)
{
LOGGER
.
error
(
"调用orderFormService.mapAppProductBuyState失败"
+
e
.
getMessage
(),
e
);
}
return
null
;
}
/**
* 课程单节课购买状态
* @author:zhuyajie
* @date:2021/9/7 12:37
* * @param null
*/
public
Map
<
Long
,
Boolean
>
mapCourseProductBuyState
(
Long
wechatUserId
,
List
<
Long
>
productIds
)
{
if
(
null
==
wechatUserId
||
ListUtils
.
isEmpty
(
productIds
))
{
return
new
HashMap
<>();
}
OrderSearchDto
orderSearchDto
=
new
OrderSearchDto
();
orderSearchDto
.
setProductIds
(
productIds
);
orderSearchDto
.
setWechatUserId
(
wechatUserId
);
try
{
return
ResponseHandleUtil
.
parseMap
(
orderFormService
.
mapCourseProductBuyState
(
orderSearchDto
),
Long
.
class
,
Boolean
.
class
);
}
catch
(
Exception
e
)
{
LOGGER
.
error
(
"调用orderFormService.mapCourseProductBuyState失败"
+
e
.
getMessage
(),
e
);
}
return
null
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/ResourcePageBiz.java
View file @
4cd4f800
...
...
@@ -66,7 +66,7 @@ public interface ResourcePageBiz {
* @date:2021/3/29 11:49
* * @param null
*/
List
<
ResourceColumnAndServeVO
>
getColumnAndServeListByPageId
(
Long
resourcePageId
,
Boolean
isWechat
,
Long
bookId
,
Long
adviserId
,
Long
channelId
,
Integer
enableAdverting
,
Long
navigationId
);
List
<
ResourceColumnAndServeVO
>
getColumnAndServeListByPageId
(
Long
resourcePageId
,
Long
wechatUserId
,
Long
bookId
,
Long
adviserId
,
Long
channelId
,
Integer
enableAdverting
,
Long
navigationId
);
/**
* 根据书刊查资源页基本配置
* @author:zhuyajie
...
...
@@ -81,7 +81,7 @@ public interface ResourcePageBiz {
* @date:2021/3/31 19:06
* * @param null
*/
PageBeanNew
<
ResourcePageItemVO
>
listPageResourcePageItem
(
Integer
currentPage
,
Integer
numPerPage
,
Long
resourcePageColumnId
);
PageBeanNew
<
ResourcePageItemVO
>
listPageResourcePageItem
(
Integer
currentPage
,
Integer
numPerPage
,
Long
resourcePageColumnId
,
Long
wechatUserId
);
/**
* 根据社群码id查询
...
...
@@ -173,7 +173,7 @@ public interface ResourcePageBiz {
* @date:2021/4/21 15:09
* * @param null
*/
ResourcePageOneServe
hasOneResource
(
Long
bookGroupId
,
Long
sceneId
);
ResourcePageOneServe
hasOneResource
(
Long
bookGroupId
,
Long
sceneId
,
Long
wechatUserId
);
/**
* 自有码配置的资源列表
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/ResourcePageBizImpl.java
View file @
4cd4f800
This diff is collapsed.
Click to expand it.
pcloud-service-book/src/main/java/com/pcloud/book/group/facade/impl/ResourcePageFacade.java
View file @
4cd4f800
...
...
@@ -75,7 +75,7 @@ public class ResourcePageFacade {
@RequestParam
(
"resourcePageId"
)
Long
resourcePageId
,
@RequestParam
(
value
=
"navigationId"
,
required
=
false
)
Long
navigationId
){
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
return
new
ResponseDto
<>(
resourcePageBiz
.
getColumnAndServeListByPageId
(
resourcePageId
,
false
,
null
,
null
,
null
,
null
,
navigationId
));
return
new
ResponseDto
<>(
resourcePageBiz
.
getColumnAndServeListByPageId
(
resourcePageId
,
null
,
null
,
null
,
null
,
null
,
navigationId
));
}
@ApiOperation
(
"客户端-根据书刊查资源页基本配置"
)
...
...
@@ -97,8 +97,8 @@ public class ResourcePageFacade {
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
,
@RequestParam
(
value
=
"enableAdverting"
,
required
=
false
)
Integer
enableAdverting
,
@RequestParam
(
value
=
"navigationId"
,
required
=
false
)
Long
navigationId
){
Cookie
.
getId
(
userInfo
,
Cookie
.
_WECHAT_USER_ID
);
return
new
ResponseDto
<>(
resourcePageBiz
.
getColumnAndServeListByPageId
(
resourcePageId
,
true
,
bookId
,
adviserId
,
channelId
,
enableAdverting
,
navigationId
));
Long
wechatUserId
=
Cookie
.
getId
(
userInfo
,
Cookie
.
_WECHAT_USER_ID
);
return
new
ResponseDto
<>(
resourcePageBiz
.
getColumnAndServeListByPageId
(
resourcePageId
,
wechatUserId
,
bookId
,
adviserId
,
channelId
,
enableAdverting
,
navigationId
));
}
@ApiOperation
(
"客户端分页查栏目资源"
)
...
...
@@ -107,8 +107,8 @@ public class ResourcePageFacade {
@RequestParam
(
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
"numPerPage"
)
Integer
numPerPage
,
@RequestParam
(
"resourcePageColumnId"
)
Long
resourcePageColumnId
)
{
Cookie
.
getId
(
userInfo
,
Cookie
.
_WECHAT_USER_ID
);
return
new
ResponseDto
<>(
resourcePageBiz
.
listPageResourcePageItem
(
currentPage
,
numPerPage
,
resourcePageColumnId
));
Long
wechatUserId
=
Cookie
.
getId
(
userInfo
,
Cookie
.
_WECHAT_USER_ID
);
return
new
ResponseDto
<>(
resourcePageBiz
.
listPageResourcePageItem
(
currentPage
,
numPerPage
,
resourcePageColumnId
,
wechatUserId
));
}
@ApiOperation
(
"获取栏目及资源类型"
)
...
...
@@ -163,9 +163,11 @@ public class ResourcePageFacade {
@ApiOperation
(
"是否只有一个资源"
)
@GetMapping
(
"hasOneResource"
)
public
ResponseDto
<?>
hasOneResource
(
@RequestParam
(
value
=
"bookGroupId"
,
required
=
false
)
Long
bookGroupId
,
public
ResponseDto
<?>
hasOneResource
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestParam
(
value
=
"bookGroupId"
,
required
=
false
)
Long
bookGroupId
,
@RequestParam
(
value
=
"sceneId"
,
required
=
false
)
Long
sceneId
)
{
return
new
ResponseDto
<>(
resourcePageBiz
.
hasOneResource
(
bookGroupId
,
sceneId
));
Long
wechatUserId
=
Cookie
.
getId
(
userInfo
,
Cookie
.
_WECHAT_USER_ID
);
return
new
ResponseDto
<>(
resourcePageBiz
.
hasOneResource
(
bookGroupId
,
sceneId
,
wechatUserId
));
}
@ApiOperation
(
"添加收藏记录"
)
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/vo/ResourcePageItemVO.java
View file @
4cd4f800
...
...
@@ -116,4 +116,8 @@ public class ResourcePageItemVO extends BaseDto{
* 二维码公众号弹出状态
*/
private
Boolean
popupState
;
/**
* 是否购买
*/
private
Boolean
buyState
;
}
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
View file @
4cd4f800
...
...
@@ -1201,7 +1201,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
if
(
null
==
resourcePageVO
||
null
==
resourcePageVO
.
getId
())
{
return
;
}
List
<
ResourceColumnAndServeVO
>
serveVOList
=
resourcePageBiz
.
getColumnAndServeListByPageId
(
resourcePageVO
.
getId
(),
false
,
null
,
null
,
null
,
null
,
null
);
List
<
ResourceColumnAndServeVO
>
serveVOList
=
resourcePageBiz
.
getColumnAndServeListByPageId
(
resourcePageVO
.
getId
(),
null
,
null
,
null
,
null
,
null
,
null
);
UpdateResourceColumnVO
columnVO
=
new
UpdateResourceColumnVO
();
columnVO
.
setColumnFormat
(
3
);
columnVO
.
setColumnName
(
"精品资讯"
);
...
...
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