Commit 0420d1bd by 杨林龙

完成Dubbo基本开发 yangll

1 parent ff67c891
......@@ -2,6 +2,7 @@ package cn.com.glsx.openplatform.model;
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
......@@ -53,6 +54,11 @@ public class PlatformCustomer implements Serializable {
private Integer province;
/**
* 省份 sys_area的id
*/
private String provinceName;
/**
* 城市 sys_area的id
*/
private Integer city;
......@@ -60,9 +66,19 @@ public class PlatformCustomer implements Serializable {
/**
* 城市 sys_area的id
*/
private String cityName;
/**
* 区 sys_area的id
*/
private Integer area;
/**
* area sys_area的id
*/
private String areaName;
/**
* 详细地址
*/
private String address;
......@@ -268,6 +284,30 @@ public class PlatformCustomer implements Serializable {
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
public String toString() {
return "PlatformCustomer{" +
......@@ -278,8 +318,11 @@ public class PlatformCustomer implements Serializable {
", contactNumber='" + contactNumber + '\'' +
", contactEmail='" + contactEmail + '\'' +
", province=" + province +
", provinceName='" + provinceName + '\'' +
", city=" + city +
", Area=" + area +
", cityName='" + cityName + '\'' +
", area=" + area +
", areaName='" + areaName + '\'' +
", address='" + address + '\'' +
", status=" + status +
", publicKey='" + publicKey + '\'' +
......
......@@ -2,6 +2,7 @@ package cn.com.glsx.openplatform.model;
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
......@@ -43,11 +44,21 @@ public class PlatformUser implements Serializable {
private Integer province;
/**
* 省份 sys_area的id
*/
private String provinceName;
/**
* 城市 sys_area的id
*/
private Integer city;
/**
* 城市 sys_area的id
*/
private String cityName;
/**
* 客户id t_platform_customer表的id
*/
private Integer customerId;
......@@ -218,6 +229,22 @@ public class PlatformUser implements Serializable {
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
public String toString() {
return "PlatformUser{" +
......@@ -226,7 +253,9 @@ public class PlatformUser implements Serializable {
", contactNumber='" + contactNumber + '\'' +
", wechatId='" + wechatId + '\'' +
", province=" + province +
", provinceName='" + provinceName + '\'' +
", city=" + city +
", cityName='" + cityName + '\'' +
", customerId=" + customerId +
", customerName='" + customerName + '\'' +
", lastLoginTime=" + lastLoginTime +
......
......@@ -30,9 +30,9 @@ public class IceOpenApiServiceImpl implements IceOpenApiService {
int deviceCount = deviceMapper.getDeviceCountByCustomerId(customerId);
int userCount = userMapper.getUserCountByCustomerId(customerId);
int acticveDeviceCount = deviceMapper.getacticveDeviceCountByCustomerId(customerId);
hashMap.put("deviceCount", deviceCount);
hashMap.put("userCount", userCount);
hashMap.put("acticveDeviceCount", acticveDeviceCount);
hashMap.put("totaldevice", deviceCount);
hashMap.put("totalusers", userCount);
hashMap.put("onlinedevices", acticveDeviceCount);
return hashMap;
}
}
......@@ -11,7 +11,11 @@
<result column="contact_number" jdbcType="VARCHAR" property="contactNumber"/>
<result column="contact_email" jdbcType="VARCHAR" property="contactEmail"/>
<result column="province" jdbcType="INTEGER" property="province"/>
<result column="cityName" jdbcType="INTEGER" property="provinceName"/>
<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="status" jdbcType="TINYINT" property="status"/>
<result column="public_key" jdbcType="VARCHAR" property="publicKey"/>
......@@ -30,10 +34,35 @@
create_by, update_by, remark
</sql>
<select id="getCustomerMgrList" resultType="cn.com.glsx.openplatform.model.PlatformCustomer">
<select id="getCustomerMgrList" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from t_platform_customer
a.id,
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 id="getCustomerNameList" resultType="java.lang.String">
......
......@@ -9,7 +9,9 @@
<result column="contact_number" jdbcType="VARCHAR" property="contactNumber"/>
<result column="wechat_id" jdbcType="VARCHAR" property="wechatId"/>
<result column="province" jdbcType="INTEGER" property="province"/>
<result column="provinceName" jdbcType="INTEGER" property="provinceName"/>
<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_name" jdbcType="INTEGER" property="customerName"/>
<result column="last_login_time" jdbcType="TIMESTAMP" property="lastLoginTime"/>
......@@ -33,7 +35,9 @@
a.contact_number,
a.wechat_id,
a.province,
c.area_name as provinceName,
a.city,
d.area_name as cityName,
b.customer_name,
a.last_login_time,
a.app_account_id,
......@@ -45,6 +49,10 @@
from t_platform_user a
left join t_platform_customer b
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
<if test="customerName != null and customerName != '' ">
and b.customer_name = #{customerName,jdbcType=VARCHAR}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!