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
f15c2e36
Commit
f15c2e36
authored
Mar 09, 2020
by
zhuyajie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1002544
parent
54d33d2d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
61 additions
and
1 deletions
+61
-1
CustomPlanBiz.java
...c/main/java/com/pcloud/book/custom/biz/CustomPlanBiz.java
+5
-0
CustomPlanBizImpl.java
...va/com/pcloud/book/custom/biz/impl/CustomPlanBizImpl.java
+20
-0
CustomPlanFacade.java
.../java/com/pcloud/book/custom/facade/CustomPlanFacade.java
+10
-0
CustomPlanModuleSuggestionMapper.java
.../book/custom/mapper/CustomPlanModuleSuggestionMapper.java
+3
-0
PersonalStageJumpBizImpl.java
...book/personalstage/biz/impl/PersonalStageJumpBizImpl.java
+16
-1
CustomPlanModuleSuggestionMapper.xml
...ources/mapper/custom/CustomPlanModuleSuggestionMapper.xml
+7
-0
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/custom/biz/CustomPlanBiz.java
View file @
f15c2e36
...
@@ -9,6 +9,7 @@ import com.pcloud.book.custom.vo.EditCustomPlanModuleVO;
...
@@ -9,6 +9,7 @@ import com.pcloud.book.custom.vo.EditCustomPlanModuleVO;
import
com.pcloud.book.custom.vo.ModuleSuggestionVO
;
import
com.pcloud.book.custom.vo.ModuleSuggestionVO
;
import
com.pcloud.book.custom.vo.SuggestionListVO
;
import
com.pcloud.book.custom.vo.SuggestionListVO
;
import
com.pcloud.common.page.PageBeanNew
;
import
com.pcloud.common.page.PageBeanNew
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -42,4 +43,8 @@ public interface CustomPlanBiz {
...
@@ -42,4 +43,8 @@ public interface CustomPlanBiz {
Integer
addSuggestion4Module
(
AddSuggestionVO
addSuggestionVO
);
Integer
addSuggestion4Module
(
AddSuggestionVO
addSuggestionVO
);
Integer
addCustomPlan4User
(
AddCustomPlan4UserVO
addCustomPlan4UserVO
);
Integer
addCustomPlan4User
(
AddCustomPlan4UserVO
addCustomPlan4UserVO
);
public
Boolean
getUserInputPermission
(
String
userWxId
,
Integer
planId
);
List
<
Integer
>
getPlanIdListByUser
(
String
wxId
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/custom/biz/impl/CustomPlanBizImpl.java
View file @
f15c2e36
...
@@ -36,6 +36,7 @@ import com.pcloud.common.utils.BeanUtils;
...
@@ -36,6 +36,7 @@ import com.pcloud.common.utils.BeanUtils;
import
com.pcloud.common.utils.ListUtils
;
import
com.pcloud.common.utils.ListUtils
;
import
com.pcloud.common.utils.QrcodeUtils
;
import
com.pcloud.common.utils.QrcodeUtils
;
import
com.pcloud.common.utils.UUIDUitl
;
import
com.pcloud.common.utils.UUIDUitl
;
import
com.pcloud.common.utils.cache.redis.JedisClusterUtils
;
import
com.pcloud.common.utils.httpclient.UrlUtils
;
import
com.pcloud.common.utils.httpclient.UrlUtils
;
import
com.pcloud.common.utils.string.StringUtil
;
import
com.pcloud.common.utils.string.StringUtil
;
import
com.pcloud.feedback.paper.dto.PaperDto
;
import
com.pcloud.feedback.paper.dto.PaperDto
;
...
@@ -344,6 +345,9 @@ public class CustomPlanBizImpl implements CustomPlanBiz {
...
@@ -344,6 +345,9 @@ public class CustomPlanBizImpl implements CustomPlanBiz {
list
.
add
(
suggestion
);
list
.
add
(
suggestion
);
});
});
customPlanModuleSuggestionMapper
.
batchInsert
(
list
);
customPlanModuleSuggestionMapper
.
batchInsert
(
list
);
//添加填写记录缓存
String
key
=
"BOOK:CUSTOMER_PLAN_SUGGESTION_RECORD:"
+
wxId
+
"-"
+
planId
;
JedisClusterUtils
.
setJson
(
key
,
wxId
);
ThreadPoolUtils
.
OTHER_THREAD_POOL
.
execute
(()
->
{
ThreadPoolUtils
.
OTHER_THREAD_POOL
.
execute
(()
->
{
CustomPlan
customPlan
=
customPlanMapper
.
getById
(
planId
);
CustomPlan
customPlan
=
customPlanMapper
.
getById
(
planId
);
if
(!
StringUtil
.
isEmpty
(
customPlan
.
getConfirmFeedbackReply
())
&&
addSuggestionVO
.
getRobotWxId
()
!=
null
)
{
if
(!
StringUtil
.
isEmpty
(
customPlan
.
getConfirmFeedbackReply
())
&&
addSuggestionVO
.
getRobotWxId
()
!=
null
)
{
...
@@ -368,4 +372,20 @@ public class CustomPlanBizImpl implements CustomPlanBiz {
...
@@ -368,4 +372,20 @@ public class CustomPlanBizImpl implements CustomPlanBiz {
public
Integer
addCustomPlan4User
(
AddCustomPlan4UserVO
addCustomPlan4UserVO
)
{
public
Integer
addCustomPlan4User
(
AddCustomPlan4UserVO
addCustomPlan4UserVO
)
{
return
customPlanModuleSuggestionMapper
.
addCustomPlan4User
(
addCustomPlan4UserVO
);
return
customPlanModuleSuggestionMapper
.
addCustomPlan4User
(
addCustomPlan4UserVO
);
}
}
@Override
public
Boolean
getUserInputPermission
(
String
userWxId
,
Integer
planId
)
{
Boolean
canInput
=
true
;
String
key
=
"BOOK:CUSTOMER_PLAN_SUGGESTION_RECORD:"
+
userWxId
+
"-"
+
planId
;
String
value
=
JedisClusterUtils
.
getJson
(
key
,
String
.
class
);
if
(!
StringUtil
.
isEmpty
(
value
)){
canInput
=
false
;
}
return
canInput
;
}
@Override
public
List
<
Integer
>
getPlanIdListByUser
(
String
wxId
){
return
customPlanModuleSuggestionMapper
.
getPlanIdListByUser
(
wxId
);
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/custom/facade/CustomPlanFacade.java
View file @
f15c2e36
...
@@ -25,7 +25,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -25,7 +25,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
@RequestMapping
(
"customPlan"
)
@RequestMapping
(
"customPlan"
)
@RestController
(
"customPlanFacade"
)
@RestController
(
"customPlanFacade"
)
...
@@ -164,4 +166,12 @@ public class CustomPlanFacade {
...
@@ -164,4 +166,12 @@ public class CustomPlanFacade {
return
new
ResponseDto
<>(
id
);
return
new
ResponseDto
<>(
id
);
}
}
@ApiOperation
(
"获取用户定制单满意度填写权限"
)
@GetMapping
(
"getUserInputPermission"
)
public
ResponseDto
<?>
getUserInputPermission
(
@RequestParam
(
"userWxId"
)
String
userWxId
,
@RequestParam
(
"planId"
)
Integer
planId
){
Boolean
canInput
=
customPlanBiz
.
getUserInputPermission
(
userWxId
,
planId
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"canInput"
,
canInput
);
return
new
ResponseDto
<>(
map
);
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/custom/mapper/CustomPlanModuleSuggestionMapper.java
View file @
f15c2e36
...
@@ -29,4 +29,6 @@ public interface CustomPlanModuleSuggestionMapper {
...
@@ -29,4 +29,6 @@ public interface CustomPlanModuleSuggestionMapper {
Integer
addCustomPlan4User
(
AddCustomPlan4UserVO
addCustomPlan4UserVO
);
Integer
addCustomPlan4User
(
AddCustomPlan4UserVO
addCustomPlan4UserVO
);
Integer
getLatestPlanId
(
String
wxId
);
Integer
getLatestPlanId
(
String
wxId
);
List
<
Integer
>
getPlanIdListByUser
(
@Param
(
"wxId"
)
String
wxId
);
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/personalstage/biz/impl/PersonalStageJumpBizImpl.java
View file @
f15c2e36
...
@@ -7,6 +7,7 @@ import com.pcloud.book.book.entity.Book;
...
@@ -7,6 +7,7 @@ import com.pcloud.book.book.entity.Book;
import
com.pcloud.book.consumer.content.ResourceConsr
;
import
com.pcloud.book.consumer.content.ResourceConsr
;
import
com.pcloud.book.consumer.feedback.FeedbackConsr
;
import
com.pcloud.book.consumer.feedback.FeedbackConsr
;
import
com.pcloud.book.consumer.wechatgroup.WechatGroupConsr
;
import
com.pcloud.book.consumer.wechatgroup.WechatGroupConsr
;
import
com.pcloud.book.custom.biz.CustomPlanBiz
;
import
com.pcloud.book.group.biz.WeixinQrcodeBiz
;
import
com.pcloud.book.group.biz.WeixinQrcodeBiz
;
import
com.pcloud.book.guide.biz.PcloudGuideBiz
;
import
com.pcloud.book.guide.biz.PcloudGuideBiz
;
import
com.pcloud.book.keywords.enums.ReplyTypeEnum
;
import
com.pcloud.book.keywords.enums.ReplyTypeEnum
;
...
@@ -109,6 +110,8 @@ public class PersonalStageJumpBizImpl implements PersonalStageJumpBiz {
...
@@ -109,6 +110,8 @@ public class PersonalStageJumpBizImpl implements PersonalStageJumpBiz {
private
ResourceConsr
resourceConsr
;
private
ResourceConsr
resourceConsr
;
@Value
(
"${system.env}"
)
@Value
(
"${system.env}"
)
private
String
envStr
;
private
String
envStr
;
@Autowired
private
CustomPlanBiz
customPlanBiz
;
@Value
(
"${wechat.group.link.prefix}"
)
@Value
(
"${wechat.group.link.prefix}"
)
private
String
wechatLinkPrefix
;
private
String
wechatLinkPrefix
;
...
@@ -1107,7 +1110,10 @@ public class PersonalStageJumpBizImpl implements PersonalStageJumpBiz {
...
@@ -1107,7 +1110,10 @@ public class PersonalStageJumpBizImpl implements PersonalStageJumpBiz {
if
(
null
!=
pcloudRobot
&&
null
!=
pcloudRobot
.
getRobotType
()){
if
(
null
!=
pcloudRobot
&&
null
!=
pcloudRobot
.
getRobotType
()){
List
<
Long
>
paperIds
=
personalStageDao
.
getPaperIdListByRobotClassify
(
pcloudRobot
.
getRobotType
().
longValue
());
List
<
Long
>
paperIds
=
personalStageDao
.
getPaperIdListByRobotClassify
(
pcloudRobot
.
getRobotType
().
longValue
());
if
(!
ListUtils
.
isEmpty
(
paperIds
)){
if
(!
ListUtils
.
isEmpty
(
paperIds
)){
feedbackConsr
.
deleteUserAnswerRecord
(
paperIds
,
userWxId
);
for
(
Long
paperId:
paperIds
){
String
paperKey
=
"FEEDBACK:USER_RECORD:"
+
userWxId
+
"-"
+
paperId
;
JedisClusterUtils
.
del
(
paperKey
);
}
}
}
}
}
//删除书名和阅读偏好缓存
//删除书名和阅读偏好缓存
...
@@ -1115,5 +1121,14 @@ public class PersonalStageJumpBizImpl implements PersonalStageJumpBiz {
...
@@ -1115,5 +1121,14 @@ public class PersonalStageJumpBizImpl implements PersonalStageJumpBiz {
String
readingKey
=
"BOOK:READING_STYLE:"
+
userWxId
+
"-"
+
robotId
;
String
readingKey
=
"BOOK:READING_STYLE:"
+
userWxId
+
"-"
+
robotId
;
JedisClusterUtils
.
del
(
bookKey
);
JedisClusterUtils
.
del
(
bookKey
);
JedisClusterUtils
.
del
(
readingKey
);
JedisClusterUtils
.
del
(
readingKey
);
//清除定制单填写记录
List
<
Integer
>
planIds
=
customPlanBiz
.
getPlanIdListByUser
(
userWxId
);
if
(!
ListUtils
.
isEmpty
(
planIds
)){
for
(
Integer
planId
:
planIds
){
String
planKey
=
"BOOK:CUSTOMER_PLAN_SUGGESTION_RECORD:"
+
userWxId
+
"-"
+
planId
;
JedisClusterUtils
.
del
(
planKey
);
}
}
}
}
}
}
pcloud-service-book/src/main/resources/mapper/custom/CustomPlanModuleSuggestionMapper.xml
View file @
f15c2e36
...
@@ -97,4 +97,10 @@
...
@@ -97,4 +97,10 @@
order by create_time desc
order by create_time desc
limit 1
limit 1
</select>
</select>
<select
id=
"getPlanIdListByUser"
parameterType=
"string"
resultType=
"Integer"
>
SELECT DISTINCT plan_id
FROM custom_plan_module_suggestion
WHERE wx_id = #{wxId}
</select>
</mapper>
</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