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
491da427
Commit
491da427
authored
Jul 08, 2020
by
郑勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: [1003176] 策划部管理新增数据筛选与自定义标签
parent
80b1026e
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
69 additions
and
0 deletions
+69
-0
BookService.java
...c/main/java/com/pcloud/book/book/service/BookService.java
+6
-0
BookBiz.java
...-book/src/main/java/com/pcloud/book/book/biz/BookBiz.java
+2
-0
BookLabelBiz.java
.../src/main/java/com/pcloud/book/book/biz/BookLabelBiz.java
+5
-0
BookBizImpl.java
.../main/java/com/pcloud/book/book/biz/impl/BookBizImpl.java
+11
-0
BookLabelBizImpl.java
.../java/com/pcloud/book/book/biz/impl/BookLabelBizImpl.java
+13
-0
BookLabelDao.java
.../src/main/java/com/pcloud/book/book/dao/BookLabelDao.java
+2
-0
BookLabelDaoImpl.java
.../java/com/pcloud/book/book/dao/impl/BookLabelDaoImpl.java
+5
-0
BookFacadeImpl.java
...java/com/pcloud/book/book/facade/impl/BookFacadeImpl.java
+7
-0
BookServiceImpl.java
...va/com/pcloud/book/book/service/impl/BookServiceImpl.java
+9
-0
BookLabel.Mapper.xml
...-book/src/main/resources/mapper/book/BookLabel.Mapper.xml
+9
-0
No files found.
pcloud-facade-book/src/main/java/com/pcloud/book/book/service/BookService.java
View file @
491da427
...
@@ -263,4 +263,10 @@ public interface BookService {
...
@@ -263,4 +263,10 @@ public interface BookService {
ResponseEntity
<
ResponseDto
<
List
<
Long
>>>
getBookIdsByIsbn
(
ResponseEntity
<
ResponseDto
<
List
<
Long
>>>
getBookIdsByIsbn
(
@RequestParam
(
value
=
"isbn"
)
String
isbn
@RequestParam
(
value
=
"isbn"
)
String
isbn
)
throws
BizException
;
)
throws
BizException
;
@ApiOperation
(
"获取书刊标签"
)
@RequestMapping
(
value
=
"/getLabelMapByIds"
,
method
=
RequestMethod
.
POST
)
ResponseEntity
<
ResponseDto
<
Map
<
Long
,
String
>>>
getLabelMapByIds
(
@RequestBody
List
<
Long
>
labelIds
)
throws
BizException
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/book/biz/BookBiz.java
View file @
491da427
...
@@ -663,4 +663,6 @@ public interface BookBiz {
...
@@ -663,4 +663,6 @@ public interface BookBiz {
* * @param null
* * @param null
*/
*/
PageBeanNew
<
BookDto
>
getAdviserBooks4Applet
(
BookSearchParamVO
bookSearchParamVO
);
PageBeanNew
<
BookDto
>
getAdviserBooks4Applet
(
BookSearchParamVO
bookSearchParamVO
);
Map
<
Integer
,
List
<
BookLabel
>>
getBookLabels4Erp
();
}
}
pcloud-service-book/src/main/java/com/pcloud/book/book/biz/BookLabelBiz.java
View file @
491da427
...
@@ -4,6 +4,9 @@ import com.pcloud.book.book.entity.BookLabel;
...
@@ -4,6 +4,9 @@ import com.pcloud.book.book.entity.BookLabel;
import
com.pcloud.book.book.vo.BookLabelVO
;
import
com.pcloud.book.book.vo.BookLabelVO
;
import
com.pcloud.common.page.PageBeanNew
;
import
com.pcloud.common.page.PageBeanNew
;
import
java.util.List
;
import
java.util.Map
;
public
interface
BookLabelBiz
{
public
interface
BookLabelBiz
{
/**
/**
...
@@ -52,4 +55,6 @@ public interface BookLabelBiz {
...
@@ -52,4 +55,6 @@ public interface BookLabelBiz {
*/
*/
PageBeanNew
<
BookLabelVO
>
listApplyBookLabel
(
Integer
labelType
,
Integer
currentPage
,
Integer
numPerPage
,
PageBeanNew
<
BookLabelVO
>
listApplyBookLabel
(
Integer
labelType
,
Integer
currentPage
,
Integer
numPerPage
,
String
name
,
String
startTime
,
String
endTime
,
Integer
auditState
);
String
name
,
String
startTime
,
String
endTime
,
Integer
auditState
);
Map
<
Long
,
String
>
getLabelMapByIds
(
List
<
Long
>
labelIds
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/book/biz/impl/BookBizImpl.java
View file @
491da427
...
@@ -2411,4 +2411,15 @@ public class BookBizImpl implements BookBiz {
...
@@ -2411,4 +2411,15 @@ public class BookBizImpl implements BookBiz {
PageBeanNew
<
BookDto
>
page
=
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
(
int
)
esPage
.
getTotalElements
(),
bookDtos
);
PageBeanNew
<
BookDto
>
page
=
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
(
int
)
esPage
.
getTotalElements
(),
bookDtos
);
return
page
;
return
page
;
}
}
@ParamLog
(
"获取书籍标签"
)
@Override
public
Map
<
Integer
,
List
<
BookLabel
>>
getBookLabels4Erp
()
{
Map
<
Integer
,
List
<
BookLabel
>>
map
=
new
HashMap
<>();
List
<
BookLabel
>
bookLabels
=
bookLabelDao
.
getAll
(
0L
);
if
(!
ListUtils
.
isEmpty
(
bookLabels
))
{
map
=
bookLabels
.
stream
().
collect
(
Collectors
.
groupingBy
(
BookLabel:
:
getType
));
}
return
map
;
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/book/biz/impl/BookLabelBizImpl.java
View file @
491da427
...
@@ -138,4 +138,17 @@ public class BookLabelBizImpl implements BookLabelBiz {
...
@@ -138,4 +138,17 @@ public class BookLabelBizImpl implements BookLabelBiz {
}
}
return
pageBeanNew
;
return
pageBeanNew
;
}
}
@Override
public
Map
<
Long
,
String
>
getLabelMapByIds
(
List
<
Long
>
labelIds
)
{
if
(
ListUtils
.
isEmpty
(
labelIds
)){
return
new
HashMap
<>();
}
List
<
BookLabel
>
labelList
=
bookLabelDao
.
getByLabelIds
(
new
ArrayList
<>(
labelIds
));
if
(
ListUtils
.
isEmpty
(
labelList
)){
return
new
HashMap
<>();
}
Map
<
Long
,
String
>
map
=
labelList
.
stream
().
collect
(
Collectors
.
toMap
(
a
->
a
.
getId
(),
a
->
a
.
getName
(),
(
k1
,
k2
)
->
(
k2
)));
return
map
;
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/book/dao/BookLabelDao.java
View file @
491da427
...
@@ -14,6 +14,8 @@ public interface BookLabelDao extends BaseDao<BookLabel> {
...
@@ -14,6 +14,8 @@ public interface BookLabelDao extends BaseDao<BookLabel> {
Map
<
Long
,
BookLabel
>
getMapByIds
(
List
<
Long
>
list
);
Map
<
Long
,
BookLabel
>
getMapByIds
(
List
<
Long
>
list
);
List
<
BookLabel
>
getByLabelIds
(
List
<
Long
>
list
);
Long
getByNameType
(
String
name
,
Integer
type
);
Long
getByNameType
(
String
name
,
Integer
type
);
Integer
getMaxSeqByType
(
Integer
type
);
Integer
getMaxSeqByType
(
Integer
type
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/book/dao/impl/BookLabelDaoImpl.java
View file @
491da427
...
@@ -36,6 +36,11 @@ public class BookLabelDaoImpl extends BaseDaoImpl<BookLabel> implements BookLabe
...
@@ -36,6 +36,11 @@ public class BookLabelDaoImpl extends BaseDaoImpl<BookLabel> implements BookLabe
}
}
@Override
@Override
public
List
<
BookLabel
>
getByLabelIds
(
List
<
Long
>
list
)
{
return
super
.
getSqlSession
().
selectList
(
super
.
getStatement
(
"getByLabelIds"
),
list
);
}
@Override
public
Long
getByNameType
(
String
name
,
Integer
type
)
{
public
Long
getByNameType
(
String
name
,
Integer
type
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"name"
,
name
);
map
.
put
(
"name"
,
name
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/book/facade/impl/BookFacadeImpl.java
View file @
491da427
...
@@ -1079,4 +1079,10 @@ public class BookFacadeImpl implements BookFacade {
...
@@ -1079,4 +1079,10 @@ public class BookFacadeImpl implements BookFacade {
return
new
ResponseDto
<>(
bookBiz
.
getAdviserBooks4Applet
(
bookSearchParamVO
));
return
new
ResponseDto
<>(
bookBiz
.
getAdviserBooks4Applet
(
bookSearchParamVO
));
}
}
@GetMapping
(
"getBookLabels4Erp"
)
public
ResponseDto
<?>
getBookLabels4Erp
(
@RequestHeader
(
"token"
)
String
token
)
throws
BizException
,
PermissionException
{
return
new
ResponseDto
<>(
bookBiz
.
getBookLabels4Erp
());
}
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/book/service/impl/BookServiceImpl.java
View file @
491da427
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
package
com
.
pcloud
.
book
.
book
.
service
.
impl
;
package
com
.
pcloud
.
book
.
book
.
service
.
impl
;
import
com.pcloud.book.book.biz.BookBiz
;
import
com.pcloud.book.book.biz.BookBiz
;
import
com.pcloud.book.book.biz.BookLabelBiz
;
import
com.pcloud.book.book.dto.BookAdviserUpdateTimeDTO
;
import
com.pcloud.book.book.dto.BookAdviserUpdateTimeDTO
;
import
com.pcloud.book.book.dto.BookDetialDTO
;
import
com.pcloud.book.book.dto.BookDetialDTO
;
import
com.pcloud.book.book.dto.BookDto
;
import
com.pcloud.book.book.dto.BookDto
;
...
@@ -40,6 +41,8 @@ public class BookServiceImpl implements BookService {
...
@@ -40,6 +41,8 @@ public class BookServiceImpl implements BookService {
@Autowired
@Autowired
private
BookBiz
bookBiz
;
private
BookBiz
bookBiz
;
@Autowired
private
BookLabelBiz
bookLabelBiz
;
/**
/**
* 获取书籍信息
* 获取书籍信息
...
@@ -218,4 +221,10 @@ public class BookServiceImpl implements BookService {
...
@@ -218,4 +221,10 @@ public class BookServiceImpl implements BookService {
@RequestParam
(
value
=
"isbn"
)
String
isbn
)
throws
BizException
{
@RequestParam
(
value
=
"isbn"
)
String
isbn
)
throws
BizException
{
return
ResponseHandleUtil
.
toResponse
(
bookBiz
.
getBookIdsByIsbn
(
isbn
));
return
ResponseHandleUtil
.
toResponse
(
bookBiz
.
getBookIdsByIsbn
(
isbn
));
}
}
@Override
@RequestMapping
(
value
=
"/getLabelMapByIds"
,
method
=
RequestMethod
.
POST
)
public
ResponseEntity
<
ResponseDto
<
Map
<
Long
,
String
>>>
getLabelMapByIds
(
@RequestBody
List
<
Long
>
labelIds
)
throws
BizException
{
return
ResponseHandleUtil
.
toResponse
(
bookLabelBiz
.
getLabelMapByIds
(
labelIds
));
}
}
}
pcloud-service-book/src/main/resources/mapper/book/BookLabel.Mapper.xml
View file @
491da427
...
@@ -89,6 +89,15 @@
...
@@ -89,6 +89,15 @@
</foreach>
</foreach>
</select>
</select>
<select
id=
"getByLabelIds"
parameterType=
"list"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from book_label
where id in
<foreach
collection=
"list"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</select>
<select
id=
"getByNameType"
resultType=
"long"
parameterType=
"map"
>
<select
id=
"getByNameType"
resultType=
"long"
parameterType=
"map"
>
SELECT id FROM book_label
SELECT id FROM book_label
WHERE `name`= #{name}
WHERE `name`= #{name}
...
...
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