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
3c56c2ba
Commit
3c56c2ba
authored
Apr 13, 2020
by
裴大威
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat-1002712' into 'master'
1002712 See merge request rays/pcloud-book!620
parents
60879852
f9389f97
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
861 additions
and
11 deletions
+861
-11
BookAdviserDto.java
...rc/main/java/com/pcloud/book/book/dto/BookAdviserDto.java
+69
-0
BookRightsSettingDTO.java
...n/java/com/pcloud/book/book/dto/BookRightsSettingDTO.java
+24
-0
BookAdviserService.java
...java/com/pcloud/book/book/service/BookAdviserService.java
+6
-0
BookGroupService.java
.../java/com/pcloud/book/group/service/BookGroupService.java
+4
-0
AdvertisingSpaceServiceImpl.java
...advertising/service/impl/AdvertisingSpaceServiceImpl.java
+5
-0
BookAdviserBiz.java
...rc/main/java/com/pcloud/book/book/biz/BookAdviserBiz.java
+9
-0
BookAdviserBizImpl.java
...ava/com/pcloud/book/book/biz/impl/BookAdviserBizImpl.java
+22
-0
BookAdviserServiceImpl.java
...pcloud/book/book/service/impl/BookAdviserServiceImpl.java
+9
-0
AssistTempletConsr.java
...java/com/pcloud/book/consumer/app/AssistTempletConsr.java
+26
-0
BookGroupBizImpl.java
...java/com/pcloud/book/group/biz/impl/BookGroupBizImpl.java
+16
-1
BookAppletSceneDTO.java
...in/java/com/pcloud/book/group/dto/BookAppletSceneDTO.java
+13
-0
PushBookGroupUpdateRunner.java
.../pcloud/book/group/handler/PushBookGroupUpdateRunner.java
+3
-0
BookGroupServiceImpl.java
.../pcloud/book/group/service/impl/BookGroupServiceImpl.java
+16
-0
RightsSettingBiz.java
...a/com/pcloud/book/rightsSetting/biz/RightsSettingBiz.java
+22
-0
RightsSettingBizImpl.java
...oud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
+214
-0
RightsSettingConstant.java
...d/book/rightsSetting/constants/RightsSettingConstant.java
+17
-0
RightsSettingDAO.java
...a/com/pcloud/book/rightsSetting/dao/RightsSettingDAO.java
+17
-0
RightsSettingMapper.java
...om/pcloud/book/rightsSetting/dao/RightsSettingMapper.java
+18
-0
RightsSettingCheck.java
...loud/book/rightsSetting/dao/check/RightsSettingCheck.java
+31
-0
RightsSettingDAOImpl.java
...oud/book/rightsSetting/dao/impl/RightsSettingDAOImpl.java
+43
-0
RightsSettingDto.java
...a/com/pcloud/book/rightsSetting/dto/RightsSettingDto.java
+15
-0
RightsSetting.java
...a/com/pcloud/book/rightsSetting/entity/RightsSetting.java
+25
-0
RightsSettingFacede.java
...pcloud/book/rightsSetting/facade/RightsSettingFacede.java
+76
-0
generatorConfig.xml
pcloud-service-book/src/main/resources/generatorConfig.xml
+8
-8
BookAdviser.Mapper.xml
...ook/src/main/resources/mapper/book/BookAdviser.Mapper.xml
+7
-1
BookGroupMapper.xml
...-book/src/main/resources/mapper/group/BookGroupMapper.xml
+3
-1
RightsSettingMapper.xml
...in/resources/mapper/rightssetting/RightsSettingMapper.xml
+143
-0
No files found.
pcloud-facade-book/src/main/java/com/pcloud/book/book/dto/BookAdviserDto.java
View file @
3c56c2ba
...
@@ -87,6 +87,29 @@ public class BookAdviserDto extends BaseDto {
...
@@ -87,6 +87,29 @@ public class BookAdviserDto extends BaseDto {
* 是否已经被删除 1是 0否
* 是否已经被删除 1是 0否
*/
*/
private
Integer
isDelete
;
private
Integer
isDelete
;
/**
* 第二级类型
*/
private
Long
secondTempletId
;
/**
* 年级标签id
*/
private
Long
graLabelId
;
/**
* 科目标签id
*/
private
Long
subLabelId
;
/**
* 版本标签id
*/
private
Long
verLabelId
;
/**
* 地域标签id
*/
private
Long
areaLabelId
;
public
Integer
getCount
()
{
public
Integer
getCount
()
{
return
count
;
return
count
;
...
@@ -216,6 +239,46 @@ public class BookAdviserDto extends BaseDto {
...
@@ -216,6 +239,46 @@ public class BookAdviserDto extends BaseDto {
this
.
templetId
=
templetId
;
this
.
templetId
=
templetId
;
}
}
public
Long
getSecondTempletId
()
{
return
secondTempletId
;
}
public
void
setSecondTempletId
(
Long
secondTempletId
)
{
this
.
secondTempletId
=
secondTempletId
;
}
public
Long
getGraLabelId
()
{
return
graLabelId
;
}
public
void
setGraLabelId
(
Long
graLabelId
)
{
this
.
graLabelId
=
graLabelId
;
}
public
Long
getSubLabelId
()
{
return
subLabelId
;
}
public
void
setSubLabelId
(
Long
subLabelId
)
{
this
.
subLabelId
=
subLabelId
;
}
public
Long
getVerLabelId
()
{
return
verLabelId
;
}
public
void
setVerLabelId
(
Long
verLabelId
)
{
this
.
verLabelId
=
verLabelId
;
}
public
Long
getAreaLabelId
()
{
return
areaLabelId
;
}
public
void
setAreaLabelId
(
Long
areaLabelId
)
{
this
.
areaLabelId
=
areaLabelId
;
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"BookAdviserDto{"
+
return
"BookAdviserDto{"
+
...
@@ -226,6 +289,7 @@ public class BookAdviserDto extends BaseDto {
...
@@ -226,6 +289,7 @@ public class BookAdviserDto extends BaseDto {
", adviserId="
+
adviserId
+
", adviserId="
+
adviserId
+
", adviserName='"
+
adviserName
+
'\''
+
", adviserName='"
+
adviserName
+
'\''
+
", channelId="
+
channelId
+
", channelId="
+
channelId
+
", templetId="
+
templetId
+
", channelName='"
+
channelName
+
'\''
+
", channelName='"
+
channelName
+
'\''
+
", count="
+
count
+
", count="
+
count
+
", isMainEditor="
+
isMainEditor
+
", isMainEditor="
+
isMainEditor
+
...
@@ -233,6 +297,11 @@ public class BookAdviserDto extends BaseDto {
...
@@ -233,6 +297,11 @@ public class BookAdviserDto extends BaseDto {
", agentName='"
+
agentName
+
'\''
+
", agentName='"
+
agentName
+
'\''
+
", bookDto="
+
bookDto
+
", bookDto="
+
bookDto
+
", isDelete="
+
isDelete
+
", isDelete="
+
isDelete
+
", secondTempletId="
+
secondTempletId
+
", graLabelId="
+
graLabelId
+
", subLabelId="
+
subLabelId
+
", verLabelId="
+
verLabelId
+
", areaLabelId="
+
areaLabelId
+
'}'
;
'}'
;
}
}
}
}
pcloud-facade-book/src/main/java/com/pcloud/book/book/dto/BookRightsSettingDTO.java
0 → 100644
View file @
3c56c2ba
package
com
.
pcloud
.
book
.
book
.
dto
;
import
com.pcloud.common.dto.BaseDto
;
import
lombok.Data
;
/**
* 书刊小睿品牌介绍页权益
*/
@Data
public
class
BookRightsSettingDTO
extends
BaseDto
{
/**
* 权益介绍
*/
private
String
rightsSettingIntroduce
;
/**
*权益详情
*/
private
String
rightsSettingDetail
;
/**
*权益数量
*/
private
Integer
rightsSettingCount
;
}
pcloud-facade-book/src/main/java/com/pcloud/book/book/service/BookAdviserService.java
View file @
3c56c2ba
...
@@ -126,4 +126,10 @@ public interface BookAdviserService {
...
@@ -126,4 +126,10 @@ public interface BookAdviserService {
ResponseEntity
<
ResponseDto
<
String
>>
refactorData
(
@RequestParam
(
"parentId"
)
Long
parentId
,
ResponseEntity
<
ResponseDto
<
String
>>
refactorData
(
@RequestParam
(
"parentId"
)
Long
parentId
,
@RequestParam
(
"originTempletId"
)
Long
originTempletId
,
@RequestParam
(
"originTempletId"
)
Long
originTempletId
,
@RequestParam
(
value
=
"secondTempletId"
,
required
=
false
)
Long
secondTempletId
)
throws
BizException
;
@RequestParam
(
value
=
"secondTempletId"
,
required
=
false
)
Long
secondTempletId
)
throws
BizException
;
@ApiOperation
(
"获取书刊小睿品牌介绍页权益"
)
@GetMapping
(
"getBookRightsSetting"
)
ResponseEntity
<
ResponseDto
<
BookRightsSettingDTO
>>
getBookRightsSetting
(
@RequestParam
(
"bookId"
)
Long
bookId
,
@RequestParam
(
"channelId"
)
Long
channelId
,
@RequestParam
(
"adviserId"
)
Long
adviserId
);
}
}
pcloud-facade-book/src/main/java/com/pcloud/book/group/service/BookGroupService.java
View file @
3c56c2ba
...
@@ -211,4 +211,8 @@ public interface BookGroupService {
...
@@ -211,4 +211,8 @@ public interface BookGroupService {
@ApiOperation
(
"根据用户和社群书id获取个人号信息"
)
@ApiOperation
(
"根据用户和社群书id获取个人号信息"
)
@GetMapping
(
"getSelfRobotBookGroupInfoByUser"
)
@GetMapping
(
"getSelfRobotBookGroupInfoByUser"
)
ResponseEntity
<
ResponseDto
<
SelfRobotBookGroupDTO
>>
getSelfRobotBookGroupInfoByUser
(
@RequestParam
(
"wxUserId"
)
String
wxUserId
,
@RequestParam
(
"bookGroupId"
)
Long
bookGroupId
);
ResponseEntity
<
ResponseDto
<
SelfRobotBookGroupDTO
>>
getSelfRobotBookGroupInfoByUser
(
@RequestParam
(
"wxUserId"
)
String
wxUserId
,
@RequestParam
(
"bookGroupId"
)
Long
bookGroupId
);
@ApiOperation
(
"每天增加小程序权益读者数量"
)
@GetMapping
(
"addUserCount4RightsSetting"
)
void
addUserCount4RightsSetting
();
}
}
pcloud-service-book/src/main/java/com/pcloud/book/advertising/service/impl/AdvertisingSpaceServiceImpl.java
View file @
3c56c2ba
...
@@ -4,6 +4,7 @@ import com.pcloud.book.advertising.biz.AdvertisingSpaceBiz;
...
@@ -4,6 +4,7 @@ import com.pcloud.book.advertising.biz.AdvertisingSpaceBiz;
import
com.pcloud.book.advertising.biz.GroupTagBiz
;
import
com.pcloud.book.advertising.biz.GroupTagBiz
;
import
com.pcloud.book.advertising.biz.LinkRevertBiz
;
import
com.pcloud.book.advertising.biz.LinkRevertBiz
;
import
com.pcloud.book.advertising.service.AdvertisingSpaceService
;
import
com.pcloud.book.advertising.service.AdvertisingSpaceService
;
import
com.pcloud.book.group.service.BookGroupService
;
import
com.pcloud.common.core.aspect.ParamLog
;
import
com.pcloud.common.core.aspect.ParamLog
;
import
com.pcloud.common.dto.ResponseDto
;
import
com.pcloud.common.dto.ResponseDto
;
import
com.pcloud.common.exceptions.BizException
;
import
com.pcloud.common.exceptions.BizException
;
...
@@ -42,6 +43,8 @@ public class AdvertisingSpaceServiceImpl implements AdvertisingSpaceService {
...
@@ -42,6 +43,8 @@ public class AdvertisingSpaceServiceImpl implements AdvertisingSpaceService {
private
GroupTagBiz
groupTagBiz
;
private
GroupTagBiz
groupTagBiz
;
@Autowired
@Autowired
private
LinkRevertBiz
linkRevertBiz
;
private
LinkRevertBiz
linkRevertBiz
;
@Autowired
private
BookGroupService
bookGroupService
;
/**
/**
* 每日凌晨计算昨日广告位收益
* 每日凌晨计算昨日广告位收益
...
@@ -52,6 +55,8 @@ public class AdvertisingSpaceServiceImpl implements AdvertisingSpaceService {
...
@@ -52,6 +55,8 @@ public class AdvertisingSpaceServiceImpl implements AdvertisingSpaceService {
advertisingSpaceBiz
.
calculateAdvertisingIncomeYesterday
();
advertisingSpaceBiz
.
calculateAdvertisingIncomeYesterday
();
//统计昨日链接发送次数
//统计昨日链接发送次数
linkRevertBiz
.
addYesterdaySendStatistic
();
linkRevertBiz
.
addYesterdaySendStatistic
();
//新增读者数量
bookGroupService
.
addUserCount4RightsSetting
();
}
}
@ApiOperation
(
"发送广告计划"
)
@ApiOperation
(
"发送广告计划"
)
...
...
pcloud-service-book/src/main/java/com/pcloud/book/book/biz/BookAdviserBiz.java
View file @
3c56c2ba
...
@@ -196,4 +196,13 @@ public interface BookAdviserBiz {
...
@@ -196,4 +196,13 @@ public interface BookAdviserBiz {
* @throws BizException
* @throws BizException
*/
*/
void
setIsPrint
(
BookAdviser
bookAdviser
)
throws
BizException
;
void
setIsPrint
(
BookAdviser
bookAdviser
)
throws
BizException
;
/**
* 获取书刊小睿品牌介绍页权益
* @param bookId
* @param channelId
* @param adviserId
* @return
*/
BookRightsSettingDTO
getBookRightsSetting
(
Long
bookId
,
Long
channelId
,
Long
adviserId
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/book/biz/impl/BookAdviserBizImpl.java
View file @
3c56c2ba
...
@@ -7,6 +7,10 @@ import java.util.HashMap;
...
@@ -7,6 +7,10 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
com.pcloud.book.book.dto.BookRightsSettingDTO
;
import
com.pcloud.book.rightsSetting.biz.RightsSettingBiz
;
import
com.pcloud.book.rightsSetting.dto.RightsSettingDto
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -104,6 +108,8 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
...
@@ -104,6 +108,8 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
@Autowired
@Autowired
private
BookGroupDao
bookGroupDao
;
private
BookGroupDao
bookGroupDao
;
@Autowired
private
RightsSettingBiz
rightsSettingBiz
;
@Override
@Override
public
List
<
BookDto
>
listByAdviserId
(
Long
adviserId
)
{
public
List
<
BookDto
>
listByAdviserId
(
Long
adviserId
)
{
...
@@ -810,4 +816,20 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
...
@@ -810,4 +816,20 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
}
}
bookAdviserDao
.
setIsPrint
(
bookAdviser
);
bookAdviserDao
.
setIsPrint
(
bookAdviser
);
}
}
@Override
public
BookRightsSettingDTO
getBookRightsSetting
(
Long
bookId
,
Long
channelId
,
Long
adviserId
)
{
BookRightsSettingDTO
bookRightsSettingDTO
=
new
BookRightsSettingDTO
();
BookAdviserDto
adviserDto
=
bookAdviserDao
.
getBase
(
bookId
,
channelId
,
adviserId
);
if
(
null
!=
adviserDto
){
RightsSettingDto
rightsSettingDto
=
rightsSettingBiz
.
getByLabel
(
adviserDto
.
getTempletId
(),
adviserDto
.
getSecondTempletId
(),
adviserDto
.
getGraLabelId
(),
adviserDto
.
getSubLabelId
());
if
(
null
!=
rightsSettingDto
){
bookRightsSettingDTO
.
setRightsSettingDetail
(
rightsSettingDto
.
getDetail
());
bookRightsSettingDTO
.
setRightsSettingIntroduce
(
rightsSettingDto
.
getIntroduce
());
bookRightsSettingDTO
.
setRightsSettingCount
(
rightsSettingDto
.
getCount
());
}
}
return
bookRightsSettingDTO
;
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/book/service/impl/BookAdviserServiceImpl.java
View file @
3c56c2ba
...
@@ -124,4 +124,13 @@ public class BookAdviserServiceImpl implements BookAdviserService {
...
@@ -124,4 +124,13 @@ public class BookAdviserServiceImpl implements BookAdviserService {
bookAdviserBiz
.
refactorData
(
parentId
,
originTempletId
,
secondTempletId
);
bookAdviserBiz
.
refactorData
(
parentId
,
originTempletId
,
secondTempletId
);
return
ResponseHandleUtil
.
toResponse
(
"ok"
);
return
ResponseHandleUtil
.
toResponse
(
"ok"
);
}
}
@Override
@GetMapping
(
"getBookRightsSetting"
)
public
ResponseEntity
<
ResponseDto
<
BookRightsSettingDTO
>>
getBookRightsSetting
(
@RequestParam
(
"bookId"
)
Long
bookId
,
@RequestParam
(
"channelId"
)
Long
channelId
,
@RequestParam
(
"adviserId"
)
Long
adviserId
)
{
BookRightsSettingDTO
bookRightsSettingDTO
=
bookAdviserBiz
.
getBookRightsSetting
(
bookId
,
channelId
,
adviserId
);
return
ResponseHandleUtil
.
toResponse
(
bookRightsSettingDTO
);
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/consumer/app/AssistTempletConsr.java
View file @
3c56c2ba
...
@@ -71,4 +71,30 @@ public class AssistTempletConsr {
...
@@ -71,4 +71,30 @@ public class AssistTempletConsr {
}
}
return
ids
;
return
ids
;
}
}
/**
* 获取模板基本信息
*
* @return
*/
public
Map
<
Long
,
AssistTempletDTO
>
mapByIds4Classify
(
List
<
Long
>
assistTempletIds
)
{
LOGGER
.
info
(
"获取模板基本信息[assistTempletService.mapByIds4Classify],参数列表[assistTempletIds]:"
+
assistTempletIds
);
Map
<
Long
,
AssistTempletDTO
>
assistTempletDTOs
=
new
HashMap
<>();
if
(
ListUtils
.
isEmpty
(
assistTempletIds
))
{
return
assistTempletDTOs
;
}
try
{
assistTempletDTOs
=
ResponseHandleUtil
.
parseMapResponse
(
assistTempletService
.
mapByIds4Classify
(
assistTempletIds
),
Long
.
class
,
AssistTempletDTO
.
class
);
}
catch
(
BizException
e
)
{
LOGGER
.
warn
(
"获取模板基本信息[assistTempletService.mapByIds4Classify]:"
+
e
.
getMessage
(),
e
);
throw
new
BizException
(
e
.
getCode
(),
e
.
getMessage
());
}
catch
(
Exception
e
)
{
LOGGER
.
error
(
"获取模板基本信息[assistTempletService.mapByIds4Classify]:"
+
e
.
getMessage
(),
e
);
throw
new
BookBizException
(
BookBizException
.
INVOKE_APP_ERROR
,
"获取模板基本信息失败~!"
);
}
return
assistTempletDTOs
;
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/BookGroupBizImpl.java
View file @
3c56c2ba
...
@@ -77,6 +77,8 @@ import com.pcloud.book.pcloudkeyword.biz.PcloudRobotBiz;
...
@@ -77,6 +77,8 @@ import com.pcloud.book.pcloudkeyword.biz.PcloudRobotBiz;
import
com.pcloud.book.pcloudkeyword.entity.PcloudRobot
;
import
com.pcloud.book.pcloudkeyword.entity.PcloudRobot
;
import
com.pcloud.book.push.enums.AltTypeEnum
;
import
com.pcloud.book.push.enums.AltTypeEnum
;
import
com.pcloud.book.reading.dao.ReadingUserDao
;
import
com.pcloud.book.reading.dao.ReadingUserDao
;
import
com.pcloud.book.rightsSetting.biz.RightsSettingBiz
;
import
com.pcloud.book.rightsSetting.dto.RightsSettingDto
;
import
com.pcloud.book.util.common.ThreadPoolUtils
;
import
com.pcloud.book.util.common.ThreadPoolUtils
;
import
com.pcloud.channelcenter.base.constants.ChannelConstants
;
import
com.pcloud.channelcenter.base.constants.ChannelConstants
;
import
com.pcloud.channelcenter.qrcode.dto.GroupQrcodeVO
;
import
com.pcloud.channelcenter.qrcode.dto.GroupQrcodeVO
;
...
@@ -299,6 +301,8 @@ public class BookGroupBizImpl implements BookGroupBiz {
...
@@ -299,6 +301,8 @@ public class BookGroupBizImpl implements BookGroupBiz {
private
WechatConsr
wechatConsr
;
private
WechatConsr
wechatConsr
;
@Autowired
@Autowired
private
BookAppletSceneDao
bookAppletSceneDao
;
private
BookAppletSceneDao
bookAppletSceneDao
;
@Autowired
private
RightsSettingBiz
rightsSettingBiz
;
private
static
final
ThreadPoolExecutor
PLATFORM_STATISTICS_EXPORT_THREAD
=
new
ThreadPoolExecutor
(
2
,
2
,
private
static
final
ThreadPoolExecutor
PLATFORM_STATISTICS_EXPORT_THREAD
=
new
ThreadPoolExecutor
(
2
,
2
,
0
,
TimeUnit
.
SECONDS
,
new
LinkedBlockingQueue
<>(),
0
,
TimeUnit
.
SECONDS
,
new
LinkedBlockingQueue
<>(),
...
@@ -4441,8 +4445,19 @@ public class BookGroupBizImpl implements BookGroupBiz {
...
@@ -4441,8 +4445,19 @@ public class BookGroupBizImpl implements BookGroupBiz {
if
(
null
!=
bookAppletScene
){
if
(
null
!=
bookAppletScene
){
BeanUtils
.
copyProperties
(
bookAppletScene
,
dto
);
BeanUtils
.
copyProperties
(
bookAppletScene
,
dto
);
}
}
BookGroupDTO
bookGroupDTO
=
bookGroupDao
.
getBookBaseInfoById
(
bookGroupId
);
BookGroupDTO
bookGroupDTO
=
bookGroupDao
.
getBookBaseInfoById
(
bookGroupId
);
dto
.
setBookName
(
StringUtil
.
addBracket
(
bookGroupDTO
.
getBookName
()));
dto
.
setBookName
(
StringUtil
.
addBracket
(
bookGroupDTO
.
getBookName
()));
//权益
BookAdviserDto
adviserDto
=
bookAdviserDao
.
getBase
(
bookGroupDTO
.
getBookId
(),
bookGroupDTO
.
getChannelId
(),
bookGroupDTO
.
getCreateUser
());
if
(
null
!=
adviserDto
){
RightsSettingDto
rightsSettingDto
=
rightsSettingBiz
.
getByLabel
(
adviserDto
.
getTempletId
(),
adviserDto
.
getSecondTempletId
(),
adviserDto
.
getGraLabelId
(),
adviserDto
.
getSubLabelId
());
if
(
null
!=
rightsSettingDto
){
dto
.
setRightsSettingDetail
(
rightsSettingDto
.
getDetail
());
dto
.
setRightsSettingIntroduce
(
rightsSettingDto
.
getIntroduce
());
dto
.
setRightsSettingCount
(
rightsSettingDto
.
getCount
());
}
}
return
dto
;
return
dto
;
}
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/dto/BookAppletSceneDTO.java
View file @
3c56c2ba
...
@@ -36,5 +36,18 @@ public class BookAppletSceneDTO extends BaseDto {
...
@@ -36,5 +36,18 @@ public class BookAppletSceneDTO extends BaseDto {
* 书名
* 书名
*/
*/
private
String
bookName
;
private
String
bookName
;
/**
* 权益介绍
*/
private
String
rightsSettingIntroduce
;
/**
*权益详情
*/
private
String
rightsSettingDetail
;
/**
*权益数量
*/
private
Integer
rightsSettingCount
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/handler/PushBookGroupUpdateRunner.java
View file @
3c56c2ba
...
@@ -3,11 +3,14 @@ package com.pcloud.book.group.handler;
...
@@ -3,11 +3,14 @@ package com.pcloud.book.group.handler;
import
com.pcloud.book.group.biz.BookGroupBiz
;
import
com.pcloud.book.group.biz.BookGroupBiz
;
import
com.pcloud.common.utils.DateUtils
;
import
com.pcloud.common.utils.DateUtils
;
import
com.pcloud.common.utils.cache.redis.JedisClusterUtils
;
import
com.pcloud.common.utils.string.StringUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.ApplicationArguments
;
import
org.springframework.boot.ApplicationArguments
;
import
org.springframework.boot.ApplicationRunner
;
import
org.springframework.boot.ApplicationRunner
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.Date
;
import
java.util.Random
;
import
java.util.Random
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/service/impl/BookGroupServiceImpl.java
View file @
3c56c2ba
...
@@ -22,9 +22,12 @@ import com.pcloud.common.dto.ResponseDto;
...
@@ -22,9 +22,12 @@ import com.pcloud.common.dto.ResponseDto;
import
com.pcloud.common.dto.StoreFlowInfoDto
;
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.page.PageBeanNew
;
import
com.pcloud.common.utils.DateUtils
;
import
com.pcloud.common.utils.ListUtils
;
import
com.pcloud.common.utils.ListUtils
;
import
com.pcloud.common.utils.ResponseHandleUtil
;
import
com.pcloud.common.utils.ResponseHandleUtil
;
import
com.pcloud.common.utils.cache.redis.JedisClusterUtils
;
import
com.pcloud.common.utils.string.StringUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
@@ -36,8 +39,10 @@ import org.springframework.web.bind.annotation.RequestParam;
...
@@ -36,8 +39,10 @@ import org.springframework.web.bind.annotation.RequestParam;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Random
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.annotations.ApiParam
;
...
@@ -359,4 +364,15 @@ public class BookGroupServiceImpl implements BookGroupService {
...
@@ -359,4 +364,15 @@ public class BookGroupServiceImpl implements BookGroupService {
SelfRobotBookGroupDTO
selfRobotBookGroupDTO
=
bookGroupBiz
.
getSelfRobotBookGroupInfoByUser
(
wxUserId
,
bookGroupId
);
SelfRobotBookGroupDTO
selfRobotBookGroupDTO
=
bookGroupBiz
.
getSelfRobotBookGroupInfoByUser
(
wxUserId
,
bookGroupId
);
return
ResponseHandleUtil
.
toResponse
(
selfRobotBookGroupDTO
);
return
ResponseHandleUtil
.
toResponse
(
selfRobotBookGroupDTO
);
}
}
@Override
public
void
addUserCount4RightsSetting
()
{
//每天增加读者数
String
key
=
"BOOK:APPLET:RIGHTS_SETTING_USER_COUNT"
;
String
value
=
JedisClusterUtils
.
get
(
key
);
if
(!
StringUtil
.
isEmpty
(
value
)){
Integer
count
=
Integer
.
valueOf
(
value
)+
new
Random
().
nextInt
(
10
)+
20
;
JedisClusterUtils
.
set
(
key
,
count
.
toString
(),
36
*
3600
);
}
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/biz/RightsSettingBiz.java
0 → 100644
View file @
3c56c2ba
package
com
.
pcloud
.
book
.
rightsSetting
.
biz
;
import
com.pcloud.book.rightsSetting.dto.RightsSettingDto
;
import
com.pcloud.book.rightsSetting.entity.RightsSetting
;
import
com.pcloud.common.dto.ResponseDto
;
import
com.pcloud.common.page.PageBeanNew
;
public
interface
RightsSettingBiz
{
Long
addRightsSetting
(
RightsSetting
rightsSetting
);
void
deleteRightsSetting
(
Long
id
);
void
updateRightsSetting
(
RightsSetting
rightsSetting
);
RightsSetting
getRightsSetting
(
Long
id
);
PageBeanNew
<
RightsSettingDto
>
listRightsSettingPage
(
Integer
currentPage
,
Integer
numPerPage
,
RightsSetting
rightsSetting
);
RightsSettingDto
getByLabel
(
Long
firstClassify
,
Long
secondClassify
,
Long
gradeLabelId
,
Long
subjectLabelId
);
Integer
getUserCount
();
}
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
0 → 100644
View file @
3c56c2ba
This diff is collapsed.
Click to expand it.
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/constants/RightsSettingConstant.java
0 → 100644
View file @
3c56c2ba
package
com
.
pcloud
.
book
.
rightsSetting
.
constants
;
public
class
RightsSettingConstant
{
/**
* 所属k12教育的编辑书刊分类id--生产uat
*/
public
static
final
Long
[]
K12_TEMPLET_ID
=
{
48L
,
59L
,
46L
,
40L
,
65L
,
60L
,
131L
};
/**
* 所属k12教育的编辑书刊分类id--测试环境
*/
public
static
final
Long
[]
K12_TEMPLET_ID_TEST
=
{
48L
,
59L
,
46L
,
40L
,
65L
,
60L
,
136L
};
/**
* 医疗保健编辑书刊分类id
*/
public
static
final
Long
[]
MEDICAL_INSURANCE_TEMPLET_ID
=
{
63L
};
}
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/dao/RightsSettingDAO.java
0 → 100644
View file @
3c56c2ba
package
com
.
pcloud
.
book
.
rightsSetting
.
dao
;
import
com.pcloud.book.rightsSetting.dto.RightsSettingDto
;
import
com.pcloud.book.rightsSetting.entity.RightsSetting
;
import
com.pcloud.common.core.dao.BaseDao
;
public
interface
RightsSettingDAO
extends
BaseDao
<
RightsSetting
>
{
int
deleteByPrimaryKey
(
Long
id
);
RightsSetting
selectByPrimaryKey
(
Long
id
);
int
updateByPrimaryKeySelective
(
RightsSetting
record
);
int
updateByPrimaryKey
(
RightsSetting
record
);
RightsSettingDto
getByLabel
(
Long
firstClassify
,
Long
secondClassify
,
Long
gradeLabelId
,
Long
subjectLabelId
);
}
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/dao/RightsSettingMapper.java
0 → 100644
View file @
3c56c2ba
package
com
.
pcloud
.
book
.
rightsSetting
.
dao
;
import
com.pcloud.book.rightsSetting.entity.RightsSetting
;
public
interface
RightsSettingMapper
{
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
RightsSetting
record
);
int
insertSelective
(
RightsSetting
record
);
RightsSetting
selectByPrimaryKey
(
Long
id
);
int
updateByPrimaryKeySelective
(
RightsSetting
record
);
int
updateByPrimaryKey
(
RightsSetting
record
);
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/dao/check/RightsSettingCheck.java
0 → 100644
View file @
3c56c2ba
package
com
.
pcloud
.
book
.
rightsSetting
.
dao
.
check
;
import
com.pcloud.book.base.exception.BookBizException
;
import
com.pcloud.book.rightsSetting.entity.RightsSetting
;
import
com.pcloud.common.utils.string.StringUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Component
;
@Component
(
"权益设置参数校验"
)
@Slf4j
public
class
RightsSettingCheck
{
public
void
rightsSettingCheck
(
RightsSetting
rightsSetting
)
{
log
.
info
(
"新增权益设置参数校验"
);
if
(
null
==
rightsSetting
){
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"参数为空!"
);
}
if
(
StringUtil
.
isEmpty
(
rightsSetting
.
getIntroduce
())){
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"权益介绍为空!"
);
}
if
(
StringUtil
.
isEmpty
(
rightsSetting
.
getDetail
())){
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"权益详情为空!"
);
}
if
(
null
==
rightsSetting
.
getCount
()){
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"权益个数为空!"
);
}
if
(
null
==
rightsSetting
.
getFirstClassify
()){
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"分类为空!"
);
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/dao/impl/RightsSettingDAOImpl.java
0 → 100644
View file @
3c56c2ba
package
com
.
pcloud
.
book
.
rightsSetting
.
dao
.
impl
;
import
com.pcloud.book.rightsSetting.dao.RightsSettingDAO
;
import
com.pcloud.book.rightsSetting.dto.RightsSettingDto
;
import
com.pcloud.book.rightsSetting.entity.RightsSetting
;
import
com.pcloud.common.core.dao.BaseDaoImpl
;
import
org.springframework.stereotype.Component
;
import
java.util.HashMap
;
import
java.util.Map
;
@Component
public
class
RightsSettingDAOImpl
extends
BaseDaoImpl
<
RightsSetting
>
implements
RightsSettingDAO
{
@Override
public
int
deleteByPrimaryKey
(
Long
id
)
{
return
super
.
getSqlSession
().
delete
(
getStatement
(
"deleteByPrimaryKey"
),
id
);
}
@Override
public
RightsSetting
selectByPrimaryKey
(
Long
id
)
{
return
super
.
getSqlSession
().
selectOne
(
getStatement
(
"selectByPrimaryKey"
),
id
);
}
@Override
public
int
updateByPrimaryKeySelective
(
RightsSetting
record
)
{
return
super
.
getSqlSession
().
update
(
getStatement
(
"updateByPrimaryKeySelective"
),
record
);
}
@Override
public
int
updateByPrimaryKey
(
RightsSetting
record
)
{
return
super
.
getSqlSession
().
update
(
getStatement
(
"updateByPrimaryKeySelective"
),
record
);
}
@Override
public
RightsSettingDto
getByLabel
(
Long
firstClassify
,
Long
secondClassify
,
Long
gradeLabelId
,
Long
subjectLabelId
)
{
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"firstClassify"
,
firstClassify
);
paramMap
.
put
(
"secondClassify"
,
secondClassify
);
paramMap
.
put
(
"gradeLabelId"
,
gradeLabelId
);
paramMap
.
put
(
"subjectLabelId"
,
subjectLabelId
);
return
getSessionTemplate
().
selectOne
(
getStatement
(
"getByLabel"
),
paramMap
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/dto/RightsSettingDto.java
0 → 100644
View file @
3c56c2ba
package
com
.
pcloud
.
book
.
rightsSetting
.
dto
;
import
com.pcloud.book.rightsSetting.entity.RightsSetting
;
import
lombok.Data
;
@Data
public
class
RightsSettingDto
extends
RightsSetting
{
private
String
firstClassifyContent
;
private
String
secondClassifyContent
;
private
String
gradeLabelIdContent
;
private
String
subjectLabelIdContent
;
}
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/entity/RightsSetting.java
0 → 100644
View file @
3c56c2ba
package
com
.
pcloud
.
book
.
rightsSetting
.
entity
;
import
com.pcloud.common.entity.BaseEntity
;
import
lombok.Data
;
@Data
public
class
RightsSetting
extends
BaseEntity
{
private
String
introduce
;
private
String
detail
;
private
Integer
count
;
private
Long
firstClassify
;
private
Long
secondClassify
;
private
Long
gradeLabelId
;
private
Long
subjectLabelId
;
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/facade/RightsSettingFacede.java
0 → 100644
View file @
3c56c2ba
package
com
.
pcloud
.
book
.
rightsSetting
.
facade
;
import
com.pcloud.book.rightsSetting.biz.RightsSettingBiz
;
import
com.pcloud.book.rightsSetting.dto.RightsSettingDto
;
import
com.pcloud.book.rightsSetting.entity.RightsSetting
;
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
io.swagger.annotations.ApiOperation
;
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
;
@RequestMapping
(
"rightsSetting"
)
@RestController
(
"rightsSettingFacede"
)
public
class
RightsSettingFacede
{
@Autowired
private
RightsSettingBiz
rightsSettingBiz
;
@PostMapping
(
"addRightsSetting"
)
public
ResponseDto
<
Long
>
addRightsSetting
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
RightsSetting
rightsSetting
)
throws
PermissionException
{
SessionUtil
.
getToken4Redis
(
token
);
return
new
ResponseDto
<
Long
>(
rightsSettingBiz
.
addRightsSetting
(
rightsSetting
));
}
@GetMapping
(
"deleteRightsSetting"
)
public
ResponseDto
<?>
deleteRightsSetting
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
"id"
)
Long
id
)
throws
PermissionException
{
SessionUtil
.
getToken4Redis
(
token
);
rightsSettingBiz
.
deleteRightsSetting
(
id
);
return
new
ResponseDto
<>();
}
@PostMapping
(
"updateRightsSetting"
)
public
ResponseDto
<?>
updateRightsSetting
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
RightsSetting
rightsSetting
)
throws
PermissionException
{
SessionUtil
.
getToken4Redis
(
token
);
rightsSettingBiz
.
updateRightsSetting
(
rightsSetting
);
return
new
ResponseDto
<>();
}
@GetMapping
(
"getRightsSetting"
)
public
ResponseDto
<
RightsSetting
>
getRightsSetting
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
"id"
)
Long
id
)
throws
PermissionException
{
SessionUtil
.
getToken4Redis
(
token
);
return
new
ResponseDto
<
RightsSetting
>(
rightsSettingBiz
.
getRightsSetting
(
id
));
}
@GetMapping
(
"listRightsSettingPage"
)
public
ResponseDto
<
PageBeanNew
<
RightsSettingDto
>>
listRightsSettingPage
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
"numPerPage"
)
Integer
numPerPage
,
@RequestParam
(
value
=
"firstClassify"
,
required
=
false
)
Long
firstClassify
,
@RequestParam
(
value
=
"secondClassify"
,
required
=
false
)
Long
secondClassify
,
@RequestParam
(
value
=
"gradeLabelId"
,
required
=
false
)
Long
gradeLabelId
,
@RequestParam
(
value
=
"subjectLabelId"
,
required
=
false
)
Long
subjectLabelId
)
throws
PermissionException
{
SessionUtil
.
getToken4Redis
(
token
);
RightsSetting
rightsSetting
=
new
RightsSetting
();
rightsSetting
.
setFirstClassify
(
firstClassify
);
rightsSetting
.
setSecondClassify
(
secondClassify
);
rightsSetting
.
setGradeLabelId
(
gradeLabelId
);
rightsSetting
.
setSubjectLabelId
(
subjectLabelId
);
return
new
ResponseDto
<
PageBeanNew
<
RightsSettingDto
>>(
rightsSettingBiz
.
listRightsSettingPage
(
currentPage
,
numPerPage
,
rightsSetting
));
}
@ApiOperation
(
"获取读者数量-每天自增"
)
@GetMapping
(
"getUserCount"
)
public
ResponseDto
<
Integer
>
getUserCount
(){
return
new
ResponseDto
<>(
rightsSettingBiz
.
getUserCount
());
}
}
\ No newline at end of file
pcloud-service-book/src/main/resources/generatorConfig.xml
View file @
3c56c2ba
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<generatorConfiguration>
<generatorConfiguration>
<classPathEntry
<classPathEntry
location=
"
C:\work\re
pository\mysql\mysql-connector-java\5.1.44\mysql-connector-java-5.1.44.jar"
/>
location=
"
E:\work\res
pository\mysql\mysql-connector-java\5.1.44\mysql-connector-java-5.1.44.jar"
/>
<context
id=
"my"
targetRuntime=
"MyBatis3"
>
<context
id=
"my"
targetRuntime=
"MyBatis3"
>
<commentGenerator>
<commentGenerator>
<property
name=
"suppressDate"
value=
"false"
/>
<property
name=
"suppressDate"
value=
"false"
/>
...
@@ -16,19 +16,19 @@
...
@@ -16,19 +16,19 @@
connectionURL=
"jdbc:mysql://192.168.92.41:3306/book"
userId=
"root"
connectionURL=
"jdbc:mysql://192.168.92.41:3306/book"
userId=
"root"
password=
"LGSC2016.lgsc"
/>
password=
"LGSC2016.lgsc"
/>
<javaModelGenerator
targetPackage=
"com.pcloud.book"
<javaModelGenerator
targetPackage=
"com.pcloud.book
.rightsSetting.entity
"
targetProject=
"
C:\project\rays\个人中心\pcloud-book\pcloud-service-book\src\main\resource
"
>
targetProject=
"
src\main\java
"
>
<property
name=
"enableSubPackages"
value=
"true"
/>
<property
name=
"enableSubPackages"
value=
"true"
/>
<property
name=
"trimStrings"
value=
"true"
/>
<property
name=
"trimStrings"
value=
"true"
/>
</javaModelGenerator>
</javaModelGenerator>
<sqlMapGenerator
targetPackage=
"
com.pcloud.book
"
<sqlMapGenerator
targetPackage=
"
mapper.rightssetting
"
targetProject=
"
C:\project\rays\个人中心\pcloud-book\pcloud-service-book\src\main\resource
"
>
targetProject=
"
src\main\resources
"
>
<property
name=
"enableSubPackages"
value=
"true"
/>
<property
name=
"enableSubPackages"
value=
"true"
/>
</sqlMapGenerator>
</sqlMapGenerator>
<javaClientGenerator
targetPackage=
"com.pcloud.book"
<javaClientGenerator
targetPackage=
"com.pcloud.book
.rightsSetting.dao
"
targetProject=
"
C:\project\rays\个人中心\pcloud-book\pcloud-service-book\src\main\resource
"
type=
"XMLMAPPER"
>
targetProject=
"
src\main\java
"
type=
"XMLMAPPER"
>
<property
name=
"enableSubPackages"
value=
"true"
/>
<property
name=
"enableSubPackages"
value=
"true"
/>
</javaClientGenerator>
</javaClientGenerator>
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
selectByExampleQueryId="false">
selectByExampleQueryId="false">
</table>-->
</table>-->
<table
tableName=
"
mini_user_classify"
domainObjectName=
"MiniUserClassify
"
<table
tableName=
"
rights_setting"
domainObjectName=
"RightsSetting
"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
>
selectByExampleQueryId=
"false"
>
...
...
pcloud-service-book/src/main/resources/mapper/book/BookAdviser.Mapper.xml
View file @
3c56c2ba
...
@@ -16,6 +16,10 @@
...
@@ -16,6 +16,10 @@
<result
column=
"IS_MAIN_EDITOR"
property=
"isMainEditor"
jdbcType=
"BIT"
/>
<result
column=
"IS_MAIN_EDITOR"
property=
"isMainEditor"
jdbcType=
"BIT"
/>
<result
column=
"IS_DELETE"
property=
"isDelete"
jdbcType=
"BIT"
/>
<result
column=
"IS_DELETE"
property=
"isDelete"
jdbcType=
"BIT"
/>
<result
column=
"SECOND_TEMPLET_ID"
property=
"secondTempletId"
jdbcType=
"BIGINT"
/>
<result
column=
"SECOND_TEMPLET_ID"
property=
"secondTempletId"
jdbcType=
"BIGINT"
/>
<result
column=
"GRA_LABEL_ID"
property=
"graLabelId"
jdbcType=
"BIGINT"
/>
<result
column=
"SUB_LABEL_ID"
property=
"subLabelId"
jdbcType=
"BIGINT"
/>
<result
column=
"VER_LABEL_ID"
property=
"verLabelId"
jdbcType=
"BIGINT"
/>
<result
column=
"AREA_LABEL_ID"
property=
"areaLabelId"
jdbcType=
"BIGINT"
/>
</resultMap>
</resultMap>
<resultMap
id=
"manageAdviserMap"
type=
"adviserManageDto"
>
<resultMap
id=
"manageAdviserMap"
type=
"adviserManageDto"
>
...
@@ -113,7 +117,9 @@
...
@@ -113,7 +117,9 @@
<!-- 批量获取书籍信息 -->
<!-- 批量获取书籍信息 -->
<select
id=
"getBase"
resultMap=
"bookAdviserMap"
parameterType=
"map"
>
<select
id=
"getBase"
resultMap=
"bookAdviserMap"
parameterType=
"map"
>
SELECT
SELECT
BOOK_ADVISER_ID, BOOK_ID, TEMPLET_ID, CHANNEL_ID, ADVISER_ID, IS_DELETE
BOOK_ADVISER_ID, BOOK_ID, TEMPLET_ID, CHANNEL_ID, ADVISER_ID, IS_DELETE,
TEMPLET_ID,SECOND_TEMPLET_ID,
GRA_LABEL_ID,SUB_LABEL_ID,VER_LABEL_ID,AREA_LABEL_ID
FROM
FROM
BOOK_ADVISER
BOOK_ADVISER
WHERE
WHERE
...
...
pcloud-service-book/src/main/resources/mapper/group/BookGroupMapper.xml
View file @
3c56c2ba
...
@@ -459,7 +459,9 @@
...
@@ -459,7 +459,9 @@
bg.is_invite_group,
bg.is_invite_group,
b.book_name,
b.book_name,
b.cover_img book_img,
b.cover_img book_img,
b.isbn
b.isbn,
bg.channel_id,
bg.create_user
FROM
FROM
book_group bg
book_group bg
LEFT JOIN book b ON bg.book_id = b.BOOK_ID
LEFT JOIN book b ON bg.book_id = b.BOOK_ID
...
...
pcloud-service-book/src/main/resources/mapper/rightssetting/RightsSettingMapper.xml
0 → 100644
View file @
3c56c2ba
<?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.rightsSetting.dao.impl.RightsSettingDAOImpl"
>
<resultMap
id=
"BaseResultMap"
type=
"com.pcloud.book.rightsSetting.entity.RightsSetting"
>
<id
column=
"id"
property=
"id"
jdbcType=
"BIGINT"
/>
<result
column=
"introduce"
property=
"introduce"
jdbcType=
"VARCHAR"
/>
<result
column=
"detail"
property=
"detail"
jdbcType=
"VARCHAR"
/>
<result
column=
"count"
property=
"count"
jdbcType=
"INTEGER"
/>
<result
column=
"first_classify"
property=
"firstClassify"
jdbcType=
"BIGINT"
/>
<result
column=
"second_classify"
property=
"secondClassify"
jdbcType=
"BIGINT"
/>
<result
column=
"grade_label_id"
property=
"gradeLabelId"
jdbcType=
"BIGINT"
/>
<result
column=
"subject_label_id"
property=
"subjectLabelId"
jdbcType=
"BIGINT"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<resultMap
id=
"DtoResultMap"
type=
"com.pcloud.book.rightsSetting.dto.RightsSettingDto"
>
<id
column=
"id"
property=
"id"
jdbcType=
"BIGINT"
/>
<result
column=
"introduce"
property=
"introduce"
jdbcType=
"VARCHAR"
/>
<result
column=
"detail"
property=
"detail"
jdbcType=
"VARCHAR"
/>
<result
column=
"count"
property=
"count"
jdbcType=
"INTEGER"
/>
<result
column=
"first_classify"
property=
"firstClassify"
jdbcType=
"BIGINT"
/>
<result
column=
"second_classify"
property=
"secondClassify"
jdbcType=
"BIGINT"
/>
<result
column=
"grade_label_id"
property=
"gradeLabelId"
jdbcType=
"BIGINT"
/>
<result
column=
"subject_label_id"
property=
"subjectLabelId"
jdbcType=
"BIGINT"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, introduce, detail, count, first_classify, second_classify, grade_label_id, subject_label_id,
create_time, update_time
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Long"
>
select
<include
refid=
"Base_Column_List"
/>
from rights_setting
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from rights_setting
where id = #{id,jdbcType=BIGINT}
</delete>
<insert
id=
"insert"
parameterType=
"com.pcloud.book.rightsSetting.entity.RightsSetting"
>
insert into rights_setting (id, introduce, detail,
count, first_classify, second_classify,
grade_label_id, subject_label_id, create_time,
update_time)
values (#{id,jdbcType=BIGINT}, #{introduce,jdbcType=VARCHAR}, #{detail,jdbcType=VARCHAR},
#{count,jdbcType=INTEGER}, #{firstClassify,jdbcType=BIGINT}, #{secondClassify,jdbcType=BIGINT},
#{gradeLabelId,jdbcType=BIGINT}, #{subjectLabelId,jdbcType=BIGINT}, now(),
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.pcloud.book.rightsSetting.entity.RightsSetting"
>
update rights_setting
<set
>
<if
test=
"introduce != null"
>
introduce = #{introduce,jdbcType=VARCHAR},
</if>
<if
test=
"detail != null"
>
detail = #{detail,jdbcType=VARCHAR},
</if>
<if
test=
"count != null"
>
count = #{count,jdbcType=INTEGER},
</if>
<if
test=
"firstClassify != null"
>
first_classify = #{firstClassify,jdbcType=BIGINT},
</if>
<if
test=
"secondClassify != null"
>
second_classify = #{secondClassify,jdbcType=BIGINT},
</if>
<if
test=
"gradeLabelId != null"
>
grade_label_id = #{gradeLabelId,jdbcType=BIGINT},
</if>
<if
test=
"subjectLabelId != null"
>
subject_label_id = #{subjectLabelId,jdbcType=BIGINT},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.pcloud.book.rightsSetting.entity.RightsSetting"
>
update rights_setting
set introduce = #{introduce,jdbcType=VARCHAR},
detail = #{detail,jdbcType=VARCHAR},
count = #{count,jdbcType=INTEGER},
first_classify = #{firstClassify,jdbcType=BIGINT},
second_classify = #{secondClassify,jdbcType=BIGINT},
grade_label_id = #{gradeLabelId,jdbcType=BIGINT},
subject_label_id = #{subjectLabelId,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
<select
id=
"listRightsSettingPage"
parameterType=
"map"
resultMap=
"DtoResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from
rights_setting
<where>
<if
test=
"firstClassify != null"
>
first_classify = #{firstClassify}
</if>
<if
test=
"secondClassify != null"
>
and second_classify = #{secondClassify}
</if>
<if
test=
"gradeLabelId != null"
>
and grade_label_id = #{gradeLabelId}
</if>
<if
test=
"subjectLabelId != null"
>
and subject_label_id = #{subjectLabelId}
</if>
</where>
order by create_time desc
</select>
<select
id=
"getByLabel"
parameterType=
"map"
resultMap=
"DtoResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from
rights_setting
where 1=1
<if
test=
"firstClassify != null"
>
and first_classify = #{firstClassify}
</if>
<if
test=
"secondClassify != null"
>
and second_classify = #{secondClassify}
</if>
<if
test=
"gradeLabelId != null"
>
and grade_label_id = #{gradeLabelId}
</if>
<if
test=
"subjectLabelId != null"
>
and subject_label_id = #{subjectLabelId}
</if>
limit 1
</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