Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
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
youjj
cloud-platform
Commits
64eaa163
Commit
64eaa163
authored
Jul 19, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'base-modify' of
http://113.105.137.151:22280/youjj/cloud-platform
into base-modify
parents
df3d569d
39d85881
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
90 additions
and
28 deletions
+90
-28
bootstrap.yml
ace-gate/src/main/resources/bootstrap.yml
+2
-1
bootstrap.yml
ace-modules/ace-admin/src/main/resources/bootstrap.yml
+1
-1
IntegralUserRecord.java
...com/xxfc/platform/activity/entity/IntegralUserRecord.java
+0
-1
IntegralUserRecordDto.java
.../com/xxfc/platform/activity/vo/IntegralUserRecordDto.java
+1
-1
IntegralMQHandler.java
...com/xxfc/platform/activity/handler/IntegralMQHandler.java
+1
-2
IntegralUserRecordMapper.xml
...er/src/main/resources/mapper/IntegralUserRecordMapper.xml
+1
-1
pom.xml
xx-im/xx-im-api/pom.xml
+6
-1
ImCommentBiz.java
.../src/main/java/com/xxfc/platform/im/biz/ImCommentBiz.java
+12
-1
ImQuestionBiz.java
...src/main/java/com/xxfc/platform/im/biz/ImQuestionBiz.java
+13
-1
MsgBiz.java
...server/src/main/java/com/xxfc/platform/im/biz/MsgBiz.java
+6
-2
bootstrap.yml
xx-im/xx-im-server/src/main/resources/bootstrap.yml
+2
-1
MQconstant.java
...java/com/xxfc/platform/universal/constant/MQconstant.java
+8
-0
MQSenderFeign.java
...java/com/xxfc/platform/universal/feign/MQSenderFeign.java
+2
-2
MQServiceBiZ.java
...in/java/com/xxfc/platform/universal/biz/MQServiceBiZ.java
+5
-2
OrderPayBiz.java
...ain/java/com/xxfc/platform/universal/biz/OrderPayBiz.java
+30
-11
No files found.
ace-gate/src/main/resources/bootstrap.yml
View file @
64eaa163
...
@@ -17,7 +17,8 @@ spring:
...
@@ -17,7 +17,8 @@ spring:
nacos
:
nacos
:
config
:
config
:
server-addr
:
127.0.0.1:8848
server-addr
:
127.0.0.1:8848
#共用配置,暂定一个
shared-dataids
:
common-dev.yaml,mongodb-log-dev.yaml
---
---
spring
:
spring
:
profiles
:
pro
profiles
:
pro
...
...
ace-modules/ace-admin/src/main/resources/bootstrap.yml
View file @
64eaa163
...
@@ -17,7 +17,7 @@ spring:
...
@@ -17,7 +17,7 @@ spring:
config
:
config
:
server-addr
:
127.0.0.1:8848
server-addr
:
127.0.0.1:8848
#共用配置,暂定一个
#共用配置,暂定一个
shared-dataids
:
common-dev.yaml
shared-dataids
:
common-dev.yaml
,mongodb-log-dev.yaml
---
---
spring
:
spring
:
...
...
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/entity/IntegralUserRecord.java
View file @
64eaa163
package
com
.
xxfc
.
platform
.
activity
.
entity
;
package
com
.
xxfc
.
platform
.
activity
.
entity
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
javax.persistence.Column
;
...
...
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/vo/IntegralUserRecordDto.java
View file @
64eaa163
...
@@ -14,7 +14,7 @@ public class IntegralUserRecordDto extends PageParam {
...
@@ -14,7 +14,7 @@ public class IntegralUserRecordDto extends PageParam {
/**
/**
* 0-获取积分;1-抵扣积分
* 0-获取积分;1-抵扣积分
*/
*/
private
Integer
type
;
private
Integer
type
=
0
;
/**
/**
* 积分数
* 积分数
...
...
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/handler/IntegralMQHandler.java
View file @
64eaa163
...
@@ -4,7 +4,6 @@ package com.xxfc.platform.activity.handler;
...
@@ -4,7 +4,6 @@ package com.xxfc.platform.activity.handler;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.rabbitmq.client.Channel
;
import
com.rabbitmq.client.Channel
;
import
com.xxfc.platform.activity.biz.IntegralUserRecordBiz
;
import
com.xxfc.platform.activity.biz.IntegralUserRecordBiz
;
import
com.xxfc.platform.activity.config.RabbitActivityConfig
;
import
com.xxfc.platform.activity.vo.IntegralUserRecordDto
;
import
com.xxfc.platform.activity.vo.IntegralUserRecordDto
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -27,7 +26,7 @@ public class IntegralMQHandler {
...
@@ -27,7 +26,7 @@ public class IntegralMQHandler {
@Autowired
@Autowired
IntegralUserRecordBiz
integralUserRecordBiz
;
IntegralUserRecordBiz
integralUserRecordBiz
;
@RabbitListener
(
queues
=
RabbitActivityConfig
.
INTEGRAL_QUEUE
)
@RabbitListener
(
queues
=
"integral_handle_queue"
)
public
void
integralHandler
(
Message
message
,
@Headers
Map
<
String
,
Object
>
headers
,
Channel
channel
)
{
public
void
integralHandler
(
Message
message
,
@Headers
Map
<
String
,
Object
>
headers
,
Channel
channel
)
{
ExecutorService
executorService
=
Executors
.
newCachedThreadPool
();
ExecutorService
executorService
=
Executors
.
newCachedThreadPool
();
executorService
.
execute
(
new
Runnable
()
{
executorService
.
execute
(
new
Runnable
()
{
...
...
xx-activity/xx-activity-server/src/main/resources/mapper/IntegralUserRecordMapper.xml
View file @
64eaa163
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<result
column=
"user_id"
property=
"userId"
jdbcType=
"INTEGER"
/>
<result
column=
"user_id"
property=
"userId"
jdbcType=
"INTEGER"
/>
<result
column=
"type"
property=
"type"
jdbcType=
"INTEGER"
/>
<result
column=
"type"
property=
"type"
jdbcType=
"INTEGER"
/>
<result
column=
"point"
property=
"point"
jdbcType=
"INTEGER"
/>
<result
column=
"point"
property=
"point"
jdbcType=
"INTEGER"
/>
<result
column=
"integral_rule_code"
property=
"integralRuleCode"
jdbcType=
"
INTEGE
R"
/>
<result
column=
"integral_rule_code"
property=
"integralRuleCode"
jdbcType=
"
VARCHA
R"
/>
<result
column=
"crt_time"
property=
"crtTime"
jdbcType=
"BIGINT"
/>
<result
column=
"crt_time"
property=
"crtTime"
jdbcType=
"BIGINT"
/>
<result
column=
"is_valid"
property=
"isValid"
jdbcType=
"BIT"
/>
<result
column=
"is_valid"
property=
"isValid"
jdbcType=
"BIT"
/>
<result
column=
"isdel"
property=
"isdel"
jdbcType=
"BIT"
/>
<result
column=
"isdel"
property=
"isdel"
jdbcType=
"BIT"
/>
...
...
xx-im/xx-im-api/pom.xml
View file @
64eaa163
...
@@ -23,7 +23,12 @@
...
@@ -23,7 +23,12 @@
<artifactId>
ace-auth-client
</artifactId>
<artifactId>
ace-auth-client
</artifactId>
<version>
2.0-SNAPSHOT
</version>
<version>
2.0-SNAPSHOT
</version>
</dependency>
</dependency>
<dependency>
<groupId>
com.xxfc.platform
</groupId>
<artifactId>
xx-universal-api
</artifactId>
<version>
2.0-SNAPSHOT
</version>
<scope>
compile
</scope>
</dependency>
<!-- 自己项目 -->
<!-- 自己项目 -->
...
...
xx-im/xx-im-server/src/main/java/com/xxfc/platform/im/biz/ImCommentBiz.java
View file @
64eaa163
package
com
.
xxfc
.
platform
.
im
.
biz
;
package
com
.
xxfc
.
platform
.
im
.
biz
;
import
com.alibaba.fastjson.JSONObject
;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
...
@@ -8,6 +9,8 @@ import com.xxfc.platform.im.dto.UpdateTypeEnum;
...
@@ -8,6 +9,8 @@ import com.xxfc.platform.im.dto.UpdateTypeEnum;
import
com.xxfc.platform.im.entity.ImComment
;
import
com.xxfc.platform.im.entity.ImComment
;
import
com.xxfc.platform.im.entity.ImQuestion
;
import
com.xxfc.platform.im.entity.ImQuestion
;
import
com.xxfc.platform.im.mapper.ImCommentMapper
;
import
com.xxfc.platform.im.mapper.ImCommentMapper
;
import
com.xxfc.platform.universal.constant.MQconstant
;
import
com.xxfc.platform.universal.feign.MQSenderFeign
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -20,7 +23,8 @@ public class ImCommentBiz extends BaseBiz<ImCommentMapper, ImComment> {
...
@@ -20,7 +23,8 @@ public class ImCommentBiz extends BaseBiz<ImCommentMapper, ImComment> {
ImQuestionBiz
imQuestionBiz
;
ImQuestionBiz
imQuestionBiz
;
@Autowired
@Autowired
UserBiz
userBiz
;
UserBiz
userBiz
;
@Autowired
MQSenderFeign
mqSenderFeign
;
/**
/**
* 添加评论
* 添加评论
*
*
...
@@ -43,8 +47,15 @@ public class ImCommentBiz extends BaseBiz<ImCommentMapper, ImComment> {
...
@@ -43,8 +47,15 @@ public class ImCommentBiz extends BaseBiz<ImCommentMapper, ImComment> {
return
ObjectRestResponse
.
createDefaultFail
();
return
ObjectRestResponse
.
createDefaultFail
();
}
}
insertSelective
(
imComment
);
insertSelective
(
imComment
);
ImQuestion
newValue
=
imQuestionBiz
.
selectById
(
imComment
.
getQuestionId
());
//修改评论数
//修改评论数
imQuestionBiz
.
update
(
imComment
.
getQuestionId
(),
MsgTypeEnum
.
comment
,
UpdateTypeEnum
.
add
);
imQuestionBiz
.
update
(
imComment
.
getQuestionId
(),
MsgTypeEnum
.
comment
,
UpdateTypeEnum
.
add
);
//评论添加积分
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"userId"
,
appUserDTO
.
getUserid
());
jsonObject
.
put
(
"channelId"
,
newValue
.
getId
());
jsonObject
.
put
(
"integralRuleCode"
,
"COMMENTPUBLISH"
);
mqSenderFeign
.
sendMessage
(
MQconstant
.
INTEGRAL_EXCHANGE
,
MQconstant
.
INTEGRAL_ROUTING_KEY
,
jsonObject
.
toJSONString
());
return
ObjectRestResponse
.
succ
();
return
ObjectRestResponse
.
succ
();
}
}
...
...
xx-im/xx-im-server/src/main/java/com/xxfc/platform/im/biz/ImQuestionBiz.java
View file @
64eaa163
package
com
.
xxfc
.
platform
.
im
.
biz
;
package
com
.
xxfc
.
platform
.
im
.
biz
;
import
com.alibaba.fastjson.JSONObject
;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
...
@@ -10,6 +11,8 @@ import com.xxfc.platform.im.dto.QuestionParamDto;
...
@@ -10,6 +11,8 @@ import com.xxfc.platform.im.dto.QuestionParamDto;
import
com.xxfc.platform.im.dto.UpdateTypeEnum
;
import
com.xxfc.platform.im.dto.UpdateTypeEnum
;
import
com.xxfc.platform.im.entity.ImQuestion
;
import
com.xxfc.platform.im.entity.ImQuestion
;
import
com.xxfc.platform.im.mapper.ImQuestionMapper
;
import
com.xxfc.platform.im.mapper.ImQuestionMapper
;
import
com.xxfc.platform.universal.constant.MQconstant
;
import
com.xxfc.platform.universal.feign.MQSenderFeign
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -22,6 +25,9 @@ public class ImQuestionBiz extends BaseBiz<ImQuestionMapper, ImQuestion> {
...
@@ -22,6 +25,9 @@ public class ImQuestionBiz extends BaseBiz<ImQuestionMapper, ImQuestion> {
@Autowired
@Autowired
UserBiz
userBiz
;
UserBiz
userBiz
;
@Autowired
MQSenderFeign
mqSenderFeign
;
/**
/**
* 获取列表
* 获取列表
*
*
...
@@ -59,6 +65,12 @@ public class ImQuestionBiz extends BaseBiz<ImQuestionMapper, ImQuestion> {
...
@@ -59,6 +65,12 @@ public class ImQuestionBiz extends BaseBiz<ImQuestionMapper, ImQuestion> {
return
ObjectRestResponse
.
paramIsEmpty
();
return
ObjectRestResponse
.
paramIsEmpty
();
}
}
insertSelective
(
imQuestion
);
insertSelective
(
imQuestion
);
ImQuestion
newValue
=
mapper
.
selectOne
(
imQuestion
);
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"userId"
,
appUserDTO
.
getUserid
());
jsonObject
.
put
(
"channelId"
,
newValue
.
getId
());
jsonObject
.
put
(
"integralRuleCode"
,
"PUBLISH"
);
mqSenderFeign
.
sendMessage
(
MQconstant
.
INTEGRAL_EXCHANGE
,
MQconstant
.
INTEGRAL_ROUTING_KEY
,
jsonObject
.
toJSONString
());
return
ObjectRestResponse
.
succ
();
return
ObjectRestResponse
.
succ
();
}
}
...
...
xx-im/xx-im-server/src/main/java/com/xxfc/platform/im/biz/MsgBiz.java
View file @
64eaa163
...
@@ -67,8 +67,12 @@ public class MsgBiz {
...
@@ -67,8 +67,12 @@ public class MsgBiz {
ids
.
add
(
2
);
ids
.
add
(
2
);
ids
.
add
(
4
);
ids
.
add
(
4
);
query
=
new
Query
(
Criteria
.
where
(
"body.type"
).
in
(
ids
));
query
=
new
Query
(
Criteria
.
where
(
"body.type"
).
in
(
ids
));
List
<
Msg
>
list
=
mongoTemplate
.
find
(
query
,
Msg
.
class
,
"s_msg"
);
if
(
appUserDTO
!=
null
)
{
msgList
=
fetchAndAttach
(
list
,
appUserDTO
.
getImUserid
());
msgList
=
fetchAndAttach
(
mongoTemplate
.
find
(
query
,
Msg
.
class
,
"s_msg"
),
appUserDTO
.
getImUserid
());
PageInfo
<
MsgVo
>
goodPageInfo
=
new
PageInfo
<>(
replaceMsgResult
(
msgList
));
return
ObjectRestResponse
.
succ
(
goodPageInfo
);
}
msgList
=
mongoTemplate
.
find
(
query
,
Msg
.
class
,
"s_msg"
);
PageInfo
<
MsgVo
>
goodPageInfo
=
new
PageInfo
<>(
replaceMsgResult
(
msgList
));
PageInfo
<
MsgVo
>
goodPageInfo
=
new
PageInfo
<>(
replaceMsgResult
(
msgList
));
return
ObjectRestResponse
.
succ
(
goodPageInfo
);
return
ObjectRestResponse
.
succ
(
goodPageInfo
);
}
}
...
...
xx-im/xx-im-server/src/main/resources/bootstrap.yml
View file @
64eaa163
...
@@ -24,7 +24,8 @@ spring:
...
@@ -24,7 +24,8 @@ spring:
nacos
:
nacos
:
config
:
config
:
server-addr
:
127.0.0.1:8848
server-addr
:
127.0.0.1:8848
#共用配置,暂定一个
shared-dataids
:
common-dev.yaml,mongodb-log-dev.yaml
---
---
spring
:
spring
:
profiles
:
pro
profiles
:
pro
...
...
xx-universal/xx-universal-api/src/main/java/com/xxfc/platform/universal/constant/MQconstant.java
0 → 100644
View file @
64eaa163
package
com
.
xxfc
.
platform
.
universal
.
constant
;
public
class
MQconstant
{
public
static
final
String
INTEGRAL_EXCHANGE
=
"integral_exchange"
;
public
static
final
String
INTEGRAL_ROUTING_KEY
=
"integral_routing_key"
;
}
xx-universal/xx-universal-api/src/main/java/com/xxfc/platform/universal/feign/MQSe
r
derFeign.java
→
xx-universal/xx-universal-api/src/main/java/com/xxfc/platform/universal/feign/MQSe
n
derFeign.java
View file @
64eaa163
...
@@ -6,9 +6,9 @@ import org.springframework.web.bind.annotation.GetMapping;
...
@@ -6,9 +6,9 @@ import org.springframework.web.bind.annotation.GetMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
@FeignClient
(
value
=
"xx-universal"
,
contextId
=
"sendMessage"
)
@FeignClient
(
value
=
"xx-universal"
,
contextId
=
"sendMessage"
)
public
interface
MQSe
r
derFeign
{
public
interface
MQSe
n
derFeign
{
@GetMapping
(
value
=
"/message/sendMessage"
)
@GetMapping
(
value
=
"/message/sendMessage"
)
public
ObjectRestResponse
sendMessage
(
@RequestParam
(
value
=
"exchange"
)
String
exchange
,
@RequestParam
(
value
=
"rout
ingKey"
)
String
routKey
,
@RequestParam
(
value
=
"jsonParam"
)
String
jsonParam
);
public
ObjectRestResponse
sendMessage
(
@RequestParam
(
value
=
"exchange"
)
String
exchange
,
@RequestParam
(
value
=
"rout
Key"
)
String
routKey
,
@RequestParam
(
value
=
"json"
)
String
json
);
}
}
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/biz/MQServiceBiZ.java
View file @
64eaa163
package
com
.
xxfc
.
platform
.
universal
.
biz
;
package
com
.
xxfc
.
platform
.
universal
.
biz
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
lombok.
AllArgsConstructor
;
import
lombok.
extern.slf4j.Slf4j
;
import
org.springframework.amqp.core.Message
;
import
org.springframework.amqp.core.Message
;
import
org.springframework.amqp.core.MessageBuilder
;
import
org.springframework.amqp.core.MessageBuilder
;
import
org.springframework.amqp.core.MessageProperties
;
import
org.springframework.amqp.core.MessageProperties
;
import
org.springframework.amqp.rabbit.core.RabbitTemplate
;
import
org.springframework.amqp.rabbit.core.RabbitTemplate
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.UUID
;
import
java.util.UUID
;
@Service
@Service
@
AllArgsConstructor
@
Slf4j
public
class
MQServiceBiZ
{
public
class
MQServiceBiZ
{
@Autowired
private
RabbitTemplate
rabbitTemplate
;
private
RabbitTemplate
rabbitTemplate
;
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ObjectRestResponse
sendMessage
(
String
exchange
,
String
routKey
,
String
json
)
{
public
ObjectRestResponse
sendMessage
(
String
exchange
,
String
routKey
,
String
json
)
{
log
.
info
(
"发送消息到消息队列:exchange = {}, routingKey = {}, json = {}"
,
exchange
,
routKey
,
json
);
Message
message
=
MessageBuilder
.
withBody
(
json
.
getBytes
())
Message
message
=
MessageBuilder
.
withBody
(
json
.
getBytes
())
.
setContentType
(
MessageProperties
.
CONTENT_TYPE_JSON
).
setContentEncoding
(
"utf-8"
)
.
setContentType
(
MessageProperties
.
CONTENT_TYPE_JSON
).
setContentEncoding
(
"utf-8"
)
.
setMessageId
(
UUID
.
randomUUID
()
+
""
).
build
();
.
setMessageId
(
UUID
.
randomUUID
()
+
""
).
build
();
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/biz/OrderPayBiz.java
View file @
64eaa163
...
@@ -17,6 +17,7 @@ import com.github.wxiaoqi.security.common.util.OrderUtil;
...
@@ -17,6 +17,7 @@ import com.github.wxiaoqi.security.common.util.OrderUtil;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.util.process.SystemConfig
;
import
com.github.wxiaoqi.security.common.util.process.SystemConfig
;
import
com.github.wxiaoqi.security.common.util.result.JsonResultUtil
;
import
com.github.wxiaoqi.security.common.util.result.JsonResultUtil
;
import
com.xxfc.platform.universal.constant.MQconstant
;
import
com.xxfc.platform.universal.entity.Dictionary
;
import
com.xxfc.platform.universal.entity.Dictionary
;
import
com.xxfc.platform.universal.entity.OrderPay
;
import
com.xxfc.platform.universal.entity.OrderPay
;
import
com.xxfc.platform.universal.mapper.OrderPayMapper
;
import
com.xxfc.platform.universal.mapper.OrderPayMapper
;
...
@@ -57,6 +58,9 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
...
@@ -57,6 +58,9 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
@Autowired
@Autowired
HttpServletRequest
request
;
HttpServletRequest
request
;
@Autowired
MQServiceBiZ
mqServiceBiZ
;
public
JSONObject
preparepay
(
OrderPayVo
orderPayVo
)
{
public
JSONObject
preparepay
(
OrderPayVo
orderPayVo
)
{
if
(
null
==
orderPayVo
)
{
if
(
null
==
orderPayVo
)
{
log
.
error
(
"-----参数为空-----------"
);
log
.
error
(
"-----参数为空-----------"
);
...
@@ -144,6 +148,21 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
...
@@ -144,6 +148,21 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
result
=
HTTPUtils
.
doGet
(
url
);
result
=
HTTPUtils
.
doGet
(
url
);
}
}
log
.
error
(
"---支付回调处理---orderNo======="
+
orderNo
+
"---result==="
+
result
);
log
.
error
(
"---支付回调处理---orderNo======="
+
orderNo
+
"---result==="
+
result
);
//支付成功,添加积分
if
(
pay
.
getStatus
()
==
1
)
{
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"userId"
,
pay
.
getUserId
());
jsonObject
.
put
(
"amount"
,
pay
.
getAmount
());
jsonObject
.
put
(
"channelId"
,
pay
.
getOrderNo
());
if
(
pay
.
getChannel
()
==
1
)
{
//租车
jsonObject
.
put
(
"integralRuleCode"
,
"RENTRV"
);
}
else
if
(
pay
.
getChannel
()
==
2
)
{
//旅游
jsonObject
.
put
(
"integralRuleCode"
,
"BUYROUT"
);
}
else
if
(
pay
.
getChannel
()
==
3
)
{
//会员
jsonObject
.
put
(
"integralRuleCode"
,
"BUYMEMBER"
);
}
mqServiceBiZ
.
sendMessage
(
MQconstant
.
INTEGRAL_EXCHANGE
,
MQconstant
.
INTEGRAL_ROUTING_KEY
,
jsonObject
.
toJSONString
());
}
}
}
}
}
}
}
...
...
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