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
0543711f
Commit
0543711f
authored
Jul 04, 2020
by
吴博
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fixbug/1024240' into 'master'
bug: [1024240] 权益页面接口报错 See merge request rays/pcloud-book!783
parents
99d9d461
64b55b02
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
159 additions
and
18 deletions
+159
-18
RightsSettingBizImpl.java
...oud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
+2
-1
RightsNowItemDao.java
...a/com/pcloud/book/rightsSetting/dao/RightsNowItemDao.java
+4
-0
RightsSettingItemDetailDao.java
...ud/book/rightsSetting/dao/RightsSettingItemDetailDao.java
+5
-0
RightsNowItemDaoImpl.java
...oud/book/rightsSetting/dao/impl/RightsNowItemDaoImpl.java
+10
-0
RightsSettingItemDetailDaoImpl.java
...ightsSetting/dao/impl/RightsSettingItemDetailDaoImpl.java
+11
-0
RightsNowItem.java
...a/com/pcloud/book/rightsSetting/entity/RightsNowItem.java
+1
-1
RightsSettingItemDetail.java
...ud/book/rightsSetting/entity/RightsSettingItemDetail.java
+4
-0
PcloudGroupActivityBiz.java
...ava/com/pcloud/book/skill/biz/PcloudGroupActivityBiz.java
+2
-0
PcloudGroupActivityBizImpl.java
...cloud/book/skill/biz/impl/PcloudGroupActivityBizImpl.java
+38
-8
RightNowItem.xml
.../src/main/resources/mapper/rightssetting/RightNowItem.xml
+35
-0
RightsSettingItemDetail.Mapper.xml
...s/mapper/rightssetting/RightsSettingItemDetail.Mapper.xml
+42
-5
PcloudGroupActivityDao.xml
...rc/main/resources/mapper/skill/PcloudGroupActivityDao.xml
+5
-3
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
View file @
0543711f
...
...
@@ -454,6 +454,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
rightsSettingItemDetail
.
setRightsSettingItemId
(
rightsSettingItemId
);
rightsSettingItemDetail
.
setServeType
(
RightsServeTypeEnum
.
GROUP
.
name
());
rightsSettingItemDetail
.
setServeId
(
group
.
getId
());
rightsSettingItemDetail
.
setGroupType
(
group
.
getGroupType
());
rightsSettingItemDetailList
.
add
(
rightsSettingItemDetail
);
}
}
else
if
(
RightsServeTypeEnum
.
NEWS
.
name
().
equalsIgnoreCase
(
rightsItem
.
getServeType
()))
{
...
...
@@ -1122,7 +1123,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
appDtoMap
=
appConsr
.
mapByIds
(
appIds
);
}
if
(!
ListUtils
.
isEmpty
(
groupIds
))
{
groupDtoMap
=
pcloudGroupActivityBiz
.
getByIds
(
groupIds
);
groupDtoMap
=
pcloudGroupActivityBiz
.
getByIds
4Now
(
groupIds
);
}
if
(!
ListUtils
.
isEmpty
(
appletNewsId
))
{
newsDtoMap
=
appletNewsBiz
.
getByIds
(
appletNewsId
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/dao/RightsNowItemDao.java
View file @
0543711f
...
...
@@ -25,4 +25,8 @@ public interface RightsNowItemDao extends BaseDao<RightsNowItem> {
List
<
RightsNowItem
>
getListByRightsSettingTitleId
(
Long
rightsSettingTitleId
,
List
<
Integer
>
types
);
List
<
RightsNowItem
>
getGiftCouponListByRightsSettingTitleId
(
Long
id
);
List
<
Long
>
getAdviserGroupIds
(
List
<
Long
>
ids
);
List
<
Long
>
getActivityGroupIds
(
List
<
Long
>
ids
);
}
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/dao/RightsSettingItemDetailDao.java
View file @
0543711f
...
...
@@ -15,4 +15,8 @@ public interface RightsSettingItemDetailDao extends BaseDao<RightsSettingItemDet
void
deleteByItemIds
(
List
<
Long
>
rightsSettingItemIds
);
List
<
RightsSettingItemDetail
>
getByItemIds
(
List
<
Long
>
itemIds
);
List
<
Long
>
getAdviserGroupIds
(
List
<
Long
>
ids
);
List
<
Long
>
getActivityGroupIds
(
List
<
Long
>
ids
);
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/dao/impl/RightsNowItemDaoImpl.java
View file @
0543711f
...
...
@@ -62,4 +62,14 @@ public class RightsNowItemDaoImpl extends BaseDaoImpl<RightsNowItem> implements
map
.
put
(
"rightsSettingTitleId"
,
rightsSettingTitleId
);
return
super
.
getSqlSession
().
selectList
(
getStatement
(
"getGiftCouponListByRightsSettingTitleId"
),
map
);
}
@Override
public
List
<
Long
>
getAdviserGroupIds
(
List
<
Long
>
ids
)
{
return
super
.
getSqlSession
().
selectList
(
getStatement
(
"getAdviserGroupIds"
),
ids
);
}
@Override
public
List
<
Long
>
getActivityGroupIds
(
List
<
Long
>
ids
)
{
return
super
.
getSqlSession
().
selectList
(
getStatement
(
"getActivityGroupIds"
),
ids
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/dao/impl/RightsSettingItemDetailDaoImpl.java
View file @
0543711f
...
...
@@ -25,4 +25,14 @@ public class RightsSettingItemDetailDaoImpl extends BaseDaoImpl<RightsSettingIte
public
List
<
RightsSettingItemDetail
>
getByItemIds
(
List
<
Long
>
list
)
{
return
this
.
getSqlSession
().
selectList
(
getStatement
(
"getByItemIds"
),
list
);
}
@Override
public
List
<
Long
>
getAdviserGroupIds
(
List
<
Long
>
ids
)
{
return
this
.
getSqlSession
().
selectList
(
getStatement
(
"getAdviserGroupIds"
),
ids
);
}
@Override
public
List
<
Long
>
getActivityGroupIds
(
List
<
Long
>
ids
)
{
return
this
.
getSqlSession
().
selectList
(
getStatement
(
"getActivityGroupIds"
),
ids
);
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/entity/RightsNowItem.java
View file @
0543711f
...
...
@@ -96,6 +96,6 @@ public class RightsNowItem extends BaseEntity {
@ApiModelProperty
(
"群分类价格"
)
private
BigDecimal
price
;
@ApiModelProperty
(
"群类型 2:编辑端群"
)
private
String
groupType
;
private
Integer
groupType
;
}
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/entity/RightsSettingItemDetail.java
View file @
0543711f
...
...
@@ -33,5 +33,8 @@ public class RightsSettingItemDetail extends BaseEntity {
@ApiModelProperty
(
"创建时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
createTime
;
@ApiModelProperty
(
"群类型 2:编辑端群"
)
private
Integer
groupType
;
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/skill/biz/PcloudGroupActivityBiz.java
View file @
0543711f
...
...
@@ -69,4 +69,6 @@ public interface PcloudGroupActivityBiz {
PcloudGroupActivity
getById
(
Long
id
);
void
updateActivityShowState
(
UpdateActivityShowStateDTO
showStateDTO
);
Map
<
Long
,
GroupActivity4AppletDTO
>
getByIds4Now
(
List
<
Long
>
groupIds
);
}
pcloud-service-book/src/main/java/com/pcloud/book/skill/biz/impl/PcloudGroupActivityBizImpl.java
View file @
0543711f
...
...
@@ -23,6 +23,8 @@ import com.pcloud.book.group.vo.ClassifyQrcodeVO;
import
com.pcloud.book.group.vo.GroupQrcode4ClassifyVO
;
import
com.pcloud.book.reading.biz.ReadingActivityBiz
;
import
com.pcloud.book.rightsSetting.biz.RightsSettingBiz
;
import
com.pcloud.book.rightsSetting.dao.RightsNowItemDao
;
import
com.pcloud.book.rightsSetting.dao.RightsSettingItemDetailDao
;
import
com.pcloud.book.rightsSetting.entity.BaseTempletClassify
;
import
com.pcloud.book.rightsSetting.entity.RightsSettingTitle
;
import
com.pcloud.book.rightsSetting.enums.RightsNowItemType
;
...
...
@@ -105,6 +107,10 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz {
private
AdviserService
adviserService
;
@Autowired
private
AgentService
agentService
;
@Autowired
private
RightsNowItemDao
rightsNowItemDao
;
@Autowired
private
RightsSettingItemDetailDao
rightsSettingItemDetailDao
;
@ParamLog
(
"保存共读活动"
)
@Override
...
...
@@ -345,17 +351,31 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz {
if
(
ListUtils
.
isEmpty
(
ids
)){
return
new
HashMap
<>();
}
Map
<
Long
,
GroupActivity4AppletDTO
>
localMap
=
pcloudGroupActivityDao
.
getByIds
(
ids
);
Map
<
Long
,
GroupActivity4AppletDTO
>
editDtoThree
=
pcloudGroupActivityDao
.
getGroupClassifyByIds
(
ids
);
//查询第编辑端群
List
<
Long
>
adviserGroupIds
=
rightsSettingItemDetailDao
.
getAdviserGroupIds
(
ids
);
List
<
Long
>
activityGroupIds
=
rightsSettingItemDetailDao
.
getActivityGroupIds
(
ids
);
// 合并
Map
<
Long
,
GroupActivity4AppletDTO
>
mapDto
=
new
HashMap
<
Long
,
GroupActivity4AppletDTO
>();
mapDto
.
putAll
(
localMap
);
mapDto
.
putAll
(
editDtoThree
);
return
getGroupMap
(
adviserGroupIds
,
activityGroupIds
);
}
private
Map
<
Long
,
GroupActivity4AppletDTO
>
getGroupMap
(
List
<
Long
>
adviserGroupIds
,
List
<
Long
>
activityGroupIds
)
{
log
.
info
(
"获取群数据adviserGroupIds:{},activityGroupIds"
,
adviserGroupIds
,
activityGroupIds
);
Map
<
Long
,
GroupActivity4AppletDTO
>
mapDto
=
new
HashMap
<
Long
,
GroupActivity4AppletDTO
>();
Map
<
Long
,
GroupActivity4AppletDTO
>
editDtoThree
=
new
HashMap
<>();
Map
<
Long
,
GroupActivity4AppletDTO
>
localMap
=
new
HashMap
<>();
if
(!
ListUtils
.
isEmpty
(
adviserGroupIds
)){
editDtoThree
=
pcloudGroupActivityDao
.
getGroupClassifyByIds
(
adviserGroupIds
);
//查询第编辑端群
}
if
(!
ListUtils
.
isEmpty
(
activityGroupIds
))
{
localMap
=
pcloudGroupActivityDao
.
getByIds
(
activityGroupIds
);
}
if
(
MapUtils
.
isNotEmpty
(
localMap
))
{
mapDto
.
putAll
(
localMap
);
}
if
(
MapUtils
.
isNotEmpty
(
editDtoThree
))
{
mapDto
.
putAll
(
editDtoThree
);
}
if
(
mapDto
.
isEmpty
()){
return
new
HashMap
<>()
;
return
mapDto
;
}
for
(
GroupActivity4AppletDTO
groupActivity4AppletDTO:
mapDto
.
values
()){
String
filterStr
=
StringUtilParent
.
replaceHtml
(
groupActivity4AppletDTO
.
getDesc
());
...
...
@@ -442,6 +462,16 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz {
}
@Override
public
Map
<
Long
,
GroupActivity4AppletDTO
>
getByIds4Now
(
List
<
Long
>
ids
)
{
if
(
ListUtils
.
isEmpty
(
ids
)){
return
new
HashMap
<>();
}
List
<
Long
>
adviserIds
=
rightsNowItemDao
.
getAdviserGroupIds
(
ids
);
List
<
Long
>
activityGroupIds
=
rightsNowItemDao
.
getActivityGroupIds
(
ids
);
return
getGroupMap
(
adviserIds
,
activityGroupIds
);
}
@Override
public
PcloudGroupActivity
getById
(
Long
id
){
return
pcloudGroupActivityDao
.
getById
(
id
);
}
...
...
pcloud-service-book/src/main/resources/mapper/rightssetting/RightNowItem.xml
View file @
0543711f
...
...
@@ -165,4 +165,38 @@
AND t.rights_setting_title_id = #{rightsSettingTitleId}
and now()
<![CDATA[ <= ]]>
t1.valid_date_end
</select>
<select
id=
"getAdviserGroupIds"
parameterType=
"list"
resultType=
"long"
>
select
serve_id
from
rights_now_item
where
type = 6
and
serve_type = 'GROUP'
and
group_type = 2
and serve_id in
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</select>
<select
id=
"getActivityGroupIds"
parameterType=
"list"
resultType=
"long"
>
select
serve_id
from
rights_now_item
where
type = 6
and
serve_type = 'GROUP'
and
group_type
<>
2 or group_type is null
and serve_id in
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</select>
</mapper>
\ No newline at end of file
pcloud-service-book/src/main/resources/mapper/rightssetting/RightsSettingItemDetail.Mapper.xml
View file @
0543711f
...
...
@@ -8,10 +8,11 @@
<result
column=
"serve_id"
property=
"serveId"
jdbcType=
"BIGINT"
/>
<result
column=
"serve_type"
property=
"serveType"
jdbcType=
"VARCHAR"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"group_type"
property=
"groupType"
jdbcType=
"TINYINT"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, rights_setting_item_id, serve_id, serve_type, create_time
id, rights_setting_item_id, serve_id, serve_type, create_time
, group_type
</sql>
<select
id=
"getById"
resultMap=
"BaseResultMap"
>
...
...
@@ -42,12 +43,14 @@
rights_setting_item_id,
serve_id,
serve_type,
create_time
create_time,
group_type
) VALUES (
#{rightsSettingItemId, jdbcType=BIGINT},
#{serveId, jdbcType=BIGINT},
#{serveType, jdbcType=VARCHAR},
NOW()
NOW(),
group_type
)
</insert>
...
...
@@ -56,14 +59,16 @@
rights_setting_item_id,
serve_id,
serve_type,
create_time
create_time,
group_type
) VALUES
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(
#{item.rightsSettingItemId, jdbcType=BIGINT},
#{item.serveId, jdbcType=BIGINT},
#{item.serveType, jdbcType=VARCHAR},
NOW()
NOW(),
#{item.groupType}
)
</foreach>
</insert>
...
...
@@ -84,6 +89,9 @@
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"group_type != null"
>
group_type = #{groupType}
</if>
</set>
WHERE id = #{id}
</update>
...
...
@@ -101,4 +109,32 @@
</foreach>
</delete>
<select
id=
"getAdviserGroupIds"
parameterType=
"list"
resultType=
"long"
>
select
serve_id
from
rights_setting_item_detail
where
group_type = 2
and
serve_id in
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</select>
<select
id=
"getActivityGroupIds"
parameterType=
"list"
resultType=
"long"
>
select
serve_id
from
rights_setting_item_detail
where
group_type
<>
2 or group_type is null
and
serve_id in
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</select>
</mapper>
\ No newline at end of file
pcloud-service-book/src/main/resources/mapper/skill/PcloudGroupActivityDao.xml
View file @
0543711f
...
...
@@ -180,7 +180,7 @@
a.join_type AS joinType,
c.classify AS groupName,
b.user_number userNumber,
b.classify_
id classifyId,
c.
id classifyId,
c.book_group_id bookGroupId,
a.first_classify AS firstClassify,
a.second_classify AS secondClassify,
...
...
@@ -188,9 +188,11 @@
a.subject_label_id AS subjectLabelId
FROM
book_group_classify c
LEFT JOIN pcloud_group_activity a ON a.book_group_classify_id = c.id
AND c.is_delete = 0
LEFT JOIN book_group_qrcode b on b.classify_id = c.id
AND b.is_delete = 0
LEFT JOIN pcloud_group_activity a ON a.book_group_classify_id = c.id
LEFT JOIN book_group_qrcode b on b.classify_id = c.id
where
c.is_delete = 0 and b.is_delete = 0
and
c.id IN
<foreach
collection=
"list"
item=
"item"
open=
"("
close=
")"
separator=
","
>
${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