添加更多BT日志打印
修复!刷BT指令无效的BUG BT下载支持过滤Enable字段
This commit is contained in:
parent
09d2163af3
commit
5cf6fc3cd5
@ -12,7 +12,7 @@ import org.springframework.context.annotation.Import;
|
|||||||
@Import(BTDownloadManager.class)
|
@Import(BTDownloadManager.class)
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
public class NasApplication {
|
public class NasApplication {
|
||||||
public static final String version="1.1.0";
|
public static final String version="1.1.2";
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(NasApplication.class, args);
|
SpringApplication.run(NasApplication.class, args);
|
||||||
AppData.defaultMusicPath = (String) ConfigTools.load(ConfigTools.CONFIG, "musicDir");
|
AppData.defaultMusicPath = (String) ConfigTools.load(ConfigTools.CONFIG, "musicDir");
|
||||||
|
@ -24,5 +24,7 @@ public class BangumiItem implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String titlekey;
|
private String titlekey;
|
||||||
|
|
||||||
|
private Integer enable;
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
}
|
}
|
@ -513,6 +513,66 @@ public class BangumiItemExample {
|
|||||||
addCriterion("titleKey not between", value1, value2, "titlekey");
|
addCriterion("titleKey not between", value1, value2, "titlekey");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Criteria andEnableIsNull() {
|
||||||
|
addCriterion("`enable` is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnableIsNotNull() {
|
||||||
|
addCriterion("`enable` is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnableEqualTo(Integer value) {
|
||||||
|
addCriterion("`enable` =", value, "enable");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnableNotEqualTo(Integer value) {
|
||||||
|
addCriterion("`enable` <>", value, "enable");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnableGreaterThan(Integer value) {
|
||||||
|
addCriterion("`enable` >", value, "enable");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnableGreaterThanOrEqualTo(Integer value) {
|
||||||
|
addCriterion("`enable` >=", value, "enable");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnableLessThan(Integer value) {
|
||||||
|
addCriterion("`enable` <", value, "enable");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnableLessThanOrEqualTo(Integer value) {
|
||||||
|
addCriterion("`enable` <=", value, "enable");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnableIn(List<Integer> values) {
|
||||||
|
addCriterion("`enable` in", values, "enable");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnableNotIn(List<Integer> values) {
|
||||||
|
addCriterion("`enable` not in", values, "enable");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnableBetween(Integer value1, Integer value2) {
|
||||||
|
addCriterion("`enable` between", value1, value2, "enable");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnableNotBetween(Integer value1, Integer value2) {
|
||||||
|
addCriterion("`enable` not between", value1, value2, "enable");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -44,6 +44,9 @@ public class BTDownloadManager implements ApplicationContextAware {
|
|||||||
AnimationData data = new AnimationData();
|
AnimationData data = new AnimationData();
|
||||||
Log.i("BT","启动BT检测,总数:"+list.size());
|
Log.i("BT","启动BT检测,总数:"+list.size());
|
||||||
for (BangumiItem item : list) {
|
for (BangumiItem item : list) {
|
||||||
|
if(item.getEnable()==0){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
item.setAuthor(data.nameToValue(item.getAuthor(), true) + "");
|
item.setAuthor(data.nameToValue(item.getAuthor(), true) + "");
|
||||||
item.setCategories(data.nameToValue(item.getCategories(), false) + "");
|
item.setCategories(data.nameToValue(item.getCategories(), false) + "");
|
||||||
String url = getRSSUrl(item);
|
String url = getRSSUrl(item);
|
||||||
@ -92,7 +95,11 @@ public class BTDownloadManager implements ApplicationContextAware {
|
|||||||
} else {
|
} else {
|
||||||
onSend(null, item);
|
onSend(null, item);
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
Log.i("BT","添加到下载器失败:"+item.getString("title"));
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
Log.i("BT","已下载过:"+item.getString("title"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
@ -42,7 +42,7 @@ public class QQBotManager {
|
|||||||
private final static String QQ_AUDIO = "!语音";
|
private final static String QQ_AUDIO = "!语音";
|
||||||
private final static String QQ_AUDIO_OPEN_LAMP = "!开灯";
|
private final static String QQ_AUDIO_OPEN_LAMP = "!开灯";
|
||||||
private final static String QQ_AUDIO_OPEN_AIR = "!开空调";
|
private final static String QQ_AUDIO_OPEN_AIR = "!开空调";
|
||||||
private final static String QQ_BT_RELOAD = "!刷BT";
|
private final static String QQ_BT_RELOAD = "!刷bt";
|
||||||
private final static String QQ_TOOLS_IDEA = "!idea";
|
private final static String QQ_TOOLS_IDEA = "!idea";
|
||||||
private final static String QQ_TOOLS_IDEA_FILE = "!idea>";
|
private final static String QQ_TOOLS_IDEA_FILE = "!idea>";
|
||||||
}
|
}
|
||||||
@ -227,6 +227,7 @@ public class QQBotManager {
|
|||||||
private void myGroup(String msg) {
|
private void myGroup(String msg) {
|
||||||
StringBuilder builder;
|
StringBuilder builder;
|
||||||
msg = msg.replace("!", "!").toLowerCase();
|
msg = msg.replace("!", "!").toLowerCase();
|
||||||
|
Log.i("QQBot","command = "+msg);
|
||||||
switch (msg) {
|
switch (msg) {
|
||||||
case QQCommands.QQ_OPEN_PC:
|
case QQCommands.QQ_OPEN_PC:
|
||||||
RedisTools.Consumer.system("openPC", null);
|
RedisTools.Consumer.system("openPC", null);
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
<result column="author" jdbcType="VARCHAR" property="author" />
|
<result column="author" jdbcType="VARCHAR" property="author" />
|
||||||
<result column="title" jdbcType="VARCHAR" property="title" />
|
<result column="title" jdbcType="VARCHAR" property="title" />
|
||||||
<result column="titleKey" jdbcType="VARCHAR" property="titlekey" />
|
<result column="titleKey" jdbcType="VARCHAR" property="titlekey" />
|
||||||
|
<result column="enable" jdbcType="INTEGER" property="enable" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Example_Where_Clause">
|
<sql id="Example_Where_Clause">
|
||||||
<where>
|
<where>
|
||||||
@ -68,7 +69,7 @@
|
|||||||
</where>
|
</where>
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, bid, categories, author, title, titleKey
|
id, bid, categories, author, title, titleKey, `enable`
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByExample" parameterType="com.yutou.nas.mybatis.model.BangumiItemExample" resultMap="BaseResultMap">
|
<select id="selectByExample" parameterType="com.yutou.nas.mybatis.model.BangumiItemExample" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
@ -102,9 +103,11 @@
|
|||||||
</delete>
|
</delete>
|
||||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yutou.nas.mybatis.model.BangumiItem" useGeneratedKeys="true">
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yutou.nas.mybatis.model.BangumiItem" useGeneratedKeys="true">
|
||||||
insert into bangumi_item (bid, categories, author,
|
insert into bangumi_item (bid, categories, author,
|
||||||
title, titleKey)
|
title, titleKey, `enable`
|
||||||
|
)
|
||||||
values (#{bid,jdbcType=VARCHAR}, #{categories,jdbcType=VARCHAR}, #{author,jdbcType=VARCHAR},
|
values (#{bid,jdbcType=VARCHAR}, #{categories,jdbcType=VARCHAR}, #{author,jdbcType=VARCHAR},
|
||||||
#{title,jdbcType=VARCHAR}, #{titlekey,jdbcType=VARCHAR})
|
#{title,jdbcType=VARCHAR}, #{titlekey,jdbcType=VARCHAR}, #{enable,jdbcType=INTEGER}
|
||||||
|
)
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yutou.nas.mybatis.model.BangumiItem" useGeneratedKeys="true">
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yutou.nas.mybatis.model.BangumiItem" useGeneratedKeys="true">
|
||||||
insert into bangumi_item
|
insert into bangumi_item
|
||||||
@ -124,6 +127,9 @@
|
|||||||
<if test="titlekey != null">
|
<if test="titlekey != null">
|
||||||
titleKey,
|
titleKey,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="enable != null">
|
||||||
|
`enable`,
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="bid != null">
|
<if test="bid != null">
|
||||||
@ -141,6 +147,9 @@
|
|||||||
<if test="titlekey != null">
|
<if test="titlekey != null">
|
||||||
#{titlekey,jdbcType=VARCHAR},
|
#{titlekey,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="enable != null">
|
||||||
|
#{enable,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<select id="countByExample" parameterType="com.yutou.nas.mybatis.model.BangumiItemExample" resultType="java.lang.Long">
|
<select id="countByExample" parameterType="com.yutou.nas.mybatis.model.BangumiItemExample" resultType="java.lang.Long">
|
||||||
@ -170,6 +179,9 @@
|
|||||||
<if test="record.titlekey != null">
|
<if test="record.titlekey != null">
|
||||||
titleKey = #{record.titlekey,jdbcType=VARCHAR},
|
titleKey = #{record.titlekey,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="record.enable != null">
|
||||||
|
`enable` = #{record.enable,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
@ -182,7 +194,8 @@
|
|||||||
categories = #{record.categories,jdbcType=VARCHAR},
|
categories = #{record.categories,jdbcType=VARCHAR},
|
||||||
author = #{record.author,jdbcType=VARCHAR},
|
author = #{record.author,jdbcType=VARCHAR},
|
||||||
title = #{record.title,jdbcType=VARCHAR},
|
title = #{record.title,jdbcType=VARCHAR},
|
||||||
titleKey = #{record.titlekey,jdbcType=VARCHAR}
|
titleKey = #{record.titlekey,jdbcType=VARCHAR},
|
||||||
|
`enable` = #{record.enable,jdbcType=INTEGER}
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
</if>
|
</if>
|
||||||
@ -205,6 +218,9 @@
|
|||||||
<if test="titlekey != null">
|
<if test="titlekey != null">
|
||||||
titleKey = #{titlekey,jdbcType=VARCHAR},
|
titleKey = #{titlekey,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="enable != null">
|
||||||
|
`enable` = #{enable,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id,jdbcType=INTEGER}
|
where id = #{id,jdbcType=INTEGER}
|
||||||
</update>
|
</update>
|
||||||
@ -214,7 +230,8 @@
|
|||||||
categories = #{categories,jdbcType=VARCHAR},
|
categories = #{categories,jdbcType=VARCHAR},
|
||||||
author = #{author,jdbcType=VARCHAR},
|
author = #{author,jdbcType=VARCHAR},
|
||||||
title = #{title,jdbcType=VARCHAR},
|
title = #{title,jdbcType=VARCHAR},
|
||||||
titleKey = #{titlekey,jdbcType=VARCHAR}
|
titleKey = #{titlekey,jdbcType=VARCHAR},
|
||||||
|
`enable` = #{enable,jdbcType=INTEGER}
|
||||||
where id = #{id,jdbcType=INTEGER}
|
where id = #{id,jdbcType=INTEGER}
|
||||||
</update>
|
</update>
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue
Block a user