Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
open-source
/
open-platform-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit c9736f7f
authored
Dec 17, 2020
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
完成基本开发
1 parent
4482576a
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
21 additions
and
58 deletions
src/main/java/com/glsx/controller/AdMgrController.java
src/main/java/com/glsx/controller/ApiCallMgrController.java
src/main/java/com/glsx/controller/ApiMgrController.java
src/main/java/com/glsx/controller/CustomerMgrController.java
src/main/java/com/glsx/controller/DeviceMgrController.java
src/main/java/com/glsx/controller/UserMgrController.java
src/main/java/com/glsx/filter/CORSFilter.java
src/main/resources/config/application.properties
src/main/java/com/glsx/controller/AdMgrController.java
View file @
c9736f7
...
...
@@ -3,7 +3,7 @@ package com.glsx.controller;
import
cn.com.glsx.openplatform.model.PlatformAd
;
import
cn.com.glsx.openplatform.service.AdMgrService
;
import
cn.com.glsx.openplatform.vo.R
;
import
c
om.github.pagehelper
.Page
;
import
c
n.hutool.db
.Page
;
import
com.github.pagehelper.PageHelper
;
import
org.oreframework.web.ui.Pagination
;
import
org.slf4j.Logger
;
...
...
@@ -30,13 +30,8 @@ public class AdMgrController {
@RequestMapping
(
value
=
"/getAdMgrList"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
R
getAdMgrList
(
Pagination
pagination
)
{
//PageHelper注入分页和要分页的查询之前不能有其它查询,不然分页到第一个查询上面
Page
<
PlatformAd
>
page
=
PageHelper
.
startPage
(
pagination
.
getCurrentPage
(),
pagination
.
getPageSize
(),
true
);
List
<
PlatformAd
>
adMgrList
=
adMgrService
.
getAdMgrList
();
return
R
.
ok
().
putPageData
(
page
,
adMgrList
);
public
R
getAdMgrList
(
Page
page
)
{
return
adMgrService
.
getAdMgrList
(
page
);
}
@RequestMapping
(
value
=
"/insertAd"
,
method
=
RequestMethod
.
POST
)
...
...
src/main/java/com/glsx/controller/ApiCallMgrController.java
View file @
c9736f7
...
...
@@ -4,7 +4,7 @@ import cn.com.glsx.openplatform.model.PlatformApiCall;
import
cn.com.glsx.openplatform.service.ApiCallMgrService
;
import
cn.com.glsx.openplatform.vo.ApiCallVo
;
import
cn.com.glsx.openplatform.vo.R
;
import
c
om.github.pagehelper
.Page
;
import
c
n.hutool.db
.Page
;
import
com.github.pagehelper.PageHelper
;
import
org.oreframework.web.ui.Pagination
;
import
org.slf4j.Logger
;
...
...
@@ -31,12 +31,7 @@ public class ApiCallMgrController {
@RequestMapping
(
value
=
"/getApiCallMgrList"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
R
getApiCallMgrList
(
Pagination
pagination
,
ApiCallVo
apiCallVo
)
{
//PageHelper注入分页和要分页的查询之前不能有其它查询,不然分页到第一个查询上面
Page
<
PlatformApiCall
>
page
=
PageHelper
.
startPage
(
pagination
.
getCurrentPage
(),
pagination
.
getPageSize
(),
true
);
List
<
PlatformApiCall
>
apiMgrList
=
apiCallMgrService
.
getApiCallMgrList
(
apiCallVo
);
return
R
.
ok
().
putPageData
(
page
,
apiMgrList
);
public
R
getApiCallMgrList
(
Page
page
,
ApiCallVo
apiCallVo
)
{
return
apiCallMgrService
.
getApiCallMgrList
(
page
,
apiCallVo
);
}
}
src/main/java/com/glsx/controller/ApiMgrController.java
View file @
c9736f7
...
...
@@ -3,9 +3,8 @@ package com.glsx.controller;
import
cn.com.glsx.openplatform.model.PlatformApi
;
import
cn.com.glsx.openplatform.service.ApiMgrService
;
import
cn.com.glsx.openplatform.vo.R
;
import
c
om.github.pagehelper
.Page
;
import
c
n.hutool.db
.Page
;
import
com.github.pagehelper.PageHelper
;
import
org.oreframework.web.ui.Pagination
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -30,13 +29,8 @@ public class ApiMgrController {
@RequestMapping
(
value
=
"/getApiMgrList"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
R
getApiMgrList
(
Pagination
pagination
)
{
//PageHelper注入分页和要分页的查询之前不能有其它查询,不然分页到第一个查询上面
Page
<
PlatformApi
>
page
=
PageHelper
.
startPage
(
pagination
.
getCurrentPage
(),
pagination
.
getPageSize
(),
true
);
List
<
PlatformApi
>
apiMgrList
=
apiMgrService
.
getApiMgrList
();
return
R
.
ok
().
putPageData
(
page
,
apiMgrList
);
public
R
getApiMgrList
(
Page
page
)
{
return
apiMgrService
.
getApiMgrList
(
page
);
}
@RequestMapping
(
value
=
"/startandstop"
,
method
=
RequestMethod
.
GET
)
...
...
src/main/java/com/glsx/controller/CustomerMgrController.java
View file @
c9736f7
...
...
@@ -3,9 +3,8 @@ package com.glsx.controller;
import
cn.com.glsx.openplatform.model.PlatformCustomer
;
import
cn.com.glsx.openplatform.service.CustomerMgrService
;
import
cn.com.glsx.openplatform.vo.R
;
import
c
om.github.pagehelper
.Page
;
import
c
n.hutool.db
.Page
;
import
com.github.pagehelper.PageHelper
;
import
org.oreframework.web.ui.Pagination
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -30,13 +29,8 @@ public class CustomerMgrController {
@RequestMapping
(
value
=
"/getCustomerMgrList"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
R
getCustomerMgrList
(
Pagination
pagination
)
{
//PageHelper注入分页和要分页的查询之前不能有其它查询,不然分页到第一个查询上面
Page
<
PlatformCustomer
>
page
=
PageHelper
.
startPage
(
pagination
.
getCurrentPage
(),
pagination
.
getPageSize
(),
true
);
List
<
PlatformCustomer
>
customerMgrList
=
customerMgrService
.
getCustomerMgrList
();
return
R
.
ok
().
putPageData
(
page
,
customerMgrList
);
public
R
getCustomerMgrList
(
Page
page
)
{
return
customerMgrService
.
getCustomerMgrList
(
page
);
}
@RequestMapping
(
value
=
"/reset"
,
method
=
RequestMethod
.
GET
)
...
...
src/main/java/com/glsx/controller/DeviceMgrController.java
View file @
c9736f7
...
...
@@ -3,13 +3,11 @@ package com.glsx.controller;
import
java.util.HashMap
;
import
java.util.List
;
import
cn.com.glsx.openplatform.model.PlatformDevice
;
import
cn.com.glsx.openplatform.service.DeviceMgrService
;
import
cn.com.glsx.openplatform.vo.DeviceVo
;
import
cn.com.glsx.openplatform.vo.R
;
import
c
om.github.pagehelper
.Page
;
import
c
n.hutool.db
.Page
;
import
com.github.pagehelper.PageHelper
;
import
org.oreframework.web.ui.Pagination
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -32,14 +30,8 @@ public class DeviceMgrController {
@RequestMapping
(
value
=
"/getDeviceMgrList"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
R
getDeviceMgrList
(
Pagination
pagination
,
DeviceVo
deviceVo
)
{
//PageHelper注入分页和要分页的查询之前不能有其它查询,不然分页到第一个查询上面
Page
<
PlatformDevice
>
page
=
PageHelper
.
startPage
(
pagination
.
getCurrentPage
(),
pagination
.
getPageSize
(),
true
);
List
<
PlatformDevice
>
deviceMgrList
=
deviceMgrService
.
getDeviceMgrList
(
deviceVo
);
return
R
.
ok
().
putPageData
(
page
,
deviceMgrList
);
public
R
getDeviceMgrList
(
Page
page
,
DeviceVo
deviceVo
)
{
return
deviceMgrService
.
getDeviceMgrList
(
page
,
deviceVo
);
}
@RequestMapping
(
value
=
"/getDropDownOptions"
,
method
=
RequestMethod
.
GET
)
...
...
src/main/java/com/glsx/controller/UserMgrController.java
View file @
c9736f7
...
...
@@ -6,9 +6,8 @@ import cn.com.glsx.openplatform.model.PlatformUser;
import
cn.com.glsx.openplatform.service.UserMgrService
;
import
cn.com.glsx.openplatform.vo.R
;
import
cn.com.glsx.openplatform.vo.UserVo
;
import
c
om.github.pagehelper
.Page
;
import
c
n.hutool.db
.Page
;
import
com.github.pagehelper.PageHelper
;
import
org.oreframework.web.ui.Pagination
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -31,14 +30,8 @@ public class UserMgrController {
@RequestMapping
(
value
=
"/getUserMgrList"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
R
getUserMgrList
(
Pagination
pagination
,
UserVo
userVo
)
{
//PageHelper注入分页和要分页的查询之前不能有其它查询,不然分页到第一个查询上面
Page
<
PlatformUser
>
page
=
PageHelper
.
startPage
(
pagination
.
getCurrentPage
(),
pagination
.
getPageSize
(),
true
);
List
<
PlatformUser
>
userMgrList
=
userMgrService
.
getUserMgrList
(
userVo
);
return
R
.
ok
().
putPageData
(
page
,
userMgrList
);
public
R
getUserMgrList
(
Page
page
,
UserVo
userVo
)
{
return
userMgrService
.
getUserMgrList
(
page
,
userVo
);
}
@RequestMapping
(
value
=
"/getDropDownOptions"
,
method
=
RequestMethod
.
GET
)
...
...
src/main/java/com/glsx/filter/CORSFilter.java
View file @
c9736f7
...
...
@@ -26,7 +26,7 @@ public class CORSFilter implements Filter {
LOGGER
.
info
(
"当前访问来源是:{}"
,
httpServletRequest
.
getHeader
(
"Content-Type"
));
// 从列表中获取,可以将数据放入缓存
// String corsOriginList = PropertyConfigurer.getString("cors.origin.list.urls");
String
corsOriginList
=
"http://192.168.2.68:8081/"
;
String
corsOriginList
=
"http://192.168.2.68:8081/
http://192.168.2.106:8081/
"
;
LOGGER
.
info
(
"配置的来源:{}"
,
corsOriginList
);
if
(
StringUtils
.
isNotBlank
(
curOrigin
)
&&
corsOriginList
.
contains
(
curOrigin
))
{
httpServletResponse
.
setHeader
(
"Access-Control-Allow-Origin"
,
curOrigin
);
...
...
src/main/resources/config/application.properties
View file @
c9736f7
...
...
@@ -7,8 +7,8 @@ server.servlet.application-display-name=open-platform-admin
logging.config
=
classpath:logback.xml
logging.path
=
/data/java_log/jetty/open-platform-admin/open-platform-admin.log
#
logging.level.com.glsx=DEBUG
logging.level.com.glsx
=
INFO
logging.level.com.glsx
=
DEBUG
#
logging.level.com.glsx=INFO
ore.starter.class-
name
=
Main
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment