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 f2a63078
authored
Dec 18, 2020
by
tyfanchz
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
格式化代码
1 parent
0420d1bd
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
213 additions
and
226 deletions
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformAdMapper.xml
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformApiCallMapper.xml
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformApiMapper.xml
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformAppDownloadMapper.xml
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformCustomerMapper.xml
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformDeviceMapper.xml
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformUserMapper.xml
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformAdMapper.xml
View file @
f2a6307
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.com.glsx.openplatform.mapper.PlatformAdMapper"
>
<mapper
namespace=
"cn.com.glsx.openplatform.mapper.PlatformAdMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.com.glsx.openplatform.model.PlatformAd"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.com.glsx.openplatform.model.PlatformAd"
>
<!--@mbg.generated-->
<!--@mbg.generated-->
...
@@ -28,4 +29,4 @@
...
@@ -28,4 +29,4 @@
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from t_platform_ad
from t_platform_ad
</select>
</select>
</mapper>
\ No newline at end of file
\ No newline at end of file
</mapper>
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformApiCallMapper.xml
View file @
f2a6307
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.com.glsx.openplatform.mapper.PlatformApiCallMapper"
>
<mapper
namespace=
"cn.com.glsx.openplatform.mapper.PlatformApiCallMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.com.glsx.openplatform.model.PlatformApiCall"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.com.glsx.openplatform.model.PlatformApiCall"
>
<!--@mbg.generated-->
<!--@mbg.generated-->
...
@@ -19,52 +20,49 @@
...
@@ -19,52 +20,49 @@
id, customer_id, api_id, call_result, create_time, create_by, remark
id, customer_id, api_id, call_result, create_time, create_by, remark
</sql>
</sql>
<select
id=
"getApiCallMgrList"
parameterType=
"cn.com.glsx.openplatform.vo.ApiCallVo"
resultMap=
"BaseResultMap"
>
<select
id=
"getApiCallMgrList"
parameterType=
"cn.com.glsx.openplatform.vo.ApiCallVo"
select
resultMap=
"BaseResultMap"
>
a.id,
select
a.id,
b.customer_name,
b.customer_name,
c.api_name,
c.api_name,
a.call_result,
a.call_result,
a.create_time,
a.create_time,
a.create_by,
a.create_by,
a.remark
a.remark
from t_platform_api_call a
from t_platform_api_call 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_platform_api c on a.api_id = c.id
left join t_platform_api c
where 1 = 1
on a.api_id = c.id
<if
test=
"accessStartTime != null"
>
where 1=1
<if
test=
"accessStartTime != null "
>
and create_time
>
= #{accessStartTime,jdbcType=TIMESTAMP}
and create_time
>
= #{accessStartTime,jdbcType=TIMESTAMP}
</if>
</if>
<if
test=
"accessEndTime != null
"
>
<if
test=
"accessEndTime != null"
>
and create_time
<
= #{accessEndTime,jdbcType=TIMESTAMP}
and create_time
<
= #{accessEndTime,jdbcType=TIMESTAMP}
</if>
</if>
</select>
</select>
<select
id=
"getApiCallCount"
resultType=
"java.lang.Integer"
>
<select
id=
"getApiCallCount"
resultType=
"java.lang.Integer"
>
select count(1)
select count(1)
from t_platform_api_call
from t_platform_api_call
</select>
</select>
<select
id=
"getApiCallGraphData"
resultType=
"java.util.Map"
>
<select
id=
"getApiCallGraphData"
resultType=
"java.util.Map"
>
select b.api_classification as apiClassification,
select b.api_classification as apiClassification,
count(a.id) as num
count(a.id) as num
from t_platform_api_call a
from t_platform_api_call a
left join t_platform_api b
left join t_platform_api b on a.api_id = b.id
on a.api_id = b.id
group by apiClassification
group by apiClassification
</select>
</select>
<select
id=
"getApiCallTrendList"
resultType=
"java.util.Map"
>
<select
id=
"getApiCallTrendList"
resultType=
"java.util.Map"
>
select * from
(select
date_format(create_time,'%Y-%m-%d') as createTime,
count(id) as num
from t_platform_api_call
where create_time >= #{statisticStartTime,jdbcType=TIMESTAMP}
and create_time
<
#{statisticEndTime,jdbcType=TIMESTAMP}
group by createTime) a
order by a.createTime
</select>
</mapper>
\ No newline at end of file
\ No newline at end of file
select *
from (
select date_format(create_time, '%Y-%m-%d') as createTime,
count(id) as num
from t_platform_api_call
where create_time >= #{statisticStartTime,jdbcType=TIMESTAMP}
and create_time
<
#{statisticEndTime,jdbcType=TIMESTAMP}
group by createTime) a
order by a.createTime
</select>
</mapper>
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformApiMapper.xml
View file @
f2a6307
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.com.glsx.openplatform.mapper.PlatformApiMapper"
>
<mapper
namespace=
"cn.com.glsx.openplatform.mapper.PlatformApiMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.com.glsx.openplatform.model.PlatformApi"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.com.glsx.openplatform.model.PlatformApi"
>
<!--@mbg.generated-->
<!--@mbg.generated-->
...
@@ -28,4 +29,4 @@
...
@@ -28,4 +29,4 @@
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from t_platform_api
from t_platform_api
</select>
</select>
</mapper>
\ No newline at end of file
\ No newline at end of file
</mapper>
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformAppDownloadMapper.xml
View file @
f2a6307
...
@@ -19,8 +19,7 @@
...
@@ -19,8 +19,7 @@
<select
id=
"getApiCallCountAuth"
resultType=
"java.lang.Integer"
>
<select
id=
"getApiCallCountAuth"
resultType=
"java.lang.Integer"
>
select count(1)
select count(1)
from t_platform_app_download a
from t_platform_app_download 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
<where>
<where>
<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}
...
@@ -29,19 +28,20 @@
...
@@ -29,19 +28,20 @@
</select>
</select>
<select
id=
"getAppDownloadStatistic"
resultType=
"map"
>
<select
id=
"getAppDownloadStatistic"
resultType=
"map"
>
select * from
select *
(select date_format(pad.create_time, '%Y-%m-%d') `time`,
from (
count(pad.create_time) `count`
select date_format(pad.create_time, '%Y-%m-%d') `time`,
from t_platform_app_download pad
count(pad.create_time) `count`
left join t_platform_customer pc on pc.id = pad.customer_id
from t_platform_app_download pad
<where>
left join t_platform_customer pc on pc.id = pad.customer_id
pad.create_time >= #{startTime,jdbcType=TIMESTAMP}
<where>
and pad.create_time
<
#{endTime,jdbcType=TIMESTAMP}
pad.create_time >= #{startTime,jdbcType=TIMESTAMP}
<if
test=
"customerName != null and customerName != ''"
>
and pad.create_time
<
#{endTime,jdbcType=TIMESTAMP}
and pc.customer_name = #{customerName,jdbcType=VARCHAR}
<if
test=
"customerName != null and customerName != ''"
>
</if>
and pc.customer_name = #{customerName,jdbcType=VARCHAR}
</where>
</if>
group by time) a
</where>
group by time) a
order by a.time
order by a.time
</select>
</select>
</mapper>
</mapper>
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformCustomerMapper.xml
View file @
f2a6307
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.com.glsx.openplatform.mapper.PlatformCustomerMapper"
>
<mapper
namespace=
"cn.com.glsx.openplatform.mapper.PlatformCustomerMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.com.glsx.openplatform.model.PlatformCustomer"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.com.glsx.openplatform.model.PlatformCustomer"
>
<!--@mbg.generated-->
<!--@mbg.generated-->
...
@@ -35,61 +36,56 @@
...
@@ -35,61 +36,56 @@
</sql>
</sql>
<select
id=
"getCustomerMgrList"
resultMap=
"BaseResultMap"
>
<select
id=
"getCustomerMgrList"
resultMap=
"BaseResultMap"
>
select
select a.id,
a.id,
a.customer_name,
a.customer_name,
a.contact_person,
a.contact_person,
a.`password`,
a.`password`,
a.contact_number,
a.contact_number,
a.contact_email,
a.contact_email,
a.province,
a.province,
b.area_name as provinceName,
b.area_name as provinceName,
a.city,
a.city,
c.area_name as cityName,
c.area_name as cityName,
concat(b.area_name, c.area_name, d.area_name, a.address) as address,
concat(b.area_name,c.area_name,d.area_name,a.address) as address,
a.`status`,
a.`status`,
a.public_key,
a.public_key,
a.private_key,
a.private_key,
a.channel_number,
a.channel_number,
a.create_time,
a.create_time,
a.update_time,
a.update_time,
a.create_by,
a.create_by,
a.update_by,
a.update_by,
a.remark
a.remark
from t_platform_customer a
from t_platform_customer a
left join t_sys_area b
left join t_sys_area b on a.province = b.id
on a.province = b.id
left join t_sys_area c on a.city = c.id
left join t_sys_area c
left join t_sys_area d on a.area = d.id
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"
>
select distinct
select distinct customer_name
customer_name
from t_platform_customer
from t_platform_customer
</select>
</select>
<select
id=
"getCustomerCount"
resultType=
"java.lang.Integer"
>
<select
id=
"getCustomerCount"
resultType=
"java.lang.Integer"
>
select count(1)
select count(1)
from t_platform_customer
from t_platform_customer
</select>
</select>
<select
id=
"login"
parameterType=
"cn.com.glsx.openplatform.model.PlatformCustomer"
resultType=
"java.lang.Integer"
>
<select
id=
"login"
parameterType=
"cn.com.glsx.openplatform.model.PlatformCustomer"
select count(1)
resultType=
"java.lang.Integer"
>
from t_platform_customer
select count(1)
where contact_number = #{contactNumber,jdbcType=VARCHAR}
from t_platform_customer
and password = #{password,jdbcType=VARCHAR}
where contact_number = #{contactNumber,jdbcType=VARCHAR}
</select>
and password = #{password,jdbcType=VARCHAR}
</select>
<select
id=
"getAddressOptionList"
resultType=
"java.lang.String"
>
<select
id=
"getAddressOptionList"
resultType=
"java.lang.String"
>
select
select area_name
area_name
from t_sys_area
from t_sys_area
where 1 = 1
where 1 = 1
<choose>
<choose>
<when
test=
"id != null and id != ''
"
>
<when
test=
"id != null and id != ''"
>
and parent_id = #{id,jdbcType=INTEGER}
and parent_id = #{id,jdbcType=INTEGER}
</when>
</when>
<otherwise>
<otherwise>
...
@@ -99,10 +95,8 @@
...
@@ -99,10 +95,8 @@
</select>
</select>
<select
id=
"getAddressStr"
resultType=
"java.lang.String"
>
<select
id=
"getAddressStr"
resultType=
"java.lang.String"
>
select
select area_name
area_name
from t_sys_area
from t_sys_area
where id = #{id,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</select>
</select>
</mapper>
\ No newline at end of file
\ No newline at end of file
</mapper>
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformDeviceMapper.xml
View file @
f2a6307
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.com.glsx.openplatform.mapper.PlatformDeviceMapper"
>
<mapper
namespace=
"cn.com.glsx.openplatform.mapper.PlatformDeviceMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.com.glsx.openplatform.model.PlatformDevice"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.com.glsx.openplatform.model.PlatformDevice"
>
<!--@mbg.generated-->
<!--@mbg.generated-->
...
@@ -23,94 +24,91 @@
...
@@ -23,94 +24,91 @@
create_by, update_by, remark
create_by, update_by, remark
</sql>
</sql>
<select
id=
"getDeviceMgrList"
parameterType=
"cn.com.glsx.openplatform.vo.DeviceVo"
resultMap=
"BaseResultMap"
>
<select
id=
"getDeviceMgrList"
parameterType=
"cn.com.glsx.openplatform.vo.DeviceVo"
select
resultMap=
"BaseResultMap"
>
a.id,
select
a.id,
a.device_sn,
a.device_sn,
a.device_type,
a.device_type,
b.customer_name,
b.customer_name,
a.activat_time,
a.activat_time,
a.`status`,
a.`status`,
a.create_time,
a.create_time,
a.update_time,
a.update_time,
a.create_by,
a.create_by,
a.update_by,
a.update_by,
a.remark
a.remark
from t_platform_device a
from t_platform_device 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
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}
</if>
</if>
<if
test=
"deviceType != null and deviceType != ''
"
>
<if
test=
"deviceType != null and deviceType != ''"
>
and a.device_type = #{deviceType,jdbcType=VARCHAR}
and a.device_type = #{deviceType,jdbcType=VARCHAR}
</if>
</if>
<if
test=
"activatStartTime != null
"
>
<if
test=
"activatStartTime != null"
>
and a.create_time
>
= #{accessStartTime,jdbcType=TIMESTAMP}
and a.create_time
>
= #{accessStartTime,jdbcType=TIMESTAMP}
</if>
</if>
<if
test=
"activatEndTime != null
"
>
<if
test=
"activatEndTime != null"
>
and a.create_time
<
= #{accessEndTime,jdbcType=TIMESTAMP}
and a.create_time
<
= #{accessEndTime,jdbcType=TIMESTAMP}
</if>
</if>
</select>
</select>
<select
id=
"getDeviceTypeList"
resultType=
"java.lang.String"
>
<select
id=
"getDeviceTypeList"
resultType=
"java.lang.String"
>
select distinct
select distinct device_type
device_type
from t_platform_device
from t_platform_device
</select>
</select>
<select
id=
"getDeviceCount"
resultType=
"java.lang.Integer"
>
<select
id=
"getDeviceCount"
resultType=
"java.lang.Integer"
>
select count(1)
select count(1)
from t_platform_device
from t_platform_device
</select>
</select>
<select
id=
"getDeviceGraphData"
resultType=
"java.util.Map"
>
<select
id=
"getDeviceGraphData"
resultType=
"java.util.Map"
>
select
select device_type as deviceType,
device_type as deviceType,
count(id) as num
count(id) as num
from t_platform_device
from t_platform_device
group by deviceType
group by deviceType
</select>
</select>
<select
id=
"getDeviceCountAuth"
resultType=
"java.lang.Integer"
>
<select
id=
"getDeviceCountAuth"
resultType=
"java.lang.Integer"
>
select count(1)
select count(1)
from t_platform_device a
from t_platform_device 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
<where>
<if
test=
"customerName != null and customerName != ''"
>
and b.customer_name = #{customerName,jdbcType=VARCHAR}
</if>
</where>
</select>
<select
id=
"getDeviceAccessTrendList"
resultType=
"java.util.Map"
>
select * from
(select
date_format(activat_time,'%Y-%m-%d') as activatTime,
count(id) as num
from t_platform_device
where activat_time >= #{statisticStartTime,jdbcType=TIMESTAMP}
and activat_time
<
#{statisticEndTime,jdbcType=TIMESTAMP}
group by activatTime) a
order by a.activatTime
</select>
<select
id=
"getDeviceActivationStatistic"
resultType=
"map"
>
select * from
(select date_format(pd.activat_time, '%Y-%m-%d') `time`,
count(pd.activat_time) `count`
from t_platform_device pd
left join t_platform_customer pc on pc.id = pd.customer_id
<where>
<where>
pd.activat_time >= #{startTime,jdbcType=TIMESTAMP}
and pd.activat_time
<
#{endTime,jdbcType=TIMESTAMP}
<if
test=
"customerName != null and customerName != ''"
>
<if
test=
"customerName != null and customerName != ''"
>
and
pc
.customer_name = #{customerName,jdbcType=VARCHAR}
and
b
.customer_name = #{customerName,jdbcType=VARCHAR}
</if>
</if>
</where>
</where>
group by time) a
</select>
<select
id=
"getDeviceAccessTrendList"
resultType=
"java.util.Map"
>
select *
from (
select date_format(activat_time, '%Y-%m-%d') as activatTime,
count(id) as num
from t_platform_device
where activat_time >= #{statisticStartTime,jdbcType=TIMESTAMP}
and activat_time
<
#{statisticEndTime,jdbcType=TIMESTAMP}
group by activatTime) a
order by a.activatTime
</select>
<select
id=
"getDeviceActivationStatistic"
resultType=
"map"
>
select *
from (
select date_format(pd.activat_time, '%Y-%m-%d') `time`,
count(pd.activat_time) `count`
from t_platform_device pd
left join t_platform_customer pc on pc.id = pd.customer_id
<where>
pd.activat_time >= #{startTime,jdbcType=TIMESTAMP}
and pd.activat_time
<
#{endTime,jdbcType=TIMESTAMP}
<if
test=
"customerName != null and customerName != ''"
>
and pc.customer_name = #{customerName,jdbcType=VARCHAR}
</if>
</where>
group by time) a
order by a.time
order by a.time
</select>
</select>
...
@@ -124,7 +122,6 @@
...
@@ -124,7 +122,6 @@
select count(1)
select count(1)
from t_platform_device
from t_platform_device
where status = 1
where status = 1
and customer_id = #{customerId,jdbcType=INTEGER}
and customer_id = #{customerId,jdbcType=INTEGER}
</select>
</select>
</mapper>
</mapper>
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformUserMapper.xml
View file @
f2a6307
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.com.glsx.openplatform.mapper.PlatformUserMapper"
>
<mapper
namespace=
"cn.com.glsx.openplatform.mapper.PlatformUserMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.com.glsx.openplatform.model.PlatformUser"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.com.glsx.openplatform.model.PlatformUser"
>
<!--@mbg.generated-->
<!--@mbg.generated-->
...
@@ -28,74 +29,70 @@
...
@@ -28,74 +29,70 @@
app_account_id, create_time, update_time, create_by, update_by, remark
app_account_id, create_time, update_time, create_by, update_by, remark
</sql>
</sql>
<select
id=
"getUserMgrList"
parameterType=
"cn.com.glsx.openplatform.vo.UserVo"
resultMap=
"BaseResultMap"
>
<select
id=
"getUserMgrList"
parameterType=
"cn.com.glsx.openplatform.vo.UserVo"
select
resultMap=
"BaseResultMap"
>
a.id,
select
a.id,
a.nickname,
a.nickname,
a.contact_number,
a.contact_number,
a.wechat_id,
a.wechat_id,
a.province,
a.province,
c.area_name as provinceName,
c.area_name as provinceName,
a.city,
a.city,
d.area_name as cityName,
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,
a.create_time,
a.create_time,
a.update_time,
a.update_time,
a.create_by,
a.create_by,
a.update_by,
a.update_by,
a.remark
a.remark
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 c
left join t_sys_area d on a.city = d.id
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}
</if>
</if>
<if
test=
"registerStartTime != null
"
>
<if
test=
"registerStartTime != null"
>
and a.create_time
>
= #{registerStartTime,jdbcType=TIMESTAMP}
and a.create_time
>
= #{registerStartTime,jdbcType=TIMESTAMP}
</if>
</if>
<if
test=
"registerEndTime != null
"
>
<if
test=
"registerEndTime != null"
>
and a.create_time
<
= #{registerEndTime,jdbcType=TIMESTAMP}
and a.create_time
<
= #{registerEndTime,jdbcType=TIMESTAMP}
</if>
</if>
</select>
</select>
<select
id=
"getUserCount"
resultType=
"java.lang.Integer"
>
<select
id=
"getUserCount"
resultType=
"java.lang.Integer"
>
select count(1)
select count(1)
from t_platform_user
from t_platform_user
</select>
</select>
<select
id=
"getUserCountAuth"
resultType=
"java.lang.Integer"
>
<select
id=
"getUserCountAuth"
resultType=
"java.lang.Integer"
>
select count(1)
select count(1)
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
<where>
<if
test=
"customerName != null and customerName != ''"
>
and b.customer_name = #{customerName,jdbcType=VARCHAR}
</if>
</where>
</select>
<select
id=
"getUserActivityStatistic"
resultType=
"map"
>
select * from
(select date_format(pu.last_login_time, '%Y-%m-%d') `time`,
count(pu.last_login_time) `count`
from t_platform_user pu
left join t_platform_customer pc on pc.id = pu.customer_id
<where>
<where>
pu.last_login_time >= #{startTime,jdbcType=TIMESTAMP}
and pu.last_login_time
<
#{endTime,jdbcType=TIMESTAMP}
<if
test=
"customerName != null and customerName != ''"
>
<if
test=
"customerName != null and customerName != ''"
>
and
pc
.customer_name = #{customerName,jdbcType=VARCHAR}
and
b
.customer_name = #{customerName,jdbcType=VARCHAR}
</if>
</if>
</where>
</where>
group by time) a
</select>
<select
id=
"getUserActivityStatistic"
resultType=
"map"
>
select * from (
select date_format(pu.last_login_time, '%Y-%m-%d') `time`,
count(pu.last_login_time) `count`
from t_platform_user pu
left join t_platform_customer pc on pc.id = pu.customer_id
<where>
pu.last_login_time >= #{startTime,jdbcType=TIMESTAMP}
and pu.last_login_time
<
#{endTime,jdbcType=TIMESTAMP}
<if
test=
"customerName != null and customerName != ''"
>
and pc.customer_name = #{customerName,jdbcType=VARCHAR}
</if>
</where>
group by time) a
order by a.time
order by a.time
</select>
</select>
...
@@ -110,5 +107,4 @@
...
@@ -110,5 +107,4 @@
from t_platform_user
from t_platform_user
where customer_id = #{customerId,jdbcType=INTEGER}
where customer_id = #{customerId,jdbcType=INTEGER}
</select>
</select>
</mapper>
</mapper>
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