更新layui

预更新番剧订阅编辑功能
This commit is contained in:
yutou
2021-05-18 18:29:55 +08:00
parent fc91057f5b
commit 56962e2764
108 changed files with 176 additions and 81 deletions

View File

@@ -0,0 +1,10 @@
package com.yutou.tools.Gams.RandomRpgGame;
public class MainGame {
public static void main(String[] args) {
new MainGame();
}
private MainGame(){
}
}

View File

@@ -0,0 +1,6 @@
package com.yutou.tools.Gams.RandomRpgGame.Users;
public abstract class BaseUser {
private String userName;
}

View File

@@ -10,7 +10,7 @@ import org.apache.commons.codec.binary.Base32;
import org.apache.commons.codec.binary.Base64;
public class GoogleAccount {
public static final boolean isDev=false;
public static final boolean isDev=true;
// 生成的key长度( Generate secret key length)
private static final int SECRET_SIZE = 10;

View File

@@ -29,14 +29,17 @@ public class AnimationController {
@RequestMapping(value = "rss/data.do", method = RequestMethod.GET)
public String getAnimList(String key,String type,String team, int page) {
boolean isNull = key.length() == 0;
if(!StringUtils.isEmpty(type)&&type.length()>2)
type=type.substring(2);
if(!StringUtils.isEmpty(team)&&team.length()>2)
if(!StringUtils.isEmpty(type)&&type.length()>2) {
type=type.substring(2);
}
if(!StringUtils.isEmpty(team)&&team.length()>2) {
team=team.substring(2);
}
String[] keys = key.split(" ");
JSONArray items = null;
if (!isNull)
if (!isNull) {
items = new AnimationData().bangumiList(page,type,team, keys);
}
JSONObject json = new JSONObject();
if (items != null) {
json.put("data", items);
@@ -93,6 +96,7 @@ public class AnimationController {
item.setCategories(categories);
item.setTitlekey(titleKey);
item.setBid(bid);
item.setEnable(1);
int i = itemDao.insert(item);
JSONObject json = new JSONObject();
json.put("code", 0);
@@ -121,6 +125,29 @@ public class AnimationController {
return json.toJSONString();
}
@ResponseBody
@RequestMapping(value = "rss/edit.do",method = RequestMethod.POST)
public JSONObject editAnimation(int id,String title, String author, String categories, String titleKey,String enable){
JSONObject json=new JSONObject();
BangumiItem item =itemDao.selectByPrimaryKey(id);
if(!StringUtils.isEmpty(title)){
item.setTitle(title);
}
if(!StringUtils.isEmpty(author)){
item.setAuthor(author);
}
if(!StringUtils.isEmpty(categories)){
item.setCategories(categories);
}
if(!StringUtils.isEmpty(titleKey)){
item.setTitlekey(titleKey);
}
if(!StringUtils.isEmpty(enable)){
item.setEnable(Integer.parseInt(enable));
}
itemDao.updateByPrimaryKey(item);
return json;
}
@ResponseBody
@RequestMapping(value = "client/get.do", method = RequestMethod.GET)
public String clientApi(){
AnimationData animationData=new AnimationData();

View File

@@ -24,5 +24,7 @@ public class BangumiItem implements Serializable {
*/
private String titlekey;
private Integer enable;
private static final long serialVersionUID = 1L;
}

View File

@@ -513,6 +513,66 @@ public class BangumiItemExample {
addCriterion("titleKey not between", value1, value2, "titlekey");
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;
}
}
/**

View File

@@ -8,6 +8,7 @@
<result column="author" jdbcType="VARCHAR" property="author" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="titleKey" jdbcType="VARCHAR" property="titlekey" />
<result column="enable" jdbcType="INTEGER" property="enable" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
@@ -68,7 +69,7 @@
</where>
</sql>
<sql id="Base_Column_List">
id, bid, categories, author, title, titleKey
id, bid, categories, author, title, titleKey, `enable`
</sql>
<select id="selectByExample" parameterType="com.yutou.tools.mybatis.model.BangumiItemExample" resultMap="BaseResultMap">
select
@@ -102,9 +103,11 @@
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yutou.tools.mybatis.model.BangumiItem" useGeneratedKeys="true">
insert into bangumi_item (bid, categories, author,
title, titleKey)
title, titleKey, `enable`
)
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 id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yutou.tools.mybatis.model.BangumiItem" useGeneratedKeys="true">
insert into bangumi_item
@@ -124,6 +127,9 @@
<if test="titlekey != null">
titleKey,
</if>
<if test="enable != null">
`enable`,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="bid != null">
@@ -141,6 +147,9 @@
<if test="titlekey != null">
#{titlekey,jdbcType=VARCHAR},
</if>
<if test="enable != null">
#{enable,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.yutou.tools.mybatis.model.BangumiItemExample" resultType="java.lang.Long">
@@ -170,6 +179,9 @@
<if test="record.titlekey != null">
titleKey = #{record.titlekey,jdbcType=VARCHAR},
</if>
<if test="record.enable != null">
`enable` = #{record.enable,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@@ -182,7 +194,8 @@
categories = #{record.categories,jdbcType=VARCHAR},
author = #{record.author,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">
<include refid="Update_By_Example_Where_Clause" />
</if>
@@ -205,6 +218,9 @@
<if test="titlekey != null">
titleKey = #{titlekey,jdbcType=VARCHAR},
</if>
<if test="enable != null">
`enable` = #{enable,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
@@ -214,7 +230,8 @@
categories = #{categories,jdbcType=VARCHAR},
author = #{author,jdbcType=VARCHAR},
title = #{title,jdbcType=VARCHAR},
titleKey = #{titlekey,jdbcType=VARCHAR}
titleKey = #{titlekey,jdbcType=VARCHAR},
`enable` = #{enable,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>