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
451e7d99
Commit
451e7d99
authored
Dec 15, 2020
by
吴博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: [1004027] 书刊权益列表
parent
8346af1e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
357 additions
and
44 deletions
+357
-44
BookBizImpl.java
.../main/java/com/pcloud/book/book/biz/impl/BookBizImpl.java
+2
-1
RightsSettingBizImpl.java
...oud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
+0
-0
RightsSettingDAO.java
...a/com/pcloud/book/rightsSetting/dao/RightsSettingDAO.java
+2
-0
RightsSettingDAOImpl.java
...oud/book/rightsSetting/dao/impl/RightsSettingDAOImpl.java
+5
-0
RightsSettingDto.java
...a/com/pcloud/book/rightsSetting/dto/RightsSettingDto.java
+2
-10
RightsSetting.java
...a/com/pcloud/book/rightsSetting/entity/RightsSetting.java
+69
-0
RightsSettingBookRelation.java
.../book/rightsSetting/entity/RightsSettingBookRelation.java
+111
-0
RightsSettingFacede.java
...pcloud/book/rightsSetting/facade/RightsSettingFacede.java
+10
-3
Book.Mapper.xml
...rvice-book/src/main/resources/mapper/book/Book.Mapper.xml
+9
-1
RightsSettingBookRelationMapper.xml
.../mapper/rightssetting/RightsSettingBookRelationMapper.xml
+101
-20
RightsSettingMapper.xml
...in/resources/mapper/rightssetting/RightsSettingMapper.xml
+46
-9
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/book/biz/impl/BookBizImpl.java
View file @
451e7d99
...
@@ -2402,7 +2402,6 @@ public class BookBizImpl implements BookBiz {
...
@@ -2402,7 +2402,6 @@ public class BookBizImpl implements BookBiz {
}
}
}
}
});
});
}
}
@Override
@Override
...
@@ -2508,6 +2507,8 @@ public class BookBizImpl implements BookBiz {
...
@@ -2508,6 +2507,8 @@ public class BookBizImpl implements BookBiz {
}
}
PageBeanNew
<
BookDto
>
page
=
bookDao
.
listPageNew
(
new
PageParam
(
currentPage
,
numPerPage
),
map
,
"getAdviserBooks4Rights"
);
PageBeanNew
<
BookDto
>
page
=
bookDao
.
listPageNew
(
new
PageParam
(
currentPage
,
numPerPage
),
map
,
"getAdviserBooks4Rights"
);
fillBookInfo
(
page
.
getRecordList
());
fillBookInfo
(
page
.
getRecordList
());
bookSet
.
setProDepPurLabelNames
(
page
.
getRecordList
());
bookSet
.
setLabelNames
(
page
.
getRecordList
());
return
page
;
return
page
;
}
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
View file @
451e7d99
This diff is collapsed.
Click to expand it.
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/dao/RightsSettingDAO.java
View file @
451e7d99
...
@@ -33,4 +33,6 @@ public interface RightsSettingDAO extends BaseDao<RightsSetting> {
...
@@ -33,4 +33,6 @@ public interface RightsSettingDAO extends BaseDao<RightsSetting> {
void
batchUpdateShowState
(
RightsSettingShowStateDTO
rightsSettingShowStateDTO
);
void
batchUpdateShowState
(
RightsSettingShowStateDTO
rightsSettingShowStateDTO
);
Map
<
Long
,
RightsSettingDto
>
listByBookIds
(
List
<
Long
>
bookIds
);
Map
<
Long
,
RightsSettingDto
>
listByBookIds
(
List
<
Long
>
bookIds
);
void
updateUser
(
RightsSetting
rightsSetting
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/dao/impl/RightsSettingDAOImpl.java
View file @
451e7d99
...
@@ -86,4 +86,9 @@ public class RightsSettingDAOImpl extends BaseDaoImpl<RightsSetting> implement
...
@@ -86,4 +86,9 @@ public class RightsSettingDAOImpl extends BaseDaoImpl<RightsSetting> implement
public
Map
<
Long
,
RightsSettingDto
>
listByBookIds
(
List
<
Long
>
bookIds
)
{
public
Map
<
Long
,
RightsSettingDto
>
listByBookIds
(
List
<
Long
>
bookIds
)
{
return
getSessionTemplate
().
selectMap
(
getStatement
(
"listByBookIds"
),
bookIds
,
"bookId"
);
return
getSessionTemplate
().
selectMap
(
getStatement
(
"listByBookIds"
),
bookIds
,
"bookId"
);
}
}
@Override
public
void
updateUser
(
RightsSetting
rightsSetting
)
{
getSessionTemplate
().
update
(
getStatement
(
"updateUser"
),
rightsSetting
);
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/dto/RightsSettingDto.java
View file @
451e7d99
...
@@ -9,13 +9,6 @@ public class RightsSettingDto extends RightsSetting {
...
@@ -9,13 +9,6 @@ public class RightsSettingDto extends RightsSetting {
@ApiModelProperty
(
"权益编号"
)
@ApiModelProperty
(
"权益编号"
)
private
String
rightsNumber
;
private
String
rightsNumber
;
private
String
firstClassifyContent
;
private
String
secondClassifyContent
;
private
String
gradeLabelIdContent
;
private
String
subjectLabelIdContent
;
/**
/**
* 权益分类
* 权益分类
...
@@ -31,9 +24,8 @@ public class RightsSettingDto extends RightsSetting {
...
@@ -31,9 +24,8 @@ public class RightsSettingDto extends RightsSetting {
*/
*/
private
Integer
chooseReadType
;
private
Integer
chooseReadType
;
private
String
volLabelContent
;
private
String
verLabelContent
;
private
Long
agentId
;
private
Long
agentId
;
private
String
groupQrcodeUrl
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/entity/RightsSetting.java
View file @
451e7d99
...
@@ -159,6 +159,75 @@ public class RightsSetting extends BaseTempletClassify {
...
@@ -159,6 +159,75 @@ public class RightsSetting extends BaseTempletClassify {
@ApiModelProperty
(
"应用或作品跳转地址"
)
@ApiModelProperty
(
"应用或作品跳转地址"
)
private
String
guideLinkUrl
;
private
String
guideLinkUrl
;
@ApiModelProperty
(
"专业标签ID"
)
private
Long
proLabelId
;
@ApiModelProperty
(
"深度标签ID"
)
private
Long
depLabelId
;
@ApiModelProperty
(
"目的标签ID"
)
private
Long
purLabelId
;
@ApiModelProperty
(
"专业标签名称"
)
private
String
proLabelName
;
@ApiModelProperty
(
"深度标签名称"
)
private
String
depLabelName
;
@ApiModelProperty
(
"目的标签名称"
)
private
String
purLabelName
;
/**
* 年级标签
*/
private
String
graLabelName
;
/**
* 科目标签
*/
private
String
subLabelName
;
/**
* 版本标签
*/
private
String
verLabelName
;
/**
* 地域标签
*/
private
String
areaLabelName
;
/**
* 上下册标签
*/
private
String
volLabelName
;
/**
* 地域标签id
*/
private
Long
areaLabelId
;
private
String
firstClassifyContent
;
private
String
secondClassifyContent
;
private
String
gradeLabelIdContent
;
private
String
subjectLabelIdContent
;
private
String
volLabelContent
;
private
String
verLabelContent
;
private
String
areaLabelContent
;
private
Long
createUserId
;
private
Long
updateUserId
;
private
String
createUserName
;
private
String
updateUserName
;
public
RightsSetting
()
{
public
RightsSetting
()
{
}
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/entity/RightsSettingBookRelation.java
View file @
451e7d99
package
com
.
pcloud
.
book
.
rightsSetting
.
entity
;
package
com
.
pcloud
.
book
.
rightsSetting
.
entity
;
import
java.util.Date
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
@Data
@Data
...
@@ -9,10 +12,20 @@ public class RightsSettingBookRelation {
...
@@ -9,10 +12,20 @@ public class RightsSettingBookRelation {
private
Long
rightsSettingId
;
private
Long
rightsSettingId
;
private
Long
bookAdviserId
;
private
Long
bookId
;
private
Long
bookId
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
createTime
;
private
Date
createTime
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
updateTime
;
private
Date
updateTime
;
private
String
bookName
;
private
String
bookName
;
...
@@ -22,4 +35,101 @@ public class RightsSettingBookRelation {
...
@@ -22,4 +35,101 @@ public class RightsSettingBookRelation {
private
String
adviserName
;
private
String
adviserName
;
private
String
isbn
;
private
String
isbn
;
private
Long
channelId
;
private
Long
agentId
;
private
String
agentName
;
private
String
coverImg
;
/**
* 模板标识
*/
private
Long
templetId
;
/**
* 模板名称
*/
private
String
templetName
;
/**
* 第二级类型
*/
private
Long
secondTempletId
;
/**
* 第二类型名称
*/
private
String
secondTempletName
;
/**
* 年级标签id
*/
private
Long
graLabelId
;
/**
* 科目标签id
*/
private
Long
subLabelId
;
/**
* 版本标签id
*/
private
Long
verLabelId
;
/**
* 地域标签id
*/
private
Long
areaLabelId
;
/**
* 上下册标签id
*/
private
Long
volLabelId
;
/**
* 年级标签
*/
private
String
graLabelName
;
/**
* 科目标签
*/
private
String
subLabelName
;
/**
* 版本标签
*/
private
String
verLabelName
;
/**
* 地域标签
*/
private
String
areaLabelName
;
/**
* 上下册标签
*/
private
String
volLabelName
;
@ApiModelProperty
(
"专业标签ID"
)
private
Long
proLabelId
;
@ApiModelProperty
(
"深度标签ID"
)
private
Long
depLabelId
;
@ApiModelProperty
(
"目的标签ID"
)
private
Long
purLabelId
;
@ApiModelProperty
(
"专业标签名称"
)
private
String
proLabelName
;
@ApiModelProperty
(
"深度标签名称"
)
private
String
depLabelName
;
@ApiModelProperty
(
"目的标签名称"
)
private
String
purLabelName
;
private
String
groupQrcodeUrl
;
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/facade/RightsSettingFacede.java
View file @
451e7d99
...
@@ -51,6 +51,8 @@ public class RightsSettingFacede {
...
@@ -51,6 +51,8 @@ public class RightsSettingFacede {
Map
<
String
,
Object
>
map
=
SessionUtil
.
getToken4Redis
(
token
);
Map
<
String
,
Object
>
map
=
SessionUtil
.
getToken4Redis
(
token
);
Long
agentId
=
(
Long
)
map
.
get
(
SessionUtil
.
RAY_AGENT_ID
);
Long
agentId
=
(
Long
)
map
.
get
(
SessionUtil
.
RAY_AGENT_ID
);
rightsSetting
.
setAgentId
(
agentId
==
null
?
0L
:
agentId
);
rightsSetting
.
setAgentId
(
agentId
==
null
?
0L
:
agentId
);
Long
userId
=
(
Long
)
map
.
get
(
SessionUtil
.
USER_ID
);
rightsSetting
.
setCreateUserId
(
userId
);
return
new
ResponseDto
<
Long
>(
rightsSettingBiz
.
addRightsSetting
(
rightsSetting
));
return
new
ResponseDto
<
Long
>(
rightsSettingBiz
.
addRightsSetting
(
rightsSetting
));
}
}
...
@@ -64,7 +66,9 @@ public class RightsSettingFacede {
...
@@ -64,7 +66,9 @@ public class RightsSettingFacede {
@PostMapping
(
"updateRightsSetting"
)
@PostMapping
(
"updateRightsSetting"
)
public
ResponseDto
<?>
updateRightsSetting
(
@RequestHeader
(
"token"
)
String
token
,
public
ResponseDto
<?>
updateRightsSetting
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
@Validated
RightsSetting
rightsSetting
)
throws
PermissionException
{
@RequestBody
@Validated
RightsSetting
rightsSetting
)
throws
PermissionException
{
SessionUtil
.
getToken4Redis
(
token
);
Map
<
String
,
Object
>
map
=
SessionUtil
.
getToken4Redis
(
token
);
Long
userId
=
(
Long
)
map
.
get
(
SessionUtil
.
USER_ID
);
rightsSetting
.
setUpdateUserId
(
userId
);
rightsSettingBiz
.
updateRightsSetting
(
rightsSetting
);
rightsSettingBiz
.
updateRightsSetting
(
rightsSetting
);
return
new
ResponseDto
<>();
return
new
ResponseDto
<>();
}
}
...
@@ -87,11 +91,14 @@ public class RightsSettingFacede {
...
@@ -87,11 +91,14 @@ public class RightsSettingFacede {
@RequestParam
(
value
=
"subjectLabelId"
,
required
=
false
)
Long
subjectLabelId
,
@RequestParam
(
value
=
"rightsSettingType"
,
required
=
false
,
defaultValue
=
"1"
)
Integer
rightsSettingType
,
@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
,
@RequestParam
(
value
=
"volLabelId"
,
required
=
false
)
Long
volLabelId
,
@RequestParam
(
value
=
"verLabelId"
,
required
=
false
)
Long
verLabelId
@RequestParam
(
value
=
"verLabelId"
,
required
=
false
)
Long
verLabelId
,
@RequestParam
(
value
=
"agentId"
,
required
=
false
)
Long
agentId
)
throws
PermissionException
{
)
throws
PermissionException
{
Map
<
String
,
Object
>
map
=
SessionUtil
.
getToken4Redis
(
token
);
Map
<
String
,
Object
>
map
=
SessionUtil
.
getToken4Redis
(
token
);
Long
agentId
=
(
Long
)
map
.
get
(
SessionUtil
.
RAY_AGENT_ID
);
if
(
null
==
agentId
)
{
agentId
=
(
Long
)
map
.
get
(
SessionUtil
.
RAY_AGENT_ID
);
}
RightsSetting
rightsSetting
=
new
RightsSetting
();
RightsSetting
rightsSetting
=
new
RightsSetting
();
rightsSetting
.
setFirstClassify
(
firstClassify
);
rightsSetting
.
setFirstClassify
(
firstClassify
);
rightsSetting
.
setSecondClassify
(
secondClassify
);
rightsSetting
.
setSecondClassify
(
secondClassify
);
...
...
pcloud-service-book/src/main/resources/mapper/book/Book.Mapper.xml
View file @
451e7d99
...
@@ -2461,7 +2461,15 @@
...
@@ -2461,7 +2461,15 @@
SELECT
SELECT
A.BOOK_ID, A.CHANNEL_ID, A.ADVISER_ID, A.IS_MAIN_EDITOR, T.TYPE_CODE, T.TYPE_NAME, B.ISBN, B.BOOK_NAME, B.REMARK,
A.BOOK_ID, A.CHANNEL_ID, A.ADVISER_ID, A.IS_MAIN_EDITOR, T.TYPE_CODE, T.TYPE_NAME, B.ISBN, B.BOOK_NAME, B.REMARK,
B.AUTHOR, B.PUBLISH, B.PUBLISH_DATE, B.COVER_IMG, B.ORIGIN_NAME, B.BOOK_PRICE, B.ISSN, B.BOOK_NUM, B.SERIAL_NUMBER,
B.AUTHOR, B.PUBLISH, B.PUBLISH_DATE, B.COVER_IMG, B.ORIGIN_NAME, B.BOOK_PRICE, B.ISSN, B.BOOK_NUM, B.SERIAL_NUMBER,
A.TEMPLET_ID,A.SECOND_TEMPLET_ID,A.LAST_MODIFIED_DATE LAST_MODIFIED_DATE,A.BOOK_ADVISER_ID,CONCAT('BK',A.BOOK_ID) uniqueNumber
A.TEMPLET_ID,A.SECOND_TEMPLET_ID,A.LAST_MODIFIED_DATE LAST_MODIFIED_DATE,A.BOOK_ADVISER_ID,CONCAT('BK',A.BOOK_ID) uniqueNumber,
A.GRA_LABEL_ID,
A.SUB_LABEL_ID,
A.VER_LABEL_ID,
A.AREA_LABEL_ID,
A.pro_label_id,
A.dep_label_id,
A.pur_label_id,
A.vol_label_id
FROM
FROM
BOOK_ADVISER A
BOOK_ADVISER A
INNER JOIN BOOK B ON A.BOOK_ID = B.BOOK_ID AND A.IS_DELETE = 0 AND B.IS_DELETE = 0
INNER JOIN BOOK B ON A.BOOK_ID = B.BOOK_ID AND A.IS_DELETE = 0 AND B.IS_DELETE = 0
...
...
pcloud-service-book/src/main/resources/mapper/rightssetting/RightsSettingBookRelationMapper.xml
View file @
451e7d99
<?xml version="1.0" encoding="UTF-8" ?>
<?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" >
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.pcloud.book.rightsSetting.mapper.RightsSettingBookRelationMapper"
>
<mapper
namespace=
"com.pcloud.book.rightsSetting.mapper.RightsSettingBookRelationMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.pcloud.book.rightsSetting.entity.RightsSettingBookRelation"
>
<id
column=
"id"
property=
"id"
jdbcType=
"BIGINT"
/>
<resultMap
id=
"BaseResultMap"
type=
"com.pcloud.book.rightsSetting.entity.RightsSettingBookRelation"
>
<result
column=
"rights_setting_id"
property=
"rightsSettingId"
jdbcType=
"BIGINT"
/>
<id
column=
"id"
property=
"id"
jdbcType=
"BIGINT"
/>
<result
column=
"book_id"
property=
"bookId"
jdbcType=
"BIGINT"
/>
<result
column=
"rights_setting_id"
property=
"rightsSettingId"
jdbcType=
"BIGINT"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"book_adviser_id"
property=
"bookAdviserId"
jdbcType=
"BIGINT"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"book_id"
property=
"bookId"
jdbcType=
"BIGINT"
/>
<result
column=
"book_name"
property=
"bookName"
jdbcType=
"VARCHAR"
/>
<result
column=
"adviser_id"
property=
"adviserId"
jdbcType=
"BIGINT"
/>
<result
column=
"adviser_id"
property=
"adviserId"
jdbcType=
"BIGINT"
/>
<result
column=
"channel_id"
property=
"channelId"
jdbcType=
"BIGINT"
/>
<result
column=
"agent_id"
property=
"agentId"
jdbcType=
"BIGINT"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"book_name"
property=
"bookName"
jdbcType=
"VARCHAR"
/>
<result
column=
"TEMPLET_ID"
property=
"templetId"
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"
/>
<result
column=
"vol_label_id"
property=
"volLabelId"
jdbcType=
"INTEGER"
/>
<result
column=
"group_qrcode_url"
property=
"groupQrcodeUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"COVER_IMG"
property=
"coverImg"
jdbcType=
"VARCHAR"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, rights_setting_id, book_id, create_time, update_time, adviser_id
<sql
id=
"Base_Column_List"
>
</sql>
id, rights_setting_id, book_adviser_id, book_id, adviser_id, channel_id, agent_id, create_time, update_time
</sql>
<sql
id=
"Base_Column_List_owm"
>
<sql
id=
"Base_Column_List_owm"
>
r.id, r.rights_setting_id, r.book_id, r.create_time, r.update_time
r.id,
r.rights_setting_id,
r.book_adviser_id,
r.book_id,
r.channel_id,
r.agent_id,
r.create_time,
r.update_time
</sql>
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Long"
>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Long"
>
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from rights_setting_book_relation
from rights_setting_book_relation
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</select>
</select>
<select
id=
"selectByRithsSettingId"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByRithsSettingId"
resultMap=
"BaseResultMap"
>
select
select
r.id, r.rights_setting_id, r.book_id, r.create_time, r.update_time, ifnull(r.adviser_id, b.adviser_id) adviser_id
<include
refid=
"Base_Column_List_owm"
/>
,b.book_name, b.isbn, ifnull(r.adviser_id,a.adviser_id) adviser_id,
c.group_qrcode_url,
a.TEMPLET_ID,
a.SECOND_TEMPLET_ID,
a.GRA_LABEL_ID,
a.SUB_LABEL_ID,
a.VER_LABEL_ID,
a.AREA_LABEL_ID,
a.vol_label_id,
c.group_qrcode_url,
b.isbn,
b.COVER_IMG
from rights_setting_book_relation r
from rights_setting_book_relation r
left join book_adviser b on r.book_id = b.book_id AND b.IS_DELETE=0
left join book b on r.book_id = b.book_Id
where rights_setting_id = #{rightsSettingId,jdbcType=BIGINT}
INNER JOIN book_adviser a ON b.BOOK_ID=a.BOOK_ID AND a.IS_DELETE=0
left join book_group c on a.book_id = c.book_id and a.channel_id = c.channel_id and c.is_delete = 0
where rights_setting_id = #{rightsSettingId}
group by r.book_id
group by r.book_id
</select>
</select>
<select
id=
"getAllBookIds"
resultType=
"java.lang.Long"
>
<select
id=
"getAllBookIds"
resultType=
"java.lang.Long"
>
select book_id
select book_id
from
from
rights_setting_book_relation
rights_setting_book_relation
</select>
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from rights_setting_book_relation
delete from rights_setting_book_relation
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</delete>
</delete>
<delete
id=
"deleteByRightsSettingId"
parameterType=
"long"
>
<delete
id=
"deleteByRightsSettingId"
parameterType=
"long"
>
delete from rights_setting_book_relation
delete from rights_setting_book_relation
where rights_setting_id = #{rightsSettingId,jdbcType=BIGINT}
where rights_setting_id = #{rightsSettingId,jdbcType=BIGINT}
</delete>
</delete>
<insert
id=
"insert"
parameterType=
"com.pcloud.book.rightsSetting.entity.RightsSettingBookRelation"
>
<insert
id=
"insert"
parameterType=
"com.pcloud.book.rightsSetting.entity.RightsSettingBookRelation"
>
insert into rights_setting_book_relation (id, rights_setting_id, book_id,
insert into rights_setting_book_relation (id, rights_setting_id, book_id,
create_time, update_time)
create_time, update_time)
values (#{id,jdbcType=BIGINT}, #{rightsSettingId,jdbcType=BIGINT}, #{bookId,jdbcType=BIGINT},
values (#{id,jdbcType=BIGINT}, #{rightsSettingId,jdbcType=BIGINT}, #{bookId,jdbcType=BIGINT},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.pcloud.book.rightsSetting.entity.RightsSettingBookRelation"
>
<insert
id=
"insertSelective"
parameterType=
"com.pcloud.book.rightsSetting.entity.RightsSettingBookRelation"
>
insert into rights_setting_book_relation
insert into rights_setting_book_relation
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
...
@@ -86,15 +134,33 @@
...
@@ -86,15 +134,33 @@
</if>
</if>
</trim>
</trim>
</insert>
</insert>
<insert
id=
"batchInsert"
parameterType=
"com.pcloud.book.rightsSetting.entity.RightsSettingBookRelation"
>
<insert
id=
"batchInsert"
parameterType=
"com.pcloud.book.rightsSetting.entity.RightsSettingBookRelation"
>
insert into rights_setting_book_relation (rights_setting_id, book_id,
insert into rights_setting_book_relation (
create_time, update_time, adviser_id)
`rights_setting_id`,
`book_adviser_id`,
`book_id`,
`adviser_id`,
`channel_id`,
`agent_id`,
`create_time`,
`update_time`
)
values
values
<foreach
collection=
"list"
index=
"index"
item=
"item"
separator=
","
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
separator=
","
>
(#{item.rightsSettingId,jdbcType=BIGINT}, #{item.bookId,jdbcType=BIGINT},
(#{item.rightsSettingId,jdbcType=BIGINT},
now(),now(), #{item.adviserId})
#{item.bookAdviserId,jdbcType=BIGINT},
#{item.bookId,jdbcType=BIGINT},
#{item.adviserId,jdbcType=BIGINT},
#{item.channelId,jdbcType=BIGINT},
#{item.agentId,jdbcType=BIGINT},
now(),
now()
)
</foreach>
</foreach>
</insert>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.pcloud.book.rightsSetting.entity.RightsSettingBookRelation"
>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.pcloud.book.rightsSetting.entity.RightsSettingBookRelation"
>
update rights_setting_book_relation
update rights_setting_book_relation
<set
>
<set
>
...
@@ -113,6 +179,8 @@
...
@@ -113,6 +179,8 @@
</set>
</set>
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.pcloud.book.rightsSetting.entity.RightsSettingBookRelation"
>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.pcloud.book.rightsSetting.entity.RightsSettingBookRelation"
>
update rights_setting_book_relation
update rights_setting_book_relation
set rights_setting_id = #{rightsSettingId,jdbcType=BIGINT},
set rights_setting_id = #{rightsSettingId,jdbcType=BIGINT},
...
@@ -121,12 +189,25 @@
...
@@ -121,12 +189,25 @@
update_time = #{updateTime,jdbcType=TIMESTAMP}
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</update>
<select
id=
"selectBookByRithsSettingId"
resultMap=
"BaseResultMap"
>
<select
id=
"selectBookByRithsSettingId"
resultMap=
"BaseResultMap"
>
select
select
<include
refid=
"Base_Column_List_owm"
/>
,b.book_name, b.isbn, ifnull(r.adviser_id,a.adviser_id) adviser_id
<include
refid=
"Base_Column_List_owm"
/>
,b.book_name, b.isbn, ifnull(r.adviser_id,a.adviser_id) adviser_id,
c.group_qrcode_url,
a.TEMPLET_ID,
a.SECOND_TEMPLET_ID,
a.GRA_LABEL_ID,
a.SUB_LABEL_ID,
a.VER_LABEL_ID,
a.AREA_LABEL_ID,
a.vol_label_id,
c.group_qrcode_url,
b.isbn,
b.COVER_IMG
from rights_setting_book_relation r
from rights_setting_book_relation r
left join book b on r.book_id = b.book_Id
left join book b on r.book_id = b.book_Id
INNER JOIN book_adviser a ON b.BOOK_ID=a.BOOK_ID AND a.IS_DELETE=0
INNER JOIN book_adviser a ON b.BOOK_ID=a.BOOK_ID AND a.IS_DELETE=0
left join book_group c on a.book_id = c.book_id and a.channel_id = c.channel_id and c.is_delete = 0
where rights_setting_id = #{_parameter}
where rights_setting_id = #{_parameter}
group by r.book_id
group by r.book_id
</select>
</select>
...
...
pcloud-service-book/src/main/resources/mapper/rightssetting/RightsSettingMapper.xml
View file @
451e7d99
...
@@ -30,6 +30,8 @@
...
@@ -30,6 +30,8 @@
<result
column=
"show_state"
property=
"showState"
jdbcType=
"BOOLEAN"
/>
<result
column=
"show_state"
property=
"showState"
jdbcType=
"BOOLEAN"
/>
<result
column=
"agent_id"
property=
"agentId"
jdbcType=
"BIGINT"
/>
<result
column=
"agent_id"
property=
"agentId"
jdbcType=
"BIGINT"
/>
<result
column=
"guide_link_url"
property=
"guideLinkUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"guide_link_url"
property=
"guideLinkUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"create_user_id"
property=
"createUserId"
jdbcType=
"BIGINT"
/>
<result
column=
"update_user_id"
property=
"updateUserId"
jdbcType=
"BIGINT"
/>
</resultMap>
</resultMap>
<resultMap
id=
"DtoResultMap"
type=
"com.pcloud.book.rightsSetting.dto.RightsSettingDto"
>
<resultMap
id=
"DtoResultMap"
type=
"com.pcloud.book.rightsSetting.dto.RightsSettingDto"
>
...
@@ -56,6 +58,9 @@
...
@@ -56,6 +58,9 @@
<result
column=
"ver_label_id"
property=
"verLabelId"
jdbcType=
"BIGINT"
/>
<result
column=
"ver_label_id"
property=
"verLabelId"
jdbcType=
"BIGINT"
/>
<result
column=
"show_state"
property=
"showState"
jdbcType=
"BOOLEAN"
/>
<result
column=
"show_state"
property=
"showState"
jdbcType=
"BOOLEAN"
/>
<result
column=
"agent_id"
property=
"agentId"
jdbcType=
"BIGINT"
/>
<result
column=
"agent_id"
property=
"agentId"
jdbcType=
"BIGINT"
/>
<result
column=
"create_user_id"
property=
"createUserId"
jdbcType=
"BIGINT"
/>
<result
column=
"update_user_id"
property=
"updateUserId"
jdbcType=
"BIGINT"
/>
<result
column=
"group_qrcode_url"
property=
"groupQrcodeUrl"
jdbcType=
"VARCHAR"
/>
</resultMap>
</resultMap>
<resultMap
id=
"DtoResultMap4Book"
type=
"com.pcloud.book.rightsSetting.dto.RightsSettingDto"
extends=
"DtoResultMap"
>
<resultMap
id=
"DtoResultMap4Book"
type=
"com.pcloud.book.rightsSetting.dto.RightsSettingDto"
extends=
"DtoResultMap"
>
...
@@ -67,19 +72,21 @@
...
@@ -67,19 +72,21 @@
id,rights_number, introduce, detail, count, first_classify, second_classify, grade_label_id, subject_label_id,
id,rights_number, 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
create_time, update_time, enable_group_service, rights_setting_type, book_id
,online_course_open,learning_tool_open,draw_open,read_type_title, vol_label_id,
,online_course_open,learning_tool_open,draw_open,read_type_title, vol_label_id,
reading_guide,guide_title,guide_type,guide_id,guide_pic,ver_label_id, show_state, agent_id, guide_link_url
reading_guide,guide_title,guide_type,guide_id,guide_pic,ver_label_id, show_state, agent_id, guide_link_url,
create_user_id, update_user_id
</sql>
</sql>
<sql
id=
"Base_Column_List_own"
>
<sql
id=
"Base_Column_List_own"
>
r.id,r.rights_number, r.introduce, r.detail, r.count, r.first_classify, r.second_classify, r.grade_label_id, r.subject_label_id,
r.id,r.rights_number, 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
r.create_time, r.update_time, r.enable_group_service, r.rights_setting_type, r.book_id
,r.online_course_open,r.learning_tool_open,r.draw_open,r.read_type_title,r.vol_label_id,r.ver_label_id, r.show_state
,r.online_course_open,r.learning_tool_open,r.draw_open,r.read_type_title,r.vol_label_id,r.ver_label_id, r.show_state,
r.update_user_id, r.update_user_id
</sql>
</sql>
<sql
id=
"Base_Column_List_1"
>
<sql
id=
"Base_Column_List_1"
>
r.id,r.rights_number, r.introduce, r.detail, r.count, r.first_classify, r.second_classify, r.grade_label_id, r.subject_label_id,
r.id,r.rights_number, 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, b.book_id
r.create_time, r.update_time, r.enable_group_service, r.rights_setting_type, b.book_id
,r.online_course_open,r.learning_tool_open,r.draw_open,r.read_type_title,r.vol_label_id,r.ver_label_id
,r.online_course_open,r.learning_tool_open,r.draw_open,r.read_type_title,r.vol_label_id,r.ver_label_id
, r.update_user_id, r.update_user_id
</sql>
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Long"
>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Long"
>
...
@@ -98,13 +105,13 @@
...
@@ -98,13 +105,13 @@
grade_label_id, subject_label_id, create_time,
grade_label_id, subject_label_id, create_time,
update_time, enable_group_service, rights_setting_type, book_id,
update_time, enable_group_service, rights_setting_type, book_id,
online_course_open,learning_tool_open,draw_open,read_type_title, vol_label_id,
online_course_open,learning_tool_open,draw_open,read_type_title, vol_label_id,
reading_guide,guide_title,guide_type,guide_id,guide_pic,ver_label_id, agent_id, guide_link_url)
reading_guide,guide_title,guide_type,guide_id,guide_pic,ver_label_id, agent_id, guide_link_url
,create_user_id
)
values ( #{rightsNumber,jdbcType=VARCHAR}, #{introduce,jdbcType=VARCHAR}, #{detail,jdbcType=VARCHAR},
values ( #{rightsNumber,jdbcType=VARCHAR}, #{introduce,jdbcType=VARCHAR}, #{detail,jdbcType=VARCHAR},
#{count,jdbcType=INTEGER}, #{firstClassify,jdbcType=BIGINT}, #{secondClassify,jdbcType=BIGINT},
#{count,jdbcType=INTEGER}, #{firstClassify,jdbcType=BIGINT}, #{secondClassify,jdbcType=BIGINT},
#{gradeLabelId,jdbcType=BIGINT}, #{subjectLabelId,jdbcType=BIGINT}, now(),
#{gradeLabelId,jdbcType=BIGINT}, #{subjectLabelId,jdbcType=BIGINT}, now(),
#{updateTime,jdbcType=TIMESTAMP}
, #{enableGroupService}, #{rightsSettingType}, #{bookId},
now()
, #{enableGroupService}, #{rightsSettingType}, #{bookId},
#{onlineCourseOpen},#{learningToolOpen},#{drawNowOpen},#{readTypeTitle}, #{volLabelId},
#{onlineCourseOpen},#{learningToolOpen},#{drawNowOpen},#{readTypeTitle}, #{volLabelId},
#{guideIsOpen},#{guideTitle},#{guideType},#{guideId},#{guidePic}, #{verLabelId}, #{agentId}, #{guideLinkUrl})
#{guideIsOpen},#{guideTitle},#{guideType},#{guideId},#{guidePic}, #{verLabelId}, #{agentId}, #{guideLinkUrl}
, #{createUserId}
)
</insert>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.pcloud.book.rightsSetting.entity.RightsSetting"
>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.pcloud.book.rightsSetting.entity.RightsSetting"
>
update rights_setting
update rights_setting
...
@@ -199,7 +206,7 @@
...
@@ -199,7 +206,7 @@
second_classify = #{secondClassify,jdbcType=BIGINT},
second_classify = #{secondClassify,jdbcType=BIGINT},
grade_label_id = #{gradeLabelId,jdbcType=BIGINT},
grade_label_id = #{gradeLabelId,jdbcType=BIGINT},
subject_label_id = #{subjectLabelId,jdbcType=BIGINT},
subject_label_id = #{subjectLabelId,jdbcType=BIGINT},
update_time =
#{updateTime,jdbcType=TIMESTAMP}
,
update_time =
now()
,
enable_group_service = #{enableGroupService},
enable_group_service = #{enableGroupService},
book_id = #{bookId},
book_id = #{bookId},
online_course_open = #{onlineCourseOpen},
online_course_open = #{onlineCourseOpen},
...
@@ -213,7 +220,8 @@
...
@@ -213,7 +220,8 @@
guide_id = #{guideId,jdbcType=BIGINT},
guide_id = #{guideId,jdbcType=BIGINT},
guide_pic = #{guidePic,jdbcType=VARCHAR},
guide_pic = #{guidePic,jdbcType=VARCHAR},
ver_label_id = #{verLabelId,jdbcType=BIGINT},
ver_label_id = #{verLabelId,jdbcType=BIGINT},
guide_link_url = #{guideLinkUrl}
guide_link_url = #{guideLinkUrl},
update_user_id = #{updateUserId}
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</update>
...
@@ -264,7 +272,9 @@
...
@@ -264,7 +272,9 @@
r.create_time, r.update_time, r.enable_group_service, r.rights_setting_type, r.book_id, b.BOOK_NAME, r.vol_label_id,
r.create_time, r.update_time, r.enable_group_service, r.rights_setting_type, r.book_id, b.BOOK_NAME, r.vol_label_id,
r.ver_label_id, r.show_state,
r.ver_label_id, r.show_state,
b.isbn,
b.isbn,
ifnull(s.adviser_id,a.adviser_id) adviser_id
ifnull(s.adviser_id,a.adviser_id) adviser_id,
r.create_user_id,
r.update_user_id
from
from
rights_setting r
rights_setting r
left join rights_setting_book_relation s on r.id = s.rights_setting_id
left join rights_setting_book_relation s on r.id = s.rights_setting_id
...
@@ -281,6 +291,24 @@
...
@@ -281,6 +291,24 @@
${item}
${item}
</foreach>
</foreach>
</if>
</if>
<if
test=
"firstClassify != null"
>
and a.TEMPLET_ID = #{firstClassify}
</if>
<if
test=
"secondClassify != null"
>
and a.SECOND_TEMPLET_ID = #{secondClassify}
</if>
<if
test=
"gradeLabelId != null"
>
and a.GRA_LABEL_ID = #{gradeLabelId}
</if>
<if
test=
"subjectLabelId != null"
>
and a.SUB_LABEL_ID = #{subjectLabelId}
</if>
<if
test=
"volLabelId != null"
>
and a.vol_label_id = #{volLabelId}
</if>
<if
test=
"verLabelId != null"
>
and a.VER_LABEL_ID = #{verLabelId}
</if>
group by r.id
group by r.id
order by r.create_time desc
order by r.create_time desc
</select>
</select>
...
@@ -370,4 +398,13 @@
...
@@ -370,4 +398,13 @@
</foreach>
</foreach>
</update>
</update>
<update
id=
"updateUser"
parameterType=
"com.pcloud.book.rightsSetting.entity.RightsSetting"
>
update
rights_setting
set
update_time = now(),
update_user_id = #{updateUserId}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
</mapper>
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