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
71da5cb9
Commit
71da5cb9
authored
May 25, 2020
by
朱亚洁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1002933书刊分类针对k12新增上下册标识的支持
parent
0820ebe9
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
172 additions
and
399 deletions
+172
-399
BookAdviserDto.java
...rc/main/java/com/pcloud/book/book/dto/BookAdviserDto.java
+7
-199
BookDto.java
...-book/src/main/java/com/pcloud/book/book/dto/BookDto.java
+15
-1
Book.java
...-book/src/main/java/com/pcloud/book/book/entity/Book.java
+13
-0
BookAdviser.java
...rc/main/java/com/pcloud/book/book/entity/BookAdviser.java
+7
-176
AppletGroupSearchRecordBizImpl.java
.../book/applet/biz/impl/AppletGroupSearchRecordBizImpl.java
+1
-0
BookAdviserBizImpl.java
...ava/com/pcloud/book/book/biz/impl/BookAdviserBizImpl.java
+2
-1
BookBizImpl.java
.../main/java/com/pcloud/book/book/biz/impl/BookBizImpl.java
+1
-0
RightsSettingBiz.java
...a/com/pcloud/book/rightsSetting/biz/RightsSettingBiz.java
+9
-1
RightsSettingBizImpl.java
...oud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
+61
-5
RightsSettingCheck.java
...m/pcloud/book/rightsSetting/check/RightsSettingCheck.java
+1
-1
RightsSettingDAO.java
...a/com/pcloud/book/rightsSetting/dao/RightsSettingDAO.java
+1
-1
RightsSettingDAOImpl.java
...oud/book/rightsSetting/dao/impl/RightsSettingDAOImpl.java
+2
-1
BaseTempletClassify.java
...pcloud/book/rightsSetting/entity/BaseTempletClassify.java
+2
-1
RightsSetting.java
...a/com/pcloud/book/rightsSetting/entity/RightsSetting.java
+5
-0
RightsSettingFacede.java
...pcloud/book/rightsSetting/facade/RightsSettingFacede.java
+11
-1
PcloudGroupActivityBizImpl.java
...cloud/book/skill/biz/impl/PcloudGroupActivityBizImpl.java
+1
-0
Book.Mapper.xml
...rvice-book/src/main/resources/mapper/book/Book.Mapper.xml
+3
-2
BookAdviser.Mapper.xml
...ook/src/main/resources/mapper/book/BookAdviser.Mapper.xml
+13
-4
RightsSettingMapper.xml
...in/resources/mapper/rightssetting/RightsSettingMapper.xml
+17
-5
No files found.
pcloud-facade-book/src/main/java/com/pcloud/book/book/dto/BookAdviserDto.java
View file @
71da5cb9
...
...
@@ -5,12 +5,15 @@ package com.pcloud.book.book.dto;
import
com.pcloud.common.dto.BaseDto
;
import
lombok.Data
;
/**
* @描述:
* @作者:songx
* @创建时间:2016年12月30日,上午11:44:11
* @版本:1.0
*/
@Data
public
class
BookAdviserDto
extends
BaseDto
{
/**
...
...
@@ -113,205 +116,10 @@ public class BookAdviserDto extends BaseDto {
private
Integer
isOpenRobotProcess
;
public
Integer
getIsOpenRobotProcess
()
{
return
isOpenRobotProcess
;
}
public
void
setIsOpenRobotProcess
(
Integer
isOpenRobotProcess
)
{
this
.
isOpenRobotProcess
=
isOpenRobotProcess
;
}
public
Integer
getCount
()
{
return
count
;
}
public
void
setCount
(
Integer
count
)
{
this
.
count
=
count
;
}
public
String
getAdviserName
()
{
return
adviserName
;
}
public
void
setAdviserName
(
String
adviserName
)
{
this
.
adviserName
=
adviserName
;
}
public
String
getChannelName
()
{
return
channelName
;
}
public
void
setChannelName
(
String
channelName
)
{
this
.
channelName
=
channelName
;
}
public
Long
getBookAdviserId
()
{
return
bookAdviserId
;
}
public
void
setBookAdviserId
(
Long
bookAdviserId
)
{
this
.
bookAdviserId
=
bookAdviserId
;
}
public
Long
getBookId
()
{
return
bookId
;
}
public
void
setBookId
(
Long
bookId
)
{
this
.
bookId
=
bookId
;
}
public
Long
getAdviserId
()
{
return
adviserId
;
}
public
void
setAdviserId
(
Long
adviserId
)
{
this
.
adviserId
=
adviserId
;
}
public
Long
getChannelId
()
{
return
channelId
;
}
public
void
setChannelId
(
Long
channelId
)
{
this
.
channelId
=
channelId
;
}
public
Boolean
getIsMainEditor
()
{
return
isMainEditor
;
}
public
void
setIsMainEditor
(
Boolean
isMainEditor
)
{
this
.
isMainEditor
=
isMainEditor
;
}
public
Long
getAgentId
()
{
return
agentId
;
}
public
void
setAgentId
(
Long
agentId
)
{
this
.
agentId
=
agentId
;
}
public
String
getAgentName
()
{
return
agentName
;
}
public
void
setAgentName
(
String
agentName
)
{
this
.
agentName
=
agentName
;
}
public
BookDto
getBookDto
()
{
return
bookDto
;
}
public
void
setBookDto
(
BookDto
bookDto
)
{
this
.
bookDto
=
bookDto
;
}
public
Integer
getIsDelete
()
{
return
isDelete
;
}
public
void
setIsDelete
(
Integer
isDelete
)
{
this
.
isDelete
=
isDelete
;
}
public
String
getIsbn
()
{
return
isbn
;
}
public
void
setIsbn
(
String
isbn
)
{
this
.
isbn
=
isbn
;
}
public
Boolean
getMainEditor
()
{
return
isMainEditor
;
}
public
void
setMainEditor
(
Boolean
mainEditor
)
{
isMainEditor
=
mainEditor
;
}
public
String
getCoverImg
()
{
return
coverImg
;
}
public
void
setCoverImg
(
String
coverImg
)
{
this
.
coverImg
=
coverImg
;
}
public
Long
getTempletId
()
{
return
templetId
;
}
public
void
setTempletId
(
Long
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
;
}
/**
* 上下册标签id
*/
private
Long
volLabelId
;
public
void
setAreaLabelId
(
Long
areaLabelId
)
{
this
.
areaLabelId
=
areaLabelId
;
}
@Override
public
String
toString
()
{
return
"BookAdviserDto{"
+
"bookAdviserId="
+
bookAdviserId
+
", bookId="
+
bookId
+
", isbn='"
+
isbn
+
'\''
+
", coverImg='"
+
coverImg
+
'\''
+
", adviserId="
+
adviserId
+
", adviserName='"
+
adviserName
+
'\''
+
", channelId="
+
channelId
+
", templetId="
+
templetId
+
", channelName='"
+
channelName
+
'\''
+
", count="
+
count
+
", isMainEditor="
+
isMainEditor
+
", agentId="
+
agentId
+
", agentName='"
+
agentName
+
'\''
+
", bookDto="
+
bookDto
+
", isDelete="
+
isDelete
+
", secondTempletId="
+
secondTempletId
+
", graLabelId="
+
graLabelId
+
", subLabelId="
+
subLabelId
+
", verLabelId="
+
verLabelId
+
", areaLabelId="
+
areaLabelId
+
'}'
;
}
}
pcloud-facade-book/src/main/java/com/pcloud/book/book/dto/BookDto.java
View file @
71da5cb9
...
...
@@ -665,6 +665,19 @@ public class BookDto extends BaseDto {
@ApiModelProperty
(
"小睿分类编号"
)
private
Integer
classifyId
;
/**
* 上下册标签id
*/
private
Long
volLabelId
;
public
Long
getVolLabelId
()
{
return
volLabelId
;
}
public
void
setVolLabelId
(
Long
volLabelId
)
{
this
.
volLabelId
=
volLabelId
;
}
public
Integer
getClassifyId
()
{
return
classifyId
;
}
...
...
@@ -1917,6 +1930,7 @@ public class BookDto extends BaseDto {
", allBookIncome="
+
allBookIncome
+
", isOpenRobotProcess="
+
isOpenRobotProcess
+
", classifyId="
+
classifyId
+
"} "
+
super
.
toString
();
", volLabelId="
+
volLabelId
+
'}'
;
}
}
pcloud-facade-book/src/main/java/com/pcloud/book/book/entity/Book.java
View file @
71da5cb9
...
...
@@ -236,6 +236,18 @@ public class Book extends BaseEntity {
* 目的标签ID
*/
private
Long
purLabelId
;
/**
* 上下册标签id
*/
private
Long
volLabelId
;
public
Long
getVolLabelId
()
{
return
volLabelId
;
}
public
void
setVolLabelId
(
Long
volLabelId
)
{
this
.
volLabelId
=
volLabelId
;
}
public
Long
getBookId
()
{
return
bookId
;
...
...
@@ -636,6 +648,7 @@ public class Book extends BaseEntity {
", proLabelId="
+
proLabelId
+
", depLabelId="
+
depLabelId
+
", purLabelId="
+
purLabelId
+
", volLabelId="
+
volLabelId
+
'}'
;
}
}
pcloud-facade-book/src/main/java/com/pcloud/book/book/entity/BookAdviser.java
View file @
71da5cb9
...
...
@@ -5,12 +5,15 @@ package com.pcloud.book.book.entity;
import
com.pcloud.common.entity.BaseEntity
;
import
lombok.Data
;
/**
* @描述:
*
* @作者:songx
* @创建时间:2016年12月30日,上午11:44:11 @版本:1.0
*/
@Data
public
class
BookAdviser
extends
BaseEntity
{
/**
...
...
@@ -109,180 +112,8 @@ public class BookAdviser extends BaseEntity {
private
Long
purLabelId
;
private
Integer
isOpenRobotProcess
;
public
Integer
getIsOpenRobotProcess
()
{
return
isOpenRobotProcess
;
}
public
void
setIsOpenRobotProcess
(
Integer
isOpenRobotProcess
)
{
this
.
isOpenRobotProcess
=
isOpenRobotProcess
;
}
public
Long
getTempletId
()
{
return
templetId
;
}
public
void
setTempletId
(
Long
templetId
)
{
this
.
templetId
=
templetId
;
}
public
Long
getBookAdviserId
()
{
return
bookAdviserId
;
}
public
void
setBookAdviserId
(
Long
bookAdviserId
)
{
this
.
bookAdviserId
=
bookAdviserId
;
}
public
Long
getBookId
()
{
return
bookId
;
}
public
void
setBookId
(
Long
bookId
)
{
this
.
bookId
=
bookId
;
}
public
Long
getAdviserId
()
{
return
adviserId
;
}
public
void
setAdviserId
(
Long
adviserId
)
{
this
.
adviserId
=
adviserId
;
}
public
Long
getChannelId
()
{
return
channelId
;
}
public
void
setChannelId
(
Long
channelId
)
{
this
.
channelId
=
channelId
;
}
public
Long
getCreatedUser
()
{
return
createdUser
;
}
public
void
setCreatedUser
(
Long
createdUser
)
{
this
.
createdUser
=
createdUser
;
}
public
String
getSerialNumber
()
{
return
serialNumber
;
}
public
void
setSerialNumber
(
String
serialNumber
)
{
this
.
serialNumber
=
serialNumber
;
}
public
Boolean
getIsMainEditor
()
{
return
isMainEditor
;
}
public
void
setIsMainEditor
(
Boolean
isMainEditor
)
{
this
.
isMainEditor
=
isMainEditor
;
}
public
Integer
getIsDelete
()
{
return
isDelete
;
}
public
void
setIsDelete
(
Integer
isDelete
)
{
this
.
isDelete
=
isDelete
;
}
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
;
}
public
Boolean
getIsPrint
()
{
return
isPrint
;
}
public
void
setIsPrint
(
Boolean
isPrint
)
{
this
.
isPrint
=
isPrint
;
}
public
Long
getProLabelId
()
{
return
proLabelId
;
}
public
void
setProLabelId
(
Long
proLabelId
)
{
this
.
proLabelId
=
proLabelId
;
}
public
Long
getDepLabelId
()
{
return
depLabelId
;
}
public
void
setDepLabelId
(
Long
depLabelId
)
{
this
.
depLabelId
=
depLabelId
;
}
public
Long
getPurLabelId
()
{
return
purLabelId
;
}
public
void
setPurLabelId
(
Long
purLabelId
)
{
this
.
purLabelId
=
purLabelId
;
}
@Override
public
String
toString
()
{
return
"BookAdviser{"
+
"bookAdviserId="
+
bookAdviserId
+
", bookId="
+
bookId
+
", adviserId="
+
adviserId
+
", channelId="
+
channelId
+
", templetId="
+
templetId
+
", createdUser="
+
createdUser
+
", serialNumber='"
+
serialNumber
+
'\''
+
", isMainEditor="
+
isMainEditor
+
", isDelete="
+
isDelete
+
", secondTempletId="
+
secondTempletId
+
", graLabelId="
+
graLabelId
+
", subLabelId="
+
subLabelId
+
", verLabelId="
+
verLabelId
+
", areaLabelId="
+
areaLabelId
+
", isPrint="
+
isPrint
+
", proLabelId="
+
proLabelId
+
", depLabelId="
+
depLabelId
+
", purLabelId="
+
purLabelId
+
'}'
;
}
/**
* 上下册标签id
*/
private
Long
volLabelId
;
}
pcloud-service-book/src/main/java/com/pcloud/book/applet/biz/impl/AppletGroupSearchRecordBizImpl.java
View file @
71da5cb9
...
...
@@ -157,6 +157,7 @@ public class AppletGroupSearchRecordBizImpl implements AppletGroupSearchRecordBi
baseTempletClassify
.
setSecondClassify
(
adviserDto
.
getSecondTempletId
());
baseTempletClassify
.
setGradeLabelId
(
adviserDto
.
getGraLabelId
());
baseTempletClassify
.
setSubjectLabelId
(
adviserDto
.
getSubLabelId
());
baseTempletClassify
.
setVolLabelId
(
adviserDto
.
getVolLabelId
());
rightsSettingBiz
.
setClassifyAndLabel
(
baseTempletClassify
);
}
List
<
GroupActivity4AppletDTO
>
tishBookSchoolList
=
new
ArrayList
<>();
...
...
pcloud-service-book/src/main/java/com/pcloud/book/book/biz/impl/BookAdviserBizImpl.java
View file @
71da5cb9
...
...
@@ -583,6 +583,7 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
bookAdviser
.
setProLabelId
(
book
.
getProLabelId
());
bookAdviser
.
setDepLabelId
(
book
.
getDepLabelId
());
bookAdviser
.
setPurLabelId
(
book
.
getPurLabelId
());
bookAdviser
.
setVolLabelId
(
book
.
getVolLabelId
());
bookAdviserDao
.
updateBookTemplet
(
bookAdviser
);
esBookAndAdviserBiz
.
updateBookAndAdviserToES
(
Collections
.
singletonList
(
bookAdviser
.
getBookId
()));
}
...
...
@@ -861,7 +862,7 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
BookAdviserDto
adviserDto
=
bookAdviserDao
.
getBase
(
bookId
,
channelId
,
adviserId
);
if
(
null
!=
adviserDto
){
RightsSettingDto
rightsSettingDto
=
rightsSettingBiz
.
getByLabel
(
adviserDto
.
getTempletId
(),
adviserDto
.
getSecondTempletId
(),
adviserDto
.
getGraLabelId
(),
adviserDto
.
getSubLabelId
());
adviserDto
.
getSecondTempletId
(),
adviserDto
.
getGraLabelId
(),
adviserDto
.
getSubLabelId
()
,
adviserDto
.
getVolLabelId
()
);
if
(
null
!=
rightsSettingDto
){
bookRightsSettingDTO
.
setRightsSettingDetail
(
rightsSettingDto
.
getDetail
());
bookRightsSettingDTO
.
setRightsSettingIntroduce
(
rightsSettingDto
.
getIntroduce
());
...
...
pcloud-service-book/src/main/java/com/pcloud/book/book/biz/impl/BookBizImpl.java
View file @
71da5cb9
...
...
@@ -1578,6 +1578,7 @@ public class BookBizImpl implements BookBiz {
bookAdviser
.
setProLabelId
(
book
.
getProLabelId
());
bookAdviser
.
setDepLabelId
(
book
.
getDepLabelId
());
bookAdviser
.
setPurLabelId
(
book
.
getPurLabelId
());
bookAdviser
.
setVolLabelId
(
book
.
getVolLabelId
());
if
(
book
.
getIsBookGroup
()!=
null
&&
book
.
getIsBookGroup
()){
bookAdviser
.
setIsOpenRobotProcess
(
1
);
}
else
{
...
...
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/biz/RightsSettingBiz.java
View file @
71da5cb9
...
...
@@ -25,7 +25,7 @@ public interface RightsSettingBiz {
PageBeanNew
<
RightsSettingDto
>
listRightsSettingPage
(
Integer
currentPage
,
Integer
numPerPage
,
RightsSetting
rightsSetting
);
RightsSettingDto
getByLabel
(
Long
firstClassify
,
Long
secondClassify
,
Long
gradeLabelId
,
Long
subjectLabelId
);
RightsSettingDto
getByLabel
(
Long
firstClassify
,
Long
secondClassify
,
Long
gradeLabelId
,
Long
subjectLabelId
,
Long
volLabelId
);
Integer
getUserCount
();
...
...
@@ -115,4 +115,12 @@ public interface RightsSettingBiz {
void
deleteRightsNowPic
(
Long
rightsNowPicId
);
RightsSettingDto
getReadType4Book
(
Long
wechatUserId
,
Long
bookId
,
Long
channelId
,
Long
adviserId
);
/**
* 增加上下册分类权益
* @author:zhuyajie
* @date:2020/5/20 19:09
* * @param null
*/
void
copyRightsSetting
(
List
<
Long
>
volLabelIds
);
}
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
View file @
71da5cb9
...
...
@@ -86,6 +86,7 @@ import com.pcloud.resourcecenter.product.dto.ProductDto;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
...
...
@@ -209,6 +210,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
if
(!
contain4K12
)
{
baseTempletClassify
.
setGradeLabelId
(
null
);
baseTempletClassify
.
setSubjectLabelId
(
null
);
baseTempletClassify
.
setVolLabelId
(
null
);
}
}
...
...
@@ -230,6 +232,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
paramMap
.
put
(
"secondClassify"
,
rightsSetting
.
getSecondClassify
());
paramMap
.
put
(
"gradeLabelId"
,
rightsSetting
.
getGradeLabelId
());
paramMap
.
put
(
"subjectLabelId"
,
rightsSetting
.
getSubjectLabelId
());
paramMap
.
put
(
"volLabelId"
,
rightsSetting
.
getVolLabelId
());
}
List
<
RightsSettingDto
>
list
=
rightsSettingDAO
.
listRightsSettingPage
(
paramMap
);
count
=
list
.
size
();
...
...
@@ -410,6 +413,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
if
(
null
!=
rightsSetting
.
getOnlineRightsSettingTitle
()
&&
null
==
rightsSetting
.
getOnlineRightsSettingTitle
().
getId
())
{
rightsSettingTitleMapper
.
deleteByRightSettingId
(
rightsSettingId
);
if
(!
ListUtils
.
isEmpty
(
rightsSettingTitles
))
{
rightsSettingTitles
.
forEach
(
rightsSettingTitle
->
{
rightsSettingTitle
.
setId
(
null
);});
rightsSettingTitleMapper
.
batchInsert
(
rightsSettingTitles
);
}
}
else
if
(!
ListUtils
.
isEmpty
(
rightsSettingTitles
))
{
...
...
@@ -1033,6 +1037,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
paramMap
.
put
(
"secondClassify"
,
rightsSetting
.
getSecondClassify
());
paramMap
.
put
(
"gradeLabelId"
,
rightsSetting
.
getGradeLabelId
());
paramMap
.
put
(
"subjectLabelId"
,
rightsSetting
.
getSubjectLabelId
());
paramMap
.
put
(
"volLabelId"
,
rightsSetting
.
getVolLabelId
());
rightsSettingDtoPageBeanNew
=
rightsSettingDAO
.
listPageNew
(
new
PageParam
(
currentPage
,
numPerPage
),
paramMap
,
"listRightsSettingPage"
);
}
if
(
null
!=
rightsSettingDtoPageBeanNew
&&
!
ListUtils
.
isEmpty
(
rightsSettingDtoPageBeanNew
.
getRecordList
()))
{
...
...
@@ -1095,7 +1100,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
}
@Override
public
RightsSettingDto
getByLabel
(
Long
firstClassify
,
Long
secondClassify
,
Long
gradeLabelId
,
Long
subjectLabelId
)
{
public
RightsSettingDto
getByLabel
(
Long
firstClassify
,
Long
secondClassify
,
Long
gradeLabelId
,
Long
subjectLabelId
,
Long
volLabelId
)
{
//医疗保健分类校验
if
(
ArrayUtils
.
contains
(
RightsSettingConstant
.
MEDICAL_INSURANCE_TEMPLET_ID
,
firstClassify
))
{
subjectLabelId
=
null
;
...
...
@@ -1110,8 +1115,9 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
secondClassify
=
null
;
subjectLabelId
=
null
;
gradeLabelId
=
null
;
volLabelId
=
null
;
}
RightsSettingDto
dto
=
rightsSettingDAO
.
getByLabel
(
firstClassify
,
secondClassify
,
gradeLabelId
,
subjectLabelId
);
RightsSettingDto
dto
=
rightsSettingDAO
.
getByLabel
(
firstClassify
,
secondClassify
,
gradeLabelId
,
subjectLabelId
,
volLabelId
);
return
dto
;
}
...
...
@@ -1170,7 +1176,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
//根据分类获取权益
BookAdviserDto
adviserDto
=
bookAdviserBiz
.
getBase
(
bookId
,
channelId
,
adviserId
);
if
(
null
!=
adviserDto
)
{
rightsSettingDto
=
getByLabel
(
adviserDto
.
getTempletId
(),
adviserDto
.
getSecondTempletId
(),
adviserDto
.
getGraLabelId
(),
adviserDto
.
getSubLabelId
());
rightsSettingDto
=
getByLabel
(
adviserDto
.
getTempletId
(),
adviserDto
.
getSecondTempletId
(),
adviserDto
.
getGraLabelId
(),
adviserDto
.
getSubLabelId
()
,
adviserDto
.
getVolLabelId
()
);
}
}
if
(
null
==
rightsSettingDto
)
{
...
...
@@ -1253,6 +1259,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
baseTempletClassify
.
setSecondClassify
(
bookAdviserDto
.
getSecondTempletId
());
baseTempletClassify
.
setGradeLabelId
(
bookAdviserDto
.
getGraLabelId
());
baseTempletClassify
.
setSubjectLabelId
(
bookAdviserDto
.
getSubLabelId
());
baseTempletClassify
.
setVolLabelId
(
bookAdviserDto
.
getVolLabelId
());
setClassifyAndLabel
(
baseTempletClassify
);
if
(
NumberUtil
.
isNumber
(
baseTempletClassify
.
getFirstClassify
())){
// 通过书刊分类拿群
...
...
@@ -1465,23 +1472,27 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
Long
secondClassify
=
rightsSetting
.
getSecondClassify
();
Long
gradeLabelId
=
rightsSetting
.
getGradeLabelId
();
Long
subjectLabelId
=
rightsSetting
.
getSubjectLabelId
();
Long
volLabelId
=
rightsSetting
.
getVolLabelId
();
if
(
rightsSetting
.
getRightsSettingType
()
==
2
)
{
//书刊权益,分类标签从编辑书刊取
BookAdviserDto
adviserDto
=
bookAdviserBiz
.
getOneMainBook
(
rightsSetting
.
getBookId
());
firstClassify
=
adviserDto
.
getTempletId
();
secondClassify
=
adviserDto
.
getSecondTempletId
();
gradeLabelId
=
adviserDto
.
getGraLabelId
();
subjectLabelId
=
adviserDto
.
getSubLabelId
();
volLabelId
=
adviserDto
.
getVolLabelId
();
}
BaseTempletClassify
classify
=
new
BaseTempletClassify
();
classify
.
setFirstClassify
(
firstClassify
);
classify
.
setSecondClassify
(
secondClassify
);
classify
.
setGradeLabelId
(
gradeLabelId
);
classify
.
setSubjectLabelId
(
subjectLabelId
);
classify
.
setVolLabelId
(
volLabelId
);
setClassifyAndLabel
(
classify
);
firstClassify
=
classify
.
getFirstClassify
();
secondClassify
=
classify
.
getSecondClassify
();
gradeLabelId
=
classify
.
getGradeLabelId
();
subjectLabelId
=
classify
.
getSubjectLabelId
();
volLabelId
=
classify
.
getVolLabelId
();
if
(
Objects
.
isNull
(
rightsClassifyId
))
{
fill
.
setFillServes
(
getAppletItems
(
firstClassify
,
secondClassify
,
gradeLabelId
,
subjectLabelId
,
1L
,
4
));
fill
.
setFillOnlineCourses
(
getAppletItems
(
firstClassify
,
secondClassify
,
gradeLabelId
,
subjectLabelId
,
2L
,
3
));
...
...
@@ -1617,7 +1628,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
BookAdviserDto
adviserDto
=
bookAdviserBiz
.
getBase
(
bookId
,
channelId
,
adviserId
);
if
(
null
!=
adviserDto
)
{
rightsSettingDto
=
getByLabel
(
adviserDto
.
getTempletId
(),
adviserDto
.
getSecondTempletId
(),
adviserDto
.
getGraLabelId
(),
adviserDto
.
getSubLabelId
());
adviserDto
.
getSubLabelId
()
,
adviserDto
.
getVolLabelId
()
);
if
(
null
==
rightsSettingDto
)
{
log
.
error
(
"该书没有匹配的分类权益,bookId="
+
bookId
);
return
new
RightsSettingDto
();
...
...
@@ -1753,6 +1764,51 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
public
RightsSettingDto
getRightSettingByBookId
(
Long
bookId
,
Long
adviserId
,
Long
channelId
){
//根据分类获取权益
BookAdviserDto
adviserDto
=
bookAdviserBiz
.
getBase
(
bookId
,
channelId
,
adviserId
);
return
getByLabel
(
adviserDto
.
getTempletId
(),
adviserDto
.
getSecondTempletId
(),
adviserDto
.
getGraLabelId
(),
adviserDto
.
getSubLabelId
());
return
getByLabel
(
adviserDto
.
getTempletId
(),
adviserDto
.
getSecondTempletId
(),
adviserDto
.
getGraLabelId
(),
adviserDto
.
getSubLabelId
()
,
adviserDto
.
getVolLabelId
()
);
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
copyRightsSetting
(
List
<
Long
>
volLabelIds
)
{
if
(
ListUtils
.
isEmpty
(
volLabelIds
)
||
volLabelIds
.
size
()>
5
){
return
;
}
//所有分类权益
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"rightsSettingType"
,
1
);
List
<
RightsSettingDto
>
list
=
rightsSettingDAO
.
listRightsSettingPage
(
map
);
if
(
ListUtils
.
isEmpty
(
list
)){
return
;
}
for
(
RightsSettingDto
rightsSettingDto
:
list
){
RightsSetting
base
=
this
.
getRightsSetting
(
rightsSettingDto
.
getId
());
RightsSetting
rightsSetting
=
new
RightsSetting
();
rightsSetting
.
setIntroduce
(
rightsSettingDto
.
getIntroduce
());
rightsSetting
.
setDetail
(
rightsSettingDto
.
getDetail
());
rightsSetting
.
setCount
(
rightsSettingDto
.
getCount
());
rightsSetting
.
setFirstClassify
(
rightsSettingDto
.
getFirstClassify
());
rightsSetting
.
setSecondClassify
(
rightsSettingDto
.
getSecondClassify
());
rightsSetting
.
setGradeLabelId
(
rightsSettingDto
.
getGradeLabelId
());
rightsSetting
.
setSubjectLabelId
(
rightsSettingDto
.
getSubjectLabelId
());
rightsSetting
.
setEnableGroupService
(
rightsSettingDto
.
getEnableGroupService
());
rightsSetting
.
setRightsSettingType
(
rightsSettingDto
.
getRightsSettingType
());
rightsSetting
.
setOnlineCourseOpen
(
rightsSettingDto
.
getOnlineCourseOpen
());
rightsSetting
.
setLearningToolOpen
(
rightsSettingDto
.
getLearningToolOpen
());
rightsSetting
.
setDrawNowOpen
(
rightsSettingDto
.
getDrawNowOpen
());
rightsSetting
.
setReadTypeTitle
(
rightsSettingDto
.
getReadTypeTitle
());
for
(
Long
volLabelId
:
volLabelIds
){
rightsSetting
.
setVolLabelId
(
volLabelId
);
if
(
existCheck
(
rightsSetting
)
>
0
)
{
continue
;
}
this
.
addRightsSetting
(
rightsSetting
);
Long
newId
=
rightsSetting
.
getId
();
//复制
base
.
setId
(
newId
);
base
.
setVolLabelId
(
volLabelId
);
this
.
updateRightsSetting
(
base
);
}
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/check/RightsSettingCheck.java
View file @
71da5cb9
...
...
@@ -134,7 +134,7 @@ public class RightsSettingCheck {
if
(
StringUtil
.
isEmpty
(
item
.
getServeType
()))
{
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"作品或应用类型为空!"
);
}
if
(
StringUtil
.
isEmpty
(
item
.
getLinkUrl
()))
{
if
(
(
"APP"
.
equals
(
item
.
getServeType
())
||
"PRODUCT"
.
equals
(
item
.
getServeType
()))
&&
StringUtil
.
isEmpty
(
item
.
getLinkUrl
()))
{
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"作品或应用链接为空!"
);
}
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/dao/RightsSettingDAO.java
View file @
71da5cb9
...
...
@@ -16,7 +16,7 @@ public interface RightsSettingDAO extends BaseDao<RightsSetting> {
int
updateByPrimaryKey
(
RightsSetting
record
);
RightsSettingDto
getByLabel
(
Long
firstClassify
,
Long
secondClassify
,
Long
gradeLabelId
,
Long
subjectLabelId
);
RightsSettingDto
getByLabel
(
Long
firstClassify
,
Long
secondClassify
,
Long
gradeLabelId
,
Long
subjectLabelId
,
Long
volLabelId
);
RightsSettingDto
getByBookId
(
Long
bookId
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/dao/impl/RightsSettingDAOImpl.java
View file @
71da5cb9
...
...
@@ -33,12 +33,13 @@ public class RightsSettingDAOImpl extends BaseDaoImpl<RightsSetting> implement
}
@Override
public
RightsSettingDto
getByLabel
(
Long
firstClassify
,
Long
secondClassify
,
Long
gradeLabelId
,
Long
subjectLabelId
)
{
public
RightsSettingDto
getByLabel
(
Long
firstClassify
,
Long
secondClassify
,
Long
gradeLabelId
,
Long
subjectLabelId
,
Long
volLabelId
)
{
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"firstClassify"
,
firstClassify
);
paramMap
.
put
(
"secondClassify"
,
secondClassify
);
paramMap
.
put
(
"gradeLabelId"
,
gradeLabelId
);
paramMap
.
put
(
"subjectLabelId"
,
subjectLabelId
);
paramMap
.
put
(
"volLabelId"
,
volLabelId
);
return
getSessionTemplate
().
selectOne
(
getStatement
(
"getByLabel"
),
paramMap
);
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/entity/BaseTempletClassify.java
View file @
71da5cb9
...
...
@@ -19,5 +19,6 @@ public class BaseTempletClassify extends BaseEntity {
private
Long
gradeLabelId
;
@ApiModelProperty
(
"科目标签id"
)
private
Long
subjectLabelId
;
@ApiModelProperty
(
"上下册标签id"
)
private
Long
volLabelId
;
}
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/entity/RightsSetting.java
View file @
71da5cb9
...
...
@@ -101,6 +101,11 @@ public class RightsSetting extends BaseTempletClassify {
@Valid
private
List
<
RightsReadType
>
rightsReadTypes
;
/**
* 上下册标签id
*/
private
Long
volLabelId
;
public
RightsSetting
()
{
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/facade/RightsSettingFacede.java
View file @
71da5cb9
...
...
@@ -11,6 +11,7 @@ import com.pcloud.book.rightsSetting.entity.RightsSettingItem;
import
com.pcloud.common.dto.ResponseDto
;
import
com.pcloud.common.page.PageBeanNew
;
import
com.pcloud.common.permission.PermissionException
;
import
com.pcloud.common.utils.ListUtils
;
import
com.pcloud.common.utils.SessionUtil
;
import
com.pcloud.common.utils.cookie.Cookie
;
import
com.pcloud.common.utils.string.StringUtil
;
...
...
@@ -78,7 +79,8 @@ public class RightsSettingFacede {
@RequestParam
(
value
=
"secondClassify"
,
required
=
false
)
Long
secondClassify
,
@RequestParam
(
value
=
"gradeLabelId"
,
required
=
false
)
Long
gradeLabelId
,
@RequestParam
(
value
=
"subjectLabelId"
,
required
=
false
)
Long
subjectLabelId
,
@RequestParam
(
value
=
"rightsSettingType"
,
required
=
false
,
defaultValue
=
"1"
)
Integer
rightsSettingType
,
@RequestParam
(
value
=
"bookQuery"
,
required
=
false
)
String
bookQuery
@RequestParam
(
value
=
"bookQuery"
,
required
=
false
)
String
bookQuery
,
@RequestParam
(
value
=
"volLabelId"
,
required
=
false
)
Long
volLabelId
)
throws
PermissionException
{
SessionUtil
.
getToken4Redis
(
token
);
...
...
@@ -89,6 +91,7 @@ public class RightsSettingFacede {
rightsSetting
.
setSubjectLabelId
(
subjectLabelId
);
rightsSetting
.
setRightsSettingType
(
rightsSettingType
);
rightsSetting
.
setBookQuery
(
bookQuery
);
rightsSetting
.
setVolLabelId
(
volLabelId
);
return
new
ResponseDto
<
PageBeanNew
<
RightsSettingDto
>>(
rightsSettingBiz
.
listRightsSettingPage
(
currentPage
,
numPerPage
,
rightsSetting
));
}
...
...
@@ -269,6 +272,13 @@ public class RightsSettingFacede {
return
new
ResponseDto
<>();
}
@ApiOperation
(
"增加上下册分类权益"
)
@PostMapping
(
"copyRightsSetting"
)
public
ResponseDto
<?>
copyRightsSetting
(
@RequestBody
List
<
Long
>
volLabelIds
){
rightsSettingBiz
.
copyRightsSetting
(
volLabelIds
);
return
new
ResponseDto
<>();
}
@ApiOperation
(
"获取当前图书的阅读方式"
)
@GetMapping
(
"getReadType4Book"
)
public
ResponseDto
<
RightsSettingDto
>
getReadType4Book
(
...
...
pcloud-service-book/src/main/java/com/pcloud/book/skill/biz/impl/PcloudGroupActivityBizImpl.java
View file @
71da5cb9
...
...
@@ -299,6 +299,7 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz {
baseTempletClassify
.
setSecondClassify
(
dto
.
getSecondTempletId
());
baseTempletClassify
.
setGradeLabelId
(
dto
.
getGraLabelId
());
baseTempletClassify
.
setSubjectLabelId
(
dto
.
getSubLabelId
());
baseTempletClassify
.
setVolLabelId
(
dto
.
getVolLabelId
());
rightsSettingBiz
.
setClassifyAndLabel
(
baseTempletClassify
);
GroupActivity4AppletDTO
groupActivity4AppletDTO
=
pcloudGroupActivityDao
.
getGroupActivity4Applet
(
baseTempletClassify
.
getFirstClassify
(),
baseTempletClassify
.
getSecondClassify
(),
baseTempletClassify
.
getGradeLabelId
(),
baseTempletClassify
.
getSubjectLabelId
());
...
...
pcloud-service-book/src/main/resources/mapper/book/Book.Mapper.xml
View file @
71da5cb9
...
...
@@ -66,6 +66,7 @@
<result
column=
"dep_label_id"
property=
"depLabelId"
jdbcType=
"BIGINT"
/>
<result
column=
"pur_label_id"
property=
"purLabelId"
jdbcType=
"BIGINT"
/>
<result
column=
"is_open_robot_process"
property=
"isOpenRobotProcess"
jdbcType=
"INTEGER"
/>
<result
column=
"vol_label_id"
property=
"volLabelId"
jdbcType=
"BIGINT"
/>
</resultMap>
<resultMap
id=
"bookListPageMap"
type=
"bookDto"
extends =
"bookMap"
>
...
...
@@ -296,8 +297,8 @@
B.PUBLISH_DATE, B.COVER_IMG, B.AD_IMG, B.DETAIL, B.`VERSION`,B.BOOK_PRICE,B.ISSN,B.SERIAL_NUMBER,BA.IS_MAIN_EDITOR,
IF(ISNULL(BF.BOOK_FUND_ID),0,1) IS_FUND_SUPPORT,START_TIME,END_TIME,BA.TEMPLET_ID,BA.SECOND_TEMPLET_ID,
BA.GRA_LABEL_ID,BA.SUB_LABEL_ID,BA.VER_LABEL_ID,BA.AREA_LABEL_ID, BA.IS_PRINT isPrint,
BA.pro_label_id, BA.dep_label_id,BA.pur_label_id,if(G.ID IS NULL, 0, 1) isBookGroup, G.id BOOK_GROUP_ID,G.join_group_type,
BA.is_open_robot_process
BA.pro_label_id, BA.dep_label_id,BA.pur_label_id,
BA.vol_label_id,
if(G.ID IS NULL, 0, 1) isBookGroup, G.id BOOK_GROUP_ID,G.join_group_type,
BA.is_open_robot_process
,BA.vol_label_id
FROM
BOOK_ADVISER BA
INNER JOIN
...
...
pcloud-service-book/src/main/resources/mapper/book/BookAdviser.Mapper.xml
View file @
71da5cb9
...
...
@@ -21,6 +21,7 @@
<result
column=
"VER_LABEL_ID"
property=
"verLabelId"
jdbcType=
"BIGINT"
/>
<result
column=
"AREA_LABEL_ID"
property=
"areaLabelId"
jdbcType=
"BIGINT"
/>
<result
column=
"is_open_robot_process"
property=
"isOpenRobotProcess"
jdbcType=
"BIT"
/>
<result
column=
"vol_label_id"
property=
"volLabelId"
jdbcType=
"BIGINT"
/>
</resultMap>
<resultMap
id=
"manageAdviserMap"
type=
"adviserManageDto"
>
...
...
@@ -40,14 +41,16 @@
<insert
id=
"insert"
parameterType=
"bookAdviser"
useGeneratedKeys=
"true"
keyProperty=
"bookAdviserId"
flushCache=
"true"
>
INSERT INTO BOOK_ADVISER (
BOOK_ID, ADVISER_ID, CHANNEL_ID, CREATED_USER, CREATED_DATE,IS_MAIN_EDITOR, TEMPLET_ID, SECOND_TEMPLET_ID,
GRA_LABEL_ID,SUB_LABEL_ID,VER_LABEL_ID,AREA_LABEL_ID,pro_label_id, dep_label_id,pur_label_id,is_open_robot_process
GRA_LABEL_ID,SUB_LABEL_ID,VER_LABEL_ID,AREA_LABEL_ID,pro_label_id, dep_label_id,pur_label_id,is_open_robot_process,
vol_label_id
)
VALUES (
#{bookId, jdbcType=VARCHAR}, #{adviserId, jdbcType=VARCHAR}, #{channelId, jdbcType=VARCHAR},
#{adviserId, jdbcType=BIGINT}, NOW(),#{isMainEditor, jdbcType=BIT},#{templetId, jdbcType=BIGINT},
#{secondTempletId, jdbcType=BIGINT},#{graLabelId, jdbcType=BIGINT},#{subLabelId, jdbcType=BIGINT},
#{verLabelId, jdbcType=BIGINT},#{areaLabelId, jdbcType=BIGINT},#{proLabelId,jdbcType=BIGINT},
#{depLabelId,jdbcType=BIGINT},#{purLabelId,jdbcType=BIGINT},#{isOpenRobotProcess,jdbcType=BIT}
#{depLabelId,jdbcType=BIGINT},#{purLabelId,jdbcType=BIGINT},#{isOpenRobotProcess,jdbcType=BIT},
#{volLabelId}
)
ON
DUPLICATE KEY UPDATE IS_DELETE = 0, IS_MAIN_EDITOR = #{isMainEditor, jdbcType=BIT}
...
...
@@ -121,7 +124,7 @@
SELECT
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,is_open_robot_process
GRA_LABEL_ID,SUB_LABEL_ID,VER_LABEL_ID,AREA_LABEL_ID,is_open_robot_process
,vol_label_id
FROM
BOOK_ADVISER
WHERE
...
...
@@ -410,6 +413,9 @@
<if
test=
"purLabelId!=null"
>
,pur_label_id = #{purLabelId, jdbcType=BIGINT}
</if>
<if
test=
"volLabelId!=null"
>
,vol_label_id = #{volLabelId, jdbcType=BIGINT}
</if>
, LAST_MODIFIED_DATE = NOW()
WHERE
BOOK_ID = #{bookId, jdbcType=BIGINT}
...
...
@@ -487,6 +493,9 @@
<if
test=
"purLabelId!=null"
>
,pur_label_id = #{purLabelId, jdbcType=BIGINT}
</if>
<if
test=
"volLabelId!=null"
>
,vol_label_id = #{volLabelId, jdbcType=BIGINT}
</if>
,LAST_MODIFIED_DATE = NOW()
WHERE
BOOK_ID = #{bookId, jdbcType=BIGINT}
...
...
@@ -647,7 +656,7 @@
SELECT
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
GRA_LABEL_ID,SUB_LABEL_ID,VER_LABEL_ID,AREA_LABEL_ID
,vol_label_id
FROM book_adviser
WHERE BOOK_ID=#{bookId}
AND IS_MAIN_EDITOR=1 AND IS_DELETE=0
...
...
pcloud-service-book/src/main/resources/mapper/rightssetting/RightsSettingMapper.xml
View file @
71da5cb9
...
...
@@ -19,6 +19,7 @@
<result
column=
"learning_tool_open"
property=
"learningToolOpen"
jdbcType=
"BOOLEAN"
/>
<result
column=
"draw_open"
property=
"drawNowOpen"
jdbcType=
"BOOLEAN"
/>
<result
column=
"read_type_title"
property=
"readTypeTitle"
jdbcType=
"VARCHAR"
/>
<result
column=
"vol_label_id"
property=
"volLabelId"
jdbcType=
"BIGINT"
/>
</resultMap>
<resultMap
id=
"DtoResultMap"
type=
"com.pcloud.book.rightsSetting.dto.RightsSettingDto"
>
...
...
@@ -40,11 +41,12 @@
<result
column=
"learning_tool_open"
property=
"learningToolOpen"
jdbcType=
"BOOLEAN"
/>
<result
column=
"draw_open"
property=
"drawNowOpen"
jdbcType=
"BOOLEAN"
/>
<result
column=
"read_type_title"
property=
"readTypeTitle"
jdbcType=
"VARCHAR"
/>
<result
column=
"vol_label_id"
property=
"volLabelId"
jdbcType=
"BIGINT"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, introduce, detail, count, first_classify, second_classify, grade_label_id, subject_label_id,
create_time, update_time, enable_group_service, rights_setting_type, book_id
,online_course_open,learning_tool_open,draw_open,read_type_title
,online_course_open,learning_tool_open,draw_open,read_type_title
, vol_label_id
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Long"
>
select
...
...
@@ -61,12 +63,12 @@
count, first_classify, second_classify,
grade_label_id, subject_label_id, create_time,
update_time, enable_group_service, rights_setting_type, book_id,
online_course_open,learning_tool_open,draw_open,read_type_title)
online_course_open,learning_tool_open,draw_open,read_type_title
, vol_label_id
)
values ( #{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}, #{enableGroupService}, #{rightsSettingType}, #{bookId},
#{onlineCourseOpen},#{learningToolOpen},#{drawNowOpen},#{readTypeTitle})
#{onlineCourseOpen},#{learningToolOpen},#{drawNowOpen},#{readTypeTitle}
, #{volLabelId}
)
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.pcloud.book.rightsSetting.entity.RightsSetting"
>
update rights_setting
...
...
@@ -116,6 +118,9 @@
<if
test=
"drawNowOpen != null"
>
draw_open = #{drawNowOpen}
</if>
<if
test=
"volLabelId != null"
>
vol_label_id = #{volLabelId,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
...
...
@@ -134,7 +139,8 @@
online_course_open = #{onlineCourseOpen},
learning_tool_open = #{learningToolOpen},
draw_open = #{drawNowOpen},
read_type_title = #{readTypeTitle}
read_type_title = #{readTypeTitle},
vol_label_id = #{volLabelId,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
...
...
@@ -165,6 +171,9 @@
<if
test=
"exceptId!=null"
>
and id != #{exceptId}
</if>
<if
test=
"volLabelId != null"
>
and vol_label_id = #{volLabelId}
</if>
</where>
order by create_time desc
</select>
...
...
@@ -172,7 +181,7 @@
<select
id=
"listBookRightsSettingPage"
parameterType=
"map"
resultMap=
"DtoResultMap"
>
select
r.id, r.introduce, r.detail, r.count, r.first_classify, r.second_classify, r.grade_label_id, r.subject_label_id,
r.create_time, r.update_time, r.enable_group_service, r.rights_setting_type, r.book_id, b.BOOK_NAME
r.create_time, r.update_time, r.enable_group_service, r.rights_setting_type, r.book_id, b.BOOK_NAME
, r.vol_label_id
from
rights_setting r LEFT JOIN book b ON r.book_id=b.BOOK_ID
WHERE
...
...
@@ -202,6 +211,9 @@
<if
test=
"subjectLabelId != null"
>
and subject_label_id = #{subjectLabelId}
</if>
<if
test=
"volLabelId != null"
>
and vol_label_id = #{volLabelId}
</if>
limit 1
</select>
...
...
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