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 8c8d60b0
authored
Dec 17, 2020
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
完成基本开发
1 parent
c2faaa49
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
173 additions
and
79 deletions
pom.xml
src/main/java/com/glsx/Main.java
src/main/java/com/glsx/controller/CustomerMgrController.java
src/main/java/com/glsx/controller/IndexController.java
src/main/java/com/glsx/mapper/PlatformApiCallMapper.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/model/PlatformCustomer.java
src/main/java/com/glsx/service/ApiCallMgrService.java
src/main/java/com/glsx/service/CustomerMgrService.java
src/main/java/com/glsx/service/DeviceMgrService.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/CustomerMgrServiceImpl.java
src/main/java/com/glsx/service/impl/DeviceMgrServiceImpl.java
src/main/resources/mapper/PlatformApiCallMapper.xml
src/main/resources/mapper/PlatformCustomerMapper.xml
src/main/resources/mapper/PlatformDeviceMapper.xml
src/main/resources/mapper/PlatformUserMapper.xml
pom.xml
View file @
8c8d60b
...
@@ -49,18 +49,6 @@
...
@@ -49,18 +49,6 @@
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.mybatis
</groupId>
<artifactId>
mybatis
</artifactId>
<version>
3.5.6
</version>
</dependency>
<dependency>
<groupId>
org.mybatis
</groupId>
<artifactId>
mybatis-spring
</artifactId>
<version>
2.0.6
</version>
</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>
...
@@ -78,6 +66,11 @@
...
@@ -78,6 +66,11 @@
<version>
2.4.2
</version>
<version>
2.4.2
</version>
</dependency>
</dependency>
<dependency>
<groupId>
cn.com.glsx.openplatform
</groupId>
<artifactId>
rpc-openplatform-api
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
</dependencies>
</dependencies>
...
...
src/main/java/com/glsx/Main.java
View file @
8c8d60b
package
com
.
glsx
;
package
com
.
glsx
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.oreframework.boot.main.AbsOreBootStarter
;
import
org.oreframework.boot.main.AbsOreBootStarter
;
import
org.springframework.boot.SpringApplication
;
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.context.annotation.ComponentScan
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
...
@@ -21,7 +19,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
...
@@ -21,7 +19,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@SpringBootApplication
@SpringBootApplication
@ServletComponentScan
@ServletComponentScan
@EnableSwagger2
@EnableSwagger2
@MapperScan
(
"com.glsx.mapper"
)
//@MapperScan(basePackages = {"com.glsx.mapper"}
)
public
class
Main
extends
AbsOreBootStarter
{
public
class
Main
extends
AbsOreBootStarter
{
@Override
@Override
...
...
src/main/java/com/glsx/controller/CustomerMgrController.java
View file @
8c8d60b
...
@@ -62,4 +62,25 @@ public class CustomerMgrController {
...
@@ -62,4 +62,25 @@ public class CustomerMgrController {
}
}
return
R
.
ok
(
"账号状态修改成功"
);
return
R
.
ok
(
"账号状态修改成功"
);
}
}
@RequestMapping
(
value
=
"/register"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
R
register
(
PlatformCustomer
customer
)
{
int
num
=
customerMgrService
.
register
(
customer
);
if
(
num
==
0
)
{
return
R
.
error
(
"注册失败"
);
}
return
R
.
ok
(
"注册成功"
);
}
@RequestMapping
(
value
=
"/login"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
R
login
(
PlatformCustomer
customer
)
{
int
num
=
customerMgrService
.
login
(
customer
);
if
(
num
==
0
)
{
return
R
.
error
(
"登陆失败"
);
}
return
R
.
ok
(
"登陆成功"
);
}
}
}
src/main/java/com/glsx/controller/IndexController.java
View file @
8c8d60b
...
@@ -76,10 +76,10 @@ public class IndexController {
...
@@ -76,10 +76,10 @@ public class IndexController {
@RequestMapping
(
value
=
"/getGraphData"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getGraphData"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ResponseBody
public
R
getGraphData
()
{
public
R
getGraphData
()
{
Map
<
String
,
Map
<
String
,
Integer
>>
hashMap
=
new
HashMap
<>();
Map
<
String
,
List
<
Map
<
String
,
Integer
>
>>
hashMap
=
new
HashMap
<>();
Map
<
String
,
Integer
>
deviceGraphData
=
deviceMgrService
.
getDeviceGraphData
();
List
<
Map
<
String
,
Integer
>
>
deviceGraphData
=
deviceMgrService
.
getDeviceGraphData
();
Map
<
String
,
Integer
>
apiCallGraphData
=
apiCallMgrService
.
getApiCallGraphData
();
List
<
Map
<
String
,
Integer
>
>
apiCallGraphData
=
apiCallMgrService
.
getApiCallGraphData
();
hashMap
.
put
(
"deviceGraphData"
,
deviceGraphData
);
hashMap
.
put
(
"deviceGraphData"
,
deviceGraphData
);
hashMap
.
put
(
"apiCallGraphData"
,
apiCallGraphData
);
hashMap
.
put
(
"apiCallGraphData"
,
apiCallGraphData
);
...
@@ -89,23 +89,34 @@ public class IndexController {
...
@@ -89,23 +89,34 @@ public class IndexController {
@RequestMapping
(
value
=
"/getPolylineData"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getPolylineData"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ResponseBody
public
R
getPolylineData
()
{
public
R
getPolylineData
()
{
HashMap
<
String
,
Integer
>
hashMap
=
new
HashMap
<>();
HashMap
<
String
,
List
<
Map
<
String
,
Integer
>>>
hashMap
=
new
HashMap
<>();
int
customerCount
=
customerMgrService
.
getCustomerCount
();
List
<
Map
<
String
,
Integer
>>
deviceAccessTrendList
=
deviceMgrService
.
getDeviceAccessTrendList
();
List
<
Map
<
String
,
Integer
>>
apiCallTrendList
=
apiCallMgrService
.
getApiCallTrendList
();
int
deviceCount
=
deviceMgrService
.
getDeviceCount
();
hashMap
.
put
(
"deviceAccessTrendList"
,
deviceAccessTrendList
);
hashMap
.
put
(
"apiCallTrendList"
,
apiCallTrendList
);
return
R
.
ok
().
data
(
hashMap
);
}
int
userCount
=
userMgrService
.
getUserCount
();
@RequestMapping
(
value
=
"/getStatisticDataForUserConsole"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
R
getStatisticDataForUserConsole1
(
String
customerName
)
{
Map
<
String
,
Integer
>
hashMap
=
new
HashMap
<>();
int
apiCallCount
=
apiCallMgrService
.
getApiCallCount
(
);
int
deviceCountAuth
=
deviceMgrService
.
getDeviceCountAuth
(
customerName
);
hashMap
.
put
(
"customerCount"
,
customerCount
);
int
userCountAuth
=
userMgrService
.
getUserCountAuth
(
customerName
);
hashMap
.
put
(
"deviceCount"
,
deviceCount
);
hashMap
.
put
(
"userCount"
,
userCount
);
int
apiCallCountAuth
=
appDownloadMgrService
.
getApiCallCountAuth
(
customerName
);
hashMap
.
put
(
"apiCallCount"
,
apiCallCount
);
hashMap
.
put
(
"deviceCount"
,
deviceCountAuth
);
hashMap
.
put
(
"userCount"
,
userCountAuth
);
hashMap
.
put
(
"apiCallCount"
,
apiCallCountAuth
);
return
R
.
ok
().
data
(
hashMap
);
return
R
.
ok
().
data
(
hashMap
);
}
}
@RequestMapping
(
value
=
"/getStatisticDataForUserConsole"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getStatisticDataForUserConsole"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ResponseBody
public
R
getStatisticDataForUserConsole
(
String
customerName
)
{
public
R
getStatisticDataForUserConsole
(
String
customerName
)
{
...
...
src/main/java/com/glsx/mapper/PlatformApiCallMapper.java
View file @
8c8d60b
...
@@ -41,5 +41,7 @@ public interface PlatformApiCallMapper {
...
@@ -41,5 +41,7 @@ public interface PlatformApiCallMapper {
int
getApiCallCount
();
int
getApiCallCount
();
Map
<
String
,
Integer
>
getApiCallGraphData
();
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/PlatformAppDownloadMapper.java
View file @
8c8d60b
...
@@ -2,6 +2,7 @@ package com.glsx.mapper;
...
@@ -2,6 +2,7 @@ package com.glsx.mapper;
import
com.glsx.model.PlatformAppDownload
;
import
com.glsx.model.PlatformAppDownload
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.List
;
...
@@ -34,5 +35,5 @@ public interface PlatformAppDownloadMapper {
...
@@ -34,5 +35,5 @@ public interface PlatformAppDownloadMapper {
int
updateBatchSelective
(
List
<
PlatformAppDownload
>
list
);
int
updateBatchSelective
(
List
<
PlatformAppDownload
>
list
);
int
getApiCallCountAuth
(
String
customerName
);
int
getApiCallCountAuth
(
@Param
(
"customerName"
)
String
customerName
);
}
}
\ No newline at end of file
\ No newline at end of file
src/main/java/com/glsx/mapper/PlatformCustomerMapper.java
View file @
8c8d60b
...
@@ -39,4 +39,6 @@ public interface PlatformCustomerMapper {
...
@@ -39,4 +39,6 @@ public interface PlatformCustomerMapper {
List
<
String
>
getCustomerNameList
();
List
<
String
>
getCustomerNameList
();
int
getCustomerCount
();
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
View file @
8c8d60b
...
@@ -43,7 +43,9 @@ public interface PlatformDeviceMapper {
...
@@ -43,7 +43,9 @@ public interface PlatformDeviceMapper {
int
getDeviceCount
();
int
getDeviceCount
();
Map
<
String
,
Integer
>
getDeviceGraphData
();
List
<
Map
<
String
,
Integer
>
>
getDeviceGraphData
();
int
getDeviceCountAuth
(
@Param
(
"customerName"
)
String
customerName
);
int
getDeviceCountAuth
(
@Param
(
"customerName"
)
String
customerName
);
List
<
Map
<
String
,
Integer
>>
getDeviceAccessTrendList
();
}
}
\ No newline at end of file
\ No newline at end of file
src/main/java/com/glsx/model/PlatformCustomer.java
View file @
8c8d60b
...
@@ -56,6 +56,11 @@ public class PlatformCustomer implements Serializable {
...
@@ -56,6 +56,11 @@ public class PlatformCustomer implements Serializable {
private
Integer
city
;
private
Integer
city
;
/**
/**
* 城市 sys_area的id
*/
private
Integer
Area
;
/**
* 详细地址
* 详细地址
*/
*/
private
String
address
;
private
String
address
;
...
@@ -249,31 +254,36 @@ public class PlatformCustomer implements Serializable {
...
@@ -249,31 +254,36 @@ public class PlatformCustomer implements Serializable {
this
.
remark
=
remark
;
this
.
remark
=
remark
;
}
}
public
Integer
getArea
()
{
return
Area
;
}
public
void
setArea
(
Integer
area
)
{
Area
=
area
;
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
return
"PlatformCustomer{"
+
sb
.
append
(
getClass
().
getSimpleName
());
"id="
+
id
+
sb
.
append
(
" ["
);
", customerName='"
+
customerName
+
'\''
+
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
", contactPerson='"
+
contactPerson
+
'\''
+
sb
.
append
(
", id="
).
append
(
id
);
", password='"
+
password
+
'\''
+
sb
.
append
(
", customerName="
).
append
(
customerName
);
", contactNumber='"
+
contactNumber
+
'\''
+
sb
.
append
(
", contactPerson="
).
append
(
contactPerson
);
", contactEmail='"
+
contactEmail
+
'\''
+
sb
.
append
(
", password="
).
append
(
password
);
", province="
+
province
+
sb
.
append
(
", contactNumber="
).
append
(
contactNumber
);
", city="
+
city
+
sb
.
append
(
", contactEmail="
).
append
(
contactEmail
);
", Area="
+
Area
+
sb
.
append
(
", province="
).
append
(
province
);
", address='"
+
address
+
'\''
+
sb
.
append
(
", city="
).
append
(
city
);
", status="
+
status
+
sb
.
append
(
", address="
).
append
(
address
);
", publicKey='"
+
publicKey
+
'\''
+
sb
.
append
(
", status="
).
append
(
status
);
", privateKey='"
+
privateKey
+
'\''
+
sb
.
append
(
", publicKey="
).
append
(
publicKey
);
", channelNumber='"
+
channelNumber
+
'\''
+
sb
.
append
(
", privateKey="
).
append
(
privateKey
);
", createTime="
+
createTime
+
sb
.
append
(
", channelNumber="
).
append
(
channelNumber
);
", updateTime="
+
updateTime
+
sb
.
append
(
", createTime="
).
append
(
createTime
);
", createBy="
+
createBy
+
sb
.
append
(
", updateTime="
).
append
(
updateTime
);
", updateBy="
+
updateBy
+
sb
.
append
(
", createBy="
).
append
(
createBy
);
", remark='"
+
remark
+
'\''
+
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/service/ApiCallMgrService.java
View file @
8c8d60b
...
@@ -11,5 +11,7 @@ public interface ApiCallMgrService {
...
@@ -11,5 +11,7 @@ public interface ApiCallMgrService {
int
getApiCallCount
();
int
getApiCallCount
();
Map
<
String
,
Integer
>
getApiCallGraphData
();
List
<
Map
<
String
,
Integer
>>
getApiCallGraphData
();
List
<
Map
<
String
,
Integer
>>
getApiCallTrendList
();
}
}
src/main/java/com/glsx/service/CustomerMgrService.java
View file @
8c8d60b
...
@@ -12,4 +12,8 @@ public interface CustomerMgrService {
...
@@ -12,4 +12,8 @@ public interface CustomerMgrService {
int
startAndStop
(
int
id
,
int
status
);
int
startAndStop
(
int
id
,
int
status
);
int
getCustomerCount
();
int
getCustomerCount
();
int
register
(
PlatformCustomer
customer
);
int
login
(
PlatformCustomer
customer
);
}
}
src/main/java/com/glsx/service/DeviceMgrService.java
View file @
8c8d60b
...
@@ -15,7 +15,9 @@ public interface DeviceMgrService {
...
@@ -15,7 +15,9 @@ public interface DeviceMgrService {
int
getDeviceCount
();
int
getDeviceCount
();
Map
<
String
,
Integer
>
getDeviceGraphData
();
List
<
Map
<
String
,
Integer
>
>
getDeviceGraphData
();
int
getDeviceCountAuth
(
String
customerName
);
int
getDeviceCountAuth
(
String
customerName
);
List
<
Map
<
String
,
Integer
>>
getDeviceAccessTrendList
();
}
}
src/main/java/com/glsx/service/impl/AdMgrServiceImpl.java
View file @
8c8d60b
...
@@ -8,6 +8,7 @@ import org.slf4j.LoggerFactory;
...
@@ -8,6 +8,7 @@ import org.slf4j.LoggerFactory;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
@Service
@Service
...
@@ -27,11 +28,13 @@ public class AdMgrServiceImpl implements AdMgrService {
...
@@ -27,11 +28,13 @@ public class AdMgrServiceImpl implements AdMgrService {
@Override
@Override
public
int
insertAd
(
PlatformAd
ad
)
{
public
int
insertAd
(
PlatformAd
ad
)
{
ad
.
setCreateTime
(
new
Date
());
return
adMapper
.
insert
(
ad
);
return
adMapper
.
insert
(
ad
);
}
}
@Override
@Override
public
int
updateAd
(
PlatformAd
ad
)
{
public
int
updateAd
(
PlatformAd
ad
)
{
ad
.
setUpdateTime
(
new
Date
());
return
adMapper
.
updateByPrimaryKeySelective
(
ad
);
return
adMapper
.
updateByPrimaryKeySelective
(
ad
);
}
}
...
...
src/main/java/com/glsx/service/impl/ApiCallMgrServiceImpl.java
View file @
8c8d60b
...
@@ -33,7 +33,12 @@ public class ApiCallMgrServiceImpl implements ApiCallMgrService {
...
@@ -33,7 +33,12 @@ public class ApiCallMgrServiceImpl implements ApiCallMgrService {
}
}
@Override
@Override
public
Map
<
String
,
Integer
>
getApiCallGraphData
()
{
public
List
<
Map
<
String
,
Integer
>
>
getApiCallGraphData
()
{
return
apiCallMapper
.
getApiCallGraphData
();
return
apiCallMapper
.
getApiCallGraphData
();
}
}
@Override
public
List
<
Map
<
String
,
Integer
>>
getApiCallTrendList
()
{
return
apiCallMapper
.
getApiCallTrendList
();
}
}
}
src/main/java/com/glsx/service/impl/CustomerMgrServiceImpl.java
View file @
8c8d60b
...
@@ -45,4 +45,14 @@ public class CustomerMgrServiceImpl implements CustomerMgrService {
...
@@ -45,4 +45,14 @@ public class CustomerMgrServiceImpl implements CustomerMgrService {
public
int
getCustomerCount
()
{
public
int
getCustomerCount
()
{
return
customerMapper
.
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
View file @
8c8d60b
...
@@ -47,7 +47,7 @@ public class DeviceMgrServiceImpl implements DeviceMgrService {
...
@@ -47,7 +47,7 @@ public class DeviceMgrServiceImpl implements DeviceMgrService {
}
}
@Override
@Override
public
Map
<
String
,
Integer
>
getDeviceGraphData
()
{
public
List
<
Map
<
String
,
Integer
>
>
getDeviceGraphData
()
{
return
deviceMapper
.
getDeviceGraphData
();
return
deviceMapper
.
getDeviceGraphData
();
}
}
...
@@ -55,4 +55,9 @@ public class DeviceMgrServiceImpl implements DeviceMgrService {
...
@@ -55,4 +55,9 @@ public class DeviceMgrServiceImpl implements DeviceMgrService {
public
int
getDeviceCountAuth
(
String
customerName
)
{
public
int
getDeviceCountAuth
(
String
customerName
)
{
return
deviceMapper
.
getDeviceCountAuth
(
customerName
);
return
deviceMapper
.
getDeviceCountAuth
(
customerName
);
}
}
@Override
public
List
<
Map
<
String
,
Integer
>>
getDeviceAccessTrendList
()
{
return
deviceMapper
.
getDeviceAccessTrendList
();
}
}
}
src/main/resources/mapper/PlatformApiCallMapper.xml
View file @
8c8d60b
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
where id = #{id,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</select>
</select>
<select
id=
"getApiCallMgrList"
resultMap=
"BaseResultMap"
>
<select
id=
"getApiCallMgrList"
parameterType=
"com.glsx.vo.ApiCallVo"
resultMap=
"BaseResultMap"
>
select
select
a.id,
a.id,
b.customer_name,
b.customer_name,
...
@@ -41,11 +41,11 @@
...
@@ -41,11 +41,11 @@
left join t_platform_api c
left join t_platform_api c
on a.api_id = c.id
on a.api_id = c.id
where 1=1
where 1=1
<if
test=
"a
piCallVo.a
ccessStartTime != null "
>
<if
test=
"accessStartTime != null "
>
and create_time
>
=
apiCallVo.accessStartTime
and create_time
>
=
#{accessStartTime,jdbcType=TIMESTAMP}
</if>
</if>
<if
test=
"a
piCallVo.a
ccessEndTime != null "
>
<if
test=
"accessEndTime != null "
>
and create_time
<
=
apiCallVo.accessEndTime
and create_time
<
=
#{accessEndTime,jdbcType=TIMESTAMP}
</if>
</if>
</select>
</select>
...
@@ -62,6 +62,14 @@
...
@@ -62,6 +62,14 @@
group by b.api_classification
group by b.api_classification
</select>
</select>
<select
id=
"getApiCallTrendList"
resultType=
"java.util.Map"
>
select
date_format(create_time,'%Y-%m-%d') as create_time,
count(id)
from t_platform_api_call
group by create_time
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
<!--@mbg.generated-->
<!--@mbg.generated-->
delete from t_platform_api_call
delete from t_platform_api_call
...
...
src/main/resources/mapper/PlatformCustomerMapper.xml
View file @
8c8d60b
...
@@ -54,6 +54,13 @@
...
@@ -54,6 +54,13 @@
from t_platform_customer
from t_platform_customer
</select>
</select>
<select
id=
"login"
parameterType=
"com.glsx.model.PlatformCustomer"
resultType=
"java.lang.Integer"
>
select count(1)
from t_platform_customer
where contact_number = #{contactNumber,jdbcType=VARCHAR}
and password = #{password,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
<!--@mbg.generated-->
<!--@mbg.generated-->
delete from t_platform_customer
delete from t_platform_customer
...
...
src/main/resources/mapper/PlatformDeviceMapper.xml
View file @
8c8d60b
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
where id = #{id,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</select>
</select>
<select
id=
"getDeviceMgrList"
resultMap=
"BaseResultMap"
>
<select
id=
"getDeviceMgrList"
parameterType=
"com.glsx.vo.DeviceVo"
resultMap=
"BaseResultMap"
>
select
select
a.id,
a.id,
a.device_sn,
a.device_sn,
...
@@ -47,17 +47,17 @@
...
@@ -47,17 +47,17 @@
left join t_platform_customer b
left join t_platform_customer b
on a.customer_id = b.id
on a.customer_id = b.id
where 1 = 1
where 1 = 1
<if
test=
"
deviceVo.customerName != null and deviceVo.
customerName != '' "
>
<if
test=
"
customerName != null and
customerName != '' "
>
and b.customer_name = #{
deviceVo.
customerName,jdbcType=VARCHAR}
and b.customer_name = #{customerName,jdbcType=VARCHAR}
</if>
</if>
<if
test=
"device
Vo.deviceType != null and deviceVo.
deviceType != '' "
>
<if
test=
"device
Type != null and
deviceType != '' "
>
and a.device_type = #{device
Vo.device
Type,jdbcType=VARCHAR}
and a.device_type = #{deviceType,jdbcType=VARCHAR}
</if>
</if>
<if
test=
"
deviceVo.activatStartTime != null and deviceVo.
activatStartTime != '' "
>
<if
test=
"
activatStartTime != null and
activatStartTime != '' "
>
and a.create_time
>
=
apiCallVo.accessStartTime
and a.create_time
>
=
#{accessStartTime,jdbcType=TIMESTAMP}
</if>
</if>
<if
test=
"
deviceVo.activatEndTime != null and deviceVo.
activatEndTime != '' "
>
<if
test=
"
activatEndTime != null and
activatEndTime != '' "
>
and a.create_time
<
=
apiCallVo.accessEndTime
and a.create_time
<
=
#{accessEndTime,jdbcType=TIMESTAMP}
</if>
</if>
</select>
</select>
...
@@ -88,6 +88,14 @@
...
@@ -88,6 +88,14 @@
where b.customer_name = #{customerName,jdbcType=VARCHAR}
where b.customer_name = #{customerName,jdbcType=VARCHAR}
</select>
</select>
<select
id=
"getDeviceAccessTrendList"
resultType=
"java.util.Map"
>
select
date_format(activat_time,'%Y-%m-%d') as activat_time,
count(id)
from t_platform_device
group by activat_time
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
<!--@mbg.generated-->
<!--@mbg.generated-->
delete from t_platform_device
delete from t_platform_device
...
...
src/main/resources/mapper/PlatformUserMapper.xml
View file @
8c8d60b
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
where id = #{id,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</select>
</select>
<select
id=
"getUserMgrList"
resultMap=
"BaseResultMap"
>
<select
id=
"getUserMgrList"
parameterType=
"com.glsx.vo.UserVo"
resultMap=
"BaseResultMap"
>
select
select
a.id,
a.id,
a.nickname,
a.nickname,
...
@@ -53,14 +53,14 @@
...
@@ -53,14 +53,14 @@
left join t_platform_customer b
left join t_platform_customer b
on a.customer_id = b.id
on a.customer_id = b.id
where 1 = 1
where 1 = 1
<if
test=
"
userVo.customerName != null and userVo.
customerName != '' "
>
<if
test=
"
customerName != null and
customerName != '' "
>
and b.customer_name = #{
userVo.
customerName,jdbcType=VARCHAR}
and b.customer_name = #{customerName,jdbcType=VARCHAR}
</if>
</if>
<if
test=
"
userVo.registerStartTime != null and userVo.
registerStartTime != '' "
>
<if
test=
"
registerStartTime != null and
registerStartTime != '' "
>
and a.create_time
>
=
userVo.registerStartTime
and a.create_time
>
=
#{registerStartTime,jdbcType=VARCHAR}
</if>
</if>
<if
test=
"
userVo.registerEndTime != null and userVo.
registerEndTime != '' "
>
<if
test=
"
registerEndTime != null and
registerEndTime != '' "
>
and a.create_time
<
=
userVo.registerEndTime
and a.create_time
<
=
#{registerEndTime,jdbcType=VARCHAR}
</if>
</if>
</select>
</select>
...
...
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