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
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
68 additions
and
81 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-->
...
...
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,9 +20,9 @@
...
@@ -19,9 +20,9 @@
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,
...
@@ -29,15 +30,13 @@
...
@@ -29,15 +30,13 @@
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>
...
@@ -51,15 +50,14 @@
...
@@ -51,15 +50,14 @@
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 *
(select
from (
date_format(create_time,
'%Y-%m-%d') as createTime,
select date_format(create_time,
'%Y-%m-%d') as createTime,
count(id) as num
count(id) as num
from t_platform_api_call
from t_platform_api_call
where create_time >= #{statisticStartTime,jdbcType=TIMESTAMP}
where create_time >= #{statisticStartTime,jdbcType=TIMESTAMP}
...
...
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-->
...
...
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,8 +28,9 @@
...
@@ -29,8 +28,9 @@
</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 (
select date_format(pad.create_time, '%Y-%m-%d') `time`,
count(pad.create_time) `count`
count(pad.create_time) `count`
from t_platform_app_download pad
from t_platform_app_download pad
left join t_platform_customer pc on pc.id = pad.customer_id
left join t_platform_customer pc on pc.id = pad.customer_id
...
...
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,8 +36,7 @@
...
@@ -35,8 +36,7 @@
</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`,
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
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,
...
@@ -57,17 +57,13 @@
...
@@ -57,17 +57,13 @@
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>
...
@@ -76,7 +72,8 @@
...
@@ -76,7 +72,8 @@
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"
resultType=
"java.lang.Integer"
>
select count(1)
select count(1)
from t_platform_customer
from t_platform_customer
where contact_number = #{contactNumber,jdbcType=VARCHAR}
where contact_number = #{contactNumber,jdbcType=VARCHAR}
...
@@ -84,12 +81,11 @@
...
@@ -84,12 +81,11 @@
</select>
</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>
</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,9 +24,9 @@
...
@@ -23,9 +24,9 @@
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,
...
@@ -37,26 +38,24 @@
...
@@ -37,26 +38,24 @@
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>
...
@@ -66,8 +65,7 @@
...
@@ -66,8 +65,7 @@
</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
...
@@ -76,8 +74,7 @@
...
@@ -76,8 +74,7 @@
<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>
<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}
...
@@ -86,9 +83,9 @@
...
@@ -86,9 +83,9 @@
</select>
</select>
<select
id=
"getDeviceAccessTrendList"
resultType=
"java.util.Map"
>
<select
id=
"getDeviceAccessTrendList"
resultType=
"java.util.Map"
>
select * from
select *
(select
from (
date_format(activat_time,
'%Y-%m-%d') as activatTime,
select date_format(activat_time,
'%Y-%m-%d') as activatTime,
count(id) as num
count(id) as num
from t_platform_device
from t_platform_device
where activat_time >= #{statisticStartTime,jdbcType=TIMESTAMP}
where activat_time >= #{statisticStartTime,jdbcType=TIMESTAMP}
...
@@ -98,8 +95,9 @@
...
@@ -98,8 +95,9 @@
</select>
</select>
<select
id=
"getDeviceActivationStatistic"
resultType=
"map"
>
<select
id=
"getDeviceActivationStatistic"
resultType=
"map"
>
select * from
select *
(select date_format(pd.activat_time, '%Y-%m-%d') `time`,
from (
select date_format(pd.activat_time, '%Y-%m-%d') `time`,
count(pd.activat_time) `count`
count(pd.activat_time) `count`
from t_platform_device pd
from t_platform_device pd
left join t_platform_customer pc on pc.id = pd.customer_id
left join t_platform_customer pc on pc.id = pd.customer_id
...
@@ -126,5 +124,4 @@
...
@@ -126,5 +124,4 @@
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,9 +29,9 @@
...
@@ -28,9 +29,9 @@
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,
...
@@ -47,20 +48,17 @@
...
@@ -47,20 +48,17 @@
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>
...
@@ -73,8 +71,7 @@
...
@@ -73,8 +71,7 @@
<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>
<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}
...
@@ -83,8 +80,8 @@
...
@@ -83,8 +80,8 @@
</select>
</select>
<select
id=
"getUserActivityStatistic"
resultType=
"map"
>
<select
id=
"getUserActivityStatistic"
resultType=
"map"
>
select * from
select * from
(
(
select date_format(pu.last_login_time, '%Y-%m-%d') `time`,
select date_format(pu.last_login_time, '%Y-%m-%d') `time`,
count(pu.last_login_time) `count`
count(pu.last_login_time) `count`
from t_platform_user pu
from t_platform_user pu
left join t_platform_customer pc on pc.id = pu.customer_id
left join t_platform_customer pc on pc.id = pu.customer_id
...
@@ -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