Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Administrator
/
kmr-h5-java
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
aec184ec
authored
2017-12-06 11:06:41 +0800
by
joe
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
分享增加次数
1 parent
c5a6e046
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
kmr_dp_HDP/src/main/java/com/example/controller/ScoreLogInfoController.java
kmr_dp_HDP/src/main/java/com/example/service/ScoreLogInfoServiceImpl.java
kmr_dp_HDP/src/main/java/com/example/controller/ScoreLogInfoController.java
View file @
aec184e
...
...
@@ -35,6 +35,8 @@ import java.util.Map;
@RestController
public
class
ScoreLogInfoController
{
public
static
Integer
share_time
=
1
;
final
String
keySecret
=
"33974941d83111e78cda7cd30abdaa16"
;
private
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
...
...
@@ -118,8 +120,8 @@ public class ScoreLogInfoController {
MessageEntity
.
Builder
builder
=
new
MessageEntity
.
Builder
(
request
);
long
l
=
this
.
scoreLogInfoService
.
countToDay
(
openid
);
long
s
=
this
.
scoreLogInfoService
.
shareToday
(
openid
);
if
(
s
>
5
)
{
s
=
5
;
if
(
s
>
share_time
)
{
s
=
share_time
;
}
ConfigInfo
configInfo
=
configInfoMapper
.
get
();
Long
maxTime
=
configInfo
.
getMaxTime
();
...
...
@@ -200,4 +202,11 @@ public class ScoreLogInfoController {
return
builder
.
success
(
true
).
code
(
"2000"
).
create
();
}
@RequestMapping
(
"/setShareTime"
)
public
MessageEntity
setShareTime
(
HttpServletRequest
request
,
@RequestParam
Integer
shareTime
)
{
if
(
shareTime
!=
null
&&
shareTime
>
0
)
ScoreLogInfoController
.
share_time
=
shareTime
;
return
null
;
}
}
\ No newline at end of file
...
...
kmr_dp_HDP/src/main/java/com/example/service/ScoreLogInfoServiceImpl.java
View file @
aec184e
package
com
.
example
.
service
;
import
com.example.controller.ScoreLogInfoController
;
import
com.example.mapper.ConfigInfoMapper
;
import
com.example.mapper.ScoreLogInfoMapper
;
import
com.example.mapper.ShareLogMapper
;
...
...
@@ -48,8 +49,8 @@ public class ScoreLogInfoServiceImpl implements ScoreLogInfoService {
}
else
{
long
count
=
this
.
countToDay
(
scoreLogInfo
.
getOpenid
());
long
s
=
this
.
shareToday
(
scoreLogInfo
.
getOpenid
());
if
(
s
>
5
)
{
s
=
5
;
if
(
s
>
ScoreLogInfoController
.
share_time
)
{
s
=
ScoreLogInfoController
.
share_time
;
}
if
(
count
-
s
>=
maxTime
){
code
=
"9902"
;
...
...
Please
register
or
sign in
to post a comment