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
1cc541f5
Commit
1cc541f5
authored
Jun 12, 2020
by
田超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/1003034' into 'master'
feature/1003034 See merge request rays/pcloud-book!765
parents
4328e89a
bfd9b84f
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
458 additions
and
194 deletions
+458
-194
AppletGroupManageBizImpl.java
...pcloud/book/applet/biz/impl/AppletGroupManageBizImpl.java
+24
-4
AppletGroupManageDTO.java
...java/com/pcloud/book/applet/dto/AppletGroupManageDTO.java
+2
-2
BookGroupClassifyBiz.java
.../java/com/pcloud/book/group/biz/BookGroupClassifyBiz.java
+6
-0
GroupQrcodeBiz.java
...c/main/java/com/pcloud/book/group/biz/GroupQrcodeBiz.java
+1
-0
BookGroupClassifyBizImpl.java
.../pcloud/book/group/biz/impl/BookGroupClassifyBizImpl.java
+24
-9
GroupQrcodeBizImpl.java
...va/com/pcloud/book/group/biz/impl/GroupQrcodeBizImpl.java
+22
-4
BookGroupClassifyFacade.java
...com/pcloud/book/group/facade/BookGroupClassifyFacade.java
+20
-10
BookGroupClassifyFacadeImpl.java
...d/book/group/facade/impl/BookGroupClassifyFacadeImpl.java
+24
-0
PcloudBookGroupClassifyVO.java
...a/com/pcloud/book/group/vo/PcloudBookGroupClassifyVO.java
+80
-0
RightsSettingBizImpl.java
...oud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
+18
-61
PcloudGroupActivityBiz.java
...ava/com/pcloud/book/skill/biz/PcloudGroupActivityBiz.java
+6
-0
PcloudGroupActivityBizImpl.java
...cloud/book/skill/biz/impl/PcloudGroupActivityBizImpl.java
+55
-15
GroupActivity4AppletDTO.java
...va/com/pcloud/book/skill/dto/GroupActivity4AppletDTO.java
+2
-1
UpdateActivityShowStateDTO.java
...com/pcloud/book/skill/dto/UpdateActivityShowStateDTO.java
+24
-0
PcloudGroupActivity.java
...ava/com/pcloud/book/skill/entity/PcloudGroupActivity.java
+15
-8
PcloudGroupActivityFacade.java
...m/pcloud/book/skill/facade/PcloudGroupActivityFacade.java
+9
-2
SaveGroupActivityRequestVO.java
...book/skill/facade/request/SaveGroupActivityRequestVO.java
+4
-8
UpdateGroupActivityRequestVO.java
...ok/skill/facade/request/UpdateGroupActivityRequestVO.java
+7
-5
QueryGroupActivityResponseVO.java
...k/skill/facade/response/QueryGroupActivityResponseVO.java
+7
-5
AppletGroupManage.Mapper.xml
...main/resources/mapper/applet/AppletGroupManage.Mapper.xml
+6
-13
BookGroupClassify.Mapper.xml
.../main/resources/mapper/group/BookGroupClassify.Mapper.xml
+38
-0
PcloudGroupActivityDao.xml
...rc/main/resources/mapper/skill/PcloudGroupActivityDao.xml
+64
-47
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/applet/biz/impl/AppletGroupManageBizImpl.java
View file @
1cc541f5
package
com
.
pcloud
.
book
.
applet
.
biz
.
impl
;
package
com
.
pcloud
.
book
.
applet
.
biz
.
impl
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.pcloud.book.applet.biz.AppletGroupManageBiz
;
import
com.pcloud.book.applet.biz.AppletGroupSearchRecordBiz
;
import
com.pcloud.book.applet.biz.AppletGroupSearchRecordBiz
;
import
com.pcloud.book.applet.dao.AppletGroupManageDao
;
import
com.pcloud.book.applet.dto.AppletGroupManageDTO
;
import
com.pcloud.book.applet.dto.AppletGroupManageDTO
;
import
com.pcloud.book.applet.dto.AppletGroupStatementDTO
;
import
com.pcloud.book.applet.dto.AppletGroupStatementDTO
;
import
com.pcloud.book.applet.dto.UpdateAppletGroupManageDTO
;
import
com.pcloud.book.applet.dto.UpdateAppletGroupManageDTO
;
import
com.pcloud.book.applet.entity.AppletGroupManage
;
import
com.pcloud.book.applet.entity.AppletGroupManage
;
import
com.pcloud.book.applet.dao.AppletGroupManageDao
;
import
com.pcloud.book.applet.biz.AppletGroupManageBiz
;
import
com.pcloud.book.consumer.label.LabelConsr
;
import
com.pcloud.book.consumer.label.LabelConsr
;
import
com.pcloud.book.consumer.reader.ReaderConsr
;
import
com.pcloud.book.consumer.reader.ReaderConsr
;
import
com.pcloud.book.group.biz.GroupQrcodeBiz
;
import
com.pcloud.book.group.vo.ClassifyQrcodeVO
;
import
com.pcloud.common.exceptions.BizException
;
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.utils.ListUtils
;
import
com.pcloud.common.utils.ListUtils
;
import
com.pcloud.common.utils.NumberUtil
;
import
com.pcloud.common.utils.NumberUtil
;
import
com.pcloud.common.utils.string.StringUtilParent
;
import
com.pcloud.common.utils.string.StringUtilParent
;
...
@@ -49,6 +50,8 @@ public class AppletGroupManageBizImpl implements AppletGroupManageBiz {
...
@@ -49,6 +50,8 @@ public class AppletGroupManageBizImpl implements AppletGroupManageBiz {
private
ReaderConsr
readerConsr
;
private
ReaderConsr
readerConsr
;
@Autowired
@Autowired
private
AppletGroupSearchRecordBiz
appletGroupSearchRecordBiz
;
private
AppletGroupSearchRecordBiz
appletGroupSearchRecordBiz
;
@Autowired
private
GroupQrcodeBiz
groupQrcodeBiz
;
@Override
@Override
public
AppletGroupManage
getById
(
Long
id
)
{
public
AppletGroupManage
getById
(
Long
id
)
{
...
@@ -63,6 +66,17 @@ public class AppletGroupManageBizImpl implements AppletGroupManageBiz {
...
@@ -63,6 +66,17 @@ public class AppletGroupManageBizImpl implements AppletGroupManageBiz {
if
(
null
==
recordList
||
CollectionUtils
.
isEmpty
(
recordList
.
getRecordList
()))
{
if
(
null
==
recordList
||
CollectionUtils
.
isEmpty
(
recordList
.
getRecordList
()))
{
return
recordList
;
return
recordList
;
}
}
// 平台端共读模板创建修改为选择群分类自更新群 群变更为群分类 需要补充信息
for
(
AppletGroupManageDTO
appletGroupManageDTO
:
recordList
.
getRecordList
())
{
Long
classifyId
=
appletGroupManageDTO
.
getClassifyId
();
String
groupQrCode
=
groupQrcodeBiz
.
getChangeGroupQrCode
(
classifyId
);
ClassifyQrcodeVO
groupQrcodeInfo
=
groupQrcodeBiz
.
getGroupQrcodeInfo
(
groupQrCode
,
classifyId
);
appletGroupManageDTO
.
setUserNumber
(
groupQrcodeInfo
.
getUserNumber
());
appletGroupManageDTO
.
setBookGroupQrcodeId
(
groupQrcodeInfo
.
getId
());
appletGroupManageDTO
.
setGroupPic
(
groupQrCode
);
}
// 组装标签名称
// 组装标签名称
List
<
Long
>
labelId
=
Lists
.
newArrayList
();
List
<
Long
>
labelId
=
Lists
.
newArrayList
();
for
(
AppletGroupManageDTO
dto
:
recordList
.
getRecordList
())
{
for
(
AppletGroupManageDTO
dto
:
recordList
.
getRecordList
())
{
...
@@ -99,6 +113,12 @@ public class AppletGroupManageBizImpl implements AppletGroupManageBiz {
...
@@ -99,6 +113,12 @@ public class AppletGroupManageBizImpl implements AppletGroupManageBiz {
String
filterStr
=
StringUtilParent
.
replaceHtml
(
dto
.
getDesc
());
String
filterStr
=
StringUtilParent
.
replaceHtml
(
dto
.
getDesc
());
String
subStr
=
filterStr
.
length
()
>
60
?
filterStr
.
substring
(
0
,
60
)
+
"..."
:
filterStr
;
String
subStr
=
filterStr
.
length
()
>
60
?
filterStr
.
substring
(
0
,
60
)
+
"..."
:
filterStr
;
dto
.
setCutDesc
(
subStr
);
dto
.
setCutDesc
(
subStr
);
Long
classifyId
=
dto
.
getClassifyId
();
String
groupQrCode
=
groupQrcodeBiz
.
getChangeGroupQrCode
(
classifyId
);
ClassifyQrcodeVO
groupQrcodeInfo
=
groupQrcodeBiz
.
getGroupQrcodeInfo
(
groupQrCode
,
classifyId
);
dto
.
setUserNumber
(
groupQrcodeInfo
.
getUserNumber
());
dto
.
setBookGroupQrcodeId
(
groupQrcodeInfo
.
getId
());
dto
.
setGroupPic
(
groupQrCode
);
//头像列表从缓存里取
//头像列表从缓存里取
List
<
String
>
headUrlList
=
appletGroupSearchRecordBiz
.
getHeadUrlList
(
dto
.
getUserNumber
(),
dto
.
getBookGroupQrcodeId
());
List
<
String
>
headUrlList
=
appletGroupSearchRecordBiz
.
getHeadUrlList
(
dto
.
getUserNumber
(),
dto
.
getBookGroupQrcodeId
());
dto
.
setHeadUrlList
(
headUrlList
);
dto
.
setHeadUrlList
(
headUrlList
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/applet/dto/AppletGroupManageDTO.java
View file @
1cc541f5
...
@@ -42,8 +42,8 @@ public class AppletGroupManageDTO extends BaseEntity {
...
@@ -42,8 +42,8 @@ public class AppletGroupManageDTO extends BaseEntity {
@ApiModelProperty
(
"社群码id"
)
@ApiModelProperty
(
"社群码id"
)
private
Long
bookGroupQrcodeId
;
private
Long
bookGroupQrcodeId
;
@ApiModelProperty
(
"
社群码
名称"
)
@ApiModelProperty
(
"
群分类
名称"
)
private
String
group
Name
;
private
String
classify
Name
;
@ApiModelProperty
(
"专业标签id"
)
@ApiModelProperty
(
"专业标签id"
)
private
Long
proLabelId
;
private
Long
proLabelId
;
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/BookGroupClassifyBiz.java
View file @
1cc541f5
...
@@ -25,6 +25,7 @@ import com.pcloud.book.group.vo.ListBookGroupQrcodeParamVO;
...
@@ -25,6 +25,7 @@ import com.pcloud.book.group.vo.ListBookGroupQrcodeParamVO;
import
com.pcloud.book.group.vo.ListClassify4WechatVO
;
import
com.pcloud.book.group.vo.ListClassify4WechatVO
;
import
com.pcloud.book.group.vo.ListClassifyVO
;
import
com.pcloud.book.group.vo.ListClassifyVO
;
import
com.pcloud.book.group.vo.ListGroupClassifyParam
;
import
com.pcloud.book.group.vo.ListGroupClassifyParam
;
import
com.pcloud.book.group.vo.PcloudBookGroupClassifyVO
;
import
com.pcloud.book.group.vo.StatisticVO
;
import
com.pcloud.book.group.vo.StatisticVO
;
import
com.pcloud.book.group.vo.UpdateClassifyVO
;
import
com.pcloud.book.group.vo.UpdateClassifyVO
;
import
com.pcloud.book.group.vo.UpdateRankVO
;
import
com.pcloud.book.group.vo.UpdateRankVO
;
...
@@ -271,4 +272,9 @@ public interface BookGroupClassifyBiz {
...
@@ -271,4 +272,9 @@ public interface BookGroupClassifyBiz {
List
<
GroupQrcode4ClassifyDTO
>
getQrcodeByClassifyId4Heals
(
Long
classifyId
);
List
<
GroupQrcode4ClassifyDTO
>
getQrcodeByClassifyId4Heals
(
Long
classifyId
);
GroupQrcode4ClassifyVO
getGroupQrcodeByClassify
(
Long
classifyId
,
Long
wechatUserId
);
GroupQrcode4ClassifyVO
getGroupQrcodeByClassify
(
Long
classifyId
,
Long
wechatUserId
);
/**
* 平台端分页获取群分类
*/
PageBeanNew
<
PcloudBookGroupClassifyVO
>
listGroupClassify4Pcloud
(
String
name
,
Long
proLabelId
,
Long
depLabelId
,
Integer
currentPage
,
Integer
numPerPage
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/GroupQrcodeBiz.java
View file @
1cc541f5
...
@@ -240,4 +240,5 @@ public interface GroupQrcodeBiz {
...
@@ -240,4 +240,5 @@ public interface GroupQrcodeBiz {
void
updateRoomManager
(
UpdateRoomManagerVO
updateRoomManagerVO
);
void
updateRoomManager
(
UpdateRoomManagerVO
updateRoomManagerVO
);
ClassifyQrcodeVO
getGroupQrcodeInfo
(
String
groupQrCode
,
Long
classifyId
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/BookGroupClassifyBizImpl.java
View file @
1cc541f5
package
com
.
pcloud
.
book
.
group
.
biz
.
impl
;
package
com
.
pcloud
.
book
.
group
.
biz
.
impl
;
import
com.google.common.collect.Maps
;
import
com.pcloud.book.base.exception.BookBizException
;
import
com.pcloud.book.base.exception.BookBizException
;
import
com.pcloud.book.book.constant.BookConstant
;
import
com.pcloud.book.book.constant.BookConstant
;
import
com.pcloud.book.book.dao.BookDao
;
import
com.pcloud.book.consumer.common.ExportConsr
;
import
com.pcloud.book.consumer.common.ExportConsr
;
import
com.pcloud.book.consumer.message.MessageConsr
;
import
com.pcloud.book.consumer.message.MessageConsr
;
import
com.pcloud.book.consumer.promotion.PromotionConsr
;
import
com.pcloud.book.consumer.promotion.PromotionConsr
;
...
@@ -67,6 +69,7 @@ import com.pcloud.book.group.vo.ListBookGroupQrcodeParamVO;
...
@@ -67,6 +69,7 @@ import com.pcloud.book.group.vo.ListBookGroupQrcodeParamVO;
import
com.pcloud.book.group.vo.ListClassify4WechatVO
;
import
com.pcloud.book.group.vo.ListClassify4WechatVO
;
import
com.pcloud.book.group.vo.ListClassifyVO
;
import
com.pcloud.book.group.vo.ListClassifyVO
;
import
com.pcloud.book.group.vo.ListGroupClassifyParam
;
import
com.pcloud.book.group.vo.ListGroupClassifyParam
;
import
com.pcloud.book.group.vo.PcloudBookGroupClassifyVO
;
import
com.pcloud.book.group.vo.StatisticVO
;
import
com.pcloud.book.group.vo.StatisticVO
;
import
com.pcloud.book.group.vo.SyncKeyworsVO
;
import
com.pcloud.book.group.vo.SyncKeyworsVO
;
import
com.pcloud.book.group.vo.UpdateClassifyVO
;
import
com.pcloud.book.group.vo.UpdateClassifyVO
;
...
@@ -96,7 +99,7 @@ import com.pcloud.resourcecenter.product.entity.Specification;
...
@@ -96,7 +99,7 @@ import com.pcloud.resourcecenter.product.entity.Specification;
import
com.pcloud.wechatgroup.group.dto.GroupMemberStatisDTO
;
import
com.pcloud.wechatgroup.group.dto.GroupMemberStatisDTO
;
import
com.pcloud.wechatgroup.group.dto.GroupRobotDTO
;
import
com.pcloud.wechatgroup.group.dto.GroupRobotDTO
;
import
com.pcloud.wechatgroup.message.dto.GroupChatCountDTO
;
import
com.pcloud.wechatgroup.message.dto.GroupChatCountDTO
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.collections.MapUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -109,7 +112,6 @@ import org.springframework.util.CollectionUtils;
...
@@ -109,7 +112,6 @@ import org.springframework.util.CollectionUtils;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -119,8 +121,6 @@ import java.util.Objects;
...
@@ -119,8 +121,6 @@ import java.util.Objects;
import
java.util.Optional
;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
lombok.extern.slf4j.Slf4j
;
/**
/**
* @author lily
* @author lily
* @date 2019/4/17 11:20
* @date 2019/4/17 11:20
...
@@ -189,6 +189,8 @@ public class BookGroupClassifyBizImpl implements BookGroupClassifyBiz {
...
@@ -189,6 +189,8 @@ public class BookGroupClassifyBizImpl implements BookGroupClassifyBiz {
private
BookGroupAppBiz
bookGroupAppBiz
;
private
BookGroupAppBiz
bookGroupAppBiz
;
@Autowired
@Autowired
private
KeywordDao
keywordDao
;
private
KeywordDao
keywordDao
;
@Autowired
private
BookDao
bookDao
;
@Override
@Override
...
@@ -1329,11 +1331,8 @@ public class BookGroupClassifyBizImpl implements BookGroupClassifyBiz {
...
@@ -1329,11 +1331,8 @@ public class BookGroupClassifyBizImpl implements BookGroupClassifyBiz {
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"社群码不存在,请刷新后重试"
);
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"社群码不存在,请刷新后重试"
);
}
}
//获取用户是否分配过二维码
GroupQrcode4ClassifyVO
groupQrcode4ClassifyVO
=
bookQrcodeUserDao
.
getUserQrcode
(
classifyId
,
wechatUserId
);
if
(
groupQrcode4ClassifyVO
==
null
)
{
//获取分类对应的二维码
//获取分类对应的二维码
groupQrcode4ClassifyVO
=
bookGroupClassifyDao
.
getClassifyQrcode
(
classifyId
,
classify
.
getChangeNumber
());
GroupQrcode4ClassifyVO
groupQrcode4ClassifyVO
=
bookGroupClassifyDao
.
getClassifyQrcode
(
classifyId
,
classify
.
getChangeNumber
());
if
(
groupQrcode4ClassifyVO
==
null
)
{
if
(
groupQrcode4ClassifyVO
==
null
)
{
groupQrcode4ClassifyVO
=
new
GroupQrcode4ClassifyVO
();
groupQrcode4ClassifyVO
=
new
GroupQrcode4ClassifyVO
();
groupQrcode4ClassifyVO
.
setClassifyId
(
classifyId
);
groupQrcode4ClassifyVO
.
setClassifyId
(
classifyId
);
...
@@ -1350,10 +1349,26 @@ public class BookGroupClassifyBizImpl implements BookGroupClassifyBiz {
...
@@ -1350,10 +1349,26 @@ public class BookGroupClassifyBizImpl implements BookGroupClassifyBiz {
LOGGER
.
error
(
"已存在该用户!"
);
LOGGER
.
error
(
"已存在该用户!"
);
}
}
}
}
}
String
spareQr
=
getSpareQr
(
classify
.
getBookGroupId
());
String
spareQr
=
getSpareQr
(
classify
.
getBookGroupId
());
groupQrcode4ClassifyVO
.
setSpareQr
(
spareQr
);
groupQrcode4ClassifyVO
.
setSpareQr
(
spareQr
);
groupQrcode4ClassifyVO
.
setClassify
(
classify
.
getClassify
());
groupQrcode4ClassifyVO
.
setClassify
(
classify
.
getClassify
());
return
groupQrcode4ClassifyVO
;
return
groupQrcode4ClassifyVO
;
}
}
@Override
public
PageBeanNew
<
PcloudBookGroupClassifyVO
>
listGroupClassify4Pcloud
(
String
name
,
Long
proLabelId
,
Long
depLabelId
,
Integer
currentPage
,
Integer
numPerPage
)
{
// 根据数命查bookid
List
<
Long
>
ids
=
new
ArrayList
<>();
if
(!
StringUtil
.
isEmpty
(
name
)){
ids
=
bookDao
.
getBookIdsByBookName
(
name
);
}
PageParam
pageParam
=
new
PageParam
(
currentPage
,
numPerPage
);
final
Map
<
String
,
Object
>
map
=
Maps
.
newHashMap
();
map
.
put
(
"list"
,
ids
);
map
.
put
(
"name"
,
StringUtil
.
isEmpty
(
name
)
?
null
:
name
);
map
.
put
(
"proLabelId"
,
proLabelId
);
map
.
put
(
"depLabelId"
,
depLabelId
);
return
bookGroupClassifyDao
.
listPageNew
(
pageParam
,
map
,
"listGroupClassify4Pcloud"
);
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/GroupQrcodeBizImpl.java
View file @
1cc541f5
...
@@ -259,8 +259,8 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
...
@@ -259,8 +259,8 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
if
(
qrcodeVO
.
getUserNumber
()
<
classify
.
getChangeNumber
())
{
if
(
qrcodeVO
.
getUserNumber
()
<
classify
.
getChangeNumber
())
{
return
qrcodeVO
.
getQrcodeUrl
();
return
qrcodeVO
.
getQrcodeUrl
();
}
else
{
}
else
{
//将二维码修改为已满群状态
//将二维码修改为已满群状态
微信将群人数限制扩充到200
if
(
qrcodeVO
.
getUserNumber
()
>=
1
00
)
{
if
(
qrcodeVO
.
getUserNumber
()
>=
2
00
)
{
changeToOverNumber
(
qrcodeVO
.
getWeixinQrcodeId
(),
qrcodeVO
.
getId
());
changeToOverNumber
(
qrcodeVO
.
getWeixinQrcodeId
(),
qrcodeVO
.
getId
());
}
}
// 更新二维码状态
// 更新二维码状态
...
@@ -275,8 +275,8 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
...
@@ -275,8 +275,8 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
List
<
ClassifyQrcodeVO
>
canUserQrcode
=
Lists
.
newArrayList
();
List
<
ClassifyQrcodeVO
>
canUserQrcode
=
Lists
.
newArrayList
();
for
(
ClassifyQrcodeVO
vo
:
collect
)
{
for
(
ClassifyQrcodeVO
vo
:
collect
)
{
if
(
vo
.
getUserNumber
()
>=
classify
.
getChangeNumber
())
{
if
(
vo
.
getUserNumber
()
>=
classify
.
getChangeNumber
())
{
//将二维码修改为已满群状态
//将二维码修改为已满群状态
微信将群人数限制扩充到200
if
(
vo
.
getUserNumber
()
>=
1
00
)
{
if
(
vo
.
getUserNumber
()
>=
2
00
)
{
changeToOverNumber
(
vo
.
getWeixinQrcodeId
(),
vo
.
getId
());
changeToOverNumber
(
vo
.
getWeixinQrcodeId
(),
vo
.
getId
());
}
}
// 更新二维码状态
// 更新二维码状态
...
@@ -981,4 +981,22 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
...
@@ -981,4 +981,22 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
momentsDTO
.
setMomentType
(
BusinessConstant
.
MomentTypeEnum
.
SET_GROUP_ADMIN
);
momentsDTO
.
setMomentType
(
BusinessConstant
.
MomentTypeEnum
.
SET_GROUP_ADMIN
);
WxGroupSDK
.
sendMessageToPhone
(
momentsDTO
);
WxGroupSDK
.
sendMessageToPhone
(
momentsDTO
);
}
}
@Override
public
ClassifyQrcodeVO
getGroupQrcodeInfo
(
String
groupQrCode
,
Long
classifyId
)
{
List
<
ClassifyQrcodeVO
>
qrcodeVOS
=
groupQrcodeDao
.
getQrcodeByClassifyId
(
classifyId
);
for
(
ClassifyQrcodeVO
qrcodeVO
:
qrcodeVOS
)
{
if
(!
StringUtil
.
isEmpty
(
groupQrCode
)
&&
qrcodeVO
.
getQrcodeUrl
().
equals
(
groupQrCode
)){
return
qrcodeVO
;
}
}
ClassifyQrcodeVO
ret
=
qrcodeVOS
.
get
(
0
);
for
(
ClassifyQrcodeVO
qrcodeVO
:
qrcodeVOS
)
{
if
(
ret
.
getCreatedTime
()
!=
null
&&
qrcodeVO
.
getCreatedTime
()!=
null
&&
ret
.
getCreatedTime
().
before
(
qrcodeVO
.
getCreatedTime
())){
ret
=
qrcodeVO
;
}
}
return
ret
;
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/facade/BookGroupClassifyFacade.java
View file @
1cc541f5
...
@@ -17,6 +17,7 @@ import com.pcloud.book.group.vo.ListBookGroupQrcodeParamVO;
...
@@ -17,6 +17,7 @@ import com.pcloud.book.group.vo.ListBookGroupQrcodeParamVO;
import
com.pcloud.book.group.vo.ListClassify4WechatVO
;
import
com.pcloud.book.group.vo.ListClassify4WechatVO
;
import
com.pcloud.book.group.vo.ListClassifyVO
;
import
com.pcloud.book.group.vo.ListClassifyVO
;
import
com.pcloud.book.group.vo.ListGroupClassifyParam
;
import
com.pcloud.book.group.vo.ListGroupClassifyParam
;
import
com.pcloud.book.group.vo.PcloudBookGroupClassifyVO
;
import
com.pcloud.book.group.vo.StatisticVO
;
import
com.pcloud.book.group.vo.StatisticVO
;
import
com.pcloud.book.group.vo.UpdateClassifyVO
;
import
com.pcloud.book.group.vo.UpdateClassifyVO
;
import
com.pcloud.book.group.vo.UpdateRankVO
;
import
com.pcloud.book.group.vo.UpdateRankVO
;
...
@@ -24,10 +25,11 @@ import com.pcloud.common.dto.ResponseDto;
...
@@ -24,10 +25,11 @@ import com.pcloud.common.dto.ResponseDto;
import
com.pcloud.common.exceptions.BizException
;
import
com.pcloud.common.exceptions.BizException
;
import
com.pcloud.common.page.PageBeanNew
;
import
com.pcloud.common.page.PageBeanNew
;
import
com.pcloud.common.permission.PermissionException
;
import
com.pcloud.common.permission.PermissionException
;
import
com.pcloud.common.utils.ResponseHandleUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
org.springframework.beans.BeanUtils
;
import
io.swagger.annotations.ApiImplicitParams
;
import
org.springframework.http.ResponseEntity
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.web.bind.annotation.CookieValue
;
import
org.springframework.web.bind.annotation.CookieValue
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
...
@@ -40,12 +42,6 @@ import org.springframework.web.bind.annotation.RequestParam;
...
@@ -40,12 +42,6 @@ import org.springframework.web.bind.annotation.RequestParam;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
/**
/**
* @author lily
* @author lily
* @date 2019/4/16 21:00
* @date 2019/4/16 21:00
...
@@ -268,4 +264,18 @@ public interface BookGroupClassifyFacade {
...
@@ -268,4 +264,18 @@ public interface BookGroupClassifyFacade {
@GetMapping
(
"getQrcodeInfo4Heals"
)
@GetMapping
(
"getQrcodeInfo4Heals"
)
ResponseDto
<
GroupQrcode4ClassifyDTO
>
getQrcodeInfo4Heals
(
@RequestParam
(
"wechatUserId"
)
Long
wechatUserId
,
ResponseDto
<
GroupQrcode4ClassifyDTO
>
getQrcodeInfo4Heals
(
@RequestParam
(
"wechatUserId"
)
Long
wechatUserId
,
@RequestParam
(
"classifyId"
)
Long
classifyId
)
throws
BizException
;
@RequestParam
(
"classifyId"
)
Long
classifyId
)
throws
BizException
;
@ApiOperation
(
"平台端获取群分类"
)
@GetMapping
(
"listGroupClassify4Pcloud"
)
ResponseDto
<
PageBeanNew
<
PcloudBookGroupClassifyVO
>>
listGroupClassify4Pcloud
(
@RequestHeader
(
"token"
)
@ApiParam
(
"token信息"
)
String
token
,
@RequestParam
(
value
=
"name"
,
required
=
false
)
@ApiParam
(
"群分类名 | 书刊名"
)
String
name
,
@RequestParam
(
value
=
"proLabelId"
,
required
=
false
)
@ApiParam
(
"专业标签"
)
Long
proLabelId
,
@RequestParam
(
value
=
"depLabelId"
,
required
=
false
)
@ApiParam
(
"深度标签"
)
Long
depLabelId
,
@RequestParam
(
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
"numPerPage"
)
Integer
numPerPage
)
throws
BizException
,
PermissionException
;
@ApiOperation
(
"根据群分类ID获取群二维码"
)
@GetMapping
(
"getGroupQrcodeByClassify"
)
ResponseDto
<
String
>
getGroupQrcodeByClassify
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
"classifyId"
)
Integer
classifyId
)
throws
BizException
,
PermissionException
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/facade/impl/BookGroupClassifyFacadeImpl.java
View file @
1cc541f5
...
@@ -2,6 +2,7 @@ package com.pcloud.book.group.facade.impl;
...
@@ -2,6 +2,7 @@ package com.pcloud.book.group.facade.impl;
import
com.pcloud.book.group.biz.BookGroupBiz
;
import
com.pcloud.book.group.biz.BookGroupBiz
;
import
com.pcloud.book.group.biz.BookGroupClassifyBiz
;
import
com.pcloud.book.group.biz.BookGroupClassifyBiz
;
import
com.pcloud.book.group.biz.GroupQrcodeBiz
;
import
com.pcloud.book.group.dto.BookGroupClassifyDTO
;
import
com.pcloud.book.group.dto.BookGroupClassifyDTO
;
import
com.pcloud.book.group.dto.GroupQrcode4ClassifyDTO
;
import
com.pcloud.book.group.dto.GroupQrcode4ClassifyDTO
;
import
com.pcloud.book.group.facade.BookGroupClassifyFacade
;
import
com.pcloud.book.group.facade.BookGroupClassifyFacade
;
...
@@ -44,6 +45,8 @@ public class BookGroupClassifyFacadeImpl implements BookGroupClassifyFacade {
...
@@ -44,6 +45,8 @@ public class BookGroupClassifyFacadeImpl implements BookGroupClassifyFacade {
private
BookGroupClassifyBiz
bookGroupClassifyBiz
;
private
BookGroupClassifyBiz
bookGroupClassifyBiz
;
@Autowired
@Autowired
private
BookGroupBiz
bookGroupBiz
;
private
BookGroupBiz
bookGroupBiz
;
@Autowired
private
GroupQrcodeBiz
groupQrcodeBiz
;
@Override
@Override
@GetMapping
(
"listAllClassify"
)
@GetMapping
(
"listAllClassify"
)
...
@@ -289,4 +292,25 @@ public class BookGroupClassifyFacadeImpl implements BookGroupClassifyFacade {
...
@@ -289,4 +292,25 @@ public class BookGroupClassifyFacadeImpl implements BookGroupClassifyFacade {
}
}
return
new
ResponseDto
<>(
groupQrcode4ClassifyDTO
);
return
new
ResponseDto
<>(
groupQrcode4ClassifyDTO
);
}
}
@Override
@GetMapping
(
"listGroupClassify4Pcloud"
)
public
ResponseDto
<
PageBeanNew
<
PcloudBookGroupClassifyVO
>>
listGroupClassify4Pcloud
(
@RequestHeader
(
"token"
)
@ApiParam
(
"token信息"
)
String
token
,
@RequestParam
(
value
=
"name"
,
required
=
false
)
@ApiParam
(
"群分类名 | 书刊名"
)
String
name
,
@RequestParam
(
value
=
"proLabelId"
,
required
=
false
)
@ApiParam
(
"专业标签"
)
Long
proLabelId
,
@RequestParam
(
value
=
"depLabelId"
,
required
=
false
)
@ApiParam
(
"深度标签"
)
Long
depLabelId
,
@RequestParam
(
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
"numPerPage"
)
Integer
numPerPage
)
throws
BizException
,
PermissionException
{
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
return
new
ResponseDto
<>(
bookGroupClassifyBiz
.
listGroupClassify4Pcloud
(
name
,
proLabelId
,
depLabelId
,
currentPage
,
numPerPage
));
}
@Override
@GetMapping
(
"getGroupQrcodeByClassify"
)
public
ResponseDto
<
String
>
getGroupQrcodeByClassify
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
"classifyId"
)
Integer
classifyId
)
throws
BizException
,
PermissionException
{
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
return
new
ResponseDto
<>(
groupQrcodeBiz
.
getChangeGroupQrCode
(
Long
.
valueOf
(
classifyId
)));
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/vo/PcloudBookGroupClassifyVO.java
0 → 100644
View file @
1cc541f5
package
com
.
pcloud
.
book
.
group
.
vo
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.math.BigDecimal
;
/**
* @ClassName com.pcloud.book.group.vo.PcloudBookGroupClassifyVO
* @Author guiq
* @Description 平台获取群分类信息
* @Date 2020/6/10 15:54
* @Version 1.0
**/
@ApiModel
@JsonInclude
(
JsonInclude
.
Include
.
NON_NULL
)
public
class
PcloudBookGroupClassifyVO
{
@ApiModelProperty
(
"群分类ID"
)
private
Integer
id
;
@ApiModelProperty
(
"群分类名称"
)
private
String
classify
;
@ApiModelProperty
(
"群分类介绍"
)
private
String
classifyIntroduce
;
@ApiModelProperty
(
"销售价"
)
private
BigDecimal
price
;
@ApiModelProperty
(
"群个数"
)
private
Integer
groupCount
;
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
String
getClassify
()
{
return
classify
;
}
public
void
setClassify
(
String
classify
)
{
this
.
classify
=
classify
;
}
public
String
getClassifyIntroduce
()
{
return
classifyIntroduce
;
}
public
void
setClassifyIntroduce
(
String
classifyIntroduce
)
{
this
.
classifyIntroduce
=
classifyIntroduce
;
}
public
BigDecimal
getPrice
()
{
return
price
;
}
public
void
setPrice
(
BigDecimal
price
)
{
this
.
price
=
price
;
}
public
Integer
getGroupCount
()
{
return
groupCount
;
}
public
void
setGroupCount
(
Integer
groupCount
)
{
this
.
groupCount
=
groupCount
;
}
@Override
public
String
toString
()
{
return
"PcloudBookGroupClassifyVO{"
+
"id="
+
id
+
", classify='"
+
classify
+
'\''
+
", classifyIntroduce='"
+
classifyIntroduce
+
'\''
+
", price="
+
price
+
", groupCount="
+
groupCount
+
'}'
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
View file @
1cc541f5
...
@@ -2,7 +2,6 @@ package com.pcloud.book.rightsSetting.biz.impl;
...
@@ -2,7 +2,6 @@ package com.pcloud.book.rightsSetting.biz.impl;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.pcloud.appcenter.app.dto.AppDto
;
import
com.pcloud.appcenter.app.dto.AppDto
;
import
com.pcloud.appcenter.assist.dto.AssistTempletDTO
;
import
com.pcloud.appcenter.assist.dto.AssistTempletDTO
;
import
com.pcloud.book.applet.biz.AppletGroupSearchRecordBiz
;
import
com.pcloud.book.applet.biz.AppletGroupSearchRecordBiz
;
...
@@ -32,9 +31,11 @@ import com.pcloud.book.custom.entity.CustomPlan;
...
@@ -32,9 +31,11 @@ import com.pcloud.book.custom.entity.CustomPlan;
import
com.pcloud.book.custom.mapper.CustomPlanMapper
;
import
com.pcloud.book.custom.mapper.CustomPlanMapper
;
import
com.pcloud.book.giftcoupon.dao.GiftReceiveDao
;
import
com.pcloud.book.giftcoupon.dao.GiftReceiveDao
;
import
com.pcloud.book.group.biz.BookGroupBiz
;
import
com.pcloud.book.group.biz.BookGroupBiz
;
import
com.pcloud.book.group.biz.GroupQrcodeBiz
;
import
com.pcloud.book.group.dto.BookServeDTO
;
import
com.pcloud.book.group.dto.BookServeDTO
;
import
com.pcloud.book.group.enums.AppAndProductTypeEnum
;
import
com.pcloud.book.group.enums.AppAndProductTypeEnum
;
import
com.pcloud.book.group.tools.SendWeixinRequestTools
;
import
com.pcloud.book.group.tools.SendWeixinRequestTools
;
import
com.pcloud.book.group.vo.ClassifyQrcodeVO
;
import
com.pcloud.book.rightsSetting.biz.RightsSettingBiz
;
import
com.pcloud.book.rightsSetting.biz.RightsSettingBiz
;
import
com.pcloud.book.rightsSetting.check.RightsSettingCheck
;
import
com.pcloud.book.rightsSetting.check.RightsSettingCheck
;
import
com.pcloud.book.rightsSetting.constants.RightsSettingConstant
;
import
com.pcloud.book.rightsSetting.constants.RightsSettingConstant
;
...
@@ -82,8 +83,7 @@ import com.pcloud.common.utils.cache.redis.JedisClusterUtils;
...
@@ -82,8 +83,7 @@ import com.pcloud.common.utils.cache.redis.JedisClusterUtils;
import
com.pcloud.common.utils.string.StringUtil
;
import
com.pcloud.common.utils.string.StringUtil
;
import
com.pcloud.common.utils.string.StringUtilParent
;
import
com.pcloud.common.utils.string.StringUtilParent
;
import
com.pcloud.resourcecenter.product.dto.ProductDto
;
import
com.pcloud.resourcecenter.product.dto.ProductDto
;
import
lombok.extern.slf4j.Slf4j
;
import
java.util.Iterator
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.apache.commons.lang3.ArrayUtils
;
...
@@ -96,6 +96,7 @@ import java.util.ArrayList;
...
@@ -96,6 +96,7 @@ import java.util.ArrayList;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.Objects
;
...
@@ -103,8 +104,6 @@ import java.util.Random;
...
@@ -103,8 +104,6 @@ import java.util.Random;
import
java.util.function.Function
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
lombok.extern.slf4j.Slf4j
;
@Service
@Service
@Slf4j
@Slf4j
public
class
RightsSettingBizImpl
implements
RightsSettingBiz
{
public
class
RightsSettingBizImpl
implements
RightsSettingBiz
{
...
@@ -172,6 +171,8 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
...
@@ -172,6 +171,8 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
private
AppletUserBookcaseBiz
appletUserBookcaseBiz
;
private
AppletUserBookcaseBiz
appletUserBookcaseBiz
;
@Autowired
@Autowired
private
RightsSettingBookRelationMapper
rightsSettingBookRelationMapper
;
private
RightsSettingBookRelationMapper
rightsSettingBookRelationMapper
;
@Autowired
private
GroupQrcodeBiz
groupQrcodeBiz
;
@Override
@Override
@ParamLog
(
"新增权益设置"
)
@ParamLog
(
"新增权益设置"
)
...
@@ -844,6 +845,15 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
...
@@ -844,6 +845,15 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
String
filterStr
=
StringUtilParent
.
replaceHtml
(
groupActivity4AppletDTO
.
getDesc
());
String
filterStr
=
StringUtilParent
.
replaceHtml
(
groupActivity4AppletDTO
.
getDesc
());
String
subStr
=
filterStr
.
length
()
>
60
?
filterStr
.
substring
(
0
,
60
)
+
"..."
:
filterStr
;
String
subStr
=
filterStr
.
length
()
>
60
?
filterStr
.
substring
(
0
,
60
)
+
"..."
:
filterStr
;
groupActivity4AppletDTO
.
setCutDesc
(
subStr
);
groupActivity4AppletDTO
.
setCutDesc
(
subStr
);
// 通过群分类ID获取群二维码
Long
classifyId
=
groupActivity4AppletDTO
.
getClassifyId
();
String
groupQrCode
=
groupQrcodeBiz
.
getChangeGroupQrCode
(
classifyId
);
// 通过群二维码链接反查群ID 并补充信息
ClassifyQrcodeVO
groupQrcodeInfo
=
groupQrcodeBiz
.
getGroupQrcodeInfo
(
groupQrCode
,
classifyId
);
groupActivity4AppletDTO
.
setBookGroupQrcodeId
(
groupQrcodeInfo
.
getId
());
groupActivity4AppletDTO
.
setGroupName
(
groupQrcodeInfo
.
getGroupName
());
groupActivity4AppletDTO
.
setGroupPic
(
groupQrcodeInfo
.
getQrcodeUrl
());
groupActivity4AppletDTO
.
setUserNumber
(
groupQrcodeInfo
.
getUserNumber
());
//头像列表从缓存里取
//头像列表从缓存里取
List
<
String
>
headUrlList
=
appletGroupSearchRecordBiz
List
<
String
>
headUrlList
=
appletGroupSearchRecordBiz
.
getHeadUrlList
(
groupActivity4AppletDTO
.
getUserNumber
(),
groupActivity4AppletDTO
.
getBookGroupQrcodeId
());
.
getHeadUrlList
(
groupActivity4AppletDTO
.
getUserNumber
(),
groupActivity4AppletDTO
.
getBookGroupQrcodeId
());
...
@@ -1163,9 +1173,9 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
...
@@ -1163,9 +1173,9 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
if
(
groupActivity4AppletDTO
!=
null
)
{
if
(
groupActivity4AppletDTO
!=
null
)
{
item
.
setGroupName
(
groupActivity4AppletDTO
.
getName
());
item
.
setGroupName
(
groupActivity4AppletDTO
.
getName
());
item
.
setGroupDesc
(
groupActivity4AppletDTO
.
getCutDesc
());
item
.
setGroupDesc
(
groupActivity4AppletDTO
.
getCutDesc
());
item
.
setGroupQrCode
(
groupActivity4AppletDTO
.
getGroupPic
());
// 填充头像
// 填充头像
fillGroupActivityHead
(
Collections
.
singletonList
(
groupActivity4AppletDTO
));
fillGroupActivityHead
(
Collections
.
singletonList
(
groupActivity4AppletDTO
));
item
.
setGroupQrCode
(
groupActivity4AppletDTO
.
getGroupPic
());
item
.
setGroupActivity4AppletDTO
(
groupActivity4AppletDTO
);
item
.
setGroupActivity4AppletDTO
(
groupActivity4AppletDTO
);
}
}
}
}
...
@@ -1476,59 +1486,6 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
...
@@ -1476,59 +1486,6 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
return
list
;
return
list
;
}
}
private
void
setGroupActivity
(
List
<
RightsSettingItem
>
list
,
List
<
Long
>
rightsSettingItemIds
)
{
if
(
ListUtils
.
isEmpty
(
list
))
{
return
;
}
List
<
GroupActivity4AppletDTO
>
groupActivity4AppletDTOList
=
null
;
// 书刊分类
BookAdviserDto
bookAdviserDto
=
bookAdviserBiz
.
getOneMainBook
(
list
.
get
(
0
).
getBookId
());
if
(
bookAdviserDto
!=
null
&&
NumberUtil
.
isNumber
(
bookAdviserDto
.
getTempletId
()))
{
BaseTempletClassify
baseTempletClassify
=
new
BaseTempletClassify
();
baseTempletClassify
.
setFirstClassify
(
bookAdviserDto
.
getTempletId
());
baseTempletClassify
.
setSecondClassify
(
bookAdviserDto
.
getSecondTempletId
());
baseTempletClassify
.
setGradeLabelId
(
bookAdviserDto
.
getGraLabelId
());
baseTempletClassify
.
setSubjectLabelId
(
bookAdviserDto
.
getSubLabelId
());
baseTempletClassify
.
setVolLabelId
(
bookAdviserDto
.
getVolLabelId
());
setClassifyAndLabel
(
baseTempletClassify
);
if
(
NumberUtil
.
isNumber
(
baseTempletClassify
.
getFirstClassify
()))
{
// 通过书刊分类拿群
groupActivity4AppletDTOList
=
pcloudGroupActivityDao
.
getTishBookSchoolList
(
baseTempletClassify
,
3
);
}
}
if
(
ListUtils
.
isEmpty
(
groupActivity4AppletDTOList
))
{
// 如果书刊没拿到群,则通过权益分类拿群
RightsSetting
rightsSetting
=
rightsSettingDAO
.
selectByPrimaryKey
(
list
.
get
(
0
).
getRightsSettingId
());
setClassifyAndLabel
(
rightsSetting
);
if
(
NumberUtil
.
isNumber
(
rightsSetting
.
getFirstClassify
()))
{
groupActivity4AppletDTOList
=
pcloudGroupActivityDao
.
getTishBookSchoolList
(
rightsSetting
,
3
);
}
}
if
(!
ListUtils
.
isEmpty
(
groupActivity4AppletDTOList
))
{
for
(
GroupActivity4AppletDTO
groupActivity4AppletDTO
:
groupActivity4AppletDTOList
)
{
String
filterStr
=
StringUtilParent
.
replaceHtml
(
groupActivity4AppletDTO
.
getDesc
());
String
subStr
=
filterStr
.
length
()
>
60
?
filterStr
.
substring
(
0
,
60
)
+
"..."
:
filterStr
;
groupActivity4AppletDTO
.
setCutDesc
(
subStr
);
//头像列表从缓存里取
List
<
String
>
headUrlList
=
appletGroupSearchRecordBiz
.
getHeadUrlList
(
groupActivity4AppletDTO
.
getUserNumber
(),
groupActivity4AppletDTO
.
getBookGroupQrcodeId
());
groupActivity4AppletDTO
.
setHeadUrlList
(
headUrlList
);
List
<
AppletGroupStatementDTO
>
statementDTOS
=
appletGroupSearchRecordBiz
.
getStatementList
(
groupActivity4AppletDTO
.
getUserNumber
(),
headUrlList
,
groupActivity4AppletDTO
.
getBookGroupQrcodeId
());
groupActivity4AppletDTO
.
setStatementDTOList
(
statementDTOS
);
}
for
(
RightsSettingItem
rightsSettingItem
:
list
)
{
if
(
rightsSettingItemIds
.
contains
(
rightsSettingItem
.
getId
()))
{
rightsSettingItem
.
setGroupActivity4AppletList
(
groupActivity4AppletDTOList
);
}
// 小程序兼容处理,新版发布后,可删除
rightsSettingItem
.
setGroupActivity4AppletDTO
(
groupActivity4AppletDTOList
.
get
(
0
));
}
}
}
private
List
<
RightsSettingItem
>
setReadPlan4Week
(
List
<
RightsCustomRelation
>
rightsCustomRelations
,
List
<
RightsSettingItem
>
list
)
{
private
List
<
RightsSettingItem
>
setReadPlan4Week
(
List
<
RightsCustomRelation
>
rightsCustomRelations
,
List
<
RightsSettingItem
>
list
)
{
log
.
info
(
"为每周权益设置读书计划"
);
log
.
info
(
"为每周权益设置读书计划"
);
if
(
ListUtils
.
isEmpty
(
list
)
||
ListUtils
.
isEmpty
(
rightsCustomRelations
))
{
if
(
ListUtils
.
isEmpty
(
list
)
||
ListUtils
.
isEmpty
(
rightsCustomRelations
))
{
...
@@ -1735,7 +1692,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
...
@@ -1735,7 +1692,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
}
}
if
(
NumberUtil
.
isNumber
(
baseTempletClassify
.
getFirstClassify
()))
{
if
(
NumberUtil
.
isNumber
(
baseTempletClassify
.
getFirstClassify
()))
{
// 通过书刊分类拿群
// 通过书刊分类拿群
groupActivity4AppletDTOList
=
pcloudGroupActivity
Dao
.
getTishBookSchoolList
(
baseTempletClassify
,
top
);
groupActivity4AppletDTOList
=
pcloudGroupActivity
Biz
.
getTishBookSchoolListWrap
(
baseTempletClassify
,
top
);
}
}
}
}
...
@@ -1744,7 +1701,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
...
@@ -1744,7 +1701,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
RightsSetting
rightsSetting
=
rightsSettingDAO
.
selectByPrimaryKey
(
rightsSettingId
);
RightsSetting
rightsSetting
=
rightsSettingDAO
.
selectByPrimaryKey
(
rightsSettingId
);
setClassifyAndLabel
(
rightsSetting
);
setClassifyAndLabel
(
rightsSetting
);
if
(
NumberUtil
.
isNumber
(
rightsSetting
.
getFirstClassify
()))
{
if
(
NumberUtil
.
isNumber
(
rightsSetting
.
getFirstClassify
()))
{
groupActivity4AppletDTOList
=
pcloudGroupActivity
Dao
.
getTishBookSchoolList
(
rightsSetting
,
top
);
groupActivity4AppletDTOList
=
pcloudGroupActivity
Biz
.
getTishBookSchoolListWrap
(
rightsSetting
,
top
);
}
}
}
}
if
(!
ListUtils
.
isEmpty
(
groupActivity4AppletDTOList
))
{
if
(!
ListUtils
.
isEmpty
(
groupActivity4AppletDTOList
))
{
...
...
pcloud-service-book/src/main/java/com/pcloud/book/skill/biz/PcloudGroupActivityBiz.java
View file @
1cc541f5
package
com
.
pcloud
.
book
.
skill
.
biz
;
package
com
.
pcloud
.
book
.
skill
.
biz
;
import
com.pcloud.book.applet.dto.AppletGroupManageDTO
;
import
com.pcloud.book.applet.dto.AppletGroupManageDTO
;
import
com.pcloud.book.rightsSetting.entity.BaseTempletClassify
;
import
com.pcloud.book.skill.dto.GroupActivity4AppletDTO
;
import
com.pcloud.book.skill.dto.GroupActivity4AppletDTO
;
import
com.pcloud.book.skill.dto.UpdateActivityShowStateDTO
;
import
com.pcloud.book.skill.facade.request.SaveGroupActivityRequestVO
;
import
com.pcloud.book.skill.facade.request.SaveGroupActivityRequestVO
;
import
com.pcloud.book.skill.facade.request.UpdateGroupActivityRequestVO
;
import
com.pcloud.book.skill.facade.request.UpdateGroupActivityRequestVO
;
import
com.pcloud.book.skill.facade.response.QueryGroupActivityResponseVO
;
import
com.pcloud.book.skill.facade.response.QueryGroupActivityResponseVO
;
...
@@ -60,4 +62,8 @@ public interface PcloudGroupActivityBiz {
...
@@ -60,4 +62,8 @@ public interface PcloudGroupActivityBiz {
* * @param null
* * @param null
*/
*/
PageBeanNew
<
AppletGroupManageDTO
>
getGroupListByBookTemplet
(
Long
firstClassify
,
Long
secondClassify
,
Long
gradeLabelId
,
Long
subjectLabelId
,
Integer
currentPage
,
Integer
numPerPage
);
PageBeanNew
<
AppletGroupManageDTO
>
getGroupListByBookTemplet
(
Long
firstClassify
,
Long
secondClassify
,
Long
gradeLabelId
,
Long
subjectLabelId
,
Integer
currentPage
,
Integer
numPerPage
);
List
<
GroupActivity4AppletDTO
>
getTishBookSchoolListWrap
(
BaseTempletClassify
baseTempletClassify
,
Integer
limit
);
void
updateActivityShowState
(
UpdateActivityShowStateDTO
showStateDTO
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/skill/biz/impl/PcloudGroupActivityBizImpl.java
View file @
1cc541f5
package
com
.
pcloud
.
book
.
skill
.
biz
.
impl
;
package
com
.
pcloud
.
book
.
skill
.
biz
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
import
com.alibaba.fastjson.JSON
;
import
com.pcloud.appcenter.assist.dto.AssistTempletDTO
;
import
com.pcloud.appcenter.assist.dto.AssistTempletDTO
;
import
com.pcloud.book.applet.biz.AppletGroupSearchRecordBiz
;
import
com.pcloud.book.applet.biz.AppletGroupSearchRecordBiz
;
import
com.pcloud.book.applet.dto.AppletGroupManageDTO
;
import
com.pcloud.book.applet.dto.AppletGroupManageDTO
;
...
@@ -18,6 +17,7 @@ import com.pcloud.book.consumer.label.LabelConsr;
...
@@ -18,6 +17,7 @@ import com.pcloud.book.consumer.label.LabelConsr;
import
com.pcloud.book.consumer.reader.ReaderConsr
;
import
com.pcloud.book.consumer.reader.ReaderConsr
;
import
com.pcloud.book.consumer.wechatgroup.WechatGroupConsr
;
import
com.pcloud.book.consumer.wechatgroup.WechatGroupConsr
;
import
com.pcloud.book.group.biz.GroupQrcodeBiz
;
import
com.pcloud.book.group.biz.GroupQrcodeBiz
;
import
com.pcloud.book.group.vo.ClassifyQrcodeVO
;
import
com.pcloud.book.group.vo.GroupQrcodeBaseInfoVO
;
import
com.pcloud.book.group.vo.GroupQrcodeBaseInfoVO
;
import
com.pcloud.book.reading.biz.ReadingActivityBiz
;
import
com.pcloud.book.reading.biz.ReadingActivityBiz
;
import
com.pcloud.book.rightsSetting.biz.RightsSettingBiz
;
import
com.pcloud.book.rightsSetting.biz.RightsSettingBiz
;
...
@@ -29,6 +29,7 @@ import com.pcloud.book.skill.biz.PcloudGroupActivityBiz;
...
@@ -29,6 +29,7 @@ import com.pcloud.book.skill.biz.PcloudGroupActivityBiz;
import
com.pcloud.book.skill.dao.PcloudGroupActivityDao
;
import
com.pcloud.book.skill.dao.PcloudGroupActivityDao
;
import
com.pcloud.book.skill.dao.PcloudSkillDao
;
import
com.pcloud.book.skill.dao.PcloudSkillDao
;
import
com.pcloud.book.skill.dto.GroupActivity4AppletDTO
;
import
com.pcloud.book.skill.dto.GroupActivity4AppletDTO
;
import
com.pcloud.book.skill.dto.UpdateActivityShowStateDTO
;
import
com.pcloud.book.skill.entity.PcloudGroupActivity
;
import
com.pcloud.book.skill.entity.PcloudGroupActivity
;
import
com.pcloud.book.skill.entity.PcloudSkill
;
import
com.pcloud.book.skill.entity.PcloudSkill
;
import
com.pcloud.book.skill.enums.SkillTypeEnum
;
import
com.pcloud.book.skill.enums.SkillTypeEnum
;
...
@@ -43,12 +44,13 @@ import com.pcloud.common.utils.string.StringUtilParent;
...
@@ -43,12 +44,13 @@ import com.pcloud.common.utils.string.StringUtilParent;
import
com.sdk.wxgroup.RobotProcessTypeEnum
;
import
com.sdk.wxgroup.RobotProcessTypeEnum
;
import
com.sdk.wxgroup.SendGroupInviteVO
;
import
com.sdk.wxgroup.SendGroupInviteVO
;
import
com.sdk.wxgroup.SendPicMessageVO
;
import
com.sdk.wxgroup.SendPicMessageVO
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.collections.MapUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -58,10 +60,6 @@ import java.util.Objects;
...
@@ -58,10 +60,6 @@ import java.util.Objects;
import
java.util.Optional
;
import
java.util.Optional
;
import
java.util.UUID
;
import
java.util.UUID
;
import
javax.annotation.Resource
;
import
lombok.extern.slf4j.Slf4j
;
@Slf4j
@Slf4j
@Service
@Service
public
class
PcloudGroupActivityBizImpl
implements
PcloudGroupActivityBiz
{
public
class
PcloudGroupActivityBizImpl
implements
PcloudGroupActivityBiz
{
...
@@ -149,8 +147,10 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz {
...
@@ -149,8 +147,10 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz {
String
messageGroup
=
UUID
.
randomUUID
().
toString
();
String
messageGroup
=
UUID
.
randomUUID
().
toString
();
Integer
index
=
0
;
Integer
index
=
0
;
if
(
0
==
byId
.
getJoinType
())
{
if
(
0
==
byId
.
getJoinType
())
{
GroupQrcodeBaseInfoVO
groupQrcode
=
groupQrcodeBiz
.
getBaseById
(
byId
.
getBookGroupQrcodeId
());
// 更新获取群二维码的方式
if
(
Objects
.
isNull
(
groupQrcode
))
{
String
groupQrCode
=
groupQrcodeBiz
.
getChangeGroupQrCode
(
byId
.
getBookGroupClassifyId
());
ClassifyQrcodeVO
groupQrcodeInfo
=
groupQrcodeBiz
.
getGroupQrcodeInfo
(
groupQrCode
,
byId
.
getBookGroupClassifyId
());
if
(
Objects
.
isNull
(
groupQrcodeInfo
))
{
log
.
error
(
"[processGroup] error 共读对应社群不存在"
);
log
.
error
(
"[processGroup] error 共读对应社群不存在"
);
return
;
return
;
}
}
...
@@ -158,7 +158,7 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz {
...
@@ -158,7 +158,7 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz {
vo
.
setWxId
(
wxId
);
vo
.
setWxId
(
wxId
);
vo
.
setAltId
(
robotWxId
);
vo
.
setAltId
(
robotWxId
);
vo
.
setIp
(
readingActivityBiz
.
getIP
(
robotWxId
));
vo
.
setIp
(
readingActivityBiz
.
getIP
(
robotWxId
));
vo
.
setWxGroupId
(
groupQrcode
.
getWeixinGroupId
());
vo
.
setWxGroupId
(
groupQrcode
Info
.
getWeixinGroupId
());
vo
.
setCounts
(
count
);
vo
.
setCounts
(
count
);
vo
.
setMessageGroupId
(
messageGroup
);
vo
.
setMessageGroupId
(
messageGroup
);
vo
.
setIndex
(
index
);
vo
.
setIndex
(
index
);
...
@@ -168,7 +168,8 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz {
...
@@ -168,7 +168,8 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz {
}
}
if
(
1
==
byId
.
getJoinType
())
{
if
(
1
==
byId
.
getJoinType
())
{
SendPicMessageVO
vo
=
new
SendPicMessageVO
();
SendPicMessageVO
vo
=
new
SendPicMessageVO
();
vo
.
setPicUrl
(
byId
.
getGroupPic
());
// 更新获取群二维码的方式
vo
.
setPicUrl
(
groupQrcodeBiz
.
getChangeGroupQrCode
(
byId
.
getBookGroupClassifyId
()));
vo
.
setWxGroupId
(
wxId
);
vo
.
setWxGroupId
(
wxId
);
vo
.
setAltId
(
robotWxId
);
vo
.
setAltId
(
robotWxId
);
vo
.
setIp
(
readingActivityBiz
.
getIP
(
robotWxId
));
vo
.
setIp
(
readingActivityBiz
.
getIP
(
robotWxId
));
...
@@ -314,9 +315,13 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz {
...
@@ -314,9 +315,13 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz {
String
subStr
=
filterStr
.
length
()
>
60
?
filterStr
.
substring
(
0
,
60
)
+
"..."
:
filterStr
;
String
subStr
=
filterStr
.
length
()
>
60
?
filterStr
.
substring
(
0
,
60
)
+
"..."
:
filterStr
;
groupActivity4AppletDTO
.
setCutDesc
(
subStr
);
groupActivity4AppletDTO
.
setCutDesc
(
subStr
);
//头像列表从缓存里取
//头像列表从缓存里取
List
<
String
>
headUrlList
=
appletGroupSearchRecordBiz
.
getHeadUrlList
(
groupActivity4AppletDTO
.
getUserNumber
(),
groupActivity4AppletDTO
.
getBookGroupQrcodeId
());
// 通过 classifyId 获取群二维码链接
String
groupQrCode
=
groupQrcodeBiz
.
getChangeGroupQrCode
(
groupActivity4AppletDTO
.
getClassifyId
());
// 通过群二维码链接反查群ID
ClassifyQrcodeVO
groupQrcodeInfo
=
groupQrcodeBiz
.
getGroupQrcodeInfo
(
groupQrCode
,
groupActivity4AppletDTO
.
getClassifyId
());
List
<
String
>
headUrlList
=
appletGroupSearchRecordBiz
.
getHeadUrlList
(
groupQrcodeInfo
.
getUserNumber
(),
groupQrcodeInfo
.
getId
());
groupActivity4AppletDTO
.
setHeadUrlList
(
headUrlList
);
groupActivity4AppletDTO
.
setHeadUrlList
(
headUrlList
);
List
<
AppletGroupStatementDTO
>
statementDTOS
=
appletGroupSearchRecordBiz
.
getStatementList
(
group
Activity4AppletDTO
.
getUserNumber
(),
headUrlList
,
groupActivity4AppletDTO
.
getBookGroupQrcode
Id
());
List
<
AppletGroupStatementDTO
>
statementDTOS
=
appletGroupSearchRecordBiz
.
getStatementList
(
group
QrcodeInfo
.
getUserNumber
(),
headUrlList
,
groupQrcodeInfo
.
get
Id
());
groupActivity4AppletDTO
.
setStatementDTOList
(
statementDTOS
);
groupActivity4AppletDTO
.
setStatementDTOList
(
statementDTOS
);
return
groupActivity4AppletDTO
;
return
groupActivity4AppletDTO
;
}
}
...
@@ -363,12 +368,47 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz {
...
@@ -363,12 +368,47 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz {
String
filterStr
=
StringUtilParent
.
replaceHtml
(
activity4AppletDTO
.
getDesc
());
String
filterStr
=
StringUtilParent
.
replaceHtml
(
activity4AppletDTO
.
getDesc
());
String
subStr
=
filterStr
.
length
()
>
60
?
filterStr
.
substring
(
0
,
60
)
+
"..."
:
filterStr
;
String
subStr
=
filterStr
.
length
()
>
60
?
filterStr
.
substring
(
0
,
60
)
+
"..."
:
filterStr
;
activity4AppletDTO
.
setCutDesc
(
subStr
);
activity4AppletDTO
.
setCutDesc
(
subStr
);
// 通过 classifyId 获取群二维码链接
String
groupQrCode
=
groupQrcodeBiz
.
getChangeGroupQrCode
(
activity4AppletDTO
.
getClassifyId
());
// 通过群二维码链接反查群ID
ClassifyQrcodeVO
groupQrcodeInfo
=
groupQrcodeBiz
.
getGroupQrcodeInfo
(
groupQrCode
,
activity4AppletDTO
.
getClassifyId
());
//头像、对话
//头像、对话
List
<
String
>
headUrlList
=
appletGroupSearchRecordBiz
.
getHeadUrlList
(
activity4AppletDTO
.
getUserNumber
(),
activity4AppletDTO
.
getBookGroupQrcode
Id
());
List
<
String
>
headUrlList
=
appletGroupSearchRecordBiz
.
getHeadUrlList
(
groupQrcodeInfo
.
getUserNumber
(),
groupQrcodeInfo
.
get
Id
());
activity4AppletDTO
.
setHeadUrlList
(
headUrlList
);
activity4AppletDTO
.
setHeadUrlList
(
headUrlList
);
List
<
AppletGroupStatementDTO
>
statementDTOS
=
appletGroupSearchRecordBiz
.
getStatementList
(
activity4AppletDTO
.
getUserNumber
(),
headUrlList
,
activity4AppletDTO
.
getBookGroupQrcode
Id
());
List
<
AppletGroupStatementDTO
>
statementDTOS
=
appletGroupSearchRecordBiz
.
getStatementList
(
groupQrcodeInfo
.
getUserNumber
(),
headUrlList
,
groupQrcodeInfo
.
get
Id
());
activity4AppletDTO
.
setStatementDTOList
(
statementDTOS
);
activity4AppletDTO
.
setStatementDTOList
(
statementDTOS
);
}
}
return
list
;
return
list
;
}
}
@Override
public
List
<
GroupActivity4AppletDTO
>
getTishBookSchoolListWrap
(
BaseTempletClassify
baseTempletClassify
,
Integer
limit
)
{
List
<
GroupActivity4AppletDTO
>
list
=
pcloudGroupActivityDao
.
getTishBookSchoolList
(
baseTempletClassify
,
limit
);
if
(!
ListUtils
.
isEmpty
(
list
))
{
for
(
GroupActivity4AppletDTO
dto
:
list
)
{
Long
classifyId
=
dto
.
getClassifyId
();
// 通过 classifyId 获取群二维码链接
String
groupQrCode
=
groupQrcodeBiz
.
getChangeGroupQrCode
(
classifyId
);
// 通过群二维码链接反查群ID
ClassifyQrcodeVO
groupQrcodeInfo
=
groupQrcodeBiz
.
getGroupQrcodeInfo
(
groupQrCode
,
classifyId
);
if
(
groupQrcodeInfo
!=
null
)
{
dto
.
setBookGroupQrcodeId
(
groupQrcodeInfo
.
getId
());
dto
.
setGroupName
(
groupQrcodeInfo
.
getGroupName
());
dto
.
setGroupPic
(
groupQrcodeInfo
.
getQrcodeUrl
());
dto
.
setUserNumber
(
groupQrcodeInfo
.
getUserNumber
());
}
}
}
return
list
;
}
@Override
public
void
updateActivityShowState
(
UpdateActivityShowStateDTO
showStateDTO
)
{
PcloudGroupActivity
byId
=
pcloudGroupActivityDao
.
getById
(
showStateDTO
.
getId
());
if
(
byId
==
null
||
byId
.
getId
()
==
null
){
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_ERROR
,
"不存在的共读活动!"
);
}
byId
.
setIsShow
(
showStateDTO
.
getIsShow
());
pcloudGroupActivityDao
.
updateByPrimaryKeySelective
(
byId
);
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/skill/dto/GroupActivity4AppletDTO.java
View file @
1cc541f5
...
@@ -64,6 +64,7 @@ public class GroupActivity4AppletDTO implements Serializable {
...
@@ -64,6 +64,7 @@ public class GroupActivity4AppletDTO implements Serializable {
@ApiModelProperty
(
"学舍群话语"
)
@ApiModelProperty
(
"学舍群话语"
)
private
List
<
AppletGroupStatementDTO
>
statementDTOList
;
private
List
<
AppletGroupStatementDTO
>
statementDTOList
;
@ApiModelProperty
(
"群分类名称"
)
private
String
classifyName
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/skill/dto/UpdateActivityShowStateDTO.java
0 → 100644
View file @
1cc541f5
package
com
.
pcloud
.
book
.
skill
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @ClassName com.pcloud.book.skill.dto.UpdateActivityShowStateDTO
* @Author guiq
* @Description 上下架
* @Date 2020/6/11 15:04
* @Version 1.0
**/
@Data
@ApiModel
(
"更新上下架状态"
)
public
class
UpdateActivityShowStateDTO
{
@ApiModelProperty
(
"主键ID"
)
private
Long
id
;
@ApiModelProperty
(
"上下架状态 1上架 0 下架"
)
private
Integer
isShow
;
}
pcloud-service-book/src/main/java/com/pcloud/book/skill/entity/PcloudGroupActivity.java
View file @
1cc541f5
package
com
.
pcloud
.
book
.
skill
.
entity
;
package
com
.
pcloud
.
book
.
skill
.
entity
;
import
com.pcloud.book.rightsSetting.entity.BaseTempletClassify
;
import
com.pcloud.book.rightsSetting.entity.BaseTempletClassify
;
import
com.pcloud.common.entity.BaseEntity
;
import
java.util.Date
;
public
class
PcloudGroupActivity
extends
BaseTempletClassify
{
public
class
PcloudGroupActivity
extends
BaseTempletClassify
{
private
static
final
long
serialVersionUID
=
-
2579070770051745966L
;
private
static
final
long
serialVersionUID
=
-
2579070770051745966L
;
...
@@ -21,7 +18,7 @@ public class PcloudGroupActivity extends BaseTempletClassify {
...
@@ -21,7 +18,7 @@ public class PcloudGroupActivity extends BaseTempletClassify {
private
Long
purLabelId
;
private
Long
purLabelId
;
private
Long
bookGroup
Qrcode
Id
;
private
Long
bookGroup
Classify
Id
;
private
String
groupName
;
private
String
groupName
;
...
@@ -31,6 +28,16 @@ public class PcloudGroupActivity extends BaseTempletClassify {
...
@@ -31,6 +28,16 @@ public class PcloudGroupActivity extends BaseTempletClassify {
private
Integer
isDelete
;
private
Integer
isDelete
;
private
Integer
isShow
;
public
Integer
getIsShow
()
{
return
isShow
;
}
public
void
setIsShow
(
Integer
isShow
)
{
this
.
isShow
=
isShow
;
}
public
String
getName
()
{
public
String
getName
()
{
return
name
;
return
name
;
}
}
...
@@ -87,12 +94,12 @@ public class PcloudGroupActivity extends BaseTempletClassify {
...
@@ -87,12 +94,12 @@ public class PcloudGroupActivity extends BaseTempletClassify {
this
.
purLabelId
=
purLabelId
;
this
.
purLabelId
=
purLabelId
;
}
}
public
Long
getBookGroup
Qrcode
Id
()
{
public
Long
getBookGroup
Classify
Id
()
{
return
bookGroup
Qrcode
Id
;
return
bookGroup
Classify
Id
;
}
}
public
void
setBookGroup
QrcodeId
(
Long
bookGroupQrcode
Id
)
{
public
void
setBookGroup
ClassifyId
(
Long
bookGroupClassify
Id
)
{
this
.
bookGroup
QrcodeId
=
bookGroupQrcode
Id
;
this
.
bookGroup
ClassifyId
=
bookGroupClassify
Id
;
}
}
public
String
getGroupName
()
{
public
String
getGroupName
()
{
...
...
pcloud-service-book/src/main/java/com/pcloud/book/skill/facade/PcloudGroupActivityFacade.java
View file @
1cc541f5
package
com
.
pcloud
.
book
.
skill
.
facade
;
package
com
.
pcloud
.
book
.
skill
.
facade
;
import
com.pcloud.book.skill.biz.PcloudGroupActivityBiz
;
import
com.pcloud.book.skill.biz.PcloudGroupActivityBiz
;
import
com.pcloud.book.skill.dto.UpdateActivityShowStateDTO
;
import
com.pcloud.book.skill.facade.request.SaveGroupActivityRequestVO
;
import
com.pcloud.book.skill.facade.request.SaveGroupActivityRequestVO
;
import
com.pcloud.book.skill.facade.request.UpdateGroupActivityRequestVO
;
import
com.pcloud.book.skill.facade.request.UpdateGroupActivityRequestVO
;
import
com.pcloud.book.skill.facade.response.QueryGroupActivityResponseVO
;
import
com.pcloud.book.skill.facade.response.QueryGroupActivityResponseVO
;
...
@@ -8,7 +9,6 @@ import com.pcloud.common.dto.ResponseDto;
...
@@ -8,7 +9,6 @@ import com.pcloud.common.dto.ResponseDto;
import
com.pcloud.common.page.PageBeanNew
;
import
com.pcloud.common.page.PageBeanNew
;
import
com.pcloud.common.permission.PermissionException
;
import
com.pcloud.common.permission.PermissionException
;
import
com.pcloud.common.utils.SessionUtil
;
import
com.pcloud.common.utils.SessionUtil
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
@@ -44,7 +44,7 @@ public class PcloudGroupActivityFacade {
...
@@ -44,7 +44,7 @@ public class PcloudGroupActivityFacade {
}
}
@GetMapping
(
"deleteGroupActivity"
)
@GetMapping
(
"deleteGroupActivity"
)
public
ResponseDto
<
Void
>
query
GroupActivity
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"id"
)
Long
id
)
throws
PermissionException
{
public
ResponseDto
<
Void
>
delete
GroupActivity
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"id"
)
Long
id
)
throws
PermissionException
{
Long
partyId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
Long
partyId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
pcloudGroupActivityBiz
.
deleteGroupActivity
(
id
,
partyId
);
pcloudGroupActivityBiz
.
deleteGroupActivity
(
id
,
partyId
);
return
new
ResponseDto
<>();
return
new
ResponseDto
<>();
...
@@ -65,4 +65,11 @@ public class PcloudGroupActivityFacade {
...
@@ -65,4 +65,11 @@ public class PcloudGroupActivityFacade {
return
new
ResponseDto
<>(
pcloudGroupActivityBiz
.
queryGroupActivity
(
name
,
proLabelId
,
purLabelId
,
depLabelId
,
joinType
,
firstClassify
,
secondClassify
,
gradeLabelId
,
subjectLabelId
,
numPerPage
,
currentPage
));
return
new
ResponseDto
<>(
pcloudGroupActivityBiz
.
queryGroupActivity
(
name
,
proLabelId
,
purLabelId
,
depLabelId
,
joinType
,
firstClassify
,
secondClassify
,
gradeLabelId
,
subjectLabelId
,
numPerPage
,
currentPage
));
}
}
@PostMapping
(
"updateActivityShowState"
)
public
ResponseDto
<
Void
>
updateActivityShowState
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
UpdateActivityShowStateDTO
showStateDTO
)
throws
PermissionException
{
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
pcloudGroupActivityBiz
.
updateActivityShowState
(
showStateDTO
);
return
new
ResponseDto
<>();
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/skill/facade/request/SaveGroupActivityRequestVO.java
View file @
1cc541f5
...
@@ -3,13 +3,9 @@ package com.pcloud.book.skill.facade.request;
...
@@ -3,13 +3,9 @@ package com.pcloud.book.skill.facade.request;
import
com.pcloud.book.base.exception.BookBizException
;
import
com.pcloud.book.base.exception.BookBizException
;
import
com.pcloud.book.rightsSetting.entity.BaseTempletClassify
;
import
com.pcloud.book.rightsSetting.entity.BaseTempletClassify
;
import
com.pcloud.book.skill.entity.PcloudGroupActivity
;
import
com.pcloud.book.skill.entity.PcloudGroupActivity
;
import
com.pcloud.common.entity.BaseRequestVO
;
import
com.pcloud.common.utils.string.StringUtil
;
import
com.pcloud.common.utils.string.StringUtil
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.util.CollectionUtils
;
import
java.util.List
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
@@ -47,14 +43,14 @@ public class SaveGroupActivityRequestVO extends BaseTempletClassify {
...
@@ -47,14 +43,14 @@ public class SaveGroupActivityRequestVO extends BaseTempletClassify {
@ApiModelProperty
(
"目的标签"
)
@ApiModelProperty
(
"目的标签"
)
private
Long
purLabelId
;
private
Long
purLabelId
;
@ApiModelProperty
(
"
社群码
id"
)
@ApiModelProperty
(
"
群分类
id"
)
private
Long
bookGroup
Qrcode
Id
;
private
Long
bookGroup
Classify
Id
;
public
void
checkParam
()
{
public
void
checkParam
()
{
if
(
StringUtil
.
isBlank
(
this
.
getName
())
if
(
StringUtil
.
isBlank
(
this
.
getName
())
||
null
==
this
.
getProLabelId
()
||
null
==
this
.
getDepLabelId
()
||
null
==
this
.
getProLabelId
()
||
null
==
this
.
getDepLabelId
()
||
null
==
this
.
getJoinType
()
||
(
this
.
getJoinType
()
==
1
&&
StringUtil
.
isBlank
(
this
.
getGroupPic
())
)
||
null
==
this
.
getJoinType
()
||
null
==
this
.
getPurLabelId
(
)
||
null
==
this
.
get
PurLabelId
()
||
null
==
this
.
getBookGroupQrcode
Id
())
{
||
null
==
this
.
get
BookGroupClassify
Id
())
{
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"请求参数缺失"
);
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"请求参数缺失"
);
}
}
}
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/skill/facade/request/UpdateGroupActivityRequestVO.java
View file @
1cc541f5
...
@@ -3,7 +3,6 @@ package com.pcloud.book.skill.facade.request;
...
@@ -3,7 +3,6 @@ package com.pcloud.book.skill.facade.request;
import
com.pcloud.book.base.exception.BookBizException
;
import
com.pcloud.book.base.exception.BookBizException
;
import
com.pcloud.book.rightsSetting.entity.BaseTempletClassify
;
import
com.pcloud.book.rightsSetting.entity.BaseTempletClassify
;
import
com.pcloud.book.skill.entity.PcloudGroupActivity
;
import
com.pcloud.book.skill.entity.PcloudGroupActivity
;
import
com.pcloud.common.entity.BaseRequestVO
;
import
com.pcloud.common.utils.string.StringUtil
;
import
com.pcloud.common.utils.string.StringUtil
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
...
@@ -47,14 +46,17 @@ public class UpdateGroupActivityRequestVO extends BaseTempletClassify {
...
@@ -47,14 +46,17 @@ public class UpdateGroupActivityRequestVO extends BaseTempletClassify {
@ApiModelProperty
(
"目的标签"
)
@ApiModelProperty
(
"目的标签"
)
private
Long
purLabelId
;
private
Long
purLabelId
;
@ApiModelProperty
(
"社群码id"
)
@ApiModelProperty
(
"群分类id"
)
private
Long
bookGroupQrcodeId
;
private
Long
bookGroupClassifyId
;
@ApiModelProperty
(
"上下架"
)
private
Long
isShow
;
public
void
checkParam
()
{
public
void
checkParam
()
{
if
(
null
==
id
||
StringUtil
.
isBlank
(
this
.
getName
())
if
(
null
==
id
||
StringUtil
.
isBlank
(
this
.
getName
())
||
null
==
this
.
getProLabelId
()
||
null
==
this
.
getDepLabelId
()
||
null
==
this
.
getProLabelId
()
||
null
==
this
.
getDepLabelId
()
||
null
==
this
.
getJoinType
()
||
(
this
.
getJoinType
()
==
1
&&
StringUtil
.
isBlank
(
this
.
getGroupPic
())
)
||
null
==
this
.
getJoinType
()
||
null
==
this
.
getPurLabelId
(
)
||
null
==
this
.
get
PurLabelId
()
||
null
==
this
.
getBookGroupQrcode
Id
())
{
||
null
==
this
.
get
BookGroupClassify
Id
())
{
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"请求参数缺失"
);
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"请求参数缺失"
);
}
}
}
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/skill/facade/response/QueryGroupActivityResponseVO.java
View file @
1cc541f5
package
com
.
pcloud
.
book
.
skill
.
facade
.
response
;
package
com
.
pcloud
.
book
.
skill
.
facade
.
response
;
import
com.pcloud.book.rightsSetting.entity.BaseTempletClassify
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -25,11 +24,11 @@ public class QueryGroupActivityResponseVO {
...
@@ -25,11 +24,11 @@ public class QueryGroupActivityResponseVO {
@ApiModelProperty
(
"加群类型(0:邀请 1:图片)"
)
@ApiModelProperty
(
"加群类型(0:邀请 1:图片)"
)
private
Integer
joinType
;
private
Integer
joinType
;
@ApiModelProperty
(
"
社群码id
"
)
@ApiModelProperty
(
"
群分类ID
"
)
private
Long
bookGroup
Qrcode
Id
;
private
Long
bookGroup
Classify
Id
;
@ApiModelProperty
(
"
社群码
名称"
)
@ApiModelProperty
(
"
群分类
名称"
)
private
String
group
Name
;
private
String
classify
Name
;
@ApiModelProperty
(
"专业标签id"
)
@ApiModelProperty
(
"专业标签id"
)
private
Long
proLabelId
;
private
Long
proLabelId
;
...
@@ -70,4 +69,7 @@ public class QueryGroupActivityResponseVO {
...
@@ -70,4 +69,7 @@ public class QueryGroupActivityResponseVO {
@ApiModelProperty
(
"科目标签名称"
)
@ApiModelProperty
(
"科目标签名称"
)
private
String
subjectLabelName
;
private
String
subjectLabelName
;
@ApiModelProperty
(
"上下架"
)
private
Integer
isShow
;
}
}
pcloud-service-book/src/main/resources/mapper/applet/AppletGroupManage.Mapper.xml
View file @
1cc541f5
...
@@ -31,17 +31,15 @@
...
@@ -31,17 +31,15 @@
a.seq_num seqNum,
a.seq_num seqNum,
b.`name`,
b.`name`,
b.description as `desc`,
b.description as `desc`,
b.group_pic AS groupPic,
b.book_group_classify_id AS classifyId,
b.book_group_qrcode_id AS bookGroupQrcodeId,
b.pro_label_id AS proLabelId,
b.pro_label_id AS proLabelId,
b.dep_label_id AS depLabelId,
b.dep_label_id AS depLabelId,
b.pur_label_id AS purLabelId,
b.pur_label_id AS purLabelId,
c.group_name AS groupName,
c.classify AS classifyName
c.user_number userNumber
FROM
FROM
applet_group_manage a
applet_group_manage a
INNER JOIN pcloud_group_activity b ON a.group_activity_id = b.id AND b.is_delete = 0
INNER JOIN pcloud_group_activity b ON a.group_activity_id = b.id AND b.is_delete = 0
LEFT JOIN book_group_
qrcode c on b.book_group_qrcode
_id = c.id AND c.is_delete = 0
LEFT JOIN book_group_
classify c on b.book_group_classify
_id = c.id AND c.is_delete = 0
WHERE 1=1
WHERE 1=1
<if
test=
"name!=null"
>
<if
test=
"name!=null"
>
AND b.name like concat('%',#{name},'%')
AND b.name like concat('%',#{name},'%')
...
@@ -61,17 +59,12 @@
...
@@ -61,17 +59,12 @@
a.group_activity_id groupActivityId,
a.group_activity_id groupActivityId,
b.`name`,
b.`name`,
b.description as `desc`,
b.description as `desc`,
b.group_pic AS groupPic,
b.book_group_classify_id AS classifyId,
b.book_group_qrcode_id AS bookGroupQrcodeId,
c.book_group_id bookGroupId
c.group_name AS groupName,
c.user_number userNumber,
c.classify_id classifyId,
d.book_group_id bookGroupId
FROM
FROM
applet_group_manage a
applet_group_manage a
INNER JOIN pcloud_group_activity b ON a.group_activity_id = b.id AND b.is_delete = 0
INNER JOIN pcloud_group_activity b ON a.group_activity_id = b.id AND b.is_delete = 0
INNER JOIN book_group_qrcode c ON b.book_group_qrcode_id = c.id AND c.is_delete = 0
INNER JOIN book_group_classify c ON b.book_group_classify_id = c.id AND c.is_delete = 0
INNER JOIN book_group_classify d ON c.classify_id = d.id AND d.is_delete = 0
WHERE a.enable=1
WHERE a.enable=1
<if
test=
"recommend!=null"
>
<if
test=
"recommend!=null"
>
AND a.recommend=#{recommend}
AND a.recommend=#{recommend}
...
...
pcloud-service-book/src/main/resources/mapper/group/BookGroupClassify.Mapper.xml
View file @
1cc541f5
...
@@ -1088,4 +1088,41 @@
...
@@ -1088,4 +1088,41 @@
WHERE user_number
<![CDATA[ < ]]>
#{changeNumber} AND classify_id = #{classifyId} AND use_state = 1 AND is_delete = 0 order by user_number asc
WHERE user_number
<![CDATA[ < ]]>
#{changeNumber} AND classify_id = #{classifyId} AND use_state = 1 AND is_delete = 0 order by user_number asc
</select>
</select>
<select
id=
"listGroupClassify4Pcloud"
parameterType=
"map"
resultType=
"com.pcloud.book.group.vo.PcloudBookGroupClassifyVO"
>
SELECT
a.id,
a.classify,
a.classify_introduce AS classifyIntroduce,
a.price,
count(b.classify_id) AS groupCount
FROM
book_group_classify a LEFT JOIN book_group_qrcode b ON a.id = b.classify_id AND b.is_delete = 0 AND a.is_delete = 0
LEFT JOIN book_group c ON a.book_group_id = c. id
<where>
<if
test=
"name!=null or list.size()>0"
>
<trim
prefix=
"("
suffix=
")"
prefixOverrides=
"OR"
>
<if
test=
"name!=null"
>
a.classify LIKE CONCAT("%",#{name},"%")
</if>
<if
test=
"list.size()>0"
>
OR a.book_id IN
<foreach
collection=
"list"
open=
"("
separator=
","
close=
")"
index=
"index"
item=
"item"
>
${item}
</foreach>
</if>
</trim>
</if>
<if
test=
"proLabelId!=null"
>
AND c.pro_label_id = #{proLabelId}
</if>
<if
test=
"depLabelId!=null"
>
AND c.dep_label_id = #{depLabelId}
</if>
</where>
GROUP BY b.classify_id
HAVING groupCount > 0
ORDER BY a.create_time DESC
</select>
</mapper>
</mapper>
\ No newline at end of file
pcloud-service-book/src/main/resources/mapper/skill/PcloudGroupActivityDao.xml
View file @
1cc541f5
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<result
column=
"pro_label_id"
property=
"proLabelId"
jdbcType=
"INTEGER"
/>
<result
column=
"pro_label_id"
property=
"proLabelId"
jdbcType=
"INTEGER"
/>
<result
column=
"dep_label_id"
property=
"depLabelId"
jdbcType=
"INTEGER"
/>
<result
column=
"dep_label_id"
property=
"depLabelId"
jdbcType=
"INTEGER"
/>
<result
column=
"pur_label_id"
property=
"purLabelId"
jdbcType=
"INTEGER"
/>
<result
column=
"pur_label_id"
property=
"purLabelId"
jdbcType=
"INTEGER"
/>
<result
column=
"book_group_
qrcode_id"
property=
"bookGroupQrcode
Id"
jdbcType=
"INTEGER"
/>
<result
column=
"book_group_
classify_id"
property=
"bookGroupClassify
Id"
jdbcType=
"INTEGER"
/>
<result
column=
"group_name"
property=
"groupName"
jdbcType=
"VARCHAR"
/>
<result
column=
"group_name"
property=
"groupName"
jdbcType=
"VARCHAR"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"create_user"
property=
"createUser"
jdbcType=
"INTEGER"
/>
<result
column=
"create_user"
property=
"createUser"
jdbcType=
"INTEGER"
/>
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, name, description, join_type, group_pic, pro_label_id, dep_label_id,
id, name, description, join_type, group_pic, pro_label_id, dep_label_id,
pur_label_id, book_group_
qrcode
_id,
pur_label_id, book_group_
classify
_id,
create_time, create_user, update_time, update_user, is_delete,
create_time, create_user, update_time, update_user, is_delete,
first_classify, second_classify, grade_label_id, subject_label_id
first_classify, second_classify, grade_label_id, subject_label_id
</sql>
</sql>
...
@@ -39,18 +39,18 @@
...
@@ -39,18 +39,18 @@
a.`name`,
a.`name`,
a.description as `desc`,
a.description as `desc`,
a.join_type AS joinType,
a.join_type AS joinType,
a.group_pic AS groupPic,
a.book_group_classify_id AS bookGroupClassifyId,
a.book_group_qrcode_id AS bookGroupQrcodeId,
a.pro_label_id AS proLabelId,
a.pro_label_id AS proLabelId,
a.dep_label_id AS depLabelId,
a.dep_label_id AS depLabelId,
a.pur_label_id AS purLabelId,
a.pur_label_id AS purLabelId,
b.group_name AS group
Name,
b.classify AS classify
Name,
a.first_classify AS firstClassify,
a.first_classify AS firstClassify,
a.second_classify AS secondClassify,
a.second_classify AS secondClassify,
a.grade_label_id AS gradeLabelId,
a.grade_label_id AS gradeLabelId,
a.subject_label_id AS subjectLabelId
a.subject_label_id AS subjectLabelId,
is_show AS isShow
FROM
FROM
pcloud_group_activity a left join book_group_
qrcode b on a.book_group_qrcode
_id = b.id
pcloud_group_activity a left join book_group_
classify b on a.book_group_classify
_id = b.id
WHERE
WHERE
a.is_delete = 0
a.is_delete = 0
<if
test=
"proLabelId != null"
>
<if
test=
"proLabelId != null"
>
...
@@ -90,11 +90,8 @@
...
@@ -90,11 +90,8 @@
a.`name`,
a.`name`,
a.description as `desc`,
a.description as `desc`,
a.join_type AS joinType,
a.join_type AS joinType,
a.group_pic AS groupPic,
c.classify AS classifyName,
a.book_group_qrcode_id AS bookGroupQrcodeId,
a.book_group_classify_id classifyId,
b.group_name AS groupName,
b.user_number userNumber,
b.classify_id classifyId,
c.book_group_id bookGroupId,
c.book_group_id bookGroupId,
a.first_classify AS firstClassify,
a.first_classify AS firstClassify,
a.second_classify AS secondClassify,
a.second_classify AS secondClassify,
...
@@ -102,10 +99,10 @@
...
@@ -102,10 +99,10 @@
a.subject_label_id AS subjectLabelId
a.subject_label_id AS subjectLabelId
FROM
FROM
pcloud_group_activity a
pcloud_group_activity a
INNER JOIN book_group_
qrcode b on a.book_group_qrcode_id = b.id AND b
.is_delete = 0
INNER JOIN book_group_
classify c ON a.book_group_classify_id = c.id AND c
.is_delete = 0
INNER JOIN book_group_
classify c ON b.classify_id = c.id AND c
.is_delete = 0
INNER JOIN book_group_
qrcode b ON b.classify_id = c.id AND b
.is_delete = 0
WHERE
WHERE
a.is_delete = 0
a.is_delete = 0
AND a.is_show = 1
<if
test=
"firstClassify != null"
>
<if
test=
"firstClassify != null"
>
and a.first_classify = #{firstClassify}
and a.first_classify = #{firstClassify}
</if>
</if>
...
@@ -118,18 +115,34 @@
...
@@ -118,18 +115,34 @@
<if
test=
"subjectLabelId != null"
>
<if
test=
"subjectLabelId != null"
>
and a.subject_label_id = #{subjectLabelId}
and a.subject_label_id = #{subjectLabelId}
</if>
</if>
ORDER BY id DESC
GROUP BY a.id
ORDER BY a.id DESC
LIMIT #{limit}
LIMIT #{limit}
</select>
</select>
<select
id=
"getById"
resultMap=
"BaseResultMap"
parameterType=
"long"
>
<select
id=
"getById"
resultMap=
"BaseResultMap"
parameterType=
"long"
>
select
SELECT
a.id, a.name, a.description, a.join_type, a.group_pic, a.pro_label_id, a.dep_label_id,
a.id,
a.pur_label_id, a.book_group_qrcode_id,
a.`name`,
a.create_time, a.create_user, a.update_time, a.update_user, a.is_delete, b.group_name,
a.description,
a.first_classify, a.second_classify, a.grade_label_id, a.subject_label_id
a.join_type,
from pcloud_group_activity a left join book_group_qrcode b on a.book_group_qrcode_id = b.id
a.pro_label_id,
where a.id = #{id,jdbcType=INTEGER}
a.dep_label_id,
a.pur_label_id,
a.book_group_classify_id,
a.create_time,
a.create_user,
a.update_time,
a.update_user,
a.is_delete,
b.classify AS groupName,
a.first_classify,
a.second_classify,
a.grade_label_id,
a.subject_label_id,
a.is_show
FROM pcloud_group_activity a LEFT JOIN book_group_classify b ON a.book_group_classify_id = b.id
WHERE a.id = #{id,jdbcType=INTEGER}
</select>
</select>
<select
id=
"getByIds"
resultType=
"com.pcloud.book.skill.dto.GroupActivity4AppletDTO"
>
<select
id=
"getByIds"
resultType=
"com.pcloud.book.skill.dto.GroupActivity4AppletDTO"
>
...
@@ -139,9 +152,7 @@
...
@@ -139,9 +152,7 @@
a.`name`,
a.`name`,
a.description as `desc`,
a.description as `desc`,
a.join_type AS joinType,
a.join_type AS joinType,
a.group_pic AS groupPic,
c.classify AS groupName,
a.book_group_qrcode_id AS bookGroupQrcodeId,
b.group_name AS groupName,
b.user_number userNumber,
b.user_number userNumber,
b.classify_id classifyId,
b.classify_id classifyId,
c.book_group_id bookGroupId,
c.book_group_id bookGroupId,
...
@@ -151,15 +162,16 @@
...
@@ -151,15 +162,16 @@
a.subject_label_id AS subjectLabelId
a.subject_label_id AS subjectLabelId
FROM
FROM
pcloud_group_activity a
pcloud_group_activity a
INNER JOIN book_group_qrcode b on a.book_group_qrcode_id = b.id AND b
.is_delete = 0
INNER JOIN book_group_classify c ON a.book_group_classify_id = c.id AND c
.is_delete = 0
INNER JOIN book_group_classify c ON b.classify_id = c.id AND c
.is_delete = 0
INNER JOIN book_group_qrcode b on b.classify_id = c.id AND b
.is_delete = 0
WHERE
WHERE
a.is_delete = 0
a.is_delete = 0 AND a.is_show = 1
AND a.id IN
AND a.id IN
<foreach
collection=
"list"
item=
"item"
open=
"("
close=
")"
separator=
","
>
<foreach
collection=
"list"
item=
"item"
open=
"("
close=
")"
separator=
","
>
${item}
${item}
</foreach>
</foreach>
ORDER BY id DESC
GROUP BY a.id
ORDER BY a.id DESC
</select>
</select>
<select
id=
"getGroupActivity4Applet"
resultType=
"com.pcloud.book.skill.dto.GroupActivity4AppletDTO"
parameterType=
"map"
>
<select
id=
"getGroupActivity4Applet"
resultType=
"com.pcloud.book.skill.dto.GroupActivity4AppletDTO"
parameterType=
"map"
>
...
@@ -170,7 +182,6 @@
...
@@ -170,7 +182,6 @@
a.description as `desc`,
a.description as `desc`,
a.join_type AS joinType,
a.join_type AS joinType,
a.group_pic AS groupPic,
a.group_pic AS groupPic,
a.book_group_qrcode_id AS bookGroupQrcodeId,
b.group_name AS groupName,
b.group_name AS groupName,
b.user_number userNumber,
b.user_number userNumber,
b.classify_id classifyId,
b.classify_id classifyId,
...
@@ -181,10 +192,10 @@
...
@@ -181,10 +192,10 @@
a.subject_label_id AS subjectLabelId
a.subject_label_id AS subjectLabelId
FROM
FROM
pcloud_group_activity a
pcloud_group_activity a
INNER JOIN book_group_qrcode b on a.book_group_qrcode_id = b.id AND b
.is_delete = 0
INNER JOIN book_group_classify c ON a.book_group_classify_id = c.id AND c
.is_delete = 0
INNER JOIN book_group_classify c ON b.classify_id = c.id AND c
.is_delete = 0
INNER JOIN book_group_qrcode b on c.id = b.classify_id AND b
.is_delete = 0
WHERE
WHERE
a.is_delete = 0
a.is_delete = 0 AND a.is_show = 1
<if
test=
"firstClassify != null"
>
<if
test=
"firstClassify != null"
>
and a.first_classify = #{firstClassify}
and a.first_classify = #{firstClassify}
</if>
</if>
...
@@ -197,19 +208,20 @@
...
@@ -197,19 +208,20 @@
<if
test=
"subjectLabelId != null"
>
<if
test=
"subjectLabelId != null"
>
and a.subject_label_id = #{subjectLabelId}
and a.subject_label_id = #{subjectLabelId}
</if>
</if>
ORDER BY id DESC
GROUP BY a.id
ORDER BY a.id DESC
LIMIT 1
LIMIT 1
</select>
</select>
<insert
id=
"insert"
parameterType=
"com.pcloud.book.skill.entity.PcloudGroupActivity"
>
<insert
id=
"insert"
parameterType=
"com.pcloud.book.skill.entity.PcloudGroupActivity"
>
insert into pcloud_group_activity (id, name,
insert into pcloud_group_activity (id, name,
description, join_type, group_pic, pro_label_id, dep_label_id,
description, join_type, group_pic, pro_label_id, dep_label_id,
pur_label_id, book_group_
qrcode_id, create_time,
pur_label_id, book_group_
classify_id, create_time,
create_user, update_time, update_user,
create_user, update_time, update_user,
is_delete, first_classify, second_classify, grade_label_id, subject_label_id)
is_delete, first_classify, second_classify, grade_label_id, subject_label_id)
values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR},
values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR},
#{desc,jdbcType=VARCHAR}, #{joinType,jdbcType=INTEGER}, #{groupPic,jdbcType=VARCHAR}, #{proLabelId,jdbcType=INTEGER}, #{depLabelId,jdbcType=INTEGER},
#{desc,jdbcType=VARCHAR}, #{joinType,jdbcType=INTEGER}, #{groupPic,jdbcType=VARCHAR}, #{proLabelId,jdbcType=INTEGER}, #{depLabelId,jdbcType=INTEGER},
#{purLabelId,jdbcType=INTEGER}, #{bookGroup
QrcodeId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{purLabelId,jdbcType=INTEGER}, #{bookGroup
ClassifyId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{createUser,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER},
#{createUser,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER},
#{isDelete,jdbcType=BIT}, #{firstClassify,jdbcType=BIGINT}, #{secondClassify,jdbcType=BIGINT},
#{isDelete,jdbcType=BIT}, #{firstClassify,jdbcType=BIGINT}, #{secondClassify,jdbcType=BIGINT},
#{gradeLabelId,jdbcType=BIGINT}, #{subjectLabelId,jdbcType=BIGINT})
#{gradeLabelId,jdbcType=BIGINT}, #{subjectLabelId,jdbcType=BIGINT})
...
@@ -238,8 +250,8 @@
...
@@ -238,8 +250,8 @@
<if
test=
"purLabelId != null"
>
<if
test=
"purLabelId != null"
>
pur_label_id = #{purLabelId,jdbcType=INTEGER},
pur_label_id = #{purLabelId,jdbcType=INTEGER},
</if>
</if>
<if
test=
"bookGroup
Qrcode
Id != null"
>
<if
test=
"bookGroup
Classify
Id != null"
>
book_group_
qrcode_id = #{bookGroupQrcode
Id,jdbcType=INTEGER},
book_group_
classify_id = #{bookGroupClassify
Id,jdbcType=INTEGER},
</if>
</if>
<if
test=
"createTime != null"
>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
...
@@ -256,6 +268,9 @@
...
@@ -256,6 +268,9 @@
<if
test=
"isDelete != null"
>
<if
test=
"isDelete != null"
>
is_delete = #{isDelete,jdbcType=BIT},
is_delete = #{isDelete,jdbcType=BIT},
</if>
</if>
<if
test=
"isShow != null"
>
is_show = #{isShow,jdbcType=BIT},
</if>
first_classify = #{firstClassify,jdbcType=BIGINT},
first_classify = #{firstClassify,jdbcType=BIGINT},
second_classify = #{secondClassify,jdbcType=BIGINT},
second_classify = #{secondClassify,jdbcType=BIGINT},
grade_label_id = #{gradeLabelId,jdbcType=BIGINT},
grade_label_id = #{gradeLabelId,jdbcType=BIGINT},
...
@@ -272,7 +287,7 @@
...
@@ -272,7 +287,7 @@
pro_label_id = #{proLabelId,jdbcType=INTEGER},
pro_label_id = #{proLabelId,jdbcType=INTEGER},
dep_label_id = #{depLabelId,jdbcType=INTEGER},
dep_label_id = #{depLabelId,jdbcType=INTEGER},
pur_label_id = #{purLabelId,jdbcType=INTEGER},
pur_label_id = #{purLabelId,jdbcType=INTEGER},
book_group_
qrcode_id = #{bookGroupQrcode
Id,jdbcType=INTEGER},
book_group_
classify_id = #{bookGroupClassify
Id,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
create_user = #{createUser,jdbcType=INTEGER},
create_user = #{createUser,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
...
@@ -281,7 +296,8 @@
...
@@ -281,7 +296,8 @@
first_classify = #{firstClassify,jdbcType=BIGINT},
first_classify = #{firstClassify,jdbcType=BIGINT},
second_classify = #{secondClassify,jdbcType=BIGINT},
second_classify = #{secondClassify,jdbcType=BIGINT},
grade_label_id = #{gradeLabelId,jdbcType=BIGINT},
grade_label_id = #{gradeLabelId,jdbcType=BIGINT},
subject_label_id = #{subjectLabelId,jdbcType=BIGINT}
subject_label_id = #{subjectLabelId,jdbcType=BIGINT},
is_show = #{isShow,jdbcType=BIT}
where id = #{id,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</update>
...
@@ -302,8 +318,7 @@
...
@@ -302,8 +318,7 @@
a.description as `desc`,
a.description as `desc`,
a.join_type AS joinType,
a.join_type AS joinType,
a.group_pic AS groupPic,
a.group_pic AS groupPic,
a.book_group_qrcode_id AS bookGroupQrcodeId,
c.classify AS classifyName,
b.group_name AS groupName,
b.user_number userNumber,
b.user_number userNumber,
b.classify_id classifyId,
b.classify_id classifyId,
c.book_group_id bookGroupId,
c.book_group_id bookGroupId,
...
@@ -313,10 +328,10 @@
...
@@ -313,10 +328,10 @@
a.subject_label_id AS subjectLabelId
a.subject_label_id AS subjectLabelId
FROM
FROM
pcloud_group_activity a
pcloud_group_activity a
INNER JOIN book_group_qrcode b on a.book_group_qrcode_id = b.id AND b
.is_delete = 0
INNER JOIN book_group_classify c ON a.book_group_classify_id = c.id AND c
.is_delete = 0
INNER JOIN book_group_classify c ON b.classify_id = c.id AND c
.is_delete = 0
INNER JOIN book_group_qrcode b on c.id = b.classify_id AND b
.is_delete = 0
WHERE
WHERE
a.is_delete = 0
a.is_delete = 0 AND a.is_show = 1
<if
test=
"firstClassify != null"
>
<if
test=
"firstClassify != null"
>
and a.first_classify = #{firstClassify}
and a.first_classify = #{firstClassify}
</if>
</if>
...
@@ -329,7 +344,8 @@
...
@@ -329,7 +344,8 @@
<if
test=
"subjectLabelId != null"
>
<if
test=
"subjectLabelId != null"
>
and a.subject_label_id = #{subjectLabelId}
and a.subject_label_id = #{subjectLabelId}
</if>
</if>
ORDER BY id DESC
GROUP BY a.id
ORDER BY a.id DESC
</select>
</select>
</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