Merge remote-tracking branch 'origin/Release-1.3' into Release-1.3

This commit is contained in:
doufenghu
2018-11-07 10:12:17 +08:00
15 changed files with 144 additions and 61 deletions

View File

@@ -433,7 +433,7 @@ public class SingleDimensionReport extends BaseRestController {
String groupType ="hour";
if (!(StringUtil.isEmpty(ntcRadiusReport.getSearchReportStartTime())&&StringUtil.isEmpty(ntcRadiusReport.getSearchReportEndTime()))) {
Long times = DateUtil.convertStringToTimestamp(ntcRadiusReport.getSearchReportEndTime(), DateUtil.YYYY_MM_DD_HH24_MM_SS)-DateUtil.convertStringToTimestamp(ntcRadiusReport.getSearchReportStartTime(), DateUtil.YYYY_MM_DD_HH24_MM_SS);
if (times>0&&times<=30*24*60*60L) {
if (times>24*60*60L&&times<=30*24*60*60L) {
groupType ="day";
}else if(times>30*24*60*60L){
groupType ="month";

View File

@@ -645,12 +645,8 @@
<select id="findNtcRadiusReport" parameterType="com.nis.domain.restful.NtcRadiusReport"
resultMap="NtcRadiusReportMap">
SELECT
<if test="searchAccount != null and searchAccount !=''">
nas_ip,
</if>
<if test="searchNasIp != null and searchNasIp !=''">
account,
</if>
<choose>
<when test="groupType!= null and groupType!='' and groupType == 'day'">
DATE_FORMAT(REPORT_TIME, '%Y-%m-%d')
@@ -665,10 +661,10 @@
REPORT_TIME,sum(num) num
FROM ntc_radius_report
<where>
<if test="searchAccount != null and searchAccount !=''">
<if test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 2 and searchAccount != null and searchAccount !=''">
<![CDATA[AND account =#{searchAccount}]]>
</if>
<if test="searchNasIp != null and searchNasIp !=''">
<if test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 3 and searchNasIp != null and searchNasIp !=''">
<![CDATA[AND nas_ip =#{searchNasIp}]]>
</if>
<choose>
@@ -682,11 +678,11 @@
</where>
GROUP BY
<if test="searchAccount != null and searchAccount !=''">
<![CDATA[nas_ip]]>
<if test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 2">
<![CDATA[account,nas_ip]]>
</if>
<if test="searchNasIp != null and searchNasIp !=''">
<![CDATA[account]]>
<if test="searchBusinessType !=null and searchBusinessType != '' and searchBusinessType == 3 ">
<![CDATA[nas_ip,account]]>
</if>
,
<choose>

View File

@@ -61,16 +61,16 @@
<constructor-arg index="1" value="${redis.cluster.port3}"></constructor-arg>
</bean>
<bean class="redis.clients.jedis.HostAndPort">
<constructor-arg index="0" value="${redis.cluster.host1}"></constructor-arg>
<constructor-arg index="1" value="${redis.cluster.port4}"></constructor-arg>
<constructor-arg index="0" value="${redis.cluster.host2}"></constructor-arg>
<constructor-arg index="1" value="${redis.cluster.port1}"></constructor-arg>
</bean>
<bean class="redis.clients.jedis.HostAndPort">
<constructor-arg index="0" value="${redis.cluster.host1}"></constructor-arg>
<constructor-arg index="1" value="${redis.cluster.port5}"></constructor-arg>
<constructor-arg index="0" value="${redis.cluster.host2}"></constructor-arg>
<constructor-arg index="1" value="${redis.cluster.port2}"></constructor-arg>
</bean>
<bean class="redis.clients.jedis.HostAndPort">
<constructor-arg index="0" value="${redis.cluster.host1}"></constructor-arg>
<constructor-arg index="1" value="${redis.cluster.port6}"></constructor-arg>
<constructor-arg index="0" value="${redis.cluster.host2}"></constructor-arg>
<constructor-arg index="1" value="${redis.cluster.port3}"></constructor-arg>
</bean>
</set>
</constructor-arg>

View File

@@ -168,11 +168,9 @@ redis.timeout=100000
#一般当此值设置过大时容易报Too many Cluster redirections
redis.maxRedirects=3
#3A-redis集群配置
redis.cluster.host1=192.168.10.205
redis.cluster.port1:7031
redis.cluster.port2:7032
redis.cluster.port3:7033
redis.cluster.port4:7034
redis.cluster.port5:7035
redis.cluster.port6:7036
#3A-redis集群配置,如果需要执行数据同步需要在集群中执行LPUSH SyncRedisToCluster "1"
redis.cluster.host1=192.168.10.192
redis.cluster.host2=192.168.10.193
redis.cluster.port1=7001
redis.cluster.port2=7002
redis.cluster.port3=7003