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
6c3a78ce
Commit
6c3a78ce
authored
Jul 19, 2019
by
周健威
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/base-modify' into base-modify
parents
c68a000e
73275032
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
21 deletions
+62
-21
CofigBiz.java
...ver/src/main/java/com/xxfc/platform/app/biz/CofigBiz.java
+23
-1
CofigAdminController.java
...om/xxfc/platform/app/rest/admin/CofigAdminController.java
+18
-3
OrderPayBiz.java
...ain/java/com/xxfc/platform/universal/biz/OrderPayBiz.java
+21
-17
No files found.
xx-app/xx-app-server/src/main/java/com/xxfc/platform/app/biz/CofigBiz.java
View file @
6c3a78ce
package
com
.
xxfc
.
platform
.
app
.
biz
;
package
com
.
xxfc
.
platform
.
app
.
biz
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.github.wxiaoqi.security.common.msg.TableResultResponse
;
import
com.github.wxiaoqi.security.common.util.EntityUtils
;
import
com.github.wxiaoqi.security.common.util.EntityUtils
;
import
com.github.wxiaoqi.security.common.util.Query
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.app.entity.vo.WithDrawRuleVo
;
import
com.xxfc.platform.app.entity.vo.WithDrawRuleVo
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -12,6 +15,7 @@ import com.github.wxiaoqi.security.common.biz.BaseBiz;
...
@@ -12,6 +15,7 @@ import com.github.wxiaoqi.security.common.biz.BaseBiz;
import
tk.mybatis.mapper.entity.Example
;
import
tk.mybatis.mapper.entity.Example
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 系统配置表
* 系统配置表
...
@@ -35,7 +39,7 @@ public class CofigBiz extends BaseBiz<CofigMapper,Cofig> {
...
@@ -35,7 +39,7 @@ public class CofigBiz extends BaseBiz<CofigMapper,Cofig> {
*/
*/
public
int
updateConfig
(
Cofig
cofig
)
{
public
int
updateConfig
(
Cofig
cofig
)
{
EntityUtils
.
setUpdatedInfo
(
cofig
);
EntityUtils
.
setUpdatedInfo
(
cofig
);
return
mapper
.
update
Config
(
cofig
);
return
mapper
.
update
ByPrimaryKeySelective
(
cofig
);
}
}
public
WithDrawRuleVo
getWithDrawRule
(){
public
WithDrawRuleVo
getWithDrawRule
(){
...
@@ -52,4 +56,22 @@ public class CofigBiz extends BaseBiz<CofigMapper,Cofig> {
...
@@ -52,4 +56,22 @@ public class CofigBiz extends BaseBiz<CofigMapper,Cofig> {
withDrawRuleVo
.
setDescription
(
cofig
.
getValue
());
withDrawRuleVo
.
setDescription
(
cofig
.
getValue
());
return
withDrawRuleVo
;
return
withDrawRuleVo
;
}
}
public
void
updateConfigStatus
(
int
id
)
{
Cofig
cofig
=
new
Cofig
();
cofig
.
setId
(
id
);
cofig
.
setIsDel
(
1
);
mapper
.
updateByPrimaryKeySelective
(
cofig
);
}
public
TableResultResponse
<
Cofig
>
listWithPage
(
Map
<
String
,
Object
>
params
)
{
Query
query
=
new
Query
(
params
);
Example
example
=
new
Example
(
Cofig
.
class
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andEqualTo
(
"isDel"
,
0
);
PageDataVO
<
Cofig
>
cofigPage
=
PageDataVO
.
pageInfo
(
query
.
getPage
(),
query
.
getLimit
(),
()
->
mapper
.
selectByExample
(
example
));
return
new
TableResultResponse
<>(
cofigPage
.
getTotalCount
(),
cofigPage
.
getData
())
;
}
}
}
\ No newline at end of file
xx-app/xx-app-server/src/main/java/com/xxfc/platform/app/rest/admin/CofigAdminController.java
View file @
6c3a78ce
package
com
.
xxfc
.
platform
.
app
.
rest
.
admin
;
package
com
.
xxfc
.
platform
.
app
.
rest
.
admin
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.TableResultResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.xxfc.platform.app.biz.CofigBiz
;
import
com.xxfc.platform.app.biz.CofigBiz
;
import
com.xxfc.platform.app.entity.Cofig
;
import
com.xxfc.platform.app.entity.Cofig
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* @author libin
* @author libin
* @version 1.0
* @version 1.0
...
@@ -20,6 +23,11 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -20,6 +23,11 @@ import org.springframework.web.bind.annotation.RestController;
public
class
CofigAdminController
extends
BaseController
<
CofigBiz
,
Cofig
>
{
public
class
CofigAdminController
extends
BaseController
<
CofigBiz
,
Cofig
>
{
@Override
public
TableResultResponse
<
Cofig
>
list
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
return
getBaseBiz
().
listWithPage
(
params
);
}
/**
/**
* 修改通用配置
* 修改通用配置
* @param cofig
* @param cofig
...
@@ -33,4 +41,11 @@ public class CofigAdminController extends BaseController<CofigBiz,Cofig> {
...
@@ -33,4 +41,11 @@ public class CofigAdminController extends BaseController<CofigBiz,Cofig> {
}
}
return
ObjectRestResponse
.
createDefaultFail
();
return
ObjectRestResponse
.
createDefaultFail
();
}
}
@Override
public
ObjectRestResponse
<
Cofig
>
remove
(
@PathVariable
int
id
)
{
getBaseBiz
().
updateConfigStatus
(
id
);
return
ObjectRestResponse
.
succ
();
}
}
}
\ No newline at end of file
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/biz/OrderPayBiz.java
View file @
6c3a78ce
...
@@ -137,9 +137,29 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
...
@@ -137,9 +137,29 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
orderPay
.
setStatus
(
1
);
orderPay
.
setStatus
(
1
);
orderPay
.
setSerialNumber
(
serialNumber
);
orderPay
.
setSerialNumber
(
serialNumber
);
int
num
=
mapper
.
updateByExampleSelective
(
orderPay
,
example
);
int
num
=
mapper
.
updateByExampleSelective
(
orderPay
,
example
);
log
.
error
(
"---支付回调处理---num====="
+
num
+
"----orderNo======="
+
orderNo
);
log
.
error
(
"---支付回调处理---num====="
+
num
+
"----orderNo======="
+
orderNo
);
if
(
num
>
0
){
if
(
num
>
0
){
//支付成功,添加积分
OrderPay
pay
=
list
.
get
(
0
);
OrderPay
pay
=
list
.
get
(
0
);
OrderPay
newValue
=
mapper
.
selectOne
(
orderPay
);
log
.
info
(
"支付回调信息:newValue = {}"
,
newValue
);
if
(
newValue
.
getStatus
()
==
1
)
{
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"userId"
,
newValue
.
getUserId
());
jsonObject
.
put
(
"amount"
,
newValue
.
getAmount
());
jsonObject
.
put
(
"channelId"
,
newValue
.
getOrderNo
());
if
(
newValue
.
getChannel
()
==
1
)
{
//租车
jsonObject
.
put
(
"integralRuleCode"
,
"RENTRV"
);
}
else
if
(
newValue
.
getChannel
()
==
2
)
{
//旅游
jsonObject
.
put
(
"integralRuleCode"
,
"BUYROUT"
);
}
else
if
(
newValue
.
getChannel
()
==
3
)
{
//会员
jsonObject
.
put
(
"integralRuleCode"
,
"BUYMEMBER"
);
}
log
.
info
(
"支付订单号:orderNo = {}, orderType = {}"
,
newValue
.
getOrderNo
(),
newValue
.
getChannel
());
log
.
info
(
"支付成功获取积分:发送消息 exchange = {}, routingKey = {}, json = {}"
,
MQconstant
.
INTEGRAL_EXCHANGE
,
MQconstant
.
INTEGRAL_ROUTING_KEY
,
jsonObject
.
toJSONString
());
mqServiceBiZ
.
sendMessage
(
MQconstant
.
INTEGRAL_EXCHANGE
,
MQconstant
.
INTEGRAL_ROUTING_KEY
,
jsonObject
.
toJSONString
());
}
if
(
StringUtils
.
isNotBlank
(
pay
.
getNotifyUrl
())){
if
(
StringUtils
.
isNotBlank
(
pay
.
getNotifyUrl
())){
String
url
=
pay
.
getNotifyUrl
();
String
url
=
pay
.
getNotifyUrl
();
Integer
type
=
pay
.
getType
()==
null
?
1
:
pay
.
getType
();
Integer
type
=
pay
.
getType
()==
null
?
1
:
pay
.
getType
();
...
@@ -152,23 +172,7 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
...
@@ -152,23 +172,7 @@ 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"
);
}
log
.
info
(
"支付订单号:orderNo = {}, orderType = {}"
,
pay
.
getOrderNo
(),
pay
.
getChannel
());
log
.
info
(
"支付成功获取积分:发送消息 exchange = {}, routingKey = {}, json = {}"
,
MQconstant
.
INTEGRAL_EXCHANGE
,
MQconstant
.
INTEGRAL_ROUTING_KEY
,
jsonObject
.
toJSONString
());
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