记得上下班打卡 | 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
b7bb25f3
Commit
b7bb25f3
authored
Jun 17, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into test
parents
045d45a3
7caec1b0
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
97 additions
and
38 deletions
+97
-38
applyView.html
.../resources/templates/zhengzai/kylin/refund/applyView.html
+20
-13
KylinOrderRefundsServiceImpl.java
...gzai/kylin/service/impl/KylinOrderRefundsServiceImpl.java
+19
-5
KylinRefundsStatusServiceImpl.java
...zai/kylin/service/impl/KylinRefundsStatusServiceImpl.java
+4
-1
WebMvcConfig.java
...in/java/com/liquidnet/common/web/config/WebMvcConfig.java
+7
-11
KylinOrderRefundsMapper.java
...quidnet/service/kylin/mapper/KylinOrderRefundsMapper.java
+1
-1
AdamWebMvcConfig.java
...a/com/liquidnet/service/adam/config/AdamWebMvcConfig.java
+19
-0
pom.xml
liquidnet-bus-service/liquidnet-service-executor-all/pom.xml
+4
-6
KylinWebMvcConfig.java
...com/liquidnet/service/kylin/config/KylinWebMvcConfig.java
+19
-0
KylinRefundsStatusServiceImpl.java
...ice/kylin/service/impl/KylinRefundsStatusServiceImpl.java
+4
-1
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/kylin/refund/applyView.html
View file @
b7bb25f3
...
...
@@ -34,9 +34,9 @@
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label layui-required is-required"
>
备注:
</label>
<div
class=
"col-sm-10"
>
<textarea
name=
"reason"
maxlength=
"500"
class=
"form-control layui-required"
rows=
"3"
></textarea>
<label
class=
"col-sm-2 control-label layui-required is-required"
>
备注:
</label>
<div
class=
"col-sm-10"
>
<textarea
name=
"reason"
maxlength=
"500"
class=
"form-control layui-required"
rows=
"3"
></textarea>
</div>
</div>
</form>
...
...
@@ -148,8 +148,9 @@
field
:
''
,
title
:
'退款金额'
,
formatter
:
function
(
value
,
row
,
index
)
{
var
price
=
result
.
orderTicketVo
.
price
;
var
html
=
'<input class="form-control entitiesPrice" type="number" min="0.01" max="'
+
price
+
'" name="entitiesPrice" value="'
+
price
+
'">'
;
var
canRefundedPrice
=
row
.
canRefundedPrice
;
var
orderTicketEntitiesId
=
row
.
orderTicketEntitiesId
;
var
html
=
'<input id="'
+
orderTicketEntitiesId
+
'" class="form-control" type="number" min="0.01" max="'
+
canRefundedPrice
+
'" value="'
+
canRefundedPrice
+
'">'
;
return
html
;
}
},
...
...
@@ -171,19 +172,25 @@
var
reason
=
$
(
'#form-post-add'
).
find
(
"[name='reason']"
).
val
();
var
orderTicketsId
=
$
(
'#form-post-add'
).
find
(
"[name='orderTicketsId']"
).
val
();
var
rows
=
$
.
common
.
isEmpty
(
table
.
options
.
uniqueId
)
?
$
.
table
.
selectFirstColumns
()
:
$
.
table
.
selectColumns
(
table
.
options
.
uniqueId
);
if
(
!
orderTicketsId
||
!
reason
||
rows
.
length
<=
0
)
{
layer
.
msg
(
"请完善数据"
);
return
false
;
}
if
(
!
orderTicketsId
||
!
reason
||
rows
.
length
<=
0
)
{
layer
.
msg
(
"请完善数据"
);
return
false
;
}
if
(
$
.
validate
.
form
())
{
var
data
=
$
(
'#form-post-add'
).
serializeArray
();
data
.
push
({
"name"
:
"ticketEntityIds"
,
"value"
:
rows
});
var
entitiesPrice
=
$
.
table
.
selectColumns
(
"price"
);
data
.
push
({
"name"
:
"entitiesPrice"
,
"value"
:
entitiesPrice
});
console
.
log
(
data
)
data
.
push
({
"name"
:
"ticketEntityIds"
,
"value"
:
rows
});
var
entitiesPriceArray
=
[];
for
(
i
in
rows
)
{
var
idname
=
rows
[
i
];
var
entitiesPrice
=
$
(
"#"
+
idname
).
val
();
entitiesPriceArray
.
push
(
entitiesPrice
);
}
data
.
push
({
"name"
:
"entitiesPrice"
,
"value"
:
entitiesPriceArray
});
$
.
operate
.
save
(
prefix
+
"/apply"
,
data
);
}
}
</script>
</body>
</html>
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/kylin/service/impl/KylinOrderRefundsServiceImpl.java
View file @
b7bb25f3
...
...
@@ -103,10 +103,13 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
}
// TODO: 2021/6/16 是否能单独退快递飞 批量退款是否退快递费 现在做的是自动退剩余快递费
// 传的快递费不能大于实际的快递费=(支付的快递费-已退的快递费)
d
ouble
refundPriceExpressSum
=
kylinOrderRefundsMapper
.
RefundPriceExpressSum
(
// 已退快递费
D
ouble
refundPriceExpressSum
=
kylinOrderRefundsMapper
.
RefundPriceExpressSum
(
// 已退快递费
orderTicketsId
,
KylinTableStatusConst
.
ORDER_REFUND_STATUS_CANCEL
);
if
(
null
==
refundPriceExpressSum
)
{
refundPriceExpressSum
=
0.0
;
}
if
(
null
==
refundApplyParam
.
getOrderRefundBatchesId
()
||
refundApplyParam
.
getOrderRefundBatchesId
().
isEmpty
())
{
// 不是批量退款
if
(
RefundPriceExpress
>
(
priceExpress
-
refundPriceExpressSum
))
{
return
ResponseDto
.
failure
(
"快递费不能大于实际减去已退的快递费"
);
...
...
@@ -145,7 +148,7 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
double
onePrice
=
(
priceActual
-
priceExpress
)
/
allEntitiesCount
;
//单价
List
<
Double
>
realRefundPriceList
=
new
ArrayList
<>();
if
(
null
==
refundApplyParam
.
getOrderRefundBatchesId
()
||
refundApplyParam
.
getOrderRefundBatchesId
().
isEmpty
())
{
// 不是批量退款
for
(
int
i
=
0
;
i
<=
ticketEntityIds
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<=
ticketEntityIds
.
size
()
-
1
;
i
++)
{
Double
price
=
entitiesPrice
.
get
(
i
);
if
(
price
<
0
)
{
return
ResponseDto
.
failure
(
"退款金额不能为0"
);
...
...
@@ -155,6 +158,9 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
KylinTableStatusConst
.
ORDER_REFUND_STATUS_CANCEL
,
ticketEntityIds
.
get
(
i
)
);
if
(
null
==
refundedPrice
)
{
refundedPrice
=
0.0
;
}
if
(
price
>
(
onePrice
-
refundedPrice
))
{
return
ResponseDto
.
failure
(
"超过可退款金额"
);
}
...
...
@@ -162,12 +168,15 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
}
realRefundPriceList
=
entitiesPrice
;
}
else
{
// 批量 计算入场人订单可退金额
for
(
int
i
=
0
;
i
<=
ticketEntityIds
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<=
ticketEntityIds
.
size
()
-
1
;
i
++)
{
Double
refundedPrice
=
kylinOrderTicketEntitiesMapper
.
getRefundEntitiesPrice
(
//已退 包含退款中
orderTicketsId
,
KylinTableStatusConst
.
ORDER_REFUND_STATUS_CANCEL
,
ticketEntityIds
.
get
(
i
)
);
if
(
null
==
refundedPrice
)
{
refundedPrice
=
0.0
;
}
Double
price
=
onePrice
-
refundedPrice
;
// 计算可退金额
realRefundPriceList
.
add
(
price
);
}
...
...
@@ -378,12 +387,17 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
);
double
onePrice
=
(
priceActual
-
priceExpress
)
/
allEntitiesCount
;
//单价
for
(
KylinOrderTicketEntitiesDao
entities
:
entitiesList
)
{
d
ouble
refundedPrice
=
kylinOrderTicketEntitiesMapper
.
getRefundEntitiesPrice
(
//已退 包含退款中
D
ouble
refundedPrice
=
kylinOrderTicketEntitiesMapper
.
getRefundEntitiesPrice
(
//已退 包含退款中
kylinOrderTickets
.
getOrderTicketsId
(),
KylinTableStatusConst
.
ORDER_REFUND_STATUS_CANCEL
,
entities
.
getOrderTicketEntitiesId
()
);
double
canRefundedPrice
=
onePrice
-
refundedPrice
;
double
canRefundedPrice
;
if
(
null
!=
refundedPrice
)
{
canRefundedPrice
=
onePrice
-
refundedPrice
;
}
else
{
canRefundedPrice
=
onePrice
;
}
entities
.
setCanRefundedPrice
(
BigDecimal
.
valueOf
(
canRefundedPrice
));
}
}
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/kylin/service/impl/KylinRefundsStatusServiceImpl.java
View file @
b7bb25f3
...
...
@@ -168,7 +168,7 @@ public class KylinRefundsStatusServiceImpl {
// 退款入场人表
KylinOrderRefundEntities
kylinOrderRefundEntities
=
new
KylinOrderRefundEntities
();
for
(
int
i
=
0
;
i
<=
ticketEntityIds
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<=
ticketEntityIds
.
size
()
-
1
;
i
++)
{
String
orderRefundsEntitiesId
=
IDGenerator
.
nextSnowId
().
toString
();
kylinOrderRefundEntities
.
setOrderRefundsEntitiesId
(
orderRefundsEntitiesId
);
kylinOrderRefundEntities
.
setOrderRefundsId
(
orderRefundsId
);
...
...
@@ -379,6 +379,9 @@ public class KylinRefundsStatusServiceImpl {
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REFUNDED
,
entitiesId
);
if
(
null
==
refundedPrice
)
{
refundedPrice
=
0.0
;
}
KylinOrderRefundEntities
refundEntitiesInfo
=
kylinOrderRefundsEntitiesMapper
.
selectOne
(
new
QueryWrapper
<
KylinOrderRefundEntities
>()
.
eq
(
"order_refunds_id"
,
refundInfo
.
getOrderRefundsId
())
...
...
liquidnet-bus-common/liquidnet-common-web/src/main/java/com/liquidnet/common/web/config/WebMvcConfig.java
View file @
b7bb25f3
package
com
.
liquidnet
.
common
.
web
.
config
;
import
com.liquidnet.common.web.filter.GlobalAuthorityInterceptor
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.web.servlet.config.annotation.InterceptorRegistry
;
import
org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport
;
@Configuration
public
class
WebMvcConfig
extends
WebMvcConfigurationSupport
{
@Autowired
GlobalAuthorityInterceptor
globalAuthorityInterceptor
;
//
@Autowired
//
GlobalAuthorityInterceptor globalAuthorityInterceptor;
@Override
public
void
addResourceHandlers
(
ResourceHandlerRegistry
registry
)
{
...
...
@@ -29,12 +26,11 @@ public class WebMvcConfig extends WebMvcConfigurationSupport {
super
.
addResourceHandlers
(
registry
);
}
@Override
protected
void
addInterceptors
(
InterceptorRegistry
registry
)
{
registry
.
addInterceptor
(
globalAuthorityInterceptor
).
addPathPatterns
(
"/**"
);
// .excludePathPatterns("/*/v2/api-docs*", "/*/swagger-resources/**", "/*/webjars/**", "/*/doc.html");
super
.
addInterceptors
(
registry
);
}
// @Override
// protected void addInterceptors(InterceptorRegistry registry) {
// registry.addInterceptor(globalAuthorityInterceptor).addPathPatterns("/**");
// super.addInterceptors(registry);
// }
// @Bean
// public FilterRegistrationBean domainCrossFilterBean(){
...
...
liquidnet-bus-do/liquidnet-service-kylin-do/src/main/java/com/liquidnet/service/kylin/mapper/KylinOrderRefundsMapper.java
View file @
b7bb25f3
...
...
@@ -35,7 +35,7 @@ public interface KylinOrderRefundsMapper extends BaseMapper<KylinOrderRefunds> {
@Param
(
"ticketEntityIds"
)
List
<
String
>
ticketEntityIds
);
d
ouble
RefundPriceExpressSum
(
D
ouble
RefundPriceExpressSum
(
@Param
(
"orderTicketsId"
)
String
orderTicketsId
,
@Param
(
"orderRefundStatusCancel"
)
Integer
orderRefundStatusCancel
);
...
...
liquidnet-bus-service/liquidnet-service-adam/liquidnet-service-adam-impl/src/main/java/com/liquidnet/service/adam/config/AdamWebMvcConfig.java
0 → 100644
View file @
b7bb25f3
package
com
.
liquidnet
.
service
.
adam
.
config
;
import
com.liquidnet.common.web.config.WebMvcConfig
;
import
com.liquidnet.common.web.filter.GlobalAuthorityInterceptor
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.web.servlet.config.annotation.InterceptorRegistry
;
@Configuration
public
class
AdamWebMvcConfig
extends
WebMvcConfig
{
@Autowired
GlobalAuthorityInterceptor
globalAuthorityInterceptor
;
@Override
protected
void
addInterceptors
(
InterceptorRegistry
registry
)
{
registry
.
addInterceptor
(
globalAuthorityInterceptor
).
addPathPatterns
(
"/**"
);
super
.
addInterceptors
(
registry
);
}
}
liquidnet-bus-service/liquidnet-service-executor-all/pom.xml
View file @
b7bb25f3
...
...
@@ -15,17 +15,15 @@
</modules>
<dependencies>
<dependency>
<groupId>
com.liquidnet
</groupId>
<artifactId>
liquidnet-common-service-base
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
com.xuxueli
</groupId>
<artifactId>
xxl-job-core
</artifactId>
<version>
2.3.0
</version>
</dependency>
<dependency>
<groupId>
com.liquidnet
</groupId>
<artifactId>
liquidnet-common-web
</artifactId>
</dependency>
</dependencies>
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/config/KylinWebMvcConfig.java
0 → 100644
View file @
b7bb25f3
package
com
.
liquidnet
.
service
.
kylin
.
config
;
import
com.liquidnet.common.web.config.WebMvcConfig
;
import
com.liquidnet.common.web.filter.GlobalAuthorityInterceptor
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.web.servlet.config.annotation.InterceptorRegistry
;
@Configuration
public
class
KylinWebMvcConfig
extends
WebMvcConfig
{
@Autowired
GlobalAuthorityInterceptor
globalAuthorityInterceptor
;
@Override
protected
void
addInterceptors
(
InterceptorRegistry
registry
)
{
registry
.
addInterceptor
(
globalAuthorityInterceptor
).
addPathPatterns
(
"/**"
);
super
.
addInterceptors
(
registry
);
}
}
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/service/impl/KylinRefundsStatusServiceImpl.java
View file @
b7bb25f3
...
...
@@ -116,6 +116,9 @@ public class KylinRefundsStatusServiceImpl {
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REFUNDED
,
entitiesId
);
if
(
null
==
refundedPrice
)
{
refundedPrice
=
0.0
;
}
KylinOrderRefundEntities
refundEntitiesInfo
=
kylinOrderRefundsEntitiesMapper
.
selectOne
(
new
QueryWrapper
<
KylinOrderRefundEntities
>()
.
eq
(
"order_refunds_id"
,
refundInfo
.
getOrderRefundsId
())
...
...
@@ -293,7 +296,7 @@ public class KylinRefundsStatusServiceImpl {
// 退款入场人表
KylinOrderRefundEntities
kylinOrderRefundEntities
=
new
KylinOrderRefundEntities
();
for
(
int
i
=
0
;
i
<=
ticketEntityIds
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<=
ticketEntityIds
.
size
()
-
1
;
i
++)
{
String
orderRefundsEntitiesId
=
IDGenerator
.
nextSnowId
().
toString
();
kylinOrderRefundEntities
.
setOrderRefundsEntitiesId
(
orderRefundsEntitiesId
);
kylinOrderRefundEntities
.
setOrderRefundsId
(
orderRefundsId
);
...
...
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