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
c4143015
Commit
c4143015
authored
Jul 12, 2019
by
songxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
错题本二期知识点浮生内容
parent
434570cb
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
234 additions
and
119 deletions
+234
-119
KnowledgeUseQueueBiz.java
...java/com/pcloud/common/core/biz/KnowledgeUseQueueBiz.java
+22
-0
TranscodeQueueBiz.java
...in/java/com/pcloud/common/core/biz/TranscodeQueueBiz.java
+1
-1
KnowledgeUseQueueBizImpl.java
...pcloud/common/core/biz/impl/KnowledgeUseQueueBizImpl.java
+38
-0
MQQueueConstant.java
...java/com/pcloud/common/core/constant/MQQueueConstant.java
+7
-2
KnowledgeUseMQDTO.java
...in/java/com/pcloud/common/core/dto/KnowledgeUseMQDTO.java
+35
-0
ParamCheck.java
...rc/main/java/com/pcloud/common/exceptions/ParamCheck.java
+131
-116
No files found.
pcloud-common-core/src/main/java/com/pcloud/common/core/biz/KnowledgeUseQueueBiz.java
0 → 100644
View file @
c4143015
/**
*
*/
package
com
.
pcloud
.
common
.
core
.
biz
;
import
com.pcloud.common.core.dto.KnowledgeUseMQDTO
;
import
com.pcloud.common.exceptions.BizException
;
/**
* @author:songx
* @date:2019/6/20,11:38
*/
public
interface
KnowledgeUseQueueBiz
{
/**
* 发送消息
*
* @param knowledgeUseMQDTO
*/
void
send
(
KnowledgeUseMQDTO
knowledgeUseMQDTO
)
throws
BizException
;
}
pcloud-common-core/src/main/java/com/pcloud/common/core/biz/TranscodeQueueBiz.java
View file @
c4143015
...
...
@@ -17,7 +17,7 @@ public interface TranscodeQueueBiz {
/**
* 发送消息
*
* @param
messageQueueDto
* @param
transcodeMQDTO
*/
void
sendTranscodeQueue
(
TranscodeMQDTO
transcodeMQDTO
)
throws
BizException
;
...
...
pcloud-common-core/src/main/java/com/pcloud/common/core/biz/impl/KnowledgeUseQueueBizImpl.java
0 → 100644
View file @
c4143015
/**
*
*/
package
com
.
pcloud
.
common
.
core
.
biz
.
impl
;
import
org.springframework.amqp.core.AmqpTemplate
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
com.pcloud.common.core.aspect.ParamLog
;
import
com.pcloud.common.core.biz.KnowledgeUseQueueBiz
;
import
com.pcloud.common.core.constant.MQQueueConstant
;
import
com.pcloud.common.core.dto.KnowledgeUseMQDTO
;
import
com.pcloud.common.exceptions.BizException
;
/**
* @author:songx
* @date:2019/6/20,11:37
*/
@Component
public
class
KnowledgeUseQueueBizImpl
implements
KnowledgeUseQueueBiz
{
@Autowired
private
AmqpTemplate
amqpTemplate
;
/**
* 知识点标签使用QUEUE
*/
@Override
@ParamLog
(
"知识点标签使用QUEUE"
)
public
void
send
(
KnowledgeUseMQDTO
knowledgeUseMQDTO
)
throws
BizException
{
if
(
knowledgeUseMQDTO
==
null
)
{
throw
BizException
.
PARAM_IS_NULL
;
}
amqpTemplate
.
convertAndSend
(
MQQueueConstant
.
KNOWLEDGE_USE
,
knowledgeUseMQDTO
);
}
}
pcloud-common-core/src/main/java/com/pcloud/common/core/constant/MQQueueConstant.java
View file @
c4143015
...
...
@@ -9,8 +9,13 @@ package com.pcloud.common.core.constant;
* @date:2018年8月16日,下午9:54:51
*/
public
class
MQQueueConstant
{
/**
/**
* 知识点标签使用
*/
public
static
final
String
KNOWLEDGE_USE
=
"knowledgeUse"
;
/**
* 模板消息
*/
public
static
final
String
TEMPLATE
=
"templateQueue"
;
...
...
pcloud-common-core/src/main/java/com/pcloud/common/core/dto/KnowledgeUseMQDTO.java
0 → 100644
View file @
c4143015
/**
*
*/
package
com
.
pcloud
.
common
.
core
.
dto
;
import
java.io.Serializable
;
import
java.util.List
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.ToString
;
/**
* @author:songx
* @date:2018年5月17日,下午4:27:26
*/
@Getter
@Setter
@ToString
(
callSuper
=
true
)
public
class
KnowledgeUseMQDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
6111501255761694004L
;
/**
* 知识点标签
*/
private
List
<
Long
>
knowledgeIds
;
public
KnowledgeUseMQDTO
()
{
}
public
KnowledgeUseMQDTO
(
List
<
Long
>
knowledgeIds
)
{
this
.
knowledgeIds
=
knowledgeIds
;
}
}
pcloud-common/src/main/java/com/pcloud/common/exceptions/ParamCheck.java
View file @
c4143015
package
com
.
pcloud
.
common
.
exceptions
;
import
java.util.List
;
import
org.apache.commons.lang3.StringUtils
;
import
com.pcloud.common.entity.BasePageVO
;
import
com.pcloud.common.utils.ListUtils
;
/**
* 参数校验
*
* @author:songx
* @date:2019年4月15日,下午3:01:35
*/
public
class
ParamCheck
{
/**
* check number is null
*
* @param number
* @param msg
* @throws BizException
* @author songx
* @date 2019年4月23日, 下午3:06:03
*/
public
static
void
isNull
(
Number
number
,
String
msg
)
throws
BizException
{
if
(
number
==
null
)
{
throw
new
BizException
(
BizException
.
PARAM_IS_NULL
.
getCode
(),
msg
);
}
}
/**
* check boolean is null
*
* @param bool
* @param msg
* @throws BizException
* @author songx
* @date 2019年4月23日, 下午3:06:25
*/
public
static
void
isNull
(
Boolean
bool
,
String
msg
)
throws
BizException
{
if
(
bool
==
null
)
{
throw
new
BizException
(
BizException
.
PARAM_IS_NULL
.
getCode
(),
msg
);
}
}
/**
* check string is null
*
* @param string
* @param msg
* @throws BizException
* @author songx
* @date 2019年4月23日, 下午3:06:36
*/
public
static
void
isEmpty
(
String
string
,
String
msg
)
throws
BizException
{
if
(
StringUtils
.
isEmpty
(
string
))
{
throw
new
BizException
(
BizException
.
PARAM_IS_NULL
.
getCode
(),
msg
);
}
}
/**
* check page number is null
*
* @param currentPage
* @param numPerPage
* @throws BizException
* @author songx
* @date 2019年4月23日, 下午3:07:07
*/
public
static
void
isNull
(
Integer
currentPage
,
Integer
numPerPage
)
throws
BizException
{
if
(
currentPage
==
null
||
numPerPage
==
null
||
currentPage
<
0
||
numPerPage
<
0
)
{
throw
BizException
.
PAGE_PARAM_DELETION
;
}
}
/**
* check list is null
*
* @param list
* @param msg
* @throws BizException
* @author songx
* @date 2019年4月23日, 下午3:07:37
*/
public
static
void
isEmpty
(
List
<?>
list
,
String
msg
)
throws
BizException
{
if
(
ListUtils
.
isEmpty
(
list
))
{
throw
new
BizException
(
BizException
.
PARAM_IS_NULL
.
getCode
(),
msg
);
}
}
/**
* 校验分页参数校验分页参数
*
* @param basePageVO
* @throws BizException
*/
public
static
void
pageParam
(
BasePageVO
basePageVO
)
throws
BizException
{
pageParam
(
basePageVO
.
getCurrentPage
(),
basePageVO
.
getNumPerPage
());
}
/**
* 校验分页参数
*
* @param currentPage 当前页
* @param numPerPage 每页行数
* @throws BizException
*/
public
static
void
pageParam
(
Integer
currentPage
,
Integer
numPerPage
)
throws
BizException
{
if
(
currentPage
==
null
||
currentPage
<
0
||
numPerPage
==
null
||
numPerPage
<
0
)
{
throw
BizException
.
PAGE_PARAM_DELETION
;
}
}
}
package
com
.
pcloud
.
common
.
exceptions
;
import
java.util.List
;
import
org.apache.commons.lang3.StringUtils
;
import
com.pcloud.common.entity.BasePageVO
;
import
com.pcloud.common.utils.ListUtils
;
/**
* 参数校验
*
* @author:songx
* @date:2019年4月15日,下午3:01:35
*/
public
class
ParamCheck
{
/**
* check number is null
*
* @param number
* @param msg
* @throws BizException
* @author songx
* @date 2019年4月23日, 下午3:06:03
*/
public
static
void
isNull
(
Number
number
,
String
msg
)
throws
BizException
{
if
(
number
==
null
)
{
throw
new
BizException
(
BizException
.
PARAM_IS_NULL
.
getCode
(),
msg
);
}
}
/**
* check boolean is null
*
* @param bool
* @param msg
* @throws BizException
* @author songx
* @date 2019年4月23日, 下午3:06:25
*/
public
static
void
isNull
(
Boolean
bool
,
String
msg
)
throws
BizException
{
if
(
bool
==
null
)
{
throw
new
BizException
(
BizException
.
PARAM_IS_NULL
.
getCode
(),
msg
);
}
}
/**
* check string is null
*
* @param string
* @param msg
* @throws BizException
* @author songx
* @date 2019年4月23日, 下午3:06:36
*/
public
static
void
isEmpty
(
String
string
,
String
msg
)
throws
BizException
{
if
(
StringUtils
.
isEmpty
(
string
))
{
throw
new
BizException
(
BizException
.
PARAM_IS_NULL
.
getCode
(),
msg
);
}
}
/**
* check page number is null
*
* @param currentPage
* @param numPerPage
* @throws BizException
* @author songx
* @date 2019年4月23日, 下午3:07:07
*/
public
static
void
isNull
(
Integer
currentPage
,
Integer
numPerPage
)
throws
BizException
{
if
(
currentPage
==
null
||
numPerPage
==
null
||
currentPage
<
0
||
numPerPage
<
0
)
{
throw
BizException
.
PAGE_PARAM_DELETION
;
}
}
/**
* check list is null
*
* @param list
* @param msg
* @throws BizException
* @author songx
* @date 2019年4月23日, 下午3:07:37
*/
public
static
void
isEmpty
(
List
<?>
list
,
String
msg
)
throws
BizException
{
if
(
ListUtils
.
isEmpty
(
list
))
{
throw
new
BizException
(
BizException
.
PARAM_IS_NULL
.
getCode
(),
msg
);
}
}
/**
* check bety[] is null
*
* @param bts
* @param msg
* @throws BizException
* @author songx
* @date 2019年4月23日, 下午3:07:37
*/
public
static
void
isEmpty
(
byte
[]
bts
,
String
msg
)
throws
BizException
{
if
(
bts
==
null
||
bts
.
length
==
0
)
{
throw
new
BizException
(
BizException
.
PARAM_IS_NULL
.
getCode
(),
msg
);
}
}
/**
* 校验分页参数校验分页参数
*
* @param basePageVO
* @throws BizException
*/
public
static
void
pageParam
(
BasePageVO
basePageVO
)
throws
BizException
{
pageParam
(
basePageVO
.
getCurrentPage
(),
basePageVO
.
getNumPerPage
());
}
/**
* 校验分页参数
*
* @param currentPage 当前页
* @param numPerPage 每页行数
* @throws BizException
*/
public
static
void
pageParam
(
Integer
currentPage
,
Integer
numPerPage
)
throws
BizException
{
if
(
currentPage
==
null
||
currentPage
<
0
||
numPerPage
==
null
||
numPerPage
<
0
)
{
throw
BizException
.
PAGE_PARAM_DELETION
;
}
}
}
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