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
ac5674ea
Commit
ac5674ea
authored
Aug 19, 2019
by
阮思源
Browse files
Options
Browse Files
Download
Plain Diff
个人二维码替换群二维码
parents
520973fc
7d29eca3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
59 changed files
with
2510 additions
and
12 deletions
+2510
-12
BookGroupService.java
.../java/com/pcloud/book/group/service/BookGroupService.java
+17
-0
RiddleService.java
...k/src/main/java/com/pcloud/book/riddle/RiddleService.java
+26
-0
RiddleConstant.java
...java/com/pcloud/book/riddle/constants/RiddleConstant.java
+26
-0
RiddleRecordStatusEnum.java
.../com/pcloud/book/riddle/enums/RiddleRecordStatusEnum.java
+37
-0
RiddleReplyTypeEnum.java
...ava/com/pcloud/book/riddle/enums/RiddleReplyTypeEnum.java
+55
-0
AdvertisingSpaceBizImpl.java
...ud/book/advertising/biz/impl/AdvertisingSpaceBizImpl.java
+0
-0
AdvertisingDetailFileDao.java
...pcloud/book/advertising/dao/AdvertisingDetailFileDao.java
+28
-0
AdvertisingDetailFileDaoImpl.java
...ok/advertising/dao/impl/AdvertisingDetailFileDaoImpl.java
+29
-0
AdvertisingSpaceDTO.java
.../com/pcloud/book/advertising/dto/AdvertisingSpaceDTO.java
+15
-0
AdvertisingDetailFile.java
...pcloud/book/advertising/entity/AdvertisingDetailFile.java
+209
-0
AdvertisingSpace.java
.../com/pcloud/book/advertising/entity/AdvertisingSpace.java
+14
-0
TradeConsr.java
.../main/java/com/pcloud/book/consumer/trade/TradeConsr.java
+12
-0
WechatGroupConsr.java
...om/pcloud/book/consumer/wechatgroup/WechatGroupConsr.java
+12
-0
BookGroupBiz.java
...src/main/java/com/pcloud/book/group/biz/BookGroupBiz.java
+33
-0
BookGroupClassifyBiz.java
.../java/com/pcloud/book/group/biz/BookGroupClassifyBiz.java
+5
-0
GroupQrcodeBiz.java
...c/main/java/com/pcloud/book/group/biz/GroupQrcodeBiz.java
+11
-0
BookGroupBizImpl.java
...java/com/pcloud/book/group/biz/impl/BookGroupBizImpl.java
+0
-0
BookGroupClassifyBizImpl.java
.../pcloud/book/group/biz/impl/BookGroupClassifyBizImpl.java
+11
-1
GroupQrcodeBizImpl.java
...va/com/pcloud/book/group/biz/impl/GroupQrcodeBizImpl.java
+43
-1
BookGroupClassifyDao.java
.../java/com/pcloud/book/group/dao/BookGroupClassifyDao.java
+4
-0
GroupQrcodeDao.java
...c/main/java/com/pcloud/book/group/dao/GroupQrcodeDao.java
+8
-0
BookGroupClassifyDaoImpl.java
.../pcloud/book/group/dao/impl/BookGroupClassifyDaoImpl.java
+7
-0
GroupQrcodeDaoImpl.java
...va/com/pcloud/book/group/dao/impl/GroupQrcodeDaoImpl.java
+9
-0
GroupStoreMyPayDto.java
...in/java/com/pcloud/book/group/dto/GroupStoreMyPayDto.java
+98
-0
GroupQrcode.java
...c/main/java/com/pcloud/book/group/entity/GroupQrcode.java
+15
-0
BookGroupClassifyFacade.java
...com/pcloud/book/group/facade/BookGroupClassifyFacade.java
+7
-0
BookGroupFacade.java
...in/java/com/pcloud/book/group/facade/BookGroupFacade.java
+31
-0
BookGroupClassifyFacadeImpl.java
...d/book/group/facade/impl/BookGroupClassifyFacadeImpl.java
+12
-0
BookGroupFacadeImpl.java
...om/pcloud/book/group/facade/impl/BookGroupFacadeImpl.java
+32
-1
BookGroupClassifyServiceImpl.java
...book/group/service/impl/BookGroupClassifyServiceImpl.java
+1
-4
BookGroupServiceImpl.java
.../pcloud/book/group/service/impl/BookGroupServiceImpl.java
+31
-0
ListBook4ChannelVO.java
...ain/java/com/pcloud/book/group/vo/ListBook4ChannelVO.java
+118
-0
ListBookGroup4ChannelParamVO.java
...om/pcloud/book/group/vo/ListBookGroup4ChannelParamVO.java
+96
-0
BookGuideBizImpl.java
...a/com/pcloud/book/keywords/biz/impl/BookGuideBizImpl.java
+15
-1
WxGroupSendTextListener.java
...ava/com/pcloud/book/mq/topic/WxGroupSendTextListener.java
+6
-3
RiddleRecordBiz.java
...main/java/com/pcloud/book/riddle/biz/RiddleRecordBiz.java
+70
-0
RiddleRecordBizImpl.java
.../com/pcloud/book/riddle/biz/impl/RiddleRecordBizImpl.java
+0
-0
RiddleDao.java
...k/src/main/java/com/pcloud/book/riddle/dao/RiddleDao.java
+22
-0
RiddleRecordDao.java
...main/java/com/pcloud/book/riddle/dao/RiddleRecordDao.java
+36
-0
RiddleReplyDao.java
.../main/java/com/pcloud/book/riddle/dao/RiddleReplyDao.java
+22
-0
RiddleDaoImpl.java
...n/java/com/pcloud/book/riddle/dao/impl/RiddleDaoImpl.java
+29
-0
RiddleRecordDaoImpl.java
.../com/pcloud/book/riddle/dao/impl/RiddleRecordDaoImpl.java
+40
-0
RiddleReplyDaoImpl.java
...a/com/pcloud/book/riddle/dao/impl/RiddleReplyDaoImpl.java
+24
-0
GroupRedisDTO.java
...c/main/java/com/pcloud/book/riddle/dto/GroupRedisDTO.java
+58
-0
GroupRiddleDTO.java
.../main/java/com/pcloud/book/riddle/dto/GroupRiddleDTO.java
+258
-0
RiddleOpenDTO.java
...c/main/java/com/pcloud/book/riddle/dto/RiddleOpenDTO.java
+45
-0
Riddle.java
...k/src/main/java/com/pcloud/book/riddle/entity/Riddle.java
+96
-0
RiddleRecord.java
...main/java/com/pcloud/book/riddle/entity/RiddleRecord.java
+106
-0
RiddleReply.java
.../main/java/com/pcloud/book/riddle/entity/RiddleReply.java
+60
-0
RiddleFacade.java
...main/java/com/pcloud/book/riddle/facade/RiddleFacade.java
+82
-0
RiddleRedis.java
...c/main/java/com/pcloud/book/riddle/redis/RiddleRedis.java
+114
-0
RiddleServiceImpl.java
...om/pcloud/book/riddle/service/impl/RiddleServiceImpl.java
+44
-0
AdvertisingDetailFileMapper.xml
...ources/mapper/advertising/AdvertisingDetailFileMapper.xml
+100
-0
Book.Mapper.xml
...rvice-book/src/main/resources/mapper/book/Book.Mapper.xml
+44
-0
BookGroupClassify.Mapper.xml
.../main/resources/mapper/group/BookGroupClassify.Mapper.xml
+16
-0
GroupQrcode.Mapper.xml
...ok/src/main/resources/mapper/group/GroupQrcode.Mapper.xml
+45
-1
RiddleMapper.xml
...ce-book/src/main/resources/mapper/riddle/RiddleMapper.xml
+38
-0
RiddleRecordMapper.xml
...k/src/main/resources/mapper/riddle/RiddleRecordMapper.xml
+63
-0
RiddleReplyMapper.xml
...ok/src/main/resources/mapper/riddle/RiddleReplyMapper.xml
+25
-0
No files found.
pcloud-facade-book/src/main/java/com/pcloud/book/group/service/BookGroupService.java
View file @
ac5674ea
...
@@ -10,7 +10,10 @@ import org.springframework.http.ResponseEntity;
...
@@ -10,7 +10,10 @@ import org.springframework.http.ResponseEntity;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
com.pcloud.book.group.dto.BookGroupDTO
;
import
com.pcloud.book.group.dto.BookGroupDTO
;
import
com.pcloud.common.dto.ResponseDto
;
import
com.pcloud.common.dto.ResponseDto
;
import
com.pcloud.common.dto.StoreFlowInfoDto
;
import
com.pcloud.common.exceptions.BizException
;
import
com.pcloud.common.exceptions.BizException
;
import
com.pcloud.common.page.PageBeanNew
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -30,6 +33,20 @@ public interface BookGroupService {
...
@@ -30,6 +33,20 @@ public interface BookGroupService {
@RequestMapping
(
value
=
"getBookGroupInfoByIds"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"getBookGroupInfoByIds"
,
method
=
RequestMethod
.
POST
)
ResponseEntity
<
ResponseDto
<
Map
<
Long
,
BookGroupDTO
>>>
getBookGroupInfoByIds
(
@RequestBody
List
<
Long
>
bookGroupIds
)
throws
BizException
;
ResponseEntity
<
ResponseDto
<
Map
<
Long
,
BookGroupDTO
>>>
getBookGroupInfoByIds
(
@RequestBody
List
<
Long
>
bookGroupIds
)
throws
BizException
;
@ApiOperation
(
"为信息流批量获取社群书基本信息"
)
@RequestMapping
(
value
=
"getFlowInfoByBookGroupIds"
,
method
=
RequestMethod
.
POST
)
ResponseEntity
<
ResponseDto
<
Map
<
Long
,
StoreFlowInfoDto
>>>
getFlowInfoByBookGroupIds
(
@RequestBody
List
<
Long
>
bookGroupIds
)
throws
BizException
;
@ApiOperation
(
"获取指定条数社群书基本信息"
)
@RequestMapping
(
value
=
"getBookGroupInfoByChannelId"
,
method
=
RequestMethod
.
GET
)
ResponseEntity
<
ResponseDto
<
Map
<
Long
,
StoreFlowInfoDto
>>>
getBookGroupInfoByChannelId
(
@RequestParam
(
"channelId"
)
Long
channelId
,
@RequestParam
(
"itemNum"
)
Integer
itemNum
)
throws
BizException
;
@ApiOperation
(
value
=
"知识商城获取社群书信息"
)
@RequestMapping
(
value
=
"listBookGroup4KnowledgeMall"
,
method
=
RequestMethod
.
GET
)
ResponseEntity
<
ResponseDto
<
PageBeanNew
<
StoreFlowInfoDto
>>>
listBookGroup4KnowledgeMall
(
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
,
@RequestParam
(
"currentPage"
)
int
currentPage
,
@RequestParam
(
"numPerPage"
)
int
numPerPage
)
throws
BizException
;
@ApiOperation
(
"获取社群书基本信息"
)
@ApiOperation
(
"获取社群书基本信息"
)
@RequestMapping
(
value
=
"getBaseInfoBySceneId"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"getBaseInfoBySceneId"
,
method
=
RequestMethod
.
GET
)
ResponseEntity
<
ResponseDto
<
BookGroupDTO
>>
getBaseInfoBySceneId
(
@RequestParam
(
"sceneId"
)
Long
sceneId
)
throws
BizException
;
ResponseEntity
<
ResponseDto
<
BookGroupDTO
>>
getBaseInfoBySceneId
(
@RequestParam
(
"sceneId"
)
Long
sceneId
)
throws
BizException
;
...
...
pcloud-facade-book/src/main/java/com/pcloud/book/riddle/RiddleService.java
0 → 100644
View file @
ac5674ea
package
com
.
pcloud
.
book
.
riddle
;
import
org.springframework.cloud.netflix.feign.FeignClient
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
java.util.Map
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
* @描述:猜谜语接口
* @作者:zhuyajie
* @创建时间:16:24 2019/8/5
* @版本:1.0
*/
@FeignClient
(
value
=
"pcloud-service-book"
,
qualifier
=
"riddleServiceCloud"
,
path
=
"book/v1.0/riddleService"
)
@Api
(
description
=
"猜谜语接口"
)
public
interface
RiddleService
{
@ApiOperation
(
value
=
"定时器调用游戏结束接口"
,
httpMethod
=
"POST"
)
@RequestMapping
(
value
=
"/riddleEndQuartz"
,
method
=
RequestMethod
.
POST
)
public
void
riddleEndQuartz
(
@RequestBody
Map
<
String
,
Object
>
map
);
}
pcloud-facade-book/src/main/java/com/pcloud/book/riddle/constants/RiddleConstant.java
0 → 100644
View file @
ac5674ea
package
com
.
pcloud
.
book
.
riddle
.
constants
;
/**
* @描述:猜谜语常量
* @作者:zhuyajie
* @创建时间:17:36 2019/7/29
* @版本:1.0
*/
public
class
RiddleConstant
{
/**
* 10s
*/
public
static
Integer
expire_seconds
=
12
;
/**
* 定时器类型名称
*/
public
static
final
String
JOB_GROUP_RIDDLE
=
"riddle"
;
/**
* 到期定时器方法名
*/
public
static
final
String
JOB_NAME_RIDDLE_EXPIRE
=
"judgeRiddleTime"
;
}
pcloud-facade-book/src/main/java/com/pcloud/book/riddle/enums/RiddleRecordStatusEnum.java
0 → 100644
View file @
ac5674ea
package
com
.
pcloud
.
book
.
riddle
.
enums
;
/**
* @描述:猜谜进度状态
* @作者:zhuyajie
* @创建时间:10:14 2019/7/25
* @版本:1.0
*/
public
enum
RiddleRecordStatusEnum
{
/**
* 开始
*/
begin
(
0
),
/**
*结束
*/
end
(
1
),
/**
*进行中
*/
underway
(
2
);
private
Integer
code
;
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
RiddleRecordStatusEnum
(
Integer
code
)
{
this
.
code
=
code
;
}
}
pcloud-facade-book/src/main/java/com/pcloud/book/riddle/enums/RiddleReplyTypeEnum.java
0 → 100644
View file @
ac5674ea
package
com
.
pcloud
.
book
.
riddle
.
enums
;
/**
* @描述:回复文案类型
* @作者:zhuyajie
* @创建时间:16:56 2019/7/24
* @版本:1.0
*/
public
enum
RiddleReplyTypeEnum
{
/**
* 游戏规则
*/
rule
(
"rule"
),
/**
* 无人回复的结束语
*/
no_reply_end
(
"no_reply_end"
),
/**
* 答完全部题结束语
*/
finish_end
(
"finish_end"
),
/**
* 中途回复关键词
*/
midway_in
(
"midway_in"
),
/**
* 答对
*/
correct
(
"correct"
),
/**
* 答错
*/
incorrect
(
"incorrect"
),
/**
* 部分正确
*/
partly_correct
(
"partly_correct"
);
private
String
code
;
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
RiddleReplyTypeEnum
(
String
code
)
{
this
.
code
=
code
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/advertising/biz/impl/AdvertisingSpaceBizImpl.java
View file @
ac5674ea
This diff is collapsed.
Click to expand it.
pcloud-service-book/src/main/java/com/pcloud/book/advertising/dao/AdvertisingDetailFileDao.java
0 → 100644
View file @
ac5674ea
package
com
.
pcloud
.
book
.
advertising
.
dao
;
import
com.pcloud.book.advertising.entity.AdvertisingDetailFile
;
import
com.pcloud.common.core.dao.BaseDao
;
import
java.util.List
;
/**
* @描述:广告详情上传文件
* @作者:zhuyajie
* @创建时间:21:16 2019/8/2
* @版本:1.0
*/
public
interface
AdvertisingDetailFileDao
extends
BaseDao
<
AdvertisingDetailFile
>
{
/**
* 根据广告id查询
* @param adId
* @return
*/
public
List
<
AdvertisingDetailFile
>
getByAdId
(
Long
adId
);
/**
* 删除文件
* @param adId
*/
void
deleteByAdId
(
Long
adId
);
}
pcloud-service-book/src/main/java/com/pcloud/book/advertising/dao/impl/AdvertisingDetailFileDaoImpl.java
0 → 100644
View file @
ac5674ea
package
com
.
pcloud
.
book
.
advertising
.
dao
.
impl
;
import
com.pcloud.book.advertising.dao.AdvertisingDetailFileDao
;
import
com.pcloud.book.advertising.entity.AdvertisingDetailFile
;
import
com.pcloud.common.core.dao.BaseDaoImpl
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
/**
* @描述:广告详情上传文件
* @作者:zhuyajie
* @创建时间:21:17 2019/8/2
* @版本:1.0
*/
@Component
(
"advertisingDetailFileDao"
)
public
class
AdvertisingDetailFileDaoImpl
extends
BaseDaoImpl
<
AdvertisingDetailFile
>
implements
AdvertisingDetailFileDao
{
@Override
public
List
<
AdvertisingDetailFile
>
getByAdId
(
Long
adId
)
{
return
getSessionTemplate
().
selectList
(
getStatement
(
"getByAdId"
),
adId
);
}
@Override
public
void
deleteByAdId
(
Long
adId
)
{
getSessionTemplate
().
delete
(
getStatement
(
"deleteByAdId"
),
adId
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/advertising/dto/AdvertisingSpaceDTO.java
View file @
ac5674ea
...
@@ -6,6 +6,7 @@ import java.util.List;
...
@@ -6,6 +6,7 @@ import java.util.List;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.pcloud.book.advertising.entity.AdvertisingBmOption
;
import
com.pcloud.book.advertising.entity.AdvertisingBmOption
;
import
com.pcloud.book.advertising.entity.AdvertisingDetailFile
;
import
com.pcloud.common.dto.BaseDto
;
import
com.pcloud.common.dto.BaseDto
;
/**
/**
...
@@ -311,6 +312,10 @@ public class AdvertisingSpaceDTO extends BaseDto {
...
@@ -311,6 +312,10 @@ public class AdvertisingSpaceDTO extends BaseDto {
* 投放次数
* 投放次数
*/
*/
private
Integer
distributionNum
;
private
Integer
distributionNum
;
/**
* 多个上传文件
*/
private
List
<
AdvertisingDetailFile
>
advertisingDetailFileList
;
public
Long
getId
()
{
public
Long
getId
()
{
return
id
;
return
id
;
...
@@ -819,6 +824,14 @@ public class AdvertisingSpaceDTO extends BaseDto {
...
@@ -819,6 +824,14 @@ public class AdvertisingSpaceDTO extends BaseDto {
this
.
distributionNum
=
distributionNum
;
this
.
distributionNum
=
distributionNum
;
}
}
public
List
<
AdvertisingDetailFile
>
getAdvertisingDetailFileList
()
{
return
advertisingDetailFileList
;
}
public
void
setAdvertisingDetailFileList
(
List
<
AdvertisingDetailFile
>
advertisingDetailFileList
)
{
this
.
advertisingDetailFileList
=
advertisingDetailFileList
;
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"AdvertisingSpaceDTO{"
+
return
"AdvertisingSpaceDTO{"
+
...
@@ -885,6 +898,7 @@ public class AdvertisingSpaceDTO extends BaseDto {
...
@@ -885,6 +898,7 @@ public class AdvertisingSpaceDTO extends BaseDto {
", outNum="
+
outNum
+
", outNum="
+
outNum
+
", outRate="
+
outRate
+
", outRate="
+
outRate
+
", distributionNum="
+
distributionNum
+
", distributionNum="
+
distributionNum
+
", advertisingDetailFileList="
+
advertisingDetailFileList
+
'}'
;
'}'
;
}
}
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/advertising/entity/AdvertisingDetailFile.java
0 → 100644
View file @
ac5674ea
package
com
.
pcloud
.
book
.
advertising
.
entity
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.pcloud.common.entity.BaseEntity
;
import
java.util.Date
;
/**
* 广告详情文件
*/
public
class
AdvertisingDetailFile
extends
BaseEntity
{
/**
* 广告id
*/
private
Long
adId
;
/**
* 文件ID
*/
private
String
fileId
;
/**
* 文件转码状态
*/
private
Integer
fileConvertState
;
/**
*文件大小
*/
private
Long
fileSize
;
/**
*文件名称
*/
private
String
fileName
;
/**
*文件时长
*/
private
Long
fileDuration
;
/**
*文件路径
*/
private
String
fileUrl
;
/**
*文件试播秒数
*/
private
Long
filePilotSecond
;
/**
*文件试播路径
*/
private
String
filePilotUrl
;
/**
*文件试播结束提示
*/
private
String
filePilotFinishTip
;
/**
*文件标题
*/
private
String
title
;
/**
*封面
*/
private
String
coverPic
;
/**
* 创建时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
createTime
;
/**
* 修改时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
updateTime
;
public
Long
getAdId
()
{
return
adId
;
}
public
void
setAdId
(
Long
adId
)
{
this
.
adId
=
adId
;
}
public
String
getFileId
()
{
return
fileId
;
}
public
void
setFileId
(
String
fileId
)
{
this
.
fileId
=
fileId
==
null
?
null
:
fileId
.
trim
();
}
public
Integer
getFileConvertState
()
{
return
fileConvertState
;
}
public
void
setFileConvertState
(
Integer
fileConvertState
)
{
this
.
fileConvertState
=
fileConvertState
;
}
public
Long
getFileSize
()
{
return
fileSize
;
}
public
void
setFileSize
(
Long
fileSize
)
{
this
.
fileSize
=
fileSize
;
}
public
String
getFileName
()
{
return
fileName
;
}
public
void
setFileName
(
String
fileName
)
{
this
.
fileName
=
fileName
==
null
?
null
:
fileName
.
trim
();
}
public
Long
getFileDuration
()
{
return
fileDuration
;
}
public
void
setFileDuration
(
Long
fileDuration
)
{
this
.
fileDuration
=
fileDuration
;
}
public
String
getFileUrl
()
{
return
fileUrl
;
}
public
void
setFileUrl
(
String
fileUrl
)
{
this
.
fileUrl
=
fileUrl
==
null
?
null
:
fileUrl
.
trim
();
}
public
Long
getFilePilotSecond
()
{
return
filePilotSecond
;
}
public
void
setFilePilotSecond
(
Long
filePilotSecond
)
{
this
.
filePilotSecond
=
filePilotSecond
;
}
public
String
getFilePilotUrl
()
{
return
filePilotUrl
;
}
public
void
setFilePilotUrl
(
String
filePilotUrl
)
{
this
.
filePilotUrl
=
filePilotUrl
==
null
?
null
:
filePilotUrl
.
trim
();
}
public
String
getFilePilotFinishTip
()
{
return
filePilotFinishTip
;
}
public
void
setFilePilotFinishTip
(
String
filePilotFinishTip
)
{
this
.
filePilotFinishTip
=
filePilotFinishTip
==
null
?
null
:
filePilotFinishTip
.
trim
();
}
public
String
getTitle
()
{
return
title
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
==
null
?
null
:
title
.
trim
();
}
public
String
getCoverPic
()
{
return
coverPic
;
}
public
void
setCoverPic
(
String
coverPic
)
{
this
.
coverPic
=
coverPic
==
null
?
null
:
coverPic
.
trim
();
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
@Override
public
Date
getUpdateTime
()
{
return
updateTime
;
}
@Override
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
@Override
public
String
toString
()
{
return
"AdvertisingDetailFile{"
+
"adId="
+
adId
+
", fileId='"
+
fileId
+
'\''
+
", fileConvertState="
+
fileConvertState
+
", fileSize="
+
fileSize
+
", fileName='"
+
fileName
+
'\''
+
", fileDuration="
+
fileDuration
+
", fileUrl='"
+
fileUrl
+
'\''
+
", filePilotSecond="
+
filePilotSecond
+
", filePilotUrl='"
+
filePilotUrl
+
'\''
+
", filePilotFinishTip='"
+
filePilotFinishTip
+
'\''
+
", title='"
+
title
+
'\''
+
", coverPic='"
+
coverPic
+
'\''
+
", createTime="
+
createTime
+
", updateTime="
+
updateTime
+
'}'
;
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/advertising/entity/AdvertisingSpace.java
View file @
ac5674ea
...
@@ -176,6 +176,10 @@ public class AdvertisingSpace extends BaseEntity {
...
@@ -176,6 +176,10 @@ public class AdvertisingSpace extends BaseEntity {
* 广告详情文件时长
* 广告详情文件时长
*/
*/
private
Long
adDetailFileDuration
;
private
Long
adDetailFileDuration
;
/**
* 多个上传文件
*/
private
List
<
AdvertisingDetailFile
>
advertisingDetailFileList
;
@Override
@Override
public
Long
getId
()
{
public
Long
getId
()
{
...
@@ -471,6 +475,14 @@ public class AdvertisingSpace extends BaseEntity {
...
@@ -471,6 +475,14 @@ public class AdvertisingSpace extends BaseEntity {
this
.
adDetailFileDuration
=
adDetailFileDuration
;
this
.
adDetailFileDuration
=
adDetailFileDuration
;
}
}
public
List
<
AdvertisingDetailFile
>
getAdvertisingDetailFileList
()
{
return
advertisingDetailFileList
;
}
public
void
setAdvertisingDetailFileList
(
List
<
AdvertisingDetailFile
>
advertisingDetailFileList
)
{
this
.
advertisingDetailFileList
=
advertisingDetailFileList
;
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"AdvertisingSpace{"
+
return
"AdvertisingSpace{"
+
...
@@ -510,6 +522,7 @@ public class AdvertisingSpace extends BaseEntity {
...
@@ -510,6 +522,7 @@ public class AdvertisingSpace extends BaseEntity {
", adDetailFileSize="
+
adDetailFileSize
+
", adDetailFileSize="
+
adDetailFileSize
+
", adDetailFileName='"
+
adDetailFileName
+
'\''
+
", adDetailFileName='"
+
adDetailFileName
+
'\''
+
", adDetailFileDuration="
+
adDetailFileDuration
+
", adDetailFileDuration="
+
adDetailFileDuration
+
", advertisingDetailFileList="
+
advertisingDetailFileList
+
'}'
;
'}'
;
}
}
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/consumer/trade/TradeConsr.java
View file @
ac5674ea
...
@@ -126,4 +126,16 @@ public class TradeConsr {
...
@@ -126,4 +126,16 @@ public class TradeConsr {
return
amount
;
return
amount
;
}
}
@ParamLog
(
"获取用户购买或者参与过的社群码ID"
)
public
List
<
Long
>
getBuyBookGroupIdList
(
Long
channelId
,
Long
wechatUserId
)
throws
BizException
{
List
<
Long
>
results
=
new
ArrayList
<>();
try
{
ResponseEntity
<
ResponseDto
<
List
<
Long
>>>
responseEntity
=
orderFormService
.
getBuyBookGroupIdList
(
wechatUserId
,
channelId
);
results
=
ResponseHandleUtil
.
parseListResponse
(
responseEntity
,
Long
.
class
);
}
catch
(
Exception
e
)
{
LOGGER
.
error
(
"获取用户购买或者参与过的社群码ID详情:"
+
e
.
getMessage
(),
e
);
}
return
results
;
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/consumer/wechatgroup/WechatGroupConsr.java
View file @
ac5674ea
...
@@ -9,6 +9,7 @@ import com.pcloud.common.utils.ResponseHandleUtil;
...
@@ -9,6 +9,7 @@ import com.pcloud.common.utils.ResponseHandleUtil;
import
com.pcloud.common.utils.string.StringUtil
;
import
com.pcloud.common.utils.string.StringUtil
;
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.group.dto.GroupUserDTO
;
import
com.pcloud.wechatgroup.group.dto.RobotReplyDTO
;
import
com.pcloud.wechatgroup.group.dto.RobotReplyDTO
;
import
com.pcloud.wechatgroup.group.service.GroupMemberService
;
import
com.pcloud.wechatgroup.group.service.GroupMemberService
;
import
com.pcloud.wechatgroup.message.dto.GroupChatCountDTO
;
import
com.pcloud.wechatgroup.message.dto.GroupChatCountDTO
;
...
@@ -321,4 +322,15 @@ public class WechatGroupConsr {
...
@@ -321,4 +322,15 @@ public class WechatGroupConsr {
}
}
return
selfRobotDTO
;
return
selfRobotDTO
;
}
}
@ParamLog
(
"根据用户微信ID获取用户信息"
)
public
GroupUserDTO
getWxUserInfoByWxUserId
(
String
wxUserId
)
{
GroupUserDTO
dto
=
new
GroupUserDTO
();
try
{
dto
=
ResponseHandleUtil
.
parseResponse
(
groupMemberService
.
getWxUserInfoByWxId
(
wxUserId
),
GroupUserDTO
.
class
);
}
catch
(
Exception
e
)
{
log
.
error
(
"根据用户微信ID获取用户信息.[getWxUserInfoByWxId]:"
+
e
.
getMessage
(),
e
);
}
return
dto
;
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/BookGroupBiz.java
View file @
ac5674ea
...
@@ -2,8 +2,15 @@ package com.pcloud.book.group.biz;
...
@@ -2,8 +2,15 @@ package com.pcloud.book.group.biz;
import
com.pcloud.book.book.dto.BookDto
;
import
com.pcloud.book.book.dto.BookDto
;
import
com.pcloud.book.group.dto.*
;
import
com.pcloud.book.group.dto.*
;
import
com.pcloud.book.group.dto.AppStatisticsDTO
;
import
com.pcloud.book.group.dto.BookGroupDTO
;
import
com.pcloud.book.group.dto.ClassifyKeywordDTO
;
import
com.pcloud.book.group.dto.GroupStoreMyPayDto
;
import
com.pcloud.book.group.dto.QrcodeNameAndProIdDTO
;
import
com.pcloud.book.group.entity.BookGroup
;
import
com.pcloud.book.group.entity.BookGroup
;
import
com.pcloud.book.group.vo.*
;
import
com.pcloud.book.group.vo.StatisticVO
;
import
com.pcloud.book.group.vo.StatisticVO
;
import
com.pcloud.common.dto.StoreFlowInfoDto
;
import
com.pcloud.common.exceptions.BizException
;
import
com.pcloud.common.exceptions.BizException
;
import
com.pcloud.common.page.PageBean
;
import
com.pcloud.common.page.PageBean
;
import
com.pcloud.common.page.PageBeanNew
;
import
com.pcloud.common.page.PageBeanNew
;
...
@@ -123,6 +130,13 @@ public interface BookGroupBiz {
...
@@ -123,6 +130,13 @@ public interface BookGroupBiz {
PageBean
listBookGroup4Adviser
(
Map
<
String
,
Object
>
paramMap
,
PageParam
pageParam
,
Long
adviserId
)
throws
BizException
;
PageBean
listBookGroup4Adviser
(
Map
<
String
,
Object
>
paramMap
,
PageParam
pageParam
,
Long
adviserId
)
throws
BizException
;
/**
/**
* @description 获取社群书列表(运营)
* @author 戴兴
* @date 2019/7/23 15:39
*/
PageBean
listBookGroup4Channel
(
Long
channelId
,
ListBookGroup4ChannelParamVO
listBookGroup4ChannelParamVO
);
/**
* 获取社群书列表(编辑)
* 获取社群书列表(编辑)
* @param paramMap 参数Map
* @param paramMap 参数Map
* @return
* @return
...
@@ -277,4 +291,23 @@ public interface BookGroupBiz {
...
@@ -277,4 +291,23 @@ public interface BookGroupBiz {
* 获取暗号基本信息
* 获取暗号基本信息
*/
*/
GroupCipherDTO
getJoinGroupCipher
(
String
cipher
);
GroupCipherDTO
getJoinGroupCipher
(
String
cipher
);
/**
* 为信息流批量获取社群书基本信息
*/
Map
<
Long
,
StoreFlowInfoDto
>
getFlowInfoByBookGroupIds
(
List
<
Long
>
bookGroupIds
);
/**
* 获取指定条数社群书基本信息
*/
Map
<
Long
,
StoreFlowInfoDto
>
getBookGroupInfoByChannelId
(
Long
channelId
,
Integer
itemNum
);
/**
* 知识商城获取社群书信息
*/
PageBeanNew
<
StoreFlowInfoDto
>
listBookGroup4KnowledgeMall
(
Long
channelId
,
int
currentPage
,
int
numPerPage
);
/**
* 获取用户购买或者参与过的社群书信息
*/
PageBeanNew
<
GroupStoreMyPayDto
>
getUserBrowseGroup4KnowLedgeMall
(
Long
channelId
,
Long
wechatUserId
,
Integer
currentPage
,
Integer
numPerPage
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/BookGroupClassifyBiz.java
View file @
ac5674ea
...
@@ -219,4 +219,9 @@ public interface BookGroupClassifyBiz {
...
@@ -219,4 +219,9 @@ public interface BookGroupClassifyBiz {
* @return
* @return
*/
*/
public
BigDecimal
getPayPrice
(
Long
qrcodeId
,
String
wxId
);
public
BigDecimal
getPayPrice
(
Long
qrcodeId
,
String
wxId
);
/**
* 拖动排序
*/
void
dragSortClassify
(
List
<
Long
>
classifyIds
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/GroupQrcodeBiz.java
View file @
ac5674ea
...
@@ -10,6 +10,7 @@ import com.pcloud.book.group.vo.GroupQrcodeBookVO;
...
@@ -10,6 +10,7 @@ import com.pcloud.book.group.vo.GroupQrcodeBookVO;
import
com.pcloud.book.group.vo.ListGroupQrcodeResponseVO
;
import
com.pcloud.book.group.vo.ListGroupQrcodeResponseVO
;
import
com.pcloud.book.group.vo.ListQrcodeByClassifyParamVO
;
import
com.pcloud.book.group.vo.ListQrcodeByClassifyParamVO
;
import
com.pcloud.book.group.vo.UpdateGroupQrcodeRequestVO
;
import
com.pcloud.book.group.vo.UpdateGroupQrcodeRequestVO
;
import
com.pcloud.book.riddle.dto.GroupRiddleDTO
;
import
com.pcloud.common.page.PageBeanNew
;
import
com.pcloud.common.page.PageBeanNew
;
import
java.util.List
;
import
java.util.List
;
...
@@ -130,4 +131,14 @@ public interface GroupQrcodeBiz {
...
@@ -130,4 +131,14 @@ public interface GroupQrcodeBiz {
* @return
* @return
*/
*/
PageBeanNew
<
GroupQrcodeBookVO
>
listQrcodeByAdviser
(
Integer
currentPage
,
Integer
numPerPage
,
String
name
,
Long
adviserId
);
PageBeanNew
<
GroupQrcodeBookVO
>
listQrcodeByAdviser
(
Integer
currentPage
,
Integer
numPerPage
,
String
name
,
Long
adviserId
);
/**
* 猜谜语列表
* @param partyId
* @param currentPage
* @param numPerPage
* @param name
* @return
*/
PageBeanNew
<
GroupRiddleDTO
>
listPageRiddle
(
Long
partyId
,
Integer
currentPage
,
Integer
numPerPage
,
String
name
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/BookGroupBizImpl.java
View file @
ac5674ea
This diff is collapsed.
Click to expand it.
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/BookGroupClassifyBizImpl.java
View file @
ac5674ea
...
@@ -167,7 +167,7 @@ public class BookGroupClassifyBizImpl implements BookGroupClassifyBiz {
...
@@ -167,7 +167,7 @@ public class BookGroupClassifyBizImpl implements BookGroupClassifyBiz {
if
(!
CollectionUtils
.
isEmpty
(
statistic
)
&&
null
!=
statistic
.
get
(
addClassifyVO
.
getBookGroupId
()))
{
if
(!
CollectionUtils
.
isEmpty
(
statistic
)
&&
null
!=
statistic
.
get
(
addClassifyVO
.
getBookGroupId
()))
{
classifyCount
=
statistic
.
get
(
addClassifyVO
.
getBookGroupId
()).
getClassifyCount
();
classifyCount
=
statistic
.
get
(
addClassifyVO
.
getBookGroupId
()).
getClassifyCount
();
}
}
if
(
classifyCount
>=
1
0
)
{
if
(
classifyCount
>=
4
0
)
{
throw
new
BookBizException
(
BookBizException
.
ERROR
,
"分类数量超出限制"
);
throw
new
BookBizException
(
BookBizException
.
ERROR
,
"分类数量超出限制"
);
}
}
if
(
addClassifyVO
.
getPrice
()
==
null
)
{
if
(
addClassifyVO
.
getPrice
()
==
null
)
{
...
@@ -1031,4 +1031,14 @@ public class BookGroupClassifyBizImpl implements BookGroupClassifyBiz {
...
@@ -1031,4 +1031,14 @@ public class BookGroupClassifyBizImpl implements BookGroupClassifyBiz {
return
joinGroupCipherDao
.
getPayPrice
(
wxId
,
qrcodeId
);
return
joinGroupCipherDao
.
getPayPrice
(
wxId
,
qrcodeId
);
}
}
@ParamLog
(
"拖动排序"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
void
dragSortClassify
(
List
<
Long
>
classifyIds
)
{
if
(
ListUtils
.
isEmpty
(
classifyIds
))
{
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_ERROR
,
"参数为空!"
);
}
bookGroupClassifyDao
.
dragSortClassify
(
classifyIds
);
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/GroupQrcodeBizImpl.java
View file @
ac5674ea
...
@@ -49,7 +49,7 @@ import com.pcloud.common.utils.cache.redis.JedisClusterUtils;
...
@@ -49,7 +49,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.usercenter.party.adviser.dto.AdviserBaseInfoDto
;
import
com.pcloud.usercenter.party.adviser.dto.AdviserBaseInfoDto
;
import
com.sdk.wxgroup.WxGroupSDK
;
import
com.sdk.wxgroup.WxGroupSDK
;
import
com.pcloud.book.riddle.dto.GroupRiddleDTO
;
import
org.apache.commons.collections4.MapUtils
;
import
org.apache.commons.collections4.MapUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -578,5 +578,47 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
...
@@ -578,5 +578,47 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
return
pageBeanNew
;
return
pageBeanNew
;
}
}
@Override
public
PageBeanNew
<
GroupRiddleDTO
>
listPageRiddle
(
Long
partyId
,
Integer
currentPage
,
Integer
numPerPage
,
String
name
)
{
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"partyId"
,
partyId
);
paramMap
.
put
(
"name"
,
name
);
PageBeanNew
<
GroupRiddleDTO
>
pageBeanNew
=
groupQrcodeDao
.
listPageNew
(
new
PageParam
(
currentPage
,
numPerPage
),
paramMap
,
"listPageRiddle"
);
if
(
null
==
pageBeanNew
||
ListUtils
.
isEmpty
(
pageBeanNew
.
getRecordList
()))
{
return
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
0
,
new
ArrayList
<>());
}
//标签
Map
<
Long
,
String
>
labelMap
=
new
HashMap
<>();
List
<
Long
>
labelIds
=
new
ArrayList
<>();
List
<
Long
>
proLabels
=
pageBeanNew
.
getRecordList
().
stream
().
filter
(
s
->
s
.
getProLabelId
()
!=
null
).
map
(
GroupRiddleDTO:
:
getProLabelId
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
Long
>
depLabels
=
pageBeanNew
.
getRecordList
().
stream
().
filter
(
s
->
s
.
getDepLabelId
()
!=
null
).
map
(
GroupRiddleDTO:
:
getDepLabelId
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
Long
>
purLabels
=
pageBeanNew
.
getRecordList
().
stream
().
filter
(
s
->
s
.
getPurLabelId
()
!=
null
).
map
(
GroupRiddleDTO:
:
getPurLabelId
).
distinct
().
collect
(
Collectors
.
toList
());
if
(!
ListUtils
.
isEmpty
(
proLabels
))
{
labelIds
.
addAll
(
proLabels
);
}
if
(!
ListUtils
.
isEmpty
(
depLabels
))
{
labelIds
.
addAll
(
depLabels
);
}
if
(!
ListUtils
.
isEmpty
(
purLabels
))
{
labelIds
.
addAll
(
purLabels
);
}
if
(!
ListUtils
.
isEmpty
(
labelIds
))
{
labelMap
=
labelConsr
.
getLabelName
(
labelIds
);
}
if
(!
MapUtils
.
isEmpty
(
labelMap
))
{
for
(
GroupRiddleDTO
riddleDTO
:
pageBeanNew
.
getRecordList
())
{
if
(
null
!=
riddleDTO
.
getProLabelId
()
&&
labelMap
.
containsKey
(
riddleDTO
.
getProLabelId
()))
{
riddleDTO
.
setProLabelName
(
labelMap
.
get
(
riddleDTO
.
getProLabelId
()));
}
if
(
null
!=
riddleDTO
.
getDepLabelId
()
&&
labelMap
.
containsKey
(
riddleDTO
.
getDepLabelId
()))
{
riddleDTO
.
setDepLabelName
(
labelMap
.
get
(
riddleDTO
.
getDepLabelId
()));
}
if
(
null
!=
riddleDTO
.
getPurLabelId
()
&&
labelMap
.
containsKey
(
riddleDTO
.
getPurLabelId
()))
{
riddleDTO
.
setPurLabelName
(
labelMap
.
get
(
riddleDTO
.
getPurLabelId
()));
}
}
}
return
pageBeanNew
;
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/dao/BookGroupClassifyDao.java
View file @
ac5674ea
...
@@ -241,4 +241,8 @@ public interface BookGroupClassifyDao extends BaseDao<BookGroupClassify> {
...
@@ -241,4 +241,8 @@ public interface BookGroupClassifyDao extends BaseDao<BookGroupClassify> {
*/
*/
void
updateHasOpenLearningReport
(
Long
classifyId
,
Boolean
hasOpenLearningReport
,
Long
partyId
);
void
updateHasOpenLearningReport
(
Long
classifyId
,
Boolean
hasOpenLearningReport
,
Long
partyId
);
/**
* 拖动排序
*/
void
dragSortClassify
(
List
<
Long
>
classifyIds
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/dao/GroupQrcodeDao.java
View file @
ac5674ea
...
@@ -196,4 +196,12 @@ public interface GroupQrcodeDao extends BaseDao<GroupQrcode> {
...
@@ -196,4 +196,12 @@ public interface GroupQrcodeDao extends BaseDao<GroupQrcode> {
* 根据分类id集合查询
* 根据分类id集合查询
*/
*/
List
<
GroupQrcodeFoAdDTO
>
GroupQrcodeFoAdDTOSByClassifyIds
(
List
<
Long
>
classifyIds
);
List
<
GroupQrcodeFoAdDTO
>
GroupQrcodeFoAdDTOSByClassifyIds
(
List
<
Long
>
classifyIds
);
/**
* 修改猜谜语开启状态
* @param qrcodeId
* @param status
*/
void
updateRiddleOpenStatus
(
Long
qrcodeId
,
Boolean
status
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/dao/impl/BookGroupClassifyDaoImpl.java
View file @
ac5674ea
...
@@ -211,4 +211,11 @@ public class BookGroupClassifyDaoImpl extends BaseDaoImpl<BookGroupClassify> imp
...
@@ -211,4 +211,11 @@ public class BookGroupClassifyDaoImpl extends BaseDaoImpl<BookGroupClassify> imp
this
.
getSqlSession
().
update
(
this
.
getStatement
(
"updateHasOpenLearningReport"
),
paramMap
);
this
.
getSqlSession
().
update
(
this
.
getStatement
(
"updateHasOpenLearningReport"
),
paramMap
);
}
}
@Override
public
void
dragSortClassify
(
List
<
Long
>
classifyIds
)
{
Map
<
String
,
Object
>
paramMap
=
new
HashMap
();
paramMap
.
put
(
"classifyIds"
,
classifyIds
);
this
.
getSqlSession
().
update
(
this
.
getStatement
(
"dragSortClassify"
),
paramMap
);
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/dao/impl/GroupQrcodeDaoImpl.java
View file @
ac5674ea
...
@@ -188,4 +188,13 @@ public class GroupQrcodeDaoImpl extends BaseDaoImpl<GroupQrcode> implements Grou
...
@@ -188,4 +188,13 @@ public class GroupQrcodeDaoImpl extends BaseDaoImpl<GroupQrcode> implements Grou
public
List
<
GroupQrcodeFoAdDTO
>
GroupQrcodeFoAdDTOSByClassifyIds
(
List
<
Long
>
classifyIds
)
{
public
List
<
GroupQrcodeFoAdDTO
>
GroupQrcodeFoAdDTOSByClassifyIds
(
List
<
Long
>
classifyIds
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getStatement
(
"GroupQrcodeFoAdDTOSByClassifyIds"
),
classifyIds
);
return
this
.
getSqlSession
().
selectList
(
this
.
getStatement
(
"GroupQrcodeFoAdDTOSByClassifyIds"
),
classifyIds
);
}
}
@Override
public
void
updateRiddleOpenStatus
(
Long
qrcodeId
,
Boolean
status
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"qrcodeId"
,
qrcodeId
);
map
.
put
(
"status"
,
status
);
getSessionTemplate
().
update
(
getStatement
(
"updateRiddleOpenStatus"
),
map
);
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/dto/GroupStoreMyPayDto.java
0 → 100644
View file @
ac5674ea
package
com
.
pcloud
.
book
.
group
.
dto
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**
* @author 杨涛
* @description 商城用户已购买的社群码dto
* @date 2019/8/9 10:30
*/
@ApiModel
(
"商城用户已购买的社群码dto"
)
@JsonInclude
(
JsonInclude
.
Include
.
NON_NULL
)
public
class
GroupStoreMyPayDto
{
@ApiModelProperty
(
"标识(appId/productId/bookGroupId)"
)
private
Long
originId
;
@ApiModelProperty
(
"类型(APP/PRODUCT/BOOK_GROUP)"
)
private
String
originType
;
@ApiModelProperty
(
"标题"
)
private
String
originName
;
@ApiModelProperty
(
"封面图片"
)
private
String
coverImg
;
@ApiModelProperty
(
"已经购买的资源数量"
)
private
Integer
resourceNum
;
@ApiModelProperty
(
"已经购买的资源数量"
)
private
Integer
resourceItemNum
;
public
Long
getOriginId
()
{
return
originId
;
}
public
void
setOriginId
(
Long
originId
)
{
this
.
originId
=
originId
;
}
public
String
getOriginType
()
{
return
originType
;
}
public
void
setOriginType
(
String
originType
)
{
this
.
originType
=
originType
;
}
public
String
getOriginName
()
{
return
originName
;
}
public
void
setOriginName
(
String
originName
)
{
this
.
originName
=
originName
;
}
public
String
getCoverImg
()
{
return
coverImg
;
}
public
void
setCoverImg
(
String
coverImg
)
{
this
.
coverImg
=
coverImg
;
}
public
Integer
getResourceNum
()
{
return
resourceNum
;
}
public
void
setResourceNum
(
Integer
resourceNum
)
{
this
.
resourceNum
=
resourceNum
;
}
public
Integer
getResourceItemNum
()
{
return
resourceItemNum
;
}
public
void
setResourceItemNum
(
Integer
resourceItemNum
)
{
this
.
resourceItemNum
=
resourceItemNum
;
}
@Override
public
String
toString
()
{
return
"GroupStoreMyPayDto{"
+
"originId="
+
originId
+
", originType='"
+
originType
+
'\''
+
", originName='"
+
originName
+
'\''
+
", coverImg='"
+
coverImg
+
'\''
+
", resourceNum="
+
resourceNum
+
", resourceItemNum="
+
resourceItemNum
+
'}'
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/entity/GroupQrcode.java
View file @
ac5674ea
...
@@ -80,6 +80,10 @@ public class GroupQrcode extends BaseEntity {
...
@@ -80,6 +80,10 @@ public class GroupQrcode extends BaseEntity {
* 修改用户
* 修改用户
*/
*/
private
Long
updateUser
;
private
Long
updateUser
;
/**
* 猜谜语是否开启
*/
private
Boolean
riddleOpen
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
createTime
;
private
Date
createTime
;
...
@@ -231,6 +235,14 @@ public class GroupQrcode extends BaseEntity {
...
@@ -231,6 +235,14 @@ public class GroupQrcode extends BaseEntity {
this
.
qrcodeState
=
qrcodeState
;
this
.
qrcodeState
=
qrcodeState
;
}
}
public
Boolean
getRiddleOpen
()
{
return
riddleOpen
;
}
public
void
setRiddleOpen
(
Boolean
riddleOpen
)
{
this
.
riddleOpen
=
riddleOpen
;
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"GroupQrcode{"
+
return
"GroupQrcode{"
+
...
@@ -243,12 +255,15 @@ public class GroupQrcode extends BaseEntity {
...
@@ -243,12 +255,15 @@ public class GroupQrcode extends BaseEntity {
", weixinGroupId='"
+
weixinGroupId
+
'\''
+
", weixinGroupId='"
+
weixinGroupId
+
'\''
+
", qrcodeUrl='"
+
qrcodeUrl
+
'\''
+
", qrcodeUrl='"
+
qrcodeUrl
+
'\''
+
", useState="
+
useState
+
", useState="
+
useState
+
", qrcodeState="
+
qrcodeState
+
", changeNameState="
+
changeNameState
+
", changeNameState="
+
changeNameState
+
", isDelete="
+
isDelete
+
", isDelete="
+
isDelete
+
", createUser="
+
createUser
+
", createUser="
+
createUser
+
", updateUser="
+
updateUser
+
", updateUser="
+
updateUser
+
", riddleOpen="
+
riddleOpen
+
", createTime="
+
createTime
+
", createTime="
+
createTime
+
", updateTime="
+
updateTime
+
", updateTime="
+
updateTime
+
", qrcodeHeadUrl='"
+
qrcodeHeadUrl
+
'\''
+
'}'
;
'}'
;
}
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/facade/BookGroupClassifyFacade.java
View file @
ac5674ea
...
@@ -172,4 +172,11 @@ public interface BookGroupClassifyFacade {
...
@@ -172,4 +172,11 @@ public interface BookGroupClassifyFacade {
@RequestParam
(
value
=
"keyword"
,
required
=
false
)
@ApiParam
(
"关键词"
)
String
keyword
@RequestParam
(
value
=
"keyword"
,
required
=
false
)
@ApiParam
(
"关键词"
)
String
keyword
)
throws
BizException
,
PermissionException
;
)
throws
BizException
,
PermissionException
;
@ApiOperation
(
"拖动排序"
)
@PostMapping
(
"dragSortClassify"
)
ResponseDto
<?>
dragSortClassify
(
@RequestHeader
(
"token"
)
@ApiParam
(
"token信息"
)
String
token
,
@RequestBody
List
<
Long
>
classifyIds
)
throws
BizException
,
PermissionException
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/facade/BookGroupFacade.java
View file @
ac5674ea
...
@@ -4,7 +4,16 @@ import com.pcloud.book.group.entity.BookGroupClassify;
...
@@ -4,7 +4,16 @@ import com.pcloud.book.group.entity.BookGroupClassify;
import
org.codehaus.jackson.JsonParseException
;
import
org.codehaus.jackson.JsonParseException
;
import
org.springframework.cloud.netflix.feign.FeignClient
;
import
org.springframework.cloud.netflix.feign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.CookieValue
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestHeader
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
com.pcloud.book.group.entity.BookGroup
;
import
com.pcloud.book.group.entity.BookGroup
;
import
com.pcloud.book.group.vo.ListBookGroup4ChannelParamVO
;
import
com.pcloud.book.group.vo.UpdateRankTypeVO
;
import
com.pcloud.book.group.vo.UpdateRankTypeVO
;
import
com.pcloud.common.dto.ResponseDto
;
import
com.pcloud.common.dto.ResponseDto
;
import
com.pcloud.common.exceptions.BizException
;
import
com.pcloud.common.exceptions.BizException
;
...
@@ -112,6 +121,28 @@ public interface BookGroupFacade {
...
@@ -112,6 +121,28 @@ public interface BookGroupFacade {
@RequestParam
(
value
=
"endDate"
,
required
=
false
)
String
endDate
)
@RequestParam
(
value
=
"endDate"
,
required
=
false
)
String
endDate
)
throws
BizException
,
PermissionException
;
throws
BizException
,
PermissionException
;
@ApiOperation
(
value
=
"获取社群书列表(运营)"
,
httpMethod
=
"POST"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"listBookGroup4ChannelParamVO"
,
value
=
"ListBookGroup4ChannelParamVO"
,
dataType
=
"ListBookGroup4ChannelParamVO"
,
paramType
=
"body"
)
})
@RequestMapping
(
value
=
"listBookGroup4Channel"
,
method
=
RequestMethod
.
POST
)
ResponseDto
<
PageBean
>
listBookGroup4Channel
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
ListBookGroup4ChannelParamVO
listBookGroup4ChannelParamVO
)
throws
BizException
,
PermissionException
;
@ApiOperation
(
value
=
"获取用户购买或者参与过的社群书信息"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"userInfo"
,
value
=
"Cookie"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"currentPage"
,
value
=
"当前页"
,
dataType
=
"Integer"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"numPerPage"
,
value
=
"每页条数"
,
dataType
=
"Integer"
,
paramType
=
"query"
)
})
@RequestMapping
(
value
=
"getUserBrowseGroup4KnowLedgeMall"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<?>
getUserBrowseGroup4KnowLedgeMall
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestParam
(
value
=
"currentPage"
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
)
Integer
numPerPage
)
throws
BizException
,
PermissionException
;
@ApiOperation
(
value
=
"获取社群书列表(编辑)"
,
httpMethod
=
"GET"
)
@ApiOperation
(
value
=
"获取社群书列表(编辑)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/facade/impl/BookGroupClassifyFacadeImpl.java
View file @
ac5674ea
...
@@ -184,4 +184,16 @@ public class BookGroupClassifyFacadeImpl implements BookGroupClassifyFacade {
...
@@ -184,4 +184,16 @@ public class BookGroupClassifyFacadeImpl implements BookGroupClassifyFacade {
return
new
ResponseDto
<>(
bookGroupClassifyBiz
.
listClassifyForLearningReport
(
currentPage
,
numPerPage
,
keyword
,
partyId
));
return
new
ResponseDto
<>(
bookGroupClassifyBiz
.
listClassifyForLearningReport
(
currentPage
,
numPerPage
,
keyword
,
partyId
));
}
}
@ApiOperation
(
"拖动排序"
)
@PostMapping
(
"dragSortClassify"
)
@Override
public
ResponseDto
<?>
dragSortClassify
(
@RequestHeader
(
"token"
)
@ApiParam
(
"token信息"
)
String
token
,
@RequestBody
List
<
Long
>
classifyIds
)
throws
BizException
,
PermissionException
{
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
bookGroupClassifyBiz
.
dragSortClassify
(
classifyIds
);
return
new
ResponseDto
<>();
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/facade/impl/BookGroupFacadeImpl.java
View file @
ac5674ea
...
@@ -3,13 +3,15 @@ package com.pcloud.book.group.facade.impl;
...
@@ -3,13 +3,15 @@ package com.pcloud.book.group.facade.impl;
import
com.pcloud.book.base.exception.BookBizException
;
import
com.pcloud.book.base.exception.BookBizException
;
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.dto.GroupStoreMyPayDto
;
import
com.pcloud.book.group.entity.BookGroup
;
import
com.pcloud.book.group.entity.BookGroup
;
import
com.pcloud.book.group.entity.BookGroupClassify
;
import
com.pcloud.book.group.entity.BookGroupClassify
;
import
com.pcloud.book.group.facade.BookGroupFacade
;
import
com.pcloud.book.group.facade.BookGroupFacade
;
import
com.pcloud.book.group.vo.
UpdateRankTypeVO
;
import
com.pcloud.book.group.vo.
*
;
import
com.pcloud.common.dto.ResponseDto
;
import
com.pcloud.common.dto.ResponseDto
;
import
com.pcloud.common.exceptions.BizException
;
import
com.pcloud.common.exceptions.BizException
;
import
com.pcloud.common.page.PageBean
;
import
com.pcloud.common.page.PageBean
;
import
com.pcloud.common.page.PageBeanNew
;
import
com.pcloud.common.page.PageParam
;
import
com.pcloud.common.page.PageParam
;
import
com.pcloud.common.permission.PermissionException
;
import
com.pcloud.common.permission.PermissionException
;
import
com.pcloud.common.utils.SessionUtil
;
import
com.pcloud.common.utils.SessionUtil
;
...
@@ -19,6 +21,15 @@ import com.pcloud.common.utils.string.StringUtil;
...
@@ -19,6 +21,15 @@ import com.pcloud.common.utils.string.StringUtil;
import
org.codehaus.jackson.JsonParseException
;
import
org.codehaus.jackson.JsonParseException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.CookieValue
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestHeader
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -164,6 +175,26 @@ public class BookGroupFacadeImpl implements BookGroupFacade {
...
@@ -164,6 +175,26 @@ public class BookGroupFacadeImpl implements BookGroupFacade {
return
new
ResponseDto
<>(
pageBean
);
return
new
ResponseDto
<>(
pageBean
);
}
}
@Override
@RequestMapping
(
value
=
"listBookGroup4Channel"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<
PageBean
>
listBookGroup4Channel
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
ListBookGroup4ChannelParamVO
listBookGroup4ChannelParamVO
)
throws
BizException
,
PermissionException
{
Long
channelId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
PageBean
pageBean
=
bookGroupBiz
.
listBookGroup4Channel
(
channelId
,
listBookGroup4ChannelParamVO
);
return
new
ResponseDto
<>(
pageBean
);
}
@Override
@RequestMapping
(
value
=
"getUserBrowseGroup4KnowLedgeMall"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<?>
getUserBrowseGroup4KnowLedgeMall
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestParam
(
value
=
"currentPage"
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
)
Integer
numPerPage
)
throws
BizException
,
PermissionException
{
Long
channelId
=
Cookie
.
getId
(
userInfo
,
Cookie
.
_CHANNEL_ID
);
Long
wechatUserId
=
Cookie
.
getId
(
userInfo
,
Cookie
.
_WECHAT_USER_ID
);
PageBeanNew
<
GroupStoreMyPayDto
>
resultInfos
=
bookGroupBiz
.
getUserBrowseGroup4KnowLedgeMall
(
channelId
,
wechatUserId
,
currentPage
,
numPerPage
);
return
new
ResponseDto
<>(
resultInfos
);
}
/**
/**
* 获取社群书列表(编辑)
* 获取社群书列表(编辑)
*/
*/
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/service/impl/BookGroupClassifyServiceImpl.java
View file @
ac5674ea
...
@@ -2,10 +2,7 @@ package com.pcloud.book.group.service.impl;
...
@@ -2,10 +2,7 @@ package com.pcloud.book.group.service.impl;
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.biz.GroupQrcodeBiz
;
import
com.pcloud.book.group.dto.GroupClassifyQrcodeDTO
;
import
com.pcloud.book.group.dto.*
;
import
com.pcloud.book.group.dto.GroupQrcodeBaseDTO
;
import
com.pcloud.book.group.dto.GroupQrcodeInfo4Advertising
;
import
com.pcloud.book.group.dto.ProAssocGroupAndUserNumberDTO
;
import
com.pcloud.book.group.service.BookGroupClassifyService
;
import
com.pcloud.book.group.service.BookGroupClassifyService
;
import
com.pcloud.common.dto.ResponseDto
;
import
com.pcloud.common.dto.ResponseDto
;
import
com.pcloud.common.utils.ResponseHandleUtil
;
import
com.pcloud.common.utils.ResponseHandleUtil
;
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/service/impl/BookGroupServiceImpl.java
View file @
ac5674ea
...
@@ -13,7 +13,9 @@ import com.pcloud.book.group.biz.BookGroupBiz;
...
@@ -13,7 +13,9 @@ import com.pcloud.book.group.biz.BookGroupBiz;
import
com.pcloud.book.group.dto.BookGroupDTO
;
import
com.pcloud.book.group.dto.BookGroupDTO
;
import
com.pcloud.book.group.service.BookGroupService
;
import
com.pcloud.book.group.service.BookGroupService
;
import
com.pcloud.common.dto.ResponseDto
;
import
com.pcloud.common.dto.ResponseDto
;
import
com.pcloud.common.dto.StoreFlowInfoDto
;
import
com.pcloud.common.exceptions.BizException
;
import
com.pcloud.common.exceptions.BizException
;
import
com.pcloud.common.page.PageBeanNew
;
import
com.pcloud.common.utils.ResponseHandleUtil
;
import
com.pcloud.common.utils.ResponseHandleUtil
;
/**
/**
...
@@ -46,6 +48,35 @@ public class BookGroupServiceImpl implements BookGroupService {
...
@@ -46,6 +48,35 @@ public class BookGroupServiceImpl implements BookGroupService {
}
}
/**
/**
* 为信息流批量获取社群书基本信息
*/
@Override
@RequestMapping
(
value
=
"getFlowInfoByBookGroupIds"
,
method
=
RequestMethod
.
POST
)
public
ResponseEntity
<
ResponseDto
<
Map
<
Long
,
StoreFlowInfoDto
>>>
getFlowInfoByBookGroupIds
(
@RequestBody
List
<
Long
>
bookGroupIds
)
throws
BizException
{
return
ResponseHandleUtil
.
toResponse
(
bookGroupBiz
.
getFlowInfoByBookGroupIds
(
bookGroupIds
));
}
/**
* 获取指定条数社群书基本信息
*/
@Override
@RequestMapping
(
value
=
"getBookGroupInfoByChannelId"
,
method
=
RequestMethod
.
GET
)
public
ResponseEntity
<
ResponseDto
<
Map
<
Long
,
StoreFlowInfoDto
>>>
getBookGroupInfoByChannelId
(
@RequestParam
(
"channelId"
)
Long
channelId
,
@RequestParam
(
"itemNum"
)
Integer
itemNum
)
throws
BizException
{
return
ResponseHandleUtil
.
toResponse
(
bookGroupBiz
.
getBookGroupInfoByChannelId
(
channelId
,
itemNum
));
}
/**
* 知识商城获取社群书信息
*/
@Override
@RequestMapping
(
value
=
"listBookGroup4KnowledgeMall"
,
method
=
RequestMethod
.
GET
)
public
ResponseEntity
<
ResponseDto
<
PageBeanNew
<
StoreFlowInfoDto
>>>
listBookGroup4KnowledgeMall
(
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
,
@RequestParam
(
"currentPage"
)
int
currentPage
,
@RequestParam
(
"numPerPage"
)
int
numPerPage
)
throws
BizException
{
return
ResponseHandleUtil
.
toResponse
(
bookGroupBiz
.
listBookGroup4KnowledgeMall
(
channelId
,
currentPage
,
numPerPage
));
}
/**
* 获取社群书基本信息
* 获取社群书基本信息
*/
*/
@Override
@Override
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/vo/ListBook4ChannelVO.java
0 → 100644
View file @
ac5674ea
package
com
.
pcloud
.
book
.
group
.
vo
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
/**
* @author 戴兴
* @description TODO
* @date 2019/7/23 15:53
*/
@JsonInclude
(
JsonInclude
.
Include
.
NON_NULL
)
public
class
ListBook4ChannelVO
implements
Serializable
{
@ApiModelProperty
(
"书唯一标识"
)
private
Long
bookId
;
@ApiModelProperty
(
"书群唯一标识"
)
private
Long
bookGroupId
;
@ApiModelProperty
(
"书名"
)
private
String
bookName
;
@ApiModelProperty
(
"ISBN"
)
private
String
isbn
;
@ApiModelProperty
(
"书编号"
)
private
String
bookNumber
;
@ApiModelProperty
(
"群分类数"
)
private
Long
classifyNum
;
@ApiModelProperty
(
"群总人数"
)
private
Long
totalNum
;
@ApiModelProperty
(
"书封面图"
)
private
String
coverImg
;
public
String
getBookName
()
{
return
bookName
;
}
public
void
setBookName
(
String
bookName
)
{
this
.
bookName
=
bookName
;
}
public
String
getIsbn
()
{
return
isbn
;
}
public
void
setIsbn
(
String
isbn
)
{
this
.
isbn
=
isbn
;
}
public
String
getBookNumber
()
{
return
bookNumber
;
}
public
void
setBookNumber
(
String
bookNumber
)
{
this
.
bookNumber
=
bookNumber
;
}
public
Long
getClassifyNum
()
{
return
classifyNum
;
}
public
void
setClassifyNum
(
Long
classifyNum
)
{
this
.
classifyNum
=
classifyNum
;
}
public
Long
getTotalNum
()
{
return
totalNum
;
}
public
void
setTotalNum
(
Long
totalNum
)
{
this
.
totalNum
=
totalNum
;
}
public
Long
getBookId
()
{
return
bookId
;
}
public
void
setBookId
(
Long
bookId
)
{
this
.
bookId
=
bookId
;
}
public
Long
getBookGroupId
()
{
return
bookGroupId
;
}
public
void
setBookGroupId
(
Long
bookGroupId
)
{
this
.
bookGroupId
=
bookGroupId
;
}
public
String
getCoverImg
()
{
return
coverImg
;
}
public
void
setCoverImg
(
String
coverImg
)
{
this
.
coverImg
=
coverImg
;
}
@Override
public
String
toString
()
{
return
"ListBook4ChannelVO{"
+
"bookId="
+
bookId
+
", bookGroupId="
+
bookGroupId
+
", bookName='"
+
bookName
+
'\''
+
", isbn='"
+
isbn
+
'\''
+
", bookNumber='"
+
bookNumber
+
'\''
+
", classifyNum="
+
classifyNum
+
", totalNum="
+
totalNum
+
", coverImg='"
+
coverImg
+
'\''
+
'}'
;
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/group/vo/ListBookGroup4ChannelParamVO.java
0 → 100644
View file @
ac5674ea
package
com
.
pcloud
.
book
.
group
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @author 戴兴
* @description TODO
* @date 2019/7/23 15:28
*/
@JsonInclude
(
JsonInclude
.
Include
.
NON_NULL
)
public
class
ListBookGroup4ChannelParamVO
implements
Serializable
{
@ApiModelProperty
(
"当前页"
)
private
Integer
currentPage
;
@ApiModelProperty
(
"每页条数"
)
private
Integer
numPerPage
;
@ApiModelProperty
(
"搜索的关键词"
)
private
String
keywords
;
@ApiModelProperty
(
"开始时间"
)
private
String
startTime
;
@ApiModelProperty
(
"结束时间"
)
private
String
endTime
;
@ApiModelProperty
(
"是否是基金书 0-否,1-是"
)
private
Integer
isFundBook
;
public
Integer
getCurrentPage
()
{
return
currentPage
;
}
public
void
setCurrentPage
(
Integer
currentPage
)
{
this
.
currentPage
=
currentPage
;
}
public
Integer
getNumPerPage
()
{
return
numPerPage
;
}
public
void
setNumPerPage
(
Integer
numPerPage
)
{
this
.
numPerPage
=
numPerPage
;
}
public
String
getKeywords
()
{
return
keywords
;
}
public
void
setKeywords
(
String
keywords
)
{
this
.
keywords
=
keywords
;
}
public
String
getStartTime
()
{
return
startTime
;
}
public
void
setStartTime
(
String
startTime
)
{
this
.
startTime
=
startTime
;
}
public
String
getEndTime
()
{
return
endTime
;
}
public
void
setEndTime
(
String
endTime
)
{
this
.
endTime
=
endTime
;
}
public
Integer
getIsFundBook
()
{
return
isFundBook
;
}
public
void
setIsFundBook
(
Integer
isFundBook
)
{
this
.
isFundBook
=
isFundBook
;
}
@Override
public
String
toString
()
{
return
"ListBookGroup4ChannelParamVO{"
+
"currentPage="
+
currentPage
+
", numPerPage="
+
numPerPage
+
", keywords='"
+
keywords
+
'\''
+
", startTime="
+
startTime
+
", endTime="
+
endTime
+
", isFundBook="
+
isFundBook
+
'}'
;
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/keywords/biz/impl/BookGuideBizImpl.java
View file @
ac5674ea
...
@@ -410,10 +410,24 @@ public class BookGuideBizImpl implements BookGuideBiz {
...
@@ -410,10 +410,24 @@ public class BookGuideBizImpl implements BookGuideBiz {
}
}
}
}
@ParamLog
(
"推关学习报告键词消息"
)
@ParamLog
(
"推关学习报告
/猜谜语关
键词消息"
)
private
void
pushLearningReport
(
GroupClassifyQrcodeDTO
classifyQrcodeInfo
,
String
robotId
,
String
weixinGroupId
,
String
ip
)
{
private
void
pushLearningReport
(
GroupClassifyQrcodeDTO
classifyQrcodeInfo
,
String
robotId
,
String
weixinGroupId
,
String
ip
)
{
Boolean
reportOpen
=
false
;
Boolean
riddleOpen
=
false
;
if
(
classifyQrcodeInfo
.
getHasOpenLearningReport
()
!=
null
&&
classifyQrcodeInfo
.
getHasOpenLearningReport
())
{
if
(
classifyQrcodeInfo
.
getHasOpenLearningReport
()
!=
null
&&
classifyQrcodeInfo
.
getHasOpenLearningReport
())
{
reportOpen
=
true
;
}
GroupQrcode
groupQrcode
=
groupQrcodeDao
.
getGroupQrcodeByGroupId
(
weixinGroupId
);
if
(
null
!=
groupQrcode
&&
groupQrcode
.
getRiddleOpen
())
{
riddleOpen
=
true
;
}
if
(
reportOpen
&&
riddleOpen
)
{
SendWeixinRequestTools
.
sendTextMessage
(
"关键词【学习报告】\n 获取个人专属学习报告,与群成员PK元气值\n"
+
"关键词【猜谜语】\n 猜谜语,大家一起玩,看谁666"
,
robotId
,
weixinGroupId
,
ip
);
}
else
if
(
reportOpen
)
{
SendWeixinRequestTools
.
sendTextMessage
(
"关键词【学习报告】\n 获取个人专属学习报告,与群成员PK元气值"
,
robotId
,
weixinGroupId
,
ip
);
SendWeixinRequestTools
.
sendTextMessage
(
"关键词【学习报告】\n 获取个人专属学习报告,与群成员PK元气值"
,
robotId
,
weixinGroupId
,
ip
);
}
else
if
(
riddleOpen
)
{
SendWeixinRequestTools
.
sendTextMessage
(
"关键词【猜谜语】\n 猜谜语,大家一起玩,看谁666"
,
robotId
,
weixinGroupId
,
ip
);
}
}
}
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/mq/topic/WxGroupSendTextListener.java
View file @
ac5674ea
...
@@ -6,6 +6,7 @@ import com.pcloud.book.clock.dto.BookClockInfoDTO;
...
@@ -6,6 +6,7 @@ import com.pcloud.book.clock.dto.BookClockInfoDTO;
import
com.pcloud.book.consumer.wechatgroup.WechatGroupConsr
;
import
com.pcloud.book.consumer.wechatgroup.WechatGroupConsr
;
import
com.pcloud.book.keywords.biz.BookKeywordBiz
;
import
com.pcloud.book.keywords.biz.BookKeywordBiz
;
import
com.pcloud.book.mq.config.MQTopicConumer
;
import
com.pcloud.book.mq.config.MQTopicConumer
;
import
com.pcloud.book.riddle.biz.RiddleRecordBiz
;
import
com.pcloud.common.core.aspect.ParamLog
;
import
com.pcloud.common.core.aspect.ParamLog
;
import
com.pcloud.common.exceptions.BizException
;
import
com.pcloud.common.exceptions.BizException
;
import
com.pcloud.common.utils.ListUtils
;
import
com.pcloud.common.utils.ListUtils
;
...
@@ -19,9 +20,7 @@ import org.springframework.amqp.rabbit.annotation.RabbitHandler;
...
@@ -19,9 +20,7 @@ import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import
org.springframework.amqp.rabbit.annotation.RabbitListener
;
import
org.springframework.amqp.rabbit.annotation.RabbitListener
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
import
java.util.List
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
/**
/**
...
@@ -34,7 +33,6 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -34,7 +33,6 @@ import lombok.extern.slf4j.Slf4j;
public
class
WxGroupSendTextListener
{
public
class
WxGroupSendTextListener
{
private
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
WxGroupSendTextListener
.
class
);
private
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
WxGroupSendTextListener
.
class
);
@Autowired
@Autowired
private
BookKeywordBiz
bookKeywordBiz
;
private
BookKeywordBiz
bookKeywordBiz
;
@Autowired
@Autowired
...
@@ -43,6 +41,8 @@ public class WxGroupSendTextListener {
...
@@ -43,6 +41,8 @@ public class WxGroupSendTextListener {
private
BookClockKeywordBiz
bookClockKeywordBiz
;
private
BookClockKeywordBiz
bookClockKeywordBiz
;
@Autowired
@Autowired
private
BookClockCheck
bookClockCheck
;
private
BookClockCheck
bookClockCheck
;
@Autowired
private
RiddleRecordBiz
riddleRecordBiz
;
/**
/**
* 接收微信用户进群消息
* 接收微信用户进群消息
...
@@ -65,9 +65,12 @@ public class WxGroupSendTextListener {
...
@@ -65,9 +65,12 @@ public class WxGroupSendTextListener {
bookKeywordBiz
.
sendKeywordMessage
(
sendTextDTO
.
getTextContent
().
trim
(),
sendTextDTO
.
getWechatGroupId
(),
wechatUserId
,
sendTextDTO
.
getWxId
(),
sendTextDTO
.
getIp
(),
sendTextDTO
.
getCode
());
bookKeywordBiz
.
sendKeywordMessage
(
sendTextDTO
.
getTextContent
().
trim
(),
sendTextDTO
.
getWechatGroupId
(),
wechatUserId
,
sendTextDTO
.
getWxId
(),
sendTextDTO
.
getIp
(),
sendTextDTO
.
getCode
());
log
.
info
(
"[接收用户发送文本消息] 总耗时:{}ms "
,
System
.
currentTimeMillis
()
-
l
);
log
.
info
(
"[接收用户发送文本消息] 总耗时:{}ms "
,
System
.
currentTimeMillis
()
-
l
);
}
}
//猜谜语
riddleRecordBiz
.
riddleProcess
(
sendTextDTO
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LOGGER
.
error
(
"接收用户发送文本消息失败"
+
e
.
getMessage
(),
e
);
LOGGER
.
error
(
"接收用户发送文本消息失败"
+
e
.
getMessage
(),
e
);
}
}
}
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/riddle/biz/RiddleRecordBiz.java
0 → 100644
View file @
ac5674ea
package
com
.
pcloud
.
book
.
riddle
.
biz
;
import
com.pcloud.book.riddle.dto.GroupRedisDTO
;
import
com.pcloud.book.riddle.dto.GroupRiddleDTO
;
import
com.pcloud.common.page.PageBeanNew
;
import
com.pcloud.wechatgroup.message.dto.SendTextDTO
;
/**
* @描述:猜谜过程
* @作者:zhuyajie
* @创建时间:18:20 2019/7/24
* @版本:1.0
*/
public
interface
RiddleRecordBiz
{
/**
* 猜谜过程
* @param sendTextDTO
*/
public
void
riddleProcess
(
SendTextDTO
sendTextDTO
);
/**
* 猜谜语详情列表
* @param partyId
* @param currentPage
* @param numPerPage
* @param name
* @return
*/
PageBeanNew
<
GroupRiddleDTO
>
listPage
(
Long
partyId
,
Integer
currentPage
,
Integer
numPerPage
,
String
name
);
/**
* 修改猜谜语开启状态
* @param qrcodeId
* @param status
*/
void
updateRiddleOpenStatus
(
Long
qrcodeId
,
Boolean
status
);
/**
* 自动结束
* @param wxGroupId
* @param wxId
* @param ip
* @param wxUserId
*/
public
void
autoEnd
(
String
wxGroupId
,
String
wxId
,
String
ip
,
String
wxUserId
);
/**
* 根据类型查回复语
* @param type
* @return
*/
public
String
getRandomReply
(
String
type
);
/**
* 发文本消息
* @param wxId
* @param wxGroupId
* @param content
* @param ip
* @param wxUserId
*/
public
void
sendWeixinTextMessage
(
String
wxId
,
String
wxGroupId
,
String
content
,
String
ip
,
String
wxUserId
);
/**
* 发送答错文案
* @param groupRedisDTO
*/
public
void
sendIncorrectMessage
(
GroupRedisDTO
groupRedisDTO
);
}
pcloud-service-book/src/main/java/com/pcloud/book/riddle/biz/impl/RiddleRecordBizImpl.java
0 → 100644
View file @
ac5674ea
This diff is collapsed.
Click to expand it.
pcloud-service-book/src/main/java/com/pcloud/book/riddle/dao/RiddleDao.java
0 → 100644
View file @
ac5674ea
package
com
.
pcloud
.
book
.
riddle
.
dao
;
import
com.pcloud.book.riddle.entity.Riddle
;
import
com.pcloud.common.core.dao.BaseDao
;
/**
* @描述:
* @作者:zhuyajie
* @创建时间:16:47 2019/7/24
* @版本:1.0
*/
public
interface
RiddleDao
extends
BaseDao
<
Riddle
>
{
/**
* 根据等级和序号查下一个谜面
* @param grade
* @param seq
* @return
*/
Riddle
getRiddleByGradeAndSeq
(
Integer
grade
,
Integer
seq
);
}
pcloud-service-book/src/main/java/com/pcloud/book/riddle/dao/RiddleRecordDao.java
0 → 100644
View file @
ac5674ea
package
com
.
pcloud
.
book
.
riddle
.
dao
;
import
com.pcloud.book.riddle.dto.GroupRiddleDTO
;
import
com.pcloud.book.riddle.entity.RiddleRecord
;
import
com.pcloud.common.core.dao.BaseDao
;
/**
* @描述:猜谜记录
* @作者:zhuyajie
* @创建时间:18:18 2019/7/24
* @版本:1.0
*/
public
interface
RiddleRecordDao
extends
BaseDao
<
RiddleRecord
>
{
/**
* 获取上一条猜谜记录
* @param wxGroupId
* @return
*/
RiddleRecord
getLastRecordByWxGroupId
(
String
wxGroupId
);
/**
* 获得答对题目数量
* @param wxGroupId
* @return
*/
Integer
getCorrectCountByGroup
(
String
wxGroupId
,
Integer
finishCount
);
/**
* 获取参与次数、人数
* @param wxGroupId
* @return
*/
public
GroupRiddleDTO
getParticipateCount
(
String
wxGroupId
);
}
pcloud-service-book/src/main/java/com/pcloud/book/riddle/dao/RiddleReplyDao.java
0 → 100644
View file @
ac5674ea
package
com
.
pcloud
.
book
.
riddle
.
dao
;
import
com.pcloud.book.riddle.entity.RiddleReply
;
import
com.pcloud.common.core.dao.BaseDao
;
import
java.util.List
;
/**
* @描述:回复文案
* @作者:zhuyajie
* @创建时间:16:58 2019/7/24
* @版本:1.0
*/
public
interface
RiddleReplyDao
extends
BaseDao
<
RiddleReply
>
{
/**
* 根据类型获取回复语
* @param code
* @return
*/
List
<
String
>
getReplyByType
(
String
code
);
}
pcloud-service-book/src/main/java/com/pcloud/book/riddle/dao/impl/RiddleDaoImpl.java
0 → 100644
View file @
ac5674ea
package
com
.
pcloud
.
book
.
riddle
.
dao
.
impl
;
import
com.pcloud.book.riddle.dao.RiddleDao
;
import
com.pcloud.book.riddle.entity.Riddle
;
import
com.pcloud.common.core.dao.BaseDaoImpl
;
import
org.springframework.stereotype.Component
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* @描述:
* @作者:zhuyajie
* @创建时间:16:47 2019/7/24
* @版本:1.0
*/
@Component
(
"riddleDao"
)
public
class
RiddleDaoImpl
extends
BaseDaoImpl
<
Riddle
>
implements
RiddleDao
{
@Override
public
Riddle
getRiddleByGradeAndSeq
(
Integer
grade
,
Integer
seq
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"grade"
,
grade
);
map
.
put
(
"seq"
,
seq
);
return
getSessionTemplate
().
selectOne
(
getStatement
(
"getRiddleByGradeAndSeq"
),
map
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/riddle/dao/impl/RiddleRecordDaoImpl.java
0 → 100644
View file @
ac5674ea
package
com
.
pcloud
.
book
.
riddle
.
dao
.
impl
;
import
com.pcloud.book.riddle.dao.RiddleRecordDao
;
import
com.pcloud.book.riddle.dto.GroupRiddleDTO
;
import
com.pcloud.book.riddle.entity.RiddleRecord
;
import
com.pcloud.common.core.dao.BaseDaoImpl
;
import
org.springframework.stereotype.Component
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* @描述:猜谜记录
* @作者:zhuyajie
* @创建时间:18:19 2019/7/24
* @版本:1.0
*/
@Component
(
"riddleRecordDao"
)
public
class
RiddleRecordDaoImpl
extends
BaseDaoImpl
<
RiddleRecord
>
implements
RiddleRecordDao
{
@Override
public
RiddleRecord
getLastRecordByWxGroupId
(
String
wxGroupId
)
{
return
getSessionTemplate
().
selectOne
(
getStatement
(
"getLastRecordByWxGroupId"
),
wxGroupId
);
}
@Override
public
Integer
getCorrectCountByGroup
(
String
wxGroupId
,
Integer
finishCount
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"wxGroupId"
,
wxGroupId
);
map
.
put
(
"finishCount"
,
finishCount
);
return
getSessionTemplate
().
selectOne
(
getStatement
(
"getCorrectCountByGroup"
),
map
);
}
@Override
public
GroupRiddleDTO
getParticipateCount
(
String
wxGroupId
)
{
return
getSessionTemplate
().
selectOne
(
getStatement
(
"getParticipateCount"
),
wxGroupId
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/riddle/dao/impl/RiddleReplyDaoImpl.java
0 → 100644
View file @
ac5674ea
package
com
.
pcloud
.
book
.
riddle
.
dao
.
impl
;
import
com.pcloud.book.riddle.dao.RiddleReplyDao
;
import
com.pcloud.book.riddle.entity.RiddleReply
;
import
com.pcloud.common.core.dao.BaseDaoImpl
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
/**
* @描述:回复文案
* @作者:zhuyajie
* @创建时间:16:58 2019/7/24
* @版本:1.0
*/
@Component
(
"riddleReplyDao"
)
public
class
RiddleReplyDaoImpl
extends
BaseDaoImpl
<
RiddleReply
>
implements
RiddleReplyDao
{
@Override
public
List
<
String
>
getReplyByType
(
String
code
)
{
return
getSessionTemplate
().
selectList
(
getStatement
(
"getReplyByType"
),
code
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/riddle/dto/GroupRedisDTO.java
0 → 100644
View file @
ac5674ea
package
com
.
pcloud
.
book
.
riddle
.
dto
;
/**
* @描述:
* @作者:zhuyajie
* @创建时间:11:58 2019/8/8
* @版本:1.0
*/
public
class
GroupRedisDTO
{
private
String
wxGroupId
;
private
String
wxId
;
private
String
ip
;
public
String
getWxGroupId
()
{
return
wxGroupId
;
}
public
void
setWxGroupId
(
String
wxGroupId
)
{
this
.
wxGroupId
=
wxGroupId
;
}
public
String
getWxId
()
{
return
wxId
;
}
public
void
setWxId
(
String
wxId
)
{
this
.
wxId
=
wxId
;
}
public
String
getIp
()
{
return
ip
;
}
public
void
setIp
(
String
ip
)
{
this
.
ip
=
ip
;
}
@Override
public
String
toString
()
{
return
"GroupRedisDTO{"
+
"wxGroupId='"
+
wxGroupId
+
'\''
+
", wxId='"
+
wxId
+
'\''
+
", ip='"
+
ip
+
'\''
+
'}'
;
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
GroupRedisDTO
dto
=
(
GroupRedisDTO
)
o
;
return
wxGroupId
.
equals
(
dto
.
wxGroupId
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/riddle/dto/GroupRiddleDTO.java
0 → 100644
View file @
ac5674ea
package
com
.
pcloud
.
book
.
riddle
.
dto
;
import
com.pcloud.common.dto.BaseDto
;
/**
* @描述:编辑端猜谜语详情
* @作者:zhuyajie
* @创建时间:20:48 2019/7/31
* @版本:1.0
*/
public
class
GroupRiddleDTO
extends
BaseDto
{
/**
* 微信群名称
*/
private
String
groupName
;
/**
* 群二维码id
*/
private
Long
groupQrcodeId
;
/**
* 微信群id
*/
private
String
wxGroupId
;
/**
* 群分类
*/
private
String
classify
;
/**
*社群码名称
*/
private
String
groupQrcodeName
;
/**
* 图书名
*/
private
String
bookName
;
/**
* 专业标签ID
*/
private
Long
proLabelId
;
/**
* 专业标签名称
*/
private
String
proLabelName
;
/**
* 深度标签ID
*/
private
Long
depLabelId
;
/**
* 深度标签名称
*/
private
String
depLabelName
;
/**
* 目的标签ID
*/
private
Long
purLabelId
;
/**
* 目的标签名称
*/
private
String
purLabelName
;
/**
* 关卡等级
*/
private
Integer
grade
;
/**
* 猜中题数
*/
private
Integer
correctCount
;
/**
* 参与人数
*/
private
Integer
userNum
;
/**
* 参与次数
*/
private
Integer
participateCount
;
/**
* 开启状态
*/
private
Boolean
riddleOpen
;
/**
* 通关次数
*/
private
Integer
finishCount
;
public
String
getGroupName
()
{
return
groupName
;
}
public
void
setGroupName
(
String
groupName
)
{
this
.
groupName
=
groupName
;
}
public
Long
getGroupQrcodeId
()
{
return
groupQrcodeId
;
}
public
void
setGroupQrcodeId
(
Long
groupQrcodeId
)
{
this
.
groupQrcodeId
=
groupQrcodeId
;
}
public
String
getWxGroupId
()
{
return
wxGroupId
;
}
public
void
setWxGroupId
(
String
wxGroupId
)
{
this
.
wxGroupId
=
wxGroupId
;
}
public
String
getClassify
()
{
return
classify
;
}
public
void
setClassify
(
String
classify
)
{
this
.
classify
=
classify
;
}
public
String
getGroupQrcodeName
()
{
return
groupQrcodeName
;
}
public
void
setGroupQrcodeName
(
String
groupQrcodeName
)
{
this
.
groupQrcodeName
=
groupQrcodeName
;
}
public
String
getBookName
()
{
return
bookName
;
}
public
void
setBookName
(
String
bookName
)
{
this
.
bookName
=
bookName
;
}
public
Long
getProLabelId
()
{
return
proLabelId
;
}
public
void
setProLabelId
(
Long
proLabelId
)
{
this
.
proLabelId
=
proLabelId
;
}
public
String
getProLabelName
()
{
return
proLabelName
;
}
public
void
setProLabelName
(
String
proLabelName
)
{
this
.
proLabelName
=
proLabelName
;
}
public
Long
getDepLabelId
()
{
return
depLabelId
;
}
public
void
setDepLabelId
(
Long
depLabelId
)
{
this
.
depLabelId
=
depLabelId
;
}
public
String
getDepLabelName
()
{
return
depLabelName
;
}
public
void
setDepLabelName
(
String
depLabelName
)
{
this
.
depLabelName
=
depLabelName
;
}
public
Long
getPurLabelId
()
{
return
purLabelId
;
}
public
void
setPurLabelId
(
Long
purLabelId
)
{
this
.
purLabelId
=
purLabelId
;
}
public
String
getPurLabelName
()
{
return
purLabelName
;
}
public
void
setPurLabelName
(
String
purLabelName
)
{
this
.
purLabelName
=
purLabelName
;
}
public
Integer
getGrade
()
{
return
grade
;
}
public
void
setGrade
(
Integer
grade
)
{
this
.
grade
=
grade
;
}
public
Integer
getCorrectCount
()
{
return
correctCount
;
}
public
void
setCorrectCount
(
Integer
correctCount
)
{
this
.
correctCount
=
correctCount
;
}
public
Integer
getUserNum
()
{
return
userNum
;
}
public
void
setUserNum
(
Integer
userNum
)
{
this
.
userNum
=
userNum
;
}
public
Integer
getParticipateCount
()
{
return
participateCount
;
}
public
void
setParticipateCount
(
Integer
participateCount
)
{
this
.
participateCount
=
participateCount
;
}
public
Boolean
getRiddleOpen
()
{
return
riddleOpen
;
}
public
void
setRiddleOpen
(
Boolean
riddleOpen
)
{
this
.
riddleOpen
=
riddleOpen
;
}
public
Integer
getFinishCount
()
{
return
finishCount
;
}
public
void
setFinishCount
(
Integer
finishCount
)
{
this
.
finishCount
=
finishCount
;
}
@Override
public
String
toString
()
{
return
"GroupRiddleDTO{"
+
"groupName='"
+
groupName
+
'\''
+
", groupQrcodeId="
+
groupQrcodeId
+
", wxGroupId='"
+
wxGroupId
+
'\''
+
", classify='"
+
classify
+
'\''
+
", groupQrcodeName='"
+
groupQrcodeName
+
'\''
+
", bookName='"
+
bookName
+
'\''
+
", proLabelId="
+
proLabelId
+
", proLabelName='"
+
proLabelName
+
'\''
+
", depLabelId="
+
depLabelId
+
", depLabelName='"
+
depLabelName
+
'\''
+
", purLabelId="
+
purLabelId
+
", purLabelName='"
+
purLabelName
+
'\''
+
", grade="
+
grade
+
", correctCount="
+
correctCount
+
", userNum="
+
userNum
+
", participateCount="
+
participateCount
+
", riddleOpen="
+
riddleOpen
+
'}'
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/riddle/dto/RiddleOpenDTO.java
0 → 100644
View file @
ac5674ea
package
com
.
pcloud
.
book
.
riddle
.
dto
;
import
com.pcloud.common.dto.BaseDto
;
/**
* @描述:猜谜语开启状态
* @作者:zhuyajie
* @创建时间:21:51 2019/7/31
* @版本:1.0
*/
public
class
RiddleOpenDTO
extends
BaseDto
{
/**
* 群id
*/
private
Long
groupQrcodeId
;
/**
* 开启状态
*/
private
Boolean
status
;
public
Long
getGroupQrcodeId
()
{
return
groupQrcodeId
;
}
public
void
setGroupQrcodeId
(
Long
groupQrcodeId
)
{
this
.
groupQrcodeId
=
groupQrcodeId
;
}
public
Boolean
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Boolean
status
)
{
this
.
status
=
status
;
}
@Override
public
String
toString
()
{
return
"RiddleOpenDTO{"
+
"groupQrcodeId="
+
groupQrcodeId
+
", status="
+
status
+
'}'
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/riddle/entity/Riddle.java
0 → 100644
View file @
ac5674ea
package
com
.
pcloud
.
book
.
riddle
.
entity
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.pcloud.common.entity.BaseEntity
;
import
java.util.Date
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
@ApiModel
(
"谜语"
)
public
class
Riddle
extends
BaseEntity
{
@ApiModelProperty
(
"谜面"
)
private
String
riddleContent
;
@ApiModelProperty
(
"谜底"
)
private
String
answer
;
@ApiModelProperty
(
"备选谜底"
)
private
String
otherAnswer
;
@ApiModelProperty
(
"等级"
)
private
Integer
grade
;
@ApiModelProperty
(
"序号"
)
private
Integer
seq
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@ApiModelProperty
(
"创建时间"
)
private
Date
createTime
;
public
String
getRiddleContent
()
{
return
riddleContent
;
}
public
void
setRiddleContent
(
String
riddleContent
)
{
this
.
riddleContent
=
riddleContent
==
null
?
null
:
riddleContent
.
trim
();
}
public
String
getAnswer
()
{
return
answer
;
}
public
void
setAnswer
(
String
answer
)
{
this
.
answer
=
answer
==
null
?
null
:
answer
.
trim
();
}
public
String
getOtherAnswer
()
{
return
otherAnswer
;
}
public
void
setOtherAnswer
(
String
otherAnswer
)
{
this
.
otherAnswer
=
otherAnswer
;
}
public
Integer
getGrade
()
{
return
grade
;
}
public
void
setGrade
(
Integer
grade
)
{
this
.
grade
=
grade
;
}
public
Integer
getSeq
()
{
return
seq
;
}
public
void
setSeq
(
Integer
seq
)
{
this
.
seq
=
seq
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
@Override
public
String
toString
()
{
return
"Riddle{"
+
"riddleContent='"
+
riddleContent
+
'\''
+
", answer='"
+
answer
+
'\''
+
", otherAnswer='"
+
otherAnswer
+
'\''
+
", grade="
+
grade
+
", seq="
+
seq
+
", createTime="
+
createTime
+
'}'
;
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/riddle/entity/RiddleRecord.java
0 → 100644
View file @
ac5674ea
package
com
.
pcloud
.
book
.
riddle
.
entity
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.pcloud.common.entity.BaseEntity
;
import
java.util.Date
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
@ApiModel
(
"猜谜记录"
)
public
class
RiddleRecord
extends
BaseEntity
{
@ApiModelProperty
(
"谜语id"
)
private
Long
riddleId
;
@ApiModelProperty
(
"消息内容"
)
private
String
messageContent
;
@ApiModelProperty
(
"微信群"
)
private
String
wxGroupId
;
@ApiModelProperty
(
"微信用户"
)
private
String
wxUserId
;
@ApiModelProperty
(
"是否正确"
)
private
Boolean
correct
;
@ApiModelProperty
(
"进度状态"
)
private
Integer
status
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@ApiModelProperty
(
"创建时间"
)
private
Date
createTime
;
@ApiModelProperty
(
"通关次数"
)
private
Integer
finishCount
;
public
Long
getRiddleId
()
{
return
riddleId
;
}
public
void
setRiddleId
(
Long
riddleId
)
{
this
.
riddleId
=
riddleId
;
}
public
String
getMessageContent
()
{
return
messageContent
;
}
public
void
setMessageContent
(
String
messageContent
)
{
this
.
messageContent
=
messageContent
;
}
public
String
getWxGroupId
()
{
return
wxGroupId
;
}
public
void
setWxGroupId
(
String
wxGroupId
)
{
this
.
wxGroupId
=
wxGroupId
==
null
?
null
:
wxGroupId
.
trim
();
}
public
String
getWxUserId
()
{
return
wxUserId
;
}
public
void
setWxUserId
(
String
wxUserId
)
{
this
.
wxUserId
=
wxUserId
==
null
?
null
:
wxUserId
.
trim
();
}
public
Boolean
getCorrect
()
{
return
correct
;
}
public
void
setCorrect
(
Boolean
correct
)
{
this
.
correct
=
correct
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Integer
getFinishCount
()
{
return
finishCount
;
}
public
void
setFinishCount
(
Integer
finishCount
)
{
this
.
finishCount
=
finishCount
;
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/riddle/entity/RiddleReply.java
0 → 100644
View file @
ac5674ea
package
com
.
pcloud
.
book
.
riddle
.
entity
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.pcloud.common.entity.BaseEntity
;
import
java.util.Date
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
@ApiModel
(
"回复文案"
)
public
class
RiddleReply
extends
BaseEntity
{
@ApiModelProperty
(
"文案内容"
)
private
String
content
;
@ApiModelProperty
(
"文案类型"
)
private
String
type
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@ApiModelProperty
(
"创建时间"
)
private
Date
createTime
;
public
String
getContent
()
{
return
content
;
}
public
void
setContent
(
String
content
)
{
this
.
content
=
content
==
null
?
null
:
content
.
trim
();
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
==
null
?
null
:
type
.
trim
();
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
@Override
public
String
toString
()
{
return
"RiddleReply{"
+
"content='"
+
content
+
'\''
+
", type='"
+
type
+
'\''
+
", createTime="
+
createTime
+
'}'
;
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/riddle/facade/RiddleFacade.java
0 → 100644
View file @
ac5674ea
package
com
.
pcloud
.
book
.
riddle
.
facade
;
import
com.pcloud.book.base.exception.BookBizException
;
import
com.pcloud.book.riddle.biz.RiddleRecordBiz
;
import
com.pcloud.book.riddle.dto.GroupRiddleDTO
;
import
com.pcloud.book.riddle.dto.RiddleOpenDTO
;
import
com.pcloud.common.dto.ResponseDto
;
import
com.pcloud.common.page.PageBeanNew
;
import
com.pcloud.common.permission.PermissionException
;
import
com.pcloud.common.utils.SessionUtil
;
import
com.pcloud.wechatgroup.message.dto.SendTextDTO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestHeader
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
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
;
/**
* @描述:猜谜语外部接口
* @作者:zhuyajie
* @创建时间:17:53 2019/7/26
* @版本:1.0
*/
@Api
(
description
=
"猜谜语外部接口"
)
@RequestMapping
(
value
=
"/riddle"
)
@RestController
(
"riddleFacade"
)
public
class
RiddleFacade
{
@Autowired
private
RiddleRecordBiz
riddleRecordBiz
;
@ApiOperation
(
"发送信息"
)
@PostMapping
(
"sendText"
)
public
ResponseDto
<?>
sendText
(
@RequestBody
@ApiParam
SendTextDTO
sendTextDTO
){
riddleRecordBiz
.
riddleProcess
(
sendTextDTO
);
return
new
ResponseDto
<>();
}
@ApiOperation
(
"猜谜语详情列表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"name"
,
value
=
"name"
,
required
=
false
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"currentPage"
,
value
=
"当前页"
,
required
=
true
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"numPerPage"
,
value
=
"每页条数"
,
required
=
true
,
dataType
=
"int"
,
paramType
=
"query"
),
})
@GetMapping
(
"listPage"
)
public
ResponseDto
<
PageBeanNew
<
GroupRiddleDTO
>>
listPage
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
,
@RequestParam
(
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
"numPerPage"
)
Integer
numPerPage
)
throws
PermissionException
{
Long
partyId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
if
(
null
==
numPerPage
||
null
==
currentPage
)
{
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_ERROR
,
"分页参数缺失"
);
}
PageBeanNew
<
GroupRiddleDTO
>
pageBean
=
riddleRecordBiz
.
listPage
(
partyId
,
currentPage
,
numPerPage
,
name
);
return
new
ResponseDto
<>(
pageBean
);
}
@ApiOperation
(
"更新猜谜语状态"
)
@PostMapping
(
"updateRiddleOpenStatus"
)
public
ResponseDto
<?>
updateRiddleOpenStatus
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
@ApiParam
RiddleOpenDTO
riddleOpenDTO
)
throws
PermissionException
{
SessionUtil
.
getToken4Redis
(
token
);
if
(
null
==
riddleOpenDTO
)
{
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_ERROR
,
"参数缺失"
);
}
Long
qrcodeId
=
riddleOpenDTO
.
getGroupQrcodeId
();
Boolean
status
=
riddleOpenDTO
.
getStatus
();
if
(
null
==
qrcodeId
||
null
==
status
)
{
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_ERROR
,
"参数缺失"
);
}
riddleRecordBiz
.
updateRiddleOpenStatus
(
qrcodeId
,
status
);
return
new
ResponseDto
<>();
}
}
pcloud-service-book/src/main/java/com/pcloud/book/riddle/redis/RiddleRedis.java
0 → 100644
View file @
ac5674ea
package
com
.
pcloud
.
book
.
riddle
.
redis
;
import
com.pcloud.book.riddle.constants.RiddleConstant
;
import
com.pcloud.book.riddle.dto.GroupRedisDTO
;
import
com.pcloud.common.utils.ListUtils
;
import
com.pcloud.common.utils.cache.redis.JedisClusterUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Component
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* @描述:猜谜语缓存
* @作者:zhuyajie
* @创建时间:10:55 2019/7/30
* @版本:1.0
*/
@Component
(
"riddleRedis"
)
public
class
RiddleRedis
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
RiddleRedis
.
class
);
public
static
final
String
prefix
=
"BOOK_RIDDLE"
;
public
static
final
String
wait_time
=
prefix
+
"_wait_time"
;
//到时间回复信息
public
static
final
String
underway_group
=
prefix
+
"_underway_group"
;
//答题中的群
/**
* 添加等待时间
* @param wxGroupId
* @param value
*/
public
void
addWaitTime
(
String
wxGroupId
,
String
value
)
{
String
key
=
wait_time
+
wxGroupId
;
JedisClusterUtils
.
set
(
key
,
value
);
JedisClusterUtils
.
expire
(
key
,
RiddleConstant
.
expire_seconds
);
}
/**
* 获取等待时间
* @param wxGroupId
* @return
*/
public
String
getWaitTime
(
String
wxGroupId
)
{
String
key
=
wait_time
+
wxGroupId
;
return
JedisClusterUtils
.
get
(
key
);
}
/**
* 添加答题中的群
* @param wxGroupId
*/
public
void
addUnderwayGroup
(
String
wxGroupId
,
String
wxId
,
String
ip
)
{
GroupRedisDTO
dto
=
new
GroupRedisDTO
();
dto
.
setWxGroupId
(
wxGroupId
);
dto
.
setWxId
(
wxId
);
dto
.
setIp
(
ip
);
List
<
GroupRedisDTO
>
list
=
getUnderwayGroup
();
if
(
ListUtils
.
isEmpty
(
list
))
{
list
=
new
ArrayList
<>();
list
.
add
(
dto
);
}
else
{
if
(!
list
.
contains
(
dto
))
{
list
.
add
(
dto
);
}
}
JedisClusterUtils
.
setJsonList
(
underway_group
,
list
);
}
/**
* 获取答题中的群
* @return
*/
public
List
<
GroupRedisDTO
>
getUnderwayGroup
()
{
List
<
GroupRedisDTO
>
list
=
JedisClusterUtils
.
getJsonList
(
underway_group
,
GroupRedisDTO
.
class
);
if
(
ListUtils
.
isEmpty
(
list
))
{
list
=
new
ArrayList
<>();
GroupRedisDTO
dto
=
new
GroupRedisDTO
();
dto
.
setWxGroupId
(
"1"
);
dto
.
setWxId
(
"1"
);
dto
.
setIp
(
"1"
);
list
.
add
(
dto
);
JedisClusterUtils
.
setJsonList
(
underway_group
,
list
);
}
return
list
;
}
/**
* 删除答题中的群
* @param wxGroupId
*/
public
void
deleteUnderwayGroup
(
String
wxGroupId
)
{
List
<
GroupRedisDTO
>
list
=
getUnderwayGroup
();
if
(!
ListUtils
.
isEmpty
(
list
))
{
for
(
int
i
=
0
;
i
<
list
.
size
()
&&
null
!=
list
;
i
++)
{
GroupRedisDTO
dto
=
list
.
get
(
i
);
if
(
null
!=
dto
&&
dto
.
getWxGroupId
().
equals
(
wxGroupId
))
{
list
.
remove
(
dto
);
}
}
}
if
(
ListUtils
.
isEmpty
(
list
))
{
list
=
new
ArrayList
<>();
GroupRedisDTO
dto
=
new
GroupRedisDTO
();
dto
.
setWxGroupId
(
"1"
);
dto
.
setWxId
(
"1"
);
dto
.
setIp
(
"1"
);
list
.
add
(
dto
);
}
JedisClusterUtils
.
setJsonList
(
underway_group
,
list
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/riddle/service/impl/RiddleServiceImpl.java
0 → 100644
View file @
ac5674ea
package
com
.
pcloud
.
book
.
riddle
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.TypeReference
;
import
com.pcloud.book.riddle.RiddleService
;
import
com.pcloud.book.riddle.biz.RiddleRecordBiz
;
import
com.pcloud.common.core.aspect.ParamLog
;
import
com.pcloud.common.utils.string.StringUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.Map
;
/**
* @描述:猜谜语
* @作者:zhuyajie
* @创建时间:16:26 2019/8/5
* @版本:1.0
*/
@RestController
(
"riddleService"
)
@RequestMapping
(
"riddleService"
)
public
class
RiddleServiceImpl
implements
RiddleService
{
@Autowired
private
RiddleRecordBiz
riddleRecordBiz
;
@RequestMapping
(
value
=
"/riddleEndQuartz"
,
method
=
RequestMethod
.
POST
)
@Override
@ParamLog
(
"定时器调用游戏结束接口"
)
public
void
riddleEndQuartz
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
String
wxGroupId
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
map
.
get
(
"wxGroupId"
)),
new
TypeReference
<
String
>()
{});
String
wxId
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
map
.
get
(
"wxId"
)),
new
TypeReference
<
String
>()
{});
String
ip
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
map
.
get
(
"ip"
)),
new
TypeReference
<
String
>()
{});
String
wxUserId
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
map
.
get
(
"wxUserId"
)),
new
TypeReference
<
String
>()
{});
if
(
StringUtil
.
isEmpty
(
wxGroupId
))
{
return
;
}
riddleRecordBiz
.
autoEnd
(
wxGroupId
,
wxId
,
ip
,
wxUserId
);
}
}
pcloud-service-book/src/main/resources/mapper/advertising/AdvertisingDetailFileMapper.xml
0 → 100644
View file @
ac5674ea
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.pcloud.book.advertising.dao.impl.AdvertisingDetailFileDaoImpl"
>
<resultMap
id=
"BaseResultMap"
type=
"com.pcloud.book.advertising.entity.AdvertisingDetailFile"
>
<id
column=
"id"
property=
"id"
jdbcType=
"BIGINT"
/>
<result
column=
"ad_id"
property=
"adId"
jdbcType=
"BIGINT"
/>
<result
column=
"file_id"
property=
"fileId"
jdbcType=
"VARCHAR"
/>
<result
column=
"file_convert_state"
property=
"fileConvertState"
jdbcType=
"INTEGER"
/>
<result
column=
"file_size"
property=
"fileSize"
jdbcType=
"BIGINT"
/>
<result
column=
"file_name"
property=
"fileName"
jdbcType=
"VARCHAR"
/>
<result
column=
"file_duration"
property=
"fileDuration"
jdbcType=
"BIGINT"
/>
<result
column=
"file_url"
property=
"fileUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"file_pilot_second"
property=
"filePilotSecond"
jdbcType=
"BIGINT"
/>
<result
column=
"file_pilot_url"
property=
"filePilotUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"file_pilot_finish_tip"
property=
"filePilotFinishTip"
jdbcType=
"VARCHAR"
/>
<result
column=
"title"
property=
"title"
jdbcType=
"VARCHAR"
/>
<result
column=
"cover_pic"
property=
"coverPic"
jdbcType=
"VARCHAR"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, ad_id, file_id, file_convert_state, file_size, file_name, file_duration, file_url,
file_pilot_second, file_pilot_url, file_pilot_finish_tip, title, cover_pic, create_time, update_time
</sql>
<select
id=
"getByAdId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Long"
>
select
<include
refid=
"Base_Column_List"
/>
from advertising_detail_file
where ad_id = #{adId,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByAdId"
parameterType=
"Long"
>
delete from advertising_detail_file
where ad_id = #{adId,jdbcType=BIGINT}
</delete>
<insert
id=
"batchInsert"
useGeneratedKeys=
"true"
parameterType=
"java.util.List"
keyProperty=
"id"
>
insert into advertising_detail_file (
ad_id, file_id,
file_convert_state, file_size, file_name,
file_duration, file_url, file_pilot_second,
file_pilot_url, file_pilot_finish_tip, title,
cover_pic, create_time)
values
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(
#{item.adId,jdbcType=BIGINT}, #{item.fileId,jdbcType=VARCHAR},
#{item.fileConvertState,jdbcType=INTEGER}, #{item.fileSize,jdbcType=BIGINT}, #{item.fileName,jdbcType=VARCHAR},
#{item.fileDuration,jdbcType=BIGINT}, #{item.fileUrl,jdbcType=VARCHAR}, #{item.filePilotSecond,jdbcType=BIGINT},
#{item.filePilotUrl,jdbcType=VARCHAR}, #{item.filePilotFinishTip,jdbcType=VARCHAR}, #{item.title,jdbcType=VARCHAR},
#{item.coverPic,jdbcType=VARCHAR}, NOW()
)
</foreach>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.pcloud.book.advertising.entity.AdvertisingDetailFile"
>
update advertising_detail_file
<set
>
<if
test=
"fileId != null"
>
file_id = #{fileId,jdbcType=VARCHAR},
</if>
<if
test=
"fileConvertState != null"
>
file_convert_state = #{fileConvertState,jdbcType=INTEGER},
</if>
<if
test=
"fileSize != null"
>
file_size = #{fileSize,jdbcType=BIGINT},
</if>
<if
test=
"fileName != null"
>
file_name = #{fileName,jdbcType=VARCHAR},
</if>
<if
test=
"fileDuration != null"
>
file_duration = #{fileDuration,jdbcType=BIGINT},
</if>
<if
test=
"fileUrl != null"
>
file_url = #{fileUrl,jdbcType=VARCHAR},
</if>
<if
test=
"filePilotSecond != null"
>
file_pilot_second = #{filePilotSecond,jdbcType=BIGINT},
</if>
<if
test=
"filePilotUrl != null"
>
file_pilot_url = #{filePilotUrl,jdbcType=VARCHAR},
</if>
<if
test=
"filePilotFinishTip != null"
>
file_pilot_finish_tip = #{filePilotFinishTip,jdbcType=VARCHAR},
</if>
<if
test=
"title != null"
>
title = #{title,jdbcType=VARCHAR},
</if>
<if
test=
"coverPic != null"
>
cover_pic = #{coverPic,jdbcType=VARCHAR},
</if>
update_time = NOW(),
</set>
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
pcloud-service-book/src/main/resources/mapper/book/Book.Mapper.xml
View file @
ac5674ea
...
@@ -604,6 +604,50 @@
...
@@ -604,6 +604,50 @@
G.UPDATE_TIME DESC
G.UPDATE_TIME DESC
</select>
</select>
<select
id=
"listBookGroup4Channel"
resultType=
"com.pcloud.book.group.vo.ListBook4ChannelVO"
parameterType=
"map"
>
SELECT b.BOOK_ID bookId,b.COVER_IMG coverImg, bg.id bookGroupId ,b.ISBN isbn,b.BOOK_NAME bookName,CONCAT('BK',b.BOOK_ID) bookNumber FROM `book_group` bg
LEFT JOIN book b ON bg.book_id = b.BOOK_ID
LEFT JOIN book_fund bf ON bg.book_id = bf.BOOK_ID AND bf.END_TIME
<![CDATA[ > ]]>
NOW() AND bf.START_TIME
<![CDATA[ < ]]>
NOW()
LEFT JOIN book_group_classify bgc ON bg.id = bgc.book_group_id
WHERE bg.channel_id = #{channelId}
<if
test=
"keywords != null"
>
AND (b.ISBN like CONCAT('%',#{keywords},'%') OR b.BOOK_NAME like CONCAT('%',#{keywords},'%') OR bg.group_qrcode_name like CONCAT('%',#{keywords},'%'))
</if>
<if
test=
"isFundBook != null and isFundBook == 1"
>
AND bf.BOOK_FUND_ID IS NOT NULL
</if>
<if
test=
"startTime != null "
>
AND bg.create_time
>
= #{startTime}
</if>
<if
test=
"endTime != null "
>
AND bg.create_time
<
= #{endTime}
</if>
AND bgc.id is not null
AND b.BOOK_ID is not null
AND b.IS_DELETE = 0
AND bg.IS_DELETE = 0
AND bgc.is_delete = 0
GROUP BY b.BOOK_ID
ORDER BY bg.create_time DESC
</select>
<select
id=
"getBookGroupInfo4Channel"
resultType=
"com.pcloud.book.group.vo.ListBook4ChannelVO"
parameterType=
"map"
>
SELECT b.BOOK_ID bookId,b.COVER_IMG coverImg, bg.id bookGroupId ,b.ISBN isbn,b.BOOK_NAME bookName,CONCAT('BK',b.BOOK_ID) bookNumber FROM `book_group` bg
LEFT JOIN book b ON bg.book_id = b.BOOK_ID
LEFT JOIN book_fund bf ON bg.book_id = bf.BOOK_ID
LEFT JOIN book_group_classify bgc ON bg.id = bgc.book_group_id
WHERE bg.id in
<foreach
collection=
"bookGroupIds"
index=
"i"
item=
"item"
open=
"("
separator=
","
close=
")"
>
${item}
</foreach>
AND bgc.id is not null
AND b.BOOK_ID is not null
AND b.IS_DELETE = 0
AND bg.IS_DELETE = 0
AND bgc.is_delete = 0
GROUP BY b.BOOK_ID
</select>
<!-- 获取社群书列表(编辑) -->
<!-- 获取社群书列表(编辑) -->
<select
id=
"listSimpleBookGroup4Adviser"
resultMap=
"bookMap"
parameterType=
"map"
>
<select
id=
"listSimpleBookGroup4Adviser"
resultMap=
"bookMap"
parameterType=
"map"
>
SELECT
SELECT
...
...
pcloud-service-book/src/main/resources/mapper/group/BookGroupClassify.Mapper.xml
View file @
ac5674ea
...
@@ -844,4 +844,19 @@
...
@@ -844,4 +844,19 @@
group by c.id
group by c.id
order by c.id desc
order by c.id desc
</select>
</select>
<!--拖动排序-->
<update
id=
"dragSortClassify"
parameterType=
"map"
>
update book_group_classify
set rank = case
<foreach
collection=
"classifyIds"
index=
"index"
item=
"classifyId"
>
when id = #{classifyId} then #{index} + 1
</foreach>
end,
update_time = now()
where id in
<foreach
collection=
"classifyIds"
item=
"classifyId"
separator=
","
open=
"("
close=
")"
>
#{classifyId}
</foreach>
</update>
</mapper>
</mapper>
\ No newline at end of file
pcloud-service-book/src/main/resources/mapper/group/GroupQrcode.Mapper.xml
View file @
ac5674ea
...
@@ -18,11 +18,12 @@
...
@@ -18,11 +18,12 @@
<result
column=
"update_user"
property=
"updateUser"
jdbcType=
"BIGINT"
/>
<result
column=
"update_user"
property=
"updateUser"
jdbcType=
"BIGINT"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"is_delete"
property=
"isDelete"
jdbcType=
"BIT"
/>
<result
column=
"is_delete"
property=
"isDelete"
jdbcType=
"BIT"
/>
<result
column=
"riddle_open"
property=
"riddleOpen"
jdbcType=
"BIT"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id,classify_id,group_name,group_seq,user_number,weixin_qrcode_id,weixin_group_id,qrcode_url,use_state,qrcode_state,
id,classify_id,group_name,group_seq,user_number,weixin_qrcode_id,weixin_group_id,qrcode_url,use_state,qrcode_state,
create_user,create_time,update_time,is_delete
create_user,create_time,update_time,is_delete
,riddle_open
</sql>
</sql>
<update
id=
"updateGroupQrcode"
parameterType=
"map"
>
<update
id=
"updateGroupQrcode"
parameterType=
"map"
>
...
@@ -498,4 +499,46 @@
...
@@ -498,4 +499,46 @@
#{item}
#{item}
</foreach>
</foreach>
</select>
</select>
<select
id=
"listPageRiddle"
parameterType=
"map"
resultType=
"com.pcloud.book.riddle.dto.GroupRiddleDTO"
>
SELECT
q.group_name AS groupName,
q.id AS groupQrcodeId,
q.weixin_group_id AS wxGroupId,
c.classify AS classify,
g.group_qrcode_name AS groupQrcodeName,
b.BOOK_NAME AS bookName,
g.pro_label_id AS proLabelId,
g.dep_label_id AS depLabelId,
g.pur_label_id AS purLabelId,
q.riddle_open AS riddleOpen
FROM
book_group_qrcode q
LEFT JOIN book_group_classify c ON q.classify_id = c.id
LEFT JOIN book_group g ON c.book_group_id = g.id
LEFT JOIN book b ON g.book_id = b.BOOK_ID
WHERE
q.create_user = #{partyId}
AND b.IS_DELETE = 0
AND g.is_delete = 0
AND c.is_delete = 0
AND q.is_delete = 0
<if
test=
"name != null"
>
AND (
q.group_name LIKE CONCAT('%', #{name}, '%')
OR c.classify LIKE CONCAT('%', #{name}, '%')
OR g.group_qrcode_name LIKE CONCAT('%', #{name}, '%')
OR b.BOOK_NAME LIKE CONCAT('%', #{name}, '%')
)
</if>
ORDER BY q.id DESC
</select>
<update
id=
"updateRiddleOpenStatus"
parameterType=
"map"
>
UPDATE book_group_qrcode
SET riddle_open = #{status}
WHERE
id = #{qrcodeId}
</update>
</mapper>
</mapper>
\ No newline at end of file
pcloud-service-book/src/main/resources/mapper/riddle/RiddleMapper.xml
0 → 100644
View file @
ac5674ea
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.pcloud.book.riddle.dao.impl.RiddleDaoImpl"
>
<resultMap
id=
"BaseResultMap"
type=
"com.pcloud.book.riddle.entity.Riddle"
>
<id
column=
"id"
property=
"id"
jdbcType=
"BIGINT"
/>
<result
column=
"riddle_content"
property=
"riddleContent"
jdbcType=
"VARCHAR"
/>
<result
column=
"answer"
property=
"answer"
jdbcType=
"VARCHAR"
/>
<result
column=
"other_answer"
property=
"otherAnswer"
jdbcType=
"VARCHAR"
/>
<result
column=
"grade"
property=
"grade"
jdbcType=
"TINYINT"
/>
<result
column=
"seq"
property=
"seq"
jdbcType=
"TINYINT"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, riddle_content, answer, other_answer, grade, seq, create_time
</sql>
<select
id=
"getRiddleByGradeAndSeq"
resultMap=
"BaseResultMap"
parameterType=
"map"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM
riddle
WHERE
grade = #{grade}
AND seq > #{seq}
LIMIT 1
</select>
<select
id=
"getById"
parameterType=
"Long"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM riddle
WHERE id = #{id}
</select>
</mapper>
\ No newline at end of file
pcloud-service-book/src/main/resources/mapper/riddle/RiddleRecordMapper.xml
0 → 100644
View file @
ac5674ea
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.pcloud.book.riddle.dao.impl.RiddleRecordDaoImpl"
>
<resultMap
id=
"BaseResultMap"
type=
"com.pcloud.book.riddle.entity.RiddleRecord"
>
<id
column=
"id"
property=
"id"
jdbcType=
"BIGINT"
/>
<result
column=
"riddle_id"
property=
"riddleId"
jdbcType=
"BIGINT"
/>
<result
column=
"message_content"
property=
"messageContent"
jdbcType=
"VARCHAR"
/>
<result
column=
"wx_group_id"
property=
"wxGroupId"
jdbcType=
"VARCHAR"
/>
<result
column=
"wx_user_id"
property=
"wxUserId"
jdbcType=
"VARCHAR"
/>
<result
column=
"correct"
property=
"correct"
jdbcType=
"BIT"
/>
<result
column=
"status"
property=
"status"
jdbcType=
"TINYINT"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"finish_count"
property=
"finishCount"
jdbcType=
"INTEGER"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, riddle_id, message_content, wx_group_id, wx_user_id, correct, status, create_time, finish_count
</sql>
<insert
id=
"insert"
parameterType=
"com.pcloud.book.riddle.entity.RiddleRecord"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into riddle_record (id, riddle_id, message_content,
wx_group_id, wx_user_id, correct, status,
create_time, finish_count)
values (#{id,jdbcType=BIGINT}, #{riddleId,jdbcType=BIGINT}, #{messageContent,jdbcType=VARCHAR},
#{wxGroupId,jdbcType=VARCHAR}, #{wxUserId,jdbcType=VARCHAR}, #{correct,jdbcType=BIT}, #{status},
NOW(), #{finishCount})
</insert>
<select
id=
"getLastRecordByWxGroupId"
resultMap=
"BaseResultMap"
parameterType=
"String"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM riddle_record
WHERE wx_group_id = #{wxGroupId}
ORDER BY
create_time DESC, id DESC
LIMIT 1
</select>
<select
id=
"getCorrectCountByGroup"
parameterType=
"map"
resultType=
"Integer"
>
SELECT
COUNT(DISTINCT riddle_id)
FROM
riddle_record
WHERE
wx_group_id = #{wxGroupId}
AND finish_count = #{finishCount}
AND correct = 1
</select>
<select
id=
"getParticipateCount"
parameterType=
"String"
resultType=
"com.pcloud.book.riddle.dto.GroupRiddleDTO"
>
SELECT
COUNT(DISTINCT wx_user_id) userNum,
COUNT(1) participateCount
FROM
riddle_record
WHERE
wx_group_id = #{wxGroupId}
AND correct IS NOT NULL
</select>
</mapper>
\ No newline at end of file
pcloud-service-book/src/main/resources/mapper/riddle/RiddleReplyMapper.xml
0 → 100644
View file @
ac5674ea
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.pcloud.book.riddle.dao.impl.RiddleReplyDaoImpl"
>
<resultMap
id=
"BaseResultMap"
type=
"com.pcloud.book.riddle.entity.RiddleReply"
>
<id
column=
"id"
property=
"id"
jdbcType=
"BIGINT"
/>
<result
column=
"content"
property=
"content"
jdbcType=
"VARCHAR"
/>
<result
column=
"type"
property=
"type"
jdbcType=
"VARCHAR"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, content, type, create_time
</sql>
<select
id=
"getReplyByType"
parameterType=
"String"
resultType=
"String"
>
SELECT
content
FROM
riddle_reply
WHERE
type = #{type}
</select>
</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