update
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
package com.yutou.bilibili.BiliBili.Datas;
|
||||
|
||||
public class AppData {
|
||||
public static String FFMPEG="";
|
||||
public static String BILIBILI_HEADERS = "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36 Referer:https://live.bilibili.com";
|
||||
public static boolean LIVE_SAVE_FFMPEG=false;
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
package com.yutou.bilibili.BiliBili.Datas;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BiliBiliUpData {
|
||||
int id;
|
||||
String name;
|
||||
String url;
|
||||
int roomId;
|
||||
boolean offlineListening;
|
||||
boolean enable;
|
||||
boolean saveDanmu;
|
||||
|
||||
public void setOfflineListening(int offlineListening) {
|
||||
this.offlineListening = offlineListening==1;
|
||||
}
|
||||
|
||||
public void setEnable(int enable) {
|
||||
this.enable = enable==1;
|
||||
}
|
||||
|
||||
public void setSaveDanmu(int saveDanmu) {
|
||||
this.saveDanmu = saveDanmu==1;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.yutou.bilibili.BiliBili.Datas;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class GiftData {
|
||||
int id;
|
||||
int price;
|
||||
String name;
|
||||
String desc;
|
||||
String rights;
|
||||
String icon;
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
package com.yutou.bilibili.BiliBili.Datas;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class LiveData {
|
||||
public static final String INTERACT_WORD="INTERACT_WORD";//普通用户进直播间
|
||||
public static final String ENTRY_EFFECT="ENTRY_EFFECT";//舰长进直播间
|
||||
public static final String DANMU_MSG="DANMU_MSG";//普通弹幕
|
||||
public static final String SEND_GIFT="SEND_GIFT";//送礼
|
||||
public static final String COMBO_SEND="COMBO_SEND";//礼物连击
|
||||
public static final String SUPER_CHAT_MESSAGE="SUPER_CHAT_MESSAGE";//SC
|
||||
public static final String NOTICE_MSG="NOTICE_MSG";//系统通知
|
||||
public static final String GUARD_BUY="GUARD_BUY";//购买、续费舰长等
|
||||
public static final String UNKNOWN_MESSAGE="UNKNOWN_MESSAGE";//未记录的事件
|
||||
int id;
|
||||
int roomId;
|
||||
int uid;
|
||||
String type;
|
||||
String msg;
|
||||
String giftName;
|
||||
int giftIndex;
|
||||
int giftId;
|
||||
int price;
|
||||
int priceOfCommission;
|
||||
Date subTime;
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package com.yutou.bilibili.BiliBili.Datas;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class LiveInfo {
|
||||
int id;
|
||||
int roomId;
|
||||
int popular;
|
||||
int userIndex;
|
||||
int vipUserIndex;
|
||||
Date subTime;
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.yutou.bilibili;
|
||||
|
||||
import com.yutou.bilibili.QQBot.QQBotManager;
|
||||
import com.yutou.bilibili.Tools.ExcelUtils;
|
||||
import com.yutou.bilibili.Tools.ServiceTools;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
||||
@Import({ServiceTools.class, ExcelUtils.class, QQBotManager.class})
|
||||
@SpringBootApplication
|
||||
public class BilibiliApplication {
|
||||
|
||||
public static String version="0.8.4";
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(BilibiliApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package com.yutou.bilibili.Controllers;
|
||||
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.yutou.biliapi.bean.live.database.LiveConfigDatabaseBean;
|
||||
import com.yutou.bilibili.datas.ResultData;
|
||||
import com.yutou.bilibili.datas.ReturnCode;
|
||||
import com.yutou.bilibili.services.LiveConfigService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.List;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/live/config/")
|
||||
public class LiveConfigController {
|
||||
@Resource
|
||||
LiveConfigService configService;
|
||||
|
||||
@RequestMapping(value = "set", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public ResultData<JSONObject> setConfig(String url, LiveConfigDatabaseBean bean) {
|
||||
LiveConfigDatabaseBean config = configService.addConfig(url, bean);
|
||||
if (config != null) {
|
||||
return ResultData.success(config.toJson());
|
||||
}
|
||||
return ResultData.fail(ReturnCode.RC999);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "update", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public ResultData<JSONObject> updateConfig(String roomId, LiveConfigDatabaseBean bean) {
|
||||
LiveConfigDatabaseBean config = configService.updateConfig(new BigInteger(roomId), bean);
|
||||
if (config != null) {
|
||||
return ResultData.success(config.toJson());
|
||||
}
|
||||
return ResultData.fail(ReturnCode.RC999);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "get", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public ResultData<JSONObject> getConfig(String roomId) {
|
||||
if ("0".equals(roomId) || !StringUtils.hasText(roomId)) {
|
||||
return ResultData.fail(ReturnCode.RC999);
|
||||
}
|
||||
LiveConfigDatabaseBean config = configService.getConfig(new BigInteger(roomId));
|
||||
if (config != null) {
|
||||
return ResultData.success(config.toJson());
|
||||
}
|
||||
return ResultData.fail(ReturnCode.RC999);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "all", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public ResultData<JSONArray> getAllConfig() {
|
||||
List<LiveConfigDatabaseBean> config = configService.getAllConfig();
|
||||
if (config != null) {
|
||||
return ResultData.success(JSONArray.parseArray(JSONArray.toJSONString(config)));
|
||||
}
|
||||
return ResultData.fail(ReturnCode.RC999);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "delete", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public ResultData<JSONObject> deleteConfig(BigInteger roomId) {
|
||||
if (roomId.equals(BigInteger.ZERO)) {
|
||||
return ResultData.fail(ReturnCode.RC999);
|
||||
}
|
||||
boolean flag = configService.deleteConfig(roomId);
|
||||
if (flag) {
|
||||
return ResultData.success(ReturnCode.RC100);
|
||||
}
|
||||
return ResultData.fail(ReturnCode.RC999);
|
||||
}
|
||||
}
|
||||
@@ -1,133 +0,0 @@
|
||||
package com.yutou.bilibili.Controllers;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.yutou.bilibili.BiliBili.Datas.AppData;
|
||||
import com.yutou.bilibili.QQBot.QQBotManager;
|
||||
import com.yutou.bilibili.Services.ISystemConfigService;
|
||||
import com.yutou.bilibili.Tools.Config;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
|
||||
@Controller
|
||||
public class SystemConfigController {
|
||||
@Resource
|
||||
ISystemConfigService configService;
|
||||
|
||||
@RequestMapping("/system/get/config.do")
|
||||
@ResponseBody
|
||||
public JSONObject getRegUser() {
|
||||
JSONObject json = new JSONObject();
|
||||
JSONObject data = new JSONObject();
|
||||
String reg = configService.getConfig(Config.USER_REG);
|
||||
String bLive = configService.getConfig(Config.BILI_LIVE_FLAG);
|
||||
if (reg == null) {
|
||||
reg = "0";
|
||||
}
|
||||
if (bLive == null) {
|
||||
bLive = "0";
|
||||
}
|
||||
data.put(Config.USER_REG, reg);
|
||||
data.put(Config.BILI_LIVE_FLAG, bLive);
|
||||
json.put("code", 0);
|
||||
json.put("data", data);
|
||||
return json;
|
||||
}
|
||||
|
||||
@RequestMapping("/system/set/config.do")
|
||||
@ResponseBody
|
||||
public JSONObject setConfig(String key, String value) {
|
||||
configService.setConfig(key, value);
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("code", 0);
|
||||
json.put("msg", "ok");
|
||||
return json;
|
||||
}
|
||||
|
||||
@RequestMapping("/system/public/reg.do")
|
||||
@ResponseBody
|
||||
public JSONObject getRegModel() {
|
||||
JSONObject json = new JSONObject();
|
||||
JSONObject data = new JSONObject();
|
||||
String reg = configService.getConfig(Config.USER_REG);
|
||||
boolean model = false;
|
||||
if (reg == null) {
|
||||
reg = "0";
|
||||
}
|
||||
if (reg.equals("1")) {
|
||||
model = true;
|
||||
}
|
||||
data.put(Config.USER_REG, model);
|
||||
json.put("code", 0);
|
||||
json.put("data", data);
|
||||
return json;
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping("/system/set/ffmpeg.do")
|
||||
public JSONObject setFFmpeg(String ffmpeg) throws UnsupportedEncodingException {
|
||||
ffmpeg = URLDecoder.decode(ffmpeg, "UTF-8");
|
||||
configService.setConfig(Config.SYSTEM_VIDEO_FFMPEG, ffmpeg);
|
||||
AppData.FFMPEG = ffmpeg;
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("code", 0);
|
||||
json.put("msg", "ok");
|
||||
return json;
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping("/system/get/ffmpeg.do")
|
||||
public JSONObject getFFmpeg() {
|
||||
JSONObject json = new JSONObject();
|
||||
JSONObject data = new JSONObject();
|
||||
String reg = configService.getConfig(Config.SYSTEM_VIDEO_FFMPEG);
|
||||
data.put(Config.SYSTEM_VIDEO_FFMPEG, reg);
|
||||
json.put("code", 0);
|
||||
json.put("data", data);
|
||||
return json;
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping("/system/set/savelive.do")
|
||||
public JSONObject setSaveLive(String model) throws UnsupportedEncodingException {
|
||||
JSONObject json = new JSONObject();
|
||||
if (StringUtils.isEmpty(configService.getConfig(Config.SYSTEM_VIDEO_FFMPEG))) {
|
||||
json.put("code", 404);
|
||||
json.put("msg", "请先设置FFmpeg路径");
|
||||
return json;
|
||||
}
|
||||
model = URLDecoder.decode(model, "UTF-8");
|
||||
configService.setConfig(Config.SYSTEM_VIDEO_SAVE_MODEL, model);
|
||||
AppData.LIVE_SAVE_FFMPEG = model.equals("ffmpeg");
|
||||
json.put("code", 0);
|
||||
json.put("msg", "ok");
|
||||
return json;
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping("/system/get/savelive.do")
|
||||
public JSONObject getSaveLiveModel() {
|
||||
JSONObject json = new JSONObject();
|
||||
JSONObject data = new JSONObject();
|
||||
String reg = configService.getConfig(Config.SYSTEM_VIDEO_SAVE_MODEL);
|
||||
System.out.println(reg);
|
||||
data.put(Config.SYSTEM_VIDEO_SAVE_MODEL, (!StringUtils.isEmpty(reg) && reg.equals("ffmpeg")));
|
||||
json.put("code", 0);
|
||||
json.put("data", data);
|
||||
return json;
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping("/system/qq/login.do")
|
||||
public JSONObject loginQQ() {
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("code", 0);
|
||||
json.put("msg", "ok");
|
||||
return json;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.yutou.bilibili.Controllers;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
@Controller
|
||||
public class TestControllers {
|
||||
@RequestMapping("/root/test")
|
||||
@ResponseBody
|
||||
public String test(){
|
||||
return "hello world";
|
||||
}
|
||||
}
|
||||
@@ -1,184 +0,0 @@
|
||||
package com.yutou.bilibili.Controllers;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.yutou.bilibili.Services.ISystemConfigService;
|
||||
import com.yutou.bilibili.Services.IUserService;
|
||||
import com.yutou.bilibili.Tools.Config;
|
||||
import com.yutou.bilibili.mybatis.Bili.mybatis.model.BilibiliUpInfo;
|
||||
import com.yutou.bilibili.mybatis.model.UBiliUp;
|
||||
import com.yutou.bilibili.mybatis.model.UUser;
|
||||
import com.yutou.utils.AppTools;
|
||||
import com.yutou.utils.RedisTools;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.UUID;
|
||||
|
||||
@Controller
|
||||
public class UserController {
|
||||
@Resource
|
||||
IUserService service;
|
||||
|
||||
@Resource
|
||||
ISystemConfigService configService;
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping("/user/reg.do")
|
||||
public JSONObject reg(UUser user, HttpServletResponse response) {
|
||||
JSONObject json = new JSONObject();
|
||||
String isReg = configService.getConfig(Config.USER_REG);
|
||||
if (isReg != null) {
|
||||
if (isReg.equals("0")) {
|
||||
json.put("code", -2);
|
||||
json.put("msg", "当前系统禁止注册");
|
||||
return json;
|
||||
}
|
||||
}
|
||||
user.setPower("[1,2,3,5,6,7]");
|
||||
user.setSubtime(new Date());
|
||||
user.setLogintoken(UUID.randomUUID().toString());
|
||||
RedisTools.set(user.getLogintoken(), user.getId() + "", 30 * 24 * 60);
|
||||
AppTools.setCookie(response, "login", user.getLogintoken(), -1);
|
||||
boolean flag = service.reg(user);
|
||||
if (flag) {
|
||||
json.put("code", 0);
|
||||
json.put("msg", "注册成功");
|
||||
} else {
|
||||
json.put("code", -1);
|
||||
json.put("msg", "该用户已存在或无法注册");
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping("/user/login.do")
|
||||
public JSONObject login(UUser user, HttpServletResponse response) {
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("code", 0);
|
||||
if (service.login(user.getUser(), user.getPassword())) {
|
||||
user = service.getUser(user.getUser());
|
||||
//user.setLogintoken(UUID.randomUUID().toString());
|
||||
RedisTools.set(user.getLogintoken(), user.getId() + "", 30 * 24 * 60);
|
||||
AppTools.setCookie(response, "login", user.getLogintoken(), -1);
|
||||
json.put("msg", "登陆成功");
|
||||
json.put("power", user.getPower());
|
||||
} else {
|
||||
json.put("code", -1);
|
||||
json.put("msg", "登陆失败");
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping("/user/logout.do")
|
||||
public JSONObject logout(HttpServletRequest request, HttpServletResponse response) {
|
||||
JSONObject json = new JSONObject();
|
||||
String token = AppTools.getLoginToken(request);
|
||||
if (StringUtils.isEmpty(token)) {
|
||||
json.put("code", -1);
|
||||
json.put("msg", "注销失败");
|
||||
} else {
|
||||
UUser user = service.getUserToToken(token);
|
||||
if (user != null) {
|
||||
RedisTools.remove(user.getLogintoken());
|
||||
user.setLogintoken("");
|
||||
service.update(user);
|
||||
AppTools.deleteCookie(request, response, "login");
|
||||
json.put("code", 0);
|
||||
json.put("msg", "注销成功");
|
||||
} else {
|
||||
json.put("code", -2);
|
||||
json.put("msg", "注销失败");
|
||||
}
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping("/user/set/update.do")
|
||||
public JSONObject update(UUser user, HttpServletRequest request) {
|
||||
JSONObject json = new JSONObject();
|
||||
String token = AppTools.getLoginToken(request);
|
||||
if (StringUtils.isEmpty(token)) {
|
||||
json.put("code", -1);
|
||||
json.put("msg", "未登录");
|
||||
} else {
|
||||
UUser loginUser = service.getUserToUid(Integer.parseInt(RedisTools.get(token)));
|
||||
if (loginUser != null) {
|
||||
user.setLogintoken("");
|
||||
user.setId(loginUser.getId());
|
||||
user.setPower(loginUser.getPower());
|
||||
user.setBiliCookie(loginUser.getBiliCookie());
|
||||
user.setSubtime(loginUser.getSubtime());
|
||||
user.setPassword(AppTools.getMD5(user.getPassword()));
|
||||
service.update(user);
|
||||
json.put("code", 0);
|
||||
json.put("msg", "修改成功");
|
||||
} else {
|
||||
json.put("code", -2);
|
||||
json.put("msg", "修改失败");
|
||||
}
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping("/user/up/list.do")
|
||||
public JSONObject uplist(HttpServletRequest request) {
|
||||
JSONObject json = new JSONObject();
|
||||
String token = AppTools.getLoginToken(request);
|
||||
if (StringUtils.isEmpty(token)) {
|
||||
json.put("code", "-1");
|
||||
json.put("msg", "未登录");
|
||||
} else {
|
||||
json.put("code", 0);
|
||||
json.put("msg", "ok");
|
||||
json.put("data", service.getUserUp(Integer.parseInt(RedisTools.get(token))));
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping("/user/up/set/add.do")
|
||||
public JSONObject addUp(HttpServletRequest request, BilibiliUpInfo info) {
|
||||
JSONObject json = new JSONObject();
|
||||
return json;
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping("/user/get/test.do")
|
||||
public JSONObject testUser(HttpServletRequest request) {
|
||||
JSONObject json = new JSONObject();
|
||||
String token = AppTools.getLoginToken(request);
|
||||
if (StringUtils.isEmpty(token)) {
|
||||
json.put("code", -1);
|
||||
json.put("msg", "未登录");
|
||||
} else {
|
||||
UUser user = service.getUserToUid(Integer.parseInt(RedisTools.get(token)));
|
||||
if (user == null) {
|
||||
json.put("code", -2);
|
||||
json.put("msg", "未登录");
|
||||
return json;
|
||||
}
|
||||
JSONArray powers = JSONArray.parseArray(user.getPower());
|
||||
JSONObject ujson = JSONObject.parseObject(JSONObject.toJSONString(user));
|
||||
ujson.remove("logintoken");
|
||||
ujson.remove("biliCookie");
|
||||
ujson.remove("password");
|
||||
ujson.remove("subtime");
|
||||
ujson.put("power", powers);
|
||||
json.put("code", 0);
|
||||
json.put("data", ujson);
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,212 +0,0 @@
|
||||
package com.yutou.bilibili.QQBot;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.yutou.napcat.QQDatabase;
|
||||
import com.yutou.napcat.QQNumberManager;
|
||||
import com.yutou.napcat.handle.BaseHandle;
|
||||
import com.yutou.napcat.handle.MessageHandleBuild;
|
||||
import com.yutou.napcat.handle.Reply;
|
||||
import com.yutou.napcat.handle.Text;
|
||||
import com.yutou.napcat.http.NapCatApi;
|
||||
import com.yutou.napcat.model.FriendBean;
|
||||
import com.yutou.napcat.model.GroupBean;
|
||||
import com.yutou.napcat.model.SendMessageResponse;
|
||||
import com.yutou.okhttp.HttpBody;
|
||||
import com.yutou.okhttp.HttpCallback;
|
||||
import com.yutou.utils.ConfigTools;
|
||||
import okhttp3.Headers;
|
||||
import retrofit2.Response;
|
||||
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class QQBotManager {
|
||||
|
||||
public static Long defGroup = 891655174L;
|
||||
public static Long defQQ = 583819556L;
|
||||
|
||||
|
||||
private static QQBotManager botManager = null;
|
||||
private static final long qqGroup = 891655174L;
|
||||
private boolean isLogin = false;
|
||||
private static boolean isInit = false;
|
||||
|
||||
|
||||
private QQBotManager() {
|
||||
Boolean isRun = ConfigTools.load(ConfigTools.CONFIG, "qq_bot", Boolean.class);
|
||||
if (isRun != null && isRun) {
|
||||
isLogin = true;
|
||||
init();
|
||||
}
|
||||
}
|
||||
|
||||
private void init() {
|
||||
NapCatApi.getGroupApi().getGroupList().enqueue(new HttpCallback<List<GroupBean>>() {
|
||||
@Override
|
||||
public void onResponse(Headers headers,int code, String status, List<GroupBean> response, String rawResponse) {
|
||||
for (GroupBean groupBean : response) {
|
||||
QQDatabase.addGroup(groupBean.getGroupId(), groupBean);
|
||||
QQNumberManager.getManager().addNumber(groupBean.getGroupId(), true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable throwable) {
|
||||
|
||||
}
|
||||
});
|
||||
NapCatApi.getFriendApi().getFriendList().enqueue(new HttpCallback<List<FriendBean>>() {
|
||||
@Override
|
||||
public void onResponse(Headers headers,int code, String status, List<FriendBean> response, String rawResponse) {
|
||||
for (FriendBean friendBean : response) {
|
||||
QQDatabase.addUser(friendBean.getUserId(), friendBean);
|
||||
QQNumberManager.getManager().addNumber(friendBean.getUserId(), false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable throwable) {
|
||||
|
||||
}
|
||||
});
|
||||
NapCatApi.getUtilsApi().getLoginInfo().enqueue(new HttpCallback<FriendBean>() {
|
||||
@Override
|
||||
public void onResponse(Headers headers,int code, String status, FriendBean response, String rawResponse) {
|
||||
QQDatabase.setMe(response);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable throwable) {
|
||||
|
||||
}
|
||||
});
|
||||
isInit = true;
|
||||
}
|
||||
|
||||
public synchronized static QQBotManager getInstance() {
|
||||
if (botManager == null && !isInit) {
|
||||
botManager = new QQBotManager();
|
||||
}
|
||||
return botManager;
|
||||
}
|
||||
|
||||
|
||||
private String getNotLoginQQ() {
|
||||
return "没有登录QQ";
|
||||
}
|
||||
|
||||
public SendMessageResponse sendPrivateMessage(Long qq, BaseHandle<?>... items) {
|
||||
return sendMessage(true, qq, items);
|
||||
}
|
||||
|
||||
private SendMessageResponse sendGroupMessage(Long group, BaseHandle<?>... items) {
|
||||
return sendMessage(false, group, items);
|
||||
}
|
||||
|
||||
public SendMessageResponse sendMessage(boolean user, Long qq, String msg) {
|
||||
return sendMessage(user, qq, new Text(msg));
|
||||
}
|
||||
|
||||
public SendMessageResponse sendMessage(Long qq, BaseHandle<?>... items) {
|
||||
return sendMessage(QQDatabase.checkFriend(qq), qq, Arrays.asList(items));
|
||||
}
|
||||
|
||||
public SendMessageResponse sendMessage(boolean isUser, Long qq, BaseHandle<?>... items) {
|
||||
return sendMessage(isUser, qq, Arrays.asList(items));
|
||||
}
|
||||
|
||||
public SendMessageResponse sendMessage(boolean isUser, Long qq, List<BaseHandle<?>> items) {
|
||||
try {
|
||||
if(!ConfigTools.load(ConfigTools.CONFIG,ConfigTools.QQ, Boolean.class)){
|
||||
return null;
|
||||
}
|
||||
MessageHandleBuild handleBuild = MessageHandleBuild
|
||||
.create()
|
||||
.setGroup(!isUser)
|
||||
.setQQNumber(qq);
|
||||
for (BaseHandle<?> item : items) {
|
||||
if (item.getData() == null) {
|
||||
continue;
|
||||
}
|
||||
if (item instanceof Reply) {
|
||||
if (((Reply) item).getData().getId() == -1) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
handleBuild.add(item);
|
||||
}
|
||||
Response<HttpBody<SendMessageResponse>> response;
|
||||
if (isUser) {
|
||||
response = NapCatApi.getMessageApi().sendPrivateMsg(
|
||||
handleBuild.build()
|
||||
).execute();
|
||||
} else {
|
||||
response = NapCatApi.getMessageApi().sendGroupMsg(
|
||||
handleBuild.build()
|
||||
).execute();
|
||||
}
|
||||
if (response.body() != null) {
|
||||
return response.body().getData();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
SendMessageResponse response = new SendMessageResponse();
|
||||
response.setId(-1);
|
||||
response.setE(e.getMessage());
|
||||
return response;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String sendMessage(String text) {
|
||||
|
||||
return getNotLoginQQ();
|
||||
}
|
||||
|
||||
public SendMessageResponse sendMessage(Long group, String text) {
|
||||
return sendMessage(QQDatabase.checkFriend(group), group, new Text(text));
|
||||
}
|
||||
|
||||
public void sendMessage(Long group, StringBuilder builder) {
|
||||
if (QQNumberManager.getManager().isGroup(group)) {
|
||||
System.out.println("发群");
|
||||
} else {
|
||||
System.out.println("发个人");
|
||||
}
|
||||
}
|
||||
|
||||
public void sendMessage(File imageFile, Long qq, String text) {
|
||||
sendMessage(imageFile, qq, null, text);
|
||||
}
|
||||
|
||||
public void sendMessage(File imageFile, Long qq, String replyMessageId, String text) {
|
||||
|
||||
}
|
||||
|
||||
public void sendMessage(File imageFile, String text) {
|
||||
}
|
||||
|
||||
public void sendMessage(List<File> imgs, Long qq, String text) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("t1", 3234567890L);
|
||||
System.out.println("json = " + json);
|
||||
|
||||
String tmp = json.toString();
|
||||
JSONObject json2 = JSONObject.parseObject(tmp);
|
||||
System.out.println("json2 = " + json2);
|
||||
}
|
||||
|
||||
|
||||
public boolean isLogin() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
package com.yutou.bilibili.Services;
|
||||
|
||||
public interface ISystemConfigService {
|
||||
String getConfig(String key);
|
||||
void setConfig(String key,String value);
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.yutou.bilibili.Services;
|
||||
|
||||
import com.yutou.bilibili.mybatis.model.UBiliUp;
|
||||
import com.yutou.bilibili.mybatis.model.UUser;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IUserService {
|
||||
boolean login(String uname,String password);
|
||||
boolean reg(UUser user);
|
||||
boolean addUp(UBiliUp up);
|
||||
boolean removeUp(UUser user,UBiliUp up);
|
||||
boolean update(UUser user);
|
||||
UUser getUser(String uname);
|
||||
UUser getUserToUid(Integer uid);
|
||||
UUser getUserToToken(String token);
|
||||
List<UBiliUp> getUserUp(int uid);
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
package com.yutou.bilibili.Services.impl;
|
||||
|
||||
import com.yutou.bilibili.Services.ISystemConfigService;
|
||||
import com.yutou.bilibili.mybatis.dao.SConfigDao;
|
||||
import com.yutou.bilibili.mybatis.model.SConfig;
|
||||
import com.yutou.bilibili.mybatis.model.SConfigExample;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service("SystemConfigService")
|
||||
public class SystemConfigImpl implements ISystemConfigService {
|
||||
@Resource
|
||||
SConfigDao configDao;
|
||||
@Override
|
||||
public String getConfig(String key) {
|
||||
SConfigExample example=new SConfigExample();
|
||||
example.createCriteria().andConfigkeyEqualTo(key);
|
||||
List<SConfig> list=configDao.selectByExample(example);
|
||||
if(list.isEmpty()) {
|
||||
return null;
|
||||
}else{
|
||||
return list.get(0).getConfigvalue();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setConfig(String key, String value) {
|
||||
SConfig config=new SConfig();
|
||||
if(getConfig(key)!=null){
|
||||
SConfigExample example=new SConfigExample();
|
||||
example.createCriteria().andConfigkeyEqualTo(key);
|
||||
config=configDao.selectByExample(example).get(0);
|
||||
config.setConfigvalue(value);
|
||||
configDao.updateByPrimaryKey(config);
|
||||
}else {
|
||||
config.setConfigkey(key);
|
||||
config.setConfigvalue(value);
|
||||
configDao.insert(config);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,110 +0,0 @@
|
||||
package com.yutou.bilibili.Services.impl;
|
||||
|
||||
import com.yutou.bilibili.Services.IUserService;
|
||||
import com.yutou.bilibili.mybatis.dao.UBiliUpDao;
|
||||
import com.yutou.bilibili.mybatis.dao.UUserDao;
|
||||
import com.yutou.bilibili.mybatis.model.UBiliUp;
|
||||
import com.yutou.bilibili.mybatis.model.UBiliUpExample;
|
||||
import com.yutou.bilibili.mybatis.model.UUser;
|
||||
import com.yutou.bilibili.mybatis.model.UUserExample;
|
||||
import com.yutou.utils.AppTools;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service("UserService")
|
||||
public class UserServiceImpl implements IUserService {
|
||||
@Resource
|
||||
UUserDao userDao;
|
||||
@Resource
|
||||
UBiliUpDao upDao;
|
||||
@Override
|
||||
public boolean login(String uname, String password) {
|
||||
UUserExample example=new UUserExample();
|
||||
String _password= AppTools.getMD5 (password);
|
||||
example.createCriteria().andUserEqualTo(uname).andPasswordEqualTo(_password);
|
||||
return !userDao.selectByExample(example).isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean reg(UUser user) {
|
||||
if(checkUser(user.getUser())){
|
||||
return false;
|
||||
}
|
||||
user.setPassword(AppTools.getMD5 (user.getPassword()));
|
||||
return userDao.insert(user)>0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addUp(UBiliUp up) {
|
||||
if(checkUP(up.getUid(),up.getRoomid())){
|
||||
return false;
|
||||
}
|
||||
return upDao.insert(up)>0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removeUp(UUser user, UBiliUp up) {
|
||||
if(checkUP(up.getUid(),up.getRoomid())){
|
||||
return false;
|
||||
}
|
||||
return upDao.deleteByPrimaryKey(up.getId())>0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean update(UUser user) {
|
||||
return userDao.updateByPrimaryKey(user)>0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UUser getUser(String uname) {
|
||||
UUserExample example=new UUserExample();
|
||||
example.createCriteria().andUserEqualTo(uname);
|
||||
List<UUser> list=userDao.selectByExample(example);
|
||||
if(list.isEmpty()){
|
||||
return null;
|
||||
}else{
|
||||
return list.get(0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public UUser getUserToUid(Integer uid) {
|
||||
return userDao.selectByPrimaryKey(uid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UBiliUp> getUserUp(int uid) {
|
||||
UBiliUpExample example=new UBiliUpExample();
|
||||
example.createCriteria().andUidEqualTo(uid);
|
||||
return upDao.selectByExample(example);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UUser getUserToToken(String token) {
|
||||
if(StringUtils.isEmpty(token)){
|
||||
return null;
|
||||
}
|
||||
UUserExample example=new UUserExample();
|
||||
example.createCriteria().andLogintokenEqualTo(token);
|
||||
List<UUser> list=userDao.selectByExample(example);
|
||||
if(list.isEmpty()){
|
||||
return null;
|
||||
}else{
|
||||
return list.get(0);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean checkUser(String uname){
|
||||
UUserExample example=new UUserExample();
|
||||
example.createCriteria().andUserEqualTo(uname);
|
||||
return !userDao.selectByExample(example).isEmpty();
|
||||
}
|
||||
public boolean checkUP(int uid,int roomId){
|
||||
UBiliUpExample example=new UBiliUpExample();
|
||||
example.createCriteria().andUidEqualTo(uid).andRoomidEqualTo(roomId);
|
||||
return !upDao.selectByExample(example).isEmpty();
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,20 @@
|
||||
package com.yutou.bilibili.Test;
|
||||
|
||||
import com.yutou.bilibili.Tools.AESTools;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
@Controller
|
||||
public class TestController {
|
||||
|
||||
@RequestMapping("/test")
|
||||
@ResponseBody
|
||||
public String test() {
|
||||
return "f";
|
||||
}
|
||||
@RequestMapping("/test2")
|
||||
@ResponseBody
|
||||
public String test2() {
|
||||
return AESTools.encrypt("f");
|
||||
}
|
||||
}
|
||||
|
||||
52
src/main/java/com/yutou/bilibili/Tools/AESTools.java
Normal file
52
src/main/java/com/yutou/bilibili/Tools/AESTools.java
Normal file
@@ -0,0 +1,52 @@
|
||||
package com.yutou.bilibili.Tools;
|
||||
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.KeyGenerator;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Base64;
|
||||
|
||||
public class AESTools {
|
||||
private static final String key="fJjSoOM7tDIQN0Ne";
|
||||
private static final String model="AES/ECB/PKCS5Padding";
|
||||
|
||||
/**
|
||||
* 加密
|
||||
* @param value 原文
|
||||
* @return 密文
|
||||
*/
|
||||
public static String encrypt(String value){
|
||||
try {
|
||||
KeyGenerator generator=KeyGenerator.getInstance("AES");
|
||||
generator.init(128);
|
||||
Cipher cipher=Cipher.getInstance(model);
|
||||
cipher.init(Cipher.ENCRYPT_MODE,new SecretKeySpec(key.getBytes(),"AES"));
|
||||
byte[] bytes=cipher.doFinal(value.getBytes(StandardCharsets.UTF_8));
|
||||
return new String(Base64.getEncoder().encode(bytes));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 解密
|
||||
* @param value 密文
|
||||
* @return 原文
|
||||
*/
|
||||
public static String decrypt(String value){
|
||||
try {
|
||||
KeyGenerator generator=KeyGenerator.getInstance("AES");
|
||||
generator.init(128);
|
||||
Cipher cipher=Cipher.getInstance(model);
|
||||
cipher.init(Cipher.DECRYPT_MODE,new SecretKeySpec(key.getBytes(),"AES"));
|
||||
byte[] encodeBytes=Base64.getDecoder().decode(value);
|
||||
byte[] bytes=cipher.doFinal(encodeBytes);
|
||||
return new String(bytes);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
package com.yutou.bilibili.Tools;
|
||||
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.yutou.bilibili.Services.IUserService;
|
||||
import com.yutou.bilibili.mybatis.dao.PermissionDao;
|
||||
import com.yutou.bilibili.mybatis.model.Permission;
|
||||
import com.yutou.bilibili.mybatis.model.PermissionExample;
|
||||
import com.yutou.bilibili.mybatis.model.UUser;
|
||||
import com.yutou.utils.AppTools;
|
||||
import com.yutou.utils.Log;
|
||||
import com.yutou.utils.RedisTools;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.*;
|
||||
import jakarta.servlet.annotation.WebFilter;
|
||||
import jakarta.servlet.http.Cookie;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
@WebFilter
|
||||
public class APIFilter implements Filter {
|
||||
@Resource
|
||||
IUserService service;
|
||||
@Resource
|
||||
PermissionDao permissionDao;
|
||||
|
||||
@Override
|
||||
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
|
||||
HttpServletRequest request = (HttpServletRequest) servletRequest;
|
||||
HttpServletResponse response = (HttpServletResponse) servletResponse;
|
||||
String token = request.getParameter("token");
|
||||
if (StringUtils.isEmpty(token)) {
|
||||
Cookie cookie = AppTools.getCookie(request, "login");
|
||||
if (cookie != null) {
|
||||
token = cookie.getValue();
|
||||
}
|
||||
}
|
||||
String tmp = request.getRequestURI();
|
||||
if (tmp.contains("/user/login.do")
|
||||
|| tmp.contains("/user/reg.do")
|
||||
|| tmp.contains("/user/logout.do")
|
||||
|| tmp.contains("/user/get/test.do")
|
||||
|| tmp.contains("/system/public/reg.do")
|
||||
|| tmp.contains("/favicon.ico")
|
||||
) {
|
||||
filterChain.doFilter(servletRequest, servletResponse);
|
||||
} else {
|
||||
if (StringUtils.isEmpty(token)) {
|
||||
response.sendRedirect("/");
|
||||
return;
|
||||
}
|
||||
UUser user = service.getUserToUid(Integer.parseInt(RedisTools.get(token)));
|
||||
if (user == null) {
|
||||
response.sendRedirect("/");
|
||||
} else {
|
||||
String url = null;
|
||||
try {
|
||||
url = tmp.split(tmp.split("/")[tmp.split("/").length - 1])[0];
|
||||
} catch (Exception e) {
|
||||
Log.e(e);
|
||||
Log.i("无权限请求:" + tmp);
|
||||
return;
|
||||
}
|
||||
JSONArray powers = JSONArray.parseArray(user.getPower());
|
||||
if (powers.toJavaList(Integer.class).contains(-1)) {
|
||||
filterChain.doFilter(servletRequest, servletResponse);
|
||||
} else {
|
||||
PermissionExample pExample = new PermissionExample();
|
||||
pExample.createCriteria().andUrlEqualTo(url);
|
||||
List<Permission> permissions = permissionDao.selectByExample(pExample);
|
||||
if (permissions != null && permissions.size() > 0) {
|
||||
if (powers.toJavaList(Integer.class).contains(permissions.get(0).getId())) {
|
||||
filterChain.doFilter(servletRequest, servletResponse);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.yutou.bilibili.Tools;
|
||||
|
||||
import com.yutou.utils.Log;
|
||||
import com.yutou.common.utils.Log;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.context.event.ContextClosedEvent;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@@ -1,22 +1,13 @@
|
||||
package com.yutou.bilibili.Tools;
|
||||
|
||||
import com.yutou.bilibili.BiliBili.Datas.AppData;
|
||||
import com.yutou.bilibili.BiliBili.Datas.LiveData;
|
||||
import com.yutou.bilibili.Services.ISystemConfigService;
|
||||
import com.yutou.bilibili.mybatis.Bili.mybatis.model.BilibiliLiveInfo;
|
||||
import com.yutou.bilibili.mybatis.Bili.mybatis.model.BilibiliUpInfo;
|
||||
import com.yutou.bilibili.services.SystemService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.ParsePosition;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* 服务启动后执行
|
||||
@@ -24,73 +15,13 @@ import java.util.TimerTask;
|
||||
@Component
|
||||
public class ApplicationInit implements ApplicationRunner {
|
||||
@Resource
|
||||
ISystemConfigService configService;
|
||||
private Timer timer;
|
||||
|
||||
SystemService systemConfigService;
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments args) throws Exception {
|
||||
AppData.FFMPEG = configService.getConfig(Config.SYSTEM_VIDEO_FFMPEG);
|
||||
AppData.LIVE_SAVE_FFMPEG = configService.getConfig(Config.SYSTEM_VIDEO_SAVE_MODEL) != null && configService.getConfig(Config.SYSTEM_VIDEO_SAVE_MODEL).equals("ffmpeg");
|
||||
startTimer();
|
||||
Logger logger = Logger.getLogger("ApplicationInit");
|
||||
logger.log(Level.INFO, "服务启动后执行");
|
||||
systemConfigService.start();
|
||||
}
|
||||
|
||||
private void startTimer() {
|
||||
if (timer == null) {
|
||||
timer = new Timer();
|
||||
timer.schedule(new TimerTask() {
|
||||
String oldTime = "";
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
Date date = new Date();
|
||||
String time = new SimpleDateFormat("HH:mm").format(date);
|
||||
if (time.equals(oldTime)) {
|
||||
return;
|
||||
}
|
||||
checkLive();
|
||||
oldTime = time;
|
||||
switch (time) {
|
||||
case "00:00":
|
||||
|
||||
break;
|
||||
case "01:00":
|
||||
case "02:00":
|
||||
case "03:00":
|
||||
case "04:00":
|
||||
case "05:00":
|
||||
case "06:00":
|
||||
case "07:00":
|
||||
case "08:00":
|
||||
case "09:00":
|
||||
case "10:00":
|
||||
case "11:00":
|
||||
case "12:00":
|
||||
case "13:00":
|
||||
case "14:00":
|
||||
case "15:00":
|
||||
case "16:00":
|
||||
case "17:00":
|
||||
case "18:00":
|
||||
case "19:00":
|
||||
case "20:00":
|
||||
case "21:00":
|
||||
case "22:00":
|
||||
case "23:00":
|
||||
case "23:59":
|
||||
saveData(time);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void checkLive() {
|
||||
|
||||
}
|
||||
}, 0, 2 * 60 * 1000);
|
||||
}
|
||||
}
|
||||
|
||||
public void saveData(String time) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.yutou.bilibili.Tools;
|
||||
|
||||
import com.yutou.bilibili.BiliBili.Datas.DanmuData;
|
||||
import com.yutou.bilibili.datas.DanmuData;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
package com.yutou.bilibili.Tools;
|
||||
|
||||
public class Config {
|
||||
public static final String USER_REG="userReg";
|
||||
public static final String BILI_LIVE_FLAG="biliLive";
|
||||
public static final String SYSTEM_VIDEO_FFMPEG="ffmpeg_path";
|
||||
public static final String SYSTEM_VIDEO_SAVE_MODEL="save_live_model";
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
package com.yutou.bilibili.Tools;
|
||||
|
||||
import com.yutou.bilibili.BiliBili.Datas.DanmuData;
|
||||
import com.yutou.bilibili.sqlite.BiliBiliLiveDatabasesManager;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.attribute.BasicFileAttributes;
|
||||
import java.nio.file.attribute.FileTime;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class DanmuTools {
|
||||
public static File danmuToAss(File live, File danmu, boolean useFileNameData, String... filterDanmu) {
|
||||
BiliBiliLiveDatabasesManager manager = new BiliBiliLiveDatabasesManager();
|
||||
try {
|
||||
FileTime creationTime = Files.readAttributes(Paths.get(live.getAbsolutePath()), BasicFileAttributes.class).creationTime();
|
||||
FileTime lastModifiedTime = Files.readAttributes(Paths.get(live.getAbsolutePath()), BasicFileAttributes.class).lastModifiedTime();
|
||||
Date startTime;
|
||||
if (useFileNameData) {
|
||||
startTime = getLiveDate(live.getName());
|
||||
} else {
|
||||
startTime = new Date(creationTime.toMillis());
|
||||
}
|
||||
manager.init(danmu);
|
||||
List<DanmuData> danmuData = manager.queryDanmu(startTime, new Date(lastModifiedTime.toMillis()));
|
||||
AssTools assTools = new AssTools(live.getName(), startTime);
|
||||
assTools.addFilter(filterDanmu);
|
||||
assTools.setAlpha(128);
|
||||
for (DanmuData danmuDatum : danmuData) {
|
||||
assTools.addDanmu(danmuDatum);
|
||||
}
|
||||
assTools.saveDanmu(live.getAbsolutePath().replace(live.getName().substring(live.getName().lastIndexOf(".")), ".ass"));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
manager.close();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static Date getLiveDate(String fileName) {
|
||||
Pattern pattern = Pattern.compile("(\\[.*\\]).");
|
||||
Matcher matcher = pattern.matcher(fileName);
|
||||
if (matcher.find()) {
|
||||
String str = matcher.group(1);
|
||||
try {
|
||||
return new SimpleDateFormat("[yyyy-MM-dd HHmmss]").parse(str);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
File live = new File("Z:\\download\\演唱会or录播\\2022年2月11日Liyuu_1st演唱会\\[2022-02-11 163454]5265.mp4");
|
||||
File danmu = new File("Z:\\download\\演唱会or录播\\2022年2月11日Liyuu_1st演唱会\\[2022-02-11]5265.db");
|
||||
danmuToAss(live, danmu,true, "老板大气!点点红包抽礼物!");
|
||||
}
|
||||
}
|
||||
@@ -1,155 +0,0 @@
|
||||
package com.yutou.bilibili.Tools;
|
||||
|
||||
import com.yutou.bilibili.mybatis.Bili.mybatis.dao.BilibiliLiveDataDao;
|
||||
import com.yutou.bilibili.mybatis.Bili.mybatis.dao.BilibiliLiveInfoDao;
|
||||
import com.yutou.bilibili.mybatis.Bili.mybatis.model.BilibiliLiveData;
|
||||
import com.yutou.bilibili.mybatis.Bili.mybatis.model.BilibiliLiveInfo;
|
||||
import com.yutou.utils.AppTools;
|
||||
import com.yutou.utils.Log;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import static com.yutou.bilibili.BiliBili.Datas.LiveData.*;
|
||||
|
||||
public class ExcelUtils implements ApplicationContextAware {
|
||||
|
||||
@Resource
|
||||
BilibiliLiveDataDao dataDao;
|
||||
@Resource
|
||||
BilibiliLiveInfoDao infoDao;
|
||||
|
||||
public static File getInstance(int roomId, Date startTime, Date endTime,String fileName) {
|
||||
ExcelUtils utils = new ExcelUtils();
|
||||
long timer=System.currentTimeMillis();
|
||||
Log.i("开始注入bean");
|
||||
utils.dataDao = getBean(BilibiliLiveDataDao.class);
|
||||
utils.infoDao = getBean(BilibiliLiveInfoDao.class);
|
||||
Log.i("注入完毕:"+(System.currentTimeMillis()-timer));
|
||||
return utils.initTable(roomId, startTime, endTime,fileName);
|
||||
}
|
||||
|
||||
public ExcelUtils() {
|
||||
|
||||
}
|
||||
|
||||
private File initTable(int roomId, Date startTime, Date endTime,String fileName) {
|
||||
long timer=System.currentTimeMillis();
|
||||
Log.i("进入统计:"+timer);
|
||||
Workbook workbook = new XSSFWorkbook();
|
||||
Sheet liveData = workbook.createSheet("直播数据");
|
||||
Sheet liveInfo = workbook.createSheet("小时统计");
|
||||
Row dataRow = liveData.createRow(0);
|
||||
Row infoRow = liveInfo.createRow(0);
|
||||
createCell(dataRow.createCell(0), "id");
|
||||
createCell(dataRow.createCell(1), "uid");
|
||||
createCell(dataRow.createCell(2), "roomId");
|
||||
createCell(dataRow.createCell(3), "类型");
|
||||
createCell(dataRow.createCell(4), "内容");
|
||||
createCell(dataRow.createCell(5), "礼物id");
|
||||
createCell(dataRow.createCell(6), "礼物名称");
|
||||
createCell(dataRow.createCell(7), "礼物数量");
|
||||
createCell(dataRow.createCell(8), "金瓜子");
|
||||
createCell(dataRow.createCell(9), "时间");
|
||||
|
||||
createCell(infoRow.createCell(0), "id");
|
||||
createCell(infoRow.createCell(1), "房间号");
|
||||
createCell(infoRow.createCell(2), "人气");
|
||||
createCell(infoRow.createCell(3), "普通用户入场数量");
|
||||
createCell(infoRow.createCell(4), "舰长入场数量");
|
||||
createCell(infoRow.createCell(5), "送礼人数");
|
||||
createCell(infoRow.createCell(6), "记录时间");
|
||||
|
||||
Log.i("表头插入完毕:"+(System.currentTimeMillis()-timer));
|
||||
List<BilibiliLiveData> dataList = dataDao.queryLiveData(roomId, startTime, endTime, new String[]{
|
||||
INTERACT_WORD,
|
||||
ENTRY_EFFECT,
|
||||
DANMU_MSG,
|
||||
SEND_GIFT,
|
||||
COMBO_SEND,
|
||||
SUPER_CHAT_MESSAGE,
|
||||
NOTICE_MSG,
|
||||
GUARD_BUY,
|
||||
UNKNOWN_MESSAGE
|
||||
});
|
||||
List<BilibiliLiveInfo> infoList = infoDao.queryTimeOfRoomid(roomId, startTime, endTime);
|
||||
int index = 1;
|
||||
for (BilibiliLiveData data : dataList) {
|
||||
dataRow = liveData.createRow(index++);
|
||||
createCell(dataRow.createCell(0), data.getId());
|
||||
createCell(dataRow.createCell(1), data.getUid());
|
||||
createCell(dataRow.createCell(2), data.getRoomid());
|
||||
createCell(dataRow.createCell(3), data.getType());
|
||||
createCell(dataRow.createCell(4), data.getMsg());
|
||||
createCell(dataRow.createCell(5), data.getGiftid());
|
||||
createCell(dataRow.createCell(6), data.getGiftname());
|
||||
createCell(dataRow.createCell(7), data.getGiftindex());
|
||||
createCell(dataRow.createCell(8), data.getPrice());
|
||||
createCell(dataRow.createCell(9), AppTools.getToDayTimeToString(data.getSubtime()));
|
||||
}
|
||||
index = 1;
|
||||
for (BilibiliLiveInfo info : infoList) {
|
||||
infoRow = liveInfo.createRow(index++);
|
||||
createCell(infoRow.createCell(0), info.getId());
|
||||
createCell(infoRow.createCell(1), info.getRoomid());
|
||||
createCell(infoRow.createCell(2), info.getPopular());
|
||||
createCell(infoRow.createCell(3), info.getUserindex());
|
||||
createCell(infoRow.createCell(4), info.getVipuserindex());
|
||||
createCell(infoRow.createCell(5), info.getGiftuser());
|
||||
createCell(infoRow.createCell(6), AppTools.getToDayTimeToString(info.getSubtime()));
|
||||
}
|
||||
Log.i("数据填充完毕:"+(System.currentTimeMillis()-timer));
|
||||
try {
|
||||
if(!new File("excel").exists()){
|
||||
new File("excel").mkdirs();
|
||||
}
|
||||
File file = new File("excel"+File.separator+fileName+".tmp");
|
||||
FileOutputStream fileOutputStream = new FileOutputStream(file);
|
||||
workbook.write(fileOutputStream);
|
||||
workbook.close();
|
||||
Log.i("文件写入完毕:"+(System.currentTimeMillis()-timer));
|
||||
file.renameTo(new File("excel"+File.separator+fileName));
|
||||
return file;
|
||||
} catch (Exception e) {
|
||||
Log.e(e);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private void createCell(Cell cell, Object data) {
|
||||
if (data == null)
|
||||
data = 0;
|
||||
if (data instanceof String) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
cell.setCellValue((String) data);
|
||||
} else {
|
||||
cell.setCellType(CellType.NUMERIC);
|
||||
|
||||
cell.setCellValue((int) data);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private static ApplicationContext applicationContext;
|
||||
|
||||
@Override
|
||||
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
|
||||
if (ExcelUtils.applicationContext == null) {
|
||||
ExcelUtils.applicationContext = applicationContext;
|
||||
}
|
||||
}
|
||||
|
||||
public static <T> T getBean(Class<T> clazz) {
|
||||
return applicationContext.getBean(clazz);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.yutou.bilibili.Tools;
|
||||
|
||||
import com.yutou.utils.AppTools;
|
||||
import com.yutou.utils.Log;
|
||||
import com.yutou.common.utils.AppTools;
|
||||
import com.yutou.common.utils.Log;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
|
||||
@@ -1,262 +0,0 @@
|
||||
package com.yutou.bilibili.Tools;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.yutou.bilibili.interfaces.DownloadInterface;
|
||||
import com.yutou.utils.Log;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public class HttpTools {
|
||||
private static final int HttpRequestIndex = 3;
|
||||
|
||||
public static String get(String url) {
|
||||
return https_get(url, null);
|
||||
}
|
||||
|
||||
public static String post(final String url, final byte[] body) {
|
||||
return http_post(url, body, 0, null);
|
||||
}
|
||||
|
||||
public static File syncDownload(final String url, final String saveName) {
|
||||
return new HttpTools().http_syncDownload(url, saveName);
|
||||
}
|
||||
|
||||
public static String https_get(String url, Map<String, String> header) {
|
||||
try {
|
||||
URLConnection connection;
|
||||
connection = new URL(url).openConnection();
|
||||
connection.setConnectTimeout(60*1000);
|
||||
connection.setReadTimeout(60*1000);
|
||||
connection.setRequestProperty("User-Agent", getExtUa());
|
||||
if (header != null) {
|
||||
for (String key : header.keySet()) {
|
||||
connection.addRequestProperty(key, header.get(key));
|
||||
}
|
||||
}
|
||||
connection.connect();
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
|
||||
StringBuilder str = new StringBuilder();
|
||||
String tmp;
|
||||
while ((tmp = reader.readLine()) != null) {
|
||||
str.append(tmp).append("\n");
|
||||
}
|
||||
reader.close();
|
||||
return str.toString();
|
||||
} catch (Exception e) {
|
||||
System.err.println("error url = " + url);
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String http_post(String url, byte[] body, int index, Map<String, String> headers) {
|
||||
String tmp;
|
||||
StringBuilder str = new StringBuilder();
|
||||
try {
|
||||
HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection();
|
||||
connection.setRequestMethod("POST");
|
||||
if (headers != null) {
|
||||
for (String key : headers.keySet()) {
|
||||
connection.addRequestProperty(key, headers.get(key));
|
||||
}
|
||||
}
|
||||
connection.setDoOutput(true);
|
||||
connection.setDoInput(true);
|
||||
connection.addRequestProperty("User-Agent", getExtUa());
|
||||
connection.setConnectTimeout(5 * 1000);
|
||||
connection.setReadTimeout(10 * 1000);
|
||||
//connection.addRequestProperty("Connection", "keep-alive");
|
||||
//connection.addRequestProperty("User-Agent", getExtUa());
|
||||
connection.addRequestProperty("content-type", "application/json");
|
||||
//connection.addRequestProperty("charset", "UTF-8");
|
||||
OutputStream outputStream = connection.getOutputStream();
|
||||
//System.out.println(new String(body));
|
||||
outputStream.write(body);
|
||||
outputStream.flush();
|
||||
outputStream.close();
|
||||
connection.connect();
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
|
||||
while ((tmp = reader.readLine()) != null) {
|
||||
str.append(tmp);
|
||||
}
|
||||
String finalStr = str.toString();
|
||||
|
||||
connection.disconnect();
|
||||
reader.close();
|
||||
return finalStr;
|
||||
} catch (Exception e) {
|
||||
if (index < HttpRequestIndex) {
|
||||
return http_post(url, body, index + 1, headers);
|
||||
} else {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static String getExtUa() {
|
||||
return "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36";
|
||||
}
|
||||
|
||||
private static String getKuKuUA() {
|
||||
return "/KUKU_APP(Android/#/cn.kuku.sdk/ttsdk17228/29401/A-2.9.4.01.KUSDK/868139039134314/fcddf839c8c135fa/F4:60:E2:AB:25:1A/460019406520644/+8618569400341/#/9/Redmi 6 Pro/xiaomi/1736/76fda4d6-cd6b-485f-987b-8d347b007f24/#/KUKU/Native/92972ea9651fbd2e)";
|
||||
}
|
||||
|
||||
public static String toUrlParams(JSONObject json) {
|
||||
StringBuilder string = new StringBuilder();
|
||||
Set<String> keys = json.keySet();
|
||||
for (String key : keys) {
|
||||
try {
|
||||
string.append("&").append(key).append("=").append(URLEncoder.encode(json.getString(key),"utf-8"));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
try {
|
||||
string.append("&").append(URLEncoder.encode(key, "utf-8")).append("=");
|
||||
// string += "&" + key + "=";
|
||||
} catch (Exception e1) {
|
||||
string.append("&").append(key).append("=");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
string = new StringBuilder(string.substring(1, string.length()).replaceAll(" ", ""));
|
||||
return string.toString();
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("pid", "102");
|
||||
json.put("gid", "100584");
|
||||
json.put("gameKey", "0gha58u1c9FjZkeAsEmYIzTvp");
|
||||
json.put("access_token", "659c-S1gV0DwMXdYjPDlSrSLNYOvA8qUoCSvmdFEHvZugKgNX4Z2BCwF18A7W2gRdG7WiWfKsbZgF6YssZHhaozksI9RBn2QQFTXzmAHtbMd4ginEEtwdKmPCM4JbJGg1ollqoNE0PcGENpa4F3e7EdSOa_JFyE6XyUQN1iurJU3F8MZfLlTIcTR9USYoHX15vsAkCht_0mrapZblkeY1_8HFrmK8rlenbZLxccy7PrMz5eZ9uPPDJL5OYiEahyrtLENB8SVmlGofJfQw8wUjN8_XVZSfLMujdwz24");
|
||||
String url = "http://192.168.1.156:9020/Faxing/reg?" +
|
||||
"&tpyeCode=dimai" +
|
||||
"®ParamJson=" + json.toJSONString();
|
||||
/* ExecutorService service= Executors.newCachedThreadPool();
|
||||
for (int i = 0; i < 3000; i++) {
|
||||
service.submit(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
get(url);
|
||||
}
|
||||
});
|
||||
}*/
|
||||
}
|
||||
|
||||
private static String donwloadPath = "tmp" + File.separator;
|
||||
|
||||
public synchronized static void download(final String url, final String saveName, final DownloadInterface downloadInterface) {
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
File jar = null;
|
||||
try {
|
||||
File savePath = new File(donwloadPath);
|
||||
if (!savePath.exists()) {
|
||||
savePath.mkdirs();
|
||||
}
|
||||
Log.i("DOWNLOAD", "下载文件:" + url + " 保存文件:" + saveName);
|
||||
HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection();
|
||||
connection.addRequestProperty("User-Agent", getExtUa());
|
||||
// Log.i(TAG,"获取到网络请求:"+connection.getResponseCode());
|
||||
|
||||
|
||||
InputStream inputStream = connection.getInputStream();
|
||||
jar = new File(donwloadPath + saveName + "_tmp.tmp");
|
||||
jar.createNewFile();
|
||||
Log.i("DOWNLOAD", "临时保存文件:" + jar.getAbsolutePath());
|
||||
OutputStream outputStream = new FileOutputStream(jar);
|
||||
byte[] bytes = new byte[1024];
|
||||
double size = connection.getContentLength();
|
||||
double downSize = 0;
|
||||
int len;
|
||||
while ((len = inputStream.read(bytes)) > 0) {
|
||||
outputStream.write(bytes, 0, len);
|
||||
downSize += len;
|
||||
if (downloadInterface != null) {
|
||||
downloadInterface.onDownloading(downSize, size);
|
||||
}
|
||||
}
|
||||
outputStream.close();
|
||||
inputStream.close();
|
||||
File oldJar = new File(donwloadPath + saveName);
|
||||
if (oldJar.exists()) {
|
||||
oldJar.delete();
|
||||
}
|
||||
jar.renameTo(oldJar);
|
||||
Log.i("DOWNLOAD", "实际保存:" + oldJar.getAbsolutePath() + " " + oldJar.getName());
|
||||
if (downloadInterface != null) {
|
||||
downloadInterface.onDownload(oldJar);
|
||||
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
if (jar != null) {
|
||||
jar.delete();
|
||||
}
|
||||
if (downloadInterface != null) {
|
||||
downloadInterface.onError(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
public synchronized File http_syncDownload(final String url, final String saveName) {
|
||||
if (StringUtils.isEmpty(url)) {
|
||||
return null;
|
||||
}
|
||||
File jar = null;
|
||||
try {
|
||||
File savePath = new File(donwloadPath);
|
||||
if (!savePath.exists()) {
|
||||
savePath.mkdirs();
|
||||
}
|
||||
Log.i("DOWNLOAD", "下载文件:" + url + " 保存文件:" + saveName);
|
||||
HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection();
|
||||
connection.addRequestProperty("User-Agent", getExtUa());
|
||||
// Log.i(TAG,"获取到网络请求:"+connection.getResponseCode());
|
||||
|
||||
|
||||
InputStream inputStream = connection.getInputStream();
|
||||
jar = new File(donwloadPath + saveName + "_tmp.tmp");
|
||||
jar.createNewFile();
|
||||
Log.i("DOWNLOAD", "临时保存文件:" + jar.getAbsolutePath());
|
||||
OutputStream outputStream = new FileOutputStream(jar);
|
||||
byte[] bytes = new byte[1024];
|
||||
double size = connection.getContentLength();
|
||||
double downSize = 0;
|
||||
int len;
|
||||
while ((len = inputStream.read(bytes)) > 0) {
|
||||
outputStream.write(bytes, 0, len);
|
||||
downSize += len;
|
||||
}
|
||||
outputStream.close();
|
||||
inputStream.close();
|
||||
File oldJar = new File(donwloadPath + saveName);
|
||||
if (oldJar.exists()) {
|
||||
oldJar.delete();
|
||||
}
|
||||
connection.disconnect();
|
||||
jar.renameTo(oldJar);
|
||||
Log.i("DOWNLOAD", "实际保存:" + oldJar.getAbsolutePath() + " " + oldJar.getName());
|
||||
return oldJar;
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
if (jar != null) {
|
||||
jar.delete();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
package com.yutou.bilibili.Tools;
|
||||
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.yutou.bilibili.Services.IUserService;
|
||||
import com.yutou.bilibili.mybatis.dao.PermissionDao;
|
||||
import com.yutou.bilibili.mybatis.model.Permission;
|
||||
import com.yutou.bilibili.mybatis.model.PermissionExample;
|
||||
import com.yutou.bilibili.mybatis.model.UUser;
|
||||
import com.yutou.utils.Log;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ServiceTools implements ApplicationContextAware {
|
||||
private static ApplicationContext applicationContext = null;
|
||||
@Resource
|
||||
IUserService userService;
|
||||
@Resource
|
||||
PermissionDao permissionDao;
|
||||
|
||||
public static ServiceTools getInstance() {
|
||||
ServiceTools tools=new ServiceTools();
|
||||
tools.userService=getBean(IUserService.class);
|
||||
tools.permissionDao=getBean(PermissionDao.class);
|
||||
return tools;
|
||||
}
|
||||
|
||||
|
||||
public boolean auth(HttpServletRequest request, String uname, String path) {
|
||||
UUser user = userService.getUser(uname);
|
||||
String tmp = request.getRequestURI();
|
||||
String url = null;
|
||||
try {
|
||||
url = tmp.split(tmp.split("/")[tmp.split("/").length - 1])[0];
|
||||
} catch (Exception e) {
|
||||
Log.e(e);
|
||||
Log.i("无权限请求:" + tmp);
|
||||
return false;
|
||||
}
|
||||
JSONArray powers = JSONArray.parseArray(user.getPower());
|
||||
if (powers.toJavaList(Integer.class).contains(-1)) {
|
||||
return true;
|
||||
} else {
|
||||
PermissionExample pExample = new PermissionExample();
|
||||
pExample.createCriteria().andUrlEqualTo(url);
|
||||
List<Permission> permissions = permissionDao.selectByExample(pExample);
|
||||
if (permissions != null && permissions.size() > 0) {
|
||||
if (powers.toJavaList(Integer.class).contains(permissions.get(0).getId())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
|
||||
if (ServiceTools.applicationContext == null) {
|
||||
ServiceTools.applicationContext = applicationContext;
|
||||
}
|
||||
}
|
||||
|
||||
public static <T> T getBean(Class<T> clazz) {
|
||||
return applicationContext.getBean(clazz);
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.yutou.bilibili.Tools;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
|
||||
import java.io.OutputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
public class TestMain {
|
||||
public static void main(String[] args) {
|
||||
new TestMain();
|
||||
}
|
||||
|
||||
public TestMain() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.yutou.bilibili.Tools;
|
||||
|
||||
import com.yutou.bilibili.interfaces.DownloadInterface;
|
||||
import com.yutou.utils.Log;
|
||||
import com.yutou.common.utils.Log;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import org.springframework.core.io.FileSystemResource;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
@@ -40,13 +40,13 @@ public class Tools {
|
||||
*/
|
||||
public static String getRemoteAddress(HttpServletRequest request) {
|
||||
String ip = request.getHeader("x-forwarded-for");
|
||||
if (ip == null || ip.length() == 0 || ip.equalsIgnoreCase("unknown")) {
|
||||
if (ip == null || ip.isEmpty() || ip.equalsIgnoreCase("unknown")) {
|
||||
ip = request.getHeader("Proxy-Client-IP");
|
||||
}
|
||||
if (ip == null || ip.length() == 0 || ip.equalsIgnoreCase("unknown")) {
|
||||
if (ip == null || ip.isEmpty() || ip.equalsIgnoreCase("unknown")) {
|
||||
ip = request.getHeader("WL-Proxy-Client-IP");
|
||||
}
|
||||
if (ip == null || ip.length() == 0 || ip.equalsIgnoreCase("unknown")) {
|
||||
if (ip == null || ip.isEmpty() || ip.equalsIgnoreCase("unknown")) {
|
||||
ip = request.getRemoteAddr();
|
||||
}
|
||||
return ip;
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.yutou.bilibili.databases;
|
||||
|
||||
import com.yutou.bilibili.datas.SystemConfigDatabaseBean;
|
||||
import com.yutou.common.databases.AbsDatabasesBean;
|
||||
import com.yutou.common.databases.SQLiteManager;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SystemConfigDatabases extends SQLiteManager {
|
||||
@Override
|
||||
public String getFileName() {
|
||||
return "system_config.db";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<AbsDatabasesBean> getDataBean() {
|
||||
return List.of(new SystemConfigDatabaseBean());
|
||||
}
|
||||
|
||||
public SystemConfigDatabases() {
|
||||
super();
|
||||
init();
|
||||
}
|
||||
|
||||
public void setConfig(SystemConfigDatabaseBean bean) {
|
||||
SystemConfigDatabaseBean config = getConfig();
|
||||
if (config == null) {
|
||||
add(bean);
|
||||
} else {
|
||||
bean.setSql_time(config.getSql_time());
|
||||
update(bean);
|
||||
}
|
||||
}
|
||||
|
||||
public SystemConfigDatabaseBean getConfig() {
|
||||
List<SystemConfigDatabaseBean> list = get(getDataBean().get(0).getTableName(), SystemConfigDatabaseBean.class);
|
||||
if (list.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
return list.get(0);
|
||||
}
|
||||
|
||||
public SystemConfigDatabaseBean getDefaultConfig() {
|
||||
return new SystemConfigDatabaseBean();
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.yutou.bilibili.BiliBili.Datas;
|
||||
package com.yutou.bilibili.datas;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
41
src/main/java/com/yutou/bilibili/datas/ResultData.java
Normal file
41
src/main/java/com/yutou/bilibili/datas/ResultData.java
Normal file
@@ -0,0 +1,41 @@
|
||||
package com.yutou.bilibili.datas;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ResultData<T> {
|
||||
private int status;
|
||||
private String message;
|
||||
private T data;
|
||||
private long timestamp ;
|
||||
|
||||
public ResultData (){
|
||||
this.timestamp = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
|
||||
public static <T> ResultData<T> success(T data) {
|
||||
ResultData<T> resultData = new ResultData<>();
|
||||
resultData.setStatus(ReturnCode.RC100.getCode());
|
||||
resultData.setMessage(ReturnCode.RC100.getMessage());
|
||||
resultData.setData(data);
|
||||
return resultData;
|
||||
}
|
||||
|
||||
public static <T> ResultData<T> fail(int code, String message) {
|
||||
ResultData<T> resultData = new ResultData<>();
|
||||
resultData.setStatus(code);
|
||||
resultData.setMessage(message);
|
||||
return resultData;
|
||||
}
|
||||
public static <T> ResultData<T> success(ReturnCode code) {
|
||||
return fail(code);
|
||||
}
|
||||
public static <T> ResultData<T> fail(ReturnCode code) {
|
||||
ResultData<T> resultData = new ResultData<>();
|
||||
resultData.setStatus(code.getCode());
|
||||
resultData.setMessage(code.getMessage());
|
||||
return resultData;
|
||||
}
|
||||
|
||||
}
|
||||
47
src/main/java/com/yutou/bilibili/datas/ReturnCode.java
Normal file
47
src/main/java/com/yutou/bilibili/datas/ReturnCode.java
Normal file
@@ -0,0 +1,47 @@
|
||||
package com.yutou.bilibili.datas;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public enum ReturnCode {
|
||||
/**操作成功**/
|
||||
RC100(100,"操作成功"),
|
||||
/**操作失败**/
|
||||
RC999(999,"操作失败"),
|
||||
/**服务限流**/
|
||||
RC200(200,"服务开启限流保护,请稍后再试!"),
|
||||
/**服务降级**/
|
||||
RC201(201,"服务开启降级保护,请稍后再试!"),
|
||||
/**热点参数限流**/
|
||||
RC202(202,"热点参数限流,请稍后再试!"),
|
||||
/**系统规则不满足**/
|
||||
RC203(203,"系统规则不满足要求,请稍后再试!"),
|
||||
/**授权规则不通过**/
|
||||
RC204(204,"授权规则不通过,请稍后再试!"),
|
||||
/**access_denied**/
|
||||
RC403(403,"无访问权限,请联系管理员授予权限"),
|
||||
/**access_denied**/
|
||||
RC401(401,"匿名用户访问无权限资源时的异常"),
|
||||
/**服务异常**/
|
||||
RC500(500,"系统异常,请稍后重试"),
|
||||
|
||||
INVALID_TOKEN(2001,"访问令牌不合法"),
|
||||
ACCESS_DENIED(2003,"没有权限访问该资源"),
|
||||
CLIENT_AUTHENTICATION_FAILED(1001,"客户端认证失败"),
|
||||
USERNAME_OR_PASSWORD_ERROR(1002,"用户名或密码错误"),
|
||||
UNSUPPORTED_GRANT_TYPE(1003, "不支持的认证模式");
|
||||
|
||||
|
||||
|
||||
/**自定义状态码**/
|
||||
private final int code;
|
||||
/**自定义描述**/
|
||||
private final String message;
|
||||
|
||||
ReturnCode(int code, String message){
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.yutou.bilibili.datas;
|
||||
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.yutou.common.databases.AbsDatabasesBean;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class SystemConfigDatabaseBean extends AbsDatabasesBean {
|
||||
@JSONField(name = "timer_loop")
|
||||
private long timerLoop = 5000;
|
||||
|
||||
|
||||
public SystemConfigDatabaseBean() {
|
||||
super("config", System.currentTimeMillis());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.yutou.bilibili.interfaces;
|
||||
|
||||
public interface NetworkInterface {
|
||||
/**
|
||||
* 请求成功
|
||||
* @param data 请求参数
|
||||
* @param state http状态
|
||||
*/
|
||||
void httpGetData(Object data, int state);
|
||||
|
||||
/**
|
||||
* 请求异常
|
||||
* @param e 异常
|
||||
*/
|
||||
void httpError(Exception e);
|
||||
|
||||
void onCookie(String cookie);
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
package com.yutou.bilibili.mybatis.Bili.mybatis.dao;
|
||||
|
||||
import com.yutou.bilibili.mybatis.Bili.mybatis.model.BilibiliLiveData;
|
||||
import com.yutou.bilibili.mybatis.Bili.mybatis.model.BilibiliLiveDataExample;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@Mapper
|
||||
public interface BilibiliLiveDataDao {
|
||||
long countByExample(BilibiliLiveDataExample example);
|
||||
|
||||
int deleteByExample(BilibiliLiveDataExample example);
|
||||
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(BilibiliLiveData record);
|
||||
|
||||
int insertSelective(BilibiliLiveData record);
|
||||
|
||||
List<BilibiliLiveData> selectByExample(BilibiliLiveDataExample example);
|
||||
|
||||
BilibiliLiveData selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") BilibiliLiveData record, @Param("example") BilibiliLiveDataExample example);
|
||||
|
||||
int updateByExample(@Param("record") BilibiliLiveData record, @Param("example") BilibiliLiveDataExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(BilibiliLiveData record);
|
||||
|
||||
int updateByPrimaryKey(BilibiliLiveData record);
|
||||
|
||||
List<BilibiliLiveData> queryLiveData(@Param("roomid") int roomId, @Param("startTime")Date startTime, @Param("endTime")Date endTime, @Param("type")String[] type);
|
||||
|
||||
List<BilibiliLiveData> queryTimeOfRoomid(@Param("roomid") int roomId,@Param("giftId")int giftId, @Param("startTime")Date startTime, @Param("endTime")Date endTime);
|
||||
|
||||
int queryGiftUserToDistinct(@Param("roomid") int roomId,@Param("giftId")int giftId, @Param("startTime")Date startTime, @Param("endTime")Date endTime, @Param("type")String[] type);
|
||||
|
||||
List<Map<String, BigDecimal>> queryPriceTimeGroup(@Param("roomid") int roomId, @Param("startTime")Date startTime, @Param("endTime")Date endTime);
|
||||
|
||||
List<Map<String, BigDecimal>> queryGiftTimeGroup(@Param("roomid") int roomId, @Param("startTime")Date startTime, @Param("endTime")Date endTime);
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package com.yutou.bilibili.mybatis.Bili.mybatis.dao;
|
||||
|
||||
import com.yutou.bilibili.mybatis.Bili.mybatis.model.BilibiliLiveInfo;
|
||||
import com.yutou.bilibili.mybatis.Bili.mybatis.model.BilibiliLiveInfoExample;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@Mapper
|
||||
public interface BilibiliLiveInfoDao {
|
||||
long countByExample(BilibiliLiveInfoExample example);
|
||||
|
||||
int deleteByExample(BilibiliLiveInfoExample example);
|
||||
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(BilibiliLiveInfo record);
|
||||
|
||||
int insertSelective(BilibiliLiveInfo record);
|
||||
|
||||
List<BilibiliLiveInfo> selectByExample(BilibiliLiveInfoExample example);
|
||||
|
||||
BilibiliLiveInfo selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") BilibiliLiveInfo record, @Param("example") BilibiliLiveInfoExample example);
|
||||
|
||||
int updateByExample(@Param("record") BilibiliLiveInfo record, @Param("example") BilibiliLiveInfoExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(BilibiliLiveInfo record);
|
||||
|
||||
int updateByPrimaryKey(BilibiliLiveInfo record);
|
||||
|
||||
List<BilibiliLiveInfo> queryTimeOfRoomid(@Param("roomid")int roomid, @Param("startTime") Date startTime, @Param("endTime")Date endTime);
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.yutou.bilibili.mybatis.Bili.mybatis.dao;
|
||||
|
||||
import com.yutou.bilibili.mybatis.Bili.mybatis.model.BilibiliUpInfo;
|
||||
import com.yutou.bilibili.mybatis.Bili.mybatis.model.BilibiliUpInfoExample;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@Mapper
|
||||
public interface BilibiliUpInfoDao {
|
||||
long countByExample(BilibiliUpInfoExample example);
|
||||
|
||||
int deleteByExample(BilibiliUpInfoExample example);
|
||||
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(BilibiliUpInfo record);
|
||||
|
||||
int insertSelective(BilibiliUpInfo record);
|
||||
|
||||
List<BilibiliUpInfo> selectByExample(BilibiliUpInfoExample example);
|
||||
|
||||
BilibiliUpInfo selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") BilibiliUpInfo record, @Param("example") BilibiliUpInfoExample example);
|
||||
|
||||
int updateByExample(@Param("record") BilibiliUpInfo record, @Param("example") BilibiliUpInfoExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(BilibiliUpInfo record);
|
||||
|
||||
int updateByPrimaryKey(BilibiliUpInfo record);
|
||||
|
||||
List<BilibiliUpInfo> queryToRoomIds(@Param("roomid")int[] roomid);
|
||||
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package com.yutou.bilibili.mybatis.Bili.mybatis.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* bilibili_live_data
|
||||
* @author
|
||||
*/
|
||||
@Data
|
||||
public class BilibiliLiveData implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private Integer uid;
|
||||
|
||||
private Integer roomid;
|
||||
|
||||
private String type;
|
||||
|
||||
private String msg;
|
||||
|
||||
private Integer giftid;
|
||||
|
||||
private String giftname;
|
||||
|
||||
private Integer giftindex;
|
||||
|
||||
private Integer price;
|
||||
|
||||
private Integer priceofcommission;
|
||||
|
||||
private Date subtime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
@@ -1,892 +0,0 @@
|
||||
package com.yutou.bilibili.mybatis.Bili.mybatis.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class BilibiliLiveDataExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public BilibiliLiveDataExample() {
|
||||
oredCriteria = new ArrayList<>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(Integer value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(Integer value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(Integer value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(Integer value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<Integer> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<Integer> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(Integer value1, Integer value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidIsNull() {
|
||||
addCriterion("`uid` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidIsNotNull() {
|
||||
addCriterion("`uid` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidEqualTo(Integer value) {
|
||||
addCriterion("`uid` =", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidNotEqualTo(Integer value) {
|
||||
addCriterion("`uid` <>", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidGreaterThan(Integer value) {
|
||||
addCriterion("`uid` >", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("`uid` >=", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidLessThan(Integer value) {
|
||||
addCriterion("`uid` <", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("`uid` <=", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidIn(List<Integer> values) {
|
||||
addCriterion("`uid` in", values, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidNotIn(List<Integer> values) {
|
||||
addCriterion("`uid` not in", values, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidBetween(Integer value1, Integer value2) {
|
||||
addCriterion("`uid` between", value1, value2, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("`uid` not between", value1, value2, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidIsNull() {
|
||||
addCriterion("roomid is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidIsNotNull() {
|
||||
addCriterion("roomid is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidEqualTo(Integer value) {
|
||||
addCriterion("roomid =", value, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidNotEqualTo(Integer value) {
|
||||
addCriterion("roomid <>", value, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidGreaterThan(Integer value) {
|
||||
addCriterion("roomid >", value, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("roomid >=", value, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidLessThan(Integer value) {
|
||||
addCriterion("roomid <", value, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("roomid <=", value, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidIn(List<Integer> values) {
|
||||
addCriterion("roomid in", values, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidNotIn(List<Integer> values) {
|
||||
addCriterion("roomid not in", values, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidBetween(Integer value1, Integer value2) {
|
||||
addCriterion("roomid between", value1, value2, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("roomid not between", value1, value2, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeIsNull() {
|
||||
addCriterion("`type` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeIsNotNull() {
|
||||
addCriterion("`type` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeEqualTo(String value) {
|
||||
addCriterion("`type` =", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeNotEqualTo(String value) {
|
||||
addCriterion("`type` <>", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeGreaterThan(String value) {
|
||||
addCriterion("`type` >", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("`type` >=", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeLessThan(String value) {
|
||||
addCriterion("`type` <", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeLessThanOrEqualTo(String value) {
|
||||
addCriterion("`type` <=", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeLike(String value) {
|
||||
addCriterion("`type` like", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeNotLike(String value) {
|
||||
addCriterion("`type` not like", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeIn(List<String> values) {
|
||||
addCriterion("`type` in", values, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeNotIn(List<String> values) {
|
||||
addCriterion("`type` not in", values, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeBetween(String value1, String value2) {
|
||||
addCriterion("`type` between", value1, value2, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeNotBetween(String value1, String value2) {
|
||||
addCriterion("`type` not between", value1, value2, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMsgIsNull() {
|
||||
addCriterion("msg is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMsgIsNotNull() {
|
||||
addCriterion("msg is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMsgEqualTo(String value) {
|
||||
addCriterion("msg =", value, "msg");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMsgNotEqualTo(String value) {
|
||||
addCriterion("msg <>", value, "msg");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMsgGreaterThan(String value) {
|
||||
addCriterion("msg >", value, "msg");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMsgGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("msg >=", value, "msg");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMsgLessThan(String value) {
|
||||
addCriterion("msg <", value, "msg");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMsgLessThanOrEqualTo(String value) {
|
||||
addCriterion("msg <=", value, "msg");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMsgLike(String value) {
|
||||
addCriterion("msg like", value, "msg");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMsgNotLike(String value) {
|
||||
addCriterion("msg not like", value, "msg");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMsgIn(List<String> values) {
|
||||
addCriterion("msg in", values, "msg");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMsgNotIn(List<String> values) {
|
||||
addCriterion("msg not in", values, "msg");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMsgBetween(String value1, String value2) {
|
||||
addCriterion("msg between", value1, value2, "msg");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMsgNotBetween(String value1, String value2) {
|
||||
addCriterion("msg not between", value1, value2, "msg");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftidIsNull() {
|
||||
addCriterion("giftId is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftidIsNotNull() {
|
||||
addCriterion("giftId is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftidEqualTo(Integer value) {
|
||||
addCriterion("giftId =", value, "giftid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftidNotEqualTo(Integer value) {
|
||||
addCriterion("giftId <>", value, "giftid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftidGreaterThan(Integer value) {
|
||||
addCriterion("giftId >", value, "giftid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftidGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("giftId >=", value, "giftid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftidLessThan(Integer value) {
|
||||
addCriterion("giftId <", value, "giftid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftidLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("giftId <=", value, "giftid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftidIn(List<Integer> values) {
|
||||
addCriterion("giftId in", values, "giftid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftidNotIn(List<Integer> values) {
|
||||
addCriterion("giftId not in", values, "giftid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftidBetween(Integer value1, Integer value2) {
|
||||
addCriterion("giftId between", value1, value2, "giftid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftidNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("giftId not between", value1, value2, "giftid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftnameIsNull() {
|
||||
addCriterion("giftName is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftnameIsNotNull() {
|
||||
addCriterion("giftName is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftnameEqualTo(String value) {
|
||||
addCriterion("giftName =", value, "giftname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftnameNotEqualTo(String value) {
|
||||
addCriterion("giftName <>", value, "giftname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftnameGreaterThan(String value) {
|
||||
addCriterion("giftName >", value, "giftname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftnameGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("giftName >=", value, "giftname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftnameLessThan(String value) {
|
||||
addCriterion("giftName <", value, "giftname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftnameLessThanOrEqualTo(String value) {
|
||||
addCriterion("giftName <=", value, "giftname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftnameLike(String value) {
|
||||
addCriterion("giftName like", value, "giftname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftnameNotLike(String value) {
|
||||
addCriterion("giftName not like", value, "giftname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftnameIn(List<String> values) {
|
||||
addCriterion("giftName in", values, "giftname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftnameNotIn(List<String> values) {
|
||||
addCriterion("giftName not in", values, "giftname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftnameBetween(String value1, String value2) {
|
||||
addCriterion("giftName between", value1, value2, "giftname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftnameNotBetween(String value1, String value2) {
|
||||
addCriterion("giftName not between", value1, value2, "giftname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftindexIsNull() {
|
||||
addCriterion("giftIndex is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftindexIsNotNull() {
|
||||
addCriterion("giftIndex is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftindexEqualTo(Integer value) {
|
||||
addCriterion("giftIndex =", value, "giftindex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftindexNotEqualTo(Integer value) {
|
||||
addCriterion("giftIndex <>", value, "giftindex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftindexGreaterThan(Integer value) {
|
||||
addCriterion("giftIndex >", value, "giftindex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftindexGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("giftIndex >=", value, "giftindex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftindexLessThan(Integer value) {
|
||||
addCriterion("giftIndex <", value, "giftindex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftindexLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("giftIndex <=", value, "giftindex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftindexIn(List<Integer> values) {
|
||||
addCriterion("giftIndex in", values, "giftindex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftindexNotIn(List<Integer> values) {
|
||||
addCriterion("giftIndex not in", values, "giftindex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftindexBetween(Integer value1, Integer value2) {
|
||||
addCriterion("giftIndex between", value1, value2, "giftindex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftindexNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("giftIndex not between", value1, value2, "giftindex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceIsNull() {
|
||||
addCriterion("price is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceIsNotNull() {
|
||||
addCriterion("price is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceEqualTo(Integer value) {
|
||||
addCriterion("price =", value, "price");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceNotEqualTo(Integer value) {
|
||||
addCriterion("price <>", value, "price");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceGreaterThan(Integer value) {
|
||||
addCriterion("price >", value, "price");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("price >=", value, "price");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceLessThan(Integer value) {
|
||||
addCriterion("price <", value, "price");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("price <=", value, "price");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceIn(List<Integer> values) {
|
||||
addCriterion("price in", values, "price");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceNotIn(List<Integer> values) {
|
||||
addCriterion("price not in", values, "price");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceBetween(Integer value1, Integer value2) {
|
||||
addCriterion("price between", value1, value2, "price");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("price not between", value1, value2, "price");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceofcommissionIsNull() {
|
||||
addCriterion("priceOfcommission is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceofcommissionIsNotNull() {
|
||||
addCriterion("priceOfcommission is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceofcommissionEqualTo(Integer value) {
|
||||
addCriterion("priceOfcommission =", value, "priceofcommission");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceofcommissionNotEqualTo(Integer value) {
|
||||
addCriterion("priceOfcommission <>", value, "priceofcommission");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceofcommissionGreaterThan(Integer value) {
|
||||
addCriterion("priceOfcommission >", value, "priceofcommission");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceofcommissionGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("priceOfcommission >=", value, "priceofcommission");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceofcommissionLessThan(Integer value) {
|
||||
addCriterion("priceOfcommission <", value, "priceofcommission");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceofcommissionLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("priceOfcommission <=", value, "priceofcommission");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceofcommissionIn(List<Integer> values) {
|
||||
addCriterion("priceOfcommission in", values, "priceofcommission");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceofcommissionNotIn(List<Integer> values) {
|
||||
addCriterion("priceOfcommission not in", values, "priceofcommission");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceofcommissionBetween(Integer value1, Integer value2) {
|
||||
addCriterion("priceOfcommission between", value1, value2, "priceofcommission");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceofcommissionNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("priceOfcommission not between", value1, value2, "priceofcommission");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeIsNull() {
|
||||
addCriterion("subtime is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeIsNotNull() {
|
||||
addCriterion("subtime is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeEqualTo(Date value) {
|
||||
addCriterion("subtime =", value, "subtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeNotEqualTo(Date value) {
|
||||
addCriterion("subtime <>", value, "subtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeGreaterThan(Date value) {
|
||||
addCriterion("subtime >", value, "subtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeGreaterThanOrEqualTo(Date value) {
|
||||
addCriterion("subtime >=", value, "subtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeLessThan(Date value) {
|
||||
addCriterion("subtime <", value, "subtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeLessThanOrEqualTo(Date value) {
|
||||
addCriterion("subtime <=", value, "subtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeIn(List<Date> values) {
|
||||
addCriterion("subtime in", values, "subtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeNotIn(List<Date> values) {
|
||||
addCriterion("subtime not in", values, "subtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeBetween(Date value1, Date value2) {
|
||||
addCriterion("subtime between", value1, value2, "subtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeNotBetween(Date value1, Date value2) {
|
||||
addCriterion("subtime not between", value1, value2, "subtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
package com.yutou.bilibili.mybatis.Bili.mybatis.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* bilibili_live_info
|
||||
* @author
|
||||
*/
|
||||
@Data
|
||||
public class BilibiliLiveInfo implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private Integer roomid;
|
||||
|
||||
private Integer popular;
|
||||
|
||||
private Integer userindex;
|
||||
|
||||
private Integer vipuserindex;
|
||||
|
||||
private Integer giftuser;
|
||||
|
||||
private Date subtime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Integer getRoomid() {
|
||||
if(roomid==null) {
|
||||
roomid=0;
|
||||
}
|
||||
return roomid;
|
||||
}
|
||||
|
||||
public Integer getPopular() {
|
||||
if(popular==null) {
|
||||
popular=0;
|
||||
}
|
||||
return popular;
|
||||
}
|
||||
|
||||
public Integer getUserindex() {
|
||||
if(userindex==null) {
|
||||
userindex=0;
|
||||
}
|
||||
return userindex;
|
||||
}
|
||||
|
||||
public Integer getVipuserindex() {
|
||||
if(vipuserindex==null) {
|
||||
vipuserindex=0;
|
||||
}
|
||||
return vipuserindex;
|
||||
}
|
||||
|
||||
public Integer getGiftuser() {
|
||||
if(giftuser==null) {
|
||||
giftuser=0;
|
||||
}
|
||||
return giftuser;
|
||||
}
|
||||
}
|
||||
@@ -1,622 +0,0 @@
|
||||
package com.yutou.bilibili.mybatis.Bili.mybatis.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class BilibiliLiveInfoExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public BilibiliLiveInfoExample() {
|
||||
oredCriteria = new ArrayList<>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(Integer value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(Integer value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(Integer value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(Integer value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<Integer> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<Integer> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(Integer value1, Integer value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidIsNull() {
|
||||
addCriterion("roomid is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidIsNotNull() {
|
||||
addCriterion("roomid is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidEqualTo(Integer value) {
|
||||
addCriterion("roomid =", value, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidNotEqualTo(Integer value) {
|
||||
addCriterion("roomid <>", value, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidGreaterThan(Integer value) {
|
||||
addCriterion("roomid >", value, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("roomid >=", value, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidLessThan(Integer value) {
|
||||
addCriterion("roomid <", value, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("roomid <=", value, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidIn(List<Integer> values) {
|
||||
addCriterion("roomid in", values, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidNotIn(List<Integer> values) {
|
||||
addCriterion("roomid not in", values, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidBetween(Integer value1, Integer value2) {
|
||||
addCriterion("roomid between", value1, value2, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("roomid not between", value1, value2, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPopularIsNull() {
|
||||
addCriterion("popular is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPopularIsNotNull() {
|
||||
addCriterion("popular is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPopularEqualTo(Integer value) {
|
||||
addCriterion("popular =", value, "popular");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPopularNotEqualTo(Integer value) {
|
||||
addCriterion("popular <>", value, "popular");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPopularGreaterThan(Integer value) {
|
||||
addCriterion("popular >", value, "popular");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPopularGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("popular >=", value, "popular");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPopularLessThan(Integer value) {
|
||||
addCriterion("popular <", value, "popular");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPopularLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("popular <=", value, "popular");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPopularIn(List<Integer> values) {
|
||||
addCriterion("popular in", values, "popular");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPopularNotIn(List<Integer> values) {
|
||||
addCriterion("popular not in", values, "popular");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPopularBetween(Integer value1, Integer value2) {
|
||||
addCriterion("popular between", value1, value2, "popular");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPopularNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("popular not between", value1, value2, "popular");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserindexIsNull() {
|
||||
addCriterion("userIndex is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserindexIsNotNull() {
|
||||
addCriterion("userIndex is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserindexEqualTo(Integer value) {
|
||||
addCriterion("userIndex =", value, "userindex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserindexNotEqualTo(Integer value) {
|
||||
addCriterion("userIndex <>", value, "userindex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserindexGreaterThan(Integer value) {
|
||||
addCriterion("userIndex >", value, "userindex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserindexGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("userIndex >=", value, "userindex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserindexLessThan(Integer value) {
|
||||
addCriterion("userIndex <", value, "userindex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserindexLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("userIndex <=", value, "userindex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserindexIn(List<Integer> values) {
|
||||
addCriterion("userIndex in", values, "userindex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserindexNotIn(List<Integer> values) {
|
||||
addCriterion("userIndex not in", values, "userindex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserindexBetween(Integer value1, Integer value2) {
|
||||
addCriterion("userIndex between", value1, value2, "userindex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserindexNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("userIndex not between", value1, value2, "userindex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andVipuserindexIsNull() {
|
||||
addCriterion("vipUserIndex is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andVipuserindexIsNotNull() {
|
||||
addCriterion("vipUserIndex is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andVipuserindexEqualTo(Integer value) {
|
||||
addCriterion("vipUserIndex =", value, "vipuserindex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andVipuserindexNotEqualTo(Integer value) {
|
||||
addCriterion("vipUserIndex <>", value, "vipuserindex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andVipuserindexGreaterThan(Integer value) {
|
||||
addCriterion("vipUserIndex >", value, "vipuserindex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andVipuserindexGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("vipUserIndex >=", value, "vipuserindex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andVipuserindexLessThan(Integer value) {
|
||||
addCriterion("vipUserIndex <", value, "vipuserindex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andVipuserindexLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("vipUserIndex <=", value, "vipuserindex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andVipuserindexIn(List<Integer> values) {
|
||||
addCriterion("vipUserIndex in", values, "vipuserindex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andVipuserindexNotIn(List<Integer> values) {
|
||||
addCriterion("vipUserIndex not in", values, "vipuserindex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andVipuserindexBetween(Integer value1, Integer value2) {
|
||||
addCriterion("vipUserIndex between", value1, value2, "vipuserindex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andVipuserindexNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("vipUserIndex not between", value1, value2, "vipuserindex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftuserIsNull() {
|
||||
addCriterion("giftUser is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftuserIsNotNull() {
|
||||
addCriterion("giftUser is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftuserEqualTo(Integer value) {
|
||||
addCriterion("giftUser =", value, "giftuser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftuserNotEqualTo(Integer value) {
|
||||
addCriterion("giftUser <>", value, "giftuser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftuserGreaterThan(Integer value) {
|
||||
addCriterion("giftUser >", value, "giftuser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftuserGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("giftUser >=", value, "giftuser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftuserLessThan(Integer value) {
|
||||
addCriterion("giftUser <", value, "giftuser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftuserLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("giftUser <=", value, "giftuser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftuserIn(List<Integer> values) {
|
||||
addCriterion("giftUser in", values, "giftuser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftuserNotIn(List<Integer> values) {
|
||||
addCriterion("giftUser not in", values, "giftuser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftuserBetween(Integer value1, Integer value2) {
|
||||
addCriterion("giftUser between", value1, value2, "giftuser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGiftuserNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("giftUser not between", value1, value2, "giftuser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeIsNull() {
|
||||
addCriterion("subtime is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeIsNotNull() {
|
||||
addCriterion("subtime is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeEqualTo(Date value) {
|
||||
addCriterion("subtime =", value, "subtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeNotEqualTo(Date value) {
|
||||
addCriterion("subtime <>", value, "subtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeGreaterThan(Date value) {
|
||||
addCriterion("subtime >", value, "subtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeGreaterThanOrEqualTo(Date value) {
|
||||
addCriterion("subtime >=", value, "subtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeLessThan(Date value) {
|
||||
addCriterion("subtime <", value, "subtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeLessThanOrEqualTo(Date value) {
|
||||
addCriterion("subtime <=", value, "subtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeIn(List<Date> values) {
|
||||
addCriterion("subtime in", values, "subtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeNotIn(List<Date> values) {
|
||||
addCriterion("subtime not in", values, "subtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeBetween(Date value1, Date value2) {
|
||||
addCriterion("subtime between", value1, value2, "subtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeNotBetween(Date value1, Date value2) {
|
||||
addCriterion("subtime not between", value1, value2, "subtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
package com.yutou.bilibili.mybatis.Bili.mybatis.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* bilibili_up_info
|
||||
* @author
|
||||
*/
|
||||
@Data
|
||||
public class BilibiliUpInfo implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* UP名字
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 直播间
|
||||
*/
|
||||
private String url;
|
||||
|
||||
private Long mid=0L;
|
||||
|
||||
/**
|
||||
* 房间号
|
||||
*/
|
||||
private Integer roomid;
|
||||
|
||||
/**
|
||||
* 是否24小时监视
|
||||
*/
|
||||
private Integer offlinelistening=0;
|
||||
|
||||
private Integer savedanmu=0;
|
||||
|
||||
private Integer enable=0;
|
||||
|
||||
private Integer live=0;
|
||||
|
||||
private Integer savelive=0;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Integer checkLiveStatus(){
|
||||
List<BilibiliUpInfo> list=new ArrayList<>();
|
||||
list.add(this);
|
||||
return live;
|
||||
}
|
||||
|
||||
public Integer getLive() {
|
||||
return live;
|
||||
}
|
||||
}
|
||||
@@ -1,821 +0,0 @@
|
||||
package com.yutou.bilibili.mybatis.Bili.mybatis.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class BilibiliUpInfoExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public BilibiliUpInfoExample() {
|
||||
oredCriteria = new ArrayList<>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(Integer value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(Integer value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(Integer value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(Integer value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<Integer> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<Integer> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(Integer value1, Integer value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIsNull() {
|
||||
addCriterion("`name` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIsNotNull() {
|
||||
addCriterion("`name` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameEqualTo(String value) {
|
||||
addCriterion("`name` =", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotEqualTo(String value) {
|
||||
addCriterion("`name` <>", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameGreaterThan(String value) {
|
||||
addCriterion("`name` >", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("`name` >=", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLessThan(String value) {
|
||||
addCriterion("`name` <", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLessThanOrEqualTo(String value) {
|
||||
addCriterion("`name` <=", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLike(String value) {
|
||||
addCriterion("`name` like", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotLike(String value) {
|
||||
addCriterion("`name` not like", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIn(List<String> values) {
|
||||
addCriterion("`name` in", values, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotIn(List<String> values) {
|
||||
addCriterion("`name` not in", values, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameBetween(String value1, String value2) {
|
||||
addCriterion("`name` between", value1, value2, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotBetween(String value1, String value2) {
|
||||
addCriterion("`name` not between", value1, value2, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlIsNull() {
|
||||
addCriterion("url is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlIsNotNull() {
|
||||
addCriterion("url is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlEqualTo(String value) {
|
||||
addCriterion("url =", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlNotEqualTo(String value) {
|
||||
addCriterion("url <>", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlGreaterThan(String value) {
|
||||
addCriterion("url >", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("url >=", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlLessThan(String value) {
|
||||
addCriterion("url <", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlLessThanOrEqualTo(String value) {
|
||||
addCriterion("url <=", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlLike(String value) {
|
||||
addCriterion("url like", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlNotLike(String value) {
|
||||
addCriterion("url not like", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlIn(List<String> values) {
|
||||
addCriterion("url in", values, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlNotIn(List<String> values) {
|
||||
addCriterion("url not in", values, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlBetween(String value1, String value2) {
|
||||
addCriterion("url between", value1, value2, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlNotBetween(String value1, String value2) {
|
||||
addCriterion("url not between", value1, value2, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMidIsNull() {
|
||||
addCriterion("mid is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMidIsNotNull() {
|
||||
addCriterion("mid is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMidEqualTo(Integer value) {
|
||||
addCriterion("mid =", value, "mid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMidNotEqualTo(Integer value) {
|
||||
addCriterion("mid <>", value, "mid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMidGreaterThan(Integer value) {
|
||||
addCriterion("mid >", value, "mid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMidGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("mid >=", value, "mid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMidLessThan(Integer value) {
|
||||
addCriterion("mid <", value, "mid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMidLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("mid <=", value, "mid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMidIn(List<Integer> values) {
|
||||
addCriterion("mid in", values, "mid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMidNotIn(List<Integer> values) {
|
||||
addCriterion("mid not in", values, "mid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMidBetween(Integer value1, Integer value2) {
|
||||
addCriterion("mid between", value1, value2, "mid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andMidNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("mid not between", value1, value2, "mid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidIsNull() {
|
||||
addCriterion("roomid is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidIsNotNull() {
|
||||
addCriterion("roomid is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidEqualTo(Integer value) {
|
||||
addCriterion("roomid =", value, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidNotEqualTo(Integer value) {
|
||||
addCriterion("roomid <>", value, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidGreaterThan(Integer value) {
|
||||
addCriterion("roomid >", value, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("roomid >=", value, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidLessThan(Integer value) {
|
||||
addCriterion("roomid <", value, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("roomid <=", value, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidIn(List<Integer> values) {
|
||||
addCriterion("roomid in", values, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidNotIn(List<Integer> values) {
|
||||
addCriterion("roomid not in", values, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidBetween(Integer value1, Integer value2) {
|
||||
addCriterion("roomid between", value1, value2, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("roomid not between", value1, value2, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOfflinelisteningIsNull() {
|
||||
addCriterion("offlineListening is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOfflinelisteningIsNotNull() {
|
||||
addCriterion("offlineListening is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOfflinelisteningEqualTo(Integer value) {
|
||||
addCriterion("offlineListening =", value, "offlinelistening");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOfflinelisteningNotEqualTo(Integer value) {
|
||||
addCriterion("offlineListening <>", value, "offlinelistening");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOfflinelisteningGreaterThan(Integer value) {
|
||||
addCriterion("offlineListening >", value, "offlinelistening");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOfflinelisteningGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("offlineListening >=", value, "offlinelistening");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOfflinelisteningLessThan(Integer value) {
|
||||
addCriterion("offlineListening <", value, "offlinelistening");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOfflinelisteningLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("offlineListening <=", value, "offlinelistening");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOfflinelisteningIn(List<Integer> values) {
|
||||
addCriterion("offlineListening in", values, "offlinelistening");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOfflinelisteningNotIn(List<Integer> values) {
|
||||
addCriterion("offlineListening not in", values, "offlinelistening");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOfflinelisteningBetween(Integer value1, Integer value2) {
|
||||
addCriterion("offlineListening between", value1, value2, "offlinelistening");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOfflinelisteningNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("offlineListening not between", value1, value2, "offlinelistening");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSavedanmuIsNull() {
|
||||
addCriterion("saveDanmu is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSavedanmuIsNotNull() {
|
||||
addCriterion("saveDanmu is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSavedanmuEqualTo(Integer value) {
|
||||
addCriterion("saveDanmu =", value, "savedanmu");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSavedanmuNotEqualTo(Integer value) {
|
||||
addCriterion("saveDanmu <>", value, "savedanmu");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSavedanmuGreaterThan(Integer value) {
|
||||
addCriterion("saveDanmu >", value, "savedanmu");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSavedanmuGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("saveDanmu >=", value, "savedanmu");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSavedanmuLessThan(Integer value) {
|
||||
addCriterion("saveDanmu <", value, "savedanmu");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSavedanmuLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("saveDanmu <=", value, "savedanmu");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSavedanmuIn(List<Integer> values) {
|
||||
addCriterion("saveDanmu in", values, "savedanmu");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSavedanmuNotIn(List<Integer> values) {
|
||||
addCriterion("saveDanmu not in", values, "savedanmu");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSavedanmuBetween(Integer value1, Integer value2) {
|
||||
addCriterion("saveDanmu between", value1, value2, "savedanmu");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSavedanmuNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("saveDanmu not between", value1, value2, "savedanmu");
|
||||
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;
|
||||
}
|
||||
|
||||
public Criteria andLiveIsNull() {
|
||||
addCriterion("live is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLiveIsNotNull() {
|
||||
addCriterion("live is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLiveEqualTo(Integer value) {
|
||||
addCriterion("live =", value, "live");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLiveNotEqualTo(Integer value) {
|
||||
addCriterion("live <>", value, "live");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLiveGreaterThan(Integer value) {
|
||||
addCriterion("live >", value, "live");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLiveGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("live >=", value, "live");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLiveLessThan(Integer value) {
|
||||
addCriterion("live <", value, "live");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLiveLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("live <=", value, "live");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLiveIn(List<Integer> values) {
|
||||
addCriterion("live in", values, "live");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLiveNotIn(List<Integer> values) {
|
||||
addCriterion("live not in", values, "live");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLiveBetween(Integer value1, Integer value2) {
|
||||
addCriterion("live between", value1, value2, "live");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLiveNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("live not between", value1, value2, "live");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSaveliveIsNull() {
|
||||
addCriterion("saveLive is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSaveliveIsNotNull() {
|
||||
addCriterion("saveLive is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSaveliveEqualTo(Integer value) {
|
||||
addCriterion("saveLive =", value, "savelive");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSaveliveNotEqualTo(Integer value) {
|
||||
addCriterion("saveLive <>", value, "savelive");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSaveliveGreaterThan(Integer value) {
|
||||
addCriterion("saveLive >", value, "savelive");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSaveliveGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("saveLive >=", value, "savelive");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSaveliveLessThan(Integer value) {
|
||||
addCriterion("saveLive <", value, "savelive");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSaveliveLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("saveLive <=", value, "savelive");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSaveliveIn(List<Integer> values) {
|
||||
addCriterion("saveLive in", values, "savelive");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSaveliveNotIn(List<Integer> values) {
|
||||
addCriterion("saveLive not in", values, "savelive");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSaveliveBetween(Integer value1, Integer value2) {
|
||||
addCriterion("saveLive between", value1, value2, "savelive");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSaveliveNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("saveLive not between", value1, value2, "savelive");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package com.yutou.bilibili.mybatis.dao;
|
||||
|
||||
import com.yutou.bilibili.mybatis.model.Permission;
|
||||
import com.yutou.bilibili.mybatis.model.PermissionExample;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@Mapper
|
||||
public interface PermissionDao {
|
||||
long countByExample(PermissionExample example);
|
||||
|
||||
int deleteByExample(PermissionExample example);
|
||||
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(Permission record);
|
||||
|
||||
int insertSelective(Permission record);
|
||||
|
||||
List<Permission> selectByExample(PermissionExample example);
|
||||
|
||||
Permission selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") Permission record, @Param("example") PermissionExample example);
|
||||
|
||||
int updateByExample(@Param("record") Permission record, @Param("example") PermissionExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(Permission record);
|
||||
|
||||
int updateByPrimaryKey(Permission record);
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package com.yutou.bilibili.mybatis.dao;
|
||||
|
||||
import com.yutou.bilibili.mybatis.model.SConfig;
|
||||
import com.yutou.bilibili.mybatis.model.SConfigExample;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@Mapper
|
||||
public interface SConfigDao {
|
||||
long countByExample(SConfigExample example);
|
||||
|
||||
int deleteByExample(SConfigExample example);
|
||||
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(SConfig record);
|
||||
|
||||
int insertSelective(SConfig record);
|
||||
|
||||
List<SConfig> selectByExample(SConfigExample example);
|
||||
|
||||
SConfig selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") SConfig record, @Param("example") SConfigExample example);
|
||||
|
||||
int updateByExample(@Param("record") SConfig record, @Param("example") SConfigExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(SConfig record);
|
||||
|
||||
int updateByPrimaryKey(SConfig record);
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package com.yutou.bilibili.mybatis.dao;
|
||||
|
||||
import com.yutou.bilibili.mybatis.model.UBiliUp;
|
||||
import com.yutou.bilibili.mybatis.model.UBiliUpExample;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@Mapper
|
||||
public interface UBiliUpDao {
|
||||
long countByExample(UBiliUpExample example);
|
||||
|
||||
int deleteByExample(UBiliUpExample example);
|
||||
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(UBiliUp record);
|
||||
|
||||
int insertSelective(UBiliUp record);
|
||||
|
||||
List<UBiliUp> selectByExample(UBiliUpExample example);
|
||||
|
||||
UBiliUp selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") UBiliUp record, @Param("example") UBiliUpExample example);
|
||||
|
||||
int updateByExample(@Param("record") UBiliUp record, @Param("example") UBiliUpExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(UBiliUp record);
|
||||
|
||||
int updateByPrimaryKey(UBiliUp record);
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package com.yutou.bilibili.mybatis.dao;
|
||||
|
||||
import com.yutou.bilibili.mybatis.model.UUser;
|
||||
import com.yutou.bilibili.mybatis.model.UUserExample;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@Mapper
|
||||
public interface UUserDao {
|
||||
long countByExample(UUserExample example);
|
||||
|
||||
int deleteByExample(UUserExample example);
|
||||
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(UUser record);
|
||||
|
||||
int insertSelective(UUser record);
|
||||
|
||||
List<UUser> selectByExample(UUserExample example);
|
||||
|
||||
UUser selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") UUser record, @Param("example") UUserExample example);
|
||||
|
||||
int updateByExample(@Param("record") UUser record, @Param("example") UUserExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(UUser record);
|
||||
|
||||
int updateByPrimaryKey(UUser record);
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package com.yutou.bilibili.mybatis.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* permission
|
||||
* @author
|
||||
*/
|
||||
@Data
|
||||
public class Permission implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 权限说明
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 允许访问的连接
|
||||
*/
|
||||
private String url;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
@@ -1,401 +0,0 @@
|
||||
package com.yutou.bilibili.mybatis.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class PermissionExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public PermissionExample() {
|
||||
oredCriteria = new ArrayList<>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(Integer value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(Integer value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(Integer value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(Integer value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<Integer> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<Integer> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(Integer value1, Integer value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleIsNull() {
|
||||
addCriterion("title is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleIsNotNull() {
|
||||
addCriterion("title is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleEqualTo(String value) {
|
||||
addCriterion("title =", value, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleNotEqualTo(String value) {
|
||||
addCriterion("title <>", value, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleGreaterThan(String value) {
|
||||
addCriterion("title >", value, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("title >=", value, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleLessThan(String value) {
|
||||
addCriterion("title <", value, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleLessThanOrEqualTo(String value) {
|
||||
addCriterion("title <=", value, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleLike(String value) {
|
||||
addCriterion("title like", value, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleNotLike(String value) {
|
||||
addCriterion("title not like", value, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleIn(List<String> values) {
|
||||
addCriterion("title in", values, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleNotIn(List<String> values) {
|
||||
addCriterion("title not in", values, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleBetween(String value1, String value2) {
|
||||
addCriterion("title between", value1, value2, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTitleNotBetween(String value1, String value2) {
|
||||
addCriterion("title not between", value1, value2, "title");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlIsNull() {
|
||||
addCriterion("url is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlIsNotNull() {
|
||||
addCriterion("url is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlEqualTo(String value) {
|
||||
addCriterion("url =", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlNotEqualTo(String value) {
|
||||
addCriterion("url <>", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlGreaterThan(String value) {
|
||||
addCriterion("url >", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("url >=", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlLessThan(String value) {
|
||||
addCriterion("url <", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlLessThanOrEqualTo(String value) {
|
||||
addCriterion("url <=", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlLike(String value) {
|
||||
addCriterion("url like", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlNotLike(String value) {
|
||||
addCriterion("url not like", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlIn(List<String> values) {
|
||||
addCriterion("url in", values, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlNotIn(List<String> values) {
|
||||
addCriterion("url not in", values, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlBetween(String value1, String value2) {
|
||||
addCriterion("url between", value1, value2, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlNotBetween(String value1, String value2) {
|
||||
addCriterion("url not between", value1, value2, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.yutou.bilibili.mybatis.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* s_config
|
||||
* @author
|
||||
*/
|
||||
@Data
|
||||
public class SConfig implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private String configkey;
|
||||
|
||||
private String configvalue;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
@@ -1,401 +0,0 @@
|
||||
package com.yutou.bilibili.mybatis.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class SConfigExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public SConfigExample() {
|
||||
oredCriteria = new ArrayList<>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(Integer value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(Integer value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(Integer value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(Integer value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<Integer> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<Integer> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(Integer value1, Integer value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andConfigkeyIsNull() {
|
||||
addCriterion("configKey is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andConfigkeyIsNotNull() {
|
||||
addCriterion("configKey is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andConfigkeyEqualTo(String value) {
|
||||
addCriterion("configKey =", value, "configkey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andConfigkeyNotEqualTo(String value) {
|
||||
addCriterion("configKey <>", value, "configkey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andConfigkeyGreaterThan(String value) {
|
||||
addCriterion("configKey >", value, "configkey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andConfigkeyGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("configKey >=", value, "configkey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andConfigkeyLessThan(String value) {
|
||||
addCriterion("configKey <", value, "configkey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andConfigkeyLessThanOrEqualTo(String value) {
|
||||
addCriterion("configKey <=", value, "configkey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andConfigkeyLike(String value) {
|
||||
addCriterion("configKey like", value, "configkey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andConfigkeyNotLike(String value) {
|
||||
addCriterion("configKey not like", value, "configkey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andConfigkeyIn(List<String> values) {
|
||||
addCriterion("configKey in", values, "configkey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andConfigkeyNotIn(List<String> values) {
|
||||
addCriterion("configKey not in", values, "configkey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andConfigkeyBetween(String value1, String value2) {
|
||||
addCriterion("configKey between", value1, value2, "configkey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andConfigkeyNotBetween(String value1, String value2) {
|
||||
addCriterion("configKey not between", value1, value2, "configkey");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andConfigvalueIsNull() {
|
||||
addCriterion("configValue is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andConfigvalueIsNotNull() {
|
||||
addCriterion("configValue is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andConfigvalueEqualTo(String value) {
|
||||
addCriterion("configValue =", value, "configvalue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andConfigvalueNotEqualTo(String value) {
|
||||
addCriterion("configValue <>", value, "configvalue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andConfigvalueGreaterThan(String value) {
|
||||
addCriterion("configValue >", value, "configvalue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andConfigvalueGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("configValue >=", value, "configvalue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andConfigvalueLessThan(String value) {
|
||||
addCriterion("configValue <", value, "configvalue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andConfigvalueLessThanOrEqualTo(String value) {
|
||||
addCriterion("configValue <=", value, "configvalue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andConfigvalueLike(String value) {
|
||||
addCriterion("configValue like", value, "configvalue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andConfigvalueNotLike(String value) {
|
||||
addCriterion("configValue not like", value, "configvalue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andConfigvalueIn(List<String> values) {
|
||||
addCriterion("configValue in", values, "configvalue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andConfigvalueNotIn(List<String> values) {
|
||||
addCriterion("configValue not in", values, "configvalue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andConfigvalueBetween(String value1, String value2) {
|
||||
addCriterion("configValue between", value1, value2, "configvalue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andConfigvalueNotBetween(String value1, String value2) {
|
||||
addCriterion("configValue not between", value1, value2, "configvalue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.yutou.bilibili.mybatis.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* u_bili_up
|
||||
* @author
|
||||
*/
|
||||
@Data
|
||||
public class UBiliUp implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private Integer uid;
|
||||
|
||||
private Integer roomid;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
@@ -1,381 +0,0 @@
|
||||
package com.yutou.bilibili.mybatis.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class UBiliUpExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public UBiliUpExample() {
|
||||
oredCriteria = new ArrayList<>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(Integer value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(Integer value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(Integer value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(Integer value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<Integer> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<Integer> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(Integer value1, Integer value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidIsNull() {
|
||||
addCriterion("`uid` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidIsNotNull() {
|
||||
addCriterion("`uid` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidEqualTo(Integer value) {
|
||||
addCriterion("`uid` =", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidNotEqualTo(Integer value) {
|
||||
addCriterion("`uid` <>", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidGreaterThan(Integer value) {
|
||||
addCriterion("`uid` >", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("`uid` >=", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidLessThan(Integer value) {
|
||||
addCriterion("`uid` <", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("`uid` <=", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidIn(List<Integer> values) {
|
||||
addCriterion("`uid` in", values, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidNotIn(List<Integer> values) {
|
||||
addCriterion("`uid` not in", values, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidBetween(Integer value1, Integer value2) {
|
||||
addCriterion("`uid` between", value1, value2, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("`uid` not between", value1, value2, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidIsNull() {
|
||||
addCriterion("roomid is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidIsNotNull() {
|
||||
addCriterion("roomid is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidEqualTo(Integer value) {
|
||||
addCriterion("roomid =", value, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidNotEqualTo(Integer value) {
|
||||
addCriterion("roomid <>", value, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidGreaterThan(Integer value) {
|
||||
addCriterion("roomid >", value, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("roomid >=", value, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidLessThan(Integer value) {
|
||||
addCriterion("roomid <", value, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("roomid <=", value, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidIn(List<Integer> values) {
|
||||
addCriterion("roomid in", values, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidNotIn(List<Integer> values) {
|
||||
addCriterion("roomid not in", values, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidBetween(Integer value1, Integer value2) {
|
||||
addCriterion("roomid between", value1, value2, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRoomidNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("roomid not between", value1, value2, "roomid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
package com.yutou.bilibili.mybatis.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* u_user
|
||||
* @author
|
||||
*/
|
||||
@Data
|
||||
public class UUser implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 登陆key
|
||||
*/
|
||||
private String user;
|
||||
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 权限功能
|
||||
*/
|
||||
private String power;
|
||||
|
||||
private String biliCookie;
|
||||
|
||||
private String logintoken;
|
||||
|
||||
private Date subtime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
@@ -1,672 +0,0 @@
|
||||
package com.yutou.bilibili.mybatis.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class UUserExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public UUserExample() {
|
||||
oredCriteria = new ArrayList<>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(Integer value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(Integer value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(Integer value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(Integer value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<Integer> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<Integer> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(Integer value1, Integer value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIsNull() {
|
||||
addCriterion("`user` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIsNotNull() {
|
||||
addCriterion("`user` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserEqualTo(String value) {
|
||||
addCriterion("`user` =", value, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserNotEqualTo(String value) {
|
||||
addCriterion("`user` <>", value, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserGreaterThan(String value) {
|
||||
addCriterion("`user` >", value, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("`user` >=", value, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserLessThan(String value) {
|
||||
addCriterion("`user` <", value, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserLessThanOrEqualTo(String value) {
|
||||
addCriterion("`user` <=", value, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserLike(String value) {
|
||||
addCriterion("`user` like", value, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserNotLike(String value) {
|
||||
addCriterion("`user` not like", value, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIn(List<String> values) {
|
||||
addCriterion("`user` in", values, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserNotIn(List<String> values) {
|
||||
addCriterion("`user` not in", values, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserBetween(String value1, String value2) {
|
||||
addCriterion("`user` between", value1, value2, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserNotBetween(String value1, String value2) {
|
||||
addCriterion("`user` not between", value1, value2, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordIsNull() {
|
||||
addCriterion("`password` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordIsNotNull() {
|
||||
addCriterion("`password` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordEqualTo(String value) {
|
||||
addCriterion("`password` =", value, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordNotEqualTo(String value) {
|
||||
addCriterion("`password` <>", value, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordGreaterThan(String value) {
|
||||
addCriterion("`password` >", value, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("`password` >=", value, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordLessThan(String value) {
|
||||
addCriterion("`password` <", value, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordLessThanOrEqualTo(String value) {
|
||||
addCriterion("`password` <=", value, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordLike(String value) {
|
||||
addCriterion("`password` like", value, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordNotLike(String value) {
|
||||
addCriterion("`password` not like", value, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordIn(List<String> values) {
|
||||
addCriterion("`password` in", values, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordNotIn(List<String> values) {
|
||||
addCriterion("`password` not in", values, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordBetween(String value1, String value2) {
|
||||
addCriterion("`password` between", value1, value2, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordNotBetween(String value1, String value2) {
|
||||
addCriterion("`password` not between", value1, value2, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPowerIsNull() {
|
||||
addCriterion("`power` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPowerIsNotNull() {
|
||||
addCriterion("`power` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPowerEqualTo(String value) {
|
||||
addCriterion("`power` =", value, "power");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPowerNotEqualTo(String value) {
|
||||
addCriterion("`power` <>", value, "power");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPowerGreaterThan(String value) {
|
||||
addCriterion("`power` >", value, "power");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPowerGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("`power` >=", value, "power");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPowerLessThan(String value) {
|
||||
addCriterion("`power` <", value, "power");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPowerLessThanOrEqualTo(String value) {
|
||||
addCriterion("`power` <=", value, "power");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPowerLike(String value) {
|
||||
addCriterion("`power` like", value, "power");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPowerNotLike(String value) {
|
||||
addCriterion("`power` not like", value, "power");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPowerIn(List<String> values) {
|
||||
addCriterion("`power` in", values, "power");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPowerNotIn(List<String> values) {
|
||||
addCriterion("`power` not in", values, "power");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPowerBetween(String value1, String value2) {
|
||||
addCriterion("`power` between", value1, value2, "power");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPowerNotBetween(String value1, String value2) {
|
||||
addCriterion("`power` not between", value1, value2, "power");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBiliCookieIsNull() {
|
||||
addCriterion("bili_cookie is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBiliCookieIsNotNull() {
|
||||
addCriterion("bili_cookie is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBiliCookieEqualTo(String value) {
|
||||
addCriterion("bili_cookie =", value, "biliCookie");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBiliCookieNotEqualTo(String value) {
|
||||
addCriterion("bili_cookie <>", value, "biliCookie");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBiliCookieGreaterThan(String value) {
|
||||
addCriterion("bili_cookie >", value, "biliCookie");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBiliCookieGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("bili_cookie >=", value, "biliCookie");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBiliCookieLessThan(String value) {
|
||||
addCriterion("bili_cookie <", value, "biliCookie");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBiliCookieLessThanOrEqualTo(String value) {
|
||||
addCriterion("bili_cookie <=", value, "biliCookie");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBiliCookieLike(String value) {
|
||||
addCriterion("bili_cookie like", value, "biliCookie");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBiliCookieNotLike(String value) {
|
||||
addCriterion("bili_cookie not like", value, "biliCookie");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBiliCookieIn(List<String> values) {
|
||||
addCriterion("bili_cookie in", values, "biliCookie");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBiliCookieNotIn(List<String> values) {
|
||||
addCriterion("bili_cookie not in", values, "biliCookie");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBiliCookieBetween(String value1, String value2) {
|
||||
addCriterion("bili_cookie between", value1, value2, "biliCookie");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBiliCookieNotBetween(String value1, String value2) {
|
||||
addCriterion("bili_cookie not between", value1, value2, "biliCookie");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLogintokenIsNull() {
|
||||
addCriterion("loginToken is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLogintokenIsNotNull() {
|
||||
addCriterion("loginToken is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLogintokenEqualTo(String value) {
|
||||
addCriterion("loginToken =", value, "logintoken");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLogintokenNotEqualTo(String value) {
|
||||
addCriterion("loginToken <>", value, "logintoken");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLogintokenGreaterThan(String value) {
|
||||
addCriterion("loginToken >", value, "logintoken");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLogintokenGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("loginToken >=", value, "logintoken");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLogintokenLessThan(String value) {
|
||||
addCriterion("loginToken <", value, "logintoken");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLogintokenLessThanOrEqualTo(String value) {
|
||||
addCriterion("loginToken <=", value, "logintoken");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLogintokenLike(String value) {
|
||||
addCriterion("loginToken like", value, "logintoken");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLogintokenNotLike(String value) {
|
||||
addCriterion("loginToken not like", value, "logintoken");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLogintokenIn(List<String> values) {
|
||||
addCriterion("loginToken in", values, "logintoken");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLogintokenNotIn(List<String> values) {
|
||||
addCriterion("loginToken not in", values, "logintoken");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLogintokenBetween(String value1, String value2) {
|
||||
addCriterion("loginToken between", value1, value2, "logintoken");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLogintokenNotBetween(String value1, String value2) {
|
||||
addCriterion("loginToken not between", value1, value2, "logintoken");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeIsNull() {
|
||||
addCriterion("subtime is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeIsNotNull() {
|
||||
addCriterion("subtime is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeEqualTo(Date value) {
|
||||
addCriterion("subtime =", value, "subtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeNotEqualTo(Date value) {
|
||||
addCriterion("subtime <>", value, "subtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeGreaterThan(Date value) {
|
||||
addCriterion("subtime >", value, "subtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeGreaterThanOrEqualTo(Date value) {
|
||||
addCriterion("subtime >=", value, "subtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeLessThan(Date value) {
|
||||
addCriterion("subtime <", value, "subtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeLessThanOrEqualTo(Date value) {
|
||||
addCriterion("subtime <=", value, "subtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeIn(List<Date> values) {
|
||||
addCriterion("subtime in", values, "subtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeNotIn(List<Date> values) {
|
||||
addCriterion("subtime not in", values, "subtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeBetween(Date value1, Date value2) {
|
||||
addCriterion("subtime between", value1, value2, "subtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubtimeNotBetween(Date value1, Date value2) {
|
||||
addCriterion("subtime not between", value1, value2, "subtime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.yutou.bilibili.services;
|
||||
|
||||
import com.yutou.biliapi.bean.live.LiveRoomInfo;
|
||||
import com.yutou.biliapi.bean.live.MasterInfoBean;
|
||||
import com.yutou.biliapi.bean.live.database.LiveConfigDatabaseBean;
|
||||
import com.yutou.biliapi.databases.BiliLiveConfigDatabase;
|
||||
import com.yutou.biliapi.net.BiliLiveNetApiManager;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.math.BigInteger;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class LiveConfigService {
|
||||
BiliLiveConfigDatabase database=new BiliLiveConfigDatabase();
|
||||
|
||||
public LiveConfigDatabaseBean addConfig(String url, LiveConfigDatabaseBean bean) {
|
||||
if (!StringUtils.hasText(url)) {
|
||||
return null;
|
||||
}
|
||||
String roomId = url.replace("https://live.bilibili.com/", "").split("\\?")[0];
|
||||
if (!StringUtils.hasText(roomId)) {
|
||||
return null;
|
||||
}
|
||||
bean.setRoomId(new BigInteger(roomId));
|
||||
try {
|
||||
LiveRoomInfo body = BiliLiveNetApiManager.getInstance().getApi(null).getRoomInfo(String.valueOf(bean.getRoomId())).execute().body().getData();
|
||||
MasterInfoBean infoBean = BiliLiveNetApiManager.getInstance().getApi(null).getMasterInfo(String.valueOf(body.getUid())).execute().body().getData();
|
||||
bean.setAnchorUid(body.getUid());
|
||||
bean.setAnchorFace(infoBean.getInfo().getFace());
|
||||
bean.setAnchorName(infoBean.getInfo().getUname());
|
||||
database.setConfig(bean);
|
||||
return bean;
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public LiveConfigDatabaseBean updateConfig(BigInteger roomId, LiveConfigDatabaseBean bean) {
|
||||
LiveConfigDatabaseBean config = database.getConfig(roomId);
|
||||
if (config == null) {
|
||||
return null;
|
||||
}
|
||||
bean.setRoomId(roomId);
|
||||
bean.setSql_time(config.getSql_time());
|
||||
database.setConfig(bean);
|
||||
return bean;
|
||||
}
|
||||
|
||||
public boolean deleteConfig(BigInteger roomId) {
|
||||
LiveConfigDatabaseBean config = database.getConfig(roomId);
|
||||
if (config == null) {
|
||||
return false;
|
||||
|
||||
}
|
||||
return database.deleteConfig(roomId);
|
||||
}
|
||||
|
||||
public List<LiveConfigDatabaseBean> getAllConfig() {
|
||||
return database.getAllConfig();
|
||||
}
|
||||
|
||||
public LiveConfigDatabaseBean getConfig(BigInteger roomId) {
|
||||
return database.getConfig(roomId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.yutou.bilibili.services;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class LiveDanmuService {
|
||||
}
|
||||
88
src/main/java/com/yutou/bilibili/services/SystemService.java
Normal file
88
src/main/java/com/yutou/bilibili/services/SystemService.java
Normal file
@@ -0,0 +1,88 @@
|
||||
package com.yutou.bilibili.services;
|
||||
|
||||
import com.yutou.biliapi.api.LiveApi;
|
||||
import com.yutou.biliapi.bean.live.LiveRoomConfig;
|
||||
import com.yutou.biliapi.bean.live.LiveRoomInfo;
|
||||
import com.yutou.biliapi.bean.live.database.LiveConfigDatabaseBean;
|
||||
import com.yutou.biliapi.databases.BiliLiveConfigDatabase;
|
||||
import com.yutou.biliapi.net.BiliLiveNetApiManager;
|
||||
import com.yutou.biliapi.net.WebSocketManager;
|
||||
import com.yutou.bilibili.databases.SystemConfigDatabases;
|
||||
import com.yutou.bilibili.datas.SystemConfigDatabaseBean;
|
||||
import com.yutou.common.okhttp.HttpBody;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.StringUtils;
|
||||
import retrofit2.Response;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@Service
|
||||
public class SystemService {
|
||||
SystemConfigDatabases databases = new SystemConfigDatabases();
|
||||
private ScheduledExecutorService timer;
|
||||
private ScheduledFuture<?> scheduled;
|
||||
BiliLiveConfigDatabase liveConfigDatabase = new BiliLiveConfigDatabase();
|
||||
|
||||
public long getLoopTimer() {
|
||||
SystemConfigDatabaseBean config = databases.getConfig();
|
||||
if (config == null) {
|
||||
return databases.getDefaultConfig().getTimerLoop();
|
||||
}
|
||||
return config.getTimerLoop();
|
||||
}
|
||||
|
||||
public void start() {
|
||||
if (timer == null) {
|
||||
timer = Executors.newScheduledThreadPool(1);
|
||||
}
|
||||
System.out.println("执行任务");
|
||||
if (scheduled != null) {
|
||||
scheduled.cancel(true);
|
||||
}
|
||||
scheduled = timer.scheduleAtFixedRate(() -> {
|
||||
List<LiveConfigDatabaseBean> list = liveConfigDatabase.getAllConfig();
|
||||
for (LiveConfigDatabaseBean bean : list) {
|
||||
if (bean.isRecordDanmu() && bean.checkRecordDanmuTime()) {
|
||||
recordDanmu(bean);
|
||||
}
|
||||
if (bean.isRecordLive() && bean.checkRecordLiveTime()) {
|
||||
recordVideo(bean);
|
||||
}
|
||||
}
|
||||
}, 0, getLoopTimer(), TimeUnit.MILLISECONDS);
|
||||
}
|
||||
|
||||
// 录制弹幕
|
||||
private void recordDanmu(LiveConfigDatabaseBean bean) {
|
||||
LiveRoomConfig config = new LiveRoomConfig();
|
||||
config.setLoginUid(bean.getRecordUid());
|
||||
config.setRoomId(bean.getRoomId());
|
||||
config.setAnchorName(bean.getAnchorName());
|
||||
config.setLogin(StringUtils.hasText(bean.getRecordUid()));
|
||||
WebSocketManager.getInstance().addRoom(config);
|
||||
}
|
||||
|
||||
// 录制视频
|
||||
private void recordVideo(LiveConfigDatabaseBean bean) {
|
||||
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
SystemService service = new SystemService();
|
||||
System.out.println(new Date());
|
||||
service.start();
|
||||
Thread.sleep(15000);
|
||||
System.out.println(new Date());
|
||||
service.start();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.yutou.bilibili.sqlite;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.yutou.bilibili.BiliBili.Datas.DanmuData;
|
||||
import com.yutou.databases.AbsDatabasesBean;
|
||||
import com.yutou.databases.SQLiteManager;
|
||||
import com.yutou.utils.Log;
|
||||
import com.yutou.bilibili.datas.DanmuData;
|
||||
import com.yutou.common.databases.AbsDatabasesBean;
|
||||
import com.yutou.common.databases.SQLiteManager;
|
||||
import com.yutou.common.utils.Log;
|
||||
|
||||
import java.io.File;
|
||||
import java.sql.ResultSet;
|
||||
|
||||
Reference in New Issue
Block a user