记得上下班打卡 | 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
5e2f4f61
Commit
5e2f4f61
authored
Dec 23, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交 sweet 二维码 admin sweet
parent
8206e3ed
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
16 deletions
+24
-16
details.html
...in/resources/templates/zhengzai/sweet/qrCode/details.html
+14
-13
SweetQrCodeController.java
...idnet/service/sweet/controller/SweetQrCodeController.java
+1
-1
SweetActiveQrCodeServiceImpl.java
...vice/sweet/service/impl/SweetActiveQrCodeServiceImpl.java
+9
-2
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/sweet/qrCode/details.html
View file @
5e2f4f61
...
...
@@ -41,19 +41,20 @@
field
:
'showNum'
,
title
:
'展示次数'
},
{
field
:
'readNum'
,
title
:
'访问次数'
},
{
title
:
'操作'
,
align
:
'center'
,
formatter
:
function
(
value
,
row
,
index
)
{
var
actions
=
[];
actions
.
push
(
'<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.edit(
\'
'
+
row
.
mid
+
'
\'
)"><i class="fa fa-edit"></i>编辑</a> '
);
return
actions
.
join
(
''
);
}
}]
// {
// field: 'readNum',
// title: '访问次数'
// }
// , {
// title: '操作',
// align: 'center',
// formatter: function (value, row, index) {
// var actions = [];
// actions.push('
<
a
class
=
"btn btn-success btn-xs"
href
=
"javascript:void(0)"
onclick
=
"$.operate.edit(
\
'' + row.mid + '
\
')"
><
i
class
=
"fa fa-edit"
><
/i>编辑</
a
>
');
// return actions.join('');
// }
// }
]
};
$.table.init(options);
});
...
...
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/controller/SweetQrCodeController.java
View file @
5e2f4f61
...
...
@@ -29,7 +29,7 @@ public class SweetQrCodeController {
private
ISweetActiveTypeService
sweetActiveTypeService
;
@GetMapping
(
"qrCode/type"
)
@ApiOperation
(
"获取
答题记录详情
"
)
@ApiOperation
(
"获取
二维码url
"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
dataType
=
"int"
,
name
=
"type"
,
value
=
"活动type"
,
required
=
true
)
})
...
...
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/service/impl/SweetActiveQrCodeServiceImpl.java
View file @
5e2f4f61
...
...
@@ -19,8 +19,12 @@ public class SweetActiveQrCodeServiceImpl implements ISweetActiveTypeService {
public
String
getRandomQrCode
(
int
type
)
{
List
<
SweetQrCode
>
sweetQrCodeList
=
redisDataUtils
.
getQrCodeTypeNum
(
type
);
//SweetQrCodeList
SweetQrCode
bean
=
judgeRandom
(
type
,
sweetQrCodeList
);
redisDataUtils
.
incrQrCodeShowNum
(
type
,
bean
.
getQrCodeId
());
//访问数量
return
bean
.
getUrl
();
if
(
bean
==
null
)
{
return
""
;
}
else
{
redisDataUtils
.
incrQrCodeShowNum
(
type
,
bean
.
getQrCodeId
());
//访问数量
return
bean
.
getUrl
();
}
}
...
...
@@ -31,6 +35,9 @@ public class SweetActiveQrCodeServiceImpl implements ISweetActiveTypeService {
int
maxNum
=
redisDataUtils
.
getQrCodeMaxNum
(
type
);
if
(
showNum
>=
maxNum
)
{
//超过阈值
sweetQrCodeList
.
remove
(
randomSwat
);
if
(
sweetQrCodeList
.
size
()
==
0
)
{
return
null
;
}
return
judgeRandom
(
type
,
sweetQrCodeList
);
}
else
{
redisDataUtils
.
setQrCodeDetails
(
type
,
sweetQrCodeList
);
...
...
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