记得上下班打卡 | 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
1531610b
Commit
1531610b
authored
Dec 05, 2022
by
dongchun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加选择活动
parent
0259556f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
146 additions
and
9 deletions
+146
-9
KylinBannersVo.java
...va/com/liquidnet/service/kylin/dto/vo/KylinBannersVo.java
+6
-0
BannersDisplayLocation.java
...net/client/admin/common/enums/BannersDisplayLocation.java
+2
-2
create.html
...in/resources/templates/zhengzai/kylin/banners/create.html
+58
-3
update.html
...in/resources/templates/zhengzai/kylin/banners/update.html
+69
-2
KylinBannersServiceImpl.java
.../zhengzai/kylin/service/impl/KylinBannersServiceImpl.java
+11
-2
No files found.
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/dto/vo/KylinBannersVo.java
View file @
1531610b
...
...
@@ -62,6 +62,12 @@ public class KylinBannersVo implements Serializable {
@ApiModelProperty
(
value
=
"城市名称"
)
private
List
provincesNameList
;
@ApiModelProperty
(
value
=
"活动id"
)
private
String
marketId
;
@ApiModelProperty
(
value
=
"活动名称"
)
private
String
marketName
;
@ApiModelProperty
(
value
=
"是否删除 0已删除,1正常"
)
private
Integer
isDeleted
;
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-common/src/main/java/com/liquidnet/client/admin/common/enums/BannersDisplayLocation.java
View file @
1531610b
...
...
@@ -18,8 +18,8 @@ public enum BannersDisplayLocation {
DISPLAY_LOCATION5
(
"积分商城"
,
5
),
DISPLAY_LOCATION6
(
"YOUNG BLOOD"
,
6
),
DISPLAY_LOCATION8
(
"视频"
,
8
),
DISPLAY_LOCATION9
(
"
NFT"
,
9
);
DISPLAY_LOCATION9
(
"
正在下单"
,
9
),
;
private
String
name
;
private
int
index
;
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/kylin/banners/create.html
View file @
1531610b
...
...
@@ -5,6 +5,11 @@
<th:block
th:include=
"include :: select2-css"
/>
<th:block
th:include=
"include :: datetimepicker-css"
/>
<th:block
th:include=
"include :: bootstrap-fileinput-css"
/>
<style>
#selectActivity
{
display
:
none
;
}
</style>
</head>
<body
class=
"white-bg"
>
<div
class=
"wrapper wrapper-content animated fadeInRight ibox-content"
>
...
...
@@ -25,7 +30,7 @@
<label
class=
"col-sm-2 control-label is-required"
>
展示位置
</label>
<div
class=
"col-sm-10"
>
<label
th:each=
"type : ${BannersDisplayLocation}"
class=
"checkbox-inline"
>
<input
name=
"positionList"
th:text=
"${type.name}"
th:value=
"${type.id}"
type=
"checkbox"
>
<input
name=
"positionList"
th:text=
"${type.name}"
th:value=
"${type.id}"
type=
"checkbox"
onchange=
"areaSelect(this)"
>
</label>
</div>
</div>
...
...
@@ -60,6 +65,18 @@
</div>
</div>
</div>
<div
class=
"form-group"
id=
"selectActivity"
>
<label
class=
"col-sm-2 control-label is-required"
>
选择活动
</label>
<div
class=
"col-sm-5"
>
<div
class=
"input-group"
>
<input
id=
"searchIpt"
data-id=
""
value=
""
type=
"text"
class=
"form-control storeList"
placeholder=
"请输入查询信息"
>
<div
class=
"input-group-btn"
>
<ul
class=
"dropdown-menu dropdown-menu-right"
role=
"menu"
>
</ul>
</div>
</div>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
推广省份
</label>
<div
class=
"col-sm-10"
>
...
...
@@ -137,7 +154,42 @@
var
url7
=
"[[${url7}]]"
;
var
url9
=
"[[${url9}]]"
;
var
url14
=
"[[${url14}]]"
;
let
count
=
0
;
function
areaSelect
(
e
)
{
console
.
log
(
e
.
value
,
'kan'
)
if
(
e
.
value
==
9
)
{
count
++
;
if
(
count
%
2
)
{
console
.
log
(
count
,
'dsa'
)
$
(
"#selectActivity"
).
show
();
$
(
"#searchIpt"
).
bsSuggest
({
idField
:
'selfMarketId'
,
// data.value 的第几个数据,作为input输入框的内容
keyField
:
'name'
,
// data.value 的第几个数据,作为input输入框的内容
allowNoKeyword
:
false
,
//是否允许无关键字时请求数据
showBtn
:
false
,
multiWord
:
true
,
//以分隔符号分割的多关键字支持
hideOnSelect
:
true
,
getDataMethod
:
"url"
,
//获取数据的方式,总是从 URL 获取
effectiveFields
:
[
'name'
],
url
:
'/goblin/marketing/zhengzai/list/get?pageSize=10&pageNum=1&orderByColumn=createdAt&isAsc=desc&status=-1&purchaseName='
,
/*如果从 url 获取数据,并且需要跨域,则该参数必须设置*/
processData
:
function
(
json
)
{
// url 获取数据时,对数据的处理,作为 getData 的回调函数
//字符串转化为 js 对象
console
.
log
(
json
,
'json'
)
let
data
=
{};
data
.
value
=
json
.
data
return
data
}
}).
on
(
'onDataRequestSuccess'
,
function
(
e
,
result
)
{
}).
on
(
'onSetSelectValue'
,
function
(
e
,
selectedData
,
selectedRawData
)
{
// 当前行的所有值都能拿到
}).
on
(
'onUnsetSelectValue'
,
function
(
e
)
{
});;
}
else
{
$
(
"#selectActivity"
).
hide
();
}
}
}
function
submitHandler
()
{
var
bannersName
=
$
(
'#bannersName'
).
val
();
if
(
!
bannersName
)
{
...
...
@@ -145,6 +197,7 @@
return
false
;
}
var
positionList
=
$
.
form
.
selectCheckeds
(
"positionList"
);
if
(
positionList
.
split
(
','
).
includes
(
'9'
)
&&
!
$
(
'#searchIpt'
).
attr
(
'data-id'
))
return
layer
.
msg
(
'请选择正在下单活动!'
)
if
(
!
positionList
)
{
layer
.
msg
(
"请选择展示位置"
);
return
false
;
...
...
@@ -156,7 +209,9 @@
}
if
(
$
.
validate
.
form
())
{
var
data
=
$
(
'#form-post-add'
).
serializeArray
();
if
(
positionList
.
split
(
','
).
includes
(
'9'
))
{
data
.
push
({
"name"
:
"marketId"
,
"value"
:
$
(
'#searchIpt'
).
attr
(
'data-id'
)});
}
var
targetObj
=
''
;
var
targetObjName
=
''
;
if
(
12
==
targetType
||
100
==
targetType
)
{
// 请填写url
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/kylin/banners/update.html
View file @
1531610b
...
...
@@ -5,6 +5,11 @@
<th:block
th:include=
"include :: select2-css"
/>
<th:block
th:include=
"include :: datetimepicker-css"
/>
<th:block
th:include=
"include :: bootstrap-fileinput-css"
/>
<style>
#selectActivity
{
display
:
none
;
}
</style>
</head>
<body
class=
"white-bg"
>
<div
class=
"wrapper wrapper-content animated fadeInRight ibox-content"
>
...
...
@@ -66,6 +71,18 @@
</div>
</div>
</div>
<div
class=
"form-group"
id=
"selectActivity"
>
<label
class=
"col-sm-2 control-label is-required"
>
选择活动
</label>
<div
class=
"col-sm-5"
>
<div
class=
"input-group"
>
<input
id=
"searchIpt"
data-id=
""
th:value=
"${KylinBannersVo.marketName}"
type=
"text"
class=
"form-control storeList"
placeholder=
"请输入查询信息"
onchange=
"areaSelect(this)"
>
<div
class=
"input-group-btn"
>
<ul
class=
"dropdown-menu dropdown-menu-right"
role=
"menu"
>
</ul>
</div>
</div>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
推广省份
</label>
<div
class=
"col-sm-10"
>
...
...
@@ -168,7 +185,54 @@
var
provincesListOld
=
"[[${KylinBannersVo.provincesList}]]"
;
var
coverImg
=
"[[${KylinBannersVo.coverImg}]]"
;
var
bannersId
=
"[[${KylinBannersVo.bannersId}]]"
;
var
marketName
=
"[[${KylinBannersVo.marketName}]]"
;
var
marketId
=
"[[${KylinBannersVo.marketId}]]"
;
let
count
=
0
;
console
.
log
(
marketId
,
marketName
)
function
areaSelect
(
e
)
{
console
.
log
(
e
.
value
,
'kan'
)
if
(
e
.
value
==
9
)
{
count
++
;
if
(
count
%
2
)
{
console
.
log
(
count
,
'dsa'
)
$
(
"#selectActivity"
).
show
();
commomSe
()
}
else
{
$
(
"#selectActivity"
).
hide
();
}
}
}
if
(
marketId
)
{
count
++
;
$
(
"#selectActivity"
).
show
()
commomSe
()
$
(
"#searchIpt"
).
attr
(
'data-id'
,
marketId
)
}
function
commomSe
()
{
$
(
"#searchIpt"
).
bsSuggest
({
idField
:
'selfMarketId'
,
// data.value 的第几个数据,作为input输入框的内容
keyField
:
'name'
,
// data.value 的第几个数据,作为input输入框的内容
allowNoKeyword
:
false
,
//是否允许无关键字时请求数据
showBtn
:
false
,
multiWord
:
true
,
//以分隔符号分割的多关键字支持
hideOnSelect
:
true
,
getDataMethod
:
"url"
,
//获取数据的方式,总是从 URL 获取
effectiveFields
:
[
'name'
],
url
:
'/goblin/marketing/zhengzai/list/get?pageSize=10&pageNum=1&orderByColumn=createdAt&isAsc=desc&status=-1&purchaseName='
,
/*如果从 url 获取数据,并且需要跨域,则该参数必须设置*/
processData
:
function
(
json
)
{
// url 获取数据时,对数据的处理,作为 getData 的回调函数
//字符串转化为 js 对象
console
.
log
(
json
,
'json'
)
let
data
=
{};
data
.
value
=
json
.
data
return
data
}
}).
on
(
'onDataRequestSuccess'
,
function
(
e
,
result
)
{
}).
on
(
'onSetSelectValue'
,
function
(
e
,
selectedData
,
selectedRawData
)
{
// 当前行的所有值都能拿到
}).
on
(
'onUnsetSelectValue'
,
function
(
e
)
{
});;
}
function
submitHandler
()
{
var
bannersName
=
$
(
'#bannersName'
).
val
();
if
(
!
bannersName
)
{
...
...
@@ -176,6 +240,7 @@
return
false
;
}
var
positionList
=
$
.
form
.
selectCheckeds
(
"positionList"
);
if
(
positionList
.
split
(
','
).
includes
(
'9'
)
&&
!
$
(
'#searchIpt'
).
attr
(
'data-id'
))
return
layer
.
msg
(
'请选择正在下单活动!'
)
if
(
!
positionList
)
{
layer
.
msg
(
"请选择展示位置"
);
return
false
;
...
...
@@ -187,7 +252,9 @@
}
if
(
$
.
validate
.
form
())
{
var
data
=
$
(
'#form-post-add'
).
serializeArray
();
if
(
positionList
.
split
(
','
).
includes
(
'9'
))
{
data
.
push
({
"name"
:
"marketId"
,
"value"
:
$
(
'#searchIpt'
).
attr
(
'data-id'
)});
}
var
targetObj
=
''
;
var
targetObjName
=
''
;
if
(
12
==
targetType
||
100
==
targetType
)
{
// 请填写url
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/kylin/service/impl/KylinBannersServiceImpl.java
View file @
1531610b
...
...
@@ -10,6 +10,8 @@ import com.liquidnet.common.cache.redis.util.RedisDataSourceUtil;
import
com.liquidnet.commons.lang.util.BeanUtil
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.service.goblin.entity.GoblinSelfMarketing
;
import
com.liquidnet.service.goblin.mapper.GoblinSelfMarketingMapper
;
import
com.liquidnet.service.kylin.constant.KylinRedisConst
;
import
com.liquidnet.service.kylin.dao.BannerDetailsListDao
;
import
com.liquidnet.service.kylin.dto.param.BannersParam
;
...
...
@@ -58,6 +60,9 @@ public class KylinBannersServiceImpl extends ServiceImpl<KylinBannersMapper, Kyl
@Autowired
RedisDataSourceUtil
redisDataSourceUtil
;
@Autowired
private
GoblinSelfMarketingMapper
goblinSelfMarketingMapper
;
public
boolean
create
(
BannersParam
bannersParam
)
{
try
{
// 时间
...
...
@@ -194,11 +199,15 @@ public class KylinBannersServiceImpl extends ServiceImpl<KylinBannersMapper, Kyl
if
(
null
!=
data
)
{
List
<
String
>
positionList
=
kylinBannersRelationsMapper
.
getBannersRelationsField
(
"field_id"
,
bannersId
,
1
);
List
<
String
>
provincesList
=
kylinBannersRelationsMapper
.
getBannersRelationsField
(
"field_id"
,
bannersId
,
2
);
GoblinSelfMarketing
marketData
=
goblinSelfMarketingMapper
.
selectOne
(
Wrappers
.
lambdaQuery
(
GoblinSelfMarketing
.
class
).
eq
(
GoblinSelfMarketing:
:
getSelfMarketId
,
data
.
getMarketId
()));
data
.
setPositionList
(
positionList
);
data
.
setProvincesList
(
provincesList
);
BeanUtils
.
copyProperties
(
data
,
kylinBannersVo
);
if
(
marketData
!=
null
){
kylinBannersVo
.
setMarketName
(
marketData
.
getName
());
}
else
{
kylinBannersVo
.
setMarketName
(
""
);
}
}
else
{
return
null
;
}
...
...
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