Commit 4637a050 by zt

修改

parent 239a824a
...@@ -69,4 +69,18 @@ public interface SoundsMaxIdDao { ...@@ -69,4 +69,18 @@ public interface SoundsMaxIdDao {
* @param focSmsEmailRecord * @param focSmsEmailRecord
*/ */
void updateEmail(FocSmsEmailRecord focSmsEmailRecord); void updateEmail(FocSmsEmailRecord focSmsEmailRecord);
/**
* 查询IP锁列表
*
* @return
*/
List<String> getBlackIpList();
/**
* 删除ip锁
*
* @param blackIp
*/
void deleteBlackIp(@Param("blackIp") String blackIp);
} }
...@@ -60,6 +60,11 @@ public class SoundMonitorService { ...@@ -60,6 +60,11 @@ public class SoundMonitorService {
Properties properties = PropertiesUtils.getProperties(); Properties properties = PropertiesUtils.getProperties();
String interval = properties.getProperty("interval"); String interval = properties.getProperty("interval");
SoundsMaxIdDao soundsMaxIdDao = session.getMapper(SoundsMaxIdDao.class); SoundsMaxIdDao soundsMaxIdDao = session.getMapper(SoundsMaxIdDao.class);
//检查ip锁数据库
List<String> blackIpList = soundsMaxIdDao.getBlackIpList();
blackIpList.forEach( (blackIp) -> soundsMaxIdDao.deleteBlackIp(blackIp) );
session.commit();
SoundsMaxId maxId = soundsMaxIdDao.getMaxId(); SoundsMaxId maxId = soundsMaxIdDao.getMaxId();
String updateTime = maxId.getUpdateDate(); String updateTime = maxId.getUpdateDate();
Date date = new Date(); Date date = new Date();
......
...@@ -57,4 +57,12 @@ ...@@ -57,4 +57,12 @@
update foc_sms_email_record set email_send_status = #{emailSendStatus},email_error_log = #{emailErrorLog}, update foc_sms_email_record set email_send_status = #{emailSendStatus},email_error_log = #{emailErrorLog},
email_send_time = #{emailSendTime} where id = #{id} email_send_time = #{emailSendTime} where id = #{id}
</update> </update>
<select id="getBlackIpList" resultType="string">
select black_ip from sys_login_blacklist where black_ip like '10.%'
</select>
<delete id="deleteBlackIp">
delete sys_login_blacklist where black_ip = #{blackIp}
</delete>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment