记得上下班打卡 | 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
63c66cdd
Commit
63c66cdd
authored
Aug 19, 2022
by
张禹
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'pre' into 'master'
Pre See merge request
!297
parents
ce21c900
2f507d5b
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
207 additions
and
59 deletions
+207
-59
KylinRedisConst.java
...com/liquidnet/service/kylin/constant/KylinRedisConst.java
+2
-1
KylinRecommendActiveParam.java
...et/service/kylin/dto/param/KylinRecommendActiveParam.java
+8
-0
KylinRecommendActiveController.java
...roller/zhengzai/kylin/KylinRecommendActiveController.java
+39
-4
add.html
...rces/templates/zhengzai/sweet/affiliatedActivity/add.html
+65
-18
edit.html
...ces/templates/zhengzai/sweet/affiliatedActivity/edit.html
+70
-26
AdamUserServiceImpl.java
...uidnet/service/adam/service/impl/AdamUserServiceImpl.java
+16
-4
KylinArActiveServiceImpl.java
.../service/kylin/service/impl/KylinArActiveServiceImpl.java
+7
-6
No files found.
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/constant/KylinRedisConst.java
View file @
63c66cdd
...
...
@@ -96,6 +96,8 @@ public class KylinRedisConst {
public
static
final
String
ACTIVE_TICKET_AR_TICKET
=
"kylin:active:ar:ticket:"
;
//互动券
public
static
final
String
ACTIVE_TICKET_AR_USER
=
"kylin:active:ar:user:"
;
//互动券 绑定的用户
public
static
final
String
ACTIVE_USE_AR_COUNT
=
"kylin:ar:use:count"
;
//ar激活码使用量
public
static
final
String
RECOMMEND_ACTIVE
=
"kylin:active:recommend:"
;
// 推荐活动
...
...
@@ -109,7 +111,6 @@ public class KylinRedisConst {
//订单关联 Ar激活码
public
static
final
String
ORDER_AR_CODE
=
"kylin:ar:order:"
;
//$key + $orderId
public
static
final
String
ACTIVE_USE_AR_COUNT
=
"kylin:ar:use:count"
;
//ar激活码使用量
}
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/dto/param/KylinRecommendActiveParam.java
View file @
63c66cdd
...
...
@@ -6,6 +6,8 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
import
java.util.List
;
...
...
@@ -38,12 +40,14 @@ public class KylinRecommendActiveParam implements Serializable {
*/
@ApiModelProperty
(
value
=
"开启时间yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
DateUtil
.
DATE_FULL_STR
)
@NotNull
(
message
=
"开启时间必传"
)
private
LocalDateTime
startTime
;
/**
* 结束时间
*/
@ApiModelProperty
(
value
=
"结束时间yyyy-MM-dd HH:mm:ss"
)
@NotNull
(
message
=
"结束时间必传"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
DateUtil
.
DATE_FULL_STR
)
private
LocalDateTime
endTime
;
...
...
@@ -51,18 +55,21 @@ public class KylinRecommendActiveParam implements Serializable {
* 活动名称
*/
@ApiModelProperty
(
value
=
"活动名称"
)
@NotBlank
(
message
=
"活动名称必传"
)
private
String
activeName
;
/**
* 1NFT2组合购3演出4商品
*/
@ApiModelProperty
(
value
=
"1NFT2组合购3演出4商品"
)
@NotNull
(
message
=
"关联类型必传"
)
private
Integer
activeType
;
/**
* 活动绑定id
*/
@ApiModelProperty
(
value
=
"活动绑定id"
)
@NotBlank
(
message
=
"关联名称必传"
)
private
String
activeBindId
;
/**
...
...
@@ -89,6 +96,7 @@ public class KylinRecommendActiveParam implements Serializable {
* 0开启,1未开启
*/
@ApiModelProperty
(
value
=
"0开启,1未开启"
)
@NotNull
(
message
=
"状态必传"
)
private
Integer
status
;
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/kylin/KylinRecommendActiveController.java
View file @
63c66cdd
...
...
@@ -6,6 +6,7 @@ import com.liquidnet.client.admin.common.core.domain.AjaxResult;
import
com.liquidnet.client.admin.common.core.page.TableDataInfo
;
import
com.liquidnet.client.admin.zhengzai.kylin.service.impl.KylinRecommendActiveRelationServiceImpl
;
import
com.liquidnet.client.admin.zhengzai.kylin.service.impl.KylinRecommendActiveServiceImpl
;
import
com.liquidnet.commons.lang.util.StringUtil
;
import
com.liquidnet.service.kylin.dto.param.KylinRecommendActiveParam
;
import
com.liquidnet.service.kylin.dto.param.KylinRecommendActiveRelationParam
;
import
com.liquidnet.service.kylin.entity.KylinRecommendActive
;
...
...
@@ -14,6 +15,9 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.validation.ObjectError
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.ArrayList
;
...
...
@@ -36,17 +40,32 @@ public class KylinRecommendActiveController extends BaseController {
@PostMapping
(
"addKylinRecommendActive"
)
@ApiOperation
(
value
=
"增加活动"
)
@ResponseBody
public
AjaxResult
addKylinRecommendActive
(
@RequestBody
KylinRecommendActiveParam
kylinRecommendActiveParam
)
{
public
AjaxResult
addKylinRecommendActive
(
@Validated
@RequestBody
KylinRecommendActiveParam
kylinRecommendActiveParam
,
BindingResult
result
)
{
if
(
result
!=
null
&&
result
.
hasErrors
())
{
List
<
ObjectError
>
errors
=
result
.
getAllErrors
();
if
(
errors
!=
null
)
{
return
AjaxResult
.
error
(
errors
.
get
(
0
).
getDefaultMessage
());
}
}
KylinRecommendActive
kylinRecommendActive
=
new
KylinRecommendActive
();
BeanUtils
.
copyProperties
(
kylinRecommendActiveParam
,
kylinRecommendActive
);
if
(
kylinRecommendActiveService
.
validateTime
(
kylinRecommendActive
)
==
0
)
{
List
<
KylinRecommendActiveRelation
>
list
=
new
ArrayList
<
KylinRecommendActiveRelation
>();
if
(
kylinRecommendActiveParam
.
getList
()
!=
null
)
{
kylinRecommendActiveParam
.
getList
().
forEach
(
r
->
{
for
(
KylinRecommendActiveRelationParam
r:
kylinRecommendActiveParam
.
getList
()){
KylinRecommendActiveRelation
kylinRecommendActiveRelation
=
new
KylinRecommendActiveRelation
();
if
(
StringUtil
.
isBlank
(
r
.
getRecommendBindId
())){
return
AjaxResult
.
error
(
"操作失败"
,
"推荐商品id不能为空"
);
}
else
if
(
null
==
r
.
getType
()){
return
AjaxResult
.
error
(
"操作失败"
,
"推荐类型不能为空"
);
}
BeanUtils
.
copyProperties
(
r
,
kylinRecommendActiveRelation
);
list
.
add
(
kylinRecommendActiveRelation
);
});
}
/* kylinRecommendActiveParam.getList().forEach(r -> {
});*/
}
kylinRecommendActiveService
.
addKylinRecommendActive
(
kylinRecommendActive
,
list
);
return
AjaxResult
.
success
(
"操作成功"
,
""
);
...
...
@@ -68,6 +87,15 @@ public class KylinRecommendActiveController extends BaseController {
@ApiOperation
(
value
=
"增加或者修改活动推荐List"
)
@ResponseBody
public
AjaxResult
addOrUpdateListKylinRecommendActiveRelation
(
@RequestBody
List
<
KylinRecommendActiveRelationParam
>
kylinRecommendActiveParam
)
{
for
(
KylinRecommendActiveRelationParam
k:
kylinRecommendActiveParam
){
if
(
StringUtil
.
isBlank
(
k
.
getRecommendBindId
())){
return
AjaxResult
.
error
(
"操作失败"
,
"推荐商品id不能为空"
);
}
else
if
(
StringUtil
.
isBlank
(
k
.
getRecommendActiveId
())){
return
AjaxResult
.
error
(
"操作失败"
,
"推荐活动id不能为空"
);
}
else
if
(
null
==
k
.
getType
()){
return
AjaxResult
.
error
(
"操作失败"
,
"推荐类型不能为空"
);
}
}
if
(
kylinRecommendActiveParam
.
size
()>
20
){
return
AjaxResult
.
error
(
"操作失败"
,
"推荐活动不允许超过20个!!!"
);
}
...
...
@@ -93,7 +121,14 @@ public class KylinRecommendActiveController extends BaseController {
@PostMapping
(
"updateKylinRecommendActive"
)
@ApiOperation
(
value
=
"修改活动"
)
@ResponseBody
public
AjaxResult
updateKylinRecommendActive
(
@RequestBody
KylinRecommendActiveParam
kylinRecommendActiveParam
)
{
public
AjaxResult
updateKylinRecommendActive
(
@Validated
@RequestBody
KylinRecommendActiveParam
kylinRecommendActiveParam
,
BindingResult
result
)
{
/*BindingResult result = exception.getBindingResult();*/
if
(
result
!=
null
&&
result
.
hasErrors
())
{
List
<
ObjectError
>
errors
=
result
.
getAllErrors
();
if
(
errors
!=
null
)
{
return
AjaxResult
.
error
(
errors
.
get
(
0
).
getDefaultMessage
());
}
}
KylinRecommendActive
kylinRecommendActive
=
new
KylinRecommendActive
();
BeanUtils
.
copyProperties
(
kylinRecommendActiveParam
,
kylinRecommendActive
);
if
(
kylinRecommendActiveService
.
validateTime
(
kylinRecommendActive
)
==
0
)
{
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/sweet/affiliatedActivity/add.html
View file @
63c66cdd
...
...
@@ -283,6 +283,8 @@
let
currentUrl
=
'goblin/common/sku'
let
activeTypeChangeVal
=
1
let
varObj
=
{}
let
currentNum
=
null
;
let
currentSelect
=
null
$
(
document
).
ready
(
function
()
{
$
(
'.sortable-list'
).
sortable
({
connectWith
:
'.connectList'
}).
disableSelection
()
...
...
@@ -309,13 +311,6 @@
$
(
"#activeType"
).
attr
(
'value'
,
1
)
// 选择select
$
(
'#activeType'
).
change
(
function
()
{
activeTypeChangeVal
=
Number
(
$
(
this
).
val
())
// 1 2 3 4
currentUrl
=
affiliatedUrl
[
activeTypeChangeVal
-
1
]
// 获取选中的,对应地址
})
// 监听 模糊搜索
let
search
=
new
searchSelect
(
'#search'
,
[],
function
(
val
)
{
let
_params
=
{}
...
...
@@ -367,6 +362,21 @@
})
})
// 选择select
$
(
'#activeType'
).
change
(
function
()
{
activeTypeChangeVal
=
Number
(
$
(
this
).
val
())
// 1 2 3 4
currentUrl
=
affiliatedUrl
[
activeTypeChangeVal
-
1
]
// 获取选中的,对应地址
search
.
empty
().
empty
()
$
(
'#search input'
).
attr
(
'value'
,
''
)
$
(
'#search input'
).
attr
(
'data-id'
,
''
)
})
$
(
'#search input'
).
focus
(
function
()
{
search
.
empty
().
empty
()
$
(
'#search input'
).
attr
(
'value'
,
''
)
$
(
'#search input'
).
attr
(
'data-id'
,
''
)
})
})
// init end
getPageData
()
// 最开始加载
...
...
@@ -384,7 +394,15 @@
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
createListenerSearch
(
i
+
1
)
$
(
`#listActiveType
${
i
+
1
}
`
).
change
(
function
()
{
$
(
'#listRemoteSearch'
+
(
i
+
1
)
+
' input'
).
attr
(
'value'
,
''
)
$
(
'#listRemoteSearch'
+
(
currentSelect
)
+
' input'
).
attr
(
'value'
,
''
)
$
(
'#listRemoteSearch'
+
(
currentSelect
)
+
' input'
).
attr
(
'data-id'
,
''
)
varObj
[
Object
.
keys
(
varObj
)[
currentSelect
-
1
]].
empty
()
console
.
log
(
'init-listener'
,
varObj
[
Object
.
keys
(
varObj
)[
currentSelect
-
1
]])
})
$
(
'#listRemoteSearch'
+
(
i
+
1
)
+
' input'
).
focus
(
function
()
{
$
(
this
).
val
(
''
)
$
(
this
).
attr
(
'data-id'
,
''
)
})
}
},
500
)
...
...
@@ -408,7 +426,7 @@
<div class="addAvatarItem" style="padding: 20px;">
<div class="selectClassifyOne">
<span class="span-label"><i style="color: red; position: relative; top: 3px;">*</i>推荐类型:</span>
<select id="listActiveType
${
index
+
1
}
" value="
${
item
.
type
}
" class="form-control m-b">
<select id="listActiveType
${
index
+
1
}
" value="
${
item
.
type
}
" class="form-control m-b"
onclick="handleSelect('
${
index
+
1
}
')"
>
<option value="1">NFT</option>
<option value="2">组合购</option>
<option value="3">演出</option>
...
...
@@ -419,7 +437,7 @@
<span class="span-label"><i style="color: red; position: relative; top: 3px;">*</i>推荐商品:</span>
<div class="search-wrapper">
<div class="search-wrapper">
<div id="listRemoteSearch
${
index
+
1
}
" placeholder="请搜索" name="searchSelect
${
index
+
1
}
"></div>
<div id="listRemoteSearch
${
index
+
1
}
" placeholder="请搜索" name="searchSelect
${
index
+
1
}
"
onclick="handleInput('
${
index
+
1
}
')"
></div>
</div>
</div>
</div>
...
...
@@ -439,7 +457,7 @@
<div class="addAvatarItem" style="padding: 20px;">
<div class="selectClassifyOne">
<span class="span-label"><i style="color: red; position: relative; top: 3px;">*</i>推荐类型:</span>
<select id="listActiveType
${
count
}
" class="form-control m-b">
<select id="listActiveType
${
count
}
" class="form-control m-b"
onclick="handleSelect('
${
count
}
')"
>
<option value="1">NFT</option>
<option value="2">组合购</option>
<option value="3">演出</option>
...
...
@@ -450,7 +468,7 @@
<span class="span-label"><i style="color: red; position: relative; top: 3px;">*</i>推荐商品:</span>
<div class="search-wrapper">
<div class="search-wrapper">
<div id="listRemoteSearch
${
count
}
" placeholder="请搜索" name="searchSelect
${
count
}
"></div>
<div id="listRemoteSearch
${
count
}
" placeholder="请搜索" name="searchSelect
${
count
}
"
onclick="handleInput('
${
count
}
')"
></div>
</div>
</div>
</div>
...
...
@@ -458,26 +476,43 @@
<div style="position: relative;"><i class="fa fa-remove" onclick="removeListItem('
${
count
}
')" style="margin-top: 8px; position: absolute; left: 10px;"></i></div>
</li>`
// 只有一组,可添加
if
(
count
>=
0
&&
count
<=
19
)
{
if
(
count
>=
0
&&
count
<=
20
)
{
$
(
'.sortable-list'
).
append
(
dynamicAddDom
)
// 设置 实例化 一个 input search监听
setTimeout
(()
=>
{
varObj
[
'listRemoteSearch'
+
count
]
=
new
searchSelect
(
`#listRemoteSearch
${
count
}
`
,
[],
function
(
val
)
{
searchAjax
(
val
,
c
ount
)
searchAjax
(
val
,
c
urrentNum
)
})
},
500
)
setTimeout
(()
=>
{
$
(
`#listActiveType
${
count
}
`
).
change
(
function
()
{
$
(
'#listRemoteSearch'
+
(
count
)
+
' input'
).
attr
(
'value'
,
''
)
$
(
'#listRemoteSearch'
+
(
currentSelect
)
+
' input'
).
val
(
''
)
$
(
'#listRemoteSearch'
+
(
currentSelect
)
+
' input'
).
attr
(
'data-id'
,
''
)
varObj
[
Object
.
keys
(
varObj
)[
currentSelect
-
1
]].
empty
()
console
.
log
(
'add-listener'
,
varObj
[
Object
.
keys
(
varObj
)[
currentSelect
-
1
]])
})
$
(
'#listRemoteSearch'
+
(
count
)
+
' input'
).
focus
(
function
()
{
$
(
this
).
val
(
''
)
$
(
this
).
attr
(
'data-id'
,
''
)
// varObj['listRemoteSearch'+currentSelect].empty()
})
},
800
)
},
400
)
// setTimeout(() => {
// $('#listRemoteSearch' + (count) + ' input').focus(function () {
// $(this).val('')
// $(this).attr('data-id', '')
// varObj['listRemoteSearch'+currentSelect].empty()
// })
//
// }, 600)
}
else
{
layer
.
msg
(
'不能添加'
)
...
...
@@ -487,6 +522,16 @@
}
// 点击select记录位置
function
handleSelect
(
num
)
{
currentSelect
=
num
}
// 点击input记录位置
function
handleInput
(
num
)
{
currentNum
=
num
;
}
// 删除list item
function
removeListItem
(
index
)
{
let
evryGroup
=
$
(
'#addClassify2'
).
find
(
$
(
'.addAvatarItem'
))
...
...
@@ -531,12 +576,14 @@
function
createListenerSearch
(
index
)
{
varObj
[
'listRemoteSearch'
+
index
]
=
new
searchSelect
(
`#listRemoteSearch
${
index
}
`
,
[],
function
(
val
)
{
searchAjax
(
val
,
index
)
})
}
function
searchAjax
(
val
,
index
)
{
console
.
log
(
'当前的list下啦'
,
val
,
index
)
let
_selectVal
=
$
(
"#listActiveType"
+
index
).
find
(
"option:selected"
).
val
()
// 当前子select val
if
(
_selectVal
)
{
...
...
@@ -649,7 +696,7 @@
return
}
let
idList
=
listData
.
filter
(
item
=>
item
.
recommendBindId
==
undefine
d
)
let
idList
=
listData
.
filter
(
item
=>
!
item
.
recommendBindI
d
)
if
(
idList
.
length
>=
1
)
{
layer
.
msg
(
'推荐活动需填写完整'
)
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/sweet/affiliatedActivity/edit.html
View file @
63c66cdd
...
...
@@ -213,7 +213,6 @@
</span>
<div
class=
"input-group"
style=
"width: 300px;"
>
<select
name=
"status"
id=
"status"
class=
"form-control m-b"
>
<option
value=
""
>
所有
</option>
<option
value=
"0"
>
开启
</option>
<option
value=
"1"
>
未开启
</option>
</select>
...
...
@@ -286,6 +285,8 @@
let
_recommendId
=
''
let
_recommendActiveId
=
''
let
varObj
=
{}
let
currentNum
=
null
;
let
currentSelect
=
null
$
(
document
).
ready
(
function
()
{
$
(
'.sortable-list'
).
sortable
({
connectWith
:
'.connectList'
}).
disableSelection
()
...
...
@@ -308,13 +309,6 @@
});
});
// 选择select
$
(
'#activeType'
).
change
(
function
()
{
activeTypeChangeVal
=
Number
(
$
(
this
).
val
())
// 1 2 3 4
currentUrl
=
affiliatedUrl
[
activeTypeChangeVal
-
1
]
// 获取选中的,对应地址
$
(
'#search input'
).
attr
(
'value'
,
''
)
})
// 监听 模糊搜索
let
search
=
new
searchSelect
(
'#search'
,
[],
function
(
val
)
{
let
_params
=
{}
...
...
@@ -367,6 +361,21 @@
})
search
.
search
(
true
)
// 选择select
$
(
'#activeType'
).
change
(
function
()
{
activeTypeChangeVal
=
Number
(
$
(
this
).
val
())
// 1 2 3 4
currentUrl
=
affiliatedUrl
[
activeTypeChangeVal
-
1
]
// 获取选中的,对应地址
search
.
empty
()
$
(
'#search input'
).
attr
(
'value'
,
''
)
$
(
'#search input'
).
attr
(
'data-id'
,
''
)
})
$
(
'#search input'
).
focus
(
function
()
{
search
.
empty
().
empty
()
$
(
'#search input'
).
attr
(
'value'
,
''
)
$
(
'#search input'
).
attr
(
'data-id'
,
''
)
})
})
// init end
getPageData
()
// 最开始加载
...
...
@@ -411,7 +420,16 @@
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
createListenerSearch
(
i
+
1
)
$
(
`#listActiveType
${
i
+
1
}
`
).
change
(
function
()
{
$
(
'#listRemoteSearch'
+
(
i
+
1
)
+
' input'
).
attr
(
'value'
,
''
)
$
(
'#listRemoteSearch'
+
(
currentSelect
)
+
' input'
).
attr
(
'value'
,
''
)
// 重置功能
$
(
'#listRemoteSearch'
+
(
currentSelect
)
+
' input'
).
attr
(
'data-id'
,
''
)
varObj
[
Object
.
keys
(
varObj
)[
currentSelect
-
1
]].
empty
()
console
.
log
(
'init-listener'
,
varObj
[
Object
.
keys
(
varObj
)[
currentSelect
-
1
]])
})
$
(
'#listRemoteSearch'
+
(
i
+
1
)
+
' input'
).
focus
(
function
()
{
$
(
this
).
val
(
''
)
$
(
this
).
attr
(
'data-id'
,
''
)
})
}
},
500
)
...
...
@@ -439,13 +457,13 @@
// 组装 html
function
assembleDom
(
list
)
{
list
.
forEach
((
item
,
index
)
=>
{
count
++
list
.
forEach
((
item
,
index
)
=>
{
// index 0 1
count
=
index
+
1
;
let
dynamicAddDom
=
`<li class="info-element" id="liItem
${
count
}
">
<div class="addAvatarItem" style="padding: 20px;">
<div class="selectClassifyOne">
<span class="span-label"><i style="color: red; position: relative; top: 3px;">*</i>推荐类型:</span>
<select id="listActiveType
${
count
}
" value="
${
item
.
type
}
" class="form-control m-b list-active-type
">
<select id="listActiveType
${
index
+
1
}
" value="
${
item
.
type
}
" class="form-control m-b list-active-type" onclick="handleSelect('
${
index
+
1
}
')
">
<option value="1">NFT</option>
<option value="2">组合购</option>
<option value="3">演出</option>
...
...
@@ -456,7 +474,7 @@
<span class="span-label"><i style="color: red; position: relative; top: 3px;">*</i>推荐商品:</span>
<div class="search-wrapper">
<div class="search-wrapper">
<div id="listRemoteSearch
${
count
}
" placeholder="请搜索" name="searchSelect
${
count
}
"></div>
<div id="listRemoteSearch
${
index
+
1
}
" placeholder="请搜索" name="searchSelect
${
index
+
1
}
" onclick="handleInput('
${
index
+
1
}
')
"></div>
</div>
</div>
</div>
...
...
@@ -477,7 +495,7 @@
<div class="addAvatarItem" style="padding: 20px;">
<div class="selectClassifyOne">
<span class="span-label"><i style="color: red; position: relative; top: 3px;">*</i>推荐类型:</span>
<select id="listActiveType
${
count
}
" class="form-control m-b">
<select id="listActiveType
${
count
}
" class="form-control m-b"
onclick="handleSelect('
${
count
}
')"
>
<option value="1">NFT</option>
<option value="2">组合购</option>
<option value="3">演出</option>
...
...
@@ -488,7 +506,7 @@
<span class="span-label"><i style="color: red; position: relative; top: 3px;">*</i>推荐商品:</span>
<div class="search-wrapper">
<div class="search-wrapper">
<div id="listRemoteSearch
${
count
}
" placeholder="请搜索" name="searchSelect
${
count
}
"></div>
<div id="listRemoteSearch
${
count
}
" placeholder="请搜索" name="searchSelect
${
count
}
"
onclick="handleInput('
${
count
}
')"
></div>
</div>
</div>
</div>
...
...
@@ -498,22 +516,37 @@
// 只有一组,可添加
if
(
count
>=
0
&&
count
<=
19
)
{
if
(
count
>=
0
&&
count
<=
20
)
{
$
(
'.sortable-list'
).
append
(
dynamicAddDom
)
setTimeout
(()
=>
{
varObj
[
'listRemoteSearch'
+
count
]
=
new
searchSelect
(
`#listRemoteSearch
${
count
}
`
,
[],
function
(
val
)
{
searchAjax
(
val
,
c
ount
)
searchAjax
(
val
,
c
urrentNum
)
})
},
5
00
)
},
3
00
)
setTimeout
(()
=>
{
$
(
`#listActiveType
${
count
}
`
).
change
(
function
()
{
$
(
'#listRemoteSearch'
+
count
+
' input'
).
attr
(
'value'
,
''
)
$
(
`#listActiveType
${
count
}
`
).
change
(
function
()
{
// 1
$
(
'#listRemoteSearch'
+
(
currentSelect
)
+
' input'
).
val
(
''
);
// 重置功能
$
(
'#listRemoteSearch'
+
(
currentSelect
)
+
' input'
).
attr
(
'data-id'
,
''
)
varObj
[
Object
.
keys
(
varObj
)[
currentSelect
-
1
]].
empty
()
console
.
log
(
'add-listener'
,
varObj
[
Object
.
keys
(
varObj
)[
currentSelect
-
1
]])
})
},
800
)
},
400
)
setTimeout
(()
=>
{
$
(
'#listRemoteSearch'
+
(
count
)
+
' input'
).
focus
(
function
()
{
$
(
this
).
val
(
''
)
$
(
this
).
attr
(
'data-id'
,
''
)
// varObj[Object.keys(varObj)[currentSelect - 1]].empty()
})
},
600
)
}
else
{
layer
.
msg
(
'不能添加'
)
...
...
@@ -523,6 +556,16 @@
}
// 点击select记录位置
function
handleSelect
(
num
)
{
currentSelect
=
num
}
// 点击input记录位置
function
handleInput
(
num
)
{
currentNum
=
num
;
}
// 删除list item
function
removeListItem
(
index
)
{
let
evryGroup
=
$
(
'#addClassify2'
).
find
(
$
(
'.addAvatarItem'
))
...
...
@@ -549,7 +592,7 @@
})
})
let
idList
=
listData
.
filter
(
item
=>
item
.
recommendBindId
==
undefine
d
)
let
idList
=
listData
.
filter
(
item
=>
!
item
.
recommendBindI
d
)
if
(
idList
.
length
>=
1
)
{
layer
.
msg
(
'推荐活动需填写完整'
)
...
...
@@ -571,7 +614,7 @@
}
// 添加dom同时,添加表单监听
function
createListenerSearch
(
index
)
{
function
createListenerSearch
(
index
)
{
// index 1 2 3
varObj
[
'listRemoteSearch'
+
index
]
=
new
searchSelect
(
`#listRemoteSearch
${
index
}
`
,
[],
function
(
val
)
{
searchAjax
(
val
,
index
)
...
...
@@ -579,9 +622,12 @@
}
function
searchAjax
(
val
,
index
)
{
function
searchAjax
(
val
,
index
)
{
// 1 2
let
_selectVal
=
$
(
"#listActiveType"
+
index
).
find
(
"option:selected"
).
val
()
// 当前子select val
console
.
log
(
'当前的list下啦'
,
$
(
"#listActiveType"
+
index
),
index
)
if
(
_selectVal
)
{
let
_params
=
{}
if
(
_selectVal
==
1
)
{
...
...
@@ -608,8 +654,6 @@
let
yan
=
res
.
value
||
[]
let
sp
=
res
.
data
||
[]
console
.
log
(
'_selectVal'
,
_selectVal
)
if
(
_selectVal
==
1
)
{
_data
=
nft
.
map
(
item
=>
{
// 组装返回nft数据
return
{
id
:
item
.
spuId
,
value
:
item
.
spuName
}
...
...
liquidnet-bus-service/liquidnet-service-adam/liquidnet-service-adam-impl/src/main/java/com/liquidnet/service/adam/service/impl/AdamUserServiceImpl.java
View file @
63c66cdd
...
...
@@ -80,9 +80,9 @@ public class AdamUserServiceImpl implements IAdamUserService {
String
[]
mobileLocateArr
=
adamRdmService
.
getMobileLocateArr
(
mobile
);
toMqSqls
.
add
(
SqlMapping
.
get
(
"adam_user_mobile_locate.add"
));
String
cliIpAddr
=
CurrentUtil
.
getCliIpAddr
();
String
headerCliSource
=
CurrentUtil
.
getHeaderCliSource
();
if
(
null
!=
mobileLocateArr
&&
mobileLocateArr
.
length
>
0
)
{
String
cliIpAddr
=
CurrentUtil
.
getCliIpAddr
();
String
headerCliSource
=
CurrentUtil
.
getHeaderCliSource
();
initUserMobileLocateObjs
.
add
(
new
Object
[]{
userInfoVo
.
getUid
(),
mobile
,
1
,
mobileLocateArr
[
0
],
mobileLocateArr
[
1
],
mobileLocateArr
[
2
],
mobileLocateArr
[
3
],
mobileLocateArr
[
4
],
...
...
@@ -90,6 +90,12 @@ public class AdamUserServiceImpl implements IAdamUserService {
});
userInfoVo
.
setProvince
(
mobileLocateArr
[
0
]);
userInfoVo
.
setCity
(
mobileLocateArr
[
1
]);
}
else
{
initUserMobileLocateObjs
.
add
(
new
Object
[]{
userInfoVo
.
getUid
(),
mobile
,
1
,
null
,
null
,
null
,
null
,
null
,
mobile
,
cliIpAddr
,
headerCliSource
,
now
,
cliIpAddr
,
headerCliSource
,
now
,
now
});
}
long
s
=
System
.
currentTimeMillis
();
...
...
@@ -139,9 +145,9 @@ public class AdamUserServiceImpl implements IAdamUserService {
String
[]
mobileLocateArr
=
adamRdmService
.
getMobileLocateArr
(
param
.
getMobile
());
toMqSqls
.
add
(
SqlMapping
.
get
(
"adam_user_mobile_locate.add"
));
String
cliIpAddr
=
CurrentUtil
.
getCliIpAddr
();
String
headerCliSource
=
CurrentUtil
.
getHeaderCliSource
();
if
(
null
!=
mobileLocateArr
&&
mobileLocateArr
.
length
>
0
)
{
String
cliIpAddr
=
CurrentUtil
.
getCliIpAddr
();
String
headerCliSource
=
CurrentUtil
.
getHeaderCliSource
();
initUserMobileLocateObjs
.
add
(
new
Object
[]{
registerUid
,
userInfoVo
.
getMobile
(),
1
,
mobileLocateArr
[
0
],
mobileLocateArr
[
1
],
mobileLocateArr
[
2
],
mobileLocateArr
[
3
],
mobileLocateArr
[
4
],
...
...
@@ -149,6 +155,12 @@ public class AdamUserServiceImpl implements IAdamUserService {
});
userInfoVo
.
setProvince
(
mobileLocateArr
[
0
]);
userInfoVo
.
setCity
(
mobileLocateArr
[
1
]);
}
else
{
initUserMobileLocateObjs
.
add
(
new
Object
[]{
registerUid
,
userInfoVo
.
getMobile
(),
1
,
null
,
null
,
null
,
null
,
null
,
userInfoVo
.
getMobile
(),
cliIpAddr
,
headerCliSource
,
now
,
cliIpAddr
,
headerCliSource
,
now
,
now
});
}
adamRdmService
.
setUserInfoVoByUid
(
registerUid
,
userInfoVo
);
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/service/impl/KylinArActiveServiceImpl.java
View file @
63c66cdd
...
...
@@ -26,24 +26,25 @@ public class KylinArActiveServiceImpl implements IKylinArActiveService {
private
DataUtils
dataUtils
;
@Autowired
private
QueueUtils
queueUtils
;
@Override
public
ResponseDto
exchange
(
String
code
,
String
uid
)
{
//1 查看是否有兑换码
KylinTicketActive
kylinTicketActive
=
dataUtils
.
getArTicket
(
code
);
if
(
null
==
kylinTicketActive
)
{
KylinTicketActive
kylinTicketActive
=
dataUtils
.
getArTicket
(
code
);
if
(
null
==
kylinTicketActive
)
{
return
ResponseDto
.
failure
(
"请输入正确的激活码"
);
}
//2、查看该用户是否绑定
if
(
null
!=
dataUtils
.
getUserStatus
(
uid
))
{
if
(
null
!=
dataUtils
.
getUserStatus
(
uid
))
{
return
ResponseDto
.
failure
(
"该用户已激活"
);
}
//判断是否用过卷了
if
(
kylinTicketActive
.
getState
()==
2
)
{
if
(
kylinTicketActive
.
getState
()
==
2
)
{
return
ResponseDto
.
failure
(
"该激活码已经兑换"
);
}
//开始绑定
//修改redis缓存
dataUtils
.
setUser
(
uid
,
"1"
);
dataUtils
.
setUser
(
uid
,
"1"
);
kylinTicketActive
.
setState
(
2
);
dataUtils
.
setArTicket
(
kylinTicketActive
);
//队列 修改券的状态。
...
...
@@ -52,7 +53,7 @@ public class KylinArActiveServiceImpl implements IKylinArActiveService {
SqlMapping
.
get
(
"kylin_ar_ticket.update"
,
new
Object
[]{
2
,
uid
,
LocalDateTime
.
now
(),
code
2
,
uid
,
LocalDateTime
.
now
(),
code
}
));
dataUtils
.
incrArCode
();
...
...
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