no message
Showing
2 changed files
with
8 additions
and
6 deletions
... | @@ -59,12 +59,12 @@ public class ScoreLogInfoController { | ... | @@ -59,12 +59,12 @@ public class ScoreLogInfoController { |
59 | if (scoreLogInfo.getScore() > 30000) { | 59 | if (scoreLogInfo.getScore() > 30000) { |
60 | return null; | 60 | return null; |
61 | } | 61 | } |
62 | System.out.println("sign ---------------->"+sign); | 62 | System.out.println("sign ---------------->" + sign); |
63 | System.out.println("score ---------------->"+scoreLogInfo.getScore()); | 63 | System.out.println("score ---------------->" + scoreLogInfo.getScore()); |
64 | System.out.println("signTime ---------------->"+signTime); | 64 | System.out.println("signTime ---------------->" + signTime); |
65 | String forSign = MD5Utils.hash(keySecret + scoreLogInfo.getScore() + keySecret + signTime); | 65 | String forSign = MD5Utils.hash(keySecret + scoreLogInfo.getScore() + keySecret + signTime); |
66 | 66 | ||
67 | System.out.println("system sign ---------------->"+forSign); | 67 | System.out.println("system sign ---------------->" + forSign); |
68 | if (!forSign.equals(sign)) { | 68 | if (!forSign.equals(sign)) { |
69 | return null; | 69 | return null; |
70 | } | 70 | } |
... | @@ -124,6 +124,8 @@ public class ScoreLogInfoController { | ... | @@ -124,6 +124,8 @@ public class ScoreLogInfoController { |
124 | ConfigInfo configInfo = configInfoMapper.get(); | 124 | ConfigInfo configInfo = configInfoMapper.get(); |
125 | Long maxTime = configInfo.getMaxTime(); | 125 | Long maxTime = configInfo.getMaxTime(); |
126 | long lastTime = maxTime - l + s; | 126 | long lastTime = maxTime - l + s; |
127 | if (lastTime < 0) | ||
128 | lastTime = 0; | ||
127 | return builder.success(true).code("2000").content(lastTime).create(); | 129 | return builder.success(true).code("2000").content(lastTime).create(); |
128 | } | 130 | } |
129 | 131 | ... | ... |
... | @@ -31,7 +31,7 @@ | ... | @@ -31,7 +31,7 @@ |
31 | select(@i:= @i+ 1) r, | 31 | select(@i:= @i+ 1) r, |
32 | a.* | 32 | a.* |
33 | from( | 33 | from( |
34 | select openid, min(score) score, count(*) num, min(nickname) nickname, min(headimgurl) nickname | 34 | select openid, min(score) score, count(*) num, min(nickname) nickname, min(headimgurl) headimgurl |
35 | from t_kmr_score_log_info | 35 | from t_kmr_score_log_info |
36 | where status= 1 | 36 | where status= 1 |
37 | GROUP BY openid) a, | 37 | GROUP BY openid) a, |
... | @@ -46,7 +46,7 @@ | ... | @@ -46,7 +46,7 @@ |
46 | from( | 46 | from( |
47 | select(@i:= @i+ 1) r, a.* | 47 | select(@i:= @i+ 1) r, a.* |
48 | from( | 48 | from( |
49 | select openid, min(score) score, count(*) num, min(nickname) nickname, min(headimgurl) nickname | 49 | select openid, min(score) score, count(*) num, min(nickname) nickname, min(headimgurl) headimgurl |
50 | from t_kmr_score_log_info | 50 | from t_kmr_score_log_info |
51 | where status= 1 | 51 | where status= 1 |
52 | GROUP BY openid) a,( | 52 | GROUP BY openid) a,( | ... | ... |
-
Please register or sign in to post a comment