Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
A
Afrishop refactored project
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Whispa
Afrishop refactored project
Commits
a449b9c3
提交
a449b9c3
authored
12月 14, 2020
作者:
吴德鹏
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update activity
上级
2cffbc94
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
30 行增加
和
28 行删除
+30
-28
ActivityController.java
...m/example/afrishop_v3/controllers/ActivityController.java
+1
-1
DpoPayController.java
...com/example/afrishop_v3/controllers/DpoPayController.java
+3
-4
FlutterWaveController.java
...xample/afrishop_v3/controllers/FlutterWaveController.java
+14
-14
PaypalContoller.java
.../com/example/afrishop_v3/controllers/PaypalContoller.java
+8
-7
ProblemController.java
...om/example/afrishop_v3/controllers/ProblemController.java
+1
-1
TbCfProblem.java
...main/java/com/example/afrishop_v3/models/TbCfProblem.java
+2
-0
TbCfProblemRepository.java
...example/afrishop_v3/repository/TbCfProblemRepository.java
+1
-1
没有找到文件。
src/main/java/com/example/afrishop_v3/controllers/ActivityController.java
浏览文件 @
a449b9c3
...
...
@@ -136,7 +136,7 @@ public class ActivityController {
return
t
;
}
@
Ge
tMapping
(
"/caculateCartDiscount"
)
@
Pos
tMapping
(
"/caculateCartDiscount"
)
public
Result
caculateCartDiscount
(
@RequestBody
String
[]
cartIds
)
{
// Activity activity = null;
// List<Activity> activityList = new ArrayList<>();
...
...
src/main/java/com/example/afrishop_v3/controllers/DpoPayController.java
浏览文件 @
a449b9c3
...
...
@@ -421,11 +421,10 @@ public class DpoPayController extends Controller {
sendNotification
(
user
.
getFcm
(),
"Bonus alert !!"
,
user
.
display
()
+
", You received bonus of $"
+
formatter
.
format
(
v
)
+
" in your account"
);
}
}
TbCfUserInfo
bonusInc
=
runBonusInc
(
user
,
amount
,
5
,
false
,
orderId
);
runBonusInc
(
sharer
.
orElseGet
(()
->
postOptional
.
isPresent
()
?
postOptional
.
get
().
getRealUser
()
:
bonusInc
),
amount
,
5
,
postOptional
.
isPresent
()
||
sharer
.
isPresent
(),
orderId
);
//runBonusInc(bonusInc, amount, 0);
}
TbCfUserInfo
bonusInc
=
runBonusInc
(
user
,
amount
,
5
,
false
,
orderId
);
runBonusInc
(
sharer
.
orElseGet
(()
->
postOptional
.
isPresent
()
?
postOptional
.
get
().
getRealUser
()
:
bonusInc
),
amount
,
5
,
postOptional
.
isPresent
()
||
sharer
.
isPresent
(),
orderId
);
//runBonusInc(bonusInc, amount, 0);
}
}
...
...
src/main/java/com/example/afrishop_v3/controllers/FlutterWaveController.java
浏览文件 @
a449b9c3
...
...
@@ -34,7 +34,7 @@ public class FlutterWaveController extends Controller {
private
final
TbCfOrderRepository
repository
;
private
final
TbCfFinanceRepository
financeRepository
;
private
final
UserRepository
userRepository
;
// private final DomainProperties domainProperties;
// private final DomainProperties domainProperties;
private
final
AuthenticationUser
user
;
private
final
NetworkRepository
networkRepository
;
...
...
@@ -69,7 +69,7 @@ public class FlutterWaveController extends Controller {
this
.
repository
=
repository
;
this
.
financeRepository
=
financeRepository
;
this
.
userRepository
=
userRepository
;
// this.domainProperties = domainProperties;
// this.domainProperties = domainProperties;
this
.
user
=
user
;
this
.
networkRepository
=
networkRepository
;
this
.
bonusRepository
=
bonusRepository
;
...
...
@@ -97,7 +97,7 @@ public class FlutterWaveController extends Controller {
if
(
OrderStatusEnum
.
PAID
.
getValue
().
equals
(
orderEntity
.
getPayStatus
()))
{
json
.
put
(
"message"
,
"Order paid!"
);
json
.
put
(
"code"
,
ResultCodeEnum
.
ORDER_PAY_ERROR
.
getCode
());
}
else
{
}
else
{
try
{
String
orderPrice
=
orderEntity
.
getRealityPay
().
toString
();
CardCharge
ch
=
new
CardCharge
();
...
...
@@ -106,7 +106,7 @@ public class FlutterWaveController extends Controller {
.
setCurrency
(
"USD"
)
.
setCountry
(
"NG"
)
.
setAmount
(
orderPrice
)
.
setRedirect_url
(
REDIRECT_URL
+
"/"
+
orderId
)
.
setRedirect_url
(
REDIRECT_URL
+
"/"
+
orderId
)
.
setExpiryyear
(
flutterWaveCard
.
getYear
())
.
setExpirymonth
(
flutterWaveCard
.
getMonth
())
.
setEmail
(
flutterWaveCard
.
getEmail
())
...
...
@@ -151,7 +151,7 @@ public class FlutterWaveController extends Controller {
if
(
OrderStatusEnum
.
PAID
.
getValue
().
equals
(
orderEntity
.
getPayStatus
()))
{
json
.
put
(
"message"
,
"Order paid!"
);
json
.
put
(
"code"
,
ResultCodeEnum
.
ORDER_PAY_ERROR
.
getCode
());
}
else
{
}
else
{
try
{
CardCharge
ch
=
new
CardCharge
();
ch
.
setCardno
(
flutterWaveCard
.
getCard
())
...
...
@@ -159,7 +159,7 @@ public class FlutterWaveController extends Controller {
.
setCurrency
(
"ZMW"
)
.
setCountry
(
"NG"
)
.
setAmount
(
orderEntity
.
getRealityPay
().
toString
())
.
setRedirect_url
(
REDIRECT_URL
+
"/"
+
orderId
)
.
setRedirect_url
(
REDIRECT_URL
+
"/"
+
orderId
)
.
setExpiryyear
(
flutterWaveCard
.
getYear
())
.
setExpirymonth
(
flutterWaveCard
.
getMonth
())
.
setPhonenumber
(
flutterWaveCard
.
getPhone
())
...
...
@@ -220,7 +220,7 @@ public class FlutterWaveController extends Controller {
String
authurl
=
results
.
getString
(
"authurl"
);
if
(
"success"
.
equalsIgnoreCase
(
statusFlag
)
&&
"successful"
.
equalsIgnoreCase
(
status
))
{
TbCfUserInfo
user
=
this
.
user
.
user
();
if
(
user
.
hasFcm
()
)
{
if
(
user
.
hasFcm
())
{
sendNotification
(
user
.
getFcm
(),
"Order alert !!"
,
"Order of $"
+
tbCfOrderVo
.
getRealityPay
()
+
" has been successfully paid !!"
);
}
logger
.
info
(
"订单号"
+
orderId
+
"[flutterwave支付]校验成功时间:"
+
new
Date
());
...
...
@@ -245,8 +245,8 @@ public class FlutterWaveController extends Controller {
bonus
.
setOrderId
(
orderId
);
bonus
.
setAmount
(
tbCfOrder
.
getItemsPrice
());
System
.
out
.
println
(
"佣金-----》》》订单号:"
+
orderId
+
"=user="
+
tbCfOrder
.
getUserId
()+
"=price="
+
tbCfOrder
.
getItemsPrice
());
saveNetworkMarketing
(
bonus
,
tbCfOrder
.
getUserId
());
System
.
out
.
println
(
"佣金-----》》》订单号:"
+
orderId
+
"=user="
+
tbCfOrder
.
getUserId
()
+
"=price="
+
tbCfOrder
.
getItemsPrice
());
saveNetworkMarketing
(
bonus
,
tbCfOrder
.
getUserId
());
}
// TbCfFinanceVo tbCfFinanceVo = new TbCfFinanceVo();
// BeanUtils.copyProperties(finance, tbCfFinanceVo);
...
...
@@ -417,11 +417,11 @@ public class FlutterWaveController extends Controller {
sendNotification
(
user
.
getFcm
(),
"Bonus alert !!"
,
user
.
display
()
+
", You received bonus of $"
+
formatter
.
format
(
v
)
+
" in your account"
);
}
}
}
TbCfUserInfo
bonusInc
=
runBonusInc
(
user
,
amount
,
5
,
false
,
orderId
);
runBonusInc
(
sharer
.
orElseGet
(()
->
postOptional
.
isPresent
()
?
postOptional
.
get
().
getRealUser
()
:
bonusInc
),
amount
,
5
,
postOptional
.
isPresent
()
||
sharer
.
isPresent
(),
orderId
);
//runBonusInc(bonusInc, amount, 0);
TbCfUserInfo
bonusInc
=
runBonusInc
(
user
,
amount
,
5
,
false
,
orderId
);
runBonusInc
(
sharer
.
orElseGet
(()
->
postOptional
.
isPresent
()
?
postOptional
.
get
().
getRealUser
()
:
bonusInc
),
amount
,
5
,
postOptional
.
isPresent
()
||
sharer
.
isPresent
(),
orderId
);
//runBonusInc(bonusInc, amount, 0);
}
}
}
...
...
@@ -441,7 +441,7 @@ public class FlutterWaveController extends Controller {
bonus
.
setAmount
(
v
);
bonus
.
setPercentage
(
percent
);
bonus
.
setOrderId
(
orderId
);
if
(
userInfo
!=
null
&&
userInfo
.
invited
()&&
!
"000000"
.
equals
(
userInfo
.
getCode
()))
{
if
(
userInfo
!=
null
&&
userInfo
.
invited
()
&&
!
"000000"
.
equals
(
userInfo
.
getCode
()))
{
bonusRepository
.
save
(
bonus
);
// bonus = repository.save(bonus);
if
(
userInfo
.
hasFcm
())
{
...
...
src/main/java/com/example/afrishop_v3/controllers/PaypalContoller.java
浏览文件 @
a449b9c3
...
...
@@ -225,8 +225,8 @@ public class PaypalContoller extends Controller {
bonus
.
setOrderId
(
orderId
);
bonus
.
setAmount
(
order1
.
getItemsPrice
());
System
.
out
.
println
(
"佣金-----》》》订单号:"
+
orderId
+
"=user="
+
order1
.
getUserId
()+
"=price="
+
order1
.
getItemsPrice
());
saveNetworkMarketing
(
bonus
,
order1
.
getUserId
());
System
.
out
.
println
(
"佣金-----》》》订单号:"
+
orderId
+
"=user="
+
order1
.
getUserId
()
+
"=price="
+
order1
.
getItemsPrice
());
saveNetworkMarketing
(
bonus
,
order1
.
getUserId
());
}
}
...
...
@@ -345,17 +345,18 @@ public class PaypalContoller extends Controller {
sendNotification
(
user
.
getFcm
(),
"Bonus alert !!"
,
user
.
display
()
+
", You received bonus of $"
+
formatter
.
format
(
v
)
+
" in your account"
);
}
}
}
TbCfUserInfo
bonusInc
=
runBonusInc
(
user
,
amount
,
5
,
false
,
orderId
);
runBonusInc
(
sharer
.
orElseGet
(()
->
postOptional
.
isPresent
()
?
postOptional
.
get
().
getRealUser
()
:
bonusInc
),
amount
,
5
,
postOptional
.
isPresent
()
||
sharer
.
isPresent
(),
orderId
);
//runBonusInc(bonusInc, amount, 0);
TbCfUserInfo
bonusInc
=
runBonusInc
(
user
,
amount
,
5
,
false
,
orderId
);
runBonusInc
(
sharer
.
orElseGet
(()
->
postOptional
.
isPresent
()
?
postOptional
.
get
().
getRealUser
()
:
bonusInc
),
amount
,
5
,
postOptional
.
isPresent
()
||
sharer
.
isPresent
(),
orderId
);
//runBonusInc(bonusInc, amount, 0);
}
}
}
}
private
TbCfUserInfo
runBonusInc
(
TbCfUserInfo
user
,
BigDecimal
amount
,
int
percent
,
boolean
direct
,
String
orderId
)
{
if
(
user
==
null
)
return
null
;
Optional
<
Network
>
userCode
=
networkRepository
.
findByNetworkInfoCode
(
user
.
getCode
());
...
...
@@ -368,7 +369,7 @@ public class PaypalContoller extends Controller {
bonus
.
setAmount
(
v
);
bonus
.
setPercentage
(
percent
);
bonus
.
setOrderId
(
orderId
);
if
(
userInfo
!=
null
&&
userInfo
.
invited
()&&
!
"000000"
.
equals
(
userInfo
.
getCode
()))
{
if
(
userInfo
!=
null
&&
userInfo
.
invited
()
&&
!
"000000"
.
equals
(
userInfo
.
getCode
()))
{
bonusRepository
.
save
(
bonus
);
// bonus = repository.save(bonus);
if
(
userInfo
.
hasFcm
())
{
...
...
src/main/java/com/example/afrishop_v3/controllers/ProblemController.java
浏览文件 @
a449b9c3
...
...
@@ -30,7 +30,7 @@ public class ProblemController {
@GetMapping
(
"/{type}"
)
public
Result
getShippingClause
(
@PathVariable
Integer
type
)
throws
Exception
{
TbCfProblem
clause
=
repository
.
findFirstByType
(
type
);
TbCfProblem
clause
=
repository
.
findFirstByType
OrderByCreateTimeDesc
(
type
);
String
shippingClause
=
URLDecoder
.
decode
(
clause
.
getAnswer
(),
"utf-8"
);
TbCfProblem
problem
=
new
TbCfProblem
();
problem
.
setQuestion
(
clause
.
getQuestion
());
...
...
src/main/java/com/example/afrishop_v3/models/TbCfProblem.java
浏览文件 @
a449b9c3
...
...
@@ -2,6 +2,7 @@ package com.example.afrishop_v3.models;
import
lombok.Getter
;
import
lombok.Setter
;
import
org.hibernate.annotations.Where
;
import
javax.persistence.Entity
;
import
javax.persistence.Id
;
...
...
@@ -10,6 +11,7 @@ import java.util.Date;
@Entity
@Getter
@Setter
@Where
(
clause
=
"enable_flag=1"
)
public
class
TbCfProblem
{
/**
* 问题id
...
...
src/main/java/com/example/afrishop_v3/repository/TbCfProblemRepository.java
浏览文件 @
a449b9c3
...
...
@@ -5,5 +5,5 @@ import org.springframework.data.repository.PagingAndSortingRepository;
public
interface
TbCfProblemRepository
extends
PagingAndSortingRepository
<
TbCfProblem
,
String
>
{
TbCfProblem
findFirstByType
(
Integer
type
);
TbCfProblem
findFirstByType
OrderByCreateTimeDesc
(
Integer
type
);
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论