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
c535192f
Commit
c535192f
authored
Jan 14, 2020
by
gaopeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图书增加是否已ä¸
parent
2831113d
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
194 additions
and
52 deletions
+194
-52
BookDto.java
...-book/src/main/java/com/pcloud/book/book/dto/BookDto.java
+13
-0
BookAdviser.java
...rc/main/java/com/pcloud/book/book/entity/BookAdviser.java
+13
-0
BookAdviserBiz.java
...rc/main/java/com/pcloud/book/book/biz/BookAdviserBiz.java
+7
-0
BookBiz.java
...-book/src/main/java/com/pcloud/book/book/biz/BookBiz.java
+2
-1
BookAdviserBizImpl.java
...ava/com/pcloud/book/book/biz/impl/BookAdviserBizImpl.java
+26
-18
BookBizImpl.java
.../main/java/com/pcloud/book/book/biz/impl/BookBizImpl.java
+2
-1
BookAdviserDao.java
...rc/main/java/com/pcloud/book/book/dao/BookAdviserDao.java
+7
-0
BookAdviserDaoImpl.java
...ava/com/pcloud/book/book/dao/impl/BookAdviserDaoImpl.java
+8
-0
BookAdviserFacade.java
...n/java/com/pcloud/book/book/facade/BookAdviserFacade.java
+17
-0
BookFacade.java
...src/main/java/com/pcloud/book/book/facade/BookFacade.java
+20
-8
BookAdviserFacadeImpl.java
...m/pcloud/book/book/facade/impl/BookAdviserFacadeImpl.java
+22
-11
BookFacadeImpl.java
...java/com/pcloud/book/book/facade/impl/BookFacadeImpl.java
+12
-5
BookGroupFacade.java
...in/java/com/pcloud/book/group/facade/BookGroupFacade.java
+3
-1
BookGroupFacadeImpl.java
...om/pcloud/book/group/facade/impl/BookGroupFacadeImpl.java
+3
-1
Book.Mapper.xml
...rvice-book/src/main/resources/mapper/book/Book.Mapper.xml
+22
-5
BookAdviser.Mapper.xml
...ook/src/main/resources/mapper/book/BookAdviser.Mapper.xml
+17
-1
No files found.
pcloud-facade-book/src/main/java/com/pcloud/book/book/dto/BookDto.java
View file @
c535192f
...
...
@@ -613,6 +613,11 @@ public class BookDto extends BaseDto {
*/
private
BigDecimal
adviserIncome
;
/**
* 是否已下印
*/
private
Boolean
isPrint
;
public
String
getQrRemark
()
{
return
qrRemark
;
}
...
...
@@ -1632,6 +1637,14 @@ public class BookDto extends BaseDto {
public
void
setAdviserIncome
(
BigDecimal
adviserIncome
)
{
this
.
adviserIncome
=
adviserIncome
;
}
public
Boolean
getIsPrint
()
{
return
isPrint
;
}
public
void
setIsPrint
(
Boolean
isPrint
)
{
this
.
isPrint
=
isPrint
;
}
@Override
public
String
toString
()
{
...
...
pcloud-facade-book/src/main/java/com/pcloud/book/book/entity/BookAdviser.java
View file @
c535192f
...
...
@@ -87,6 +87,11 @@ public class BookAdviser extends BaseEntity {
* 地域标签id
*/
private
Long
areaLabelId
;
/**
* 是否已下印
*/
private
Boolean
isPrint
;
public
Long
getTempletId
()
{
return
templetId
;
...
...
@@ -199,6 +204,14 @@ public class BookAdviser extends BaseEntity {
public
void
setAreaLabelId
(
Long
areaLabelId
)
{
this
.
areaLabelId
=
areaLabelId
;
}
public
Boolean
getIsPrint
()
{
return
isPrint
;
}
public
void
setIsPrint
(
Boolean
isPrint
)
{
this
.
isPrint
=
isPrint
;
}
@Override
public
String
toString
()
{
...
...
pcloud-service-book/src/main/java/com/pcloud/book/book/biz/BookAdviserBiz.java
View file @
c535192f
...
...
@@ -189,4 +189,11 @@ public interface BookAdviserBiz {
void
refactorData
(
Long
parentId
,
Long
originTempletId
,
Long
secondTempletId
);
PageBeanNew
<
ErpAdviserBookVO
>
listAdviserBook4Erp
(
String
isbn
,
String
uniqueNumber
,
String
adviserName
,
Integer
currentPage
,
Integer
numPerPage
);
/**
* 设置书刊是否已下印状态
* @param bookAdviser 图书编辑关联实体
* @throws BizException
*/
void
setIsPrint
(
BookAdviser
bookAdviser
)
throws
BizException
;
}
pcloud-service-book/src/main/java/com/pcloud/book/book/biz/BookBiz.java
View file @
c535192f
...
...
@@ -210,10 +210,11 @@ public interface BookBiz {
* 首页展示正在做的图书
* @param adviserId
* @param num
* @param isPrint
* @return
* @throws BizException
*/
List
<
BookDto
>
getList4Adviser
(
Long
adviserId
,
Integer
num
)
throws
BizException
;
List
<
BookDto
>
getList4Adviser
(
Long
adviserId
,
Integer
num
,
Boolean
isPrint
)
throws
BizException
;
/**
* 微信端获取书籍列表(编辑)
*
...
...
pcloud-service-book/src/main/java/com/pcloud/book/book/biz/impl/BookAdviserBizImpl.java
View file @
c535192f
package
com
.
pcloud
.
book
.
book
.
biz
.
impl
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.dao.DataIntegrityViolationException
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.pcloud.book.base.dto.CountDto
;
import
com.pcloud.book.base.exception.BookBizException
;
import
com.pcloud.book.book.biz.BookAdviserBiz
;
...
...
@@ -42,23 +56,6 @@ import com.pcloud.common.utils.ListUtils;
import
com.pcloud.common.utils.string.StringUtil
;
import
com.pcloud.raystask.entity.AdviserDefault
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.dao.DataIntegrityViolationException
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* @描述:编辑管理书籍逻辑层接口实现类
* @作者:songx
...
...
@@ -802,4 +799,15 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
}
return
pageBeanNew
;
}
/**
* 设置书刊是否已下印状态
*/
@Override
public
void
setIsPrint
(
BookAdviser
bookAdviser
)
throws
BizException
{
if
(
null
==
bookAdviser
.
getBookId
()
||
null
==
bookAdviser
.
getIsPrint
())
{
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"参数有误!"
);
}
bookAdviserDao
.
setIsPrint
(
bookAdviser
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/book/biz/impl/BookBizImpl.java
View file @
c535192f
...
...
@@ -780,10 +780,11 @@ public class BookBizImpl implements BookBiz {
@ParamLog
(
description
=
"首页展示正在做的图书"
,
isAfterReturn
=
false
)
@Override
public
List
<
BookDto
>
getList4Adviser
(
Long
adviserId
,
Integer
num
)
throws
BizException
{
public
List
<
BookDto
>
getList4Adviser
(
Long
adviserId
,
Integer
num
,
Boolean
isPrint
)
throws
BizException
{
Map
<
String
,
Object
>
paramMap
=
Maps
.
newHashMap
();
paramMap
.
put
(
"adviserId"
,
adviserId
);
paramMap
.
put
(
"num"
,
num
);
paramMap
.
put
(
"isPrint"
,
isPrint
);
paramMap
.
put
(
"isbns"
,
BookConstant
.
DEFAULT_BOOK_ISBN
);
List
<
BookDto
>
bookDtos
=
bookDao
.
getList4Adviser
(
paramMap
);
if
(!
ListUtils
.
isEmpty
(
bookDtos
))
{
...
...
pcloud-service-book/src/main/java/com/pcloud/book/book/dao/BookAdviserDao.java
View file @
c535192f
...
...
@@ -245,4 +245,11 @@ public interface BookAdviserDao extends BaseDao<BookAdviser> {
* 刷数据使用,请勿使用
*/
int
updateBookBySecondTempletId
(
Long
parentId
,
Long
originTempletId
,
Long
secondTempletId
);
/**
* 设置书刊是否已下印状态
* @param bookAdviser 图书编辑关联关系
* @return
*/
long
setIsPrint
(
BookAdviser
bookAdviser
);
}
pcloud-service-book/src/main/java/com/pcloud/book/book/dao/impl/BookAdviserDaoImpl.java
View file @
c535192f
...
...
@@ -243,4 +243,12 @@ public class BookAdviserDaoImpl extends BaseDaoImpl<BookAdviser> implements Book
map
.
put
(
"secondTempletId"
,
secondTempletId
);
return
getSqlSession
().
update
(
getStatement
(
"updateBookBySecondTempletId"
),
map
);
}
/**
* 设置书刊是否已下印状态
*/
@Override
public
long
setIsPrint
(
BookAdviser
bookAdviser
)
{
return
super
.
getSqlSession
().
update
(
getStatement
(
"setIsPrint"
),
bookAdviser
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/book/facade/BookAdviserFacade.java
View file @
c535192f
...
...
@@ -199,4 +199,21 @@ public interface BookAdviserFacade {
@RequestParam
(
value
=
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
)
Integer
numPerPage
)
throws
PermissionException
,
JsonParseException
,
BizException
;
/**
* 设置书刊是否已下印状态
* @param token
* @param bookAdviser
* @return
* @throws BizException
* @throws PermissionException
* @throws JsonParseException
*/
@ApiOperation
(
value
=
"设置书刊是否已下印状态"
,
httpMethod
=
"POST"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"bookAdviser"
,
value
=
"编辑书籍关系实体"
,
dataType
=
"BookAdviser"
,
paramType
=
"body"
)
})
@RequestMapping
(
value
=
"setIsPrint"
,
method
=
RequestMethod
.
POST
)
ResponseDto
<?>
setIsPrint
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
BookAdviser
bookAdviser
)
throws
BizException
,
PermissionException
,
JsonParseException
;
}
pcloud-service-book/src/main/java/com/pcloud/book/book/facade/BookFacade.java
View file @
c535192f
...
...
@@ -150,7 +150,9 @@ public interface BookFacade {
@ApiImplicitParam
(
name
=
"bookId"
,
value
=
"书籍标识"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"templetId"
,
value
=
"图书类型标识"
,
dataType
=
"long"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"bookStatus"
,
value
=
"图书版权保护状态"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"hasQrcode"
,
value
=
"只看有二维码"
,
dataType
=
"int"
,
paramType
=
"query"
)})
@ApiImplicitParam
(
name
=
"hasQrcode"
,
value
=
"只看有二维码"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"isPrint"
,
value
=
"是否已下印"
,
dataType
=
"Boolean"
,
paramType
=
"query"
)
})
@RequestMapping
(
value
=
"listPage4Adviser"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<
PageBean
>
getListPage4Adviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
,
...
...
@@ -166,14 +168,18 @@ public interface BookFacade {
@RequestParam
(
value
=
"templetId"
,
required
=
false
)
Long
templetId
,
@RequestParam
(
value
=
"bookStatus"
,
required
=
false
)
Integer
bookStatus
,
@RequestParam
(
value
=
"secondTempletId"
,
required
=
false
)
Long
secondTempletId
,
@RequestParam
(
value
=
"hasQrcode"
,
required
=
false
)
Integer
hasQrcode
)
@RequestParam
(
value
=
"hasQrcode"
,
required
=
false
)
Integer
hasQrcode
,
@RequestParam
(
value
=
"isPrint"
,
required
=
false
)
Boolean
isPrint
)
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"
)})
@ApiImplicitParam
(
name
=
"num"
,
value
=
"个数"
,
dataType
=
"Integer"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"isPrint"
,
value
=
"是否已下印"
,
dataType
=
"Boolean"
,
paramType
=
"query"
)
})
@GetMapping
(
"getList4Adviser"
)
ResponseDto
<
List
<
BookDto
>>
getList4Adviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"num"
)
Integer
num
)
throws
BizException
,
PermissionException
,
JsonParseException
;
ResponseDto
<
List
<
BookDto
>>
getList4Adviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"num"
)
Integer
num
,
@RequestParam
(
value
=
"isPrint"
,
required
=
false
)
Boolean
isPrint
)
throws
BizException
,
PermissionException
,
JsonParseException
;
@ApiOperation
(
value
=
"获取书籍的详细信息(微信客户端)"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
...
...
@@ -370,7 +376,9 @@ public interface BookFacade {
@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"
),
@ApiImplicitParam
(
name
=
"secondTempletId"
,
value
=
"图书类型二级标识"
,
dataType
=
"long"
,
paramType
=
"query"
)})
@ApiImplicitParam
(
name
=
"secondTempletId"
,
value
=
"图书类型二级标识"
,
dataType
=
"long"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"isPrint"
,
value
=
"是否已下印"
,
dataType
=
"Boolean"
,
paramType
=
"query"
)
})
@RequestMapping
(
value
=
"listPage4Agent"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<
PageBean
>
listPage4Agent
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookName"
,
required
=
false
)
String
bookName
,
...
...
@@ -382,7 +390,8 @@ public interface BookFacade {
@RequestParam
(
value
=
"isFundSupport"
,
required
=
false
)
Integer
isFundSupport
,
@RequestParam
(
value
=
"isbn"
,
required
=
false
)
String
isbn
,
@RequestParam
(
value
=
"templetId"
,
required
=
false
)
Long
templetId
,
@RequestParam
(
value
=
"secondTempletId"
,
required
=
false
)
Long
secondTempletId
)
@RequestParam
(
value
=
"secondTempletId"
,
required
=
false
)
Long
secondTempletId
,
@RequestParam
(
value
=
"isPrint"
,
required
=
false
)
Boolean
isPrint
)
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
...
...
@@ -476,7 +485,9 @@ public interface BookFacade {
@ApiImplicitParam
(
name
=
"bookName"
,
value
=
"书刊名称"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"currentPage"
,
value
=
"当前页数"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"numPerPage"
,
value
=
"每页条数"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"secondTempletId"
,
value
=
"书刊分类二级列表标识"
,
dataType
=
"long"
,
paramType
=
"query"
)})
@ApiImplicitParam
(
name
=
"secondTempletId"
,
value
=
"书刊分类二级列表标识"
,
dataType
=
"long"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"isPrint"
,
value
=
"是否已下印"
,
dataType
=
"Boolean"
,
paramType
=
"query"
)
})
@RequestMapping
(
value
=
"listBookClassify"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<
PageBean
>
listBookClassify
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"typeCode"
,
required
=
false
)
String
typeCode
,
...
...
@@ -487,7 +498,8 @@ public interface BookFacade {
@RequestParam
(
value
=
"publish"
,
required
=
false
)
String
publish
,
@RequestParam
(
value
=
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
)
Integer
numPerPage
,
@RequestParam
(
value
=
"secondTempletId"
,
required
=
false
)
Long
secondTempletId
)
@RequestParam
(
value
=
"secondTempletId"
,
required
=
false
)
Long
secondTempletId
,
@RequestParam
(
value
=
"isPrint"
,
required
=
false
)
Boolean
isPrint
)
throws
BizException
,
PermissionException
,
JsonParseException
;
...
...
pcloud-service-book/src/main/java/com/pcloud/book/book/facade/impl/BookAdviserFacadeImpl.java
View file @
c535192f
...
...
@@ -3,6 +3,16 @@
*/
package
com
.
pcloud
.
book
.
book
.
facade
.
impl
;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.codehaus.jackson.JsonParseException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestHeader
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.pcloud.book.base.dto.CountDto
;
import
com.pcloud.book.book.biz.BookAdviserBiz
;
import
com.pcloud.book.book.dto.AdviserManageDto
;
...
...
@@ -14,17 +24,6 @@ import com.pcloud.common.dto.ResponseDto;
import
com.pcloud.common.exceptions.BizException
;
import
com.pcloud.common.permission.PermissionException
;
import
com.pcloud.common.utils.SessionUtil
;
import
org.codehaus.jackson.JsonParseException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestHeader
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* @描述:顾问书籍管理接口实现类
...
...
@@ -180,4 +179,16 @@ public class BookAdviserFacadeImpl implements BookAdviserFacade {
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
return
new
ResponseDto
<>(
bookAdviserBiz
.
listAdviserBook4Erp
(
isbn
,
uniqueNumber
,
adviserName
,
currentPage
,
numPerPage
));
}
/**
* 设置书刊是否已下印状态
*/
@Override
@RequestMapping
(
value
=
"setIsPrint"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<?>
setIsPrint
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
BookAdviser
bookAdviser
)
throws
BizException
,
PermissionException
,
JsonParseException
{
SessionUtil
.
getToken4Redis
(
token
);
bookAdviserBiz
.
setIsPrint
(
bookAdviser
);
return
new
ResponseDto
<>();
}
}
pcloud-service-book/src/main/java/com/pcloud/book/book/facade/impl/BookFacadeImpl.java
View file @
c535192f
...
...
@@ -258,7 +258,8 @@ public class BookFacadeImpl implements BookFacade {
@RequestParam
(
value
=
"templetId"
,
required
=
false
)
Long
templetId
,
@RequestParam
(
value
=
"bookStatus"
,
required
=
false
)
Integer
bookStatus
,
@RequestParam
(
value
=
"secondTempletId"
,
required
=
false
)
Long
secondTempletId
,
@RequestParam
(
value
=
"hasQrcode"
,
required
=
false
)
Integer
hasQrcode
)
@RequestParam
(
value
=
"hasQrcode"
,
required
=
false
)
Integer
hasQrcode
,
@RequestParam
(
value
=
"isPrint"
,
required
=
false
)
Boolean
isPrint
)
throws
BizException
,
PermissionException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
if
(
currentPage
==
null
||
numPerPage
==
null
||
currentPage
<
0
||
numPerPage
<
0
)
{
...
...
@@ -278,15 +279,17 @@ public class BookFacadeImpl implements BookFacade {
paramMap
.
put
(
"bookStatus"
,
bookStatus
);
paramMap
.
put
(
"secondTempletId"
,
secondTempletId
);
paramMap
.
put
(
"secondTempletIds"
,
Optional
.
ofNullable
(
paramMap
.
get
(
"secondTempletId"
)).
map
(
Lists:
:
newArrayList
).
orElse
(
Lists
.
newArrayList
()));
paramMap
.
put
(
"isPrint"
,
isPrint
);
PageBean
pageBean
=
bookBiz
.
getListPage4Adviser
(
paramMap
,
new
PageParam
(
currentPage
,
numPerPage
),
adviserId
,
hasQrcode
);
return
new
ResponseDto
<>(
pageBean
);
}
@GetMapping
(
"getList4Adviser"
)
@Override
public
ResponseDto
<
List
<
BookDto
>>
getList4Adviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"num"
)
Integer
num
)
throws
BizException
,
PermissionException
{
public
ResponseDto
<
List
<
BookDto
>>
getList4Adviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"num"
)
Integer
num
,
@RequestParam
(
value
=
"isPrint"
,
required
=
false
)
Boolean
isPrint
)
throws
BizException
,
PermissionException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
List
<
BookDto
>
bookDtos
=
bookBiz
.
getList4Adviser
(
adviserId
,
num
);
List
<
BookDto
>
bookDtos
=
bookBiz
.
getList4Adviser
(
adviserId
,
num
,
isPrint
);
return
new
ResponseDto
<>(
ListUtils
.
isEmpty
(
bookDtos
)
?
Lists
.
newArrayList
()
:
bookDtos
);
}
...
...
@@ -503,7 +506,8 @@ public class BookFacadeImpl implements BookFacade {
@RequestParam
(
value
=
"isFundSupport"
,
required
=
false
)
Integer
isFundSupport
,
@RequestParam
(
value
=
"isbn"
,
required
=
false
)
String
isbn
,
@RequestParam
(
value
=
"templetId"
,
required
=
false
)
Long
templetId
,
@RequestParam
(
value
=
"secondTempletId"
,
required
=
false
)
Long
secondTempletId
)
@RequestParam
(
value
=
"secondTempletId"
,
required
=
false
)
Long
secondTempletId
,
@RequestParam
(
value
=
"isPrint"
,
required
=
false
)
Boolean
isPrint
)
throws
BizException
,
PermissionException
{
Long
agentId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
if
(
currentPage
<
0
||
numPerPage
<
0
)
{
...
...
@@ -520,6 +524,7 @@ public class BookFacadeImpl implements BookFacade {
paramMap
.
put
(
"templetId"
,
templetId
);
paramMap
.
put
(
"secondTempletId"
,
secondTempletId
);
paramMap
.
put
(
"secondTempletIds"
,
Optional
.
ofNullable
(
paramMap
.
get
(
"secondTempletId"
)).
map
(
Lists:
:
newArrayList
).
orElse
(
Lists
.
newArrayList
()));
paramMap
.
put
(
"isPrint"
,
isPrint
);
return
new
ResponseDto
<>(
bookBiz
.
listPage4Agent
(
new
PageParam
(
currentPage
,
numPerPage
),
paramMap
,
agentId
));
}
...
...
@@ -638,7 +643,8 @@ public class BookFacadeImpl implements BookFacade {
@RequestParam
(
value
=
"publish"
,
required
=
false
)
String
publish
,
@RequestParam
(
value
=
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
)
Integer
numPerPage
,
@RequestParam
(
value
=
"secondTempletId"
,
required
=
false
)
Long
secondTempletId
)
@RequestParam
(
value
=
"secondTempletId"
,
required
=
false
)
Long
secondTempletId
,
@RequestParam
(
value
=
"isPrint"
,
required
=
false
)
Boolean
isPrint
)
throws
BizException
,
PermissionException
{
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
if
(
currentPage
==
null
||
numPerPage
==
null
||
currentPage
<
0
||
numPerPage
<
0
)
{
...
...
@@ -657,6 +663,7 @@ public class BookFacadeImpl implements BookFacade {
String
[]
bookNameList
=
bookName
.
trim
().
split
(
"\\s+"
);
paramMap
.
put
(
"bookNameList"
,
Lists
.
newArrayList
(
bookNameList
));
}
paramMap
.
put
(
"isPrint"
,
isPrint
);
PageBean
pageBean
=
bookBiz
.
listBookClassify
(
new
PageParam
(
currentPage
,
numPerPage
),
paramMap
);
return
new
ResponseDto
<>(
pageBean
);
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/facade/BookGroupFacade.java
View file @
c535192f
...
...
@@ -137,6 +137,7 @@ public interface BookGroupFacade {
@ApiImplicitParam
(
name
=
"startDate"
,
value
=
"开始时间"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"endDate"
,
value
=
"结束时间"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"hasServe"
,
value
=
"结束时间"
,
dataType
=
"boolean"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"isPrint"
,
value
=
"是否已下印"
,
dataType
=
"Boolean"
,
paramType
=
"query"
)
})
@RequestMapping
(
value
=
"listBookGroup4Adviser"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<
PageBean
>
listBookGroup4Adviser
(
@RequestHeader
(
"token"
)
String
token
,
...
...
@@ -153,7 +154,8 @@ public interface BookGroupFacade {
@RequestParam
(
value
=
"joinGroupType"
,
required
=
false
)
String
joinGroupType
,
@RequestParam
(
value
=
"startDate"
,
required
=
false
)
String
startDate
,
@RequestParam
(
value
=
"endDate"
,
required
=
false
)
String
endDate
,
@RequestParam
(
value
=
"hasServe"
,
required
=
false
)
Boolean
hasServe
)
@RequestParam
(
value
=
"hasServe"
,
required
=
false
)
Boolean
hasServe
,
@RequestParam
(
value
=
"isPrint"
,
required
=
false
)
Boolean
isPrint
)
throws
BizException
,
PermissionException
;
@ApiOperation
(
value
=
"获取社群书列表(运营)"
,
httpMethod
=
"POST"
)
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/facade/impl/BookGroupFacadeImpl.java
View file @
c535192f
...
...
@@ -198,7 +198,8 @@ public class BookGroupFacadeImpl implements BookGroupFacade {
@RequestParam
(
value
=
"joinGroupType"
,
required
=
false
)
String
joinGroupType
,
@RequestParam
(
value
=
"startDate"
,
required
=
false
)
String
startDate
,
@RequestParam
(
value
=
"endDate"
,
required
=
false
)
String
endDate
,
@RequestParam
(
value
=
"hasServe"
,
required
=
false
)
Boolean
hasServe
)
@RequestParam
(
value
=
"hasServe"
,
required
=
false
)
Boolean
hasServe
,
@RequestParam
(
value
=
"isPrint"
,
required
=
false
)
Boolean
isPrint
)
throws
BizException
,
PermissionException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
if
(
currentPage
==
null
||
numPerPage
==
null
||
currentPage
<
0
||
numPerPage
<
0
)
{
...
...
@@ -228,6 +229,7 @@ public class BookGroupFacadeImpl implements BookGroupFacade {
paramMap
.
put
(
"endDate"
,
endDate
+
" 23:59:59"
);
}
paramMap
.
put
(
"hasServe"
,
hasServe
);
paramMap
.
put
(
"isPrint"
,
isPrint
);
PageBean
pageBean
=
bookGroupBiz
.
listBookGroup4Adviser
(
paramMap
,
new
PageParam
(
currentPage
,
numPerPage
),
adviserId
);
return
new
ResponseDto
<>(
pageBean
);
}
...
...
pcloud-service-book/src/main/resources/mapper/book/Book.Mapper.xml
View file @
c535192f
...
...
@@ -290,7 +290,7 @@
B.BOOK_ID, B.TYPE_CODE,B.ISBN, B.BOOK_NAME,T.TYPE_NAME, B.REMARK, B.AUTHOR, B.PUBLISH,
B.PUBLISH_DATE, B.COVER_IMG, B.AD_IMG, B.DETAIL, B.`VERSION`,B.BOOK_PRICE,B.ISSN,B.SERIAL_NUMBER,BA.IS_MAIN_EDITOR,
IF(ISNULL(BF.BOOK_FUND_ID),0,1) IS_FUND_SUPPORT,START_TIME,END_TIME,BA.TEMPLET_ID,BA.SECOND_TEMPLET_ID,
BA.GRA_LABEL_ID,BA.SUB_LABEL_ID,BA.VER_LABEL_ID,BA.AREA_LABEL_ID
BA.GRA_LABEL_ID,BA.SUB_LABEL_ID,BA.VER_LABEL_ID,BA.AREA_LABEL_ID
, BA.IS_PRINT isPrint
FROM
BOOK_ADVISER BA
INNER JOIN
...
...
@@ -467,7 +467,7 @@
A.BOOK_ID, A.CHANNEL_ID, A.ADVISER_ID, A.IS_MAIN_EDITOR, T.TYPE_CODE, T.TYPE_NAME, B.ISBN, B.BOOK_NAME, B.REMARK,
B.AUTHOR, B.PUBLISH, B.PUBLISH_DATE, B.COVER_IMG, B.ORIGIN_NAME, B.BOOK_PRICE, B.ISSN, B.BOOK_NUM, B.SERIAL_NUMBER,
IF(ISNULL(BF.BOOK_FUND_ID),0,1) IS_FUND_SUPPORT,A.TEMPLET_ID, if(G.ID IS NULL, A.LAST_MODIFIED_DATE, G.UPDATE_TIME) LAST_MODIFIED_DATE,
A.BOOK_ADVISER_ID,I.BOOK_STATUS, CONCAT('BK',A.BOOK_ID) uniqueNumber, if(G.ID IS NULL, 0, 1) isBookGroup
A.BOOK_ADVISER_ID,I.BOOK_STATUS, CONCAT('BK',A.BOOK_ID) uniqueNumber, if(G.ID IS NULL, 0, 1) isBookGroup
, A.IS_PRINT isPrint
FROM
BOOK_ADVISER A
INNER JOIN BOOK B ON A.BOOK_ID = B.BOOK_ID AND A.ADVISER_ID = #{adviserId} AND A.IS_DELETE = 0 AND B.IS_DELETE = 0
...
...
@@ -531,6 +531,10 @@
AND
I.book_status = #{bookStatus}
</if>
<if
test=
"isPrint != null"
>
AND
A.IS_PRINT = #{isPrint}
</if>
<if
test=
"bookIds != null"
>
<foreach
collection=
"bookIds"
index=
"index"
item=
"item"
open=
"and ("
separator=
"or"
close=
")"
>
<if
test=
"item.bookId != null and item.channelId != null"
>
...
...
@@ -580,7 +584,7 @@
WHEN 1 then bk.id
WHEN 2 THEN bgs.id
WHEN 3 THEN srk.id
else null END,0)=0,0,1)as has_serve
else null END,0)=0,0,1)as has_serve
, A.IS_PRINT isPrint
FROM
book_group G
LEFT JOIN BOOK_ADVISER A ON G.BOOK_ID = A.BOOK_ID AND G.CHANNEL_ID = A.CHANNEL_ID AND G.CREATE_USER = A.ADVISER_ID
...
...
@@ -649,6 +653,9 @@
<if
test=
"hasServe!=null and hasServe==false"
>
having has_serve=0
</if>
<if
test=
"isPrint != null"
>
AND A.IS_PRINT = #{isPrint}
</if>
ORDER BY
G.UPDATE_TIME DESC
</select>
...
...
@@ -1105,7 +1112,7 @@
SELECT
A.BOOK_ID, A.CHANNEL_ID, A.ADVISER_ID, A.IS_MAIN_EDITOR, T.TYPE_CODE, T.TYPE_NAME, B.ISBN, B.BOOK_NAME, B.REMARK,
B.AUTHOR, B.PUBLISH, B.PUBLISH_DATE, B.COVER_IMG, B.ORIGIN_NAME, B.BOOK_PRICE, B.ISSN, B.BOOK_NUM, B.SERIAL_NUMBER,
IF(ISNULL(BF.BOOK_FUND_ID),0,1) IS_FUND_SUPPORT, A.TEMPLET_ID
IF(ISNULL(BF.BOOK_FUND_ID),0,1) IS_FUND_SUPPORT, A.TEMPLET_ID
, A.IS_PRINT isPrint
FROM
BOOK_ADVISER A
INNER JOIN
...
...
@@ -1167,6 +1174,10 @@
AND
BF.BOOK_FUND_ID IS NOT NULL
</if>
<if
test=
"isPrint != null"
>
AND
A.IS_PRINT = #{isPrint}
</if>
GROUP BY A.BOOK_ID, A.CHANNEL_ID
ORDER BY
A.CREATED_DATE DESC
...
...
@@ -1292,7 +1303,7 @@
SELECT
b.BOOK_ID, b.BOOK_NAME, b.COVER_IMG, b.ISBN,b.SERIAL_NUMBER, b.PUBLISH,
ba.ADVISER_ID, ba.TEMPLET_ID, ba.CHANNEL_ID, ba.CREATED_DATE,
bt.TYPE_NAME
bt.TYPE_NAME
, ba.IS_PRINT isPrint
FROM
BOOK_ADVISER ba
JOIN
...
...
@@ -1338,6 +1349,9 @@
<if
test=
"publish!=null"
>
AND b.PUBLISH LIKE CONCAT('%', #{publish},'%')
</if>
<if
test=
"isPrint != null"
>
AND ba.IS_PRINT = #{isPrint}
</if>
</select>
<select
id=
"listBookClassifyCount"
resultType=
"Long"
parameterType=
"map"
>
...
...
@@ -1386,6 +1400,9 @@
<if
test=
"publish!=null"
>
AND b.PUBLISH LIKE CONCAT('%', #{publish},'%')
</if>
<if
test=
"isPrint != null"
>
AND ba.IS_PRINT = #{isPrint}
</if>
</select>
...
...
pcloud-service-book/src/main/resources/mapper/book/BookAdviser.Mapper.xml
View file @
c535192f
...
...
@@ -230,7 +230,8 @@
UPDATE
BOOK_ADVISER
SET
IS_DELETE = 1
IS_DELETE = 1,
LAST_MODIFIED_DATE = NOW()
WHERE
BOOK_ID = #{bookId, jdbcType=BIGINT}
AND
...
...
@@ -392,6 +393,7 @@
<if
test=
"areaLabelId!=null"
>
,AREA_LABEL_ID = #{areaLabelId, jdbcType=BIGINT}
</if>
, LAST_MODIFIED_DATE = NOW()
WHERE
BOOK_ID = #{bookId, jdbcType=BIGINT}
AND
...
...
@@ -593,4 +595,17 @@
ORDER BY
ba.CREATED_DATE DESC
</select>
<!-- 设置书刊是否已下印状态 -->
<update
id=
"setIsPrint"
parameterType=
"bookAdviser"
>
update
book_adviser
set
IS_PRINT = #{isPrint}
where
BOOK_ID = #{bookId}
<if
test=
"channelId != null"
>
and CHANNEL_ID = #{channelId}
</if>
</update>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment