记得上下班打卡 | 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
5adf9280
Commit
5adf9280
authored
Sep 18, 2021
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+优先购菜单;
parent
413b943c
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
661 additions
and
30 deletions
+661
-30
CandyMgtCouponAdminController.java
...troller/zhengzai/candy/CandyMgtCouponAdminController.java
+20
-18
code.html
.../resources/templates/zhengzai/candy/coupon/code/code.html
+18
-6
add1.html
...n/resources/templates/zhengzai/candy/coupon/mgt/add1.html
+1
-1
add101.html
...resources/templates/zhengzai/candy/coupon/mgt/add101.html
+484
-0
add2.html
...n/resources/templates/zhengzai/candy/coupon/mgt/add2.html
+1
-1
coupon1.html
...esources/templates/zhengzai/candy/coupon/mgt/coupon1.html
+1
-1
coupon101.html
...ources/templates/zhengzai/candy/coupon/mgt/coupon101.html
+133
-0
coupon2.html
...esources/templates/zhengzai/candy/coupon/mgt/coupon2.html
+1
-1
coupon3.html
...esources/templates/zhengzai/candy/coupon/mgt/coupon3.html
+1
-1
coupon4.html
...esources/templates/zhengzai/candy/coupon/mgt/coupon4.html
+1
-1
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/candy/CandyMgtCouponAdminController.java
View file @
5adf9280
...
...
@@ -13,6 +13,7 @@ import com.liquidnet.client.admin.zhengzai.candy.service.ICandyCouponAdminServic
import
com.liquidnet.client.admin.zhengzai.candy.service.ICandyCouponRuleAdminService
;
import
com.liquidnet.client.admin.zhengzai.candy.service.ICandyMgtCouponAdminService
;
import
com.liquidnet.client.admin.zhengzai.kylin.service.impl.KylinPerformancesAdminServiceImpl
;
import
com.liquidnet.commons.lang.util.JsonUtils
;
import
com.liquidnet.service.candy.dto.admin.CandyCouponRuleBuildParam
;
import
com.liquidnet.service.candy.dto.admin.CandyMgtCouponBuildParam
;
import
com.liquidnet.service.candy.dto.admin.CandyMgtCouponInfoDto
;
...
...
@@ -71,23 +72,21 @@ public class CandyMgtCouponAdminController extends BaseController {
startPage
();
List
<
CandyMgtCouponInfoDto
>
list
=
candyMgtCouponAdminService
.
listForMgtCouponInfoDto
(
listParam
);
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
switch
(
listParam
.
getCouType
())
{
case
3
:
String
[]
couponIdArr
=
list
.
stream
().
map
(
CandyMgtCouponInfoDto:
:
getCouponId
).
toArray
(
String
[]::
new
);
if
(
Arrays
.
asList
(
3
,
101
).
contains
(
listParam
.
getCouType
()))
{
String
[]
couponIdArr
=
list
.
stream
().
map
(
CandyMgtCouponInfoDto:
:
getCouponId
).
toArray
(
String
[]::
new
);
LambdaQueryWrapper
<
CandyCouponRule
>
queryWrapper
=
Wrappers
.
lambdaQuery
(
CandyCouponRule
.
class
);
queryWrapper
.
in
(
CandyCouponRule:
:
getCouponId
,
couponIdArr
);
queryWrapper
.
eq
(
CandyCouponRule:
:
getState
,
1
);
queryWrapper
.
select
(
CandyCouponRule:
:
getCruleId
,
CandyCouponRule:
:
getCouponId
,
CandyCouponRule:
:
getComment
);
List
<
CandyCouponRule
>
couponRuleList
=
candyCouponRuleAdminService
.
list
(
queryWrapper
);
list
.
stream
().
forEach
(
r
->{
couponRuleList
.
forEach
(
cr
->
{
if
(
r
.
getCouponId
().
equals
(
cr
.
getCouponId
()))
{
r
.
setCouponRuleScopeName
(
cr
.
getBusiName
());
}
});
LambdaQueryWrapper
<
CandyCouponRule
>
queryWrapper
=
Wrappers
.
lambdaQuery
(
CandyCouponRule
.
class
);
queryWrapper
.
in
(
CandyCouponRule:
:
getCouponId
,
couponIdArr
);
queryWrapper
.
eq
(
CandyCouponRule:
:
getState
,
1
);
queryWrapper
.
select
(
CandyCouponRule:
:
getCruleId
,
CandyCouponRule:
:
getCouponId
,
CandyCouponRule:
:
getBusiName
);
List
<
CandyCouponRule
>
couponRuleList
=
candyCouponRuleAdminService
.
list
(
queryWrapper
);
list
.
stream
().
forEach
(
r
->{
couponRuleList
.
forEach
(
cr
->
{
if
(
r
.
getCouponId
().
equals
(
cr
.
getCouponId
()))
{
r
.
setCouponRuleScopeName
(
cr
.
getBusiName
());
}
});
break
;
})
;
}
}
return
getDataTable
(
list
);
...
...
@@ -161,7 +160,7 @@ public class CandyMgtCouponAdminController extends BaseController {
@PostMapping
(
"add"
)
@ResponseBody
public
AjaxResult
addSave
(
@RequestBody
@Validated
CandyMgtCouponBuildParam
buildParam
)
{
logger
.
info
(
"operator:{},buildParam:{}"
,
ShiroUtils
.
getLoginName
(),
buildParam
);
logger
.
info
(
"operator:{},buildParam:{}"
,
ShiroUtils
.
getLoginName
(),
JsonUtils
.
toJson
(
buildParam
)
);
AjaxResult
ajaxResult
=
this
.
buildValidProcessing
(
buildParam
);
if
(((
int
)
ajaxResult
.
get
(
AjaxResult
.
CODE_TAG
))
!=
0
)
{
return
ajaxResult
;
...
...
@@ -205,17 +204,20 @@ public class CandyMgtCouponAdminController extends BaseController {
if
(
null
==
discount
||
discount
.
compareTo
(
BigDecimal
.
ZERO
)
<=
0
)
{
return
AjaxResult
.
warn
(
"折扣配置无效"
);
}
if
(
buildParam
.
getBusiType
()
!=
3
)
{
if
(
buildParam
.
getBusiType
()
!=
2
)
{
return
AjaxResult
.
warn
(
"当前类别不支持折扣券"
);
}
buildParam
.
setValFace
(
null
);
buildParam
.
setValOver
(
null
);
buildParam
.
setValMinus
(
null
);
break
;
case
101
:
case
101
:
// 优先券
if
(
null
==
buildParam
.
getOverlay
())
{
return
AjaxResult
.
warn
(
"叠加限制配置无效"
);
}
if
(
buildParam
.
getBusiType
()
!=
3
)
{
return
AjaxResult
.
warn
(
"当前类别不支持优先券"
);
}
buildParam
.
setDiscount
(
null
);
buildParam
.
setValFace
(
null
);
buildParam
.
setValOver
(
null
);
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/candy/coupon/code/code.html
View file @
5adf9280
...
...
@@ -13,7 +13,7 @@
<ul>
<input
type=
"text"
name=
"couponId"
hidden=
"hidden"
th:value=
"${couponId}"
readonly
/>
<li>
状态:
<select
name=
"state"
th:with=
"type=${@dict.getType('zhengzai_coupon_code_state')}"
>
状态:
<select
name=
"state"
th:with=
"type=${@dict.getType('zhengzai_coupon_code_state')}"
onchange=
"selectChange()"
class=
"selectChange"
>
<option
value=
""
>
所有
</option>
<option
th:each=
"dict : ${type}"
th:text=
"${dict.dictLabel}"
th:value=
"${dict.dictValue}"
></option>
</select>
...
...
@@ -31,10 +31,10 @@
<a
class=
"btn btn-warning multiple disabled"
onclick=
"$.table.exportExcel()"
shiro:hasPermission=
"candy:coupon:code:export"
>
<i
class=
"fa fa-download"
></i>
导出
</a>
<a
class=
"btn btn-primary multiple disabled"
onclick=
"invalidHandler()"
shiro:hasPermission=
"candy:coupon:code:invalid"
>
<a
class=
"btn btn-primary multiple disabled
selectChangeShow"
style=
"display: none
"
onclick=
"invalidHandler()"
shiro:hasPermission=
"candy:coupon:code:invalid"
>
<i
class=
"fa fa-edit"
></i>
批量失效
</a>
<a
class=
"btn btn-danger multiple disabled"
onclick=
"recoverHandler()"
shiro:hasPermission=
"candy:coupon:code:recover"
>
<a
class=
"btn btn-danger multiple disabled
selectChangeShow"
style=
"display: none
"
onclick=
"recoverHandler()"
shiro:hasPermission=
"candy:coupon:code:recover"
>
<i
class=
"fa fa-remove"
></i>
批量退回
</a>
</div>
...
...
@@ -66,7 +66,7 @@
},
{
field
:
'ccode'
,
title
:
'
代金
码'
title
:
'
券
码'
},
{
field
:
'redeemMobile'
,
...
...
@@ -89,8 +89,10 @@
align
:
'center'
,
formatter
:
function
(
value
,
row
,
index
)
{
var
actions
=
[];
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-danger btn-xs '
+
recoverFlag
+
'" href="javascript:void(0)" onclick="recoverHandler(
\'
'
+
row
.
ccode
+
'
\'
)"><i class="fa fa-remove"></i>退回</a>'
);
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-danger btn-xs '
+
recoverFlag
+
'" href="javascript:void(0)" onclick="recoverHandler(
\'
'
+
row
.
ccode
+
'
\'
)"><i class="fa fa-remove"></i>退回</a>'
);
}
return
actions
.
join
(
''
);
}
}]
...
...
@@ -125,6 +127,16 @@
$
.
operate
.
batchProcessingForCouponCode
(
couponId
,
2
);
}
}
function
selectChange
()
{
let
val
=
$
(
".selectChange"
).
val
();
console
.
log
(
typeof
val
);
if
(
val
===
'0'
)
{
$
(
".selectChangeShow"
).
show
();
}
else
{
$
(
".selectChangeShow"
).
hide
();
}
}
</script>
</body>
</html>
\ No newline at end of file
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/candy/coupon/mgt/add1.html
View file @
5adf9280
...
...
@@ -150,7 +150,7 @@
<input
type=
"radio"
value=
"0"
class=
"typeOne"
name=
"typeOne"
checked
><span>
全场
</span>
<input
type=
"radio"
value=
"1"
class=
"typeOne"
name=
"typeOne"
><span>
演出
</span>
<input
type=
"radio"
value=
"2"
class=
"typeOne"
name=
"typeOne"
><span>
商品
</span>
<input
type=
"radio"
value=
"3"
class=
"typeOne"
name=
"typeOne"
><span>
优先购
</span
>
<!-- <input type="radio" value="3" class="typeOne" name="typeOne"><span>优先购</span>--
>
</div>
</div>
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/candy/coupon/mgt/add101.html
0 → 100644
View file @
5adf9280
This diff is collapsed.
Click to expand it.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/candy/coupon/mgt/add2.html
View file @
5adf9280
...
...
@@ -153,7 +153,7 @@
<input
type=
"radio"
value=
"0"
class=
"typeOne"
name=
"typeOne"
checked
><span>
全场
</span>
<input
type=
"radio"
value=
"1"
class=
"typeOne"
name=
"typeOne"
><span>
演出
</span>
<input
type=
"radio"
value=
"2"
class=
"typeOne"
name=
"typeOne"
><span>
商品
</span>
<input
type=
"radio"
value=
"3"
class=
"typeOne"
name=
"typeOne"
><span>
优先购
</span
>
<!-- <input type="radio" value="3" class="typeOne" name="typeOne"><span>优先购</span>--
>
</div>
</div>
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/candy/coupon/mgt/coupon1.html
View file @
5adf9280
...
...
@@ -132,7 +132,7 @@
// if (row.state === 0) {
// actions.push('
<
a
class
=
"btn btn-danger btn-xs ' + cancelMgtCouponFlag + '"
href
=
"javascript:void(0)"
onclick
=
"$.operate.remove(
\
'' + row.mcouponId + '
\
')"
><
i
class
=
"fa fa-remove"
><
/i>取消</
a
>
');
// }
if (row.bindType === 0) {
if (row.bindType === 0
&& row.state === 1
) {
actions.push('
<
a
class
=
"btn btn-info btn-xs"
href
=
"javascript:void(0)"
onclick
=
"couponCodeList(
\
'' + row.couponId + '
\
')"
><
i
class
=
"fa fa-list-ul"
><
/i>码列表</
a
>
');
}
return actions.join('');
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/candy/coupon/mgt/coupon101.html
0 → 100644
View file @
5adf9280
<!DOCTYPE html>
<html
lang=
"zh"
xmlns:th=
"http://www.thymeleaf.org"
xmlns:shiro=
"http://www.pollix.at/thymeleaf/shiro"
>
<head>
<th:block
th:include=
"include :: header('兑换券')"
/>
</head>
<body
class=
"gray-bg"
>
<div
class=
"container-div"
>
<div
class=
"row"
>
<div
class=
"col-sm-12 search-collapse"
>
<form
id=
"coupon-form"
>
<div
class=
"select-list"
>
<ul>
<input
type=
"hidden"
name=
"couType"
th:value=
"${couType}"
/>
<li>
<input
type=
"text"
name=
"keyword"
placeholder=
"搜索"
/>
</li>
<li>
类型:
<select
name=
"bindType"
th:with=
"type=${@dict.getType('zhengzai_coupon_bind_type')}"
>
<option
value=
""
>
所有
</option>
<option
th:each=
"dict : ${type}"
th:text=
"${dict.dictLabel}"
th:value=
"${dict.dictValue}"
></option>
</select>
</li>
<li>
适用范围:
<select
name=
"busiType"
th:with=
"type=${@dict.getType('zhengzai_coupon_busi_type')}"
>
<option
value=
""
>
所有
</option>
<option
th:each=
"dict : ${type}"
th:text=
"${dict.dictLabel}"
th:value=
"${dict.dictValue}"
></option>
</select>
</li>
<li>
<a
class=
"btn btn-primary btn-rounded btn-sm"
onclick=
"$.table.search()"
><i
class=
"fa fa-search"
></i>
搜索
</a>
<a
class=
"btn btn-warning btn-rounded btn-sm"
onclick=
"$.form.reset()"
><i
class=
"fa fa-refresh"
></i>
重置
</a>
</li>
</ul>
</div>
</form>
</div>
<div
class=
"btn-group-sm"
id=
"toolbar"
role=
"group"
>
<a
class=
"btn btn-success"
th:onclick=
"$.operate.addTab([[${couType}]])"
shiro:hasPermission=
"candy:coupon:mgt:add"
>
<i
class=
"fa fa-plus"
></i>
新增
</a>
</div>
<div
class=
"col-sm-12 select-table table-striped"
>
<table
id=
"bootstrap-table"
></table>
</div>
</div>
</div>
<th:block
th:include=
"include :: footer"
/>
<script
th:inline=
"javascript"
>
var
prefix
=
ctx
+
"candy/coupon/mgt"
;
var
viewMgtCouponFlag
=
[[
$
{@
permission
.
hasPermi
(
'candy:coupon:mgt:detail'
)}]];
var
cancelMgtCouponFlag
=
[[
$
{@
permission
.
hasPermi
(
'candy:coupon:mgt:cancel'
)}]];
var
couType
=
[[
$
{
couType
}]];
$
(
function
()
{
var
options
=
{
url
:
prefix
+
"/list"
,
createUrl
:
prefix
+
"/add/{id}"
,
detailUrl
:
prefix
+
"/detail/"
+
couType
+
"/{id}"
,
removeUrl
:
prefix
+
"/cancel/{id}"
,
// updateUrl: prefix + "/edit/{id}",
// exportUrl: prefix + "/export",
sortName
:
"createdAt"
,
modalName
:
"优先券"
,
columns
:
[
{
checkbox
:
true
},
{
field
:
'couponRuleScopeName'
,
title
:
'适用演出'
},
{
field
:
'eventAmt'
,
title
:
'数量'
},
{
field
:
'title'
,
title
:
'标题'
},
{
field
:
'notice'
,
title
:
'描述'
},
{
field
:
'operator'
,
title
:
'创建人'
},
{
field
:
'createdAt'
,
title
:
'生成时间'
,
sortable
:
true
,
formatter
:
function
(
value
,
row
,
index
)
{
return
$
.
common
.
sprintf
(
"<span>%s</span>"
,
null
!=
value
?
value
.
substring
(
0
,
19
)
:
value
);
}
},
{
field
:
'expireAt'
,
title
:
'失效时间'
,
formatter
:
function
(
value
,
row
,
index
)
{
return
$
.
common
.
sprintf
(
"<span>%s</span>"
,
value
);
}
},
{
title
:
'操作'
,
// align: 'center',
formatter
:
function
(
value
,
row
,
index
)
{
var
actions
=
[];
actions
.
push
(
'<a class="btn btn-warning btn-xs '
+
viewMgtCouponFlag
+
'" href="javascript:void(0)" onclick="$.operate.detail(
\'
'
+
row
.
mcouponId
+
'
\'
)"><i class="fa fa-search"></i>详情</a>'
);
// if (row.state === 0) {
// actions.push('
<
a
class
=
"btn btn-danger btn-xs ' + cancelMgtCouponFlag + '"
href
=
"javascript:void(0)"
onclick
=
"$.operate.remove(
\
'' + row.mcouponId + '
\
')"
><
i
class
=
"fa fa-remove"
><
/i>取消</
a
>
');
// }
if (row.bindType === 0 && row.state === 1) {
actions.push('
<
a
class
=
"btn btn-info btn-xs"
href
=
"javascript:void(0)"
onclick
=
"couponCodeList(
\
'' + row.couponId + '
\
')"
><
i
class
=
"fa fa-list-ul"
><
/i>码列表</
a
>
');
}
return actions.join('');
}
}]
};
$.table.init(options);
});
/* 查看码列表 */
function couponCodeList(couponId) {
var url = '
candy
/
coupon
/
code
?
couponId
=
' + couponId;
$.modal.openTab("查看码列表", url);
}
</script>
</body>
</html>
\ No newline at end of file
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/candy/coupon/mgt/coupon2.html
View file @
5adf9280
...
...
@@ -132,7 +132,7 @@
// if (row.state === 0) {
// actions.push('
<
a
class
=
"btn btn-danger btn-xs ' + cancelMgtCouponFlag + '"
href
=
"javascript:void(0)"
onclick
=
"$.operate.remove(
\
'' + row.mcouponId + '
\
')"
><
i
class
=
"fa fa-remove"
><
/i>取消</
a
>
');
// }
if (row.bindType === 0) {
if (row.bindType === 0
&& row.state === 1
) {
actions.push('
<
a
class
=
"btn btn-info btn-xs"
href
=
"javascript:void(0)"
onclick
=
"couponCodeList(
\
'' + row.couponId + '
\
')"
><
i
class
=
"fa fa-list-ul"
><
/i>码列表</
a
>
');
}
return actions.join('');
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/candy/coupon/mgt/coupon3.html
View file @
5adf9280
...
...
@@ -113,7 +113,7 @@
// if (row.state === 0) {
// actions.push('
<
a
class
=
"btn btn-danger btn-xs ' + cancelMgtCouponFlag + '"
href
=
"javascript:void(0)"
onclick
=
"$.operate.remove(
\
'' + row.mcouponId + '
\
')"
><
i
class
=
"fa fa-remove"
><
/i>取消</
a
>
');
// }
if (row.bindType === 0) {
if (row.bindType === 0
&& row.state === 1
) {
actions.push('
<
a
class
=
"btn btn-info btn-xs"
href
=
"javascript:void(0)"
onclick
=
"couponCodeList(
\
'' + row.couponId + '
\
')"
><
i
class
=
"fa fa-list-ul"
><
/i>码列表</
a
>
');
}
return actions.join('');
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/candy/coupon/mgt/coupon4.html
View file @
5adf9280
...
...
@@ -132,7 +132,7 @@
// if (row.state === 0) {
// actions.push('
<
a
class
=
"btn btn-danger btn-xs ' + cancelMgtCouponFlag + '"
href
=
"javascript:void(0)"
onclick
=
"$.operate.remove(
\
'' + row.mcouponId + '
\
')"
><
i
class
=
"fa fa-remove"
><
/i>取消</
a
>
');
// }
if (row.bindType === 0) {
if (row.bindType === 0
&& row.state === 1
) {
actions.push('
<
a
class
=
"btn btn-info btn-xs"
href
=
"javascript:void(0)"
onclick
=
"couponCodeList(
\
'' + row.couponId + '
\
')"
><
i
class
=
"fa fa-list-ul"
><
/i>码列表</
a
>
');
}
return actions.join('');
...
...
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