Commit ad1dbf1e by 杨林龙

Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformCustomerMapper.xml
2 parents 7ab8ea9a d7889ccf
<?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">
<resultMap id="BaseResultMap" type="cn.com.glsx.openplatform.model.PlatformAd">
<!--@mbg.generated-->
......
<?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">
<resultMap id="BaseResultMap" type="cn.com.glsx.openplatform.model.PlatformApiCall">
<!--@mbg.generated-->
......@@ -19,9 +20,9 @@
id, customer_id, api_id, call_result, create_time, create_by, remark
</sql>
<select id="getApiCallMgrList" parameterType="cn.com.glsx.openplatform.vo.ApiCallVo" resultMap="BaseResultMap">
select
a.id,
<select id="getApiCallMgrList" parameterType="cn.com.glsx.openplatform.vo.ApiCallVo"
resultMap="BaseResultMap">
select a.id,
b.customer_name,
c.api_name,
a.call_result,
......@@ -29,15 +30,13 @@
a.create_by,
a.remark
from t_platform_api_call a
left join t_platform_customer b
on a.customer_id = b.id
left join t_platform_api c
on a.api_id = c.id
where 1=1
<if test="accessStartTime != null ">
left join t_platform_customer b on a.customer_id = b.id
left join t_platform_api c on a.api_id = c.id
where 1 = 1
<if test="accessStartTime != null">
and create_time &gt;= #{accessStartTime,jdbcType=TIMESTAMP}
</if>
<if test="accessEndTime != null ">
<if test="accessEndTime != null">
and create_time &lt;= #{accessEndTime,jdbcType=TIMESTAMP}
</if>
</select>
......@@ -51,15 +50,14 @@
select b.api_classification as apiClassification,
count(a.id) as num
from t_platform_api_call a
left join t_platform_api b
on a.api_id = b.id
left join t_platform_api b on a.api_id = b.id
group by apiClassification
</select>
<select id="getApiCallTrendList" resultType="java.util.Map">
select * from
(select
date_format(create_time,'%Y-%m-%d') as createTime,
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}
......
<?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">
<resultMap id="BaseResultMap" type="cn.com.glsx.openplatform.model.PlatformApi">
<!--@mbg.generated-->
......
......@@ -19,8 +19,7 @@
<select id="getApiCallCountAuth" resultType="java.lang.Integer">
select count(1)
from t_platform_app_download a
left join t_platform_customer b
on a.customer_id = b.id
left join t_platform_customer b on a.customer_id = b.id
<where>
<if test="customerName != null and customerName != ''">
and b.customer_name = #{customerName,jdbcType=VARCHAR}
......@@ -29,8 +28,9 @@
</select>
<select id="getAppDownloadStatistic" resultType="map">
select * from
(select date_format(pad.create_time, '%Y-%m-%d') `time`,
select *
from (
select date_format(pad.create_time, '%Y-%m-%d') `time`,
count(pad.create_time) `count`
from t_platform_app_download pad
left join t_platform_customer pc on pc.id = pad.customer_id
......
<?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">
<resultMap id="BaseResultMap" type="cn.com.glsx.openplatform.model.PlatformCustomer">
<!--@mbg.generated-->
......@@ -35,8 +36,7 @@
</sql>
<select id="getCustomerMgrList" resultMap="BaseResultMap">
select
a.id,
select a.id,
a.customer_name,
a.contact_person,
a.`password`,
......@@ -46,7 +46,7 @@
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,
concat(b.area_name, c.area_name, d.area_name, a.address) as address,
a.`status`,
a.public_key,
a.private_key,
......@@ -57,17 +57,13 @@
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
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">
select distinct
customer_name
select distinct customer_name
from t_platform_customer
</select>
......@@ -84,12 +80,11 @@
</select>
<select id="getAddressOptionList" resultType="java.lang.String">
select
area_name
select area_name
from t_sys_area
where 1 = 1
<choose>
<when test="id != null and id != '' ">
<when test="id != null and id != ''">
and parent_id = #{id,jdbcType=INTEGER}
</when>
<otherwise>
......@@ -99,10 +94,8 @@
</select>
<select id="getAddressStr" resultType="java.lang.String">
select
area_name
select area_name
from t_sys_area
where id = #{id,jdbcType=INTEGER}
</select>
</mapper>
<?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">
<resultMap id="BaseResultMap" type="cn.com.glsx.openplatform.model.PlatformDevice">
<!--@mbg.generated-->
......@@ -23,9 +24,9 @@
create_by, update_by, remark
</sql>
<select id="getDeviceMgrList" parameterType="cn.com.glsx.openplatform.vo.DeviceVo" resultMap="BaseResultMap">
select
a.id,
<select id="getDeviceMgrList" parameterType="cn.com.glsx.openplatform.vo.DeviceVo"
resultMap="BaseResultMap">
select a.id,
a.device_sn,
a.device_type,
b.customer_name,
......@@ -37,26 +38,24 @@
a.update_by,
a.remark
from t_platform_device a
left join t_platform_customer b
on a.customer_id = b.id
left join t_platform_customer b on a.customer_id = b.id
where 1 = 1
<if test="customerName != null and customerName != '' ">
<if test="customerName != null and customerName != ''">
and b.customer_name = #{customerName,jdbcType=VARCHAR}
</if>
<if test="deviceType != null and deviceType != '' ">
<if test="deviceType != null and deviceType != ''">
and a.device_type = #{deviceType,jdbcType=VARCHAR}
</if>
<if test="activatStartTime != null ">
<if test="activatStartTime != null">
and a.activat_time &gt;= #{activatStartTime,jdbcType=TIMESTAMP}
</if>
<if test="activatEndTime != null ">
<if test="activatEndTime != null">
and a.activat_time &lt;= #{activatEndTime,jdbcType=TIMESTAMP}
</if>
</select>
<select id="getDeviceTypeList" resultType="java.lang.String">
select distinct
device_type
select distinct device_type
from t_platform_device
</select>
......@@ -66,8 +65,7 @@
</select>
<select id="getDeviceGraphData" resultType="java.util.Map">
select
device_type as deviceType,
select device_type as deviceType,
count(id) as num
from t_platform_device
group by deviceType
......@@ -76,8 +74,7 @@
<select id="getDeviceCountAuth" resultType="java.lang.Integer">
select count(1)
from t_platform_device a
left join t_platform_customer b
on a.customer_id = b.id
left join t_platform_customer b on a.customer_id = b.id
<where>
<if test="customerName != null and customerName != ''">
and b.customer_name = #{customerName,jdbcType=VARCHAR}
......@@ -86,9 +83,9 @@
</select>
<select id="getDeviceAccessTrendList" resultType="java.util.Map">
select * from
(select
date_format(activat_time,'%Y-%m-%d') as activatTime,
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}
......@@ -98,8 +95,9 @@
</select>
<select id="getDeviceActivationStatistic" resultType="map">
select * from
(select date_format(pd.activat_time, '%Y-%m-%d') `time`,
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
......@@ -126,5 +124,4 @@
where status = 1
and customer_id = #{customerId,jdbcType=INTEGER}
</select>
</mapper>
<?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">
<resultMap id="BaseResultMap" type="cn.com.glsx.openplatform.model.PlatformUser">
<!--@mbg.generated-->
......@@ -28,9 +29,9 @@
app_account_id, create_time, update_time, create_by, update_by, remark
</sql>
<select id="getUserMgrList" parameterType="cn.com.glsx.openplatform.vo.UserVo" resultMap="BaseResultMap">
select
a.id,
<select id="getUserMgrList" parameterType="cn.com.glsx.openplatform.vo.UserVo"
resultMap="BaseResultMap">
select a.id,
a.nickname,
a.contact_number,
a.wechat_id,
......@@ -47,20 +48,17 @@
a.update_by,
a.remark
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
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 != '' ">
<if test="customerName != null and customerName != ''">
and b.customer_name = #{customerName,jdbcType=VARCHAR}
</if>
<if test="registerStartTime != null ">
<if test="registerStartTime != null">
and a.create_time &gt;= #{registerStartTime,jdbcType=TIMESTAMP}
</if>
<if test="registerEndTime != null ">
<if test="registerEndTime != null">
and a.create_time &lt;= #{registerEndTime,jdbcType=TIMESTAMP}
</if>
</select>
......@@ -73,8 +71,7 @@
<select id="getUserCountAuth" resultType="java.lang.Integer">
select count(1)
from t_platform_user a
left join t_platform_customer b
on a.customer_id = b.id
left join t_platform_customer b on a.customer_id = b.id
<where>
<if test="customerName != null and customerName != ''">
and b.customer_name = #{customerName,jdbcType=VARCHAR}
......@@ -83,8 +80,8 @@
</select>
<select id="getUserActivityStatistic" resultType="map">
select * from
(select date_format(pu.last_login_time, '%Y-%m-%d') `time`,
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
......@@ -110,5 +107,4 @@
from t_platform_user
where customer_id = #{customerId,jdbcType=INTEGER}
</select>
</mapper>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!