记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
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
董敬伟
liquidnet-bus-v1
Commits
286da709
Commit
286da709
authored
Jul 28, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into test
parents
4c53a833
805c6c70
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
171 additions
and
22 deletions
+171
-22
MQConst.java
...ain/java/com/liquidnet/service/base/constant/MQConst.java
+29
-0
application-dev.yml
liquidnet-bus-config/liquidnet-config/application-dev.yml
+0
-2
application-test.yml
liquidnet-bus-config/liquidnet-config/application-test.yml
+0
-2
liquidnet-service-adam-dev.yml
...us-config/liquidnet-config/liquidnet-service-adam-dev.yml
+0
-2
liquidnet-service-adam-test.yml
...s-config/liquidnet-config/liquidnet-service-adam-test.yml
+0
-2
DataImpl.java
...quidnet/service/platform/service/impl/kylin/DataImpl.java
+2
-1
SweetConstant.java
...a/com/liquidnet/service/sweet/constant/SweetConstant.java
+8
-5
QueueUtils.java
...in/java/com/liquidnet/service/sweet/utils/QueueUtils.java
+42
-0
RedisDataUtils.java
...ava/com/liquidnet/service/sweet/utils/RedisDataUtils.java
+48
-8
SweetArtistsSignVo.java
...va/com/liquidnet/service/sweet/vo/SweetArtistsSignVo.java
+21
-0
SweetArtistsWatchVo.java
...a/com/liquidnet/service/sweet/vo/SweetArtistsWatchVo.java
+21
-0
No files found.
liquidnet-bus-common/liquidnet-common-service-base/src/main/java/com/liquidnet/service/base/constant/MQConst.java
View file @
286da709
...
@@ -68,4 +68,33 @@ public class MQConst {
...
@@ -68,4 +68,33 @@ public class MQConst {
return
desc
;
return
desc
;
}
}
}
}
public
enum
SweetQueue
{
artists_watch
(
"sweet:stream:rk.artists.watch"
,
"group.artists.watch"
,
"艺人-想看"
),
artists_signature
(
"sweet:stream:rk.artists.signature"
,
"group.artists.signature"
,
"艺人-签售通知"
),
;
private
final
String
key
;
private
final
String
group
;
private
final
String
desc
;
SweetQueue
(
String
key
,
String
group
,
String
desc
)
{
this
.
key
=
key
;
this
.
group
=
group
;
this
.
desc
=
desc
;
}
public
String
getKey
()
{
return
key
;
}
public
String
getGroup
()
{
return
group
;
}
public
String
getDesc
()
{
return
desc
;
}
}
}
}
liquidnet-bus-config/liquidnet-config/application-dev.yml
View file @
286da709
...
@@ -47,8 +47,6 @@ liquidnet:
...
@@ -47,8 +47,6 @@ liquidnet:
pay
:
http://devdragon.zhengzai.tv/dragon/pay/dragonPay
pay
:
http://devdragon.zhengzai.tv/dragon/pay/dragonPay
check
:
http://devdragon.zhengzai.tv/dragon/pay/checkOrder
check
:
http://devdragon.zhengzai.tv/dragon/pay/checkOrder
callback
:
http://devadam.zhengzai.tv/adam/member/order/callback
callback
:
http://devadam.zhengzai.tv/adam/member/order/callback
url-service
:
url
:
http://devservice.zhengzai.tv
kylin
:
kylin
:
url-pay
:
url-pay
:
pay
:
http://devdragon.zhengzai.tv/dragon/pay/dragonPay
pay
:
http://devdragon.zhengzai.tv/dragon/pay/dragonPay
...
...
liquidnet-bus-config/liquidnet-config/application-test.yml
View file @
286da709
...
@@ -47,8 +47,6 @@ liquidnet:
...
@@ -47,8 +47,6 @@ liquidnet:
pay
:
http://testdragon.zhengzai.tv/dragon/pay/dragonPay
pay
:
http://testdragon.zhengzai.tv/dragon/pay/dragonPay
check
:
http://testdragon.zhengzai.tv/dragon/pay/checkOrder
check
:
http://testdragon.zhengzai.tv/dragon/pay/checkOrder
callback
:
http://testadam.zhengzai.tv/adam/member/order/callback
callback
:
http://testadam.zhengzai.tv/adam/member/order/callback
url-service
:
url
:
http://testservice.zhengzai.tv
kylin
:
kylin
:
url-pay
:
url-pay
:
pay
:
http://testdragon.zhengzai.tv/dragon/pay/dragonPay
pay
:
http://testdragon.zhengzai.tv/dragon/pay/dragonPay
...
...
liquidnet-bus-config/liquidnet-config/liquidnet-service-adam-dev.yml
View file @
286da709
...
@@ -21,8 +21,6 @@ liquidnet:
...
@@ -21,8 +21,6 @@ liquidnet:
pay
:
${liquidnet.service.adam.url-pay.pay}
pay
:
${liquidnet.service.adam.url-pay.pay}
check
:
${liquidnet.service.adam.url-pay.check}
check
:
${liquidnet.service.adam.url-pay.check}
callback
:
${liquidnet.service.adam.url-pay.callback}
callback
:
${liquidnet.service.adam.url-pay.callback}
url-service
:
url
:
${liquidnet.service.adam.url-service.url}
reviewer
:
reviewer
:
app-login
:
app-login
:
mobile
:
13724286255
mobile
:
13724286255
...
...
liquidnet-bus-config/liquidnet-config/liquidnet-service-adam-test.yml
View file @
286da709
...
@@ -21,8 +21,6 @@ liquidnet:
...
@@ -21,8 +21,6 @@ liquidnet:
pay
:
${liquidnet.service.adam.url-pay.pay}
pay
:
${liquidnet.service.adam.url-pay.pay}
check
:
${liquidnet.service.adam.url-pay.check}
check
:
${liquidnet.service.adam.url-pay.check}
callback
:
${liquidnet.service.adam.url-pay.callback}
callback
:
${liquidnet.service.adam.url-pay.callback}
url-service
:
url
:
${liquidnet.service.adam.url-service.url}
reviewer
:
reviewer
:
app-login
:
app-login
:
mobile
:
13724286255
mobile
:
13724286255
...
...
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/service/impl/kylin/DataImpl.java
View file @
286da709
...
@@ -21,6 +21,7 @@ import com.liquidnet.service.platform.utils.PerformanceVoTask;
...
@@ -21,6 +21,7 @@ import com.liquidnet.service.platform.utils.PerformanceVoTask;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.DigestUtils
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.sql.Connection
;
import
java.sql.Connection
;
...
@@ -868,7 +869,7 @@ public class DataImpl {
...
@@ -868,7 +869,7 @@ public class DataImpl {
checkUserVo
.
setMerchantId
(
checkUser
.
getMerchantId
());
checkUserVo
.
setMerchantId
(
checkUser
.
getMerchantId
());
checkUserVo
.
setMobile
(
checkUser
.
getMobile
());
checkUserVo
.
setMobile
(
checkUser
.
getMobile
());
checkUserVo
.
setName
(
checkUser
.
getName
());
checkUserVo
.
setName
(
checkUser
.
getName
());
checkUserVo
.
setPwd
(
checkUser
.
getMobile
(
));
checkUserVo
.
setPwd
(
DigestUtils
.
md5DigestAsHex
(
StringUtil
.
right
(
checkUser
.
getMobile
(),
8
).
getBytes
()
));
checkUserVo
.
setStatus
(
"1"
);
checkUserVo
.
setStatus
(
"1"
);
checkUserList
.
add
(
checkUser
);
checkUserList
.
add
(
checkUser
);
...
...
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/constant/SweetConstant.java
View file @
286da709
...
@@ -5,11 +5,14 @@ package com.liquidnet.service.sweet.constant;
...
@@ -5,11 +5,14 @@ package com.liquidnet.service.sweet.constant;
*/
*/
public
class
SweetConstant
{
public
class
SweetConstant
{
public
final
static
String
REDIS_KEY_SWEET_MANUAL_PUSH_LIST
=
"sweet:manual:pushList"
;
public
final
static
String
REDIS_KEY_SWEET_MANUAL_PUSH_LIST
=
"sweet:manual:pushList"
;
public
final
static
String
REDIS_KEY_SWEET_MANUAL_TIME_LIST
=
"sweet:manual:timeList:manual:"
;
public
final
static
String
REDIS_KEY_SWEET_MANUAL_TIME_LIST
=
"sweet:manual:timeList:manual:"
;
public
final
static
String
REDIS_KEY_SWEET_MANUAL_NOTIFY_LIST
=
"sweet:manual:notify:manual:"
;
public
final
static
String
REDIS_KEY_SWEET_MANUAL_NOTIFY_LIST
=
"sweet:manual:notify:manual:"
;
public
final
static
String
REDIS_KEY_SWEET_MANUAL_RICH_TEXT
=
"sweet:manual:richText:manual:"
;
public
final
static
String
REDIS_KEY_SWEET_MANUAL_RICH_TEXT
=
"sweet:manual:richText:manual:"
;
public
final
static
String
REDIS_KEY_SWEET_MANUAL_SORT
=
"sweet:manual:sort:manual:"
;
public
final
static
String
REDIS_KEY_SWEET_MANUAL_SORT
=
"sweet:manual:sort:manual:"
;
public
final
static
String
REDIS_KEY_SWEET_ARTISTS_WATCH
=
"sweet:artists:watch:uid:"
;
public
final
static
String
REDIS_KEY_SWEET_ARTISTS_SIGN
=
"sweet:artists:sign:uid:"
;
public
enum
ManualPosition
{
public
enum
ManualPosition
{
POSITION_1
(
"艺人"
),
POSITION_1
(
"艺人"
),
...
...
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/utils/QueueUtils.java
0 → 100644
View file @
286da709
package
com
.
liquidnet
.
service
.
sweet
.
utils
;
import
com.liquidnet.commons.lang.util.CollectionUtil
;
import
org.springframework.amqp.rabbit.core.RabbitTemplate
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.connection.stream.StreamRecords
;
import
org.springframework.data.redis.core.StringRedisTemplate
;
import
org.springframework.stereotype.Component
;
import
java.util.HashMap
;
@Component
public
class
QueueUtils
{
@Autowired
private
RabbitTemplate
rabbitTemplate
;
@Autowired
StringRedisTemplate
stringRedisTemplate
;
/**
* 发送消息 - RABBIT
*
* @param exchange 交换机
* @param routeKey 路径
* @param jsonMsg Json字符串
*/
public
void
sendMsgByRabbit
(
String
exchange
,
String
routeKey
,
String
jsonMsg
)
{
rabbitTemplate
.
convertAndSend
(
exchange
,
routeKey
,
jsonMsg
);
}
/**
* 发送消息 - REDIS
*
* @param streamKey Redis消费Key
* @param jsonMsg Json字符串
*/
public
void
sendMsgByRedis
(
String
streamKey
,
String
jsonMsg
)
{
HashMap
<
String
,
String
>
map
=
CollectionUtil
.
mapStringString
();
map
.
put
(
"message"
,
jsonMsg
);
stringRedisTemplate
.
opsForStream
().
add
(
StreamRecords
.
mapBacked
(
map
).
withStreamKey
(
streamKey
));
}
}
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/utils/RedisDataUtils.java
View file @
286da709
...
@@ -13,6 +13,8 @@ import com.liquidnet.service.sweet.entity.SweetManualNotify;
...
@@ -13,6 +13,8 @@ import com.liquidnet.service.sweet.entity.SweetManualNotify;
import
com.liquidnet.service.sweet.entity.SweetManualSort
;
import
com.liquidnet.service.sweet.entity.SweetManualSort
;
import
com.liquidnet.service.sweet.entity.SweetRichtext
;
import
com.liquidnet.service.sweet.entity.SweetRichtext
;
import
com.liquidnet.service.sweet.mapper.*
;
import
com.liquidnet.service.sweet.mapper.*
;
import
com.liquidnet.service.sweet.vo.SweetArtistsSignVo
;
import
com.liquidnet.service.sweet.vo.SweetArtistsWatchVo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
...
@@ -75,7 +77,7 @@ public class RedisDataUtils {
...
@@ -75,7 +77,7 @@ public class RedisDataUtils {
return
returnData
;
return
returnData
;
}
}
public
SweetManualArtistList2Dto
setTimeList
(
String
manualId
,
String
content
)
{
public
SweetManualArtistList2Dto
setTimeList
(
String
manualId
,
String
content
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_MANUAL_TIME_LIST
.
concat
(
manualId
);
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_MANUAL_TIME_LIST
.
concat
(
manualId
);
HashMap
<
String
,
Object
>
map
=
CollectionUtil
.
mapStringObject
();
HashMap
<
String
,
Object
>
map
=
CollectionUtil
.
mapStringObject
();
map
.
put
(
"manualId"
,
manualId
);
map
.
put
(
"manualId"
,
manualId
);
...
@@ -107,18 +109,18 @@ public class RedisDataUtils {
...
@@ -107,18 +109,18 @@ public class RedisDataUtils {
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_MANUAL_TIME_LIST
.
concat
(
manualId
);
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_MANUAL_TIME_LIST
.
concat
(
manualId
);
Object
obj
=
redisUtil
.
get
(
redisKey
);
Object
obj
=
redisUtil
.
get
(
redisKey
);
if
(
obj
==
null
)
{
if
(
obj
==
null
)
{
return
setTimeList
(
manualId
,
null
);
return
setTimeList
(
manualId
,
null
);
}
else
{
}
else
{
return
(
SweetManualArtistList2Dto
)
obj
;
return
(
SweetManualArtistList2Dto
)
obj
;
}
}
}
}
public
SweetRichtext
setRichTextRedisData
(
String
manualId
,
String
type
,
SweetRichtext
content
)
{
public
SweetRichtext
setRichTextRedisData
(
String
manualId
,
String
type
,
SweetRichtext
content
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_MANUAL_RICH_TEXT
.
concat
(
manualId
).
concat
(
":type:"
+
type
);
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_MANUAL_RICH_TEXT
.
concat
(
manualId
).
concat
(
":type:"
+
type
);
SweetRichtext
sweetRichtext
;
SweetRichtext
sweetRichtext
;
if
(
content
!=
null
)
{
if
(
content
!=
null
)
{
sweetRichtext
=
content
;
sweetRichtext
=
content
;
}
else
{
}
else
{
sweetRichtext
=
sweetRichtextMapper
.
selectOne
(
Wrappers
.
lambdaQuery
(
SweetRichtext
.
class
).
eq
(
SweetRichtext:
:
getManualId
,
manualId
).
eq
(
SweetRichtext:
:
getType
,
type
));
sweetRichtext
=
sweetRichtextMapper
.
selectOne
(
Wrappers
.
lambdaQuery
(
SweetRichtext
.
class
).
eq
(
SweetRichtext:
:
getManualId
,
manualId
).
eq
(
SweetRichtext:
:
getType
,
type
));
}
}
redisUtil
.
set
(
redisKey
,
sweetRichtext
);
redisUtil
.
set
(
redisKey
,
sweetRichtext
);
...
@@ -127,10 +129,10 @@ public class RedisDataUtils {
...
@@ -127,10 +129,10 @@ public class RedisDataUtils {
//获取富文本详情
//获取富文本详情
public
SweetRichtext
getRichTextRedisData
(
String
manualId
,
String
type
)
{
public
SweetRichtext
getRichTextRedisData
(
String
manualId
,
String
type
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_MANUAL_RICH_TEXT
.
concat
(
manualId
).
concat
(
":type:"
+
type
);
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_MANUAL_RICH_TEXT
.
concat
(
manualId
).
concat
(
":type:"
+
type
);
Object
obj
=
redisUtil
.
get
(
redisKey
);
Object
obj
=
redisUtil
.
get
(
redisKey
);
if
(
obj
==
null
)
{
if
(
obj
==
null
)
{
return
setRichTextRedisData
(
manualId
,
type
,
null
);
return
setRichTextRedisData
(
manualId
,
type
,
null
);
}
else
{
}
else
{
return
(
SweetRichtext
)
obj
;
return
(
SweetRichtext
)
obj
;
}
}
...
@@ -193,4 +195,42 @@ public class RedisDataUtils {
...
@@ -193,4 +195,42 @@ public class RedisDataUtils {
public
void
deleteSortRedisData
(
String
manualId
)
{
public
void
deleteSortRedisData
(
String
manualId
)
{
redisUtil
.
del
(
SweetConstant
.
REDIS_KEY_SWEET_MANUAL_SORT
.
concat
(
manualId
));
//列表
redisUtil
.
del
(
SweetConstant
.
REDIS_KEY_SWEET_MANUAL_SORT
.
concat
(
manualId
));
//列表
}
}
public
void
setArtistsWatchRedisVo
(
String
uid
,
String
artistsId
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_ARTISTS_WATCH
.
concat
(
uid
);
SweetArtistsWatchVo
vo
=
getArtistsWatchRedisVo
(
uid
);
vo
.
setUid
(
uid
);
vo
.
getArtistsIdList
().
add
(
artistsId
);
redisUtil
.
set
(
redisKey
,
vo
);
}
//获取想看
public
SweetArtistsWatchVo
getArtistsWatchRedisVo
(
String
uid
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_ARTISTS_WATCH
.
concat
(
uid
);
Object
obj
=
redisUtil
.
get
(
redisKey
);
if
(
obj
==
null
)
{
return
SweetArtistsWatchVo
.
getNew
();
}
else
{
return
(
SweetArtistsWatchVo
)
obj
;
}
}
public
void
setArtistsSignRedisVo
(
String
uid
,
String
artistsId
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_ARTISTS_SIGN
.
concat
(
uid
);
SweetArtistsSignVo
vo
=
getArtistsSignRedisVo
(
uid
);
vo
.
setUid
(
uid
);
vo
.
getArtistsIdList
().
add
(
artistsId
);
redisUtil
.
set
(
redisKey
,
vo
);
}
//获取 签售
public
SweetArtistsSignVo
getArtistsSignRedisVo
(
String
uid
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_ARTISTS_SIGN
.
concat
(
uid
);
Object
obj
=
redisUtil
.
get
(
redisKey
);
if
(
obj
==
null
)
{
return
SweetArtistsSignVo
.
getNew
();
}
else
{
return
(
SweetArtistsSignVo
)
obj
;
}
}
}
}
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/vo/SweetArtistsSignVo.java
0 → 100644
View file @
286da709
package
com
.
liquidnet
.
service
.
sweet
.
vo
;
import
com.liquidnet.service.sweet.dto.SweetManualArtistList2Dto
;
import
lombok.Data
;
import
java.util.ArrayList
;
@Data
public
class
SweetArtistsSignVo
implements
Cloneable
{
private
String
uid
;
private
ArrayList
<
String
>
artistsIdList
;
private
static
final
SweetArtistsSignVo
obj
=
new
SweetArtistsSignVo
();
public
static
SweetArtistsSignVo
getNew
()
{
try
{
return
(
SweetArtistsSignVo
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
SweetArtistsSignVo
();
}
}
}
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/vo/SweetArtistsWatchVo.java
0 → 100644
View file @
286da709
package
com
.
liquidnet
.
service
.
sweet
.
vo
;
import
com.liquidnet.service.sweet.dto.SweetManualArtistList2Dto
;
import
lombok.Data
;
import
java.util.ArrayList
;
@Data
public
class
SweetArtistsWatchVo
implements
Cloneable
{
private
String
uid
;
private
ArrayList
<
String
>
artistsIdList
;
private
static
final
SweetArtistsWatchVo
obj
=
new
SweetArtistsWatchVo
();
public
static
SweetArtistsWatchVo
getNew
()
{
try
{
return
(
SweetArtistsWatchVo
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
SweetArtistsWatchVo
();
}
}
}
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