Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
R
run-score
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
jackma
run-score
Commits
6d73ad04
提交
6d73ad04
authored
11月 14, 2021
作者:
jacksmith1988
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
//add code
上级
f3e415a8
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
21 行增加
和
32 行删除
+21
-32
MerchantOrder.java
...java/me/zohar/runscore/merchant/domain/MerchantOrder.java
+6
-3
MerchantOrderService.java
...zohar/runscore/merchant/service/MerchantOrderService.java
+3
-3
UserAccountService.java
...ohar/runscore/useraccount/service/UserAccountService.java
+2
-6
gathering-code.js
...ore-mobile/src/main/resources/static/js/gathering-code.js
+2
-2
gathering-code.html
...e-mobile/src/main/resources/templates/gathering-code.html
+8
-5
runscore.sql
实施输出/runscore.sql
+0
-0
view.sql
实施输出/view.sql
+0
-13
没有找到文件。
runscore-api/src/main/java/me/zohar/runscore/merchant/domain/MerchantOrder.java
浏览文件 @
6d73ad04
...
...
@@ -141,12 +141,15 @@ public class MerchantOrder {
private
MerchantOrderPayInfo
payInfo
;
@NotFound
(
action
=
NotFoundAction
.
IGNORE
)
@ManyToOne
(
fetch
=
FetchType
.
LAZY
)
@JoinColumn
(
name
=
"gathering_id"
,
updatable
=
false
,
insertable
=
false
,
foreignKey
=
@ForeignKey
(
value
=
ConstraintMode
.
NO_CONSTRAINT
))
private
GatheringCode
gatheringCode
;
// private String gatheringId;
@Column
(
name
=
"gathering_id"
,
length
=
32
)
private
String
gatheringId
;
private
String
remark
;
...
...
@@ -175,12 +178,12 @@ public class MerchantOrder {
setRemark
(
remark
);
}
public
void
updateReceived
(
String
receivedAccountId
,
String
gatheringCodeStorageId
,
String
gatheringId
)
{
public
void
updateReceived
(
String
receivedAccountId
,
String
gatheringCodeStorageId
,
GatheringCode
gatheringCode
)
{
this
.
setReceivedAccountId
(
receivedAccountId
);
this
.
setGatheringCodeStorageId
(
gatheringCodeStorageId
);
this
.
setOrderState
(
Constant
.
商户订单状态
_
已接单
);
this
.
setReceivedTime
(
new
Date
());
this
.
setGatheringId
(
gatheringCode
.
getId
());
}
public
void
customerCancelOrderRefund
()
{
...
...
runscore-api/src/main/java/me/zohar/runscore/merchant/service/MerchantOrderService.java
浏览文件 @
6d73ad04
...
...
@@ -489,9 +489,9 @@ public class MerchantOrderService {
//todo this is temporary code 这里要匹配有资源的用户接单
List
<
UserAccount
>
userAccounts
=
userAccountRepo
.
findAllByAccountTypeAndState
(
Constant
.
账号类型
_
会员
,
Constant
.
账号状态
_
启用
).
orElseThrow
(()
->
new
BizException
(
BizError
.
系统无可用商户
));
Collections
.
shuffle
(
userAccounts
);
this
.
receiveOrder
(
userAccounts
.
get
(
RandomUtil
.
randomInt
(
0
,
userAccounts
.
size
())).
getId
(),
merchantOrder
.
getId
());
this
.
receiveOrder
(
userAccounts
.
get
(
0
).
getId
(),
merchantOrder
.
getId
());
return
MerchantOrderVO
.
convertFor
(
merchantOrder
);
}
...
...
@@ -546,7 +546,7 @@ public class MerchantOrderService {
if
(
setting
!=
null
&&
setting
.
getOrderPayEffectiveDuration
()
!=
null
)
{
orderEffectiveDuration
=
setting
.
getOrderPayEffectiveDuration
();
}
platformOrder
.
updateReceived
(
userAccount
.
getId
(),
gatheringCode
.
getStorageId
(),
gatheringCode
.
getId
()
);
platformOrder
.
updateReceived
(
userAccount
.
getId
(),
gatheringCode
.
getStorageId
(),
gatheringCode
);
platformOrder
.
updateRemark
(
gatheringCode
.
getBankCode
()
+
"_"
+
gatheringCode
.
getBankUsername
()
+
"_"
+
gatheringCode
.
getBankAddress
());
platformOrder
.
updateUsefulTime
(
DateUtil
.
offset
(
platformOrder
.
getReceivedTime
(),
DateField
.
MINUTE
,
orderEffectiveDuration
));
...
...
runscore-api/src/main/java/me/zohar/runscore/useraccount/service/UserAccountService.java
浏览文件 @
6d73ad04
...
...
@@ -3,6 +3,7 @@ package me.zohar.runscore.useraccount.service;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Optional
;
import
javax.persistence.criteria.CriteriaBuilder
;
import
javax.persistence.criteria.CriteriaQuery
;
...
...
@@ -74,9 +75,6 @@ public class UserAccountService {
/**
* 更新接单状态
*
* @param userAccountId
* @param receiveOrderState
*/
@Transactional
public
void
updateReceiveOrderState
(
@NotBlank
String
userAccountId
,
@NotBlank
String
receiveOrderState
)
{
...
...
@@ -229,7 +227,7 @@ public class UserAccountService {
throw
new
BizException
(
BizError
.
下级账号的返点不能大于上级账号
);
}
newUserAccount
.
setInviterId
(
inviter
.
getId
());
newUserAccount
.
setAccountLevel
(
inviter
.
getAccountLevel
(
)
+
1
);
newUserAccount
.
setAccountLevel
(
Optional
.
ofNullable
(
inviter
.
getAccountLevel
()).
orElse
(
0
)
+
1
);
newUserAccount
.
setAccountLevelPath
(
inviter
.
getAccountLevelPath
()
+
"."
+
newUserAccount
.
getId
());
}
userAccountRepo
.
save
(
newUserAccount
);
...
...
@@ -237,8 +235,6 @@ public class UserAccountService {
/**
* 账号注册
*
* @param param
*/
@ParamValid
@Transactional
...
...
runscore-mobile/src/main/resources/static/js/gathering-code.js
浏览文件 @
6d73ad04
...
...
@@ -208,14 +208,14 @@ var gatheringCodeVM = new Vue({
// return;
// }
// }
if
(
editGatheringCode
.
payee
==
null
||
editGatheringCode
.
payee
==
''
)
{
/*
if (editGatheringCode.payee == null || editGatheringCode.payee == '') {
layer.alert('请选择收款人', {
title : '提示',
icon : 7,
time : 3000
});
return;
}
}
*/
if
(
$
(
'.gathering-code-pic'
).
fileinput
(
'getPreview'
).
content
.
length
!=
0
||
editGatheringCode
.
gatheringChannelCode
==
'bankcard'
)
{
that
.
addOrUpdateGatheringCodeInner
();
...
...
runscore-mobile/src/main/resources/templates/gathering-code.html
浏览文件 @
6d73ad04
...
...
@@ -140,14 +140,17 @@
</option>
</select>
</div>
<
!--<
div class="form-group">
<label> <span> 收款金额:</span>
<div class="custom-control custom-checkbox custom-control-inline" v-on:click="switchGatheringAmountMode">
<div
class=
"form-group"
>
<label>
<span>
单笔最大
收款金额:
</span>
<
!--<
div class="custom-control custom-checkbox custom-control-inline" v-on:click="switchGatheringAmountMode">
<input type="checkbox" id="fixedGatheringAmount" class="custom-control-input" v-model="editGatheringCode.fixedGatheringAmount">
<label for="fixedGatheringAmount" class="custom-control-label">固定收款金额</label>
</div>
</label> <input type="number" class="form-control" v-model="editGatheringCode.gatheringAmount" :disabled="!editGatheringCode.fixedGatheringAmount">
</div>-->
</label>
<!--<input type="number" class="form-control" v-model="editGatheringCode.gatheringAmount" :disabled="!editGatheringCode.fixedGatheringAmount">-->
<input
type=
"number"
class=
"form-control"
v-model=
"editGatheringCode.gatheringAmount"
>
</div>
<div
class=
"form-group"
>
<label>
收款人:
</label>
<input
type=
"text"
class=
"form-control"
v-model=
"editGatheringCode.payee"
>
...
...
实施输出/runscore.sql
浏览文件 @
6d73ad04
This source diff could not be displayed because it is too large. You can
view the blob
instead.
实施输出/view.sql
deleted
100644 → 0
浏览文件 @
f3e415a8
/*
MySQL Backup
Database: runscore
Backup Time: 2021-11-13 10:39:45
*/
SET
FOREIGN_KEY_CHECKS
=
0
;
DROP
VIEW
IF
EXISTS
`runscore`
.
`v_merchant_month_statistical`
;
DROP
VIEW
IF
EXISTS
`runscore`
.
`v_merchant_today_statistical`
;
DROP
VIEW
IF
EXISTS
`runscore`
.
`v_merchant_total_statistical`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_merchant_month_statistical`
AS
select
`po`
.
`merchant_id`
AS
`merchant_id`
,
round
(
sum
(
`po`
.
`gathering_amount`
),
4
)
AS
`gathering_amount`
,
count
(
1
)
AS
`order_num`
,
round
(
sum
((
case
when
(
`po`
.
`order_state`
=
'4'
)
then
`po`
.
`gathering_amount`
else
0
end
)),
4
)
AS
`trade_amount`
,
sum
((
case
when
(
`po`
.
`order_state`
=
'4'
)
then
1
else
0
end
))
AS
`paid_order_num`
from
(
`merchant_order`
`po`
left
join
`merchant`
`ua`
on
((
`po`
.
`merchant_id`
=
`ua`
.
`id`
)))
where
((
`po`
.
`received_account_id`
is
not
null
)
and
(
`po`
.
`submit_time`
>=
str_to_date
(
date_format
(
curdate
(),
'%Y-%m-01 00:00:00'
),
'%Y-%m-%d %H:%i:%s'
))
and
(
`po`
.
`submit_time`
<
(
str_to_date
(
date_format
(
curdate
(),
'%Y-%m-01 00:00:00'
),
'%Y-%m-%d %H:%i:%s'
)
+
interval
1
month
)))
group
by
`po`
.
`merchant_id`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_merchant_today_statistical`
AS
select
`po`
.
`merchant_id`
AS
`merchant_id`
,
round
(
sum
(
`po`
.
`gathering_amount`
),
4
)
AS
`gathering_amount`
,
count
(
1
)
AS
`order_num`
,
round
(
sum
((
case
when
(
`po`
.
`order_state`
=
'4'
)
then
`po`
.
`gathering_amount`
else
0
end
)),
4
)
AS
`trade_amount`
,
sum
((
case
when
(
`po`
.
`order_state`
=
'4'
)
then
1
else
0
end
))
AS
`paid_order_num`
from
(
`merchant_order`
`po`
left
join
`merchant`
`ua`
on
((
`po`
.
`merchant_id`
=
`ua`
.
`id`
)))
where
((
`po`
.
`received_account_id`
is
not
null
)
and
(
`po`
.
`received_time`
>=
str_to_date
(
date_format
(
now
(),
'%Y-%m-%d'
),
'%Y-%m-%d %H:%i:%s'
))
and
(
`po`
.
`received_time`
<
(
str_to_date
(
date_format
(
now
(),
'%Y-%m-%d'
),
'%Y-%m-%d %H:%i:%s'
)
+
interval
1
day
)))
group
by
`po`
.
`merchant_id`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_merchant_total_statistical`
AS
select
`po`
.
`merchant_id`
AS
`merchant_id`
,
round
(
sum
(
`po`
.
`gathering_amount`
),
4
)
AS
`gathering_amount`
,
count
(
1
)
AS
`order_num`
,
round
(
sum
((
case
when
(
`po`
.
`order_state`
=
'4'
)
then
`po`
.
`gathering_amount`
else
0
end
)),
4
)
AS
`trade_amount`
,
sum
((
case
when
(
`po`
.
`order_state`
=
'4'
)
then
1
else
0
end
))
AS
`paid_order_num`
from
(
`merchant_order`
`po`
left
join
`merchant`
`ua`
on
((
`po`
.
`merchant_id`
=
`ua`
.
`id`
)))
where
(
`po`
.
`received_account_id`
is
not
null
)
group
by
`po`
.
`merchant_id`
;
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论