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
e5768a8b
Commit
e5768a8b
authored
Dec 03, 2018
by
gaopeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
C904
parent
ddd71fb1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
216 additions
and
0 deletions
+216
-0
BacklogQueueBiz.java
...main/java/com/pcloud/common/core/biz/BacklogQueueBiz.java
+19
-0
BacklogQueueBizImpl.java
.../java/com/pcloud/common/core/biz/BacklogQueueBizImpl.java
+39
-0
MQQueueConstant.java
...java/com/pcloud/common/core/constant/MQQueueConstant.java
+5
-0
BacklogQueueDto.java
...main/java/com/pcloud/common/core/dto/BacklogQueueDto.java
+124
-0
BacklogTypeEnum.java
...in/java/com/pcloud/common/core/enums/BacklogTypeEnum.java
+29
-0
No files found.
pcloud-common-core/src/main/java/com/pcloud/common/core/biz/BacklogQueueBiz.java
0 → 100644
View file @
e5768a8b
package
com
.
pcloud
.
common
.
core
.
biz
;
import
com.pcloud.common.core.dto.BacklogQueueDto
;
import
com.pcloud.common.exceptions.BizException
;
/**
* @描述:待办事项统计队列
* @作者:zhuyajie
* @创建时间:10:33 2018/10/31
* @版本:1.0
*/
public
interface
BacklogQueueBiz
{
/**
* 发送待办事项
* @param backlogQueueDto
*/
public
void
sendBacklogQueue
(
BacklogQueueDto
backlogQueueDto
)
throws
BizException
;
}
pcloud-common-core/src/main/java/com/pcloud/common/core/biz/BacklogQueueBizImpl.java
0 → 100644
View file @
e5768a8b
package
com
.
pcloud
.
common
.
core
.
biz
;
import
com.pcloud.common.core.aspect.ParamLog
;
import
com.pcloud.common.core.constant.MQQueueConstant
;
import
com.pcloud.common.core.dto.BacklogQueueDto
;
import
com.pcloud.common.exceptions.BizException
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.amqp.core.AmqpTemplate
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
/**
* @描述:待办事务统计
* @作者:zhuyajie
* @创建时间:10:46 2018/10/31
* @版本:1.0
*/
@Component
(
"backlogQueueBiz"
)
public
class
BacklogQueueBizImpl
implements
BacklogQueueBiz
{
private
final
static
Logger
logger
=
LoggerFactory
.
getLogger
(
BacklogQueueBizImpl
.
class
);
@Autowired
private
AmqpTemplate
amqpTemplate
;
@Override
@ParamLog
(
"发送待办事务通知"
)
public
void
sendBacklogQueue
(
BacklogQueueDto
backlogQueueDto
)
throws
BizException
{
if
(
backlogQueueDto
==
null
)
{
throw
BizException
.
PARAM_IS_NULL
;
}
try
{
amqpTemplate
.
convertAndSend
(
MQQueueConstant
.
BACKLOG
,
backlogQueueDto
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"发送失败,"
+
e
.
getMessage
()
+
","
+
backlogQueueDto
.
toString
(),
e
);
throw
BizException
.
SEND_QUEUE_FAIL
;
}
}
}
pcloud-common-core/src/main/java/com/pcloud/common/core/constant/MQQueueConstant.java
View file @
e5768a8b
...
@@ -150,4 +150,9 @@ public class MQQueueConstant {
...
@@ -150,4 +150,9 @@ public class MQQueueConstant {
*/
*/
public
static
final
String
DEAD
=
"rays.dlq"
;
public
static
final
String
DEAD
=
"rays.dlq"
;
/**
* 待办事项数量统计
*/
public
static
final
String
BACKLOG
=
"backlogQueue"
;
}
}
pcloud-common-core/src/main/java/com/pcloud/common/core/dto/BacklogQueueDto.java
0 → 100644
View file @
e5768a8b
package
com
.
pcloud
.
common
.
core
.
dto
;
import
java.io.Serializable
;
/**
* @描述:待办事务统计
* @作者:zhuyajie
* @创建时间:10:36 2018/10/31
* @版本:1.0
*/
public
class
BacklogQueueDto
implements
Serializable
{
/**
* 编辑id
*/
private
Long
adviserId
;
/**
* 应用id或商品id
*/
private
Long
targetId
;
/**
*类型(APP/PRODUCT)
*/
private
String
targetType
;
/**
*封面图
*/
private
String
coverImg
;
/**
*标题
*/
private
String
title
;
/**
*待审核/确认数量
*/
private
Integer
waitCount
;
/**
*新动态数量
*/
private
Integer
newCount
;
/**
*应用/商品类型编码
*/
private
String
typeCode
;
public
Long
getAdviserId
()
{
return
adviserId
;
}
public
void
setAdviserId
(
Long
adviserId
)
{
this
.
adviserId
=
adviserId
;
}
public
Long
getTargetId
()
{
return
targetId
;
}
public
void
setTargetId
(
Long
targetId
)
{
this
.
targetId
=
targetId
;
}
public
String
getTargetType
()
{
return
targetType
;
}
public
void
setTargetType
(
String
targetType
)
{
this
.
targetType
=
targetType
;
}
public
String
getCoverImg
()
{
return
coverImg
;
}
public
void
setCoverImg
(
String
coverImg
)
{
this
.
coverImg
=
coverImg
;
}
public
String
getTitle
()
{
return
title
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
Integer
getWaitCount
()
{
return
waitCount
;
}
public
void
setWaitCount
(
Integer
waitCount
)
{
this
.
waitCount
=
waitCount
;
}
public
Integer
getNewCount
()
{
return
newCount
;
}
public
void
setNewCount
(
Integer
newCount
)
{
this
.
newCount
=
newCount
;
}
public
String
getTypeCode
()
{
return
typeCode
;
}
public
void
setTypeCode
(
String
typeCode
)
{
this
.
typeCode
=
typeCode
;
}
@Override
public
String
toString
()
{
return
"BacklogQueueDto{"
+
"adviserId="
+
adviserId
+
", targetId="
+
targetId
+
", targetType='"
+
targetType
+
'\''
+
", coverImg='"
+
coverImg
+
'\''
+
", title='"
+
title
+
'\''
+
", waitCount="
+
waitCount
+
", newCount="
+
newCount
+
", typeCode='"
+
typeCode
+
'\''
+
'}'
;
}
}
pcloud-common-core/src/main/java/com/pcloud/common/core/enums/BacklogTypeEnum.java
0 → 100644
View file @
e5768a8b
package
com
.
pcloud
.
common
.
core
.
enums
;
/**
* @描述:代办事务类型
* @作者:zhuyajie
* @创建时间:10:54 2018/10/31
* @版本:1.0
*/
public
enum
BacklogTypeEnum
{
/**
* 应用
*/
APP
(
"APP"
),
/**
* 作品
*/
PRODUCT
(
"PRODUCT"
);
private
String
value
;
public
String
getValue
()
{
return
value
;
}
BacklogTypeEnum
(
String
value
)
{
this
.
value
=
value
;
}
}
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