Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
Details
Activity
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
haoban3.0
haoban-manage3.0
Commits
8729fa6e
Commit
8729fa6e
authored
Mar 24, 2021
by
fudahua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
会员的好友导购列表
parent
9259b01b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
5 deletions
+41
-5
ApplicationController.java
...c/haoban/manage/web/controller/ApplicationController.java
+12
-5
SdkVersionLimitVo.java
.../java/com/gic/haoban/manage/web/vo/SdkVersionLimitVo.java
+29
-0
No files found.
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/ApplicationController.java
View file @
8729fa6e
...
...
@@ -7,6 +7,7 @@ import java.util.List;
import
java.util.stream.Collectors
;
import
com.gic.haoban.common.utils.StringUtil
;
import
com.gic.haoban.manage.web.vo.SdkVersionLimitVo
;
import
com.gic.redis.data.util.RedisUtil
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -76,27 +77,33 @@ public class ApplicationController extends WebBaseController{
if
(
StringUtils
.
isBlank
(
skdVersion
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
SdkVersionLimitVo
sdkVersionLimitVo
=
new
SdkVersionLimitVo
();
Object
cache
=
RedisUtil
.
getCache
(
SDKVERSION_KEY
);
if
(
null
==
cache
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
true
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
sdkVersionLimitVo
);
}
String
limitSdkVersion
=
cache
.
toString
();
sdkVersionLimitVo
.
setLimitSdkVersion
(
limitSdkVersion
);
String
[]
limitSdk
=
StringUtils
.
split
(
limitSdkVersion
,
"."
);
String
[]
versionSplit
=
StringUtils
.
split
(
skdVersion
,
"."
);
int
checkFlag
=
checkNum
(
Integer
.
valueOf
(
limitSdk
[
0
]),
Integer
.
valueOf
(
versionSplit
[
0
]));
if
(
checkFlag
!=
0
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
checkFlag
>
0
?
true
:
false
);
sdkVersionLimitVo
.
setCheckFlag
(
checkFlag
>
0
?
true
:
false
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
sdkVersionLimitVo
);
}
checkFlag
=
checkNum
(
Integer
.
valueOf
(
limitSdk
[
1
]),
Integer
.
valueOf
(
versionSplit
[
1
]));
if
(
checkFlag
!=
0
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
checkFlag
>
0
?
true
:
false
);
sdkVersionLimitVo
.
setCheckFlag
(
checkFlag
>
0
?
true
:
false
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
sdkVersionLimitVo
);
}
checkFlag
=
checkNum
(
Integer
.
valueOf
(
limitSdk
[
2
]),
Integer
.
valueOf
(
versionSplit
[
2
]));
if
(
checkFlag
!=
0
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
checkFlag
>
0
?
true
:
false
);
sdkVersionLimitVo
.
setCheckFlag
(
checkFlag
>
0
?
true
:
false
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
sdkVersionLimitVo
);
}
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
true
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
sdkVersionLimitVo
);
}
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/vo/SdkVersionLimitVo.java
0 → 100644
View file @
8729fa6e
package
com
.
gic
.
haoban
.
manage
.
web
.
vo
;
import
java.io.Serializable
;
/**
* Created 2021/3/24.
*
* @author hua
*/
public
class
SdkVersionLimitVo
implements
Serializable
{
private
String
limitSdkVersion
;
private
boolean
checkFlag
=
true
;
public
String
getLimitSdkVersion
()
{
return
limitSdkVersion
;
}
public
void
setLimitSdkVersion
(
String
limitSdkVersion
)
{
this
.
limitSdkVersion
=
limitSdkVersion
;
}
public
boolean
isCheckFlag
()
{
return
checkFlag
;
}
public
void
setCheckFlag
(
boolean
checkFlag
)
{
this
.
checkFlag
=
checkFlag
;
}
}
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