记得上下班打卡 | 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
015b6795
Commit
015b6795
authored
Sep 22, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_member_voucher_social' into dev_member_voucher_social
parents
e7fad1a3
52d9ee3d
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
111 additions
and
25 deletions
+111
-25
CandyCouponCodeAdminController.java
...roller/zhengzai/candy/CandyCouponCodeAdminController.java
+30
-7
detail.html
...urces/templates/zhengzai/adam/order/orderList/detail.html
+20
-3
code.html
.../resources/templates/zhengzai/candy/coupon/code/code.html
+8
-4
add101.html
...resources/templates/zhengzai/candy/coupon/mgt/add101.html
+1
-11
TestAdam.java
...m/liquidnet-service-adam-impl/src/test/java/TestAdam.java
+52
-0
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/candy/CandyCouponCodeAdminController.java
View file @
015b6795
...
@@ -12,16 +12,19 @@ import com.liquidnet.client.admin.common.utils.poi.ExcelUtil;
...
@@ -12,16 +12,19 @@ import com.liquidnet.client.admin.common.utils.poi.ExcelUtil;
import
com.liquidnet.client.admin.zhengzai.candy.dto.CandyCouponCodeExcelDto
;
import
com.liquidnet.client.admin.zhengzai.candy.dto.CandyCouponCodeExcelDto
;
import
com.liquidnet.client.admin.zhengzai.candy.service.ICandyCouponCodeAdminService
;
import
com.liquidnet.client.admin.zhengzai.candy.service.ICandyCouponCodeAdminService
;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.commons.lang.util.CollectionUtil
;
import
com.liquidnet.commons.lang.util.JsonUtils
;
import
com.liquidnet.commons.lang.util.JsonUtils
;
import
com.liquidnet.service.candy.constant.CandyRedisConst
;
import
com.liquidnet.service.candy.constant.CandyRedisConst
;
import
com.liquidnet.service.candy.dto.CandyCouponCodeDto
;
import
com.liquidnet.service.candy.dto.CandyCouponCodeDto
;
import
com.liquidnet.service.candy.dto.admin.CandyCouponCodeListParam
;
import
com.liquidnet.service.candy.dto.admin.CandyCouponCodeListParam
;
import
com.liquidnet.service.candy.dto.admin.CandyCouponCodeOptParam
;
import
com.liquidnet.service.candy.dto.admin.CandyCouponCodeOptParam
;
import
com.liquidnet.service.candy.entity.CandyCouponCode
;
import
com.liquidnet.service.candy.entity.CandyCouponCode
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.ModelMap
;
import
org.springframework.ui.ModelMap
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
...
@@ -89,19 +92,29 @@ public class CandyCouponCodeAdminController extends BaseController {
...
@@ -89,19 +92,29 @@ public class CandyCouponCodeAdminController extends BaseController {
@PostMapping
(
"invalid"
)
@PostMapping
(
"invalid"
)
@ResponseBody
@ResponseBody
public
AjaxResult
invalid
(
CandyCouponCodeOptParam
optParam
)
{
public
AjaxResult
invalid
(
CandyCouponCodeOptParam
optParam
)
{
logger
.
debug
(
"optParam:{}"
,
JsonUtils
.
toJson
(
optParam
));
logger
.
info
(
"optParam:{}"
,
JsonUtils
.
toJson
(
optParam
));
if
(
null
==
optParam
)
{
return
AjaxResult
.
warn
(
"无效传参"
);
}
String
couponId
=
optParam
.
getCouponId
();
List
<
String
>
ccodes
=
optParam
.
getCcodes
();
if
(
StringUtils
.
isBlank
(
couponId
)
||
CollectionUtils
.
isEmpty
(
ccodes
))
{
return
AjaxResult
.
warn
(
"参数无效"
);
}
List
<
String
>
ccodeUpdateList
=
CollectionUtil
.
arrayListString
();
optParam
.
getCcodes
().
forEach
(
r
->
{
optParam
.
getCcodes
().
forEach
(
r
->
{
String
key
=
CandyRedisConst
.
BASIC_COUPON_CODE
.
concat
(
r
);
String
key
=
CandyRedisConst
.
BASIC_COUPON_CODE
.
concat
(
r
);
CandyCouponCodeDto
dto
=
(
CandyCouponCodeDto
)
redisUtil
.
get
(
key
);
CandyCouponCodeDto
dto
=
(
CandyCouponCodeDto
)
redisUtil
.
get
(
key
);
if
(
null
!=
dto
)
{
if
(
null
!=
dto
&&
dto
.
getState
()
==
0
)
{
dto
.
setState
(
4
);
dto
.
setState
(
4
);
redisUtil
.
set
(
key
,
dto
);
redisUtil
.
set
(
key
,
dto
);
ccodeUpdateList
.
add
(
dto
.
getCcode
());
}
}
});
});
LambdaUpdateWrapper
<
CandyCouponCode
>
couponCodeUpdateWrapper
=
Wrappers
.
lambdaUpdate
(
CandyCouponCode
.
class
);
LambdaUpdateWrapper
<
CandyCouponCode
>
couponCodeUpdateWrapper
=
Wrappers
.
lambdaUpdate
(
CandyCouponCode
.
class
);
couponCodeUpdateWrapper
.
in
(
CandyCouponCode:
:
getCcode
,
optParam
.
getCcodes
()).
eq
(
CandyCouponCode:
:
getCouponId
,
optParam
.
getCouponId
()
);
couponCodeUpdateWrapper
.
in
(
CandyCouponCode:
:
getCcode
,
ccodeUpdateList
).
eq
(
CandyCouponCode:
:
getCouponId
,
couponId
);
CandyCouponCode
updateCouponCode
=
new
CandyCouponCode
();
CandyCouponCode
updateCouponCode
=
new
CandyCouponCode
();
updateCouponCode
.
setState
(
4
);
updateCouponCode
.
setState
(
4
);
...
@@ -114,19 +127,29 @@ public class CandyCouponCodeAdminController extends BaseController {
...
@@ -114,19 +127,29 @@ public class CandyCouponCodeAdminController extends BaseController {
@PostMapping
(
"recover"
)
@PostMapping
(
"recover"
)
@ResponseBody
@ResponseBody
public
AjaxResult
recover
(
CandyCouponCodeOptParam
optParam
)
{
public
AjaxResult
recover
(
CandyCouponCodeOptParam
optParam
)
{
logger
.
debug
(
"optParam:{}"
,
JsonUtils
.
toJson
(
optParam
));
logger
.
info
(
"optParam:{}"
,
JsonUtils
.
toJson
(
optParam
));
if
(
null
==
optParam
)
{
return
AjaxResult
.
warn
(
"无效传参"
);
}
String
couponId
=
optParam
.
getCouponId
();
List
<
String
>
ccodes
=
optParam
.
getCcodes
();
if
(
StringUtils
.
isBlank
(
couponId
)
||
CollectionUtils
.
isEmpty
(
ccodes
))
{
return
AjaxResult
.
warn
(
"参数无效"
);
}
optParam
.
getCcodes
().
forEach
(
r
->
{
List
<
String
>
ccodeUpdateList
=
CollectionUtil
.
arrayListString
();
ccodes
.
forEach
(
r
->
{
String
key
=
CandyRedisConst
.
BASIC_COUPON_CODE
.
concat
(
r
);
String
key
=
CandyRedisConst
.
BASIC_COUPON_CODE
.
concat
(
r
);
CandyCouponCodeDto
dto
=
(
CandyCouponCodeDto
)
redisUtil
.
get
(
key
);
CandyCouponCodeDto
dto
=
(
CandyCouponCodeDto
)
redisUtil
.
get
(
key
);
if
(
null
!=
dto
)
{
if
(
null
!=
dto
&&
dto
.
getState
()
==
1
)
{
dto
.
setState
(
5
);
dto
.
setState
(
5
);
redisUtil
.
set
(
key
,
dto
);
redisUtil
.
set
(
key
,
dto
);
ccodeUpdateList
.
add
(
dto
.
getCcode
());
}
}
});
});
LambdaUpdateWrapper
<
CandyCouponCode
>
couponCodeUpdateWrapper
=
Wrappers
.
lambdaUpdate
(
CandyCouponCode
.
class
);
LambdaUpdateWrapper
<
CandyCouponCode
>
couponCodeUpdateWrapper
=
Wrappers
.
lambdaUpdate
(
CandyCouponCode
.
class
);
couponCodeUpdateWrapper
.
in
(
CandyCouponCode:
:
getCcode
,
optParam
.
getCcodes
()).
eq
(
CandyCouponCode:
:
getCouponId
,
optParam
.
getCouponId
()
);
couponCodeUpdateWrapper
.
in
(
CandyCouponCode:
:
getCcode
,
ccodeUpdateList
).
eq
(
CandyCouponCode:
:
getCouponId
,
couponId
);
CandyCouponCode
updateCouponCode
=
new
CandyCouponCode
();
CandyCouponCode
updateCouponCode
=
new
CandyCouponCode
();
updateCouponCode
.
setState
(
5
);
updateCouponCode
.
setState
(
5
);
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/adam/order/orderList/detail.html
View file @
015b6795
...
@@ -137,12 +137,12 @@
...
@@ -137,12 +137,12 @@
<form
role=
"form"
id=
"form-member-order-refund"
>
<form
role=
"form"
id=
"form-member-order-refund"
>
<input
name=
"orderNo"
id=
"id"
type=
"hidden"
th:value=
"${orderDetailsVo.adamMemberOrderVo.orderNo}"
readonly
>
<input
name=
"orderNo"
id=
"id"
type=
"hidden"
th:value=
"${orderDetailsVo.adamMemberOrderVo.orderNo}"
readonly
>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
class=
"pull-left"
>
<i
class=
"fa fa-cny"
></i>
支付金额:
</label>
<label
class=
"pull-left"
>
支付金额:
<i
class=
"fa fa-cny"
></i>
</label>
<!-- <span>[[${orderDetailsVo.adamMemberOrderVo.pricePaid}]]元</span>-->
<!-- <span>[[${orderDetailsVo.adamMemberOrderVo.pricePaid}]]元</span>-->
<input
type=
"number"
name=
"pricePaid"
th:value=
"${orderDetailsVo.adamMemberOrderVo.pricePaid}"
class=
"form-control"
style=
"width: 30%;height: 20px;"
readonly
>
<input
type=
"number"
name=
"pricePaid"
th:value=
"${orderDetailsVo.adamMemberOrderVo.pricePaid}"
class=
"form-control"
style=
"width: 30%;height: 20px;"
readonly
>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
class=
"pull-left"
>
<i
class=
"fa fa-cny"
></i>
退款金额:
</label>
<label
class=
"pull-left"
>
退款金额:
<i
class=
"fa fa-cny"
></i>
</label>
<input
type=
"number"
name=
"refundAmt"
th:value=
"${orderDetailsVo.adamMemberOrderVo.pricePaid}"
class=
"form-control"
style=
"width: 30%;height: 20px;"
>
<input
type=
"number"
name=
"refundAmt"
th:value=
"${orderDetailsVo.adamMemberOrderVo.pricePaid}"
class=
"form-control"
style=
"width: 30%;height: 20px;"
>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
...
@@ -226,7 +226,24 @@
...
@@ -226,7 +226,24 @@
});
});
function
memberOrderRefund
()
{
function
memberOrderRefund
()
{
if
(
$
.
validate
.
form
(
"form-member-order-refund"
))
{
if
(
$
.
validate
.
form
(
"form-member-order-refund"
))
{
$
.
operate
.
saveModal
(
ctx
+
"adam/order/orderList/refund"
,
$
(
'#form-member-order-refund'
).
serialize
());
$
.
operate
.
saveModal
(
ctx
+
"adam/order/orderList/refund"
,
$
(
'#form-member-order-refund'
).
serialize
(),
memberOrderRefundCallback
);
}
}
function
memberOrderRefundCallback
(
result
)
{
console
.
log
(
1
)
if
(
typeof
callback
==
"function"
)
{
callback
(
result
);
}
}
if
(
result
.
code
==
web_status
.
SUCCESS
)
{
$
.
modal
.
alertSuccess
(
result
.
msg
)
}
else
if
(
result
.
code
==
web_status
.
WARNING
)
{
console
.
log
(
2
)
// $.modal.alertWarning(result.msg)
$
.
modal
.
alertSuccess
(
result
.
msg
)
}
else
{
$
.
modal
.
alertError
(
result
.
msg
);
}
}
}
}
</script>
</script>
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/candy/coupon/code/code.html
View file @
015b6795
...
@@ -31,10 +31,10 @@
...
@@ -31,10 +31,10 @@
<a
class=
"btn btn-warning multiple disabled"
onclick=
"$.table.exportExcel()"
shiro:hasPermission=
"candy:coupon:code:export"
>
<a
class=
"btn btn-warning multiple disabled"
onclick=
"$.table.exportExcel()"
shiro:hasPermission=
"candy:coupon:code:export"
>
<i
class=
"fa fa-download"
></i>
导出
<i
class=
"fa fa-download"
></i>
导出
</a>
</a>
<a
class=
"btn btn-primary multiple disabled selectChangeShow"
style=
"display: none"
onclick=
"invalidHandler()"
shiro:hasPermission=
"candy:coupon:code:invalid"
>
<a
class=
"btn btn-primary multiple disabled selectChangeShow
Invalid
"
style=
"display: none"
onclick=
"invalidHandler()"
shiro:hasPermission=
"candy:coupon:code:invalid"
>
<i
class=
"fa fa-edit"
></i>
批量失效
<i
class=
"fa fa-edit"
></i>
批量失效
</a>
</a>
<a
class=
"btn btn-danger multiple disabled selectChangeShow"
style=
"display: none"
onclick=
"recoverHandler()"
shiro:hasPermission=
"candy:coupon:code:recover"
>
<a
class=
"btn btn-danger multiple disabled selectChangeShow
Recover
"
style=
"display: none"
onclick=
"recoverHandler()"
shiro:hasPermission=
"candy:coupon:code:recover"
>
<i
class=
"fa fa-remove"
></i>
批量退回
<i
class=
"fa fa-remove"
></i>
批量退回
</a>
</a>
</div>
</div>
...
@@ -91,6 +91,7 @@
...
@@ -91,6 +91,7 @@
var
actions
=
[];
var
actions
=
[];
if
(
row
.
state
===
0
)
{
if
(
row
.
state
===
0
)
{
actions
.
push
(
'<a class="btn btn-primary btn-xs '
+
invalidFlag
+
'" href="javascript:void(0)" onclick="invalidHandler(
\'
'
+
row
.
ccode
+
'
\'
)"><i class="fa fa-edit"></i>失效</a> '
);
actions
.
push
(
'<a class="btn btn-primary btn-xs '
+
invalidFlag
+
'" href="javascript:void(0)" onclick="invalidHandler(
\'
'
+
row
.
ccode
+
'
\'
)"><i class="fa fa-edit"></i>失效</a> '
);
}
else
if
(
row
.
state
===
1
)
{
actions
.
push
(
'<a class="btn btn-danger btn-xs '
+
recoverFlag
+
'" href="javascript:void(0)" onclick="recoverHandler(
\'
'
+
row
.
ccode
+
'
\'
)"><i class="fa fa-remove"></i>退回</a>'
);
actions
.
push
(
'<a class="btn btn-danger btn-xs '
+
recoverFlag
+
'" href="javascript:void(0)" onclick="recoverHandler(
\'
'
+
row
.
ccode
+
'
\'
)"><i class="fa fa-remove"></i>退回</a>'
);
}
}
return
actions
.
join
(
''
);
return
actions
.
join
(
''
);
...
@@ -132,9 +133,12 @@
...
@@ -132,9 +133,12 @@
let
val
=
$
(
".selectChange"
).
val
();
let
val
=
$
(
".selectChange"
).
val
();
console
.
log
(
typeof
val
);
console
.
log
(
typeof
val
);
if
(
val
===
'0'
)
{
if
(
val
===
'0'
)
{
$
(
".selectChangeShow"
).
show
();
$
(
".selectChangeShowInvalid"
).
show
();
}
else
if
(
val
===
'1'
)
{
// $(".selectChangeShowRecover").show();
}
else
{
}
else
{
$
(
".selectChangeShow"
).
hide
();
$
(
".selectChangeShowInvalid"
).
hide
();
$
(
".selectChangeShowRecover"
).
hide
();
}
}
}
}
</script>
</script>
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/candy/coupon/mgt/add101.html
View file @
015b6795
...
@@ -417,16 +417,6 @@
...
@@ -417,16 +417,6 @@
useScope
=
90
;
useScope
=
90
;
busiId
=
showId
;
busiId
=
showId
;
}
}
if
(
selectTwoId
)
{
useScope
=
91
;
busiId
=
selectTwoId
;
// busiName = selectTwoName;
}
if
(
selectThreeId
)
{
useScope
=
92
;
busiId
=
selectThreeId
;
// busiName = selectThreeName;
}
let
data
=
{
let
data
=
{
"bindType"
:
Number
(
typeTwo
),
// 兑换券/发放
"bindType"
:
Number
(
typeTwo
),
// 兑换券/发放
...
@@ -434,7 +424,7 @@
...
@@ -434,7 +424,7 @@
"couType"
:
101
,
// 券类型
"couType"
:
101
,
// 券类型
"couponRuleList"
:
[
// 适用范围[100-全场|90-演出|91-场次|92-票|80-商品|81-款式]
"couponRuleList"
:
[
// 适用范围[100-全场|90-演出|91-场次|92-票|80-商品|81-款式]
{
{
"useScope"
:
90
,
"useScope"
:
useScope
,
"busiName"
:
busiName
||
'全部演出'
,
"busiName"
:
busiName
||
'全部演出'
,
"busiId"
:
busiId
"busiId"
:
busiId
}
}
...
...
liquidnet-bus-service/liquidnet-service-adam/liquidnet-service-adam-impl/src/test/java/TestAdam.java
View file @
015b6795
import
org.springframework.util.DigestUtils
;
import
java.nio.charset.StandardCharsets
;
import
java.util.Scanner
;
public
class
TestAdam
{
public
class
TestAdam
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
Scanner
scanner
=
new
Scanner
(
System
.
in
);
int
dbs
=
scanner
.
nextInt
();
String
[]
keys
=
{
"adam:incr:member_no"
,
"adam:ad:info"
,
"adam:blacklist:member:uid"
,
"adam:identity:mobile:13724286255"
,
"adam:info:user:270535560903720963807517"
,
"adam:info:morder:2104440"
,
"adam:info:morder:2104440"
,
"adam:info:umember:2104440"
,
"adam:info:real_name:2104440"
,
"adam:info:third_party:2104440"
,
"adam:info:enters:2104440"
,
"adam:info:addresses:2104440"
,
"adam:identity:mobile:18505123456"
,
"adam:identity:sso:245482441472573441815566"
,
"adam:info:user:310508344264376327445470"
,
"adam:morder:2283655"
,
"adam:info:umember:1404935"
,
"adam:info:morder:1404935"
,
"adam:info:member:simple"
,
"adam:info:member:category:1"
,
"adam:info:member:rights:1"
,
"adam:info:member:rights:v:1"
,
"adam:info:tags:music"
,
"adam:info:tags:sex"
,
"adam:info:morder:2292617"
,
"adam:info:certification_junk:1510827199912020821"
,
"candy:basic:coupon_code:JC3TMi1EwoVkuQmP"
,
"candy:basic:coupon_code:7Nlb7nhpVEPDCXzV"
,
"candy:basic:user_coupon:270788673588551684937456"
,
"candy:basic:coupon_info:20210906143324612"
,
"candy:basic:common_coupon"
,
"sweet:manual:pushList"
,
};
for
(
String
key
:
keys
)
{
long
value
=
key
.
hashCode
();
int
idx
=
((
int
)
(
value
^
(
value
>>>
32
))
%
dbs
);
System
.
out
.
printf
(
"\n[%s] - idx:%s"
,
key
,
idx
);
}
}
}
}
}
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