记得上下班打卡 | 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
57009291
Commit
57009291
authored
Jul 11, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wf hjc ajb
parent
1027157b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
386 additions
and
0 deletions
+386
-0
BusinessType.java
...com/liquidnet/client/admin/common/enums/BusinessType.java
+5
-0
GoblinGagoController.java
.../web/controller/zhengzai/goblin/GoblinGagoController.java
+99
-0
remote-search-nft.js
...min-web/src/main/resources/static/js/remote-search-nft.js
+169
-0
gago.html
...c/main/resources/templates/zhengzai/goblin/gago/gago.html
+104
-0
GoblinGageServiceImpl.java
...n/zhengzai/goblin/service/impl/GoblinGageServiceImpl.java
+9
-0
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-common/src/main/java/com/liquidnet/client/admin/common/enums/BusinessType.java
View file @
57009291
...
...
@@ -139,4 +139,9 @@ public enum BusinessType
* 修改
*/
PERFORMANCE_SAVE
,
/**
* 内部操作
*/
INNER_OPERATION
,
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/goblin/GoblinGagoController.java
0 → 100644
View file @
57009291
package
com
.
liquidnet
.
client
.
admin
.
web
.
controller
.
zhengzai
.
goblin
;
import
com.liquidnet.client.admin.common.annotation.Log
;
import
com.liquidnet.client.admin.common.core.controller.BaseController
;
import
com.liquidnet.client.admin.common.core.domain.AjaxResult
;
import
com.liquidnet.client.admin.common.enums.BusinessType
;
import
com.liquidnet.client.admin.zhengzai.goblin.service.IGoblinCommonService
;
import
com.liquidnet.common.cache.redis.util.RedisDataSourceUtil
;
import
com.liquidnet.service.adam.constant.AdamRedisConst
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.goblin.constant.GoblinRedisConst
;
import
com.liquidnet.service.goblin.constant.NftAccStatusEnum
;
import
com.liquidnet.service.goblin.dto.GoblinStoreSearchDto
;
import
com.liquidnet.service.goblin.dto.GoblinUserNftAccInfoVo
;
import
com.liquidnet.service.kylin.dao.PerformanceTitleDao
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
@Api
(
tags
=
"商铺公共方法"
)
@Controller
@RequestMapping
(
"goblin/gago"
)
public
class
GoblinGagoController
extends
BaseController
{
@Autowired
RedisDataSourceUtil
redisDataSourceUtil
;
private
final
String
prefix
=
"zhengzai/goblin/gago"
;
@GetMapping
()
public
String
mainHtml
()
{
return
prefix
+
"/gago"
;
}
@Log
(
title
=
"判断手机号是否开通数字账号"
,
businessType
=
BusinessType
.
INNER_OPERATION
)
@GetMapping
(
"nftAccount"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
name
=
"userMobile"
,
value
=
"手机号"
),
})
@ResponseBody
public
AjaxResult
storeSearch
(
String
userMobile
)
{
AjaxResult
ajaxResult
=
AjaxResult
.
success
();
Object
obj1
=
redisDataSourceUtil
.
getRedisAdamUtil
().
get
(
AdamRedisConst
.
IDENTITY_MOBILE
.
concat
(
userMobile
));
if
(
obj1
==
null
)
{
return
AjaxResult
.
error
(
"账号不存在"
);
}
String
uid
=
(
String
)
obj1
;
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_NFT_NUM_ACCOUNT_INFO
.
concat
(
uid
);
Object
obj2
=
redisDataSourceUtil
.
getRedisGoblinUtil
().
get
(
redisKey
);
if
(
obj2
==
null
)
{
return
AjaxResult
.
error
(
"账号未开通数字账号"
);
}
GoblinUserNftAccInfoVo
nftAccInfoVo
=
(
GoblinUserNftAccInfoVo
)
obj2
;
if
(!
NftAccStatusEnum
.
StatusAcc
.
SUCCESS
.
getCode
().
equals
(
nftAccInfoVo
.
getCode
()))
{
return
AjaxResult
.
error
(
"账号未开通数字账号"
);
}
ajaxResult
.
put
(
"uid"
,
uid
);
return
ajaxResult
;
}
@Log
(
title
=
"生成兑换订单"
,
businessType
=
BusinessType
.
INNER_OPERATION
)
@PostMapping
(
value
=
"/exchangeNumNftOrder"
)
@ResponseBody
public
AjaxResult
listByStatus
(
@RequestParam
(
value
=
"skuId"
)
String
skuId
,
@RequestParam
(
value
=
"nftNum"
)
String
nftNum
,
@RequestParam
(
value
=
"uid"
)
String
uid
)
{
// List<PerformanceTitleDao> result = kylinPerformancesService.getListByStatus(status,title);
// AjaxResult ajax = new AjaxResult();
// ajax.put("value", result);
// return ajax;
return
null
;
}
// @Log(title = "搜索NFT SPU", businessType = BusinessType.INNER_OPERATION)
// @GetMapping("search_spu")
// @ApiImplicitParams({
// @ApiImplicitParam(type = "form", required = true, name = "name", value = "spu名称"),
// })
// @ResponseBody
// public AjaxResult storeSearch(String name, List<String> status) {
// return ResponseDto.success(goblinCommonService.storeSearch(name, status));
// }
//
// @Log(title = "搜索NFT SKU", businessType = BusinessType.INNER_OPERATION)
// @GetMapping("search_sku")
// @ApiImplicitParams({
// @ApiImplicitParam(type = "form", required = true, name = "name", value = "sku名称"),
// })
// @ResponseBody
// public AjaxResult storeSearch(String name, List<String> status) {
// return ResponseDto.success(goblinCommonService.storeSearch(name, status));
// }
/** ------------------------------------------------------------------------ **/
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/static/js/remote-search-nft.js
0 → 100644
View file @
57009291
;(
function
(
$
)
{
//这里放入插件代码
var
RemoteSearchPerformance
=
function
(
element
,
options
)
{
this
.
$element
=
$
(
element
);
this
.
options
=
$
.
extend
(
true
,
{},
$
.
fn
.
remoteSearchPerformance
.
defaults
,
options
);
this
.
id
=
$
(
element
).
attr
(
'id'
);
this
.
ulID
=
'#'
+
this
.
id
+
'_ul'
;
this
.
ulFoucus
=
false
;
// Method overrides
this
.
render
=
this
.
options
.
render
||
this
.
render
;
this
.
select
=
this
.
options
.
select
||
this
.
select
;
this
.
ajax
=
$
.
extend
({},
$
.
fn
.
remoteSearchPerformance
.
defaults
.
ajax
,
this
.
options
.
ajax
);
this
.
listen
();
}
RemoteSearchPerformance
.
prototype
=
{
listen
:
function
()
{
this
.
$element
.
on
(
'blur'
,
$
.
proxy
(
this
.
blur
,
this
))
.
on
(
'keyup'
,
$
.
proxy
(
this
.
keyup
,
this
));
this
.
$element
.
parent
(
'div.remote_wrapper'
).
on
(
'click'
,
this
.
ulID
,
$
.
proxy
(
this
.
click
,
this
));
},
blur
:
function
(
e
)
{
var
that
=
this
;
e
.
stopPropagation
();
e
.
preventDefault
();
setTimeout
(
function
()
{
if
(
!
that
.
ulFoucus
)
{
that
.
$element
.
val
(
that
.
$element
.
attr
(
'data-name'
));
that
.
hide
();
}
},
150
)
},
keyup
:
function
(
e
)
{
e
.
stopPropagation
();
e
.
preventDefault
();
switch
(
e
.
keyCode
)
{
case
40
:
// down arrow
case
38
:
// up arrow
break
;
case
9
:
// tab
case
13
:
// enter
this
.
ajaxer
();
case
27
:
// escape
break
;
default
:
this
.
ajaxer
();
}
},
hide
:
function
()
{
$
(
this
.
ulID
).
remove
();
return
this
;
},
ajaxer
:
function
()
{
var
that
=
this
,
title
=
that
.
$element
.
val
();
// Query changed
that
.
title
=
title
;
// Cancel last timer if set
if
(
that
.
ajax
.
timerId
)
{
clearTimeout
(
that
.
ajax
.
timerId
);
that
.
ajax
.
timerId
=
null
;
}
// Query is good to send, set a timer
that
.
ajax
.
timerId
=
setTimeout
(
function
()
{
var
params
=
{
title
:
title
};
var
jAjax
=
(
that
.
ajax
.
method
===
"post"
)
?
$
.
post
:
$
.
get
;
jAjax
(
that
.
ajax
.
url
,
params
,
function
(
data
){
return
that
.
render
(
data
.
data
);
});
that
.
ajax
.
timerId
=
null
;
},
that
.
ajax
.
timeout
);
return
that
;
},
render
:
function
(
data
)
{
this
.
ulFoucus
=
false
;
var
liList
=
data
||
[];
var
num
=
this
.
_getNum
();
//添加 ul
if
(
$
(
this
.
ulID
).
length
==
0
)
{
this
.
$element
.
after
(
"<ul id='"
+
this
.
id
+
"_ul' class='remote_search remote_search_top'></ul>"
);
};
//添加li
var
str
=
""
;
if
(
num
)
{
if
(
liList
.
length
)
{
for
(
var
i
=
0
;
i
<
liList
.
length
;
i
++
)
{
str
+=
"<li data-id='"
+
liList
[
i
].
spuId
+
"' data-name='"
+
liList
[
i
].
spuName
+
"' title='"
+
liList
[
i
].
spuName
+
"' value='"
+
liList
[
i
].
spuId
+
"'>"
+
liList
[
i
].
spuName
+
"</li>"
;
}
}
else
{
str
=
"<li data-id='' data-name=''>搜索无数据</li>"
}
}
else
{
this
.
$element
.
attr
(
'data-name'
,
""
);
this
.
$element
.
attr
(
'data-id'
,
""
);
}
$
(
this
.
ulID
).
html
(
str
);
var
bodyHeight
=
$
(
document
.
body
).
height
();
var
offsetTop
=
this
.
$element
.
offset
().
top
;
var
height
=
$
(
this
.
ulID
).
outerHeight
(
true
);
if
(
offsetTop
+
height
>
bodyHeight
){
$
(
this
.
ulID
).
addClass
(
'remote_search_bottom'
).
removeClass
(
'remote_search_top'
);
}
else
{
$
(
this
.
ulID
).
addClass
(
'remote_search_top'
).
removeClass
(
'remote_search_bottom'
);
}
return
this
;
},
click
:
function
(
e
)
{
e
.
stopPropagation
();
e
.
preventDefault
();
var
dataName
=
$
(
e
.
target
).
attr
(
'data-name'
);
var
dataID
=
$
(
e
.
target
).
attr
(
'data-id'
);
this
.
$element
.
val
(
dataName
);
this
.
$element
.
attr
(
'data-name'
,
dataName
);
this
.
$element
.
attr
(
'data-id'
,
dataID
);
this
.
options
.
chose
(
dataName
,
dataID
);
this
.
ulFoucus
=
true
;
return
this
.
hide
();
},
_getNum
:
function
(){
return
this
.
$element
.
val
().
length
;
}
}
$
.
fn
.
remoteSearchPerformance
=
function
(
option
)
{
return
this
.
each
(
function
()
{
var
$this
=
$
(
this
),
data
=
$this
.
data
(
'remoteSearchPerformance'
),
options
=
typeof
option
===
'object'
&&
option
;
if
(
!
data
)
{
$this
.
data
(
'remoteSearchPerformance'
,
(
data
=
new
RemoteSearchPerformance
(
this
,
options
)));
}
if
(
typeof
option
===
'string'
)
{
data
[
option
]();
}
});
}
$
.
fn
.
remoteSearchPerformance
.
defaults
=
{
hiddenVal
:
''
,
chose
:
function
()
{
},
ajax
:
{
url
:
null
,
timeout
:
300
,
method
:
'get'
,
timerId
:
null
},
success
:
function
(
res
){
}
}
$
.
fn
.
remoteSearchPerformance
.
Constructor
=
RemoteSearchPerformance
;
})(
jQuery
);
\ No newline at end of file
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/goblin/gago/gago.html
0 → 100644
View file @
57009291
<!DOCTYPE html>
<html
lang=
"zh"
xmlns:th=
"http://www.thymeleaf.org"
>
<head>
<th:block
th:include=
"include :: header('gago')"
/>
</head>
<style>
td
{
horiz-align
:
center
;
text-align
:
left
;
padding
:
10px
;
}
</style>
<body
class=
"white-bg"
>
<div
class=
"wrapper wrapper-content animated fadeInRight ibox-content"
>
<form
class=
"form-horizontal m"
id=
"userMobile-form"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label is-required"
>
用户手机号码:
</label>
<div
class=
"col-sm-8"
>
<input
type=
"number"
id=
"userMobile"
name=
"userMobile"
class=
"form-control"
>
<input
id=
"userId"
name=
"userId"
class=
"form-control"
type=
"hidden"
readonly
>
</div>
<button
type=
"button"
class=
"btn btn-w-m btn-success"
onclick=
"getMobileIsAudit()"
>
验证手机号
</button>
</div>
</form>
<form
class=
"form-horizontal m"
id=
"nft-form"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label is-required"
>
数字藏品名称:
</label>
<div
class=
"col-sm-8"
>
<input
id=
"skuId"
name=
"skuId"
th:value=
"*{skuId}"
type=
"hidden"
>
<div
class=
"remote_wrapper"
style=
"position: relative;"
>
<input
name=
"ids"
type=
"hidden"
>
<input
type=
"text"
id=
"remoteSearch"
>
</div>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label is-required"
>
生成序号:
</label>
<div
class=
"col-sm-8"
>
<input
type=
"number"
id=
"nftNum"
name=
"nftNum"
class=
"form-control"
>
</div>
</div>
</form>
<button
type=
"button"
class=
"btn btn-w-m btn-success"
onclick=
"ce()"
>
生成订单
</button>
</div>
<th:block
th:include=
"include :: footer"
/>
<th:block
th:include=
"include :: bootstrap-suggest-js"
/>
<script
th:src=
"@{/js/remote-search-nft.js}"
></script>
<script
th:inline=
"javascript"
>
var
prefix
=
ctx
+
"goblin/gago"
;
function
getMobileIsAudit
()
{
var
mobile
=
$
(
"#userMobile"
).
val
();
$
(
"#userId"
).
val
(
''
);
$
.
operate
.
get
(
prefix
+
"/nftAccount?userMobile="
+
mobile
,
function
(
res
)
{
uid
=
res
.
uid
;
$
(
"#userId"
).
val
(
uid
);
});
}
$
(
'#remoteSearch'
).
remoteSearchPerformance
({
ajax
:
{
url
:
"/goblin/common/sku?type=1"
,
type
:
"get"
},
chose
:
function
(
text
,
val
)
{
$
(
"#skuId"
).
val
(
val
);
},
success
:
function
()
{
}
})
function
ce
()
{
var
skuId
=
$
(
"#skuId"
).
val
();
var
nftNum
=
$
(
"#nftNum"
).
val
();
var
uid
=
$
(
"#userId"
).
val
();
if
(
uid
==
""
||
nftNum
==
""
||
uid
==
""
)
{
alert
(
"请完整填写信息"
)
}
else
{
var
param
=
{
skuId
:
skuId
,
nftNum
:
nftNum
,
uid
:
uid
};
$
.
operate
.
post
(
prefix
+
"/exchangeNumNftOrder"
,
param
,
function
(
res
)
{
});
// alert("uid =" + uid + " skuId=" + skuId + " nftNum=" + nftNum)
}
}
</script>
</body>
</html>
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/service/impl/GoblinGageServiceImpl.java
0 → 100644
View file @
57009291
package
com
.
liquidnet
.
client
.
admin
.
zhengzai
.
goblin
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.liquidnet.client.admin.zhengzai.goblin.service.IGoblinFrontSelectGoodsService
;
import
com.liquidnet.service.goblin.entity.GoblinFrontSelectGoods
;
import
com.liquidnet.service.goblin.mapper.GoblinFrontSelectGoodsMapper
;
public
class
GoblinGageServiceImpl
extends
ServiceImpl
<
GoblinFrontSelectGoodsMapper
,
GoblinFrontSelectGoods
>
implements
IGoblinFrontSelectGoodsService
{
}
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