Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
d86c5abe
Commit
d86c5abe
authored
Jul 25, 2024
by
yangyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
3c6e903a
d429290c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
499 additions
and
43 deletions
+499
-43
TestController.java
.../amos/boot/module/hygf/biz/controller/TestController.java
+115
-0
TestController.java
...amos/boot/module/jxiop/biz/controller/TestController.java
+73
-1
SyncESDataToTdengineMqttListener.java
.../jxiop/biz/listener/SyncESDataToTdengineMqttListener.java
+79
-42
TdengineTimeServiceImpl.java
...odule/jxiop/biz/service/impl/TdengineTimeServiceImpl.java
+0
-0
TestController.java
...amos/boot/module/jxiop/biz/controller/TestController.java
+82
-0
application-dev1.properties
...-jxiop-biz/src/main/resources/application-dev1.properties
+105
-0
logback-dev1.xml
...boot-module-jxiop-biz/src/main/resources/logback-dev1.xml
+45
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/TestController.java
0 → 100644
View file @
d86c5abe
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
controller
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.UnitInfo
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.PersonnelBusinessMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.UnitInfoMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.util.CommonResponseNewUtil
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.PeasantHouseholdServiceImpl
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.SurveyInformationServiceImpl
;
import
com.yeejoin.amos.boot.module.standard.api.entity.PublicAgencyUser
;
import
com.yeejoin.amos.boot.module.standard.api.mapper.PublicAgencyUserMapper
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.util.AesUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
* 农户信息
*
* @author system_generator
* @date 2023-07-07
*/
@RestController
@Api
(
tags
=
"农户信息Api"
)
@RequestMapping
(
value
=
"/test"
)
public
class
TestController
extends
BaseController
{
@Autowired
SurveyInformationServiceImpl
surveyInformationServiceImpl
;
@Autowired
PeasantHouseholdServiceImpl
peasantHouseholdServiceImpl
;
@Autowired
RedisUtils
redisUtils
;
private
static
final
String
regionRedis
=
"app_region_redis"
;
@Autowired
PersonnelBusinessMapper
personnelBusinessMapper
;
@Autowired
UnitInfoMapper
unitInfoMapper
;
@Autowired
PublicAgencyUserMapper
publicAgencyUserMapper
;
/**
* 新增农户信息
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/initpw"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"新增农户信息"
,
notes
=
"新增农户信息"
)
public
ResponseModel
<
Object
>
initpw
()
{
// 经销商管理员
List
<
UnitInfo
>
list
=
unitInfoMapper
.
selectList
(
null
);
for
(
UnitInfo
unitInfo
:
list
)
{
try
{
int
ph
=
unitInfo
.
getAdminPhone
().
length
();
String
npwd
=
"Zxnk_"
+
unitInfo
.
getAdminPhone
().
substring
(
ph
-
4
,
ph
);
String
npwdm
=
AesUtil
.
encode
(
npwd
,
"qaz"
);
unitInfo
.
setAdminLoginPwd
(
npwdm
);
FeignClientResult
<
AgencyUserModel
>
re
=
Privilege
.
agencyUserClient
.
queryByUserId
(
unitInfo
.
getAdminUserId
());
AgencyUserModel
ag
=
re
.
getResult
();
ag
.
setPassword
(
AesUtil
.
encode
(
npwd
,
"qaz"
));
ag
.
setRePassword
(
AesUtil
.
encode
(
npwd
,
"qaz"
));
Privilege
.
agencyUserClient
.
restorePassword
(
unitInfo
.
getAdminUserId
());
ag
.
setOriginalPassword
(
AesUtil
.
encode
(
"Z2%Op9.q"
,
"qaz"
));
Privilege
.
agencyUserClient
.
modifyPassword
(
unitInfo
.
getAdminUserId
(),
ag
);
unitInfoMapper
.
updateById
(
unitInfo
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
// 经销商子人员
List
<
PublicAgencyUser
>
list2
=
publicAgencyUserMapper
.
selectList
(
null
);
for
(
PublicAgencyUser
unitInfo
:
list2
)
{
try
{
int
ph
=
unitInfo
.
getEmergencyTelephone
().
length
();
String
npwd
=
"Zxnk_"
+
unitInfo
.
getEmergencyTelephone
().
substring
(
ph
-
4
,
ph
);
String
npwdm
=
AesUtil
.
encode
(
npwd
,
"qaz"
);
unitInfo
.
setPassword
(
npwdm
);
FeignClientResult
<
AgencyUserModel
>
re
=
Privilege
.
agencyUserClient
.
queryByUserId
(
unitInfo
.
getAmosUserId
());
AgencyUserModel
ag
=
re
.
getResult
();
ag
.
setPassword
(
AesUtil
.
encode
(
npwd
,
"qaz"
));
ag
.
setRePassword
(
AesUtil
.
encode
(
npwd
,
"qaz"
));
Privilege
.
agencyUserClient
.
restorePassword
(
unitInfo
.
getAmosUserId
());
ag
.
setOriginalPassword
(
AesUtil
.
encode
(
"Z2%Op9.q"
,
"qaz"
));
Privilege
.
agencyUserClient
.
modifyPassword
(
unitInfo
.
getAmosUserId
(),
ag
);
publicAgencyUserMapper
.
updateById
(
unitInfo
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
return
CommonResponseNewUtil
.
success
();
}
}
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/TestController.java
View file @
d86c5abe
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
controller
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map.Entry
;
import
java.util.stream.Collectors
;
import
cn.hutool.core.date.DateUtil
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -22,11 +26,16 @@ import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.CommonServiceImpl;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.TdengineTimeServiceImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.FanHealthIndexMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.FanWaringRecordMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.PvHealthIndexMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.PvWaringRecordMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndex
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanWarningRecord
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvHealthIndex
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvWarningRecord
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdmapper.IndicatorDataMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.utils.TimeRangeUtil
;
import
cn.hutool.core.date.DateUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -207,4 +216,67 @@ public class TestController extends BaseController {
e
.
printStackTrace
();
}
}
@Autowired
PvHealthIndexMapper
pvHealthIndexMapper
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"test2"
,
notes
=
"test1"
)
@GetMapping
(
"/clear-health-cf"
)
public
void
clearHealthCf
(
@RequestParam
(
value
=
"startTime"
,
required
=
false
)
String
startTime
)
throws
ParseException
{
List
<
String
>
type
=
new
ArrayList
<>();
type
.
add
(
"按10分钟"
);
type
.
add
(
"按小时"
);
type
.
add
(
"按天"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
List
<
String
>
mList
=
TimeRangeUtil
.
getMomentInfo
(
sdf
.
parse
(
startTime
),
new
Date
());
for
(
String
d
:
mList
)
{
LambdaQueryWrapper
<
FanHealthIndex
>
wf
=
new
LambdaQueryWrapper
<>();
wf
.
eq
(
FanHealthIndex:
:
getAnalysisTime
,
d
);
wf
.
orderByAsc
(
FanHealthIndex:
:
getTs
);
wf
.
eq
(
FanHealthIndex:
:
getAnalysisObjType
,
"测点"
);
for
(
String
s
:
type
)
{
wf
.
eq
(
FanHealthIndex:
:
getAnalysisType
,
s
);
List
<
FanHealthIndex
>
list
=
fanHealthIndexMapper
.
selectList
(
wf
);
Map
<
String
,
List
<
FanHealthIndex
>>
lm
=
list
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
FanHealthIndex:
:
getIndexAddress
));
for
(
Entry
<
String
,
List
<
FanHealthIndex
>>
m
:
lm
.
entrySet
())
{
List
<
FanHealthIndex
>
pl
=
m
.
getValue
();
if
(
pl
.
size
()
>
1
)
{
pl
=
pl
.
subList
(
1
,
pl
.
size
());
}
List
<
Long
>
ts
=
pl
.
stream
().
map
(
FanHealthIndex:
:
getTs
).
collect
(
Collectors
.
toList
());
LambdaQueryWrapper
<
FanHealthIndex
>
df
=
new
LambdaQueryWrapper
<>();
for
(
Long
ts1
:
ts
)
{
df
.
eq
(
FanHealthIndex:
:
getTs
,
ts1
);
fanHealthIndexMapper
.
delete
(
df
);
}
}
}
LambdaQueryWrapper
<
PvHealthIndex
>
pf
=
new
LambdaQueryWrapper
<>();
pf
.
eq
(
PvHealthIndex:
:
getAnalysisTime
,
d
);
pf
.
orderByAsc
(
PvHealthIndex:
:
getTs
);
pf
.
eq
(
PvHealthIndex:
:
getAnalysisObjType
,
"测点"
);
for
(
String
s
:
type
)
{
pf
.
eq
(
PvHealthIndex:
:
getAnalysisType
,
s
);
List
<
PvHealthIndex
>
listp
=
pvHealthIndexMapper
.
selectList
(
pf
);
Map
<
String
,
List
<
PvHealthIndex
>>
lmp
=
listp
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
PvHealthIndex:
:
getIndexAddress
));
for
(
Entry
<
String
,
List
<
PvHealthIndex
>>
m
:
lmp
.
entrySet
())
{
List
<
PvHealthIndex
>
pl
=
m
.
getValue
();
if
(
pl
.
size
()
>
1
)
{
pl
=
pl
.
subList
(
1
,
pl
.
size
());
}
List
<
Long
>
ts
=
pl
.
stream
().
map
(
PvHealthIndex:
:
getTs
).
collect
(
Collectors
.
toList
());
LambdaQueryWrapper
<
PvHealthIndex
>
df
=
new
LambdaQueryWrapper
<>();
for
(
Long
ts1
:
ts
)
{
df
.
eq
(
PvHealthIndex:
:
getTs
,
ts1
);
pvHealthIndexMapper
.
delete
(
df
);
}
}
}
}
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/listener/SyncESDataToTdengineMqttListener.java
View file @
d86c5abe
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
listener
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.CommonServiceImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
java.text.ParseException
;
import
java.util.Date
;
import
java.util.concurrent.CountDownLatch
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
import
org.eclipse.paho.client.mqttv3.MqttMessage
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.typroject.tyboot.component.emq.EmqxListener
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.CommonServiceImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.TdengineTimeServiceImpl
;
import
cn.hutool.core.date.DateUtil
;
import
lombok.extern.slf4j.Slf4j
;
/**
* @author Administrator
*/
...
...
@@ -16,43 +26,70 @@ import org.typroject.tyboot.component.emq.EmqxListener;
@Slf4j
public
class
SyncESDataToTdengineMqttListener
extends
EmqxListener
{
@Autowired
private
CommonServiceImpl
commonServiceImpl
;
@Autowired
CommonServiceImpl
commonServiceImpl
;
@Override
public
void
processMessage
(
String
topic
,
MqttMessage
mqttMessage
)
{
log
.
info
(
topic
+
"收到数据同步成功,开始计算健康指数!"
);
byte
[]
payload
=
mqttMessage
.
getPayload
();
String
str
=
new
String
(
payload
);
String
msg
=
JSON
.
parse
(
str
).
toString
();
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
msg
);
String
flag
=
jsonObject
.
get
(
"sync_flag"
).
toString
();
if
(
"success"
.
equals
(
flag
)){
//开始异步计算光伏的健康指数算法
new
Thread
(()->{
//调用光伏的健康指数算法
commonServiceImpl
.
healthWarningMinuteByPv
();
}).
start
();
//开始异步计算风机的健康指数算法
new
Thread
(()->{
//调用风机的健康指数算法
commonServiceImpl
.
healthWarningMinuteByFan
();
}).
start
();
}
if
(
"pvsuccess"
.
equals
(
flag
)){
//开始异步计算光伏的健康指数算法
new
Thread
(()->{
//调用光伏的健康指数算法
commonServiceImpl
.
healthWarningMinuteByPv
();
}).
start
();
}
if
(
"fansuccess"
.
equals
(
flag
)){
//开始异步计算光伏的健康指数算法
new
Thread
(()->{
//调用光伏的健康指数算法
commonServiceImpl
.
healthWarningMinuteByFan
();
}).
start
();
}
}
private
TdengineTimeServiceImpl
tdengineTimeService
;
@Override
public
void
processMessage
(
String
topic
,
MqttMessage
mqttMessage
)
throws
InterruptedException
,
ParseException
{
log
.
info
(
topic
+
"收到数据同步成功,开始计算健康指数!"
);
byte
[]
payload
=
mqttMessage
.
getPayload
();
String
str
=
new
String
(
payload
);
String
msg
=
JSON
.
parse
(
str
).
toString
();
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
msg
);
String
flag
=
jsonObject
.
get
(
"sync_flag"
).
toString
();
if
(
"success"
.
equals
(
flag
))
{
Date
time
=
new
Date
();
time
=
DateUtil
.
offsetMinute
(
time
,
-
DateUtil
.
minute
(
time
)
%
10
);
String
format
=
DateUtil
.
format
(
time
,
"yyyy-MM-dd HH:mm:00"
);
time
=
DateUtil
.
parse
(
format
,
"yyyy-MM-dd HH:mm:00"
);
ExecutorService
excutorService
=
Executors
.
newFixedThreadPool
(
4
);
int
taskCount
=
2
;
final
CountDownLatch
latch
=
new
CountDownLatch
(
taskCount
);
excutorService
.
submit
(()->{
commonServiceImpl
.
healthWarningMinuteByFan
();
latch
.
countDown
();
});
excutorService
.
submit
(()->{
commonServiceImpl
.
healthWarningMinuteByPv
();
latch
.
countDown
();
});
System
.
out
.
println
(
"等待所有任务完成.."
);
latch
.
await
();
System
.
out
.
println
(
"所有任务完成"
);
//区域 全域最后统一生成
tdengineTimeService
.
insertMomentDataAll
(
format
);
// // 开始异步计算光伏的健康指数算法
// new Thread(() -> {
// // 调用光伏的健康指数算法
// commonServiceImpl.healthWarningMinuteByPv();
// }).start();
// // 开始异步计算风机的健康指数算法
// new Thread(() -> {
// // 调用风机的健康指数算法
// commonServiceImpl.healthWarningMinuteByFan();
// }).start();
}
if
(
"pvsuccess"
.
equals
(
flag
))
{
// 开始异步计算光伏的健康指数算法
new
Thread
(()
->
{
// 调用光伏的健康指数算法
commonServiceImpl
.
healthWarningMinuteByPv
();
}).
start
();
}
if
(
"fansuccess"
.
equals
(
flag
))
{
// 开始异步计算光伏的健康指数算法
new
Thread
(()
->
{
// 调用光伏的健康指数算法
commonServiceImpl
.
healthWarningMinuteByFan
();
}).
start
();
}
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/TdengineTimeServiceImpl.java
View file @
d86c5abe
This diff is collapsed.
Click to expand it.
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/TestController.java
0 → 100644
View file @
d86c5abe
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
controller
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.PersonAccount
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.PersonBasic
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.PersonAccountMapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.PersonBasicMapper
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.util.AesUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
* 农户信息
*
* @author system_generator
* @date 2023-07-07
*/
@RestController
@Api
(
tags
=
"农户信息Api"
)
@RequestMapping
(
value
=
"/test"
)
public
class
TestController
extends
BaseController
{
@Autowired
PersonBasicMapper
personBasicMapper
;
@Autowired
PersonAccountMapper
personAccountMapper
;
/**
* 新增农户信息
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/initpw"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"刷新基础管理信息"
,
notes
=
"刷新基础管理信息"
)
public
ResponseModel
<
Object
>
initpw
()
{
// 基础管理员
List
<
PersonAccount
>
list
=
personAccountMapper
.
selectList
(
null
);
int
i
=
0
;
for
(
PersonAccount
unitInfo
:
list
)
{
System
.
out
.
println
();
System
.
out
.
println
(++
i
+
"/"
+
list
.
size
());
try
{
PersonBasic
personBasic
=
personBasicMapper
.
selectById
(
unitInfo
.
getPersonId
());
int
ph
=
personBasic
.
getPhone
().
length
();
String
npwd
=
"Zxnk_"
+
personBasic
.
getPhone
().
substring
(
ph
-
4
,
ph
);
String
npwdm
=
AesUtil
.
encode
(
npwd
,
"qaz"
);
unitInfo
.
setPassword
(
npwdm
);
unitInfo
.
setSecondaryPassword
(
npwdm
);
FeignClientResult
<
AgencyUserModel
>
re
=
Privilege
.
agencyUserClient
.
queryByUserId
(
unitInfo
.
getPuserId
());
AgencyUserModel
ag
=
re
.
getResult
();
ag
.
setPassword
(
AesUtil
.
encode
(
npwd
,
"qaz"
));
ag
.
setRePassword
(
AesUtil
.
encode
(
npwd
,
"qaz"
));
Privilege
.
agencyUserClient
.
restorePassword
(
unitInfo
.
getPuserId
());
ag
.
setOriginalPassword
(
AesUtil
.
encode
(
"Z2%Op9.q"
,
"qaz"
));
Privilege
.
agencyUserClient
.
modifyPassword
(
unitInfo
.
getPuserId
(),
ag
);
personAccountMapper
.
updateById
(
unitInfo
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
return
new
ResponseModel
<>();
}
}
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/resources/application-dev1.properties
0 → 100644
View file @
d86c5abe
## DB properties:
spring.db1.datasource.driver-class-name
=
com.mysql.cj.jdbc.Driver
spring.db1.datasource.url
=
jdbc:mysql://10.20.1.157:3306/production?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db1.datasource.username
=
root
spring.db1.datasource.password
=
Yeejoin@2020
spring.db2.datasource.driver-class-name
=
com.mysql.cj.jdbc.Driver
spring.db2.datasource.url
=
jdbc:mysql://10.20.1.157:3306/amos_project?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db2.datasource.username
=
root
spring.db2.datasource.password
=
Yeejoin@2020
spring.db3.datasource.driver-class-name
:
com.mysql.cj.jdbc.Driver
spring.db3.datasource.url
=
jdbc:mysql://10.20.1.157:3306/amos_mcb?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull
spring.db3.datasource.username
=
root
spring.db3.datasource.password
=
Yeejoin@2020
## eureka properties:
eureka.instance.hostname
=
10.20.1.160
eureka.client.serviceUrl.defaultZone
=
http://admin:a1234560@${eureka.instance.hostname}:10001/eureka/
## redis properties:
spring.redis.database
=
1
spring.redis.host
=
10.20.1.210
spring.redis.port
=
6379
spring.redis.password
=
yeejoin@2020
spring.cache.type
=
GENERIC
j2cache.open-spring-cache
=
true
j2cache.cache-clean-mode
=
passive
j2cache.allow-null-values
=
true
j2cache.redis-client
=
lettuce
j2cache.l2-cache-open
=
true
j2cache.broadcast
=
net.oschina.j2cache.cache.support.redis.SpringRedisPubSubPolicy
j2cache.L1.provider_class
=
caffeine
j2cache.L2.provider_class
=
net.oschina.j2cache.cache.support.redis.SpringRedisProvider
j2cache.L2.config_section
=
lettuce
j2cache.sync_ttl_to_redis
=
true
j2cache.default_cache_null_object
=
false
j2cache.serialization
=
fst
caffeine.properties
=
/caffeine.properties
lettuce.mode
=
single
lettuce.namespace
=
lettuce.storage
=
generic
lettuce.channel
=
j2cache
lettuce.scheme
=
redis
lettuce.hosts
=
${spring.redis.host}:${spring.redis.port}
lettuce.password
=
${spring.redis.password}
lettuce.database
=
${spring.redis.database}
lettuce.sentinelMasterId
=
lettuce.maxTotal
=
100
lettuce.maxIdle
=
10
lettuce.minIdle
=
10
lettuce.timeout
=
10000
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.broker
=
tcp://10.20.1.210:2883
emqx.user-name
=
super
emqx.password
=
a123456
emqx.max-inflight
=
1000
spring.influx.url
=
http://39.98.246.31:8086
spring.influx.password
=
Yeejoin@2020
spring.influx.user
=
root
spring.influx.database
=
iot_platform
spring.influx.retention_policy
=
default
spring.influx.retention_policy_time
=
30d
spring.influx.actions
=
10000
spring.influx.bufferLimit
=
20000
knife4j.production
=
false
knife4j.enable
=
true
knife4j.basic.enable
=
true
knife4j.basic.username
=
admin
knife4j.basic.password
=
a1234560
management.security.enabled
=
true
spring.security.user.name
=
admin
spring.security.user.password
=
a1234560
fire-rescue
=
123
mybatis-plus.global-config.db-config.update-strategy
=
ignored
# user-amos setting : This value is the secretkey for person manage moudle accout password encryption.please don't change it!!!
amos.secret.key
=
qaz
# if your service can't be access ,you can use this setting , you need change ip as your.
#eureka.instance.prefer-ip-address=true
#eureka.instance.ip-address=172.16.3.122
spring.activemq.broker-url
=
tcp://10.20.1.210:61616
spring.activemq.user
=
admin
spring.activemq.password
=
admin
spring.jms.pub-sub-domain
=
false
myqueue
=
amos.privilege.v1.JXIOP.AQSC_FDGL.userBusiness
modifypasswordqueue
=
amos.privilege.v1.JXIOP.AMOS_ADMIN.modifyPassword
yth.qg.id
=
1
emqx.client-user-name
=
admin
emqx.client-password
=
public
logic
=
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/resources/logback-dev1.xml
0 → 100644
View file @
d86c5abe
<?xml version="1.0" encoding="UTF-8"?>
<configuration
debug=
"false"
>
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
<property
name=
"LOG_HOME"
value=
"log"
/>
<property
name=
"LOG_PATTERN"
value=
"%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %-50.50logger{50} - %msg [%file:%line] %n"
/>
<!-- 按照每天生成日志文件 -->
<appender
name=
"FILE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!--日志文件输出的文件名-->
<FileNamePattern>
${LOG_HOME}/ccs.log.%d{yyyy-MM-dd}.log
</FileNamePattern>
<!--日志文件保留天数-->
<MaxHistory>
7
</MaxHistory>
</rollingPolicy>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<pattern>
${LOG_PATTERN}
</pattern>
</encoder>
<!--日志文件最大的大小-->
<triggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"
>
<MaxFileSize>
30mb
</MaxFileSize>
</triggeringPolicy>
</appender>
<!-- 控制台输出 -->
<appender
name=
"STDOUT"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<pattern>
${LOG_PATTERN}
</pattern>
</encoder>
</appender>
<!--myibatis log configure-->
<logger
name=
"com.apache.ibatis"
level=
"DEBUG"
/>
<logger
name=
"java.sql.Connection"
level=
"DEBUG"
/>
<logger
name=
"java.sql.Statement"
level=
"DEBUG"
/>
<logger
name=
"java.sql.PreparedStatement"
level=
"DEBUG"
/>
<logger
name=
"com.baomidou.mybatisplus"
level=
"DEBUG"
/>
<logger
name=
"org.springframework"
level=
"DEBUG"
/>
<logger
name=
"org.typroject"
level=
"DEBUG"
/>
<logger
name=
"com.yeejoin"
level=
"DEBUG"
/>
<!-- 日志输出级别 -->
<root
level=
"INFO"
>
<appender-ref
ref=
"FILE"
/>
<appender-ref
ref=
"STDOUT"
/>
</root>
</configuration>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment