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
251f9f93
Commit
251f9f93
authored
Oct 14, 2018
by
lili
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合并代码 扫码推送消息
parent
8eafa423
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
1359 additions
and
1573 deletions
+1359
-1573
BookCoverImgUpdateDTO.java
.../java/com/pcloud/book/book/dto/BookCoverImgUpdateDTO.java
+38
-0
BookDto.java
...-book/src/main/java/com/pcloud/book/book/dto/BookDto.java
+13
-0
BookFacade.java
...src/main/java/com/pcloud/book/book/facade/BookFacade.java
+0
-863
BookService.java
...c/main/java/com/pcloud/book/book/service/BookService.java
+3
-3
BookBizImpl.java
.../main/java/com/pcloud/book/book/biz/impl/BookBizImpl.java
+38
-3
BookAdviserFacade.java
...n/java/com/pcloud/book/book/facade/BookAdviserFacade.java
+0
-0
BookAppFacade.java
.../main/java/com/pcloud/book/book/facade/BookAppFacade.java
+4
-6
BookAssistTempletFacade.java
.../com/pcloud/book/book/facade/BookAssistTempletFacade.java
+0
-0
BookFacade.java
...src/main/java/com/pcloud/book/book/facade/BookFacade.java
+532
-0
BookFreezeFacade.java
...in/java/com/pcloud/book/book/facade/BookFreezeFacade.java
+0
-0
BookFundFacade.java
...main/java/com/pcloud/book/book/facade/BookFundFacade.java
+0
-0
BookProductFacade.java
...n/java/com/pcloud/book/book/facade/BookProductFacade.java
+0
-0
BookResourceFacade.java
.../java/com/pcloud/book/book/facade/BookResourceFacade.java
+0
-0
BookTypeFacade.java
...main/java/com/pcloud/book/book/facade/BookTypeFacade.java
+0
-0
BookFacadeImpl.java
...java/com/pcloud/book/book/facade/impl/BookFacadeImpl.java
+678
-679
BookServiceImpl.java
...va/com/pcloud/book/book/service/impl/BookServiceImpl.java
+11
-6
BookSet.java
...-book/src/main/java/com/pcloud/book/book/set/BookSet.java
+10
-1
QrcodeSceneConsr.java
...va/com/pcloud/book/consumer/channel/QrcodeSceneConsr.java
+0
-9
AgentConsr.java
...c/main/java/com/pcloud/book/consumer/user/AgentConsr.java
+3
-3
BookMQProducer.java
...main/java/com/pcloud/book/mq/producer/BookMQProducer.java
+8
-0
BookProducerImpl.java
...va/com/pcloud/book/mq/producer/impl/BookProducerImpl.java
+21
-0
No files found.
pcloud-facade-book/src/main/java/com/pcloud/book/book/dto/BookCoverImgUpdateDTO.java
0 → 100644
View file @
251f9f93
package
com
.
pcloud
.
book
.
book
.
dto
;
import
java.io.Serializable
;
/**
* @author lily
* @date 2018/10/13 17:29
*/
public
class
BookCoverImgUpdateDTO
implements
Serializable
{
private
String
coverImg
;
private
Long
bookId
;
public
String
getCoverImg
()
{
return
coverImg
;
}
public
void
setCoverImg
(
String
coverImg
)
{
this
.
coverImg
=
coverImg
;
}
public
Long
getBookId
()
{
return
bookId
;
}
public
void
setBookId
(
Long
bookId
)
{
this
.
bookId
=
bookId
;
}
@Override
public
String
toString
()
{
return
"BookCoverImgUpdateDTO{"
+
"coverImg='"
+
coverImg
+
'\''
+
", bookId="
+
bookId
+
'}'
;
}
}
pcloud-facade-book/src/main/java/com/pcloud/book/book/dto/BookDto.java
View file @
251f9f93
...
...
@@ -379,6 +379,11 @@ public class BookDto extends BaseDto {
* 配置服务个数
*/
private
Integer
messageCount
;
/**
* 类型名称
*/
private
List
<
String
>
typeCodeNames
;
/**
* 印码位置
*/
...
...
@@ -993,6 +998,14 @@ public class BookDto extends BaseDto {
this
.
templeParentId
=
templeParentId
;
}
public
List
<
String
>
getTypeCodeNames
()
{
return
typeCodeNames
;
}
public
void
setTypeCodeNames
(
List
<
String
>
typeCodeNames
)
{
this
.
typeCodeNames
=
typeCodeNames
;
}
@Override
public
String
toString
()
{
return
"BookDto [bookId="
+
bookId
+
", typeCode="
+
typeCode
+
", typeName="
+
typeName
+
", isbn="
+
isbn
...
...
pcloud-facade-book/src/main/java/com/pcloud/book/book/facade/BookFacade.java
deleted
100644 → 0
View file @
8eafa423
/**
*
*/
package
com
.
pcloud
.
book
.
book
.
facade
;
import
com.pcloud.book.book.dto.BookAssocCount
;
import
com.pcloud.book.book.dto.BookDto
;
import
com.pcloud.book.book.entity.Book
;
import
com.pcloud.common.dto.ResponseDto
;
import
com.pcloud.common.exceptions.BizException
;
import
com.pcloud.common.page.PageBean
;
import
com.pcloud.common.permission.PermissionException
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.codehaus.jackson.JsonParseException
;
import
org.springframework.cloud.netflix.feign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* @描述:书籍接口
* @作者:songx
* @创建时间:2016年12月23日,下午2:37:02 @版本:1.0
*/
@FeignClient
(
value
=
"pcloud-service-book"
,
qualifier
=
"bookFacadeCloud"
,
path
=
"book/v1.0/book"
)
@Api
(
description
=
"书籍接口外部服务"
)
public
interface
BookFacade
{
/**
* 新增书籍(平台)
*
* @param token
* @param book
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"新增书籍(平台)"
,
httpMethod
=
"POST"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"book"
,
value
=
"书籍实体"
,
dataType
=
"Book"
,
paramType
=
"body"
)})
@RequestMapping
(
value
=
"create"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<
BookDto
>
create
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 修改书籍信息(平台)
*
* @param token
* @param book
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"修改书籍信息(平台)"
,
httpMethod
=
"POST"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"book"
,
value
=
"书籍实体"
,
dataType
=
"Book"
,
paramType
=
"body"
)})
@RequestMapping
(
value
=
"update"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<?>
update
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 修改书籍封面图
*
* @param token
* @param book
* 图书修改信息
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"修改书籍封面图"
,
httpMethod
=
"POST"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"book"
,
value
=
"书籍实体"
,
dataType
=
"Book"
,
paramType
=
"body"
)
})
@RequestMapping
(
value
=
"updateCoverImg"
,
method
=
RequestMethod
.
POST
)
ResponseDto
<?>
updateCoverImg
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 修改书籍信息(编辑)
*
* @param token
* @param book
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"修改书籍信息(编辑)"
,
httpMethod
=
"POST"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"book"
,
value
=
"书籍实体"
,
dataType
=
"Book"
,
paramType
=
"body"
)
})
@RequestMapping
(
value
=
"updateByAdviser"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<?>
updateByAdviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 删除书籍信息(平台)
*
* @param token
* @param bookId
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"删除书籍信息(平台)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"bookId"
,
value
=
"图书标识"
,
dataType
=
"long"
,
paramType
=
"query"
)
})
@RequestMapping
(
value
=
"delete"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<?>
delete
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookId"
,
required
=
false
)
Long
bookId
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 批量删除书籍(平台)
*
* @param token
* @param bookIds
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"批量删除书籍信息(平台)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"bookIds"
,
value
=
"图书标识"
,
dataType
=
"string"
,
paramType
=
"query"
)
})
@RequestMapping
(
value
=
"deletes"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<?>
deletes
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookIds"
,
required
=
false
)
String
bookIds
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 获取书籍基础信息(包含统计信息)(编辑端)
*
* @param token
* @param bookId
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"获取书籍基础信息(包含统计信息)(编辑端)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"bookId"
,
value
=
"图书标识"
,
dataType
=
"long"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"channelId"
,
value
=
"渠道标识"
,
dataType
=
"long"
,
paramType
=
"query"
)
})
@RequestMapping
(
value
=
"getById"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
BookDto
>
getById
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookId"
,
required
=
false
)
Long
bookId
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 获取书籍基础信息
*
* @param bookId
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"获取书籍基础信息"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"bookId"
,
value
=
"图书标识"
,
dataType
=
"long"
,
paramType
=
"query"
)
})
@RequestMapping
(
value
=
"getBaseById"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
BookDto
>
getBaseById
(
@RequestParam
(
value
=
"bookId"
,
required
=
false
)
Long
bookId
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 判断书籍ISBN码是否存在(平台)
*
* @param token
* @param isbn
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"判断书籍ISBN码是否存在(平台)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"typeCode"
,
value
=
"书类型编码"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"isbn"
,
value
=
"书籍号"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"serialNumber"
,
value
=
"刊物序号"
,
dataType
=
"string"
,
paramType
=
"query"
)
})
@RequestMapping
(
value
=
"isbnExists"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
Boolean
>
isbnExists
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"typeCode"
,
required
=
false
)
String
typeCode
,
@RequestParam
(
value
=
"isbn"
,
required
=
false
)
String
isbn
,
@RequestParam
(
value
=
"serialNumber"
,
required
=
false
)
String
serialNumber
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 获取书籍列表(平台)
*
* @param token
* @param bookName
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"判断书籍ISBN码是否存在(平台)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"publish"
,
value
=
"出版社"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"fundName"
,
value
=
"基金支持"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"bookName"
,
value
=
"书籍名称"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"isbn"
,
value
=
"书籍号"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"serialNumber"
,
value
=
"刊物序号"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"isCurrentMonth"
,
value
=
"当月基金支持书刊"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"currentPage"
,
value
=
"当前页"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"numPerPage"
,
value
=
"每页条数"
,
dataType
=
"int"
,
paramType
=
"query"
)
})
@RequestMapping
(
value
=
"listPage"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<?>
getListPage
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"publish"
,
required
=
false
)
String
publish
,
@RequestParam
(
value
=
"fundName"
,
required
=
false
)
String
fundName
,
@RequestParam
(
value
=
"bookName"
,
required
=
false
)
String
bookName
,
@RequestParam
(
value
=
"isbn"
,
required
=
false
)
String
isbn
,
@RequestParam
(
value
=
"serialNumber"
,
required
=
false
)
String
serialNumber
,
@RequestParam
(
value
=
"isCurrentMonth"
,
required
=
false
)
Integer
isCurrentMonth
,
@RequestParam
(
value
=
"currentPage"
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
)
Integer
numPerPage
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 获取书籍列表(编辑)
*
* @param token
* @param bookName
* @param isbn
* @param channelId
* @param currentPage
* @param numPerPage
* @param bookId
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"判断书籍ISBN码是否存在(平台)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"bookName"
,
value
=
"书籍名称"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"isbn"
,
value
=
"isbn"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"channelId"
,
value
=
"渠道标识"
,
dataType
=
"long"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"typeCode"
,
value
=
"书刊类型"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"currentPage"
,
value
=
"当前页"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"numPerPage"
,
value
=
"每页条数"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"isMainEditor"
,
value
=
"只看我是主编辑"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"isFundSupport"
,
value
=
"只看基金支持"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"bookId"
,
value
=
"书籍标识"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"templetId"
,
value
=
"图书类型标识"
,
dataType
=
"long"
,
paramType
=
"query"
)})
@RequestMapping
(
value
=
"listPage4Adviser"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
PageBean
>
getListPage4Adviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
,
@RequestParam
(
value
=
"bookName"
,
required
=
false
)
String
bookName
,
@RequestParam
(
value
=
"isbn"
,
required
=
false
)
String
isbn
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
,
@RequestParam
(
value
=
"typeCode"
,
required
=
false
)
String
typeCode
,
@RequestParam
(
value
=
"currentPage"
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
)
Integer
numPerPage
,
@RequestParam
(
value
=
"isMainEditor"
,
required
=
false
)
Integer
isMainEditor
,
@RequestParam
(
value
=
"isFundSupport"
,
required
=
false
)
Integer
isFundSupport
,
@RequestParam
(
value
=
"bookId"
,
required
=
false
)
Integer
bookId
,
@RequestParam
(
value
=
"templetId"
,
required
=
false
)
Long
templetId
)
throws
BizException
,
PermissionException
,
JsonParseException
;
@ApiOperation
(
value
=
"首页获取正在做的图书"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"num"
,
value
=
"个数"
,
dataType
=
"Integer"
,
paramType
=
"query"
)})
@GetMapping
(
"getList4Adviser"
)
ResponseDto
<
List
<
BookDto
>>
getList4Adviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"num"
,
required
=
true
)
Integer
num
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 获取书籍的详细信息(微信客户端)
*
* @param userInfo
* @param bookId
* @param adviserId
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"获取书籍的详细信息(微信客户端)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"userInfo"
,
value
=
"Cookie"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"bookId"
,
value
=
"书籍标识"
,
dataType
=
"long"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"adviserId"
,
value
=
"编辑标识"
,
dataType
=
"long"
,
paramType
=
"query"
)
})
@RequestMapping
(
value
=
"getDetailById"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
BookDto
>
getDetailById
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestParam
(
value
=
"bookId"
,
required
=
false
)
Long
bookId
,
@RequestParam
(
value
=
"adviserId"
,
required
=
false
)
Long
adviserId
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 图书收益,获取书籍基础信息(包含统计信息)(编辑)
*
* @param token
* @param bookId
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"图书收益,获取书籍基础信息(包含统计信息)(编辑)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"bookId"
,
value
=
"书籍标识"
,
dataType
=
"long"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"channelId"
,
value
=
"渠道标识"
,
dataType
=
"long"
,
paramType
=
"query"
)
})
@RequestMapping
(
value
=
"getById4Profit"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
BookDto
>
getById4Profit
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookId"
,
required
=
false
)
Long
bookId
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 判断书籍ISBN码是否存在,存在则获取书籍信息(编辑)
*
* @param token
* @param book
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"判断书籍ISBN码是否存在,存在则获取书籍信息(编辑)"
,
httpMethod
=
"POST"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"book"
,
value
=
"书籍实体"
,
dataType
=
"Book"
,
paramType
=
"body"
)
})
@RequestMapping
(
value
=
"isbnExistsOrGetInfo"
,
method
=
RequestMethod
.
POST
)
ResponseDto
<
BookDto
>
isbnExistsOrGetInfo
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 创建编辑书籍关联关系(编辑端)
*
* @param token
* @param book
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"创建编辑书籍关联关系(编辑端)"
,
httpMethod
=
"POST"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"book"
,
value
=
"书籍实体"
,
dataType
=
"Book"
,
paramType
=
"body"
)
})
@RequestMapping
(
value
=
"setBookAdviserRelation"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<?>
setBookAdviserRelation
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 获取书籍的基本信息(微信客户端)
*
* @param userInfo
* @param bookId
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"获取书籍的基本信息(微信客户端)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"bookId"
,
value
=
"书籍标识"
,
dataType
=
"long"
,
paramType
=
"query"
)
})
@RequestMapping
(
value
=
"getBaseInfoById4Wechat"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
BookDto
>
getBaseInfoById4Wechat
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestParam
(
value
=
"bookId"
,
required
=
false
)
Long
bookId
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 获取书籍列表(微信编辑端)
*
* @param userInfo
* @param currentPage
* @param numPerPage
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"获取书籍列表(微信编辑端)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"userInfo"
,
value
=
"Cookie"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"currentPage"
,
value
=
"当前页"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"numPerPage"
,
value
=
"每页条数"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"bookName"
,
value
=
"书籍名称"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"channelId"
,
value
=
"渠道标识"
,
dataType
=
"long"
,
paramType
=
"query"
)
})
@RequestMapping
(
value
=
"getListPage4Wechat"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
PageBean
>
getListPage4Wechat
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestParam
(
value
=
"currentPage"
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
)
Integer
numPerPage
,
@RequestParam
(
value
=
"bookName"
,
required
=
false
)
String
bookName
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 获取书籍列表(XCX)
*
* @param token
* @param currentPage
* @param numPerPage
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"获取书籍列表(XCX)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"currentPage"
,
value
=
"当前页"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"numPerPage"
,
value
=
"每页条数"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"bookName"
,
value
=
"书籍名称"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"channelId"
,
value
=
"渠道标识"
,
dataType
=
"long"
,
paramType
=
"query"
)
})
@RequestMapping
(
value
=
"getlistPage"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
PageBean
>
listPage
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"currentPage"
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
)
Integer
numPerPage
,
@RequestParam
(
value
=
"bookName"
,
required
=
false
)
String
bookName
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 判断书籍ISBN码是否存在,存在则获取书籍信息(微信管理端-编辑)
*
* @param userInfo
* @param book
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"判断书籍ISBN码是否存在,存在则获取书籍信息(微信管理端-编辑)"
,
httpMethod
=
"POST"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"userInfo"
,
value
=
"Cookie"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"book"
,
value
=
"书籍实体"
,
dataType
=
"Book"
,
paramType
=
"body"
)
})
@RequestMapping
(
value
=
"isbnExistsOrGetInfo4Wechat"
,
method
=
RequestMethod
.
POST
)
ResponseDto
<
BookDto
>
isbnExistsOrGetInfo4Wechat
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 创建编辑书籍关联关系(微信管理端-编辑)
*
* @param userInfo
* @param book
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"创建编辑书籍关联关系(微信管理端-编辑)"
,
httpMethod
=
"POST"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"userInfo"
,
value
=
"Cookie"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"book"
,
value
=
"书籍实体"
,
dataType
=
"Book"
,
paramType
=
"body"
)
})
@RequestMapping
(
value
=
"setBookAdviserRelation4Wechat"
,
method
=
RequestMethod
.
POST
)
ResponseDto
<?>
setBookAdviserRelation4Wechat
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 微信端创建书籍(微信管理端-编辑)
*
* @param userInfo
* @param book
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"微信端创建书籍(微信管理端-编辑)"
,
httpMethod
=
"POST"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"userInfo"
,
value
=
"Cookie"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"book"
,
value
=
"书籍实体"
,
dataType
=
"Book"
,
paramType
=
"body"
)
})
@RequestMapping
(
value
=
"create4Wechat"
,
method
=
RequestMethod
.
POST
)
ResponseDto
<
BookDto
>
create4Wechat
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 微信端修改书籍(微信管理端-编辑)
*
* @param userInfo
* @param book
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"微信端修改书籍(微信管理端-编辑)"
,
httpMethod
=
"POST"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"userInfo"
,
value
=
"Cookie"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"book"
,
value
=
"书籍实体"
,
dataType
=
"Book"
,
paramType
=
"body"
)
})
@RequestMapping
(
value
=
"update4Wechat"
,
method
=
RequestMethod
.
POST
)
ResponseDto
<
BookDto
>
update4Wechat
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* @param userInfo
* @param isbn
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
* @Title: getTypeByIsbn
* @Description:根据ISBN获取期刊分页列表
* @return: ResponseDto<BookDto>
* @author: lihao
* @date: 2017年5月9日 下午5:53:19
*/
@ApiOperation
(
value
=
"根据ISBN获取期刊分页列表"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"userInfo"
,
value
=
"Cookie"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"typeCode"
,
value
=
"书类型编码"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"isbn"
,
value
=
"isbn"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"currentPage"
,
value
=
"当前页"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"numPerPage"
,
value
=
"每页条数"
,
dataType
=
"int"
,
paramType
=
"query"
)
})
@RequestMapping
(
value
=
"getJournalPageByIsbn"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<?>
getJournalPageByIsbn
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestParam
(
value
=
"typeCode"
,
required
=
false
)
String
typeCode
,
@RequestParam
(
value
=
"isbn"
,
required
=
false
)
String
isbn
,
@RequestParam
(
value
=
"currentPage"
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
)
Integer
numPerPage
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 获取书籍列表(微信客户端)
*
* @param userInfo
* @param currentPage
* @param numPerPage
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"获取书籍列表(微信客户端)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"userInfo"
,
value
=
"Cookie"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"currentPage"
,
value
=
"当前页"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"numPerPage"
,
value
=
"每页条数"
,
dataType
=
"int"
,
paramType
=
"query"
)
})
@RequestMapping
(
value
=
"listPage4Wechat"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
PageBean
>
listPage4Wechat
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestParam
(
value
=
"currentPage"
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
)
Integer
numPerPage
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 获取书籍列表(编辑)
*
* @param token
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"获取书籍列表(编辑)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"number"
,
value
=
"书籍数目"
,
dataType
=
"int"
,
paramType
=
"query"
)
})
@RequestMapping
(
value
=
"listBook"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
List
<
Object
>>
listBook
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"number"
,
required
=
false
)
Integer
number
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 获取书籍列表(APP-编辑)
*
* @param token
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"获取书籍列表(APP-编辑)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"currentPage"
,
value
=
"当前页数"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"numPerPage"
,
value
=
"每页条数"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"bookName"
,
value
=
"书籍名称"
,
dataType
=
"string"
,
paramType
=
"query"
)
})
@RequestMapping
(
value
=
"listBook4App"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
PageBean
>
listBook4App
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"currentPage"
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
)
Integer
numPerPage
,
@RequestParam
(
value
=
"bookName"
,
required
=
false
)
String
bookName
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 书刊列表-出版端
*
* @param token
* @param bookName
* @param channelId
* @param typeCode
* @param currentPage
* @param numPerPage
* @param mainEditorName
* @param isFundSupport
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"书刊列表-出版端"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"bookName"
,
value
=
"书刊名称"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"channelId"
,
value
=
"渠道标识"
,
dataType
=
"long"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"typeCode"
,
value
=
"书刊类型"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"currentPage"
,
value
=
"当前页数"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"numPerPage"
,
value
=
"每页条数"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"mainEditorName"
,
value
=
"主编辑名称"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"isFundSupport"
,
value
=
"基金支持"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"isbn"
,
value
=
"isbn"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"templetId"
,
value
=
"图书类型标识"
,
dataType
=
"long"
,
paramType
=
"query"
)})
@RequestMapping
(
value
=
"listPage4Agent"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<
PageBean
>
listPage4Agent
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookName"
,
required
=
false
)
String
bookName
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
,
@RequestParam
(
value
=
"typeCode"
,
required
=
false
)
String
typeCode
,
@RequestParam
(
value
=
"currentPage"
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
)
Integer
numPerPage
,
@RequestParam
(
value
=
"mainEditorName"
,
required
=
false
)
String
mainEditorName
,
@RequestParam
(
value
=
"isFundSupport"
,
required
=
false
)
Integer
isFundSupport
,
@RequestParam
(
value
=
"isbn"
,
required
=
false
)
String
isbn
,
@RequestParam
(
value
=
"templetId"
,
required
=
false
)
Long
templetId
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 更新图书模板
*
* @param token
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"更新图书模板"
,
httpMethod
=
"POST"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"book"
,
value
=
"书籍实体"
,
dataType
=
"Book"
,
paramType
=
"body"
)
})
@RequestMapping
(
value
=
"updateBookTemplet"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<?>
updateBookTemplet
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 获取应用关联的图书
*
* @param token
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"获取应用关联的图书"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"appId"
,
value
=
"应用标识"
,
dataType
=
"long"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"channelId"
,
value
=
"渠道标识"
,
dataType
=
"long"
,
paramType
=
"query"
)
})
@RequestMapping
(
value
=
"listBookByAppId"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
List
<
BookDto
>>
listBookByAppId
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"appId"
,
required
=
false
)
Long
appId
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 获取书籍基础信息(包含统计信息)(出版端)
*
* @param token
* @param bookId
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"获取书籍基础信息(包含统计信息)(编辑端)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"bookId"
,
value
=
"图书标识"
,
dataType
=
"long"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"channelId"
,
value
=
"渠道标识"
,
dataType
=
"long"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"adviserId"
,
value
=
"编辑标识"
,
dataType
=
"long"
,
paramType
=
"query"
)
})
@RequestMapping
(
value
=
"getById4Agent"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
BookDto
>
getById4Agent
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookId"
,
required
=
false
)
Long
bookId
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
,
@RequestParam
(
value
=
"adviserId"
,
required
=
false
)
Long
adviserId
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 书刊回收站列表(30天内删除的书刊列表)
*
* @param token
* @param currentPage
* @param numPerPage
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"书刊回收站列表"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"currentPage"
,
value
=
"当前页数"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"numPerPage"
,
value
=
"每页条数"
,
dataType
=
"int"
,
paramType
=
"query"
)
})
@RequestMapping
(
value
=
"listPageDelete4Adviser"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<
PageBean
>
listPageDelete4Adviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"currentPage"
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
)
Integer
numPerPage
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 获取图书关联超级作者商品个数
*
* @param token
* @param bookId
* @param channelId
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"获取图书统计个数"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"bookId"
,
value
=
"图书标识"
,
dataType
=
"long"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"channelId"
,
value
=
"渠道标识"
,
dataType
=
"long"
,
paramType
=
"query"
)
})
@RequestMapping
(
value
=
"getCount4BookAssoc"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<
BookAssocCount
>
getCount4BookAssoc
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookId"
,
required
=
false
)
Long
bookId
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 导出所有书刊成excel表 - 出版端
*
* @param token
* @return
* @throws PermissionException
* @throws JsonParseException
* @throws BizException
*/
@ApiOperation
(
value
=
"导出出版下所有书刊excel表(出版端)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
)
})
@RequestMapping
(
value
=
"exportBookToExcel"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<?>
exportBookToExcel
(
@RequestHeader
(
"token"
)
String
token
)
throws
PermissionException
,
JsonParseException
,
BizException
;
/**
* 图书列表(平台端)
*
* @param token
* @param typeCode
* @param templetId
* @param startDate
* @param endDate
* @param bookName
* @param currentPage
* @param numPerPage
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"图书列表(平台端)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"typeCode"
,
value
=
"书刊类型"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"templetId"
,
value
=
"书刊分类标识"
,
dataType
=
"long"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"startDate"
,
value
=
"开始日期"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"endDate"
,
value
=
"结束日期"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"bookName"
,
value
=
"书刊名称"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"currentPage"
,
value
=
"当前页数"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"numPerPage"
,
value
=
"每页条数"
,
dataType
=
"int"
,
paramType
=
"query"
)
})
@RequestMapping
(
value
=
"listBookClassify"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<
PageBean
>
listBookClassify
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"typeCode"
,
required
=
false
)
String
typeCode
,
@RequestParam
(
value
=
"templetId"
,
required
=
false
)
Long
templetId
,
@RequestParam
(
value
=
"startDate"
,
required
=
false
)
String
startDate
,
@RequestParam
(
value
=
"endDate"
,
required
=
false
)
String
endDate
,
@RequestParam
(
value
=
"bookName"
,
required
=
false
)
String
bookName
,
@RequestParam
(
value
=
"currentPage"
,
required
=
true
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
true
)
Integer
numPerPage
)
throws
BizException
,
PermissionException
,
JsonParseException
;
@ApiOperation
(
value
=
"导出平台下所有书刊excel表(平台端)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
)
})
@RequestMapping
(
value
=
"exportBookToExcel4Platform"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<?>
exportBookToExcel4Platform
(
@RequestHeader
(
"token"
)
String
token
)
throws
PermissionException
,
JsonParseException
,
BizException
;
/**
* 通过isbn获取图书信息(编辑端new)
*
* @param token
* @param isbn isbn
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"通过isbn获取图书信息(编辑端new)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"isbn"
,
value
=
"书籍号"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"typeCode"
,
value
=
"图书类型"
,
dataType
=
"string"
,
paramType
=
"query"
)})
@RequestMapping
(
value
=
"getByIsbnAndTypeCode"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
BookDto
>
getByIsbnAndTypeCode
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"isbn"
)
String
isbn
,
@RequestParam
(
value
=
"typeCode"
)
String
typeCode
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 新增书籍(编辑)
*
* @param token
* @param book
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"新增书籍(编辑)"
,
httpMethod
=
"POST"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"book"
,
value
=
"书籍实体"
,
dataType
=
"Book"
,
paramType
=
"body"
)})
@RequestMapping
(
value
=
"create4Adviser"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<
BookDto
>
create4Adviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 根据ISBN码获取书籍 to exapi
*
* @param isbn
* @param serialNumber
* @return
* @throws BizException
*/
@ApiOperation
(
value
=
"根据ISBN码和serialNumber获取书籍"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"isbn"
,
value
=
"isbn"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"serialNumber"
,
value
=
"刊物序号"
,
dataType
=
"string"
,
paramType
=
"query"
)})
@RequestMapping
(
value
=
"/getByIsbnAndSerialNumber"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
BookDto
>
getByIsbnAndSerialNumber
(
@RequestParam
(
value
=
"isbn"
,
required
=
true
)
String
isbn
,
@RequestParam
(
value
=
"serialNumber"
,
required
=
false
)
String
serialNumber
)
throws
BizException
;
/**
* 修改图书类型与图书基本信息
*
* @param token
* @param book
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"修改图书类型与图书基本信息(编辑)"
,
httpMethod
=
"POST"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"book"
,
value
=
"书籍实体"
,
dataType
=
"Book"
,
paramType
=
"body"
)})
@RequestMapping
(
value
=
"updateBookAndBookType"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<?>
updateBookAndBookType
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
;
@ApiOperation
(
value
=
"校验ISBN"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"isbn"
,
value
=
"ISBN码"
,
dataType
=
"String"
,
paramType
=
"query"
)})
@RequestMapping
(
value
=
"checkISBN4App"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<
Boolean
>
checkISBN4App
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
String
isbn
)
throws
PermissionException
;
@ApiOperation
(
value
=
"根据渠道ID分页获取图书列表"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"channelId"
,
value
=
"渠道标识"
,
dataType
=
"Long"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"currentPage"
,
value
=
"当前页数"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"numPerPage"
,
value
=
"每页条数"
,
dataType
=
"int"
,
paramType
=
"query"
)
})
@GetMapping
(
"getBookListByChannelId4Adviser"
)
ResponseDto
<
PageBean
>
getBookListByChannelId4Adviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"currentPage"
,
required
=
true
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
true
)
Integer
numPerPage
,
@RequestParam
(
value
=
"channelId"
,
required
=
true
)
Long
channelId
)
throws
PermissionException
,
JsonParseException
,
BizException
;
}
pcloud-facade-book/src/main/java/com/pcloud/book/book/service/BookService.java
View file @
251f9f93
...
...
@@ -114,7 +114,7 @@ public interface BookService {
/**
* 根据ISBN码获取书籍 to exapi
*
* @param
bookId
* @param
isbn
* @return
* @throws BizException
*/
...
...
@@ -128,7 +128,7 @@ public interface BookService {
/**
* 根据ISBN码获取书籍详情(包含二维码个数,应用个数,商品个数) to exapi
*
* @param
bookId
* @param
isbn
* @return
* @throws BizException
*/
...
...
@@ -158,7 +158,7 @@ public interface BookService {
/**
* 根据ISBN码获取书籍 to exapi
*
* @param
bookId
* @param
isbn
* @return
* @throws BizException
*/
...
...
pcloud-service-book/src/main/java/com/pcloud/book/book/biz/impl/BookBizImpl.java
View file @
251f9f93
...
...
@@ -10,11 +10,23 @@ import com.pcloud.appcenter.base.exception.AppBizException;
import
com.pcloud.book.base.enums.BookFreezeEnum
;
import
com.pcloud.book.base.enums.BookTypeEnum
;
import
com.pcloud.book.base.exception.BookBizException
;
import
com.pcloud.book.book.biz.*
;
import
com.pcloud.book.book.biz.BookAdviserBiz
;
import
com.pcloud.book.book.biz.BookAppBiz
;
import
com.pcloud.book.book.biz.BookBiz
;
import
com.pcloud.book.book.biz.BookFreezeBiz
;
import
com.pcloud.book.book.biz.BookFundBiz
;
import
com.pcloud.book.book.biz.BookProductBiz
;
import
com.pcloud.book.book.biz.BookResourceBiz
;
import
com.pcloud.book.book.cache.BookCache
;
import
com.pcloud.book.book.constant.BookConstant
;
import
com.pcloud.book.book.dao.BookDao
;
import
com.pcloud.book.book.dto.*
;
import
com.pcloud.book.book.dto.BookAdviserUpdateTimeDTO
;
import
com.pcloud.book.book.dto.BookAssocCount
;
import
com.pcloud.book.book.dto.BookCoverImgUpdateDTO
;
import
com.pcloud.book.book.dto.BookDetialDTO
;
import
com.pcloud.book.book.dto.BookDto
;
import
com.pcloud.book.book.dto.BookFreezeDto
;
import
com.pcloud.book.book.dto.BookFundDto
;
import
com.pcloud.book.book.entity.Book
;
import
com.pcloud.book.book.entity.BookAdviser
;
import
com.pcloud.book.book.set.BookSet
;
...
...
@@ -26,6 +38,7 @@ import com.pcloud.book.consumer.user.AdviserConsr;
import
com.pcloud.book.consumer.user.AgentConsr
;
import
com.pcloud.book.consumer.user.ChannelConsr
;
import
com.pcloud.book.consumer.user.PartyConsr
;
import
com.pcloud.book.mq.producer.BookMQProducer
;
import
com.pcloud.common.core.aspect.ParamLog
;
import
com.pcloud.common.core.constant.AgentTypeEnum
;
import
com.pcloud.common.core.constant.SystemCode
;
...
...
@@ -44,7 +57,12 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
java.io.IOException
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
import
java.util.stream.Collectors
;
...
...
@@ -96,6 +114,8 @@ public class BookBizImpl implements BookBiz {
private
BookFreezeBiz
bookFreezeBiz
;
@Autowired
private
AssistTempletConsr
assistTempletConsr
;
@Autowired
private
BookMQProducer
bookMQProducer
;
/**
* 创建书籍,同时建立与编辑的推广关系
...
...
@@ -171,12 +191,24 @@ public class BookBizImpl implements BookBiz {
LOGGER
.
info
(
"【书籍基础】修改书籍基础信息,<PARAM>.[book]="
+
book
.
toString
());
// 校验参数
this
.
checkParam
(
book
);
//获取图书基本信息
BookDto
bookDto
=
this
.
getBaseById
(
book
.
getBookId
());
checkIsUpdateCoverImgAndSendTopic
(
bookDto
,
book
.
getCoverImg
());
bookDao
.
update
(
book
);
// 清除redis中数据
bookCache
.
clearRedisByBook
(
book
.
getBookId
(),
book
.
getIsbn
(),
book
.
getSerialNumber
());
LOGGER
.
info
(
"【书籍基础】修改书籍基础信息,<END>"
);
}
void
checkIsUpdateCoverImgAndSendTopic
(
BookDto
oldBook
,
String
newCoverImg
){
if
(
newCoverImg
!=
null
&&
!
newCoverImg
.
equalsIgnoreCase
(
oldBook
.
getCoverImg
())){
BookCoverImgUpdateDTO
bookCoverImgUpdateDTO
=
new
BookCoverImgUpdateDTO
();
bookCoverImgUpdateDTO
.
setBookId
(
oldBook
.
getBookId
());
bookCoverImgUpdateDTO
.
setCoverImg
(
newCoverImg
);
bookMQProducer
.
sendUpdateBookCoverImgTopic
(
bookCoverImgUpdateDTO
);
}
}
/**
* 修改书籍封面图
*/
...
...
@@ -191,6 +223,7 @@ public class BookBizImpl implements BookBiz {
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"默认图书不能修改!"
);
}
bookDao
.
updateCoverImg
(
book
);
checkIsUpdateCoverImgAndSendTopic
(
bookDto
,
book
.
getCoverImg
());
// 清除redis中数据
bookCache
.
clearRedisByBook
(
bookDto
.
getBookId
(),
bookDto
.
getIsbn
(),
bookDto
.
getSerialNumber
());
LOGGER
.
info
(
"【书籍基础】修改书籍基础信息,<END>"
);
...
...
@@ -228,6 +261,7 @@ public class BookBizImpl implements BookBiz {
}
// 清除redis中数据
bookCache
.
clearRedisByBook
(
book
.
getBookId
(),
book
.
getIsbn
(),
book
.
getSerialNumber
());
checkIsUpdateCoverImgAndSendTopic
(
bookDto
,
book
.
getCoverImg
());
LOGGER
.
info
(
"【书籍基础】修改书籍基础信息,<END>"
);
return
bookDto
;
}
...
...
@@ -1390,6 +1424,7 @@ public class BookBizImpl implements BookBiz {
// 书籍总数缓存加1
bookCache
.
incrObject
(
BookConstant
.
BOOK_CACHE
+
"PLATFORM_BOOK_COUNT"
);
}
else
{
checkIsUpdateCoverImgAndSendTopic
(
bookDto
,
book
.
getCoverImg
());
// 修改图书基本信息
bookDao
.
updateByAdviser
(
book
);
// 清除redis中数据
...
...
pcloud-
facad
e-book/src/main/java/com/pcloud/book/book/facade/BookAdviserFacade.java
→
pcloud-
servic
e-book/src/main/java/com/pcloud/book/book/facade/BookAdviserFacade.java
View file @
251f9f93
File moved
pcloud-
facad
e-book/src/main/java/com/pcloud/book/book/facade/BookAppFacade.java
→
pcloud-
servic
e-book/src/main/java/com/pcloud/book/book/facade/BookAppFacade.java
View file @
251f9f93
...
...
@@ -49,7 +49,7 @@ public interface BookAppFacade {
/**
* 微信端添加书籍和应用关联关系
*
* @param
token
* @param
userInfo
* @param bookApp
* @return
* @throws BizException
...
...
@@ -68,8 +68,7 @@ public interface BookAppFacade {
* 删除书籍应用关联关系
*
* @param token
* @param bookId
* @param appId
* @param bookAppId
* @return
* @throws BizException
* @throws PermissionException
...
...
@@ -86,9 +85,8 @@ public interface BookAppFacade {
/**
* 微信端删除书籍应用关联关系
*
* @param token
* @param bookId
* @param appId
* @param userInfo
* @param bookAppId
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
...
...
pcloud-
facad
e-book/src/main/java/com/pcloud/book/book/facade/BookAssistTempletFacade.java
→
pcloud-
servic
e-book/src/main/java/com/pcloud/book/book/facade/BookAssistTempletFacade.java
View file @
251f9f93
File moved
pcloud-service-book/src/main/java/com/pcloud/book/book/facade/BookFacade.java
0 → 100644
View file @
251f9f93
/**
*
*/
package
com
.
pcloud
.
book
.
book
.
facade
;
import
com.pcloud.book.book.dto.BookAssocCount
;
import
com.pcloud.book.book.dto.BookDto
;
import
com.pcloud.book.book.entity.Book
;
import
com.pcloud.common.dto.ResponseDto
;
import
com.pcloud.common.exceptions.BizException
;
import
com.pcloud.common.page.PageBean
;
import
com.pcloud.common.permission.PermissionException
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.codehaus.jackson.JsonParseException
;
import
org.springframework.cloud.netflix.feign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* @描述:书籍接口
* @作者:songx
* @创建时间:2016年12月23日,下午2:37:02 @版本:1.0
*/
@FeignClient
(
value
=
"pcloud-service-book"
,
qualifier
=
"bookFacadeCloud"
,
path
=
"book/v1.0/book"
)
@Api
(
description
=
"书籍接口外部服务"
)
public
interface
BookFacade
{
@ApiOperation
(
value
=
"新增书籍(平台)"
,
httpMethod
=
"POST"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"book"
,
value
=
"书籍实体"
,
dataType
=
"Book"
,
paramType
=
"body"
)})
@RequestMapping
(
value
=
"create"
,
method
=
RequestMethod
.
POST
)
ResponseDto
<
BookDto
>
create
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
;
@ApiOperation
(
value
=
"修改书籍信息(平台)"
,
httpMethod
=
"POST"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"book"
,
value
=
"书籍实体"
,
dataType
=
"Book"
,
paramType
=
"body"
)})
@RequestMapping
(
value
=
"update"
,
method
=
RequestMethod
.
POST
)
ResponseDto
<?>
update
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
;
@ApiOperation
(
value
=
"修改书籍封面图"
,
httpMethod
=
"POST"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"book"
,
value
=
"书籍实体"
,
dataType
=
"Book"
,
paramType
=
"body"
)})
@RequestMapping
(
value
=
"updateCoverImg"
,
method
=
RequestMethod
.
POST
)
ResponseDto
<?>
updateCoverImg
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
;
@ApiOperation
(
value
=
"修改书籍信息(编辑)"
,
httpMethod
=
"POST"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"book"
,
value
=
"书籍实体"
,
dataType
=
"Book"
,
paramType
=
"body"
)})
@RequestMapping
(
value
=
"updateByAdviser"
,
method
=
RequestMethod
.
POST
)
ResponseDto
<?>
updateByAdviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
;
@ApiOperation
(
value
=
"删除书籍信息(平台)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"bookId"
,
value
=
"图书标识"
,
dataType
=
"long"
,
paramType
=
"query"
)})
@RequestMapping
(
value
=
"delete"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<?>
delete
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookId"
)
Long
bookId
)
throws
BizException
,
PermissionException
;
@ApiOperation
(
value
=
"批量删除书籍信息(平台)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"bookIds"
,
value
=
"图书标识"
,
dataType
=
"string"
,
paramType
=
"query"
)})
@RequestMapping
(
value
=
"deletes"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<?>
deletes
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookIds"
)
String
bookIds
)
throws
BizException
,
PermissionException
;
@ApiOperation
(
value
=
"获取书籍基础信息(包含统计信息)(编辑端)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"bookId"
,
value
=
"图书标识"
,
dataType
=
"long"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"channelId"
,
value
=
"渠道标识"
,
dataType
=
"long"
,
paramType
=
"query"
)})
@RequestMapping
(
value
=
"getById"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<
BookDto
>
getById
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookId"
)
Long
bookId
,
@RequestParam
(
value
=
"channelId"
)
Long
channelId
)
throws
BizException
,
PermissionException
;
@ApiOperation
(
value
=
"获取书籍基础信息"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"bookId"
,
value
=
"图书标识"
,
dataType
=
"long"
,
paramType
=
"query"
)})
@RequestMapping
(
value
=
"getBaseById"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<
BookDto
>
getBaseById
(
@RequestParam
(
value
=
"bookId"
)
Long
bookId
)
throws
BizException
;
@ApiOperation
(
value
=
"判断书籍ISBN码是否存在(平台)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"typeCode"
,
value
=
"书类型编码"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"isbn"
,
value
=
"书籍号"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"serialNumber"
,
value
=
"刊物序号"
,
dataType
=
"string"
,
paramType
=
"query"
)})
@RequestMapping
(
value
=
"isbnExists"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<
Boolean
>
isbnExists
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"typeCode"
,
required
=
false
)
String
typeCode
,
@RequestParam
(
value
=
"isbn"
)
String
isbn
,
@RequestParam
(
value
=
"serialNumber"
,
required
=
false
)
String
serialNumber
)
throws
BizException
,
PermissionException
;
@ApiOperation
(
value
=
"判断书籍ISBN码是否存在(平台)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"publish"
,
value
=
"出版社"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"fundName"
,
value
=
"基金支持"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"bookName"
,
value
=
"书籍名称"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"isbn"
,
value
=
"书籍号"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"serialNumber"
,
value
=
"刊物序号"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"isCurrentMonth"
,
value
=
"当月基金支持书刊"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"currentPage"
,
value
=
"当前页"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"numPerPage"
,
value
=
"每页条数"
,
dataType
=
"int"
,
paramType
=
"query"
)})
@RequestMapping
(
value
=
"listPage"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<?>
getListPage
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"publish"
,
required
=
false
)
String
publish
,
@RequestParam
(
value
=
"fundName"
,
required
=
false
)
String
fundName
,
@RequestParam
(
value
=
"bookName"
,
required
=
false
)
String
bookName
,
@RequestParam
(
value
=
"isbn"
,
required
=
false
)
String
isbn
,
@RequestParam
(
value
=
"serialNumber"
,
required
=
false
)
String
serialNumber
,
@RequestParam
(
value
=
"isCurrentMonth"
,
required
=
false
)
Integer
isCurrentMonth
,
@RequestParam
(
value
=
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
)
Integer
numPerPage
)
throws
BizException
,
PermissionException
,
JsonParseException
;
@ApiOperation
(
value
=
"判断书籍ISBN码是否存在(平台)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"bookName"
,
value
=
"书籍名称"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"isbn"
,
value
=
"isbn"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"channelId"
,
value
=
"渠道标识"
,
dataType
=
"long"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"typeCode"
,
value
=
"书刊类型"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"currentPage"
,
value
=
"当前页"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"numPerPage"
,
value
=
"每页条数"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"isMainEditor"
,
value
=
"只看我是主编辑"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"isFundSupport"
,
value
=
"只看基金支持"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"bookId"
,
value
=
"书籍标识"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"templetId"
,
value
=
"图书类型标识"
,
dataType
=
"long"
,
paramType
=
"query"
)})
@RequestMapping
(
value
=
"listPage4Adviser"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<
PageBean
>
getListPage4Adviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
,
@RequestParam
(
value
=
"bookName"
,
required
=
false
)
String
bookName
,
@RequestParam
(
value
=
"isbn"
,
required
=
false
)
String
isbn
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
,
@RequestParam
(
value
=
"typeCode"
,
required
=
false
)
String
typeCode
,
@RequestParam
(
value
=
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
)
Integer
numPerPage
,
@RequestParam
(
value
=
"isMainEditor"
,
required
=
false
)
Integer
isMainEditor
,
@RequestParam
(
value
=
"isFundSupport"
,
required
=
false
)
Integer
isFundSupport
,
@RequestParam
(
value
=
"bookId"
,
required
=
false
)
Integer
bookId
,
@RequestParam
(
value
=
"templetId"
,
required
=
false
)
Long
templetId
)
throws
BizException
,
PermissionException
;
@ApiOperation
(
value
=
"首页获取正在做的图书"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"num"
,
value
=
"个数"
,
dataType
=
"Integer"
,
paramType
=
"query"
)})
@GetMapping
(
"getList4Adviser"
)
ResponseDto
<
List
<
BookDto
>>
getList4Adviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"num"
)
Integer
num
)
throws
BizException
,
PermissionException
,
JsonParseException
;
@ApiOperation
(
value
=
"获取书籍的详细信息(微信客户端)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"userInfo"
,
value
=
"Cookie"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"bookId"
,
value
=
"书籍标识"
,
dataType
=
"long"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"adviserId"
,
value
=
"编辑标识"
,
dataType
=
"long"
,
paramType
=
"query"
)})
@RequestMapping
(
value
=
"getDetailById"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<
BookDto
>
getDetailById
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestParam
(
value
=
"bookId"
,
required
=
false
)
Long
bookId
,
@RequestParam
(
value
=
"adviserId"
,
required
=
false
)
Long
adviserId
)
throws
BizException
,
PermissionException
,
JsonParseException
;
@ApiOperation
(
value
=
"图书收益,获取书籍基础信息(包含统计信息)(编辑)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"bookId"
,
value
=
"书籍标识"
,
dataType
=
"long"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"channelId"
,
value
=
"渠道标识"
,
dataType
=
"long"
,
paramType
=
"query"
)})
@RequestMapping
(
value
=
"getById4Profit"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<
BookDto
>
getById4Profit
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookId"
)
Long
bookId
,
@RequestParam
(
value
=
"channelId"
)
Long
channelId
)
throws
BizException
,
PermissionException
,
JsonParseException
;
@ApiOperation
(
value
=
"判断书籍ISBN码是否存在,存在则获取书籍信息(编辑)"
,
httpMethod
=
"POST"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"book"
,
value
=
"书籍实体"
,
dataType
=
"Book"
,
paramType
=
"body"
)})
@RequestMapping
(
value
=
"isbnExistsOrGetInfo"
,
method
=
RequestMethod
.
POST
)
ResponseDto
<
BookDto
>
isbnExistsOrGetInfo
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
;
@ApiOperation
(
value
=
"创建编辑书籍关联关系(编辑端)"
,
httpMethod
=
"POST"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"book"
,
value
=
"书籍实体"
,
dataType
=
"Book"
,
paramType
=
"body"
)})
@RequestMapping
(
value
=
"setBookAdviserRelation"
,
method
=
RequestMethod
.
POST
)
ResponseDto
<?>
setBookAdviserRelation
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
;
/**
* 获取书籍的基本信息(微信客户端)
*/
@ApiOperation
(
value
=
"获取书籍的基本信息(微信客户端)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"bookId"
,
value
=
"书籍标识"
,
dataType
=
"long"
,
paramType
=
"query"
)})
@RequestMapping
(
value
=
"getBaseInfoById4Wechat"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<
BookDto
>
getBaseInfoById4Wechat
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestParam
(
value
=
"bookId"
)
Long
bookId
)
throws
BizException
,
PermissionException
;
/**
* 获取书籍列表(微信编辑端)
*/
@ApiOperation
(
value
=
"获取书籍列表(微信编辑端)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"userInfo"
,
value
=
"Cookie"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"currentPage"
,
value
=
"当前页"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"numPerPage"
,
value
=
"每页条数"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"bookName"
,
value
=
"书籍名称"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"channelId"
,
value
=
"渠道标识"
,
dataType
=
"long"
,
paramType
=
"query"
)})
@RequestMapping
(
value
=
"getListPage4Wechat"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<
PageBean
>
getListPage4Wechat
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestParam
(
value
=
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
)
Integer
numPerPage
,
@RequestParam
(
value
=
"bookName"
,
required
=
false
)
String
bookName
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 获取书籍列表(XCX)
*/
@ApiOperation
(
value
=
"获取书籍列表(XCX)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"currentPage"
,
value
=
"当前页"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"numPerPage"
,
value
=
"每页条数"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"bookName"
,
value
=
"书籍名称"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"channelId"
,
value
=
"渠道标识"
,
dataType
=
"long"
,
paramType
=
"query"
)})
@RequestMapping
(
value
=
"getlistPage"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<
PageBean
>
listPage
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
)
Integer
numPerPage
,
@RequestParam
(
value
=
"bookName"
,
required
=
false
)
String
bookName
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 判断书籍ISBN码是否存在,存在则获取书籍信息(微信管理端-编辑)
*/
@ApiOperation
(
value
=
"判断书籍ISBN码是否存在,存在则获取书籍信息(微信管理端-编辑)"
,
httpMethod
=
"POST"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"userInfo"
,
value
=
"Cookie"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"book"
,
value
=
"书籍实体"
,
dataType
=
"Book"
,
paramType
=
"body"
)})
@RequestMapping
(
value
=
"isbnExistsOrGetInfo4Wechat"
,
method
=
RequestMethod
.
POST
)
ResponseDto
<
BookDto
>
isbnExistsOrGetInfo4Wechat
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 创建编辑书籍关联关系(微信管理端-编辑)
*/
@ApiOperation
(
value
=
"创建编辑书籍关联关系(微信管理端-编辑)"
,
httpMethod
=
"POST"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"userInfo"
,
value
=
"Cookie"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"book"
,
value
=
"书籍实体"
,
dataType
=
"Book"
,
paramType
=
"body"
)})
@RequestMapping
(
value
=
"setBookAdviserRelation4Wechat"
,
method
=
RequestMethod
.
POST
)
ResponseDto
<?>
setBookAdviserRelation4Wechat
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 微信端创建书籍(微信管理端-编辑)
*/
@ApiOperation
(
value
=
"微信端创建书籍(微信管理端-编辑)"
,
httpMethod
=
"POST"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"userInfo"
,
value
=
"Cookie"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"book"
,
value
=
"书籍实体"
,
dataType
=
"Book"
,
paramType
=
"body"
)})
@RequestMapping
(
value
=
"create4Wechat"
,
method
=
RequestMethod
.
POST
)
ResponseDto
<
BookDto
>
create4Wechat
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 微信端修改书籍(微信管理端-编辑)
*/
@ApiOperation
(
value
=
"微信端修改书籍(微信管理端-编辑)"
,
httpMethod
=
"POST"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"userInfo"
,
value
=
"Cookie"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"book"
,
value
=
"书籍实体"
,
dataType
=
"Book"
,
paramType
=
"body"
)})
@RequestMapping
(
value
=
"update4Wechat"
,
method
=
RequestMethod
.
POST
)
ResponseDto
<
BookDto
>
update4Wechat
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
;
@ApiOperation
(
value
=
"根据ISBN获取期刊分页列表"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"userInfo"
,
value
=
"Cookie"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"typeCode"
,
value
=
"书类型编码"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"isbn"
,
value
=
"isbn"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"currentPage"
,
value
=
"当前页"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"numPerPage"
,
value
=
"每页条数"
,
dataType
=
"int"
,
paramType
=
"query"
)})
@RequestMapping
(
value
=
"getJournalPageByIsbn"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<?>
getJournalPageByIsbn
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestParam
(
value
=
"typeCode"
,
required
=
false
)
String
typeCode
,
@RequestParam
(
value
=
"isbn"
,
required
=
false
)
String
isbn
,
@RequestParam
(
value
=
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
)
Integer
numPerPage
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 获取书籍列表(微信客户端)
*/
@ApiOperation
(
value
=
"获取书籍列表(微信客户端)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"userInfo"
,
value
=
"Cookie"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"currentPage"
,
value
=
"当前页"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"numPerPage"
,
value
=
"每页条数"
,
dataType
=
"int"
,
paramType
=
"query"
)})
@RequestMapping
(
value
=
"listPage4Wechat"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<
PageBean
>
listPage4Wechat
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestParam
(
value
=
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
)
Integer
numPerPage
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 获取书籍列表(编辑)
*/
@ApiOperation
(
value
=
"获取书籍列表(编辑)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"number"
,
value
=
"书籍数目"
,
dataType
=
"int"
,
paramType
=
"query"
)})
@RequestMapping
(
value
=
"listBook"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<
List
<
Object
>>
listBook
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"number"
)
Integer
number
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 获取书籍列表(APP-编辑)
*/
@ApiOperation
(
value
=
"获取书籍列表(APP-编辑)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"currentPage"
,
value
=
"当前页数"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"numPerPage"
,
value
=
"每页条数"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"bookName"
,
value
=
"书籍名称"
,
dataType
=
"string"
,
paramType
=
"query"
)})
@RequestMapping
(
value
=
"listBook4App"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<
PageBean
>
listBook4App
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
)
Integer
numPerPage
,
@RequestParam
(
value
=
"bookName"
,
required
=
false
)
String
bookName
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 书刊列表-出版端
*/
@ApiOperation
(
value
=
"书刊列表-出版端"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"bookName"
,
value
=
"书刊名称"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"channelId"
,
value
=
"渠道标识"
,
dataType
=
"long"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"typeCode"
,
value
=
"书刊类型"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"currentPage"
,
value
=
"当前页数"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"numPerPage"
,
value
=
"每页条数"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"mainEditorName"
,
value
=
"主编辑名称"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"isFundSupport"
,
value
=
"基金支持"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"isbn"
,
value
=
"isbn"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"templetId"
,
value
=
"图书类型标识"
,
dataType
=
"long"
,
paramType
=
"query"
)})
@RequestMapping
(
value
=
"listPage4Agent"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<
PageBean
>
listPage4Agent
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookName"
,
required
=
false
)
String
bookName
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
,
@RequestParam
(
value
=
"typeCode"
,
required
=
false
)
String
typeCode
,
@RequestParam
(
value
=
"currentPage"
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
)
Integer
numPerPage
,
@RequestParam
(
value
=
"mainEditorName"
,
required
=
false
)
String
mainEditorName
,
@RequestParam
(
value
=
"isFundSupport"
,
required
=
false
)
Integer
isFundSupport
,
@RequestParam
(
value
=
"isbn"
,
required
=
false
)
String
isbn
,
@RequestParam
(
value
=
"templetId"
,
required
=
false
)
Long
templetId
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 更新图书模板
*/
@ApiOperation
(
value
=
"更新图书模板"
,
httpMethod
=
"POST"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"book"
,
value
=
"书籍实体"
,
dataType
=
"Book"
,
paramType
=
"body"
)})
@RequestMapping
(
value
=
"updateBookTemplet"
,
method
=
RequestMethod
.
POST
)
ResponseDto
<?>
updateBookTemplet
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 获取应用关联的图书
*/
@ApiOperation
(
value
=
"获取应用关联的图书"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"appId"
,
value
=
"应用标识"
,
dataType
=
"long"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"channelId"
,
value
=
"渠道标识"
,
dataType
=
"long"
,
paramType
=
"query"
)})
@RequestMapping
(
value
=
"listBookByAppId"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<
List
<
BookDto
>>
listBookByAppId
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"appId"
,
required
=
false
)
Long
appId
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 获取书籍基础信息(包含统计信息)(出版端)
*/
@ApiOperation
(
value
=
"获取书籍基础信息(包含统计信息)(编辑端)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"bookId"
,
value
=
"图书标识"
,
dataType
=
"long"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"channelId"
,
value
=
"渠道标识"
,
dataType
=
"long"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"adviserId"
,
value
=
"编辑标识"
,
dataType
=
"long"
,
paramType
=
"query"
)})
@RequestMapping
(
value
=
"getById4Agent"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<
BookDto
>
getById4Agent
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookId"
)
Long
bookId
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
,
@RequestParam
(
value
=
"adviserId"
,
required
=
false
)
Long
adviserId
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 书刊回收站列表(30天内删除的书刊列表)
*/
@ApiOperation
(
value
=
"书刊回收站列表"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"currentPage"
,
value
=
"当前页数"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"numPerPage"
,
value
=
"每页条数"
,
dataType
=
"int"
,
paramType
=
"query"
)})
@RequestMapping
(
value
=
"listPageDelete4Adviser"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<
PageBean
>
listPageDelete4Adviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
)
Integer
numPerPage
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 获取图书关联超级作者商品个数
*/
@ApiOperation
(
value
=
"获取图书统计个数"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"bookId"
,
value
=
"图书标识"
,
dataType
=
"long"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"channelId"
,
value
=
"渠道标识"
,
dataType
=
"long"
,
paramType
=
"query"
)})
@RequestMapping
(
value
=
"getCount4BookAssoc"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<
BookAssocCount
>
getCount4BookAssoc
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookId"
)
Long
bookId
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 导出所有书刊成excel表 - 出版端
*/
@ApiOperation
(
value
=
"导出出版下所有书刊excel表(出版端)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
)})
@RequestMapping
(
value
=
"exportBookToExcel"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<?>
exportBookToExcel
(
@RequestHeader
(
"token"
)
String
token
)
throws
PermissionException
,
JsonParseException
,
BizException
;
/**
* 图书列表(平台端)
*/
@ApiOperation
(
value
=
"图书列表(平台端)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"typeCode"
,
value
=
"书刊类型"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"templetId"
,
value
=
"书刊分类标识"
,
dataType
=
"long"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"startDate"
,
value
=
"开始日期"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"endDate"
,
value
=
"结束日期"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"bookName"
,
value
=
"书刊名称"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"currentPage"
,
value
=
"当前页数"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"numPerPage"
,
value
=
"每页条数"
,
dataType
=
"int"
,
paramType
=
"query"
)})
@RequestMapping
(
value
=
"listBookClassify"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<
PageBean
>
listBookClassify
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"typeCode"
,
required
=
false
)
String
typeCode
,
@RequestParam
(
value
=
"templetId"
,
required
=
false
)
Long
templetId
,
@RequestParam
(
value
=
"startDate"
,
required
=
false
)
String
startDate
,
@RequestParam
(
value
=
"endDate"
,
required
=
false
)
String
endDate
,
@RequestParam
(
value
=
"bookName"
,
required
=
false
)
String
bookName
,
@RequestParam
(
value
=
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
)
Integer
numPerPage
)
throws
BizException
,
PermissionException
,
JsonParseException
;
@ApiOperation
(
value
=
"导出平台下所有书刊excel表(平台端)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
)})
@RequestMapping
(
value
=
"exportBookToExcel4Platform"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<?>
exportBookToExcel4Platform
(
@RequestHeader
(
"token"
)
String
token
)
throws
PermissionException
,
JsonParseException
,
BizException
;
/**
* 通过isbn获取图书信息(编辑端new)
*/
@ApiOperation
(
value
=
"通过isbn获取图书信息(编辑端new)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"string"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"isbn"
,
value
=
"书籍号"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"typeCode"
,
value
=
"图书类型"
,
dataType
=
"string"
,
paramType
=
"query"
)})
@RequestMapping
(
value
=
"getByIsbnAndTypeCode"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<
BookDto
>
getByIsbnAndTypeCode
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"isbn"
)
String
isbn
,
@RequestParam
(
value
=
"typeCode"
)
String
typeCode
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 新增书籍(编辑)
*/
@ApiOperation
(
value
=
"新增书籍(编辑)"
,
httpMethod
=
"POST"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"book"
,
value
=
"书籍实体"
,
dataType
=
"Book"
,
paramType
=
"body"
)})
@RequestMapping
(
value
=
"create4Adviser"
,
method
=
RequestMethod
.
POST
)
ResponseDto
<
BookDto
>
create4Adviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
* 根据ISBN码获取书籍 to exapi
*/
@ApiOperation
(
value
=
"根据ISBN码和serialNumber获取书籍"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"isbn"
,
value
=
"isbn"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"serialNumber"
,
value
=
"刊物序号"
,
dataType
=
"string"
,
paramType
=
"query"
)})
@RequestMapping
(
value
=
"/getByIsbnAndSerialNumber"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<
BookDto
>
getByIsbnAndSerialNumber
(
@RequestParam
(
value
=
"isbn"
,
required
=
true
)
String
isbn
,
@RequestParam
(
value
=
"serialNumber"
,
required
=
false
)
String
serialNumber
)
throws
BizException
;
/**
* 修改图书类型与图书基本信息
*/
@ApiOperation
(
value
=
"修改图书类型与图书基本信息(编辑)"
,
httpMethod
=
"POST"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"book"
,
value
=
"书籍实体"
,
dataType
=
"Book"
,
paramType
=
"body"
)})
@RequestMapping
(
value
=
"updateBookAndBookType"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<?>
updateBookAndBookType
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
;
@ApiOperation
(
value
=
"校验ISBN"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"isbn"
,
value
=
"ISBN码"
,
dataType
=
"String"
,
paramType
=
"query"
)})
@RequestMapping
(
value
=
"checkISBN4App"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<
Boolean
>
checkISBN4App
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
String
isbn
)
throws
PermissionException
;
@ApiOperation
(
value
=
"根据渠道ID分页获取图书列表"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"channelId"
,
value
=
"渠道标识"
,
dataType
=
"Long"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"currentPage"
,
value
=
"当前页数"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"numPerPage"
,
value
=
"每页条数"
,
dataType
=
"int"
,
paramType
=
"query"
)})
@GetMapping
(
"getBookListByChannelId4Adviser"
)
ResponseDto
<
PageBean
>
getBookListByChannelId4Adviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
)
Integer
numPerPage
,
@RequestParam
(
value
=
"channelId"
)
Long
channelId
)
throws
PermissionException
,
JsonParseException
,
BizException
;
}
pcloud-
facad
e-book/src/main/java/com/pcloud/book/book/facade/BookFreezeFacade.java
→
pcloud-
servic
e-book/src/main/java/com/pcloud/book/book/facade/BookFreezeFacade.java
View file @
251f9f93
File moved
pcloud-
facad
e-book/src/main/java/com/pcloud/book/book/facade/BookFundFacade.java
→
pcloud-
servic
e-book/src/main/java/com/pcloud/book/book/facade/BookFundFacade.java
View file @
251f9f93
File moved
pcloud-
facad
e-book/src/main/java/com/pcloud/book/book/facade/BookProductFacade.java
→
pcloud-
servic
e-book/src/main/java/com/pcloud/book/book/facade/BookProductFacade.java
View file @
251f9f93
File moved
pcloud-
facad
e-book/src/main/java/com/pcloud/book/book/facade/BookResourceFacade.java
→
pcloud-
servic
e-book/src/main/java/com/pcloud/book/book/facade/BookResourceFacade.java
View file @
251f9f93
File moved
pcloud-
facad
e-book/src/main/java/com/pcloud/book/book/facade/BookTypeFacade.java
→
pcloud-
servic
e-book/src/main/java/com/pcloud/book/book/facade/BookTypeFacade.java
View file @
251f9f93
File moved
pcloud-service-book/src/main/java/com/pcloud/book/book/facade/impl/BookFacadeImpl.java
View file @
251f9f93
/**
*
*
*/
package
com
.
pcloud
.
book
.
book
.
facade
.
impl
;
...
...
@@ -41,684 +41,683 @@ import java.util.Map;
*/
@RequestMapping
(
"/book"
)
@RestController
(
"bookFacade"
)
@Produces
({
ContentType
.
APPLICATION_JSON_UTF_8
})
@Consumes
({
MediaType
.
APPLICATION_JSON
})
@Produces
({
ContentType
.
APPLICATION_JSON_UTF_8
})
@Consumes
({
MediaType
.
APPLICATION_JSON
})
public
class
BookFacadeImpl
implements
BookFacade
{
@Autowired
private
BookBiz
bookBiz
;
/**
* 创建书籍
*/
@Override
@RequestMapping
(
value
=
"create"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<
BookDto
>
create
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
Long
agentId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
TENANT_ID
);
String
systemCode
=
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
SYSTEM_CODE
).
toString
();
// 实体赋值
book
.
setCreatedUser
(
adviserId
);
book
.
setAgentId
(
agentId
);
BookDto
bookDto
=
bookBiz
.
create
(
book
,
systemCode
);
return
new
ResponseDto
<>(
bookDto
);
}
/**
* 修改书籍
*/
@Override
@RequestMapping
(
value
=
"update"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<?>
update
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
// 实体赋值
book
.
setLastModifiedUser
(
adviserId
);
bookBiz
.
update
(
book
);
return
new
ResponseDto
<>();
}
/**
* 修改书籍封面图
*/
@Override
@RequestMapping
(
value
=
"updateCoverImg"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<?>
updateCoverImg
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
// 实体赋值
book
.
setLastModifiedUser
(
adviserId
);
bookBiz
.
updateCoverImg
(
book
);
return
new
ResponseDto
<>();
}
/**
* 修改书籍(编辑)
*/
@Override
@RequestMapping
(
value
=
"updateByAdviser"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<
BookDto
>
updateByAdviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
// 实体赋值
Long
agentId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
TENANT_ID
);
book
.
setLastModifiedUser
(
adviserId
);
book
.
setCreatedUser
(
adviserId
);
book
.
setAgentId
(
agentId
);
BookDto
bookDto
=
bookBiz
.
updateByAdviser
(
book
);
return
new
ResponseDto
<
BookDto
>(
bookDto
);
}
/**
* 删除书籍
*/
@Override
@RequestMapping
(
value
=
"delete"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<?>
delete
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookId"
,
required
=
false
)
Long
bookId
)
throws
BizException
,
PermissionException
,
JsonParseException
{
// token
Long
partyId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
bookBiz
.
delete
(
bookId
,
partyId
);
return
new
ResponseDto
<>();
}
/**
* 批量删除书籍
*/
@Override
@RequestMapping
(
value
=
"deletes"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<?>
deletes
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookIds"
,
required
=
false
)
String
bookIds
)
throws
BizException
,
PermissionException
,
JsonParseException
{
Long
partyId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
bookBiz
.
deletes
(
bookIds
,
partyId
);
return
new
ResponseDto
<>();
}
/**
* 获取单个书籍基础信息(包含统计信息)
*/
@Override
@RequestMapping
(
value
=
"getById"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
BookDto
>
getById
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookId"
,
required
=
false
)
Long
bookId
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
)
throws
BizException
,
PermissionException
,
JsonParseException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
return
new
ResponseDto
<>(
bookBiz
.
getById
(
bookId
,
adviserId
,
channelId
));
}
/**
* 获取单个书籍基础信息
*/
@Override
@RequestMapping
(
value
=
"getBaseById"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
BookDto
>
getBaseById
(
@RequestParam
(
value
=
"bookId"
,
required
=
false
)
Long
bookId
)
throws
BizException
,
PermissionException
,
JsonParseException
{
return
new
ResponseDto
<>(
bookBiz
.
getBaseById
(
bookId
));
}
/**
* 判断书籍ISBN码是否存在
*/
@Override
@RequestMapping
(
value
=
"isbnExists"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
Boolean
>
isbnExists
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"typeCode"
,
required
=
false
)
String
typeCode
,
@RequestParam
(
value
=
"isbn"
,
required
=
false
)
String
isbn
,
@RequestParam
(
value
=
"serialNumber"
,
required
=
false
)
String
serialNumber
)
throws
BizException
,
PermissionException
,
JsonParseException
{
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
return
new
ResponseDto
<>(
bookBiz
.
isbnExists
(
typeCode
,
isbn
,
serialNumber
));
}
/**
* 判断书籍ISBN码是否存在,存在则获取书籍信息
*/
@Override
@RequestMapping
(
value
=
"isbnExistsOrGetInfo"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<
BookDto
>
isbnExistsOrGetInfo
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
book
.
setCreatedUser
(
adviserId
);
BookDto
journalDto
=
bookBiz
.
isbnExistsOrGetInfo
(
book
);
return
new
ResponseDto
<>(
journalDto
==
null
?
new
BookDto
()
:
journalDto
);
}
/**
* 判断书籍ISBN码是否存在,存在则获取书籍信息
*/
@Override
@RequestMapping
(
value
=
"isbnExistsOrGetInfo4Wechat"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<
BookDto
>
isbnExistsOrGetInfo4Wechat
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
{
Long
adviserId
=
(
Long
)
Cookie
.
getId
(
userInfo
,
Cookie
.
_PARTY_ID
);
book
.
setCreatedUser
(
adviserId
);
BookDto
bookDto
=
bookBiz
.
isbnExistsOrGetInfo
(
book
);
if
(
bookDto
==
null
)
{
bookDto
=
new
BookDto
();
bookDto
.
setIsbn
(
book
.
getIsbn
());
bookDto
.
setTypeCode
(
book
.
getTypeCode
());
}
return
new
ResponseDto
<>(
bookDto
);
}
/**
* 获取书籍列表(平台端)
*/
@Override
@Permission
(
Code
=
ServerPermissionCode
.
book
+
"book/listPage"
)
@RequestMapping
(
value
=
"listPage"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<?>
getListPage
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"publish"
,
required
=
false
)
String
publish
,
@RequestParam
(
value
=
"fundName"
,
required
=
false
)
String
fundName
,
@RequestParam
(
value
=
"bookName"
,
required
=
false
)
String
bookName
,
@RequestParam
(
value
=
"isbn"
,
required
=
false
)
String
isbn
,
@RequestParam
(
value
=
"serialNumber"
,
required
=
false
)
String
serialNumber
,
@RequestParam
(
value
=
"isCurrentMonth"
,
required
=
false
)
Integer
isCurrentMonth
,
@RequestParam
(
value
=
"currentPage"
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
)
Integer
numPerPage
)
throws
BizException
,
PermissionException
,
JsonParseException
{
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
if
(
currentPage
==
null
||
numPerPage
==
null
||
currentPage
<
0
||
numPerPage
<
0
)
{
throw
BookBizException
.
PAGE_PARAM_DELETION
;
}
return
new
ResponseDto
<
PageBeanNew
<
BookDto
>>(
bookBiz
.
getListPage
(
isbn
,
bookName
,
publish
,
fundName
,
serialNumber
,
isCurrentMonth
,
currentPage
,
numPerPage
));
}
/**
* 获取书籍列表(编辑)
*/
@Override
@RequestMapping
(
value
=
"listPage4Adviser"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
PageBean
>
getListPage4Adviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
,
@RequestParam
(
value
=
"bookName"
,
required
=
false
)
String
bookName
,
@RequestParam
(
value
=
"isbn"
,
required
=
false
)
String
isbn
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
,
@RequestParam
(
value
=
"typeCode"
,
required
=
false
)
String
typeCode
,
@RequestParam
(
value
=
"currentPage"
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
)
Integer
numPerPage
,
@RequestParam
(
value
=
"isMainEditor"
,
required
=
false
)
Integer
isMainEditor
,
@RequestParam
(
value
=
"isFundSupport"
,
required
=
false
)
Integer
isFundSupport
,
@RequestParam
(
value
=
"bookId"
,
required
=
false
)
Integer
bookId
,
@RequestParam
(
value
=
"templetId"
,
required
=
false
)
Long
templetId
)
throws
BizException
,
PermissionException
,
JsonParseException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
if
(
currentPage
==
null
||
numPerPage
==
null
||
currentPage
<
0
||
numPerPage
<
0
)
{
throw
BookBizException
.
PAGE_PARAM_DELETION
;
}
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<
String
,
Object
>();
paramMap
.
put
(
"adviserId"
,
adviserId
);
paramMap
.
put
(
"isMainEditor"
,
isMainEditor
);
paramMap
.
put
(
"isFundSupport"
,
isFundSupport
);
paramMap
.
put
(
"channelId"
,
channelId
);
paramMap
.
put
(
"bookName"
,
bookName
!=
null
&&
""
.
equals
(
bookName
.
trim
())
?
null
:
bookName
);
paramMap
.
put
(
"isbn"
,
isbn
!=
null
&&
""
.
equals
(
isbn
.
trim
())
?
null
:
isbn
);
paramMap
.
put
(
"name"
,
name
!=
null
&&
""
.
equals
(
name
.
trim
())
?
null
:
name
);
paramMap
.
put
(
"typeCode"
,
typeCode
!=
null
&&
""
.
equals
(
typeCode
.
trim
())
?
null
:
typeCode
);
paramMap
.
put
(
"bookId"
,
bookId
);
paramMap
.
put
(
"templetId"
,
templetId
);
PageBean
pageBean
=
bookBiz
.
getListPage4Adviser
(
paramMap
,
new
PageParam
(
currentPage
,
numPerPage
),
adviserId
);
return
new
ResponseDto
<>(
pageBean
);
}
@GetMapping
(
"getList4Adviser"
)
@Override
public
ResponseDto
<
List
<
BookDto
>>
getList4Adviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"num"
,
required
=
true
)
Integer
num
)
throws
BizException
,
PermissionException
,
JsonParseException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
List
<
BookDto
>
bookDtos
=
bookBiz
.
getList4Adviser
(
adviserId
,
num
);
return
new
ResponseDto
<>(
ListUtils
.
isEmpty
(
bookDtos
)?
Lists
.
newArrayList
():
bookDtos
);
}
/**
* 获取书籍详细信息
*/
@Override
@RequestMapping
(
value
=
"getDetailById"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
BookDto
>
getDetailById
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestParam
(
value
=
"bookId"
,
required
=
false
)
Long
bookId
,
@RequestParam
(
value
=
"adviserId"
,
required
=
false
)
Long
adviserId
)
throws
BizException
,
PermissionException
,
JsonParseException
{
Long
channelId
=
(
Long
)
Cookie
.
getId
(
userInfo
,
Cookie
.
_CHANNEL_ID
);
BookDto
bookDto
=
bookBiz
.
getDetailById
(
bookId
,
adviserId
,
channelId
);
return
new
ResponseDto
<>(
bookDto
==
null
?
new
BookDto
()
:
bookDto
);
}
/**
* 图书收益,获取书籍基础信息(包含统计信息)
*/
@Override
@RequestMapping
(
value
=
"getById4Profit"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
BookDto
>
getById4Profit
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookId"
,
required
=
false
)
Long
bookId
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
)
throws
BizException
,
PermissionException
,
JsonParseException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
BookDto
bookDto
=
bookBiz
.
getById4Profit
(
bookId
,
adviserId
,
channelId
);
return
new
ResponseDto
<>(
bookDto
==
null
?
new
BookDto
()
:
bookDto
);
}
/**
* 创建编辑书籍关联关系
*/
@Override
@RequestMapping
(
value
=
"setBookAdviserRelation"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<?>
setBookAdviserRelation
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
book
.
setCreatedUser
(
adviserId
);
bookBiz
.
setBookAdviserRelation
(
book
);
return
new
ResponseDto
<>();
}
/**
* 获取书籍基本信息
*/
@Override
@RequestMapping
(
value
=
"getBaseInfoById4Wechat"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
BookDto
>
getBaseInfoById4Wechat
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestParam
(
value
=
"bookId"
,
required
=
false
)
Long
bookId
)
throws
BizException
,
PermissionException
,
JsonParseException
{
Cookie
.
getId
(
userInfo
,
Cookie
.
_CHANNEL_ID
);
BookDto
bookDto
=
bookBiz
.
getBaseInfoById4Wechat
(
bookId
);
return
new
ResponseDto
<>(
bookDto
==
null
?
new
BookDto
()
:
bookDto
);
}
/**
* 获取书籍列表(微信编辑端)
*/
@Override
@RequestMapping
(
value
=
"getListPage4Wechat"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
PageBean
>
getListPage4Wechat
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestParam
(
value
=
"currentPage"
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
)
Integer
numPerPage
,
@RequestParam
(
value
=
"bookName"
,
required
=
false
)
String
bookName
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
)
throws
BizException
,
PermissionException
,
JsonParseException
{
Long
adviserId
=
(
Long
)
Cookie
.
getId
(
userInfo
,
Cookie
.
_PARTY_ID
);
if
(
currentPage
==
null
||
numPerPage
==
null
||
currentPage
<
0
||
numPerPage
<
0
)
{
throw
BookBizException
.
PAGE_PARAM_DELETION
;
}
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<
String
,
Object
>();
paramMap
.
put
(
"adviserId"
,
adviserId
);
paramMap
.
put
(
"bookName"
,
bookName
);
paramMap
.
put
(
"channelId"
,
channelId
);
PageBean
pageBean
=
bookBiz
.
getListPage4Wechat
(
paramMap
,
new
PageParam
(
currentPage
,
numPerPage
),
adviserId
);
return
new
ResponseDto
<>(
pageBean
==
null
?
new
PageBean
()
:
pageBean
);
}
/**
* 获取书籍列表(微信编辑端)
*/
@Override
@RequestMapping
(
value
=
"getlistPage"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
PageBean
>
listPage
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"currentPage"
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
)
Integer
numPerPage
,
@RequestParam
(
value
=
"bookName"
,
required
=
false
)
String
bookName
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
)
throws
BizException
,
PermissionException
,
JsonParseException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
if
(
currentPage
==
null
||
numPerPage
==
null
||
currentPage
<
0
||
numPerPage
<
0
)
{
throw
BookBizException
.
PAGE_PARAM_DELETION
;
}
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<
String
,
Object
>();
paramMap
.
put
(
"adviserId"
,
adviserId
);
paramMap
.
put
(
"bookName"
,
bookName
);
paramMap
.
put
(
"channelId"
,
channelId
);
PageBean
pageBean
=
bookBiz
.
getListPage4Wechat
(
paramMap
,
new
PageParam
(
currentPage
,
numPerPage
),
adviserId
);
return
new
ResponseDto
<>(
pageBean
==
null
?
new
PageBean
()
:
pageBean
);
}
/**
* 创建编辑书籍关联关系
*/
@Override
@RequestMapping
(
value
=
"setBookAdviserRelation4Wechat"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<?>
setBookAdviserRelation4Wechat
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
{
Long
adviserId
=
(
Long
)
Cookie
.
getId
(
userInfo
,
Cookie
.
_PARTY_ID
);
book
.
setCreatedUser
(
adviserId
);
bookBiz
.
setBookAdviserRelation
(
book
);
return
new
ResponseDto
<>();
}
/**
* 创建书籍
*/
@Override
@RequestMapping
(
value
=
"create4Wechat"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<
BookDto
>
create4Wechat
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
{
Long
adviserId
=
(
Long
)
Cookie
.
getId
(
userInfo
,
Cookie
.
_PARTY_ID
);
String
systemCode
=
(
String
)
Cookie
.
getUserInfo
(
userInfo
).
get
(
Cookie
.
_SYSTEM_CODE
);
// 实体赋值
book
.
setCreatedUser
(
adviserId
);
bookBiz
.
create
(
book
,
systemCode
);
BookDto
bookDto
=
new
BookDto
();
bookDto
.
setBookId
(
book
.
getBookId
());
return
new
ResponseDto
<>(
bookDto
);
}
/**
* 修改书籍(微信编辑端)
*/
@Override
@RequestMapping
(
value
=
"update4Wechat"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<
BookDto
>
update4Wechat
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
{
Long
adviserId
=
(
Long
)
Cookie
.
getId
(
userInfo
,
Cookie
.
_PARTY_ID
);
// 实体赋值
book
.
setLastModifiedUser
(
adviserId
);
book
.
setCreatedUser
(
adviserId
);
bookBiz
.
updateByAdviser
(
book
);
return
new
ResponseDto
<>();
}
/**
* 根据ISBN获取期刊分页列表
*/
@Override
@RequestMapping
(
value
=
"getJournalPageByIsbn"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<?>
getJournalPageByIsbn
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestParam
(
value
=
"typeCode"
,
required
=
false
)
String
typeCode
,
@RequestParam
(
value
=
"isbn"
,
required
=
false
)
String
isbn
,
@RequestParam
(
value
=
"currentPage"
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
)
Integer
numPerPage
)
throws
BizException
,
PermissionException
,
JsonParseException
{
if
(
currentPage
==
null
||
numPerPage
==
null
||
currentPage
<
0
||
numPerPage
<
0
)
{
throw
BookBizException
.
PAGE_PARAM_DELETION
;
}
Long
channelId
=
(
Long
)
Cookie
.
getId
(
userInfo
,
Cookie
.
_CHANNEL_ID
);
Long
wechatUserId
=
(
Long
)
Cookie
.
getId
(
userInfo
,
Cookie
.
_WECHAT_USER_ID
);
PageBean
pageBean
=
bookBiz
.
getJournalPageByIsbn
(
new
PageParam
(
currentPage
,
numPerPage
),
typeCode
,
isbn
,
channelId
,
wechatUserId
);
return
new
ResponseDto
<>(
pageBean
);
}
/**
* 获取书刊列表(微信客户端)
*/
@Override
@RequestMapping
(
value
=
"listPage4Wechat"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
PageBean
>
listPage4Wechat
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestParam
(
value
=
"currentPage"
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
)
Integer
numPerPage
)
throws
BizException
,
PermissionException
,
JsonParseException
{
Long
channelId
=
(
Long
)
Cookie
.
getId
(
userInfo
,
Cookie
.
_CHANNEL_ID
);
Long
wechatUserId
=
(
Long
)
Cookie
.
getId
(
userInfo
,
Cookie
.
_WECHAT_USER_ID
);
if
(
currentPage
==
null
||
numPerPage
==
null
||
currentPage
<
0
||
numPerPage
<
0
)
{
throw
BookBizException
.
PAGE_PARAM_DELETION
;
}
PageBean
pageBean
=
bookBiz
.
listPage4Wechat
(
new
PageParam
(
currentPage
,
numPerPage
),
channelId
,
wechatUserId
);
return
new
ResponseDto
<>(
pageBean
);
}
/**
* 获取编辑书刊列表-编辑首页
*/
@Override
@RequestMapping
(
value
=
"listBook"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
List
<
Object
>>
listBook
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"number"
,
required
=
false
)
Integer
number
)
throws
BizException
,
PermissionException
,
JsonParseException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
List
<
Object
>
books
=
bookBiz
.
listBook
(
adviserId
,
number
);
return
new
ResponseDto
<>(
books
);
}
/**
* 书刊列表-出版端
*/
@Override
@RequestMapping
(
value
=
"listPage4Agent"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
PageBean
>
listPage4Agent
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookName"
,
required
=
false
)
String
bookName
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
,
@RequestParam
(
value
=
"typeCode"
,
required
=
false
)
String
typeCode
,
@RequestParam
(
value
=
"currentPage"
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
)
Integer
numPerPage
,
@RequestParam
(
value
=
"mainEditorName"
,
required
=
false
)
String
mainEditorName
,
@RequestParam
(
value
=
"isFundSupport"
,
required
=
false
)
Integer
isFundSupport
,
@RequestParam
(
value
=
"isbn"
,
required
=
false
)
String
isbn
,
@RequestParam
(
value
=
"templetId"
,
required
=
false
)
Long
templetId
)
throws
BizException
,
PermissionException
,
JsonParseException
{
Long
agentId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
if
(
currentPage
==
null
||
numPerPage
==
null
||
currentPage
<
0
||
numPerPage
<
0
)
{
throw
BookBizException
.
PAGE_PARAM_DELETION
;
}
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<
String
,
Object
>();
paramMap
.
put
(
"bookName"
,
bookName
!=
null
&&
""
.
equals
(
bookName
.
trim
())
?
null
:
bookName
);
paramMap
.
put
(
"channelId"
,
channelId
);
paramMap
.
put
(
"typeCode"
,
typeCode
!=
null
&&
""
.
equals
(
typeCode
.
trim
())
?
null
:
typeCode
);
paramMap
.
put
(
"mainEditorName"
,
mainEditorName
!=
null
&&
""
.
equals
(
mainEditorName
.
trim
())
?
null
:
mainEditorName
);
paramMap
.
put
(
"isFundSupport"
,
isFundSupport
);
paramMap
.
put
(
"isbn"
,
isbn
);
paramMap
.
put
(
"templetId"
,
templetId
);
return
new
ResponseDto
<
PageBean
>(
bookBiz
.
listPage4Agent
(
new
PageParam
(
currentPage
,
numPerPage
),
paramMap
,
agentId
));
}
/**
* 获取编辑书刊列表-(APP编辑)
*/
@Override
@RequestMapping
(
value
=
"listBook4App"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
PageBean
>
listBook4App
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"currentPage"
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
)
Integer
numPerPage
,
@RequestParam
(
value
=
"bookName"
,
required
=
false
)
String
bookName
)
throws
BizException
,
PermissionException
,
JsonParseException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
PageBean
pageBean
=
bookBiz
.
listBook4App
(
adviserId
,
new
PageParam
(
currentPage
,
numPerPage
),
bookName
);
return
new
ResponseDto
<>(
pageBean
);
}
/**
* 更新图书模板
*/
@Override
@RequestMapping
(
value
=
"updateBookTemplet"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<
BookDto
>
updateBookTemplet
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
Long
agentId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
TENANT_ID
);
BookDto
bookDto
=
new
BookDto
();
bookDto
.
setSceneId
(
bookBiz
.
updateBookTemplet
(
book
,
adviserId
,
agentId
));
bookDto
.
setTempletId
(
book
.
getTempletId
());
return
new
ResponseDto
<>(
bookDto
);
}
/**
* 获取应用关联图书
*/
@Override
@RequestMapping
(
value
=
"listBookByAppId"
,
method
=
RequestMethod
.
GET
)
@Deprecated
public
ResponseDto
<
List
<
BookDto
>>
listBookByAppId
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"appId"
,
required
=
false
)
Long
appId
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
)
throws
BizException
,
PermissionException
,
JsonParseException
{
List
<
BookDto
>
bookDtos
=
bookBiz
.
listBookByAppId
(
appId
,
channelId
);
return
new
ResponseDto
<>(
bookDtos
==
null
?
new
ArrayList
<>()
:
bookDtos
);
}
/**
* 获取书籍基础信息(包含统计信息)(出版端)
*/
@Override
@RequestMapping
(
value
=
"getById4Agent"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
BookDto
>
getById4Agent
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookId"
,
required
=
false
)
Long
bookId
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
,
@RequestParam
(
value
=
"adviserId"
,
required
=
false
)
Long
adviserId
)
throws
BizException
,
PermissionException
,
JsonParseException
{
return
new
ResponseDto
<>(
bookBiz
.
getById
(
bookId
,
adviserId
,
channelId
));
}
/**
* 书刊回收站列表(30天内删除的书刊列表)
*/
@Override
@RequestMapping
(
value
=
"listPageDelete4Adviser"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
PageBean
>
listPageDelete4Adviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"currentPage"
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
)
Integer
numPerPage
)
throws
BizException
,
PermissionException
,
JsonParseException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
if
(
currentPage
==
null
||
numPerPage
==
null
||
currentPage
<
0
||
numPerPage
<
0
)
{
throw
BookBizException
.
PAGE_PARAM_DELETION
;
}
PageBean
pageBean
=
bookBiz
.
listPageDelete4Adviser
(
adviserId
,
new
PageParam
(
currentPage
,
numPerPage
));
return
new
ResponseDto
<>(
pageBean
==
null
?
new
PageBean
()
:
pageBean
);
}
/**
* 获取图书关联统计个数(商品,应用,资源)
*/
@Override
@Deprecated
@RequestMapping
(
value
=
"getCount4BookAssoc"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
BookAssocCount
>
getCount4BookAssoc
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookId"
,
required
=
false
)
Long
bookId
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
)
throws
BizException
,
PermissionException
,
JsonParseException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
BookAssocCount
bookAssocCount
=
bookBiz
.
getCount4BookAssoc
(
bookId
,
channelId
,
adviserId
);
return
new
ResponseDto
<>(
bookAssocCount
);
}
/**
* 导出出版下所有书刊excel表(出版端)
*/
@Override
@RequestMapping
(
value
=
"exportBookToExcel"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<?>
exportBookToExcel
(
@RequestHeader
(
"token"
)
String
token
)
throws
PermissionException
,
JsonParseException
,
BizException
{
Long
agentId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
bookBiz
.
exportBookToExcel
(
agentId
);
return
new
ResponseDto
<>();
}
/**
* 图书列表(平台端)
*/
@Override
@Permission
(
Code
=
ServerPermissionCode
.
book
+
"book/listBookClassify"
)
@RequestMapping
(
value
=
"listBookClassify"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
PageBean
>
listBookClassify
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"typeCode"
,
required
=
false
)
String
typeCode
,
@RequestParam
(
value
=
"templetId"
,
required
=
false
)
Long
templetId
,
@RequestParam
(
value
=
"startDate"
,
required
=
false
)
String
startDate
,
@RequestParam
(
value
=
"endDate"
,
required
=
false
)
String
endDate
,
@RequestParam
(
value
=
"bookName"
,
required
=
false
)
String
bookName
,
@RequestParam
(
value
=
"currentPage"
,
required
=
true
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
true
)
Integer
numPerPage
)
throws
BizException
,
PermissionException
,
JsonParseException
{
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
if
(
currentPage
==
null
||
numPerPage
==
null
||
currentPage
<
0
||
numPerPage
<
0
)
{
throw
BookBizException
.
PAGE_PARAM_DELETION
;
}
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"typeCode"
,
typeCode
);
paramMap
.
put
(
"templetId"
,
templetId
);
paramMap
.
put
(
"startDate"
,
startDate
);
paramMap
.
put
(
"endDate"
,
endDate
);
paramMap
.
put
(
"bookName"
,
bookName
);
PageBean
pageBean
=
bookBiz
.
listBookClassify
(
new
PageParam
(
currentPage
,
numPerPage
),
paramMap
);
return
new
ResponseDto
<>(
pageBean
);
}
/**
* 导出平台下所有书刊excel表(平台端)
*/
@Override
@RequestMapping
(
value
=
"exportBookToExcel4Platform"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<?>
exportBookToExcel4Platform
(
@RequestHeader
(
"token"
)
String
token
)
throws
PermissionException
,
JsonParseException
,
BizException
{
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
bookBiz
.
exportBookToExcel4Platform
();
return
new
ResponseDto
<>();
}
/**
* 判断书籍ISBN码是否存在,存在则获取书籍信息
*/
@Override
@RequestMapping
(
value
=
"getByIsbnAndTypeCode"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
BookDto
>
getByIsbnAndTypeCode
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"isbn"
)
String
isbn
,
@RequestParam
(
value
=
"typeCode"
)
String
typeCode
)
throws
BizException
,
PermissionException
,
JsonParseException
{
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
BookDto
bookDto
=
bookBiz
.
getByIsbnAndTypeCode
(
isbn
,
typeCode
);
return
new
ResponseDto
<>(
bookDto
==
null
?
new
BookDto
():
bookDto
);
}
/**
* 编辑新增书籍
*/
@Override
@RequestMapping
(
value
=
"create4Adviser"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<
BookDto
>
create4Adviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
Long
agentId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
TENANT_ID
);
// 实体赋值
book
.
setCreatedUser
(
adviserId
);
book
.
setAgentId
(
agentId
);
BookDto
bookDto
=
bookBiz
.
create4Adviser
(
book
);
return
new
ResponseDto
<>(
bookDto
);
}
@Override
@RequestMapping
(
value
=
"getByIsbnAndSerialNumber"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
BookDto
>
getByIsbnAndSerialNumber
(
@RequestParam
(
value
=
"isbn"
,
required
=
false
)
String
isbn
,
@RequestParam
(
value
=
"serialNumber"
,
required
=
false
)
String
serialNumber
)
throws
BizException
{
BookDto
book
=
bookBiz
.
getByIsbn
(
isbn
,
serialNumber
);
return
new
ResponseDto
<>(
book
==
null
?
new
BookDto
()
:
book
);
}
/**
* 修改图书类型与图书基本信息(编辑)
*/
@Override
@RequestMapping
(
value
=
"updateBookAndBookType"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<?>
updateBookAndBookType
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
,
JsonParseException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
// 实体赋值
book
.
setLastModifiedUser
(
adviserId
);
bookBiz
.
updateBookAndBookType
(
book
);
return
new
ResponseDto
<>();
}
@Override
@RequestMapping
(
value
=
"checkISBN4App"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
Boolean
>
checkISBN4App
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"isbn"
,
required
=
true
)
String
isbn
)
throws
PermissionException
{
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
Boolean
bool
=
bookBiz
.
checkISBN4App
(
isbn
);
return
new
ResponseDto
<>(
bool
);
}
/**
* 根据渠道ID分页获取图书列表
*/
@Override
@GetMapping
(
"getBookListByChannelId4Adviser"
)
public
ResponseDto
<
PageBean
>
getBookListByChannelId4Adviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"currentPage"
,
required
=
true
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
true
)
Integer
numPerPage
,
@RequestParam
(
value
=
"channelId"
,
required
=
true
)
Long
channelId
)
throws
PermissionException
,
JsonParseException
,
BizException
{
Long
partyId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
PageParam
pageParam
=
new
PageParam
(
currentPage
,
numPerPage
);
return
new
ResponseDto
<
PageBean
>(
bookBiz
.
getBookBaseInfoListByChannelId4Adviser
(
partyId
,
channelId
,
pageParam
));
}
@Autowired
private
BookBiz
bookBiz
;
/**
* 创建书籍
*/
@Override
@RequestMapping
(
value
=
"create"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<
BookDto
>
create
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
Long
agentId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
TENANT_ID
);
String
systemCode
=
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
SYSTEM_CODE
).
toString
();
// 实体赋值
book
.
setCreatedUser
(
adviserId
);
book
.
setAgentId
(
agentId
);
BookDto
bookDto
=
bookBiz
.
create
(
book
,
systemCode
);
return
new
ResponseDto
<>(
bookDto
);
}
/**
* 修改书籍
*/
@Override
@RequestMapping
(
value
=
"update"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<?>
update
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
// 实体赋值
book
.
setLastModifiedUser
(
adviserId
);
bookBiz
.
update
(
book
);
return
new
ResponseDto
<>();
}
/**
* 修改书籍封面图
*/
@Override
@RequestMapping
(
value
=
"updateCoverImg"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<?>
updateCoverImg
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
// 实体赋值
book
.
setLastModifiedUser
(
adviserId
);
bookBiz
.
updateCoverImg
(
book
);
return
new
ResponseDto
<>();
}
/**
* 修改书籍(编辑)
*/
@Override
@RequestMapping
(
value
=
"updateByAdviser"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<
BookDto
>
updateByAdviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
// 实体赋值
Long
agentId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
TENANT_ID
);
book
.
setLastModifiedUser
(
adviserId
);
book
.
setCreatedUser
(
adviserId
);
book
.
setAgentId
(
agentId
);
BookDto
bookDto
=
bookBiz
.
updateByAdviser
(
book
);
return
new
ResponseDto
<>(
bookDto
);
}
/**
* 删除书籍
*/
@Override
@RequestMapping
(
value
=
"delete"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<?>
delete
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookId"
)
Long
bookId
)
throws
BizException
,
PermissionException
{
// token
Long
partyId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
bookBiz
.
delete
(
bookId
,
partyId
);
return
new
ResponseDto
<>();
}
/**
* 批量删除书籍
*/
@Override
@RequestMapping
(
value
=
"deletes"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<?>
deletes
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookIds"
)
String
bookIds
)
throws
BizException
,
PermissionException
{
Long
partyId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
bookBiz
.
deletes
(
bookIds
,
partyId
);
return
new
ResponseDto
<>();
}
/**
* 获取单个书籍基础信息(包含统计信息)
*/
@Override
@RequestMapping
(
value
=
"getById"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
BookDto
>
getById
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookId"
)
Long
bookId
,
@RequestParam
(
value
=
"channelId"
)
Long
channelId
)
throws
BizException
,
PermissionException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
return
new
ResponseDto
<>(
bookBiz
.
getById
(
bookId
,
adviserId
,
channelId
));
}
/**
* 获取单个书籍基础信息
*/
@Override
@RequestMapping
(
value
=
"getBaseById"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
BookDto
>
getBaseById
(
@RequestParam
(
value
=
"bookId"
)
Long
bookId
)
throws
BizException
{
return
new
ResponseDto
<>(
bookBiz
.
getBaseById
(
bookId
));
}
/**
* 判断书籍ISBN码是否存在
*/
@Override
@RequestMapping
(
value
=
"isbnExists"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
Boolean
>
isbnExists
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"typeCode"
,
required
=
false
)
String
typeCode
,
@RequestParam
(
value
=
"isbn"
)
String
isbn
,
@RequestParam
(
value
=
"serialNumber"
,
required
=
false
)
String
serialNumber
)
throws
BizException
,
PermissionException
{
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
return
new
ResponseDto
<>(
bookBiz
.
isbnExists
(
typeCode
,
isbn
,
serialNumber
));
}
/**
* 判断书籍ISBN码是否存在,存在则获取书籍信息
*/
@Override
@RequestMapping
(
value
=
"isbnExistsOrGetInfo"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<
BookDto
>
isbnExistsOrGetInfo
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
book
.
setCreatedUser
(
adviserId
);
BookDto
journalDto
=
bookBiz
.
isbnExistsOrGetInfo
(
book
);
return
new
ResponseDto
<>(
journalDto
==
null
?
new
BookDto
()
:
journalDto
);
}
/**
* 判断书籍ISBN码是否存在,存在则获取书籍信息
*/
@Override
@RequestMapping
(
value
=
"isbnExistsOrGetInfo4Wechat"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<
BookDto
>
isbnExistsOrGetInfo4Wechat
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestBody
Book
book
)
throws
BizException
{
Long
adviserId
=
Cookie
.
getId
(
userInfo
,
Cookie
.
_PARTY_ID
);
book
.
setCreatedUser
(
adviserId
);
BookDto
bookDto
=
bookBiz
.
isbnExistsOrGetInfo
(
book
);
if
(
bookDto
==
null
)
{
bookDto
=
new
BookDto
();
bookDto
.
setIsbn
(
book
.
getIsbn
());
bookDto
.
setTypeCode
(
book
.
getTypeCode
());
}
return
new
ResponseDto
<>(
bookDto
);
}
/**
* 获取书籍列表(平台端)
*/
@Override
@Permission
(
Code
=
ServerPermissionCode
.
book
+
"book/listPage"
)
@RequestMapping
(
value
=
"listPage"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
PageBeanNew
<
BookDto
>>
getListPage
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"publish"
,
required
=
false
)
String
publish
,
@RequestParam
(
value
=
"fundName"
,
required
=
false
)
String
fundName
,
@RequestParam
(
value
=
"bookName"
,
required
=
false
)
String
bookName
,
@RequestParam
(
value
=
"isbn"
,
required
=
false
)
String
isbn
,
@RequestParam
(
value
=
"serialNumber"
,
required
=
false
)
String
serialNumber
,
@RequestParam
(
value
=
"isCurrentMonth"
,
required
=
false
)
Integer
isCurrentMonth
,
@RequestParam
(
value
=
"currentPage"
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
)
Integer
numPerPage
)
throws
BizException
,
PermissionException
{
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
if
(
currentPage
==
null
||
numPerPage
==
null
||
currentPage
<
0
||
numPerPage
<
0
)
{
throw
BookBizException
.
PAGE_PARAM_DELETION
;
}
return
new
ResponseDto
<>(
bookBiz
.
getListPage
(
isbn
,
bookName
,
publish
,
fundName
,
serialNumber
,
isCurrentMonth
,
currentPage
,
numPerPage
));
}
/**
* 获取书籍列表(编辑)
*/
@Override
@RequestMapping
(
value
=
"listPage4Adviser"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
PageBean
>
getListPage4Adviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
,
@RequestParam
(
value
=
"bookName"
,
required
=
false
)
String
bookName
,
@RequestParam
(
value
=
"isbn"
,
required
=
false
)
String
isbn
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
,
@RequestParam
(
value
=
"typeCode"
,
required
=
false
)
String
typeCode
,
@RequestParam
(
value
=
"currentPage"
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
)
Integer
numPerPage
,
@RequestParam
(
value
=
"isMainEditor"
,
required
=
false
)
Integer
isMainEditor
,
@RequestParam
(
value
=
"isFundSupport"
,
required
=
false
)
Integer
isFundSupport
,
@RequestParam
(
value
=
"bookId"
,
required
=
false
)
Integer
bookId
,
@RequestParam
(
value
=
"templetId"
,
required
=
false
)
Long
templetId
)
throws
BizException
,
PermissionException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
if
(
currentPage
==
null
||
numPerPage
==
null
||
currentPage
<
0
||
numPerPage
<
0
)
{
throw
BookBizException
.
PAGE_PARAM_DELETION
;
}
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"adviserId"
,
adviserId
);
paramMap
.
put
(
"isMainEditor"
,
isMainEditor
);
paramMap
.
put
(
"isFundSupport"
,
isFundSupport
);
paramMap
.
put
(
"channelId"
,
channelId
);
paramMap
.
put
(
"name"
,
name
!=
null
&&
""
.
equals
(
name
.
trim
())
?
null
:
name
);
paramMap
.
put
(
"isbn"
,
isbn
!=
null
&&
""
.
equals
(
isbn
.
trim
())
?
null
:
isbn
);
paramMap
.
put
(
"bookName"
,
bookName
!=
null
&&
""
.
equals
(
bookName
.
trim
())
?
null
:
bookName
);
paramMap
.
put
(
"typeCode"
,
typeCode
!=
null
&&
""
.
equals
(
typeCode
.
trim
())
?
null
:
typeCode
);
paramMap
.
put
(
"bookId"
,
bookId
);
paramMap
.
put
(
"templetId"
,
templetId
);
PageBean
pageBean
=
bookBiz
.
getListPage4Adviser
(
paramMap
,
new
PageParam
(
currentPage
,
numPerPage
),
adviserId
);
return
new
ResponseDto
<>(
pageBean
);
}
@GetMapping
(
"getList4Adviser"
)
@Override
public
ResponseDto
<
List
<
BookDto
>>
getList4Adviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"num"
)
Integer
num
)
throws
BizException
,
PermissionException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
List
<
BookDto
>
bookDtos
=
bookBiz
.
getList4Adviser
(
adviserId
,
num
);
return
new
ResponseDto
<>(
ListUtils
.
isEmpty
(
bookDtos
)
?
Lists
.
newArrayList
()
:
bookDtos
);
}
/**
* 获取书籍详细信息
*/
@Override
@RequestMapping
(
value
=
"getDetailById"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
BookDto
>
getDetailById
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestParam
(
value
=
"bookId"
,
required
=
false
)
Long
bookId
,
@RequestParam
(
value
=
"adviserId"
,
required
=
false
)
Long
adviserId
)
throws
BizException
{
Long
channelId
=
Cookie
.
getId
(
userInfo
,
Cookie
.
_CHANNEL_ID
);
BookDto
bookDto
=
bookBiz
.
getDetailById
(
bookId
,
adviserId
,
channelId
);
return
new
ResponseDto
<>(
bookDto
==
null
?
new
BookDto
()
:
bookDto
);
}
/**
* 图书收益,获取书籍基础信息(包含统计信息)
*/
@Override
@RequestMapping
(
value
=
"getById4Profit"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
BookDto
>
getById4Profit
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookId"
)
Long
bookId
,
@RequestParam
(
value
=
"channelId"
)
Long
channelId
)
throws
BizException
,
PermissionException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
BookDto
bookDto
=
bookBiz
.
getById4Profit
(
bookId
,
adviserId
,
channelId
);
return
new
ResponseDto
<>(
bookDto
==
null
?
new
BookDto
()
:
bookDto
);
}
/**
* 创建编辑书籍关联关系
*/
@Override
@RequestMapping
(
value
=
"setBookAdviserRelation"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<?>
setBookAdviserRelation
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
book
.
setCreatedUser
(
adviserId
);
bookBiz
.
setBookAdviserRelation
(
book
);
return
new
ResponseDto
<>();
}
/**
* 获取书籍基本信息
*/
@Override
@RequestMapping
(
value
=
"getBaseInfoById4Wechat"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
BookDto
>
getBaseInfoById4Wechat
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestParam
(
value
=
"bookId"
)
Long
bookId
)
throws
BizException
{
Cookie
.
getId
(
userInfo
,
Cookie
.
_CHANNEL_ID
);
BookDto
bookDto
=
bookBiz
.
getBaseInfoById4Wechat
(
bookId
);
return
new
ResponseDto
<>(
bookDto
==
null
?
new
BookDto
()
:
bookDto
);
}
/**
* 获取书籍列表(微信编辑端)
*/
@Override
@RequestMapping
(
value
=
"getListPage4Wechat"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
PageBean
>
getListPage4Wechat
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestParam
(
value
=
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
)
Integer
numPerPage
,
@RequestParam
(
value
=
"bookName"
,
required
=
false
)
String
bookName
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
)
throws
BizException
{
Long
adviserId
=
Cookie
.
getId
(
userInfo
,
Cookie
.
_PARTY_ID
);
if
(
currentPage
==
null
||
numPerPage
==
null
||
currentPage
<
0
||
numPerPage
<
0
)
{
throw
BookBizException
.
PAGE_PARAM_DELETION
;
}
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"adviserId"
,
adviserId
);
paramMap
.
put
(
"bookName"
,
bookName
);
paramMap
.
put
(
"channelId"
,
channelId
);
PageBean
pageBean
=
bookBiz
.
getListPage4Wechat
(
paramMap
,
new
PageParam
(
currentPage
,
numPerPage
),
adviserId
);
return
new
ResponseDto
<>(
pageBean
==
null
?
new
PageBean
()
:
pageBean
);
}
/**
* 获取书籍列表(微信编辑端)
*/
@Override
@RequestMapping
(
value
=
"getlistPage"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
PageBean
>
listPage
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
)
Integer
numPerPage
,
@RequestParam
(
value
=
"bookName"
,
required
=
false
)
String
bookName
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
)
throws
BizException
,
PermissionException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
if
(
currentPage
==
null
||
numPerPage
==
null
||
currentPage
<
0
||
numPerPage
<
0
)
{
throw
BookBizException
.
PAGE_PARAM_DELETION
;
}
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"adviserId"
,
adviserId
);
paramMap
.
put
(
"bookName"
,
bookName
);
paramMap
.
put
(
"channelId"
,
channelId
);
PageBean
pageBean
=
bookBiz
.
getListPage4Wechat
(
paramMap
,
new
PageParam
(
currentPage
,
numPerPage
),
adviserId
);
return
new
ResponseDto
<>(
pageBean
==
null
?
new
PageBean
()
:
pageBean
);
}
/**
* 创建编辑书籍关联关系
*/
@Override
@RequestMapping
(
value
=
"setBookAdviserRelation4Wechat"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<?>
setBookAdviserRelation4Wechat
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestBody
Book
book
)
throws
BizException
{
Long
adviserId
=
Cookie
.
getId
(
userInfo
,
Cookie
.
_PARTY_ID
);
book
.
setCreatedUser
(
adviserId
);
bookBiz
.
setBookAdviserRelation
(
book
);
return
new
ResponseDto
<>();
}
/**
* 创建书籍
*/
@Override
@RequestMapping
(
value
=
"create4Wechat"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<
BookDto
>
create4Wechat
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestBody
Book
book
)
throws
BizException
{
Long
adviserId
=
Cookie
.
getId
(
userInfo
,
Cookie
.
_PARTY_ID
);
String
systemCode
=
(
String
)
Cookie
.
getUserInfo
(
userInfo
).
get
(
Cookie
.
_SYSTEM_CODE
);
// 实体赋值
book
.
setCreatedUser
(
adviserId
);
bookBiz
.
create
(
book
,
systemCode
);
BookDto
bookDto
=
new
BookDto
();
bookDto
.
setBookId
(
book
.
getBookId
());
return
new
ResponseDto
<>(
bookDto
);
}
/**
* 修改书籍(微信编辑端)
*/
@Override
@RequestMapping
(
value
=
"update4Wechat"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<
BookDto
>
update4Wechat
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestBody
Book
book
)
throws
BizException
{
Long
adviserId
=
Cookie
.
getId
(
userInfo
,
Cookie
.
_PARTY_ID
);
// 实体赋值
book
.
setLastModifiedUser
(
adviserId
);
book
.
setCreatedUser
(
adviserId
);
bookBiz
.
updateByAdviser
(
book
);
return
new
ResponseDto
<>();
}
/**
* 根据ISBN获取期刊分页列表
*/
@Override
@RequestMapping
(
value
=
"getJournalPageByIsbn"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<?>
getJournalPageByIsbn
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestParam
(
value
=
"typeCode"
,
required
=
false
)
String
typeCode
,
@RequestParam
(
value
=
"isbn"
,
required
=
false
)
String
isbn
,
@RequestParam
(
value
=
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
)
Integer
numPerPage
)
throws
BizException
{
if
(
currentPage
<
0
||
numPerPage
<
0
)
{
throw
BookBizException
.
PAGE_PARAM_DELETION
;
}
Long
channelId
=
Cookie
.
getId
(
userInfo
,
Cookie
.
_CHANNEL_ID
);
Long
wechatUserId
=
Cookie
.
getId
(
userInfo
,
Cookie
.
_WECHAT_USER_ID
);
PageBean
pageBean
=
bookBiz
.
getJournalPageByIsbn
(
new
PageParam
(
currentPage
,
numPerPage
),
typeCode
,
isbn
,
channelId
,
wechatUserId
);
return
new
ResponseDto
<>(
pageBean
);
}
/**
* 获取书刊列表(微信客户端)
*/
@Override
@RequestMapping
(
value
=
"listPage4Wechat"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
PageBean
>
listPage4Wechat
(
@CookieValue
(
"userInfo"
)
String
userInfo
,
@RequestParam
(
value
=
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
)
Integer
numPerPage
)
throws
BizException
{
Long
channelId
=
Cookie
.
getId
(
userInfo
,
Cookie
.
_CHANNEL_ID
);
Long
wechatUserId
=
Cookie
.
getId
(
userInfo
,
Cookie
.
_WECHAT_USER_ID
);
if
(
currentPage
<
0
||
numPerPage
<
0
)
{
throw
BookBizException
.
PAGE_PARAM_DELETION
;
}
PageBean
pageBean
=
bookBiz
.
listPage4Wechat
(
new
PageParam
(
currentPage
,
numPerPage
),
channelId
,
wechatUserId
);
return
new
ResponseDto
<>(
pageBean
);
}
/**
* 获取编辑书刊列表-编辑首页
*/
@Override
@RequestMapping
(
value
=
"listBook"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
List
<
Object
>>
listBook
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"number"
)
Integer
number
)
throws
BizException
,
PermissionException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
List
<
Object
>
books
=
bookBiz
.
listBook
(
adviserId
,
number
);
return
new
ResponseDto
<>(
books
);
}
/**
* 书刊列表-出版端
*/
@Override
@RequestMapping
(
value
=
"listPage4Agent"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
PageBean
>
listPage4Agent
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookName"
,
required
=
false
)
String
bookName
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
,
@RequestParam
(
value
=
"typeCode"
,
required
=
false
)
String
typeCode
,
@RequestParam
(
value
=
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
)
Integer
numPerPage
,
@RequestParam
(
value
=
"mainEditorName"
,
required
=
false
)
String
mainEditorName
,
@RequestParam
(
value
=
"isFundSupport"
,
required
=
false
)
Integer
isFundSupport
,
@RequestParam
(
value
=
"isbn"
,
required
=
false
)
String
isbn
,
@RequestParam
(
value
=
"templetId"
,
required
=
false
)
Long
templetId
)
throws
BizException
,
PermissionException
{
Long
agentId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
if
(
currentPage
<
0
||
numPerPage
<
0
)
{
throw
BookBizException
.
PAGE_PARAM_DELETION
;
}
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"bookName"
,
bookName
!=
null
&&
""
.
equals
(
bookName
.
trim
())
?
null
:
bookName
);
paramMap
.
put
(
"channelId"
,
channelId
);
paramMap
.
put
(
"typeCode"
,
typeCode
!=
null
&&
""
.
equals
(
typeCode
.
trim
())
?
null
:
typeCode
);
paramMap
.
put
(
"mainEditorName"
,
mainEditorName
!=
null
&&
""
.
equals
(
mainEditorName
.
trim
())
?
null
:
mainEditorName
);
paramMap
.
put
(
"isFundSupport"
,
isFundSupport
);
paramMap
.
put
(
"isbn"
,
isbn
);
paramMap
.
put
(
"templetId"
,
templetId
);
return
new
ResponseDto
<>(
bookBiz
.
listPage4Agent
(
new
PageParam
(
currentPage
,
numPerPage
),
paramMap
,
agentId
));
}
/**
* 获取编辑书刊列表-(APP编辑)
*/
@Override
@RequestMapping
(
value
=
"listBook4App"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
PageBean
>
listBook4App
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"currentPage"
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
)
Integer
numPerPage
,
@RequestParam
(
value
=
"bookName"
,
required
=
false
)
String
bookName
)
throws
BizException
,
PermissionException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
PageBean
pageBean
=
bookBiz
.
listBook4App
(
adviserId
,
new
PageParam
(
currentPage
,
numPerPage
),
bookName
);
return
new
ResponseDto
<>(
pageBean
);
}
/**
* 更新图书模板
*/
@Override
@RequestMapping
(
value
=
"updateBookTemplet"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<
BookDto
>
updateBookTemplet
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
Long
agentId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
TENANT_ID
);
BookDto
bookDto
=
new
BookDto
();
bookDto
.
setSceneId
(
bookBiz
.
updateBookTemplet
(
book
,
adviserId
,
agentId
));
bookDto
.
setTempletId
(
book
.
getTempletId
());
return
new
ResponseDto
<>(
bookDto
);
}
/**
* 获取应用关联图书
*/
@Override
@RequestMapping
(
value
=
"listBookByAppId"
,
method
=
RequestMethod
.
GET
)
@Deprecated
public
ResponseDto
<
List
<
BookDto
>>
listBookByAppId
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"appId"
,
required
=
false
)
Long
appId
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
)
throws
BizException
{
List
<
BookDto
>
bookDtos
=
bookBiz
.
listBookByAppId
(
appId
,
channelId
);
return
new
ResponseDto
<>(
bookDtos
==
null
?
new
ArrayList
<>()
:
bookDtos
);
}
/**
* 获取书籍基础信息(包含统计信息)(出版端)
*/
@Override
@RequestMapping
(
value
=
"getById4Agent"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
BookDto
>
getById4Agent
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookId"
)
Long
bookId
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
,
@RequestParam
(
value
=
"adviserId"
,
required
=
false
)
Long
adviserId
)
throws
BizException
{
return
new
ResponseDto
<>(
bookBiz
.
getById
(
bookId
,
adviserId
,
channelId
));
}
/**
* 书刊回收站列表(30天内删除的书刊列表)
*/
@Override
@RequestMapping
(
value
=
"listPageDelete4Adviser"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
PageBean
>
listPageDelete4Adviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
)
Integer
numPerPage
)
throws
BizException
,
PermissionException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
if
(
currentPage
<
0
||
numPerPage
<
0
)
{
throw
BookBizException
.
PAGE_PARAM_DELETION
;
}
PageBean
pageBean
=
bookBiz
.
listPageDelete4Adviser
(
adviserId
,
new
PageParam
(
currentPage
,
numPerPage
));
return
new
ResponseDto
<>(
pageBean
==
null
?
new
PageBean
()
:
pageBean
);
}
/**
* 获取图书关联统计个数(商品,应用,资源)
*/
@Override
@Deprecated
@RequestMapping
(
value
=
"getCount4BookAssoc"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
BookAssocCount
>
getCount4BookAssoc
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookId"
)
Long
bookId
,
@RequestParam
(
value
=
"channelId"
,
required
=
false
)
Long
channelId
)
throws
BizException
,
PermissionException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
BookAssocCount
bookAssocCount
=
bookBiz
.
getCount4BookAssoc
(
bookId
,
channelId
,
adviserId
);
return
new
ResponseDto
<>(
bookAssocCount
);
}
/**
* 导出出版下所有书刊excel表(出版端)
*/
@Override
@RequestMapping
(
value
=
"exportBookToExcel"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<?>
exportBookToExcel
(
@RequestHeader
(
"token"
)
String
token
)
throws
PermissionException
,
BizException
{
Long
agentId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
bookBiz
.
exportBookToExcel
(
agentId
);
return
new
ResponseDto
<>();
}
/**
* 图书列表(平台端)
*/
@Override
@Permission
(
Code
=
ServerPermissionCode
.
book
+
"book/listBookClassify"
)
@RequestMapping
(
value
=
"listBookClassify"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
PageBean
>
listBookClassify
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"typeCode"
,
required
=
false
)
String
typeCode
,
@RequestParam
(
value
=
"templetId"
,
required
=
false
)
Long
templetId
,
@RequestParam
(
value
=
"startDate"
,
required
=
false
)
String
startDate
,
@RequestParam
(
value
=
"endDate"
,
required
=
false
)
String
endDate
,
@RequestParam
(
value
=
"bookName"
,
required
=
false
)
String
bookName
,
@RequestParam
(
value
=
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
)
Integer
numPerPage
)
throws
BizException
,
PermissionException
{
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
if
(
currentPage
==
null
||
numPerPage
==
null
||
currentPage
<
0
||
numPerPage
<
0
)
{
throw
BookBizException
.
PAGE_PARAM_DELETION
;
}
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"typeCode"
,
typeCode
);
paramMap
.
put
(
"templetId"
,
templetId
);
paramMap
.
put
(
"startDate"
,
startDate
);
paramMap
.
put
(
"endDate"
,
endDate
);
paramMap
.
put
(
"bookName"
,
bookName
);
PageBean
pageBean
=
bookBiz
.
listBookClassify
(
new
PageParam
(
currentPage
,
numPerPage
),
paramMap
);
return
new
ResponseDto
<>(
pageBean
);
}
/**
* 导出平台下所有书刊excel表(平台端)
*/
@Override
@RequestMapping
(
value
=
"exportBookToExcel4Platform"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<?>
exportBookToExcel4Platform
(
@RequestHeader
(
"token"
)
String
token
)
throws
PermissionException
,
BizException
{
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
bookBiz
.
exportBookToExcel4Platform
();
return
new
ResponseDto
<>();
}
/**
* 判断书籍ISBN码是否存在,存在则获取书籍信息
*/
@Override
@RequestMapping
(
value
=
"getByIsbnAndTypeCode"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
BookDto
>
getByIsbnAndTypeCode
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"isbn"
)
String
isbn
,
@RequestParam
(
value
=
"typeCode"
)
String
typeCode
)
throws
BizException
{
BookDto
bookDto
=
bookBiz
.
getByIsbnAndTypeCode
(
isbn
,
typeCode
);
return
new
ResponseDto
<>(
bookDto
==
null
?
new
BookDto
()
:
bookDto
);
}
/**
* 编辑新增书籍
*/
@Override
@RequestMapping
(
value
=
"create4Adviser"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<
BookDto
>
create4Adviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
Long
agentId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
TENANT_ID
);
// 实体赋值
book
.
setCreatedUser
(
adviserId
);
book
.
setAgentId
(
agentId
);
BookDto
bookDto
=
bookBiz
.
create4Adviser
(
book
);
return
new
ResponseDto
<>(
bookDto
);
}
@Override
@RequestMapping
(
value
=
"getByIsbnAndSerialNumber"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
BookDto
>
getByIsbnAndSerialNumber
(
@RequestParam
(
value
=
"isbn"
,
required
=
false
)
String
isbn
,
@RequestParam
(
value
=
"serialNumber"
,
required
=
false
)
String
serialNumber
)
throws
BizException
{
BookDto
book
=
bookBiz
.
getByIsbn
(
isbn
,
serialNumber
);
return
new
ResponseDto
<>(
book
==
null
?
new
BookDto
()
:
book
);
}
/**
* 修改图书类型与图书基本信息(编辑)
*/
@Override
@RequestMapping
(
value
=
"updateBookAndBookType"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<?>
updateBookAndBookType
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
throws
BizException
,
PermissionException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
// 实体赋值
book
.
setLastModifiedUser
(
adviserId
);
bookBiz
.
updateBookAndBookType
(
book
);
return
new
ResponseDto
<>();
}
@Override
@RequestMapping
(
value
=
"checkISBN4App"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
Boolean
>
checkISBN4App
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"isbn"
)
String
isbn
)
throws
PermissionException
{
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
Boolean
bool
=
bookBiz
.
checkISBN4App
(
isbn
);
return
new
ResponseDto
<>(
bool
);
}
/**
* 根据渠道ID分页获取图书列表
*/
@Override
@GetMapping
(
"getBookListByChannelId4Adviser"
)
public
ResponseDto
<
PageBean
>
getBookListByChannelId4Adviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
)
Integer
numPerPage
,
@RequestParam
(
value
=
"channelId"
)
Long
channelId
)
throws
PermissionException
,
BizException
{
Long
partyId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
PageParam
pageParam
=
new
PageParam
(
currentPage
,
numPerPage
);
return
new
ResponseDto
<>(
bookBiz
.
getBookBaseInfoListByChannelId4Adviser
(
partyId
,
channelId
,
pageParam
));
}
}
pcloud-service-book/src/main/java/com/pcloud/book/book/service/impl/BookServiceImpl.java
View file @
251f9f93
...
...
@@ -3,6 +3,17 @@
*/
package
com
.
pcloud
.
book
.
book
.
service
.
impl
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.pcloud.book.book.biz.BookBiz
;
import
com.pcloud.book.book.dto.BookAdviserUpdateTimeDTO
;
import
com.pcloud.book.book.dto.BookDetialDTO
;
...
...
@@ -11,12 +22,6 @@ import com.pcloud.book.book.service.BookService;
import
com.pcloud.common.dto.ResponseDto
;
import
com.pcloud.common.exceptions.BizException
;
import
com.pcloud.common.utils.ResponseHandleUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
import
java.util.Map
;
/**
* @描述:
...
...
pcloud-service-book/src/main/java/com/pcloud/book/book/set/BookSet.java
View file @
251f9f93
...
...
@@ -18,7 +18,15 @@ import com.pcloud.book.book.biz.BookFundBiz;
import
com.pcloud.book.book.dao.BookAdviserDao
;
import
com.pcloud.book.book.dao.BookFreezeDao
;
import
com.pcloud.book.book.dao.BookTypeDao
;
import
com.pcloud.book.book.dto.*
;
import
com.pcloud.book.book.dto.AdviserManageDto
;
import
com.pcloud.book.book.dto.BookAdviserDto
;
import
com.pcloud.book.book.dto.BookAppDto
;
import
com.pcloud.book.book.dto.BookDeleteDto
;
import
com.pcloud.book.book.dto.BookDto
;
import
com.pcloud.book.book.dto.BookFreezeDto
;
import
com.pcloud.book.book.dto.BookProductDto
;
import
com.pcloud.book.book.dto.BookResourceDto
;
import
com.pcloud.book.book.dto.BookTypeDto
;
import
com.pcloud.book.book.entity.BookDefendant
;
import
com.pcloud.book.book.tools.BookTools
;
import
com.pcloud.book.consumer.analysisengine.BookScanCountConsr
;
...
...
@@ -237,6 +245,7 @@ public class BookSet {
LOGGER
.
info
(
"【书刊基础】批量填充顾问名称,<END>"
);
}
/**
* 批量填充顾问名称
*/
...
...
pcloud-service-book/src/main/java/com/pcloud/book/consumer/channel/QrcodeSceneConsr.java
View file @
251f9f93
...
...
@@ -3,15 +3,6 @@
*/
package
com
.
pcloud
.
book
.
consumer
.
channel
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Component
;
import
com.pcloud.book.base.exception.BookBizException
;
import
com.pcloud.channelcenter.qrcode.dto.DefaultTempletQrcode
;
...
...
pcloud-service-book/src/main/java/com/pcloud/book/consumer/user/AgentConsr.java
View file @
251f9f93
...
...
@@ -3,6 +3,8 @@
*/
package
com
.
pcloud
.
book
.
consumer
.
user
;
import
com.pcloud.common.dto.ResponseDto
;
import
com.pcloud.usercenter.party.agent.entity.Agent
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -10,10 +12,8 @@ import org.springframework.http.ResponseEntity;
import
org.springframework.stereotype.Component
;
import
com.pcloud.channelcenter.base.exceptions.ChannelBizException
;
import
com.pcloud.common.dto.ResponseDto
;
import
com.pcloud.common.exceptions.BizException
;
import
com.pcloud.common.utils.ResponseHandleUtil
;
import
com.pcloud.usercenter.party.agent.entity.Agent
;
import
com.pcloud.usercenter.party.agent.service.AgentService
;
/**
...
...
@@ -59,7 +59,7 @@ public class AgentConsr {
throw
new
ChannelBizException
(
ChannelBizException
.
PARAM_IS_NULL
,
"运营不存在"
);
}
}
public
Long
getAgentIdByType
(
Integer
agentType
){
LOGGER
.
info
(
"根据出版端心获取出版信息【start】,参数:agentType="
+
agentType
);
if
(
agentType
==
null
){
...
...
pcloud-service-book/src/main/java/com/pcloud/book/mq/producer/BookMQProducer.java
0 → 100644
View file @
251f9f93
package
com
.
pcloud
.
book
.
mq
.
producer
;
import
com.pcloud.book.book.dto.BookCoverImgUpdateDTO
;
public
interface
BookMQProducer
{
void
sendUpdateBookCoverImgTopic
(
BookCoverImgUpdateDTO
bookCoverImgUpdateDTO
);
}
pcloud-service-book/src/main/java/com/pcloud/book/mq/producer/impl/BookProducerImpl.java
0 → 100644
View file @
251f9f93
package
com
.
pcloud
.
book
.
mq
.
producer
.
impl
;
import
com.pcloud.book.book.dto.BookCoverImgUpdateDTO
;
import
com.pcloud.book.mq.producer.BookMQProducer
;
import
com.pcloud.common.core.constant.MQTopicProducer
;
import
org.springframework.amqp.core.AmqpTemplate
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
@Component
(
"bookMQProducer"
)
public
class
BookProducerImpl
implements
BookMQProducer
{
@Resource
private
AmqpTemplate
amqpTemplate
;
@Override
public
void
sendUpdateBookCoverImgTopic
(
BookCoverImgUpdateDTO
bookCoverImgUpdateDTO
)
{
amqpTemplate
.
convertAndSend
(
MQTopicProducer
.
EXCHAGE
,
MQTopicProducer
.
UPDATE_BOOK_COVERIMG
,
bookCoverImgUpdateDTO
);
}
}
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