Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
open-source
/
rpc-openplatform
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0420d1bd
authored
Dec 18, 2020
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
完成Dubbo基本开发 yangll
1 parent
ff67c891
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
116 additions
and
7 deletions
rpc-openplatform-api/src/main/java/cn/com/glsx/openplatform/model/PlatformCustomer.java
rpc-openplatform-api/src/main/java/cn/com/glsx/openplatform/model/PlatformUser.java
rpc-openplatform-container/src/main/java/cn/com/glsx/openplatform/service/IceOpenApiServiceImpl.java
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformCustomerMapper.xml
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformUserMapper.xml
rpc-openplatform-api/src/main/java/cn/com/glsx/openplatform/model/PlatformCustomer.java
View file @
0420d1b
...
@@ -2,6 +2,7 @@ package cn.com.glsx.openplatform.model;
...
@@ -2,6 +2,7 @@ package cn.com.glsx.openplatform.model;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
org.springframework.format.annotation.DateTimeFormat
;
...
@@ -53,6 +54,11 @@ public class PlatformCustomer implements Serializable {
...
@@ -53,6 +54,11 @@ public class PlatformCustomer implements Serializable {
private
Integer
province
;
private
Integer
province
;
/**
/**
* 省份 sys_area的id
*/
private
String
provinceName
;
/**
* 城市 sys_area的id
* 城市 sys_area的id
*/
*/
private
Integer
city
;
private
Integer
city
;
...
@@ -60,9 +66,19 @@ public class PlatformCustomer implements Serializable {
...
@@ -60,9 +66,19 @@ public class PlatformCustomer implements Serializable {
/**
/**
* 城市 sys_area的id
* 城市 sys_area的id
*/
*/
private
String
cityName
;
/**
* 区 sys_area的id
*/
private
Integer
area
;
private
Integer
area
;
/**
/**
* area sys_area的id
*/
private
String
areaName
;
/**
* 详细地址
* 详细地址
*/
*/
private
String
address
;
private
String
address
;
...
@@ -268,6 +284,30 @@ public class PlatformCustomer implements Serializable {
...
@@ -268,6 +284,30 @@ public class PlatformCustomer implements Serializable {
this
.
area
=
area
;
this
.
area
=
area
;
}
}
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
String
getAreaName
()
{
return
areaName
;
}
public
void
setAreaName
(
String
areaName
)
{
this
.
areaName
=
areaName
;
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"PlatformCustomer{"
+
return
"PlatformCustomer{"
+
...
@@ -278,8 +318,11 @@ public class PlatformCustomer implements Serializable {
...
@@ -278,8 +318,11 @@ public class PlatformCustomer implements Serializable {
", contactNumber='"
+
contactNumber
+
'\''
+
", contactNumber='"
+
contactNumber
+
'\''
+
", contactEmail='"
+
contactEmail
+
'\''
+
", contactEmail='"
+
contactEmail
+
'\''
+
", province="
+
province
+
", province="
+
province
+
", provinceName='"
+
provinceName
+
'\''
+
", city="
+
city
+
", city="
+
city
+
", Area="
+
area
+
", cityName='"
+
cityName
+
'\''
+
", area="
+
area
+
", areaName='"
+
areaName
+
'\''
+
", address='"
+
address
+
'\''
+
", address='"
+
address
+
'\''
+
", status="
+
status
+
", status="
+
status
+
", publicKey='"
+
publicKey
+
'\''
+
", publicKey='"
+
publicKey
+
'\''
+
...
...
rpc-openplatform-api/src/main/java/cn/com/glsx/openplatform/model/PlatformUser.java
View file @
0420d1b
...
@@ -2,6 +2,7 @@ package cn.com.glsx.openplatform.model;
...
@@ -2,6 +2,7 @@ package cn.com.glsx.openplatform.model;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
org.springframework.format.annotation.DateTimeFormat
;
...
@@ -43,11 +44,21 @@ public class PlatformUser implements Serializable {
...
@@ -43,11 +44,21 @@ public class PlatformUser implements Serializable {
private
Integer
province
;
private
Integer
province
;
/**
/**
* 省份 sys_area的id
*/
private
String
provinceName
;
/**
* 城市 sys_area的id
* 城市 sys_area的id
*/
*/
private
Integer
city
;
private
Integer
city
;
/**
/**
* 城市 sys_area的id
*/
private
String
cityName
;
/**
* 客户id t_platform_customer表的id
* 客户id t_platform_customer表的id
*/
*/
private
Integer
customerId
;
private
Integer
customerId
;
...
@@ -218,6 +229,22 @@ public class PlatformUser implements Serializable {
...
@@ -218,6 +229,22 @@ public class PlatformUser implements Serializable {
this
.
customerName
=
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
;
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"PlatformUser{"
+
return
"PlatformUser{"
+
...
@@ -226,7 +253,9 @@ public class PlatformUser implements Serializable {
...
@@ -226,7 +253,9 @@ public class PlatformUser implements Serializable {
", contactNumber='"
+
contactNumber
+
'\''
+
", contactNumber='"
+
contactNumber
+
'\''
+
", wechatId='"
+
wechatId
+
'\''
+
", wechatId='"
+
wechatId
+
'\''
+
", province="
+
province
+
", province="
+
province
+
", provinceName='"
+
provinceName
+
'\''
+
", city="
+
city
+
", city="
+
city
+
", cityName='"
+
cityName
+
'\''
+
", customerId="
+
customerId
+
", customerId="
+
customerId
+
", customerName='"
+
customerName
+
'\''
+
", customerName='"
+
customerName
+
'\''
+
", lastLoginTime="
+
lastLoginTime
+
", lastLoginTime="
+
lastLoginTime
+
...
...
rpc-openplatform-container/src/main/java/cn/com/glsx/openplatform/service/IceOpenApiServiceImpl.java
View file @
0420d1b
...
@@ -30,9 +30,9 @@ public class IceOpenApiServiceImpl implements IceOpenApiService {
...
@@ -30,9 +30,9 @@ public class IceOpenApiServiceImpl implements IceOpenApiService {
int
deviceCount
=
deviceMapper
.
getDeviceCountByCustomerId
(
customerId
);
int
deviceCount
=
deviceMapper
.
getDeviceCountByCustomerId
(
customerId
);
int
userCount
=
userMapper
.
getUserCountByCustomerId
(
customerId
);
int
userCount
=
userMapper
.
getUserCountByCustomerId
(
customerId
);
int
acticveDeviceCount
=
deviceMapper
.
getacticveDeviceCountByCustomerId
(
customerId
);
int
acticveDeviceCount
=
deviceMapper
.
getacticveDeviceCountByCustomerId
(
customerId
);
hashMap
.
put
(
"
deviceCount
"
,
deviceCount
);
hashMap
.
put
(
"
totaldevice
"
,
deviceCount
);
hashMap
.
put
(
"
userCount
"
,
userCount
);
hashMap
.
put
(
"
totalusers
"
,
userCount
);
hashMap
.
put
(
"
acticveDeviceCount
"
,
acticveDeviceCount
);
hashMap
.
put
(
"
onlinedevices
"
,
acticveDeviceCount
);
return
hashMap
;
return
hashMap
;
}
}
}
}
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformCustomerMapper.xml
View file @
0420d1b
...
@@ -11,7 +11,11 @@
...
@@ -11,7 +11,11 @@
<result
column=
"contact_number"
jdbcType=
"VARCHAR"
property=
"contactNumber"
/>
<result
column=
"contact_number"
jdbcType=
"VARCHAR"
property=
"contactNumber"
/>
<result
column=
"contact_email"
jdbcType=
"VARCHAR"
property=
"contactEmail"
/>
<result
column=
"contact_email"
jdbcType=
"VARCHAR"
property=
"contactEmail"
/>
<result
column=
"province"
jdbcType=
"INTEGER"
property=
"province"
/>
<result
column=
"province"
jdbcType=
"INTEGER"
property=
"province"
/>
<result
column=
"cityName"
jdbcType=
"INTEGER"
property=
"provinceName"
/>
<result
column=
"city"
jdbcType=
"INTEGER"
property=
"city"
/>
<result
column=
"city"
jdbcType=
"INTEGER"
property=
"city"
/>
<result
column=
"cityName"
jdbcType=
"INTEGER"
property=
"cityName"
/>
<result
column=
"area"
jdbcType=
"INTEGER"
property=
"area"
/>
<result
column=
"areaName"
jdbcType=
"INTEGER"
property=
"areaName"
/>
<result
column=
"address"
jdbcType=
"VARCHAR"
property=
"address"
/>
<result
column=
"address"
jdbcType=
"VARCHAR"
property=
"address"
/>
<result
column=
"status"
jdbcType=
"TINYINT"
property=
"status"
/>
<result
column=
"status"
jdbcType=
"TINYINT"
property=
"status"
/>
<result
column=
"public_key"
jdbcType=
"VARCHAR"
property=
"publicKey"
/>
<result
column=
"public_key"
jdbcType=
"VARCHAR"
property=
"publicKey"
/>
...
@@ -30,10 +34,35 @@
...
@@ -30,10 +34,35 @@
create_by, update_by, remark
create_by, update_by, remark
</sql>
</sql>
<select
id=
"getCustomerMgrList"
result
Type=
"cn.com.glsx.openplatform.model.PlatformCustomer
"
>
<select
id=
"getCustomerMgrList"
result
Map=
"BaseResultMap
"
>
select
select
<include
refid=
"Base_Column_List"
/>
a.id,
from t_platform_customer
a.customer_name,
a.contact_person,
a.`password`,
a.contact_number,
a.contact_email,
a.province,
b.area_name as provinceName,
a.city,
c.area_name as cityName,
concat(b.area_name,c.area_name,d.area_name,a.address) as address,
a.`status`,
a.public_key,
a.private_key,
a.channel_number,
a.create_time,
a.update_time,
a.create_by,
a.update_by,
a.remark
from t_platform_customer a
left join t_sys_area b
on a.province = b.id
left join t_sys_area c
on a.city = c.id
left join t_sys_area d
on a.area = d.id
</select>
</select>
<select
id=
"getCustomerNameList"
resultType=
"java.lang.String"
>
<select
id=
"getCustomerNameList"
resultType=
"java.lang.String"
>
...
...
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformUserMapper.xml
View file @
0420d1b
...
@@ -9,7 +9,9 @@
...
@@ -9,7 +9,9 @@
<result
column=
"contact_number"
jdbcType=
"VARCHAR"
property=
"contactNumber"
/>
<result
column=
"contact_number"
jdbcType=
"VARCHAR"
property=
"contactNumber"
/>
<result
column=
"wechat_id"
jdbcType=
"VARCHAR"
property=
"wechatId"
/>
<result
column=
"wechat_id"
jdbcType=
"VARCHAR"
property=
"wechatId"
/>
<result
column=
"province"
jdbcType=
"INTEGER"
property=
"province"
/>
<result
column=
"province"
jdbcType=
"INTEGER"
property=
"province"
/>
<result
column=
"provinceName"
jdbcType=
"INTEGER"
property=
"provinceName"
/>
<result
column=
"city"
jdbcType=
"INTEGER"
property=
"city"
/>
<result
column=
"city"
jdbcType=
"INTEGER"
property=
"city"
/>
<result
column=
"cityName"
jdbcType=
"INTEGER"
property=
"cityName"
/>
<result
column=
"customer_id"
jdbcType=
"INTEGER"
property=
"customerId"
/>
<result
column=
"customer_id"
jdbcType=
"INTEGER"
property=
"customerId"
/>
<result
column=
"customer_name"
jdbcType=
"INTEGER"
property=
"customerName"
/>
<result
column=
"customer_name"
jdbcType=
"INTEGER"
property=
"customerName"
/>
<result
column=
"last_login_time"
jdbcType=
"TIMESTAMP"
property=
"lastLoginTime"
/>
<result
column=
"last_login_time"
jdbcType=
"TIMESTAMP"
property=
"lastLoginTime"
/>
...
@@ -33,7 +35,9 @@
...
@@ -33,7 +35,9 @@
a.contact_number,
a.contact_number,
a.wechat_id,
a.wechat_id,
a.province,
a.province,
c.area_name as provinceName,
a.city,
a.city,
d.area_name as cityName,
b.customer_name,
b.customer_name,
a.last_login_time,
a.last_login_time,
a.app_account_id,
a.app_account_id,
...
@@ -45,6 +49,10 @@
...
@@ -45,6 +49,10 @@
from t_platform_user a
from t_platform_user a
left join t_platform_customer b
left join t_platform_customer b
on a.customer_id = b.id
on a.customer_id = b.id
left join t_sys_area c
on a.province = c.id
left join t_sys_area d
on a.city = d.id
where 1 = 1
where 1 = 1
<if
test=
"customerName != null and customerName != '' "
>
<if
test=
"customerName != null and customerName != '' "
>
and b.customer_name = #{customerName,jdbcType=VARCHAR}
and b.customer_name = #{customerName,jdbcType=VARCHAR}
...
...
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