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
d40fb232
Commit
d40fb232
authored
Mar 18, 2020
by
裴大威
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat-1002612' into 'master'
1002612客服系统优化 See merge request rays/pcloud-book!561
parents
fd1c11a4
a51084b6
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
151 additions
and
11 deletions
+151
-11
CustomPlanBiz.java
...c/main/java/com/pcloud/book/custom/biz/CustomPlanBiz.java
+2
-1
CustomPlanBizImpl.java
...va/com/pcloud/book/custom/biz/impl/CustomPlanBizImpl.java
+5
-3
CustomPlan.java
...c/main/java/com/pcloud/book/custom/entity/CustomPlan.java
+4
-0
CustomPlanFacade.java
.../java/com/pcloud/book/custom/facade/CustomPlanFacade.java
+4
-2
CustomPlanMapper.java
.../java/com/pcloud/book/custom/mapper/CustomPlanMapper.java
+4
-2
PersonalStageBiz.java
...a/com/pcloud/book/personalstage/biz/PersonalStageBiz.java
+3
-0
PersonalStageBizImpl.java
...oud/book/personalstage/biz/impl/PersonalStageBizImpl.java
+42
-0
UserReplaceCodeDao.java
...com/pcloud/book/personalstage/dao/UserReplaceCodeDao.java
+3
-0
UserReplaceCodeDaoImpl.java
...d/book/personalstage/dao/impl/UserReplaceCodeDaoImpl.java
+9
-0
ReplaceCodeDTO4CustomerService.java
...ook/personalstage/dto/ReplaceCodeDTO4CustomerService.java
+39
-0
PersonalStageFacade.java
...pcloud/book/personalstage/facade/PersonalStageFacade.java
+6
-0
CustomPlanMapper.xml
...ook/src/main/resources/mapper/custom/CustomPlanMapper.xml
+17
-3
UserReplaceCode.xml
...c/main/resources/mapper/personalstage/UserReplaceCode.xml
+13
-0
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/custom/biz/CustomPlanBiz.java
View file @
d40fb232
...
...
@@ -28,7 +28,8 @@ public interface CustomPlanBiz {
void
deleteCustomPlanById
(
Integer
planId
);
PageBeanNew
<
CustomPlan
>
listCustomPlanByPage
(
Integer
currentPage
,
Integer
numPerPage
,
String
content
,
Integer
useState
,
Integer
hasPdf
);
PageBeanNew
<
CustomPlan
>
listCustomPlanByPage
(
Integer
currentPage
,
Integer
numPerPage
,
String
content
,
Integer
useState
,
Integer
hasPdf
,
Integer
robotType
,
Integer
readType
);
void
editCustomPlanModule
(
EditCustomPlanModuleVO
editCustomPlanModuleVO
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/custom/biz/impl/CustomPlanBizImpl.java
View file @
d40fb232
...
...
@@ -139,12 +139,14 @@ public class CustomPlanBizImpl implements CustomPlanBiz {
}
@Override
public
PageBeanNew
<
CustomPlan
>
listCustomPlanByPage
(
Integer
currentPage
,
Integer
numPerPage
,
String
content
,
Integer
useState
,
Integer
hasPdf
)
{
int
count
=
customPlanMapper
.
getCustomPlanCount
(
content
,
useState
,
hasPdf
);
public
PageBeanNew
<
CustomPlan
>
listCustomPlanByPage
(
Integer
currentPage
,
Integer
numPerPage
,
String
content
,
Integer
useState
,
Integer
hasPdf
,
Integer
robotType
,
Integer
readType
)
{
int
count
=
customPlanMapper
.
getCustomPlanCount
(
content
,
useState
,
hasPdf
,
robotType
,
readType
);
if
(
count
<=
0
)
{
return
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
new
ArrayList
<>());
}
List
<
CustomPlan
>
customPlanList
=
customPlanMapper
.
listCustomPlanByPage
(
currentPage
*
numPerPage
,
numPerPage
,
content
,
useState
,
hasPdf
);
List
<
CustomPlan
>
customPlanList
=
customPlanMapper
.
listCustomPlanByPage
(
currentPage
*
numPerPage
,
numPerPage
,
content
,
useState
,
hasPdf
,
robotType
,
readType
);
return
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
count
,
customPlanList
);
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/custom/entity/CustomPlan.java
View file @
d40fb232
...
...
@@ -51,4 +51,7 @@ public class CustomPlan {
@ApiModelProperty
(
"个人号类型名称"
)
private
String
robotTypeName
;
@ApiModelProperty
(
"阅读类型1轻松2高效3深度"
)
private
Integer
readType
;
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/custom/facade/CustomPlanFacade.java
View file @
d40fb232
...
...
@@ -82,8 +82,10 @@ public class CustomPlanFacade {
@GetMapping
(
"listCustomPlanByPage"
)
ResponseDto
<?>
listCustomPlanByPage
(
@RequestHeader
String
token
,
@RequestParam
Integer
currentPage
,
@RequestParam
Integer
numPerPage
,
@RequestParam
(
value
=
"content"
,
required
=
false
)
String
content
,
@RequestParam
(
value
=
"useState"
,
required
=
false
)
Integer
useState
,
@RequestParam
(
value
=
"hasPdf"
,
required
=
false
)
Integer
hasPdf
)
{
return
new
ResponseDto
<>(
customPlanBiz
.
listCustomPlanByPage
(
currentPage
,
numPerPage
,
content
,
useState
,
hasPdf
));
@RequestParam
(
value
=
"hasPdf"
,
required
=
false
)
Integer
hasPdf
,
@RequestParam
(
value
=
"robotType"
,
required
=
false
)
Integer
robotType
,
@RequestParam
(
value
=
"readType"
,
required
=
false
)
Integer
readType
)
{
return
new
ResponseDto
<>(
customPlanBiz
.
listCustomPlanByPage
(
currentPage
,
numPerPage
,
content
,
useState
,
hasPdf
,
robotType
,
readType
));
}
@ApiOperation
(
"编辑方案模块"
)
...
...
pcloud-service-book/src/main/java/com/pcloud/book/custom/mapper/CustomPlanMapper.java
View file @
d40fb232
...
...
@@ -20,10 +20,12 @@ public interface CustomPlanMapper {
void
deleteById
(
@Param
(
"id"
)
Integer
id
);
int
getCustomPlanCount
(
@Param
(
"content"
)
String
content
,
@Param
(
"useState"
)
Integer
useState
,
@Param
(
"hasPdf"
)
Integer
hasPdf
);
int
getCustomPlanCount
(
@Param
(
"content"
)
String
content
,
@Param
(
"useState"
)
Integer
useState
,
@Param
(
"hasPdf"
)
Integer
hasPdf
,
@Param
(
"robotType"
)
Integer
robotType
,
@Param
(
"readType"
)
Integer
readType
);
List
<
CustomPlan
>
listCustomPlanByPage
(
@Param
(
"pageNum"
)
Integer
pageNum
,
@Param
(
"numPerPage"
)
Integer
numPerPage
,
@Param
(
"content"
)
String
content
,
@Param
(
"useState"
)
Integer
useState
,
@Param
(
"hasPdf"
)
Integer
hasPdf
);
@Param
(
"hasPdf"
)
Integer
hasPdf
,
@Param
(
"robotType"
)
Integer
robotType
,
@Param
(
"readType"
)
Integer
readType
);
int
getPlanPaperCount
(
Map
<
String
,
Object
>
paramMap
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/personalstage/biz/PersonalStageBiz.java
View file @
d40fb232
...
...
@@ -2,6 +2,7 @@ package com.pcloud.book.personalstage.biz;
import
com.pcloud.book.personalstage.dto.PersonalStageDTO
;
import
com.pcloud.book.personalstage.dto.PersonalStageProgressDTO
;
import
com.pcloud.book.personalstage.dto.ReplaceCodeDTO4CustomerService
;
import
com.pcloud.book.personalstage.entity.PersonalStage
;
import
com.pcloud.book.personalstage.entity.PersonalStageUser
;
...
...
@@ -87,4 +88,6 @@ public interface PersonalStageBiz {
void
createUserReplaceCode
(
UserReplaceCodeDTO
userReplaceCodeDTO
);
Map
<
String
,
String
>
getUserReplaceMap
(
String
wxId
,
String
robotId
);
ReplaceCodeDTO4CustomerService
getUserReplaceMap4CustomerService
(
String
wxId
,
String
robotId
);
}
pcloud-service-book/src/main/java/com/pcloud/book/personalstage/biz/impl/PersonalStageBizImpl.java
View file @
d40fb232
...
...
@@ -1188,4 +1188,46 @@ public class PersonalStageBizImpl implements PersonalStageBiz {
newList
.
get
(
newList
.
size
()-
1
).
setState
(
0
);
return
newList
;
}
@Override
public
ReplaceCodeDTO4CustomerService
getUserReplaceMap4CustomerService
(
String
wxId
,
String
robotId
)
{
ReplaceCodeDTO4CustomerService
dto4CustomerService
=
new
ReplaceCodeDTO4CustomerService
();
if
(
StringUtil
.
isEmpty
(
wxId
)||
StringUtil
.
isEmpty
(
robotId
)){
return
dto4CustomerService
;
}
List
<
ReplaceCode
>
all
=
replaceCodeDao
.
getAll
();
Long
bookCodeId
=
null
;
Long
serviceCodeId
=
null
;
for
(
ReplaceCode
replaceCode:
all
){
if
(
"${bookName}"
.
equals
(
replaceCode
.
getReplaceCode
())){
bookCodeId
=
replaceCode
.
getId
();
}
else
if
(
"${serviceType}"
.
equals
(
replaceCode
.
getReplaceCode
())){
serviceCodeId
=
replaceCode
.
getId
();
}
}
//书刊分类,目前取小号分类
PcloudRobot
pcloudRobot
=
pcloudRobotDao
.
getByWxId
(
robotId
);
if
(
null
!=
pcloudRobot
&&
null
!=
pcloudRobot
.
getRobotType
()){
PcloudRobotClassify
robotClassify
=
pcloudRobotClassifyDao
.
getById
(
pcloudRobot
.
getRobotType
());
String
classifyName
=
robotClassify
==
null
?
""
:
robotClassify
.
getClassifyName
();
dto4CustomerService
.
setBookClassify
(
classifyName
);
dto4CustomerService
.
setBookClassifyList
(
Arrays
.
asList
(
classifyName
));
}
//历史记录
if
(
null
!=
bookCodeId
){
List
<
String
>
bookNameList
=
userReplaceCodeDao
.
getUserReplaceRecordByCodeId
(
wxId
,
robotId
,
bookCodeId
);
if
(!
ListUtils
.
isEmpty
(
bookNameList
)){
dto4CustomerService
.
setBookNameList
(
bookNameList
);
dto4CustomerService
.
setBookName
(
bookNameList
.
get
(
0
));
}
}
if
(
null
!=
serviceCodeId
){
List
<
String
>
serviceTypeList
=
userReplaceCodeDao
.
getUserReplaceRecordByCodeId
(
wxId
,
robotId
,
serviceCodeId
);
if
(!
ListUtils
.
isEmpty
(
serviceTypeList
)){
dto4CustomerService
.
setServiceTypeList
(
serviceTypeList
);
dto4CustomerService
.
setServiceType
(
serviceTypeList
.
get
(
0
));
}
}
return
dto4CustomerService
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/personalstage/dao/UserReplaceCodeDao.java
View file @
d40fb232
...
...
@@ -8,4 +8,6 @@ import java.util.List;
public
interface
UserReplaceCodeDao
extends
BaseDao
<
UserReplaceCode
>
{
List
<
UserReplaceCode
>
getLastUserReplace
(
String
wxId
,
String
robotId
);
List
<
String
>
getUserReplaceRecordByCodeId
(
String
wxId
,
String
robotId
,
Long
codeId
);
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/personalstage/dao/impl/UserReplaceCodeDaoImpl.java
View file @
d40fb232
...
...
@@ -19,4 +19,13 @@ public class UserReplaceCodeDaoImpl extends BaseDaoImpl<UserReplaceCode> impleme
map
.
put
(
"robotId"
,
robotId
);
return
super
.
getSqlSession
().
selectList
(
getStatement
(
"getLastUserReplace"
),
map
);
}
@Override
public
List
<
String
>
getUserReplaceRecordByCodeId
(
String
wxId
,
String
robotId
,
Long
codeId
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"wxId"
,
wxId
);
map
.
put
(
"robotId"
,
robotId
);
map
.
put
(
"replaceCodeId"
,
codeId
);
return
super
.
getSqlSession
().
selectList
(
getStatement
(
"getUserReplaceRecordByCodeId"
),
map
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/personalstage/dto/ReplaceCodeDTO4CustomerService.java
0 → 100644
View file @
d40fb232
package
com
.
pcloud
.
book
.
personalstage
.
dto
;
import
com.pcloud.common.dto.BaseDto
;
import
lombok.Data
;
import
java.util.List
;
/**
* 人工客服读者信息
*/
@Data
public
class
ReplaceCodeDTO4CustomerService
extends
BaseDto
{
/**
* 当前图书名称
*/
private
String
bookName
;
/**
* 当前阅读类型
*/
private
String
serviceType
;
/**
* 当前书刊分类
*/
private
String
bookClassify
;
/**
* 历史图书名称
*/
private
List
<
String
>
bookNameList
;
/**
* 历史阅读类型
*/
private
List
<
String
>
serviceTypeList
;
/**
* 历史书刊分类
*/
private
List
<
String
>
bookClassifyList
;
}
pcloud-service-book/src/main/java/com/pcloud/book/personalstage/facade/PersonalStageFacade.java
View file @
d40fb232
...
...
@@ -325,4 +325,10 @@ public class PersonalStageFacade {
return
new
ResponseDto
<>(
personalStageBiz
.
getUserReplaceMap
(
wxId
,
robotId
));
}
@ApiOperation
(
"人工客服获取用户替换map"
)
@GetMapping
(
"getUserReplaceMap4CustomerService"
)
public
ResponseDto
<?>
getUserReplaceMap4CustomerService
(
@RequestParam
(
"wxId"
)
@ApiParam
(
"用户id"
)
String
wxId
,
@RequestParam
(
"robotId"
)
@ApiParam
(
"机器人id"
)
String
robotId
){
return
new
ResponseDto
<>(
personalStageBiz
.
getUserReplaceMap4CustomerService
(
wxId
,
robotId
));
}
}
pcloud-service-book/src/main/resources/mapper/custom/CustomPlanMapper.xml
View file @
d40fb232
...
...
@@ -103,7 +103,8 @@
<select
id=
"getCustomPlanCount"
resultType=
"int"
>
select
count(1)
from custom_plan
from custom_plan a
LEFT JOIN custom_plan_module m ON a.id=m.plan_id AND m.module_type=6
where 1= 1
<if
test=
"content != null"
>
and (plan_number like concat('%', #{content}, '%')
...
...
@@ -116,16 +117,23 @@
<if
test=
"hasPdf == 1"
>
and pdf_url is not null
</if>
<if
test=
"robotType != null"
>
AND a.robot_type = #{robotType}
</if>
<if
test=
"readType != null"
>
AND m.read_type = #{readType}
</if>
</select>
<select
id=
"listCustomPlanByPage"
resultMap=
"BaseResultMap"
>
select
a.id, plan_number, plan_name, create_user_name, description, a.open_feedback,
use_state, pdf_url, h5_url, preview_qrcode_url, a.create_time, COUNT(DISTINCT b.batch_id) suggestion_count,
a.robot_type,t.classify_name robotTypeName
a.robot_type,t.classify_name robotTypeName
, m.read_type readType
from custom_plan a left join custom_plan_module_suggestion b
on a.id = b.plan_id
left join pcloud_robot_classify t on a.robot_type = t.id
LEFT JOIN custom_plan_module m ON a.id=m.plan_id AND m.module_type=6
where 1= 1
<if
test=
"content != null"
>
and (plan_number like concat('%', #{content}, '%')
...
...
@@ -138,8 +146,14 @@
<if
test=
"hasPdf == 1"
>
and pdf_url is not null
</if>
<if
test=
"robotType != null"
>
AND a.robot_type = #{robotType}
</if>
<if
test=
"readType != null"
>
AND m.read_type = #{readType}
</if>
GROUP BY a.id
ORDER BY update_time DESC
ORDER BY
a.
update_time DESC
LIMIT #{pageNum}, #{numPerPage}
</select>
...
...
pcloud-service-book/src/main/resources/mapper/personalstage/UserReplaceCode.xml
View file @
d40fb232
...
...
@@ -71,4 +71,16 @@
)
</select>
<select
id=
"getUserReplaceRecordByCodeId"
parameterType=
"map"
resultType=
"string"
>
SELECT
content
FROM
user_replace_code
WHERE robot_id = #{robotId}
AND wx_id = #{wxId}
AND replace_code_id = #{replaceCodeId}
ORDER BY
create_time DESC
</select>
</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