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
63fbe5a6
Commit
63fbe5a6
authored
Feb 05, 2020
by
章春雨
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat-skill' into 'master'
聚合页修改 See merge request rays/pcloud-book!344
parents
521f33f6
1aa7c201
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
318 additions
and
0 deletions
+318
-0
BookApplication.java
...e-book/src/main/java/com/pcloud/book/BookApplication.java
+2
-0
SelfRobotKeywordBiz.java
...ava/com/pcloud/book/keywords/biz/SelfRobotKeywordBiz.java
+16
-0
SelfRobotKeywordBizImpl.java
...cloud/book/keywords/biz/impl/SelfRobotKeywordBizImpl.java
+0
-0
TempRobotSkill.java
.../java/com/pcloud/book/keywords/entity/TempRobotSkill.java
+41
-0
SelfRobotKeywordFacade.java
...m/pcloud/book/keywords/facade/SelfRobotKeywordFacade.java
+39
-0
SelfRobotKeywordFacadeImpl.java
...book/keywords/facade/impl/SelfRobotKeywordFacadeImpl.java
+54
-0
TempRobotSkillDao.java
...va/com/pcloud/book/keywords/mapper/TempRobotSkillDao.java
+23
-0
GuideWordVO.java
...rc/main/java/com/pcloud/book/keywords/vo/GuideWordVO.java
+22
-0
LabelVO.java
...ok/src/main/java/com/pcloud/book/keywords/vo/LabelVO.java
+17
-0
SelfRobotReplyVO.java
...in/java/com/pcloud/book/keywords/vo/SelfRobotReplyVO.java
+38
-0
TempRobotSkill.Mapper.xml
.../main/resources/mapper/keywords/TempRobotSkill.Mapper.xml
+66
-0
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/BookApplication.java
View file @
63fbe5a6
...
@@ -6,6 +6,7 @@ import com.pcloud.common.core.constant.MQQueueConstant;
...
@@ -6,6 +6,7 @@ import com.pcloud.common.core.constant.MQQueueConstant;
import
com.pcloud.common.core.constant.MQTopicProducer
;
import
com.pcloud.common.core.constant.MQTopicProducer
;
import
com.pcloud.common.core.mq.RabbitMQFactory
;
import
com.pcloud.common.core.mq.RabbitMQFactory
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.amqp.core.Binding
;
import
org.springframework.amqp.core.Binding
;
import
org.springframework.amqp.core.Queue
;
import
org.springframework.amqp.core.Queue
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -37,6 +38,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
...
@@ -37,6 +38,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@PropertySource
({
"classpath:properties/book.properties"
,
"classpath:public_system.properties"
})
@PropertySource
({
"classpath:properties/book.properties"
,
"classpath:public_system.properties"
})
@Configuration
@Configuration
@EnableSwagger2
@EnableSwagger2
@MapperScan
(
basePackages
=
{
"com.pcloud.book.*.mapper"
})
public
class
BookApplication
{
public
class
BookApplication
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
...
...
pcloud-service-book/src/main/java/com/pcloud/book/keywords/biz/SelfRobotKeywordBiz.java
View file @
63fbe5a6
package
com
.
pcloud
.
book
.
keywords
.
biz
;
package
com
.
pcloud
.
book
.
keywords
.
biz
;
import
com.pcloud.book.keywords.entity.SelfRobotKeyword
;
import
com.pcloud.book.keywords.entity.SelfRobotKeyword
;
import
com.pcloud.book.keywords.vo.GuideWordVO
;
import
com.pcloud.book.keywords.vo.LabelVO
;
import
com.pcloud.book.keywords.vo.SelfRobotReplyVO
;
import
com.pcloud.common.page.PageBeanNew
;
import
com.pcloud.common.page.PageBeanNew
;
import
java.util.List
;
import
java.util.List
;
...
@@ -18,4 +21,17 @@ public interface SelfRobotKeywordBiz {
...
@@ -18,4 +21,17 @@ public interface SelfRobotKeywordBiz {
String
getAppOrProductServeUrl
(
Long
bookGroupId
,
Long
serveId
,
String
serveType
,
String
serveUrl
);
String
getAppOrProductServeUrl
(
Long
bookGroupId
,
Long
serveId
,
String
serveType
,
String
serveUrl
);
List
<
LabelVO
>
listLabelByType
(
Integer
type
);
List
<
SelfRobotReplyVO
>
getReplyByLabel
(
Integer
type
,
Long
labelId
,
String
robotId
,
String
wxUserId
);
List
<
SelfRobotReplyVO
>
getReplyByKeyWord
(
Integer
type
,
String
keyWord
,
String
robotId
,
String
wxUserId
);
List
<
GuideWordVO
>
getGuideWordListByType
(
Integer
type
);
List
<
SelfRobotReplyVO
>
getReplyBuyGuide
(
Integer
type
,
Integer
id
,
String
robotId
,
String
wxUserId
);
String
getResource
(
Integer
id
,
String
robotId
,
String
wxUserId
);
String
joinGroup
(
Integer
id
,
String
robotId
,
String
wxUserId
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/keywords/biz/impl/SelfRobotKeywordBizImpl.java
View file @
63fbe5a6
This diff is collapsed.
Click to expand it.
pcloud-service-book/src/main/java/com/pcloud/book/keywords/entity/TempRobotSkill.java
0 → 100644
View file @
63fbe5a6
package
com
.
pcloud
.
book
.
keywords
.
entity
;
import
lombok.Data
;
import
java.io.Serializable
;
@Data
public
class
TempRobotSkill
implements
Serializable
{
private
Integer
id
;
private
Integer
type
;
private
String
keyWord
;
private
String
guideWord
;
private
Integer
depthId
;
private
String
depthLabel
;
private
String
resourceType
;
private
String
text
;
private
String
imgUrl
;
private
Integer
productId
;
private
String
fileUrl
;
private
String
fileName
;
private
String
groupId
;
private
String
groupName
;
private
String
replyContent
;
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/keywords/facade/SelfRobotKeywordFacade.java
View file @
63fbe5a6
...
@@ -78,4 +78,43 @@ public interface SelfRobotKeywordFacade {
...
@@ -78,4 +78,43 @@ public interface SelfRobotKeywordFacade {
@RequestParam
(
"serveUrl"
)
@ApiParam
(
"作品或应用链接"
)
String
serveUrl
@RequestParam
(
"serveUrl"
)
@ApiParam
(
"作品或应用链接"
)
String
serveUrl
)
throws
BizException
,
PermissionException
;
)
throws
BizException
,
PermissionException
;
/* 个人号H5聚合页面 */
@ApiOperation
(
"根据类型获取引导语列表"
)
@GetMapping
(
"getGuideWordListByType"
)
ResponseDto
<?>
getGuideWordListByType
(
@RequestParam
(
"type"
)
@ApiParam
(
"技能类型"
)
Integer
type
)
throws
BizException
,
PermissionException
;
@ApiOperation
(
"根据类型获取标签列表"
)
@GetMapping
(
"listLabelByType"
)
ResponseDto
<?>
listLabelByType
(
@RequestParam
(
"type"
)
@ApiParam
(
"技能类型"
)
Integer
type
)
throws
BizException
,
PermissionException
;
@ApiOperation
(
"根据标签获取引导语列表"
)
@GetMapping
(
"getReplyByLabel"
)
ResponseDto
<?>
getReplyByLabel
(
@RequestParam
(
"type"
)
@ApiParam
(
"技能类型"
)
Integer
type
,
Long
labelId
,
String
robotId
,
String
wxUserId
)
throws
BizException
,
PermissionException
;
@ApiOperation
(
"根据关键词获取回复"
)
@GetMapping
(
"getReplyByKeyWord"
)
ResponseDto
<?>
getReplyByKeyWord
(
@RequestParam
(
"keyWord"
)
@ApiParam
(
"关键词"
)
String
keyWord
,
@RequestParam
(
"type"
)
@ApiParam
(
"技能类型"
)
Integer
type
,
@RequestParam
(
"robotId"
)
@ApiParam
(
"小号WXID"
)
String
robotId
,
@RequestParam
(
"wxUserId"
)
@ApiParam
(
"用户WXID"
)
String
wxUserId
)
throws
BizException
,
PermissionException
;
@ApiOperation
(
value
=
"根据引导语获取任务列表"
,
httpMethod
=
"GET"
)
@GetMapping
(
"getReplyByGuide"
)
ResponseDto
<?>
getReplyByGuide
(
Integer
type
,
Integer
id
,
String
robotId
,
String
wxUserId
);
@ApiOperation
(
value
=
"获取资料"
,
httpMethod
=
"GET"
)
@GetMapping
(
"getResource"
)
ResponseDto
<?>
getResource
(
Integer
id
,
String
robotId
,
String
wxUserId
);
@ApiOperation
(
value
=
"进群"
,
httpMethod
=
"GET"
)
@GetMapping
(
"joinGroup"
)
ResponseDto
<?>
joinGroup
(
Integer
id
,
String
robotId
,
String
wxUserId
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/keywords/facade/impl/SelfRobotKeywordFacadeImpl.java
View file @
63fbe5a6
...
@@ -3,6 +3,8 @@ package com.pcloud.book.keywords.facade.impl;
...
@@ -3,6 +3,8 @@ package com.pcloud.book.keywords.facade.impl;
import
com.pcloud.book.keywords.biz.SelfRobotKeywordBiz
;
import
com.pcloud.book.keywords.biz.SelfRobotKeywordBiz
;
import
com.pcloud.book.keywords.entity.SelfRobotKeyword
;
import
com.pcloud.book.keywords.entity.SelfRobotKeyword
;
import
com.pcloud.book.keywords.facade.SelfRobotKeywordFacade
;
import
com.pcloud.book.keywords.facade.SelfRobotKeywordFacade
;
import
com.pcloud.book.keywords.vo.LabelVO
;
import
com.pcloud.book.keywords.vo.SelfRobotReplyVO
;
import
com.pcloud.common.dto.ResponseDto
;
import
com.pcloud.common.dto.ResponseDto
;
import
com.pcloud.common.exceptions.BizException
;
import
com.pcloud.common.exceptions.BizException
;
import
com.pcloud.common.permission.PermissionException
;
import
com.pcloud.common.permission.PermissionException
;
...
@@ -20,6 +22,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -20,6 +22,7 @@ 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.ArrayList
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -124,4 +127,55 @@ public class SelfRobotKeywordFacadeImpl implements SelfRobotKeywordFacade {
...
@@ -124,4 +127,55 @@ public class SelfRobotKeywordFacadeImpl implements SelfRobotKeywordFacade {
return
new
ResponseDto
<>(
selfRobotKeywordBiz
.
getAppOrProductServeUrl
(
bookGroupId
,
serveId
,
serveType
,
serveUrl
));
return
new
ResponseDto
<>(
selfRobotKeywordBiz
.
getAppOrProductServeUrl
(
bookGroupId
,
serveId
,
serveType
,
serveUrl
));
}
}
@Override
@GetMapping
(
"getGuideWordListByType"
)
public
ResponseDto
<?>
getGuideWordListByType
(
@RequestParam
(
"type"
)
Integer
type
)
throws
BizException
,
PermissionException
{
return
new
ResponseDto
<>(
selfRobotKeywordBiz
.
getGuideWordListByType
(
type
));
}
@Override
@GetMapping
(
"listLabelByType"
)
public
ResponseDto
<?>
listLabelByType
(
@RequestParam
(
"type"
)
Integer
type
)
throws
BizException
,
PermissionException
{
List
<
LabelVO
>
list
=
selfRobotKeywordBiz
.
listLabelByType
(
type
);
return
new
ResponseDto
<>(
list
);
}
@Override
@GetMapping
(
"getReplyByLabel"
)
public
ResponseDto
<?>
getReplyByLabel
(
@RequestParam
(
"type"
)
Integer
type
,
@RequestParam
Long
labelId
,
@RequestParam
String
robotId
,
@RequestParam
String
wxUserId
)
throws
BizException
,
PermissionException
{
List
<
SelfRobotReplyVO
>
list
=
selfRobotKeywordBiz
.
getReplyByLabel
(
type
,
labelId
,
robotId
,
wxUserId
);
return
new
ResponseDto
<>(
list
);
}
@Override
@GetMapping
(
"getReplyByKeyWord"
)
public
ResponseDto
<?>
getReplyByKeyWord
(
@RequestParam
(
"keyWord"
)
String
keyWord
,
@RequestParam
(
"type"
)
Integer
type
,
@RequestParam
(
"robotId"
)
String
robotId
,
@RequestParam
(
"wxUserId"
)
String
wxUserId
)
throws
BizException
,
PermissionException
{
List
<
SelfRobotReplyVO
>
list
=
selfRobotKeywordBiz
.
getReplyByKeyWord
(
type
,
keyWord
,
robotId
,
wxUserId
);
return
new
ResponseDto
<>(
list
);
}
@Override
@GetMapping
(
"getReplyByGuide"
)
public
ResponseDto
<?>
getReplyByGuide
(
@RequestParam
Integer
type
,
@RequestParam
Integer
id
,
@RequestParam
String
robotId
,
@RequestParam
String
wxUserId
)
{
List
<
SelfRobotReplyVO
>
list
=
selfRobotKeywordBiz
.
getReplyBuyGuide
(
type
,
id
,
robotId
,
wxUserId
);
return
new
ResponseDto
<>(
list
);
}
@Override
@GetMapping
(
"getResource"
)
public
ResponseDto
<?>
getResource
(
@RequestParam
Integer
id
,
@RequestParam
String
robotId
,
@RequestParam
String
wxUserId
)
{
return
new
ResponseDto
<>(
selfRobotKeywordBiz
.
getResource
(
id
,
robotId
,
wxUserId
));
}
@Override
@GetMapping
(
"joinGroup"
)
public
ResponseDto
<?>
joinGroup
(
@RequestParam
Integer
id
,
@RequestParam
String
robotId
,
@RequestParam
String
wxUserId
)
{
return
new
ResponseDto
<>(
selfRobotKeywordBiz
.
joinGroup
(
id
,
robotId
,
wxUserId
));
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/keywords/mapper/TempRobotSkillDao.java
0 → 100644
View file @
63fbe5a6
package
com
.
pcloud
.
book
.
keywords
.
mapper
;
import
com.pcloud.book.keywords.entity.TempRobotSkill
;
import
com.pcloud.book.keywords.vo.LabelVO
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
@Component
(
"tempRobotSkillDao"
)
public
interface
TempRobotSkillDao
{
List
<
TempRobotSkill
>
getTempRobotSkillListByType
(
@Param
(
"type"
)
Integer
type
);
List
<
TempRobotSkill
>
getTempRobotSkillListByKeyword
(
@Param
(
"type"
)
Integer
type
,
@Param
(
"keyword"
)
String
keyword
);
List
<
TempRobotSkill
>
getTempRobotSkillListByLabelId
(
@Param
(
"type"
)
Integer
type
,
@Param
(
"labelId"
)
Integer
labelId
);
List
<
LabelVO
>
getLabelListByType
(
@Param
(
"type"
)
Integer
type
);
TempRobotSkill
getById
(
@Param
(
"id"
)
Integer
id
);
}
pcloud-service-book/src/main/java/com/pcloud/book/keywords/vo/GuideWordVO.java
0 → 100644
View file @
63fbe5a6
package
com
.
pcloud
.
book
.
keywords
.
vo
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
java.io.Serializable
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
@Data
@ApiModel
@JsonInclude
(
JsonInclude
.
Include
.
NON_NULL
)
public
class
GuideWordVO
implements
Serializable
{
private
Integer
id
;
private
Integer
type
;
private
String
keyWord
;
private
String
guideWord
;
}
pcloud-service-book/src/main/java/com/pcloud/book/keywords/vo/LabelVO.java
0 → 100644
View file @
63fbe5a6
package
com
.
pcloud
.
book
.
keywords
.
vo
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
@Data
public
class
LabelVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1437986453453219619L
;
@ApiModelProperty
(
"标签ID"
)
private
Long
labelId
;
@ApiModelProperty
(
"标签名称"
)
private
String
labelName
;
}
pcloud-service-book/src/main/java/com/pcloud/book/keywords/vo/SelfRobotReplyVO.java
0 → 100644
View file @
63fbe5a6
package
com
.
pcloud
.
book
.
keywords
.
vo
;
import
java.io.Serializable
;
import
lombok.Data
;
/**
* @Description:TODO
* @Author:zcy
* @Date:2020-02-04
* @Version:1.0
*/
@Data
public
class
SelfRobotReplyVO
implements
Serializable
{
private
Integer
id
;
private
String
keyWord
;
private
String
guideWord
;
private
Integer
taskId
;
private
String
taskName
;
private
String
taskIntroduce
;
private
Integer
subscribeState
;
private
String
replyContent
;
private
String
wxGroupId
;
private
String
wxGroupName
;
private
String
wxGroupUserCount
;
}
pcloud-service-book/src/main/resources/mapper/keywords/TempRobotSkill.Mapper.xml
0 → 100644
View file @
63fbe5a6
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.pcloud.book.keywords.mapper.TempRobotSkillDao"
>
<resultMap
id=
"BaseResultMap"
type=
"tempRobotSkill"
>
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"type"
jdbcType=
"INTEGER"
property=
"type"
/>
<result
column=
"key_word"
jdbcType=
"VARCHAR"
property=
"keyWord"
/>
<result
column=
"guide_word"
jdbcType=
"VARCHAR"
property=
"guideWord"
/>
<result
column=
"depth_id"
jdbcType=
"INTEGER"
property=
"depthId"
/>
<result
column=
"depth_label"
jdbcType=
"VARCHAR"
property=
"depthLabel"
/>
<result
column=
"resource_type"
jdbcType=
"VARCHAR"
property=
"resourceType"
/>
<result
column=
"text"
jdbcType=
"VARCHAR"
property=
"text"
/>
<result
column=
"img_url"
jdbcType=
"VARCHAR"
property=
"imgUrl"
/>
<result
column=
"product_id"
jdbcType=
"INTEGER"
property=
"productId"
/>
<result
column=
"file_url"
jdbcType=
"VARCHAR"
property=
"fileUrl"
/>
<result
column=
"file_name"
jdbcType=
"VARCHAR"
property=
"fileName"
/>
<result
column=
"group_id"
jdbcType=
"VARCHAR"
property=
"groupId"
/>
<result
column=
"group_name"
jdbcType=
"VARCHAR"
property=
"groupName"
/>
<result
column=
"reply_content"
jdbcType=
"VARCHAR"
property=
"replyContent"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, type, key_word, guide_word, depth_id, depth_label, resource_type, text, img_url,
product_id, file_url, file_name, group_id, group_name, reply_content
</sql>
<select
id=
"getById"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM temp_robot_skill
WHERE id = #{id}
</select>
<select
id=
"getTempRobotSkillListByType"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM temp_robot_skill
WHERE type = #{type}
</select>
<select
id=
"getTempRobotSkillListByKeyword"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM temp_robot_skill
WHERE type = #{type}
and key_word = #{keyword}
</select>
<select
id=
"getTempRobotSkillListByLabelId"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM temp_robot_skill
WHERE type = #{type}
and depth_id = #{labelId}
</select>
<select
id=
"getLabelListByType"
resultType=
"LabelVO"
>
SELECT
depth_id labelId, depth_label labelName
FROM temp_robot_skill
WHERE type = #{type}
group by depth_id
</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