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 1a837179
authored
Dec 17, 2020
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
完成基本开发
1 parent
a09cea1b
Hide whitespace changes
Inline
Side-by-side
Showing
50 changed files
with
196 additions
and
2898 deletions
pom.xml
src/main/java/com/glsx/Main.java
src/main/java/com/glsx/config/DubboConfig.java
src/main/java/com/glsx/config/SwaggerConfig.java
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/AppDownloadMgrController.java
src/main/java/com/glsx/controller/CustomerMgrController.java
src/main/java/com/glsx/controller/DeviceMgrController.java
src/main/java/com/glsx/controller/IndexController.java
src/main/java/com/glsx/controller/UserMgrController.java
src/main/java/com/glsx/enums/ResultCodeEnum.java
src/main/java/com/glsx/exception/BusinessException.java
src/main/java/com/glsx/exception/GlobalExceptionHandler.java
src/main/java/com/glsx/mapper/PlatformAdMapper.java
src/main/java/com/glsx/mapper/PlatformApiCallMapper.java
src/main/java/com/glsx/mapper/PlatformApiMapper.java
src/main/java/com/glsx/mapper/PlatformAppDownloadMapper.java
src/main/java/com/glsx/mapper/PlatformCustomerMapper.java
src/main/java/com/glsx/mapper/PlatformDeviceMapper.java
src/main/java/com/glsx/mapper/PlatformUserMapper.java
src/main/java/com/glsx/model/PlatformAd.java
src/main/java/com/glsx/model/PlatformApi.java
src/main/java/com/glsx/model/PlatformApiCall.java
src/main/java/com/glsx/model/PlatformAppDownload.java
src/main/java/com/glsx/model/PlatformCustomer.java
src/main/java/com/glsx/model/PlatformDevice.java
src/main/java/com/glsx/model/PlatformUser.java
src/main/java/com/glsx/service/AdMgrService.java
src/main/java/com/glsx/service/ApiCallMgrService.java
src/main/java/com/glsx/service/ApiMgrService.java
src/main/java/com/glsx/service/AppDownloadMgrService.java
src/main/java/com/glsx/service/CustomerMgrService.java
src/main/java/com/glsx/service/DeviceMgrService.java
src/main/java/com/glsx/service/IndexService.java
src/main/java/com/glsx/service/UserMgrService.java
src/main/java/com/glsx/service/impl/AdMgrServiceImpl.java
src/main/java/com/glsx/service/impl/ApiCallMgrServiceImpl.java
src/main/java/com/glsx/service/impl/ApiMgrServiceImpl.java
src/main/java/com/glsx/service/impl/AppDownloadMgrServiceImpl.java
src/main/java/com/glsx/service/impl/CustomerMgrServiceImpl.java
src/main/java/com/glsx/service/impl/DeviceMgrServiceImpl.java
src/main/java/com/glsx/service/impl/IndexServiceImpl.java
src/main/java/com/glsx/service/impl/UserMgrServiceImpl.java
src/main/java/com/glsx/vo/ApiCallVo.java
src/main/java/com/glsx/vo/DeviceVo.java
src/main/java/com/glsx/vo/Pagination.java
src/main/java/com/glsx/vo/R.java
src/main/java/com/glsx/vo/UserVo.java
pom.xml
View file @
1a83717
...
@@ -22,49 +22,49 @@
...
@@ -22,49 +22,49 @@
</properties>
</properties>
<dependencies>
<dependencies>
<dependency
>
<!-- <dependency>--
>
<groupId>
com.alibaba
</groupId
>
<!-- <groupId>com.alibaba</groupId>--
>
<artifactId>
fastjson
</artifactId
>
<!-- <artifactId>fastjson</artifactId>--
>
<version>
1.2.75
</version
>
<!-- <version>1.2.75</version>--
>
</dependency
>
<!-- </dependency>--
>
<!--lombok -->
<!--lombok -->
<dependency
>
<!-- <dependency>--
>
<groupId>
org.projectlombok
</groupId
>
<!-- <groupId>org.projectlombok</groupId>--
>
<artifactId>
lombok
</artifactId
>
<!-- <artifactId>lombok</artifactId>--
>
<version>
1.18.12
</version
>
<!-- <version>1.18.12</version>--
>
<scope>
provided
</scope
>
<!-- <scope>provided</scope>--
>
</dependency
>
<!-- </dependency>--
>
<!--swagger 文档-->
<!--swagger 文档-->
<dependency
>
<!-- <dependency>--
>
<groupId>
io.springfox
</groupId
>
<!-- <groupId>io.springfox</groupId>--
>
<artifactId>
springfox-swagger2
</artifactId
>
<!-- <artifactId>springfox-swagger2</artifactId>--
>
<version>
${swagger2.version}
</version
>
<!-- <version>${swagger2.version}</version>--
>
</dependency
>
<!-- </dependency>--
>
<dependency
>
<!-- <dependency>--
>
<groupId>
io.springfox
</groupId
>
<!-- <groupId>io.springfox</groupId>--
>
<artifactId>
springfox-swagger-ui
</artifactId
>
<!-- <artifactId>springfox-swagger-ui</artifactId>--
>
<version>
${swagger2.version}
</version
>
<!-- <version>${swagger2.version}</version>--
>
</dependency
>
<!-- </dependency>--
>
<dependency
>
<!-- <dependency>--
>
<groupId>
com.github.pagehelper
</groupId
>
<!-- <groupId>com.github.pagehelper</groupId>--
>
<artifactId>
pagehelper
</artifactId
>
<!-- <artifactId>pagehelper</artifactId>--
>
<version>
5.2.0
</version
>
<!-- <version>5.2.0</version>--
>
</dependency
>
<!-- </dependency>--
>
<dependency
>
<!-- <dependency>--
>
<groupId>
cn.hutool
</groupId
>
<!-- <groupId>cn.hutool</groupId>--
>
<artifactId>
hutool-all
</artifactId
>
<!-- <artifactId>hutool-all</artifactId>--
>
<version>
5.5.2
</version
>
<!-- <version>5.5.2</version>--
>
</dependency
>
<!-- </dependency>--
>
<dependency
>
<!-- <dependency>--
>
<groupId>
org.springframework.data
</groupId
>
<!-- <groupId>org.springframework.data</groupId>--
>
<artifactId>
spring-data-commons
</artifactId
>
<!-- <artifactId>spring-data-commons</artifactId>--
>
<version>
2.4.2
</version
>
<!-- <version>2.4.2</version>--
>
</dependency
>
<!-- </dependency>--
>
<dependency>
<dependency>
<groupId>
cn.com.glsx.openplatform
</groupId>
<groupId>
cn.com.glsx.openplatform
</groupId>
...
...
src/main/java/com/glsx/Main.java
View file @
1a83717
...
@@ -5,7 +5,6 @@ import org.springframework.boot.SpringApplication;
...
@@ -5,7 +5,6 @@ import org.springframework.boot.SpringApplication;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
/**
/**
* @author deployer name
* @author deployer name
...
@@ -15,11 +14,9 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
...
@@ -15,11 +14,9 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
* @Company: Didihu.com.cn
* @Company: Didihu.com.cn
* @Copyright Copyright (c) 2015
* @Copyright Copyright (c) 2015
*/
*/
@EnableAsync
@SpringBootApplication
@SpringBootApplication
@ServletComponentScan
@ServletComponentScan
@EnableSwagger2
//@EnableSwagger2
//@MapperScan(basePackages = {"com.glsx.mapper"})
public
class
Main
extends
AbsOreBootStarter
{
public
class
Main
extends
AbsOreBootStarter
{
@Override
@Override
...
...
src/main/java/com/glsx/config/DubboConfig.java
View file @
1a83717
package
com
.
glsx
.
config
;
package
com
.
glsx
.
config
;
import
cn.com.glsx.openplatform.service.*
;
import
org.oreframework.boot.autoconfigure.dubbo.reference.ReferenceBuilderFactory
;
import
org.oreframework.boot.autoconfigure.dubbo.reference.ReferenceBuilderFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
/**
/**
* @author deployer name
* @version V1.0
* @Title: DubboConfig.java
* @Title: DubboConfig.java
* @Description: Dubbo服务注册配置
* @Description: Dubbo服务注册配置
* @author deployer name
* @version V1.0
* @Company: Didihu.com.cn
* @Company: Didihu.com.cn
* @Copyright Copyright (c) 2018
* @Copyright Copyright (c) 2018
*/
*/
@Configuration
@Configuration
public
class
DubboConfig
{
public
class
DubboConfig
{
@Autowired
@Autowired
private
ReferenceBuilderFactory
factory
;
private
ReferenceBuilderFactory
referenceBuilderFactory
;
/**
// -------- DUBBO COMMON CONFIG ----------
* 注册远程服务(示例)
private
static
final
Integer
DUBBO_SERVICE_TIMEOUT
=
100000
;
* RpcRemote为需要调用的远程服务
* @return
// -------- DUBBO VERSION CONFIG ----------
*/
private
static
final
String
COMMON_DUBBO_VERSION
=
"1.0.0"
;
private
static
final
String
SERVICEPACKAGE_DUBBO_VERSION
=
"2.0.0"
;
private
static
final
String
ACCOUNT_SERVICE_VERSION
=
"2.2.0"
;
private
static
final
boolean
dubboUnCheck
=
false
;
private
static
final
boolean
dubboCheck
=
true
;
/**
* 注册远程服务(示例)
* RpcRemote为需要调用的远程服务
*
* @return
*/
/*@Bean
/*@Bean
public RpcRemote rpcApiMethodRemote(){
public RpcRemote rpcApiMethodRemote(){
return factory.builder(RpcRemote.class).check(false).timeout(30000).build();
return factory.builder(RpcRemote.class).check(false).timeout(30000).build();
}*/
}*/
@Bean
public
AdMgrService
adMgrService
()
{
// return referenceBuilderFactory.builder(AdMgrService.class).check(false).timeout(30000).build();
return
referenceBuilderFactory
.
builder
(
AdMgrService
.
class
).
check
(
false
).
timeout
(
30000
).
url
(
"dubbo://localhost:20882"
).
build
();
}
@Bean
public
ApiCallMgrService
apiCallMgrService
()
{
// return referenceBuilderFactory.builder(AdMgrService.class).check(false).timeout(30000).build();
return
referenceBuilderFactory
.
builder
(
ApiCallMgrService
.
class
).
check
(
false
).
timeout
(
30000
).
url
(
"dubbo://localhost:20882"
).
build
();
}
@Bean
public
ApiMgrService
apiMgrService
()
{
// return referenceBuilderFactory.builder(AdMgrService.class).check(false).timeout(30000).build();
return
referenceBuilderFactory
.
builder
(
ApiMgrService
.
class
).
check
(
false
).
timeout
(
30000
).
url
(
"dubbo://localhost:20882"
).
build
();
}
@Bean
public
AppDownloadMgrService
appDownloadMgrService
()
{
// return referenceBuilderFactory.builder(AdMgrService.class).check(false).timeout(30000).build();
return
referenceBuilderFactory
.
builder
(
AppDownloadMgrService
.
class
).
check
(
false
).
timeout
(
30000
).
url
(
"dubbo://localhost:20882"
).
build
();
}
@Bean
public
CustomerMgrService
customerMgrService
()
{
// return referenceBuilderFactory.builder(AdMgrService.class).check(false).timeout(30000).build();
return
referenceBuilderFactory
.
builder
(
CustomerMgrService
.
class
).
check
(
false
).
timeout
(
30000
).
url
(
"dubbo://localhost:20882"
).
build
();
}
@Bean
public
DeviceMgrService
deviceMgrService
()
{
// return referenceBuilderFactory.builder(AdMgrService.class).check(false).timeout(30000).build();
return
referenceBuilderFactory
.
builder
(
DeviceMgrService
.
class
).
check
(
false
).
timeout
(
30000
).
url
(
"dubbo://localhost:20882"
).
build
();
}
@Bean
public
IndexService
indexService
()
{
// return referenceBuilderFactory.builder(AdMgrService.class).check(false).timeout(30000).build();
return
referenceBuilderFactory
.
builder
(
IndexService
.
class
).
check
(
false
).
timeout
(
30000
).
url
(
"dubbo://localhost:20882"
).
build
();
}
@Bean
public
UserMgrService
userMgrService
()
{
// return referenceBuilderFactory.builder(AdMgrService.class).check(false).timeout(30000).build();
return
referenceBuilderFactory
.
builder
(
UserMgrService
.
class
).
check
(
false
).
timeout
(
30000
).
url
(
"dubbo://localhost:20882"
).
build
();
}
}
}
src/main/java/com/glsx/config/SwaggerConfig.java
View file @
1a83717
package
com
.
glsx
.
config
;
//
package com.glsx.config;
//
import
org.springframework.context.annotation.Bean
;
//
import org.springframework.context.annotation.Bean;
import
org.springframework.context.annotation.Configuration
;
//
import org.springframework.context.annotation.Configuration;
import
springfox.documentation.builders.ApiInfoBuilder
;
//
import springfox.documentation.builders.ApiInfoBuilder;
import
springfox.documentation.builders.PathSelectors
;
//
import springfox.documentation.builders.PathSelectors;
import
springfox.documentation.builders.RequestHandlerSelectors
;
//
import springfox.documentation.builders.RequestHandlerSelectors;
import
springfox.documentation.service.ApiInfo
;
//
import springfox.documentation.service.ApiInfo;
import
springfox.documentation.service.Contact
;
//
import springfox.documentation.service.Contact;
import
springfox.documentation.spi.DocumentationType
;
//
import springfox.documentation.spi.DocumentationType;
import
springfox.documentation.spring.web.plugins.Docket
;
//
import springfox.documentation.spring.web.plugins.Docket;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
//
import springfox.documentation.swagger2.annotations.EnableSwagger2;
//
@Configuration
//
@Configuration
@EnableSwagger2
//
@EnableSwagger2
public
class
SwaggerConfig
{
//
public class SwaggerConfig {
@Bean
//
@Bean
public
Docket
api
()
{
//
public Docket api() {
return
new
Docket
(
DocumentationType
.
SWAGGER_2
)
//
return new Docket(DocumentationType.SWAGGER_2)
.
select
()
//
.select()
.
apis
(
RequestHandlerSelectors
.
basePackage
(
"com.glsx.controller"
))
//
.apis(RequestHandlerSelectors.basePackage("com.glsx.controller"))
.
paths
(
PathSelectors
.
any
())
//
.paths(PathSelectors.any())
.
build
()
//
.build()
.
apiInfo
(
apiEndPointsInfo
())
//
.apiInfo(apiEndPointsInfo())
.
useDefaultResponseMessages
(
false
);
//
.useDefaultResponseMessages(false);
}
//
}
//
private
ApiInfo
apiEndPointsInfo
()
{
//
private ApiInfo apiEndPointsInfo() {
return
new
ApiInfoBuilder
().
title
(
"Sys REST API"
)
//
return new ApiInfoBuilder().title("Sys REST API")
.
description
(
"接口描述"
)
//
.description("接口描述")
.
contact
(
new
Contact
(
"Zhangln"
,
"https://code.aliyun.com/yidingv3/kwafoo"
,
"zhangln@zhidianfan.com"
))
//
.contact(new Contact("Zhangln", "https://code.aliyun.com/yidingv3/kwafoo", "zhangln@zhidianfan.com"))
.
license
(
"edingyi"
)
//
.license("edingyi")
.
licenseUrl
(
"http://www.edingyi.com"
)
//
.licenseUrl("http://www.edingyi.com")
.
version
(
"V1"
)
//
.version("V1")
.
build
();
//
.build();
}
//
}
}
//
}
src/main/java/com/glsx/controller/AdMgrController.java
View file @
1a83717
package
com
.
glsx
.
controller
;
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
com.github.pagehelper.Page
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.glsx.model.PlatformAd
;
import
com.glsx.model.PlatformApiCall
;
import
com.glsx.service.AdMgrService
;
import
com.glsx.vo.R
;
import
io.swagger.annotations.Api
;
import
org.oreframework.web.ui.Pagination
;
import
org.oreframework.web.ui.Pagination
;
import
org.oreframework.web.ui.ResponseEntity
;
import
org.oreframework.web.ui.ResultEntity
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -20,7 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -20,7 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
import
java.util.List
;
import
java.util.List
;
@Api
//
@Api
@RestController
@RestController
@RequestMapping
(
value
=
"/admgr"
)
@RequestMapping
(
value
=
"/admgr"
)
public
class
AdMgrController
{
public
class
AdMgrController
{
...
...
src/main/java/com/glsx/controller/ApiCallMgrController.java
View file @
1a83717
package
com
.
glsx
.
controller
;
package
com
.
glsx
.
controller
;
import
java.util.List
;
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
com.github.pagehelper.Page
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.glsx.model.PlatformApiCall
;
import
org.oreframework.web.ui.Pagination
;
import
com.glsx.service.ApiCallMgrService
;
import
com.glsx.vo.ApiCallVo
;
import
com.glsx.vo.R
;
import
io.swagger.annotations.Api
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -16,7 +15,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
...
@@ -16,7 +15,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
@Api
import
java.util.List
;
//@Api
@RestController
@RestController
@RequestMapping
(
value
=
"/apicallmgr"
)
@RequestMapping
(
value
=
"/apicallmgr"
)
public
class
ApiCallMgrController
{
public
class
ApiCallMgrController
{
...
@@ -30,9 +31,9 @@ public class ApiCallMgrController {
...
@@ -30,9 +31,9 @@ public class ApiCallMgrController {
@RequestMapping
(
value
=
"/getApiCallMgrList"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getApiCallMgrList"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ResponseBody
public
R
getApiCallMgrList
(
ApiCallVo
apiCallVo
)
{
public
R
getApiCallMgrList
(
Pagination
pagination
,
ApiCallVo
apiCallVo
)
{
//PageHelper注入分页和要分页的查询之前不能有其它查询,不然分页到第一个查询上面
//PageHelper注入分页和要分页的查询之前不能有其它查询,不然分页到第一个查询上面
Page
<
PlatformApiCall
>
page
=
PageHelper
.
startPage
(
apiCallVo
.
getCurrentPage
(),
apiCallVo
.
getPageSize
(),
true
);
Page
<
PlatformApiCall
>
page
=
PageHelper
.
startPage
(
pagination
.
getCurrentPage
(),
pagination
.
getPageSize
(),
true
);
List
<
PlatformApiCall
>
apiMgrList
=
apiCallMgrService
.
getApiCallMgrList
(
apiCallVo
);
List
<
PlatformApiCall
>
apiMgrList
=
apiCallMgrService
.
getApiCallMgrList
(
apiCallVo
);
...
...
src/main/java/com/glsx/controller/ApiMgrController.java
View file @
1a83717
package
com
.
glsx
.
controller
;
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
com.github.pagehelper.Page
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.glsx.model.PlatformApi
;
import
com.glsx.model.PlatformCustomer
;
import
com.glsx.service.ApiMgrService
;
import
com.glsx.vo.R
;
import
io.swagger.annotations.Api
;
import
org.oreframework.web.ui.Pagination
;
import
org.oreframework.web.ui.Pagination
;
import
org.oreframework.web.ui.ResponseEntity
;
import
org.oreframework.web.ui.ResultEntity
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -20,7 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -20,7 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
import
java.util.List
;
import
java.util.List
;
@Api
//
@Api
@RestController
@RestController
@RequestMapping
(
value
=
"/apimgr"
)
@RequestMapping
(
value
=
"/apimgr"
)
public
class
ApiMgrController
{
public
class
ApiMgrController
{
...
...
src/main/java/com/glsx/controller/AppDownloadMgrController.java
View file @
1a83717
package
com
.
glsx
.
controller
;
package
com
.
glsx
.
controller
;
import
com.glsx.service.AppDownloadMgrService
;
import
cn.com.glsx.openplatform.service.AppDownloadMgrService
;
import
com.glsx.vo.R
;
import
cn.com.glsx.openplatform.vo.R
;
import
io.swagger.annotations.Api
;
import
org.oreframework.web.ui.ResponseEntity
;
import
org.oreframework.web.ui.ResultEntity
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -13,7 +10,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
...
@@ -13,7 +10,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
@Api
//
@Api
@RestController
@RestController
@RequestMapping
(
value
=
"/appdownloadmgr"
)
@RequestMapping
(
value
=
"/appdownloadmgr"
)
public
class
AppDownloadMgrController
{
public
class
AppDownloadMgrController
{
...
...
src/main/java/com/glsx/controller/CustomerMgrController.java
View file @
1a83717
package
com
.
glsx
.
controller
;
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
com.github.pagehelper.Page
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.glsx.model.PlatformCustomer
;
import
com.glsx.model.PlatformUser
;
import
com.glsx.service.CustomerMgrService
;
import
com.glsx.vo.R
;
import
io.swagger.annotations.Api
;
import
org.oreframework.web.ui.Pagination
;
import
org.oreframework.web.ui.Pagination
;
import
org.oreframework.web.ui.ResponseEntity
;
import
org.oreframework.web.ui.ResultEntity
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -20,7 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -20,7 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
import
java.util.List
;
import
java.util.List
;
@Api
//
@Api
@RestController
@RestController
@RequestMapping
(
value
=
"/customermgr"
)
@RequestMapping
(
value
=
"/customermgr"
)
public
class
CustomerMgrController
{
public
class
CustomerMgrController
{
...
...
src/main/java/com/glsx/controller/DeviceMgrController.java
View file @
1a83717
...
@@ -2,13 +2,14 @@ package com.glsx.controller;
...
@@ -2,13 +2,14 @@ package com.glsx.controller;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
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
com.github.pagehelper.Page
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.glsx.model.PlatformDevice
;
import
org.oreframework.web.ui.Pagination
;
import
com.glsx.service.DeviceMgrService
;
import
com.glsx.vo.DeviceVo
;
import
com.glsx.vo.R
;
import
io.swagger.annotations.Api
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -17,7 +18,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
...
@@ -17,7 +18,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
@Api
//
@Api
@RestController
@RestController
@RequestMapping
(
value
=
"/devicemgr"
)
@RequestMapping
(
value
=
"/devicemgr"
)
public
class
DeviceMgrController
{
public
class
DeviceMgrController
{
...
@@ -31,10 +32,10 @@ public class DeviceMgrController {
...
@@ -31,10 +32,10 @@ public class DeviceMgrController {
@RequestMapping
(
value
=
"/getDeviceMgrList"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getDeviceMgrList"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ResponseBody
public
R
getDeviceMgrList
(
DeviceVo
deviceVo
)
{
public
R
getDeviceMgrList
(
Pagination
pagination
,
DeviceVo
deviceVo
)
{
//PageHelper注入分页和要分页的查询之前不能有其它查询,不然分页到第一个查询上面
//PageHelper注入分页和要分页的查询之前不能有其它查询,不然分页到第一个查询上面
Page
<
PlatformDevice
>
page
=
PageHelper
.
startPage
(
deviceVo
.
getCurrentPage
(),
Page
<
PlatformDevice
>
page
=
PageHelper
.
startPage
(
pagination
.
getCurrentPage
(),
deviceVo
.
getPageSize
(),
true
);
pagination
.
getPageSize
(),
true
);
List
<
PlatformDevice
>
deviceMgrList
=
deviceMgrService
.
getDeviceMgrList
(
deviceVo
);
List
<
PlatformDevice
>
deviceMgrList
=
deviceMgrService
.
getDeviceMgrList
(
deviceVo
);
...
...
src/main/java/com/glsx/controller/IndexController.java
View file @
1a83717
package
com
.
glsx
.
controller
;
package
com
.
glsx
.
controller
;
import
com.github.pagehelper.Page
;
import
cn.com.glsx.openplatform.service.*
;
import
com.github.pagehelper.PageHelper
;
import
cn.com.glsx.openplatform.vo.R
;
import
com.glsx.model.PlatformUser
;
import
com.glsx.service.*
;
import
com.glsx.vo.R
;
import
com.glsx.vo.UserVo
;
import
io.swagger.annotations.Api
;
import
org.oreframework.web.ui.Pagination
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -28,7 +22,7 @@ import java.util.Map;
...
@@ -28,7 +22,7 @@ import java.util.Map;
* @Company: Didihu.com.cn
* @Company: Didihu.com.cn
* @Copyright Copyright (c) 2017
* @Copyright Copyright (c) 2017
*/
*/
@Api
//
@Api
@RestController
@RestController
@RequestMapping
(
value
=
"/index"
)
@RequestMapping
(
value
=
"/index"
)
public
class
IndexController
{
public
class
IndexController
{
...
...
src/main/java/com/glsx/controller/UserMgrController.java
View file @
1a83717
package
com
.
glsx
.
controller
;
package
com
.
glsx
.
controller
;
import
java.util.List
;
import
java.util.List
;
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
com.github.pagehelper.Page
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.glsx.model.PlatformUser
;
import
org.oreframework.web.ui.Pagination
;
import
com.glsx.service.UserMgrService
;
import
com.glsx.vo.R
;
import
com.glsx.vo.UserVo
;
import
io.swagger.annotations.Api
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -16,7 +17,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
...
@@ -16,7 +17,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
@Api
//
@Api
@RestController
@RestController
@RequestMapping
(
value
=
"/usermgr"
)
@RequestMapping
(
value
=
"/usermgr"
)
public
class
UserMgrController
{
public
class
UserMgrController
{
...
@@ -30,10 +31,10 @@ public class UserMgrController {
...
@@ -30,10 +31,10 @@ public class UserMgrController {
@RequestMapping
(
value
=
"/getUserMgrList"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getUserMgrList"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ResponseBody
public
R
getUserMgrList
(
UserVo
userVo
)
{
public
R
getUserMgrList
(
Pagination
pagination
,
UserVo
userVo
)
{
//PageHelper注入分页和要分页的查询之前不能有其它查询,不然分页到第一个查询上面
//PageHelper注入分页和要分页的查询之前不能有其它查询,不然分页到第一个查询上面
Page
<
PlatformUser
>
page
=
PageHelper
.
startPage
(
userVo
.
getCurrentPage
(),
Page
<
PlatformUser
>
page
=
PageHelper
.
startPage
(
pagination
.
getCurrentPage
(),
userVo
.
getPageSize
(),
true
);
pagination
.
getPageSize
(),
true
);
List
<
PlatformUser
>
userMgrList
=
userMgrService
.
getUserMgrList
(
userVo
);
List
<
PlatformUser
>
userMgrList
=
userMgrService
.
getUserMgrList
(
userVo
);
...
...
src/main/java/com/glsx/enums/ResultCodeEnum.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
enums
;
import
com.glsx.exception.BusinessException
;
/**
* <p>Description:
* <p>Project: open-platform-admin
*
* @author wbh
* @date 2020-12-16
*/
public
enum
ResultCodeEnum
{
SUCCESS
(
200
,
"成功"
),
SERVER_ERROR
(
500
,
"系统异常"
),
;
private
final
Integer
code
;
private
final
String
msg
;
ResultCodeEnum
(
Integer
code
,
String
msg
)
{
this
.
code
=
code
;
this
.
msg
=
msg
;
}
public
Integer
getCode
()
{
return
code
;
}
public
String
getMsg
()
{
return
msg
;
}
public
BusinessException
exception
()
{
return
new
BusinessException
(
this
.
code
,
this
.
msg
);
}
}
src/main/java/com/glsx/exception/BusinessException.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
exception
;
/**
* <p>Description: 业务异常
* <p>Project: open-platform-admin
*
* @author wbh
* @date 2020-12-16
*/
public
class
BusinessException
extends
RuntimeException
{
private
Integer
code
;
private
String
message
;
public
BusinessException
()
{}
public
BusinessException
(
Integer
code
,
String
message
)
{
this
.
code
=
code
;
this
.
message
=
message
;
}
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
public
void
setMessage
(
String
message
)
{
this
.
message
=
message
;
}
@Override
public
String
getMessage
()
{
return
this
.
message
;
}
}
src/main/java/com/glsx/exception/GlobalExceptionHandler.java
View file @
1a83717
package
com
.
glsx
.
exception
;
package
com
.
glsx
.
exception
;
import
com.glsx.enums.ResultCodeEnum
;
import
cn.com.glsx.openplatform.enums.ResultCodeEnum
;
import
com.glsx.vo.R
;
import
cn.com.glsx.openplatform.exception.BusinessException
;
import
cn.com.glsx.openplatform.vo.R
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
...
...
src/main/java/com/glsx/mapper/PlatformAdMapper.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
mapper
;
import
com.glsx.model.PlatformAd
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
/**
* <p>Description:
* <p>Project: shop
*
* @author wbh
* @date 2020-12-15
*/
@Mapper
public
interface
PlatformAdMapper
{
int
deleteByPrimaryKey
(
Integer
id
);
int
insert
(
PlatformAd
record
);
int
insertOrUpdate
(
PlatformAd
record
);
int
insertOrUpdateSelective
(
PlatformAd
record
);
int
insertSelective
(
PlatformAd
record
);
PlatformAd
selectByPrimaryKey
(
Integer
id
);
int
updateByPrimaryKeySelective
(
PlatformAd
record
);
int
updateByPrimaryKey
(
PlatformAd
record
);
int
updateBatch
(
List
<
PlatformAd
>
list
);
int
updateBatchSelective
(
List
<
PlatformAd
>
list
);
List
<
PlatformAd
>
getAdMgrList
();
}
\ No newline at end of file
\ No newline at end of file
src/main/java/com/glsx/mapper/PlatformApiCallMapper.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
mapper
;
import
com.glsx.model.PlatformApiCall
;
import
com.glsx.vo.ApiCallVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
import
java.util.Map
;
/**
* <p>Description:
* <p>Project: shop
*
* @author wbh
* @date 2020-12-15
*/
@Mapper
public
interface
PlatformApiCallMapper
{
int
deleteByPrimaryKey
(
Integer
id
);
int
insert
(
PlatformApiCall
record
);
int
insertOrUpdate
(
PlatformApiCall
record
);
int
insertOrUpdateSelective
(
PlatformApiCall
record
);
int
insertSelective
(
PlatformApiCall
record
);
PlatformApiCall
selectByPrimaryKey
(
Integer
id
);
int
updateByPrimaryKeySelective
(
PlatformApiCall
record
);
int
updateByPrimaryKey
(
PlatformApiCall
record
);
int
updateBatch
(
List
<
PlatformApiCall
>
list
);
int
updateBatchSelective
(
List
<
PlatformApiCall
>
list
);
List
<
PlatformApiCall
>
getApiCallMgrList
(
ApiCallVo
apiCallVo
);
int
getApiCallCount
();
List
<
Map
<
String
,
Integer
>>
getApiCallGraphData
();
List
<
Map
<
String
,
Integer
>>
getApiCallTrendList
();
}
\ No newline at end of file
\ No newline at end of file
src/main/java/com/glsx/mapper/PlatformApiMapper.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
mapper
;
import
java.util.List
;
import
com.glsx.model.PlatformApi
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* <p>Description:
* <p>Project: shop
*
* @author wbh
* @date 2020-12-15
*/
@Mapper
public
interface
PlatformApiMapper
{
int
deleteByPrimaryKey
(
Integer
id
);
int
insert
(
PlatformApi
record
);
int
insertOrUpdate
(
PlatformApi
record
);
int
insertOrUpdateSelective
(
PlatformApi
record
);
int
insertSelective
(
PlatformApi
record
);
PlatformApi
selectByPrimaryKey
(
Integer
id
);
int
updateByPrimaryKeySelective
(
PlatformApi
record
);
int
updateByPrimaryKey
(
PlatformApi
record
);
int
updateBatch
(
List
<
PlatformApi
>
list
);
int
updateBatchSelective
(
List
<
PlatformApi
>
list
);
List
<
PlatformApi
>
getApiMgrList
();
}
\ No newline at end of file
\ No newline at end of file
src/main/java/com/glsx/mapper/PlatformAppDownloadMapper.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
mapper
;
import
com.glsx.model.PlatformAppDownload
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
* <p>Description:
* <p>Project: shop
*
* @author wbh
* @date 2020-12-15
*/
@Mapper
public
interface
PlatformAppDownloadMapper
{
int
deleteByPrimaryKey
(
Integer
id
);
int
insert
(
PlatformAppDownload
record
);
int
insertOrUpdate
(
PlatformAppDownload
record
);
int
insertOrUpdateSelective
(
PlatformAppDownload
record
);
int
insertSelective
(
PlatformAppDownload
record
);
PlatformAppDownload
selectByPrimaryKey
(
Integer
id
);
int
updateByPrimaryKeySelective
(
PlatformAppDownload
record
);
int
updateByPrimaryKey
(
PlatformAppDownload
record
);
int
updateBatch
(
List
<
PlatformAppDownload
>
list
);
int
updateBatchSelective
(
List
<
PlatformAppDownload
>
list
);
int
getApiCallCountAuth
(
@Param
(
"customerName"
)
String
customerName
);
List
<
Map
<
String
,
Object
>>
getAppDownloadStatistic
(
@Param
(
"startTime"
)
Date
startTime
,
@Param
(
"endTime"
)
Date
endTime
,
@Param
(
"customerName"
)
String
customerName
);
}
\ No newline at end of file
\ No newline at end of file
src/main/java/com/glsx/mapper/PlatformCustomerMapper.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
mapper
;
import
com.glsx.model.PlatformCustomer
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
/**
* <p>Description:
* <p>Project: shop
*
* @author wbh
* @date 2020-12-15
*/
@Mapper
public
interface
PlatformCustomerMapper
{
int
deleteByPrimaryKey
(
Integer
id
);
int
insert
(
PlatformCustomer
record
);
int
insertOrUpdate
(
PlatformCustomer
record
);
int
insertOrUpdateSelective
(
PlatformCustomer
record
);
int
insertSelective
(
PlatformCustomer
record
);
PlatformCustomer
selectByPrimaryKey
(
Integer
id
);
int
updateByPrimaryKeySelective
(
PlatformCustomer
record
);
int
updateByPrimaryKey
(
PlatformCustomer
record
);
int
updateBatch
(
List
<
PlatformCustomer
>
list
);
int
updateBatchSelective
(
List
<
PlatformCustomer
>
list
);
List
<
PlatformCustomer
>
getCustomerMgrList
();
List
<
String
>
getCustomerNameList
();
int
getCustomerCount
();
int
login
(
PlatformCustomer
customer
);
}
\ No newline at end of file
\ No newline at end of file
src/main/java/com/glsx/mapper/PlatformDeviceMapper.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
mapper
;
import
com.glsx.model.PlatformDevice
;
import
com.glsx.vo.DeviceVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
* <p>Description:
* <p>Project: shop
*
* @author wbh
* @date 2020-12-15
*/
@Mapper
public
interface
PlatformDeviceMapper
{
int
deleteByPrimaryKey
(
Integer
id
);
int
insert
(
PlatformDevice
record
);
int
insertOrUpdate
(
PlatformDevice
record
);
int
insertOrUpdateSelective
(
PlatformDevice
record
);
int
insertSelective
(
PlatformDevice
record
);
PlatformDevice
selectByPrimaryKey
(
Integer
id
);
int
updateByPrimaryKeySelective
(
PlatformDevice
record
);
int
updateByPrimaryKey
(
PlatformDevice
record
);
int
updateBatch
(
List
<
PlatformDevice
>
list
);
int
updateBatchSelective
(
List
<
PlatformDevice
>
list
);
List
<
PlatformDevice
>
getDeviceMgrList
(
DeviceVo
deviceVo
);
List
<
String
>
getDeviceTypeList
();
int
getDeviceCount
();
Map
<
String
,
Integer
>
getDeviceGraphData
();
int
getDeviceCountAuth
(
@Param
(
"customerName"
)
String
customerName
);
List
<
Map
<
String
,
Integer
>>
getDeviceAccessTrendList
();
List
<
Map
<
String
,
Object
>>
getDeviceActivationStatistic
(
@Param
(
"startTime"
)
Date
startTime
,
@Param
(
"endTime"
)
Date
endTime
,
@Param
(
"customerName"
)
String
customerName
);
}
\ No newline at end of file
\ No newline at end of file
src/main/java/com/glsx/mapper/PlatformUserMapper.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
mapper
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
com.glsx.model.PlatformUser
;
import
com.glsx.vo.UserVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
* <p>Description:
* <p>Project: shop
*
* @author wbh
* @date 2020-12-15
*/
@Mapper
public
interface
PlatformUserMapper
{
int
deleteByPrimaryKey
(
Integer
id
);
int
insert
(
PlatformUser
record
);
int
insertOrUpdate
(
PlatformUser
record
);
int
insertOrUpdateSelective
(
PlatformUser
record
);
int
insertSelective
(
PlatformUser
record
);
PlatformUser
selectByPrimaryKey
(
Integer
id
);
int
updateByPrimaryKeySelective
(
PlatformUser
record
);
int
updateByPrimaryKey
(
PlatformUser
record
);
int
updateBatch
(
List
<
PlatformUser
>
list
);
int
updateBatchSelective
(
List
<
PlatformUser
>
list
);
List
<
PlatformUser
>
getUserMgrList
(
UserVo
userVo
);
int
getUserCount
();
int
getUserCountAuth
(
@Param
(
"customerName"
)
String
customerName
);
List
<
Map
<
String
,
Object
>>
getUserActivityStatistic
(
@Param
(
"startTime"
)
Date
startTime
,
@Param
(
"endTime"
)
Date
endTime
,
@Param
(
"customerName"
)
String
customerName
);
}
src/main/java/com/glsx/model/PlatformAd.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
model
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* <p>Description:
* <p>Project: shop
*
* @author wbh
* @date 2020-12-15
*/
/**
* 广告管理表
*/
public
class
PlatformAd
implements
Serializable
{
/**
* 主键
*/
private
Integer
id
;
/**
* 标题
*/
private
String
title
;
/**
* 图片
*/
private
String
image
;
/**
* 位置 1 商城banner 2 智能-家 3 启动页
*/
private
Byte
position
;
/**
* 界面类型 1 APP 2 H5
*/
private
Byte
interfaceType
;
/**
* 界面参数
*/
private
String
interfaceUrl
;
/**
* 是否上架 0 下架 1 上架
*/
private
Integer
status
;
/**
* 创建时间 添加时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
/**
* 创建人
*/
private
Integer
createBy
;
/**
* 更新人
*/
private
Integer
updateBy
;
/**
* 备注
*/
private
String
remark
;
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
String
getTitle
()
{
return
title
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
String
getImage
()
{
return
image
;
}
public
void
setImage
(
String
image
)
{
this
.
image
=
image
;
}
public
Byte
getPosition
()
{
return
position
;
}
public
void
setPosition
(
Byte
position
)
{
this
.
position
=
position
;
}
public
Byte
getInterfaceType
()
{
return
interfaceType
;
}
public
void
setInterfaceType
(
Byte
interfaceType
)
{
this
.
interfaceType
=
interfaceType
;
}
public
String
getInterfaceUrl
()
{
return
interfaceUrl
;
}
public
void
setInterfaceUrl
(
String
interfaceUrl
)
{
this
.
interfaceUrl
=
interfaceUrl
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
Integer
getCreateBy
()
{
return
createBy
;
}
public
void
setCreateBy
(
Integer
createBy
)
{
this
.
createBy
=
createBy
;
}
public
Integer
getUpdateBy
()
{
return
updateBy
;
}
public
void
setUpdateBy
(
Integer
updateBy
)
{
this
.
updateBy
=
updateBy
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
getClass
().
getSimpleName
());
sb
.
append
(
" ["
);
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", title="
).
append
(
title
);
sb
.
append
(
", image="
).
append
(
image
);
sb
.
append
(
", position="
).
append
(
position
);
sb
.
append
(
", interfaceType="
).
append
(
interfaceType
);
sb
.
append
(
", interfaceUrl="
).
append
(
interfaceUrl
);
sb
.
append
(
", status="
).
append
(
status
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", updateTime="
).
append
(
updateTime
);
sb
.
append
(
", createBy="
).
append
(
createBy
);
sb
.
append
(
", updateBy="
).
append
(
updateBy
);
sb
.
append
(
", remark="
).
append
(
remark
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
}
\ No newline at end of file
\ No newline at end of file
src/main/java/com/glsx/model/PlatformApi.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
model
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* <p>Description:
* <p>Project: shop
*
* @author wbh
* @date 2020-12-15
*/
/**
* api管理表
*/
public
class
PlatformApi
implements
Serializable
{
/**
* 主键
*/
private
Integer
id
;
/**
* API分类 1 授权管理 2 设备管理 3 数据服务
*/
private
Integer
apiClassification
;
/**
* API名称
*/
private
String
apiName
;
/**
* 请求方式 1 GET 2 POST
*/
private
Integer
requestMethod
;
/**
* API接口
*/
private
String
apiInterface
;
/**
* 说明
*/
private
String
description
;
/**
* 状态 0 停用 1 可用
*/
private
Integer
status
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
/**
* 创建人
*/
private
Integer
createBy
;
/**
* 更新人
*/
private
Integer
updateBy
;
/**
* 备注
*/
private
String
remark
;
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
Integer
getApiClassification
()
{
return
apiClassification
;
}
public
void
setApiClassification
(
Integer
apiClassification
)
{
this
.
apiClassification
=
apiClassification
;
}
public
String
getApiName
()
{
return
apiName
;
}
public
void
setApiName
(
String
apiName
)
{
this
.
apiName
=
apiName
;
}
public
Integer
getRequestMethod
()
{
return
requestMethod
;
}
public
void
setRequestMethod
(
Integer
requestMethod
)
{
this
.
requestMethod
=
requestMethod
;
}
public
String
getApiInterface
()
{
return
apiInterface
;
}
public
void
setApiInterface
(
String
apiInterface
)
{
this
.
apiInterface
=
apiInterface
;
}
public
String
getDescription
()
{
return
description
;
}
public
void
setDescription
(
String
description
)
{
this
.
description
=
description
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
Integer
getCreateBy
()
{
return
createBy
;
}
public
void
setCreateBy
(
Integer
createBy
)
{
this
.
createBy
=
createBy
;
}
public
Integer
getUpdateBy
()
{
return
updateBy
;
}
public
void
setUpdateBy
(
Integer
updateBy
)
{
this
.
updateBy
=
updateBy
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
getClass
().
getSimpleName
());
sb
.
append
(
" ["
);
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", apiClassification="
).
append
(
apiClassification
);
sb
.
append
(
", apiName="
).
append
(
apiName
);
sb
.
append
(
", requestMethod="
).
append
(
requestMethod
);
sb
.
append
(
", apiInterface="
).
append
(
apiInterface
);
sb
.
append
(
", description="
).
append
(
description
);
sb
.
append
(
", status="
).
append
(
status
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", updateTime="
).
append
(
updateTime
);
sb
.
append
(
", createBy="
).
append
(
createBy
);
sb
.
append
(
", updateBy="
).
append
(
updateBy
);
sb
.
append
(
", remark="
).
append
(
remark
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
}
\ No newline at end of file
\ No newline at end of file
src/main/java/com/glsx/model/PlatformApiCall.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
model
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* <p>Description:
* <p>Project: shop
*
* @author wbh
* @date 2020-12-15
*/
/**
* api调用表
*/
public
class
PlatformApiCall
implements
Serializable
{
/**
* 主键
*/
private
Integer
id
;
/**
* 客户id t_platform_customer表的id
*/
private
Integer
customerId
;
/**
* 客户名称
*/
private
String
customerName
;
/**
* 调用API id t_platform_api 的id
*/
private
Integer
apiId
;
/**
* API名称
*/
private
String
apiName
;
/**
* 调用结果 0 失败 1 成功
*/
private
Integer
callResult
;
/**
* 创建时间 访问时间
*/
private
Date
createTime
;
/**
* 创建人
*/
private
Integer
createBy
;
/**
* 备注
*/
private
String
remark
;
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
Integer
getCustomerId
()
{
return
customerId
;
}
public
void
setCustomerId
(
Integer
customerId
)
{
this
.
customerId
=
customerId
;
}
public
Integer
getApiId
()
{
return
apiId
;
}
public
void
setApiId
(
Integer
apiId
)
{
this
.
apiId
=
apiId
;
}
public
Integer
getCallResult
()
{
return
callResult
;
}
public
void
setCallResult
(
Integer
callResult
)
{
this
.
callResult
=
callResult
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Integer
getCreateBy
()
{
return
createBy
;
}
public
void
setCreateBy
(
Integer
createBy
)
{
this
.
createBy
=
createBy
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getCustomerName
()
{
return
customerName
;
}
public
void
setCustomerName
(
String
customerName
)
{
this
.
customerName
=
customerName
;
}
public
String
getApiName
()
{
return
apiName
;
}
public
void
setApiName
(
String
apiName
)
{
this
.
apiName
=
apiName
;
}
@Override
public
String
toString
()
{
return
"PlatformApiCall{"
+
"id="
+
id
+
", customerId="
+
customerId
+
", customerName='"
+
customerName
+
'\''
+
", apiId="
+
apiId
+
", apiName='"
+
apiName
+
'\''
+
", callResult="
+
callResult
+
", createTime="
+
createTime
+
", createBy="
+
createBy
+
", remark='"
+
remark
+
'\''
+
'}'
;
}
}
\ No newline at end of file
\ No newline at end of file
src/main/java/com/glsx/model/PlatformAppDownload.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
model
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* <p>Description:
* <p>Project: shop
*
* @author wbh
* @date 2020-12-15
*/
/**
* APP下载数量表
*/
public
class
PlatformAppDownload
implements
Serializable
{
/**
* 主键
*/
private
Integer
id
;
/**
* 客户id t_platform_customer表的id
*/
private
Integer
customerId
;
/**
* 创建时间 下载时间
*/
private
Date
createTime
;
/**
* 创建人
*/
private
Integer
createBy
;
/**
* 备注
*/
private
String
remark
;
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
Integer
getCustomerId
()
{
return
customerId
;
}
public
void
setCustomerId
(
Integer
customerId
)
{
this
.
customerId
=
customerId
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Integer
getCreateBy
()
{
return
createBy
;
}
public
void
setCreateBy
(
Integer
createBy
)
{
this
.
createBy
=
createBy
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
getClass
().
getSimpleName
());
sb
.
append
(
" ["
);
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", customerId="
).
append
(
customerId
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", createBy="
).
append
(
createBy
);
sb
.
append
(
", remark="
).
append
(
remark
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
}
\ No newline at end of file
\ No newline at end of file
src/main/java/com/glsx/model/PlatformCustomer.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
model
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* <p>Description:
* <p>Project: shop
*
* @author wbh
* @date 2020-12-15
*/
/**
* 客户管理表
*/
public
class
PlatformCustomer
implements
Serializable
{
/**
* 主键
*/
private
Integer
id
;
/**
* 客户名称
*/
private
String
customerName
;
/**
* 联系人
*/
private
String
contactPerson
;
/**
* 密码
*/
private
String
password
;
/**
* 联系电话
*/
private
String
contactNumber
;
/**
* 联系邮箱
*/
private
String
contactEmail
;
/**
* 省份 sys_area的id
*/
private
Integer
province
;
/**
* 城市 sys_area的id
*/
private
Integer
city
;
/**
* 城市 sys_area的id
*/
private
Integer
Area
;
/**
* 详细地址
*/
private
String
address
;
/**
* 账号状态 0 停用 1 正常 2 待审核 3 审核未通过
*/
private
Integer
status
;
/**
* 公钥
*/
private
String
publicKey
;
/**
* 私钥
*/
private
String
privateKey
;
/**
* 渠道号
*/
private
String
channelNumber
;
/**
* 创建d时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
/**
* 创建人
*/
private
Integer
createBy
;
/**
* 更新人
*/
private
Integer
updateBy
;
/**
* 备注
*/
private
String
remark
;
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
String
getCustomerName
()
{
return
customerName
;
}
public
void
setCustomerName
(
String
customerName
)
{
this
.
customerName
=
customerName
;
}
public
String
getContactPerson
()
{
return
contactPerson
;
}
public
void
setContactPerson
(
String
contactPerson
)
{
this
.
contactPerson
=
contactPerson
;
}
public
String
getPassword
()
{
return
password
;
}
public
void
setPassword
(
String
password
)
{
this
.
password
=
password
;
}
public
String
getContactNumber
()
{
return
contactNumber
;
}
public
void
setContactNumber
(
String
contactNumber
)
{
this
.
contactNumber
=
contactNumber
;
}
public
String
getContactEmail
()
{
return
contactEmail
;
}
public
void
setContactEmail
(
String
contactEmail
)
{
this
.
contactEmail
=
contactEmail
;
}
public
Integer
getProvince
()
{
return
province
;
}
public
void
setProvince
(
Integer
province
)
{
this
.
province
=
province
;
}
public
Integer
getCity
()
{
return
city
;
}
public
void
setCity
(
Integer
city
)
{
this
.
city
=
city
;
}
public
String
getAddress
()
{
return
address
;
}
public
void
setAddress
(
String
address
)
{
this
.
address
=
address
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
String
getPublicKey
()
{
return
publicKey
;
}
public
void
setPublicKey
(
String
publicKey
)
{
this
.
publicKey
=
publicKey
;
}
public
String
getPrivateKey
()
{
return
privateKey
;
}
public
void
setPrivateKey
(
String
privateKey
)
{
this
.
privateKey
=
privateKey
;
}
public
String
getChannelNumber
()
{
return
channelNumber
;
}
public
void
setChannelNumber
(
String
channelNumber
)
{
this
.
channelNumber
=
channelNumber
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
Integer
getCreateBy
()
{
return
createBy
;
}
public
void
setCreateBy
(
Integer
createBy
)
{
this
.
createBy
=
createBy
;
}
public
Integer
getUpdateBy
()
{
return
updateBy
;
}
public
void
setUpdateBy
(
Integer
updateBy
)
{
this
.
updateBy
=
updateBy
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
Integer
getArea
()
{
return
Area
;
}
public
void
setArea
(
Integer
area
)
{
Area
=
area
;
}
@Override
public
String
toString
()
{
return
"PlatformCustomer{"
+
"id="
+
id
+
", customerName='"
+
customerName
+
'\''
+
", contactPerson='"
+
contactPerson
+
'\''
+
", password='"
+
password
+
'\''
+
", contactNumber='"
+
contactNumber
+
'\''
+
", contactEmail='"
+
contactEmail
+
'\''
+
", province="
+
province
+
", city="
+
city
+
", Area="
+
Area
+
", address='"
+
address
+
'\''
+
", status="
+
status
+
", publicKey='"
+
publicKey
+
'\''
+
", privateKey='"
+
privateKey
+
'\''
+
", channelNumber='"
+
channelNumber
+
'\''
+
", createTime="
+
createTime
+
", updateTime="
+
updateTime
+
", createBy="
+
createBy
+
", updateBy="
+
updateBy
+
", remark='"
+
remark
+
'\''
+
'}'
;
}
}
\ No newline at end of file
\ No newline at end of file
src/main/java/com/glsx/model/PlatformDevice.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
model
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* <p>Description:
* <p>Project: shop
*
* @author wbh
* @date 2020-12-15
*/
/**
* 设备管理表
*/
public
class
PlatformDevice
implements
Serializable
{
/**
* 主键
*/
private
Integer
id
;
/**
* 设备SN
*/
private
String
deviceSn
;
/**
* 类型
*/
private
String
deviceType
;
/**
* 客户id t_platform_customer表的id
*/
private
Integer
customerId
;
/**
* 客户名称
*/
private
String
customerName
;
/**
* 激活时间
*/
private
Date
activatTime
;
/**
* 设备状态 0 异常 1 正常
*/
private
Integer
status
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
/**
* 创建人
*/
private
Integer
createBy
;
/**
* 更新人
*/
private
Integer
updateBy
;
/**
* 备注
*/
private
String
remark
;
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
String
getDeviceSn
()
{
return
deviceSn
;
}
public
void
setDeviceSn
(
String
deviceSn
)
{
this
.
deviceSn
=
deviceSn
;
}
public
String
getDeviceType
()
{
return
deviceType
;
}
public
void
setDeviceType
(
String
deviceType
)
{
this
.
deviceType
=
deviceType
;
}
public
Integer
getCustomerId
()
{
return
customerId
;
}
public
void
setCustomerId
(
Integer
customerId
)
{
this
.
customerId
=
customerId
;
}
public
Date
getActivatTime
()
{
return
activatTime
;
}
public
void
setActivatTime
(
Date
activatTime
)
{
this
.
activatTime
=
activatTime
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
Integer
getCreateBy
()
{
return
createBy
;
}
public
void
setCreateBy
(
Integer
createBy
)
{
this
.
createBy
=
createBy
;
}
public
Integer
getUpdateBy
()
{
return
updateBy
;
}
public
void
setUpdateBy
(
Integer
updateBy
)
{
this
.
updateBy
=
updateBy
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getCustomerName
()
{
return
customerName
;
}
public
void
setCustomerName
(
String
customerName
)
{
this
.
customerName
=
customerName
;
}
@Override
public
String
toString
()
{
return
"PlatformDevice{"
+
"id="
+
id
+
", deviceSn='"
+
deviceSn
+
'\''
+
", deviceType='"
+
deviceType
+
'\''
+
", customerId="
+
customerId
+
", customerName='"
+
customerName
+
'\''
+
", activatTime="
+
activatTime
+
", status="
+
status
+
", createTime="
+
createTime
+
", updateTime="
+
updateTime
+
", createBy="
+
createBy
+
", updateBy="
+
updateBy
+
", remark='"
+
remark
+
'\''
+
'}'
;
}
}
\ No newline at end of file
\ No newline at end of file
src/main/java/com/glsx/model/PlatformUser.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
model
;
import
java.io.Serializable
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
/**
* <p>Description:
* <p>Project: shop
*
* @author wbh
* @date 2020-12-15
*/
/**
* 用户管理表
*/
public
class
PlatformUser
implements
Serializable
{
/**
* 客户名称
*/
private
String
customerName
;
/**
* 省份名称
*/
private
String
provinceName
;
/**
* 城市名称
*/
private
String
cityName
;
/**
* 主键
*/
private
Integer
id
;
/**
* 昵称,账号
*/
private
String
nickname
;
/**
* 联系电话
*/
private
String
contactNumber
;
/**
* 微信ID
*/
private
String
wechatId
;
/**
* 省份 sys_area的id
*/
private
Integer
province
;
/**
* 城市 sys_area的id
*/
private
Integer
city
;
/**
* 客户id t_platform_customer表的id
*/
private
Integer
customerId
;
/**
* 最后登录时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
lastLoginTime
;
/**
* APP 账户ID
*/
private
Integer
appAccountId
;
/**
* 创建时间 注册时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
/**
* 更新时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
updateTime
;
/**
* 创建人
*/
private
Integer
createBy
;
/**
* 更新人
*/
private
Integer
updateBy
;
/**
* 备注
*/
private
String
remark
;
public
String
getCustomerName
()
{
return
customerName
;
}
public
void
setCustomerName
(
String
customerName
)
{
this
.
customerName
=
customerName
;
}
public
String
getProvinceName
()
{
return
provinceName
;
}
public
void
setProvinceName
(
String
provinceName
)
{
this
.
provinceName
=
provinceName
;
}
public
String
getCityName
()
{
return
cityName
;
}
public
void
setCityName
(
String
cityName
)
{
this
.
cityName
=
cityName
;
}
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
String
getNickname
()
{
return
nickname
;
}
public
void
setNickname
(
String
nickname
)
{
this
.
nickname
=
nickname
;
}
public
String
getContactNumber
()
{
return
contactNumber
;
}
public
void
setContactNumber
(
String
contactNumber
)
{
this
.
contactNumber
=
contactNumber
;
}
public
String
getWechatId
()
{
return
wechatId
;
}
public
void
setWechatId
(
String
wechatId
)
{
this
.
wechatId
=
wechatId
;
}
public
Integer
getProvince
()
{
return
province
;
}
public
void
setProvince
(
Integer
province
)
{
this
.
province
=
province
;
}
public
Integer
getCity
()
{
return
city
;
}
public
void
setCity
(
Integer
city
)
{
this
.
city
=
city
;
}
public
Integer
getCustomerId
()
{
return
customerId
;
}
public
void
setCustomerId
(
Integer
customerId
)
{
this
.
customerId
=
customerId
;
}
public
Date
getLastLoginTime
()
{
return
lastLoginTime
;
}
public
void
setLastLoginTime
(
Date
lastLoginTime
)
{
this
.
lastLoginTime
=
lastLoginTime
;
}
public
Integer
getAppAccountId
()
{
return
appAccountId
;
}
public
void
setAppAccountId
(
Integer
appAccountId
)
{
this
.
appAccountId
=
appAccountId
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
Integer
getCreateBy
()
{
return
createBy
;
}
public
void
setCreateBy
(
Integer
createBy
)
{
this
.
createBy
=
createBy
;
}
public
Integer
getUpdateBy
()
{
return
updateBy
;
}
public
void
setUpdateBy
(
Integer
updateBy
)
{
this
.
updateBy
=
updateBy
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
@Override
public
String
toString
()
{
return
"PlatformUser{"
+
"customerName='"
+
customerName
+
'\''
+
", provinceName='"
+
provinceName
+
'\''
+
", cityName='"
+
cityName
+
'\''
+
", id="
+
id
+
", nickname='"
+
nickname
+
'\''
+
", contactNumber='"
+
contactNumber
+
'\''
+
", wechatId='"
+
wechatId
+
'\''
+
", province="
+
province
+
", city="
+
city
+
", customerId="
+
customerId
+
", lastLoginTime="
+
lastLoginTime
+
", appAccountId="
+
appAccountId
+
", createTime="
+
createTime
+
", updateTime="
+
updateTime
+
", createBy="
+
createBy
+
", updateBy="
+
updateBy
+
", remark='"
+
remark
+
'\''
+
'}'
;
}
}
src/main/java/com/glsx/service/AdMgrService.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
service
;
import
com.glsx.model.PlatformAd
;
import
java.util.List
;
public
interface
AdMgrService
{
List
<
PlatformAd
>
getAdMgrList
();
int
insertAd
(
PlatformAd
ad
);
int
updateAd
(
PlatformAd
ad
);
int
startandstop
(
int
id
,
int
status
);
}
src/main/java/com/glsx/service/ApiCallMgrService.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
service
;
import
com.glsx.model.PlatformApiCall
;
import
com.glsx.vo.ApiCallVo
;
import
java.util.List
;
import
java.util.Map
;
public
interface
ApiCallMgrService
{
List
<
PlatformApiCall
>
getApiCallMgrList
(
ApiCallVo
apiCallVo
);
int
getApiCallCount
();
List
<
Map
<
String
,
Integer
>>
getApiCallGraphData
();
List
<
Map
<
String
,
Integer
>>
getApiCallTrendList
();
}
src/main/java/com/glsx/service/ApiMgrService.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
service
;
import
com.glsx.model.PlatformApi
;
import
java.util.List
;
public
interface
ApiMgrService
{
List
<
PlatformApi
>
getApiMgrList
();
int
startAndStop
(
int
id
,
int
status
);
}
src/main/java/com/glsx/service/AppDownloadMgrService.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
service
;
public
interface
AppDownloadMgrService
{
int
getApiCallCountAuth
(
String
customerName
);
}
src/main/java/com/glsx/service/CustomerMgrService.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
service
;
import
com.glsx.model.PlatformCustomer
;
import
java.util.List
;
public
interface
CustomerMgrService
{
List
<
PlatformCustomer
>
getCustomerMgrList
();
int
reset
(
int
id
);
int
startAndStop
(
int
id
,
int
status
);
int
getCustomerCount
();
int
register
(
PlatformCustomer
customer
);
int
login
(
PlatformCustomer
customer
);
}
src/main/java/com/glsx/service/DeviceMgrService.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
service
;
import
com.glsx.model.PlatformDevice
;
import
com.glsx.vo.DeviceVo
;
import
java.util.List
;
import
java.util.Map
;
public
interface
DeviceMgrService
{
List
<
PlatformDevice
>
getDeviceMgrList
(
DeviceVo
deviceVo
);
List
<
String
>
getCustomerNameList
();
List
<
String
>
getDeviceTypeList
();
int
getDeviceCount
();
List
<
Map
<
String
,
Integer
>>
getDeviceGraphData
();
int
getDeviceCountAuth
(
String
customerName
);
List
<
Map
<
String
,
Integer
>>
getDeviceAccessTrendList
();
}
src/main/java/com/glsx/service/IndexService.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
service
;
import
java.util.Map
;
/**
* <p>Description:
* <p>Project: open-platform-admin
*
* @author wbh
* @date 2020-12-16
*/
public
interface
IndexService
{
Map
<
String
,
Integer
>
getUcSummaryStatistic
(
String
customerName
);
Map
<
String
,
Integer
>
getUcDeviceActivationStatistic
(
String
customerName
);
Map
<
String
,
Integer
>
getUcUserActivityStatistic
(
String
customerName
);
Map
<
String
,
Integer
>
getUcAppDownloadStatistic
(
String
customerName
);
}
src/main/java/com/glsx/service/UserMgrService.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
service
;
import
com.glsx.model.PlatformUser
;
import
com.glsx.vo.UserVo
;
import
java.util.List
;
public
interface
UserMgrService
{
List
<
PlatformUser
>
getUserMgrList
(
UserVo
userVo
);
List
<
String
>
getCustomerNameList
();
int
getUserCount
();
int
getUserCountAuth
(
String
customerName
);
}
src/main/java/com/glsx/service/impl/AdMgrServiceImpl.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
service
.
impl
;
import
com.glsx.mapper.PlatformAdMapper
;
import
com.glsx.model.PlatformAd
;
import
com.glsx.service.AdMgrService
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.Date
;
import
java.util.List
;
@Service
public
class
AdMgrServiceImpl
implements
AdMgrService
{
/**
* 日志
*/
private
final
static
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
AdMgrServiceImpl
.
class
);
@Resource
private
PlatformAdMapper
adMapper
;
@Override
public
List
<
PlatformAd
>
getAdMgrList
()
{
return
adMapper
.
getAdMgrList
();
}
@Override
public
int
insertAd
(
PlatformAd
ad
)
{
ad
.
setCreateTime
(
new
Date
());
return
adMapper
.
insert
(
ad
);
}
@Override
public
int
updateAd
(
PlatformAd
ad
)
{
ad
.
setUpdateTime
(
new
Date
());
return
adMapper
.
updateByPrimaryKeySelective
(
ad
);
}
@Override
public
int
startandstop
(
int
id
,
int
status
)
{
PlatformAd
ad
=
new
PlatformAd
();
ad
.
setId
(
id
);
ad
.
setStatus
(
status
);
return
adMapper
.
updateByPrimaryKeySelective
(
ad
);
}
}
src/main/java/com/glsx/service/impl/ApiCallMgrServiceImpl.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
service
.
impl
;
import
com.glsx.mapper.PlatformApiCallMapper
;
import
com.glsx.model.PlatformApiCall
;
import
com.glsx.service.ApiCallMgrService
;
import
com.glsx.vo.ApiCallVo
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.Map
;
@Service
public
class
ApiCallMgrServiceImpl
implements
ApiCallMgrService
{
/**
* 日志
*/
private
final
static
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
ApiCallMgrServiceImpl
.
class
);
@Resource
private
PlatformApiCallMapper
apiCallMapper
;
@Override
public
List
<
PlatformApiCall
>
getApiCallMgrList
(
ApiCallVo
apiCallVo
)
{
return
apiCallMapper
.
getApiCallMgrList
(
apiCallVo
);
}
@Override
public
int
getApiCallCount
()
{
return
apiCallMapper
.
getApiCallCount
();
}
@Override
public
List
<
Map
<
String
,
Integer
>>
getApiCallGraphData
()
{
return
apiCallMapper
.
getApiCallGraphData
();
}
@Override
public
List
<
Map
<
String
,
Integer
>>
getApiCallTrendList
()
{
return
apiCallMapper
.
getApiCallTrendList
();
}
}
src/main/java/com/glsx/service/impl/ApiMgrServiceImpl.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
service
.
impl
;
import
com.glsx.mapper.PlatformApiMapper
;
import
com.glsx.model.PlatformApi
;
import
com.glsx.service.ApiMgrService
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
@Service
public
class
ApiMgrServiceImpl
implements
ApiMgrService
{
/**
* 日志
*/
private
final
static
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
ApiMgrServiceImpl
.
class
);
@Resource
private
PlatformApiMapper
apiMapper
;
@Override
public
List
<
PlatformApi
>
getApiMgrList
()
{
return
apiMapper
.
getApiMgrList
();
}
@Override
public
int
startAndStop
(
int
id
,
int
status
)
{
PlatformApi
api
=
new
PlatformApi
();
api
.
setId
(
id
);
api
.
setStatus
(
status
);
return
apiMapper
.
updateByPrimaryKeySelective
(
api
);
}
}
src/main/java/com/glsx/service/impl/AppDownloadMgrServiceImpl.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
service
.
impl
;
import
com.glsx.mapper.PlatformAppDownloadMapper
;
import
com.glsx.service.AppDownloadMgrService
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
@Service
public
class
AppDownloadMgrServiceImpl
implements
AppDownloadMgrService
{
/**
* 日志
*/
private
final
static
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
AppDownloadMgrServiceImpl
.
class
);
@Resource
private
PlatformAppDownloadMapper
appDownloadMapper
;
@Override
public
int
getApiCallCountAuth
(
String
customerName
)
{
return
appDownloadMapper
.
getApiCallCountAuth
(
customerName
);
}
}
src/main/java/com/glsx/service/impl/CustomerMgrServiceImpl.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
service
.
impl
;
import
com.glsx.mapper.PlatformCustomerMapper
;
import
com.glsx.model.PlatformCustomer
;
import
com.glsx.service.CustomerMgrService
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
@Service
public
class
CustomerMgrServiceImpl
implements
CustomerMgrService
{
/**
* 日志
*/
private
final
static
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
CustomerMgrServiceImpl
.
class
);
@Resource
private
PlatformCustomerMapper
customerMapper
;
@Override
public
List
<
PlatformCustomer
>
getCustomerMgrList
()
{
return
customerMapper
.
getCustomerMgrList
();
}
@Override
public
int
reset
(
int
id
)
{
PlatformCustomer
customer
=
new
PlatformCustomer
();
customer
.
setId
(
id
);
customer
.
setPassword
(
"12345678"
);
return
customerMapper
.
updateByPrimaryKeySelective
(
customer
);
}
@Override
public
int
startAndStop
(
int
id
,
int
status
)
{
PlatformCustomer
customer
=
new
PlatformCustomer
();
customer
.
setId
(
id
);
customer
.
setStatus
(
status
);
return
customerMapper
.
updateByPrimaryKeySelective
(
customer
);
}
@Override
public
int
getCustomerCount
()
{
return
customerMapper
.
getCustomerCount
();
}
@Override
public
int
register
(
PlatformCustomer
customer
)
{
return
customerMapper
.
insertSelective
(
customer
);
}
@Override
public
int
login
(
PlatformCustomer
customer
)
{
return
customerMapper
.
login
(
customer
);
}
}
src/main/java/com/glsx/service/impl/DeviceMgrServiceImpl.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
service
.
impl
;
import
com.glsx.mapper.PlatformCustomerMapper
;
import
com.glsx.mapper.PlatformDeviceMapper
;
import
com.glsx.model.PlatformDevice
;
import
com.glsx.service.DeviceMgrService
;
import
com.glsx.vo.DeviceVo
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.Map
;
@Service
public
class
DeviceMgrServiceImpl
implements
DeviceMgrService
{
/**
* 日志
*/
private
final
static
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
DeviceMgrServiceImpl
.
class
);
@Resource
private
PlatformDeviceMapper
deviceMapper
;
@Resource
private
PlatformCustomerMapper
customerMapper
;
@Override
public
List
<
PlatformDevice
>
getDeviceMgrList
(
DeviceVo
deviceVo
)
{
return
deviceMapper
.
getDeviceMgrList
(
deviceVo
);
}
@Override
public
List
<
String
>
getCustomerNameList
()
{
return
customerMapper
.
getCustomerNameList
();
}
@Override
public
List
<
String
>
getDeviceTypeList
()
{
return
deviceMapper
.
getDeviceTypeList
();
}
@Override
public
int
getDeviceCount
()
{
return
deviceMapper
.
getDeviceCount
();
}
@Override
public
List
<
Map
<
String
,
Integer
>>
getDeviceGraphData
()
{
return
deviceMapper
.
getDeviceGraphData
();
}
@Override
public
int
getDeviceCountAuth
(
String
customerName
)
{
return
deviceMapper
.
getDeviceCountAuth
(
customerName
);
}
@Override
public
List
<
Map
<
String
,
Integer
>>
getDeviceAccessTrendList
()
{
return
deviceMapper
.
getDeviceAccessTrendList
();
}
}
src/main/java/com/glsx/service/impl/IndexServiceImpl.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
service
.
impl
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
cn.hutool.core.date.DateUtil
;
import
com.glsx.mapper.PlatformAppDownloadMapper
;
import
com.glsx.mapper.PlatformDeviceMapper
;
import
com.glsx.mapper.PlatformUserMapper
;
import
com.glsx.service.IndexService
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
/**
* <p>Description: 总览业务
* <p>Project: open-platform-admin
*
* @author wbh
* @date 2020-12-16
*/
@Service
public
class
IndexServiceImpl
implements
IndexService
{
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
this
.
getClass
());
@Autowired
private
PlatformDeviceMapper
deviceMapper
;
@Autowired
private
PlatformUserMapper
userMapper
;
@Autowired
private
PlatformAppDownloadMapper
appDownloadMapper
;
@Override
public
Map
<
String
,
Integer
>
getUcSummaryStatistic
(
String
customerName
)
{
Map
<
String
,
Integer
>
statisticMap
=
new
HashMap
<>();
int
deviceCount
=
this
.
deviceMapper
.
getDeviceCountAuth
(
customerName
);
int
userCount
=
this
.
userMapper
.
getUserCountAuth
(
customerName
);
int
appDownloadCount
=
this
.
appDownloadMapper
.
getApiCallCountAuth
(
customerName
);
statisticMap
.
put
(
"deviceCount"
,
deviceCount
);
statisticMap
.
put
(
"userCount"
,
userCount
);
statisticMap
.
put
(
"appDownloadCount"
,
appDownloadCount
);
return
statisticMap
;
}
@Override
public
Map
<
String
,
Integer
>
getUcDeviceActivationStatistic
(
String
customerName
)
{
Map
<
String
,
Integer
>
statisticMap
;
List
<
Map
<
String
,
Object
>>
columnList
=
this
.
deviceMapper
.
getDeviceActivationStatistic
(
this
.
getStatisticStartTime
(),
this
.
getStatisticEndTime
(),
customerName
);
statisticMap
=
this
.
convertColumnToMap
(
columnList
);
return
statisticMap
;
}
@Override
public
Map
<
String
,
Integer
>
getUcUserActivityStatistic
(
String
customerName
)
{
Map
<
String
,
Integer
>
statisticMap
;
List
<
Map
<
String
,
Object
>>
columnList
=
this
.
userMapper
.
getUserActivityStatistic
(
this
.
getStatisticStartTime
(),
this
.
getStatisticEndTime
(),
customerName
);
statisticMap
=
this
.
convertColumnToMap
(
columnList
);
return
statisticMap
;
}
@Override
public
Map
<
String
,
Integer
>
getUcAppDownloadStatistic
(
String
customerName
)
{
Map
<
String
,
Integer
>
statisticMap
;
List
<
Map
<
String
,
Object
>>
columnList
=
this
.
appDownloadMapper
.
getAppDownloadStatistic
(
this
.
getStatisticStartTime
(),
this
.
getStatisticEndTime
(),
customerName
);
statisticMap
=
this
.
convertColumnToMap
(
columnList
);
return
statisticMap
;
}
private
Date
getStatisticStartTime
()
{
return
DateUtil
.
beginOfDay
(
new
Date
());
}
private
Date
getStatisticEndTime
()
{
return
DateUtil
.
offsetDay
(
DateUtil
.
beginOfDay
(
new
Date
()),
-
31
);
}
private
Map
<
String
,
Integer
>
convertColumnToMap
(
List
<
Map
<
String
,
Object
>>
columnList
)
{
Map
<
String
,
Integer
>
statisticMap
=
new
HashMap
<>();
for
(
Map
<
String
,
Object
>
columnMap
:
columnList
)
{
statisticMap
.
put
((
String
)
columnMap
.
get
(
"time"
),
(
Integer
)
columnMap
.
get
(
"count"
));
}
return
statisticMap
;
}
}
src/main/java/com/glsx/service/impl/UserMgrServiceImpl.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
service
.
impl
;
import
com.glsx.mapper.PlatformCustomerMapper
;
import
com.glsx.mapper.PlatformUserMapper
;
import
com.glsx.model.PlatformUser
;
import
com.glsx.service.UserMgrService
;
import
com.glsx.vo.UserVo
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
@Service
public
class
UserMgrServiceImpl
implements
UserMgrService
{
/**
* 日志
*/
private
final
static
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
UserMgrServiceImpl
.
class
);
@Resource
private
PlatformUserMapper
userMapper
;
@Resource
private
PlatformCustomerMapper
customerMapper
;
@Override
public
List
<
PlatformUser
>
getUserMgrList
(
UserVo
userVo
)
{
return
userMapper
.
getUserMgrList
(
userVo
);
}
@Override
public
List
<
String
>
getCustomerNameList
()
{
return
customerMapper
.
getCustomerNameList
();
}
@Override
public
int
getUserCount
()
{
return
userMapper
.
getUserCount
();
}
@Override
public
int
getUserCountAuth
(
String
customerName
)
{
return
userMapper
.
getUserCountAuth
(
customerName
);
}
}
src/main/java/com/glsx/vo/ApiCallVo.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
vo
;
import
java.io.Serializable
;
import
java.util.Date
;
import
org.oreframework.web.ui.Pagination
;
/**
* <p>Description:
* <p>Project: shop
*
* @author wbh
* @date 2020-12-15
*/
/**
* api调用表
*/
public
class
ApiCallVo
extends
Pagination
implements
Serializable
{
/**
* 访问开始时间
*/
private
Date
accessStartTime
;
/**
* 访问结束时间
*/
private
Date
accessEndTime
;
public
Date
getAccessStartTime
()
{
return
accessStartTime
;
}
public
void
setAccessStartTime
(
Date
accessStartTime
)
{
this
.
accessStartTime
=
accessStartTime
;
}
public
Date
getAccessEndTime
()
{
return
accessEndTime
;
}
public
void
setAccessEndTime
(
Date
accessEndTime
)
{
this
.
accessEndTime
=
accessEndTime
;
}
}
src/main/java/com/glsx/vo/DeviceVo.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
vo
;
import
java.io.Serializable
;
import
java.util.Date
;
import
org.oreframework.web.ui.Pagination
;
/**
* <p>Description:
* <p>Project: shop
*
* @author wbh
* @date 2020-12-15
*/
/**
* 设备管理表
*/
public
class
DeviceVo
extends
Pagination
implements
Serializable
{
/**
* 客户名称
*/
private
String
customerName
;
/**
* 类型
*/
private
String
deviceType
;
/**
* 激活开始时间
*/
private
Date
activatStartTime
;
/**
* 激活开始时间
*/
private
Date
activatEndTime
;
public
String
getCustomerName
()
{
return
customerName
;
}
public
void
setCustomerName
(
String
customerName
)
{
this
.
customerName
=
customerName
;
}
public
String
getDeviceType
()
{
return
deviceType
;
}
public
void
setDeviceType
(
String
deviceType
)
{
this
.
deviceType
=
deviceType
;
}
public
Date
getActivatStartTime
()
{
return
activatStartTime
;
}
public
void
setActivatStartTime
(
Date
activatStartTime
)
{
this
.
activatStartTime
=
activatStartTime
;
}
public
Date
getActivatEndTime
()
{
return
activatEndTime
;
}
public
void
setActivatEndTime
(
Date
activatEndTime
)
{
this
.
activatEndTime
=
activatEndTime
;
}
}
src/main/java/com/glsx/vo/Pagination.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
vo
;
import
java.util.List
;
public
class
Pagination
<
T
>
{
private
long
total
;
private
List
<
T
>
list
;
public
Pagination
(
long
total
,
List
<
T
>
list
)
{
this
.
total
=
total
;
this
.
list
=
list
;
}
public
long
getTotal
()
{
return
total
;
}
public
void
setTotal
(
long
total
)
{
this
.
total
=
total
;
}
public
List
<
T
>
getList
()
{
return
list
;
}
public
void
setList
(
List
<
T
>
list
)
{
this
.
list
=
list
;
}
@Override
public
String
toString
()
{
return
"Pagination{"
+
"total="
+
total
+
", list="
+
list
+
'}'
;
}
}
src/main/java/com/glsx/vo/R.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
vo
;
import
java.util.Collection
;
import
java.util.HashMap
;
import
java.util.Map
;
import
com.glsx.enums.ResultCodeEnum
;
/**
* 返回数据
*/
public
class
R
extends
HashMap
<
String
,
Object
>
{
private
static
final
long
serialVersionUID
=
1L
;
public
final
static
String
CODE_KEY
=
"code"
;
public
final
static
String
MSG_KEY
=
"message"
;
private
final
static
String
DATA_KEY
=
"data"
;
private
final
static
String
LIST_KEY
=
"list"
;
private
final
static
String
PAGE_KEY
=
"page"
;
private
final
static
String
TOTAL_PAGES_KEY
=
"totalPages"
;
private
final
static
String
TOTAL_ELEMENTS_KEY
=
"totalElements"
;
private
final
static
int
SUCCESS_CODE
=
ResultCodeEnum
.
SUCCESS
.
getCode
();
public
R
()
{
put
(
CODE_KEY
,
SUCCESS_CODE
);
put
(
MSG_KEY
,
"success"
);
}
public
static
R
error
()
{
return
error
(
ResultCodeEnum
.
SERVER_ERROR
);
}
public
static
R
error
(
String
msg
)
{
return
error
(
ResultCodeEnum
.
SERVER_ERROR
.
getCode
(),
msg
);
}
public
static
R
error
(
int
code
,
String
msg
)
{
R
r
=
new
R
();
r
.
put
(
CODE_KEY
,
code
);
r
.
put
(
MSG_KEY
,
msg
);
return
r
;
}
public
static
R
error
(
String
code
,
String
msg
)
{
R
r
=
new
R
();
r
.
put
(
CODE_KEY
,
code
);
r
.
put
(
MSG_KEY
,
msg
);
return
r
;
}
public
static
R
error
(
ResultCodeEnum
resultCodeEnum
)
{
R
r
=
new
R
();
r
.
put
(
CODE_KEY
,
resultCodeEnum
.
getCode
());
r
.
put
(
MSG_KEY
,
resultCodeEnum
.
getMsg
());
return
r
;
}
public
static
R
ok
(
String
msg
)
{
R
r
=
new
R
();
r
.
put
(
MSG_KEY
,
msg
);
return
r
;
}
public
static
R
ok
(
Map
<
String
,
Object
>
map
)
{
R
r
=
new
R
();
r
.
putAll
(
map
);
return
r
;
}
public
static
R
ok
()
{
return
new
R
();
}
public
R
data
(
Object
o
)
{
super
.
put
(
DATA_KEY
,
o
);
return
this
;
}
@Override
public
R
put
(
String
key
,
Object
value
)
{
super
.
put
(
key
,
value
);
return
this
;
}
/**
* 分页信息,需要前端自己算分页数
*
* @param value
* @param totalElements
* @return
*/
public
R
putPageData
(
Object
value
,
long
totalElements
)
{
Map
data
=
new
HashMap
(
2
);
data
.
put
(
LIST_KEY
,
value
);
data
.
put
(
TOTAL_ELEMENTS_KEY
,
totalElements
);
super
.
put
(
DATA_KEY
,
data
);
return
this
;
}
/**
* spring jdbc分页信息
*
* @param page
* @return
*/
public
R
putPageData
(
org
.
springframework
.
data
.
domain
.
Page
page
)
{
Map
data
=
new
HashMap
(
3
);
data
.
put
(
LIST_KEY
,
page
.
getContent
());
//分页数据
data
.
put
(
TOTAL_PAGES_KEY
,
page
.
getTotalPages
());
//总页数
data
.
put
(
TOTAL_ELEMENTS_KEY
,
page
.
getTotalElements
());
//总数
super
.
put
(
DATA_KEY
,
data
);
return
this
;
}
/**
* mybatis pagehelper分页信息
*
* @param page
* @return
*/
public
R
putPageData
(
com
.
github
.
pagehelper
.
PageInfo
page
)
{
Map
data
=
new
HashMap
(
3
);
data
.
put
(
LIST_KEY
,
page
.
getList
());
//分页数据
data
.
put
(
TOTAL_PAGES_KEY
,
page
.
getPages
());
//总页数
data
.
put
(
TOTAL_ELEMENTS_KEY
,
page
.
getTotal
());
//总数
super
.
put
(
DATA_KEY
,
data
);
return
this
;
}
/**
* mybatis pagehelper分页信息
*
* @param page
* @return
*/
public
R
putPageData
(
com
.
github
.
pagehelper
.
Page
<?>
page
,
Collection
<?>
coll
)
{
Map
data
=
new
HashMap
(
2
);
data
.
put
(
PAGE_KEY
,
page
);
//分页信息
data
.
put
(
LIST_KEY
,
coll
);
//分页数据
super
.
put
(
DATA_KEY
,
data
);
return
this
;
}
/**
* 分页信息,需要前端自己算分页数
*
* @param page
* @return
*/
public
R
putPageData
(
Pagination
page
)
{
Map
data
=
new
HashMap
(
2
);
data
.
put
(
LIST_KEY
,
page
.
getList
());
data
.
put
(
TOTAL_ELEMENTS_KEY
,
page
.
getTotal
());
//总数
super
.
put
(
DATA_KEY
,
data
);
return
this
;
}
/**
* 分页信息,需要前端自己算分页数
*
* @param page
* @return
*/
public
R
putPageData
(
Pagination
pagination
,
cn
.
hutool
.
db
.
Page
page
)
{
Map
data
=
new
HashMap
(
3
);
data
.
put
(
PAGE_KEY
,
page
);
//分页信息
data
.
put
(
LIST_KEY
,
pagination
.
getList
());
//数据列表
data
.
put
(
TOTAL_ELEMENTS_KEY
,
pagination
.
getTotal
());
//总数
super
.
put
(
DATA_KEY
,
data
);
return
this
;
}
public
void
setMessage
(
String
formatMessage
)
{
this
.
put
(
MSG_KEY
,
formatMessage
);
}
public
String
getMessage
()
{
return
(
String
)
this
.
get
(
MSG_KEY
);
}
public
void
setCode
(
int
code
)
{
this
.
put
(
CODE_KEY
,
code
);
}
public
int
getCode
()
{
return
(
int
)
this
.
get
(
CODE_KEY
);
}
public
Object
getData
()
{
return
this
.
get
(
DATA_KEY
);
}
public
boolean
isSuccess
()
{
return
SUCCESS_CODE
==
this
.
getCode
();
}
}
src/main/java/com/glsx/vo/UserVo.java
deleted
100644 → 0
View file @
a09cea1
package
com
.
glsx
.
vo
;
import
java.io.Serializable
;
import
java.util.Date
;
import
org.oreframework.web.ui.Pagination
;
/**
* <p>Description:
* <p>Project: shop
*
* @author wbh
* @date 2020-12-15
*/
/**
* 设备管理表
*/
public
class
UserVo
extends
Pagination
implements
Serializable
{
/**
* 客户ID
*/
private
Integer
customerId
;
/**
* 客户名称
*/
private
String
customerName
;
/**
* 类型
*/
private
String
deviceType
;
/**
* 激活开始时间
*/
private
Date
registerStartTime
;
/**
* 激活开始时间
*/
private
Date
registerEndTime
;
public
String
getCustomerName
()
{
return
customerName
;
}
public
void
setCustomerName
(
String
customerName
)
{
this
.
customerName
=
customerName
;
}
public
String
getDeviceType
()
{
return
deviceType
;
}
public
void
setDeviceType
(
String
deviceType
)
{
this
.
deviceType
=
deviceType
;
}
public
Date
getRegisterStartTime
()
{
return
registerStartTime
;
}
public
void
setRegisterStartTime
(
Date
registerStartTime
)
{
this
.
registerStartTime
=
registerStartTime
;
}
public
Date
getRegisterEndTime
()
{
return
registerEndTime
;
}
public
void
setRegisterEndTime
(
Date
registerEndTime
)
{
this
.
registerEndTime
=
registerEndTime
;
}
}
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