parent
e73354701b
commit
7a28ff4209
@ -1,7 +1,7 @@ |
||||
package org.pqh.core.aop; |
||||
package core.aop; |
||||
|
||||
import core.dao.BaseDao; |
||||
import org.aopalliance.aop.Advice; |
||||
import org.pqh.core.dao.BaseDao; |
||||
import org.springframework.aop.support.StaticMethodMatcherPointcutAdvisor; |
||||
import org.springframework.stereotype.Component; |
||||
|
@ -0,0 +1,42 @@ |
||||
package core.model; |
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException; |
||||
import com.fasterxml.jackson.databind.ObjectMapper; |
||||
import org.apache.logging.log4j.LogManager; |
||||
import org.apache.logging.log4j.Logger; |
||||
|
||||
import java.io.Serializable; |
||||
|
||||
/** |
||||
* Created by reborn on 2017/8/3. |
||||
*/ |
||||
|
||||
public abstract class AbstractModel { |
||||
protected Logger log=LogManager.getLogger(); |
||||
|
||||
public abstract Serializable primaryKey(); |
||||
|
||||
public abstract String tableNote(); |
||||
|
||||
private static ObjectMapper objectMapper=new ObjectMapper(); |
||||
|
||||
public Serializable[] checkeds; |
||||
|
||||
public Serializable[] getCheckeds() { |
||||
return checkeds; |
||||
} |
||||
|
||||
public void setCheckeds(Serializable[] checkeds) { |
||||
this.checkeds = checkeds; |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
try { |
||||
return objectMapper.writeValueAsString(this); |
||||
} catch (JsonProcessingException e) { |
||||
log.info(e); |
||||
return super.toString(); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,58 @@ |
||||
package core.service; |
||||
|
||||
import core.dao.BaseDao; |
||||
import core.model.AbstractModel; |
||||
import core.util.DBAction; |
||||
import org.apache.logging.log4j.LogManager; |
||||
import org.apache.logging.log4j.Logger; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.io.Serializable; |
||||
|
||||
/** |
||||
* Created by reborn on 2017/7/28. |
||||
*/ |
||||
@Service |
||||
public class BaseService { |
||||
|
||||
protected Logger log=LogManager.getLogger(); |
||||
@Resource |
||||
private BaseDao baseDao; |
||||
|
||||
public<T extends AbstractModel> String curd(DBAction action, T command) { |
||||
Class<T> tClass = (Class<T>) command.getClass(); |
||||
try { |
||||
switch (action) { |
||||
case C: |
||||
case U: |
||||
baseDao.saveOrUpdate(command); |
||||
break; |
||||
case R: |
||||
if(command.primaryKey()!=null) { |
||||
T model = baseDao.get(tClass, command.primaryKey()); |
||||
return model == null ? "找不到主键=" + command.primaryKey() + "" : model.toString(); |
||||
}else{ |
||||
throw new RuntimeException(command.getClass()+".primaryKey()方法返回null"); |
||||
} |
||||
case D: |
||||
if(command.getCheckeds()==null) { |
||||
baseDao.delete(tClass, command.primaryKey()); |
||||
}else{ |
||||
for (Serializable checked:command.getCheckeds()){ |
||||
baseDao.delete(tClass,checked); |
||||
} |
||||
} |
||||
break; |
||||
} |
||||
return action.getEn() + " success"; |
||||
} catch (Exception e) { |
||||
log.error((command.tableNote()==null?command.getClass():command.tableNote()) + "进行" + action.getCh() + "操作失败,原因是:" + e.getMessage()); |
||||
} |
||||
return action.getEn() + " fail"; |
||||
} |
||||
|
||||
|
||||
|
||||
|
||||
} |
@ -1,4 +1,4 @@ |
||||
package org.pqh.core.util; |
||||
package core.util; |
||||
|
||||
/** |
||||
* Created by reborn on 2017/8/2. |
@ -1,18 +0,0 @@ |
||||
package org.pqh.core.annotation; |
||||
|
||||
import org.springframework.context.annotation.ComponentScan; |
||||
import org.springframework.context.annotation.EnableAspectJAutoProxy; |
||||
import org.springframework.context.annotation.PropertySource; |
||||
|
||||
import java.lang.annotation.*; |
||||
|
||||
/** |
||||
* 爬虫注入组件 |
||||
*/ |
||||
@Retention(RetentionPolicy.RUNTIME) |
||||
@Target({ElementType.TYPE}) |
||||
@Documented |
||||
@PropertySource("classpath:config.properties") |
||||
@ComponentScan("org.pqh.core") |
||||
public @interface EnableWebCrawlerConfiguration { |
||||
} |
@ -1,13 +0,0 @@ |
||||
package org.pqh.core.model; |
||||
|
||||
import java.io.Serializable; |
||||
|
||||
/** |
||||
* Created by reborn on 2017/8/3. |
||||
*/ |
||||
|
||||
public abstract class AbstractModel { |
||||
public abstract Serializable primaryKey(); |
||||
|
||||
public abstract String tableNote(); |
||||
} |
@ -1,48 +0,0 @@ |
||||
package org.pqh.core.service; |
||||
|
||||
import org.pqh.core.dao.BaseDao; |
||||
import org.pqh.core.model.AbstractModel; |
||||
import org.pqh.core.util.DBAction; |
||||
import org.pqh.core.util.LogManger; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* Created by reborn on 2017/7/28. |
||||
*/ |
||||
@Service |
||||
public class BaseService<T extends AbstractModel> implements LogManger { |
||||
|
||||
@Resource |
||||
private BaseDao baseDao; |
||||
|
||||
public String curd(DBAction action, T command) { |
||||
Class<T> tClass = (Class<T>) command.getClass(); |
||||
try { |
||||
switch (action) { |
||||
case C: |
||||
case U: |
||||
baseDao.saveOrUpdate(command); |
||||
break; |
||||
case R: |
||||
T model = baseDao.load(tClass, command.primaryKey()); |
||||
return model == null ? "找不到主键=" + command.primaryKey() + "" : model.toString(); |
||||
case D: |
||||
baseDao.delete(tClass, command.primaryKey()); |
||||
break; |
||||
} |
||||
return action.getEn() + " success"; |
||||
} catch (Exception e) { |
||||
log.error(command.tableNote() + "进行" + action.getCh() + "操作失败,原因是:" + e.getMessage()); |
||||
} |
||||
return action.getEn() + " fail"; |
||||
} |
||||
|
||||
public List<T> loadAll(Class <T> tClass){ |
||||
return baseDao.loadAll(tClass); |
||||
} |
||||
|
||||
|
||||
} |
@ -1,11 +0,0 @@ |
||||
package org.pqh.core.util; |
||||
|
||||
import org.apache.logging.log4j.LogManager; |
||||
import org.apache.logging.log4j.Logger; |
||||
|
||||
/** |
||||
* Created by reborn on 2017/9/19. |
||||
*/ |
||||
public interface LogManger { |
||||
Logger log=LogManager.getLogger(); |
||||
} |
@ -1,32 +0,0 @@ |
||||
package org.pqh.config; |
||||
|
||||
import org.pqh.core.annotation.EnableWebCrawlerConfiguration; |
||||
import org.springframework.context.annotation.*; |
||||
import org.springframework.web.servlet.config.annotation.EnableWebMvc; |
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; |
||||
import org.springframework.web.servlet.config.annotation.ViewResolverRegistry; |
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; |
||||
|
||||
/** |
||||
* Created by reborn on 2017/7/28. |
||||
*/ |
||||
@EnableWebMvc |
||||
@ComponentScan({"${spring.scan:org.pqh.controller}"}) |
||||
@EnableAspectJAutoProxy(proxyTargetClass = true) |
||||
@EnableWebCrawlerConfiguration |
||||
public class SpringConfig implements WebMvcConfigurer { |
||||
|
||||
@Override |
||||
public void configureViewResolvers(ViewResolverRegistry registry) { |
||||
registry.jsp("/WEB-INF/jsp/",".jsp"); |
||||
} |
||||
|
||||
@Override |
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) { |
||||
String paths[]=new String[]{"dist","js","less","pages","vendor"}; |
||||
// for(String path:paths){
|
||||
// registry.addResourceHandler("/"+path+"/**").addResourceLocations("/"+path+"/");
|
||||
// }
|
||||
|
||||
} |
||||
} |
@ -1,29 +0,0 @@ |
||||
package org.pqh.controller; |
||||
|
||||
import org.pqh.core.model.AbstractModel; |
||||
import org.pqh.core.service.BaseService; |
||||
import org.pqh.core.util.DBAction; |
||||
import org.pqh.core.util.LogManger; |
||||
import org.springframework.web.bind.annotation.PathVariable; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.ResponseBody; |
||||
|
||||
import javax.annotation.Resource; |
||||
|
||||
/** |
||||
* Created by reborn on 2017/9/14. |
||||
*/ |
||||
public class BaseController<T extends AbstractModel> implements LogManger{ |
||||
|
||||
@Resource |
||||
protected BaseService<T> baseService; |
||||
|
||||
@ResponseBody |
||||
@RequestMapping(value = "{action}", produces = "text/html;charset=UTF-8") |
||||
public String curd(@PathVariable DBAction action, T model) { |
||||
log.info(model.tableNote() + "进行" + action.getCh() + "操作请求"); |
||||
return baseService.curd(action, model); |
||||
} |
||||
|
||||
|
||||
} |
@ -0,0 +1,36 @@ |
||||
package web.config; |
||||
|
||||
import core.config.HibernateConfig; |
||||
import org.springframework.context.annotation.ComponentScan; |
||||
import org.springframework.context.annotation.EnableAspectJAutoProxy; |
||||
import org.springframework.context.annotation.PropertySource; |
||||
import org.springframework.orm.hibernate5.support.OpenSessionInViewInterceptor; |
||||
import org.springframework.web.servlet.config.annotation.EnableWebMvc; |
||||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry; |
||||
import org.springframework.web.servlet.config.annotation.ViewResolverRegistry; |
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; |
||||
|
||||
/** |
||||
* Created by reborn on 2017/7/28. |
||||
*/ |
||||
@EnableWebMvc |
||||
@PropertySource("classpath:config.properties") |
||||
@ComponentScan({"${spring.scan}"}) |
||||
@EnableAspectJAutoProxy(proxyTargetClass = true) |
||||
|
||||
public class SpringConfig implements WebMvcConfigurer { |
||||
|
||||
|
||||
@Override |
||||
public void configureViewResolvers(ViewResolverRegistry registry) { |
||||
registry.jsp("/WEB-INF/jsp/",".jsp"); |
||||
} |
||||
|
||||
|
||||
@Override |
||||
public void addInterceptors(InterceptorRegistry registry) { |
||||
OpenSessionInViewInterceptor interceptor=new OpenSessionInViewInterceptor(); |
||||
interceptor.setSessionFactory(HibernateConfig.sessionFactoryBean.getObject()); |
||||
registry.addWebRequestInterceptor(interceptor); |
||||
} |
||||
} |
@ -0,0 +1,31 @@ |
||||
package web.controller; |
||||
|
||||
import core.model.AbstractModel; |
||||
import core.service.BaseService; |
||||
import core.util.DBAction; |
||||
import org.apache.logging.log4j.LogManager; |
||||
import org.apache.logging.log4j.Logger; |
||||
import org.springframework.web.bind.annotation.PathVariable; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.ResponseBody; |
||||
|
||||
import javax.annotation.Resource; |
||||
|
||||
/** |
||||
* Created by reborn on 2017/9/14. |
||||
*/ |
||||
public class BaseController<T extends AbstractModel>{ |
||||
protected Logger log=LogManager.getLogger(); |
||||
|
||||
@Resource |
||||
protected BaseService baseService; |
||||
|
||||
@ResponseBody |
||||
@RequestMapping(value = "{action}", produces = "application/json;charset=UTF-8") |
||||
public String curd(@PathVariable DBAction action, T model) { |
||||
log.info((model.tableNote()==null?model.getClass():model.tableNote()) + "进行" + action.getCh() + "操作请求"); |
||||
return baseService.curd(action, model); |
||||
} |
||||
|
||||
|
||||
} |
@ -0,0 +1,17 @@ |
||||
package web.controller; |
||||
|
||||
import org.springframework.stereotype.Controller; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import web.model.DataEntity; |
||||
|
||||
@Controller |
||||
@RequestMapping("/comment") |
||||
public class CommentController extends BaseController<DataEntity>{ |
||||
|
||||
|
||||
@RequestMapping(value = "find",produces = "application/json;charset=UTF-8") |
||||
public String get(DataEntity dataEntity){ |
||||
|
||||
return ""; |
||||
} |
||||
} |
@ -0,0 +1,286 @@ |
||||
package web.model; |
||||
|
||||
import core.model.AbstractModel; |
||||
|
||||
import javax.persistence.*; |
||||
import java.io.Serializable; |
||||
import java.util.Objects; |
||||
|
||||
@Entity |
||||
@Table(name = "cid", schema = "bilibili", catalog = "") |
||||
public class CidEntity extends AbstractModel { |
||||
private int cid; |
||||
private Integer maxlimit; |
||||
private Integer chatid; |
||||
private String server; |
||||
private String vtype; |
||||
private String oriurl; |
||||
private Integer aid; |
||||
private Integer typeid; |
||||
private Integer pid; |
||||
private Integer click; |
||||
private Integer favourites; |
||||
private Integer credits; |
||||
private Integer coins; |
||||
private Integer fwClick; |
||||
private String duration; |
||||
private String arctype; |
||||
private Integer danmu; |
||||
private Integer bottom; |
||||
private Integer sinapi; |
||||
private String acceptguest; |
||||
private String acceptaccel; |
||||
|
||||
@Id |
||||
@Column(name = "cid") |
||||
public int getCid() { |
||||
return cid; |
||||
} |
||||
|
||||
public void setCid(int cid) { |
||||
this.cid = cid; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "maxlimit") |
||||
public Integer getMaxlimit() { |
||||
return maxlimit; |
||||
} |
||||
|
||||
public void setMaxlimit(Integer maxlimit) { |
||||
this.maxlimit = maxlimit; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "chatid") |
||||
public Integer getChatid() { |
||||
return chatid; |
||||
} |
||||
|
||||
public void setChatid(Integer chatid) { |
||||
this.chatid = chatid; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "server") |
||||
public String getServer() { |
||||
return server; |
||||
} |
||||
|
||||
public void setServer(String server) { |
||||
this.server = server; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "vtype") |
||||
public String getVtype() { |
||||
return vtype; |
||||
} |
||||
|
||||
public void setVtype(String vtype) { |
||||
this.vtype = vtype; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "oriurl") |
||||
public String getOriurl() { |
||||
return oriurl; |
||||
} |
||||
|
||||
public void setOriurl(String oriurl) { |
||||
this.oriurl = oriurl; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "aid") |
||||
public Integer getAid() { |
||||
return aid; |
||||
} |
||||
|
||||
public void setAid(Integer aid) { |
||||
this.aid = aid; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "typeid") |
||||
public Integer getTypeid() { |
||||
return typeid; |
||||
} |
||||
|
||||
public void setTypeid(Integer typeid) { |
||||
this.typeid = typeid; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "pid") |
||||
public Integer getPid() { |
||||
return pid; |
||||
} |
||||
|
||||
public void setPid(Integer pid) { |
||||
this.pid = pid; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "click") |
||||
public Integer getClick() { |
||||
return click; |
||||
} |
||||
|
||||
public void setClick(Integer click) { |
||||
this.click = click; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "favourites") |
||||
public Integer getFavourites() { |
||||
return favourites; |
||||
} |
||||
|
||||
public void setFavourites(Integer favourites) { |
||||
this.favourites = favourites; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "credits") |
||||
public Integer getCredits() { |
||||
return credits; |
||||
} |
||||
|
||||
public void setCredits(Integer credits) { |
||||
this.credits = credits; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "coins") |
||||
public Integer getCoins() { |
||||
return coins; |
||||
} |
||||
|
||||
public void setCoins(Integer coins) { |
||||
this.coins = coins; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "fw_click") |
||||
public Integer getFwClick() { |
||||
return fwClick; |
||||
} |
||||
|
||||
public void setFwClick(Integer fwClick) { |
||||
this.fwClick = fwClick; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "duration") |
||||
public String getDuration() { |
||||
return duration; |
||||
} |
||||
|
||||
public void setDuration(String duration) { |
||||
this.duration = duration; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "arctype") |
||||
public String getArctype() { |
||||
return arctype; |
||||
} |
||||
|
||||
public void setArctype(String arctype) { |
||||
this.arctype = arctype; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "danmu") |
||||
public Integer getDanmu() { |
||||
return danmu; |
||||
} |
||||
|
||||
public void setDanmu(Integer danmu) { |
||||
this.danmu = danmu; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "bottom") |
||||
public Integer getBottom() { |
||||
return bottom; |
||||
} |
||||
|
||||
public void setBottom(Integer bottom) { |
||||
this.bottom = bottom; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "sinapi") |
||||
public Integer getSinapi() { |
||||
return sinapi; |
||||
} |
||||
|
||||
public void setSinapi(Integer sinapi) { |
||||
this.sinapi = sinapi; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "acceptguest") |
||||
public String getAcceptguest() { |
||||
return acceptguest; |
||||
} |
||||
|
||||
public void setAcceptguest(String acceptguest) { |
||||
this.acceptguest = acceptguest; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "acceptaccel") |
||||
public String getAcceptaccel() { |
||||
return acceptaccel; |
||||
} |
||||
|
||||
public void setAcceptaccel(String acceptaccel) { |
||||
this.acceptaccel = acceptaccel; |
||||
} |
||||
|
||||
@Override |
||||
public boolean equals(Object o) { |
||||
if (this == o) return true; |
||||
if (o == null || getClass() != o.getClass()) return false; |
||||
CidEntity cidEntity = (CidEntity) o; |
||||
return cid == cidEntity.cid && |
||||
Objects.equals(maxlimit, cidEntity.maxlimit) && |
||||
Objects.equals(chatid, cidEntity.chatid) && |
||||
Objects.equals(server, cidEntity.server) && |
||||
Objects.equals(vtype, cidEntity.vtype) && |
||||
Objects.equals(oriurl, cidEntity.oriurl) && |
||||
Objects.equals(aid, cidEntity.aid) && |
||||
Objects.equals(typeid, cidEntity.typeid) && |
||||
Objects.equals(pid, cidEntity.pid) && |
||||
Objects.equals(click, cidEntity.click) && |
||||
Objects.equals(favourites, cidEntity.favourites) && |
||||
Objects.equals(credits, cidEntity.credits) && |
||||
Objects.equals(coins, cidEntity.coins) && |
||||
Objects.equals(fwClick, cidEntity.fwClick) && |
||||
Objects.equals(duration, cidEntity.duration) && |
||||
Objects.equals(arctype, cidEntity.arctype) && |
||||
Objects.equals(danmu, cidEntity.danmu) && |
||||
Objects.equals(bottom, cidEntity.bottom) && |
||||
Objects.equals(sinapi, cidEntity.sinapi) && |
||||
Objects.equals(acceptguest, cidEntity.acceptguest) && |
||||
Objects.equals(acceptaccel, cidEntity.acceptaccel); |
||||
} |
||||
|
||||
@Override |
||||
public int hashCode() { |
||||
return Objects.hash(cid, maxlimit, chatid, server, vtype, oriurl, aid, typeid, pid, click, favourites, credits, coins, fwClick, duration, arctype, danmu, bottom, sinapi, acceptguest, acceptaccel); |
||||
} |
||||
|
||||
@Override |
||||
public Serializable primaryKey() { |
||||
return getCid(); |
||||
} |
||||
|
||||
@Override |
||||
public String tableNote() { |
||||
return null; |
||||
} |
||||
} |
@ -0,0 +1,382 @@ |
||||
package web.model; |
||||
|
||||
import core.model.AbstractModel; |
||||
|
||||
import javax.persistence.*; |
||||
import java.io.Serializable; |
||||
import java.util.Objects; |
||||
|
||||
@Entity |
||||
@Table(name = "data", schema = "bilibili", catalog = "") |
||||
public class DataEntity extends AbstractModel { |
||||
private int cid; |
||||
private Integer aid; |
||||
private Byte dpDoneMp4; |
||||
private String letvVu; |
||||
private Byte dpDoneFlv; |
||||
private Integer uploadMeta; |
||||
private String type; |
||||
private Integer vp; |
||||
private Integer upload; |
||||
private String author; |
||||
private String cover; |
||||
private String title; |
||||
private Integer page; |
||||
private Integer dispatch; |
||||
private String vid; |
||||
private String backupVid; |
||||
private Integer files; |
||||
private Integer dispatchServers; |
||||
private String cache; |
||||
private Integer storageServer; |
||||
private Byte dpDone; |
||||
private Double duration; |
||||
private Integer mid; |
||||
private Byte dpDoneHdmp4; |
||||
private Integer letvVid; |
||||
private Integer storage; |
||||
private String letvAddr; |
||||
private String subtitle; |
||||
|
||||
private CidEntity cidEntity; |
||||
@Id |
||||
@Column(name = "cid") |
||||
public int getCid() { |
||||
return cid; |
||||
} |
||||
|
||||
public void setCid(int cid) { |
||||
this.cid = cid; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "aid") |
||||
public Integer getAid() { |
||||
return aid; |
||||
} |
||||
|
||||
public void setAid(Integer aid) { |
||||
this.aid = aid; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "dp_done_mp4") |
||||
public Byte getDpDoneMp4() { |
||||
return dpDoneMp4; |
||||
} |
||||
|
||||
public void setDpDoneMp4(Byte dpDoneMp4) { |
||||
this.dpDoneMp4 = dpDoneMp4; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "letv_vu") |
||||
public String getLetvVu() { |
||||
return letvVu; |
||||
} |
||||
|
||||
public void setLetvVu(String letvVu) { |
||||
this.letvVu = letvVu; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "dp_done_flv") |
||||
public Byte getDpDoneFlv() { |
||||
return dpDoneFlv; |
||||
} |
||||
|
||||
public void setDpDoneFlv(Byte dpDoneFlv) { |
||||
this.dpDoneFlv = dpDoneFlv; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "upload_meta") |
||||
public Integer getUploadMeta() { |
||||
return uploadMeta; |
||||
} |
||||
|
||||
public void setUploadMeta(Integer uploadMeta) { |
||||
this.uploadMeta = uploadMeta; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "type") |
||||
public String getType() { |
||||
return type; |
||||
} |
||||
|
||||
public void setType(String type) { |
||||
this.type = type; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "vp") |
||||
public Integer getVp() { |
||||
return vp; |
||||
} |
||||
|
||||
public void setVp(Integer vp) { |
||||
this.vp = vp; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "upload") |
||||
public Integer getUpload() { |
||||
return upload; |
||||
} |
||||
|
||||
public void setUpload(Integer upload) { |
||||
this.upload = upload; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "author") |
||||
public String getAuthor() { |
||||
return author; |
||||
} |
||||
|
||||
public void setAuthor(String author) { |
||||
this.author = author; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "cover") |
||||
public String getCover() { |
||||
return cover; |
||||
} |
||||
|
||||
public void setCover(String cover) { |
||||
this.cover = cover; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "title") |
||||
public String getTitle() { |
||||
return title; |
||||
} |
||||
|
||||
public void setTitle(String title) { |
||||
this.title = title; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "page") |
||||
public Integer getPage() { |
||||
return page; |
||||
} |
||||
|
||||
public void setPage(Integer page) { |
||||
this.page = page; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "dispatch") |
||||
public Integer getDispatch() { |
||||
return dispatch; |
||||
} |
||||
|
||||
public void setDispatch(Integer dispatch) { |
||||
this.dispatch = dispatch; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "vid") |
||||
public String getVid() { |
||||
return vid; |
||||
} |
||||
|
||||
public void setVid(String vid) { |
||||
this.vid = vid; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "backup_vid") |
||||
public String getBackupVid() { |
||||
return backupVid; |
||||
} |
||||
|
||||
public void setBackupVid(String backupVid) { |
||||
this.backupVid = backupVid; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "files") |
||||
public Integer getFiles() { |
||||
return files; |
||||
} |
||||
|
||||
public void setFiles(Integer files) { |
||||
this.files = files; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "dispatch_servers") |
||||
public Integer getDispatchServers() { |
||||
return dispatchServers; |
||||
} |
||||
|
||||
public void setDispatchServers(Integer dispatchServers) { |
||||
this.dispatchServers = dispatchServers; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "cache") |
||||
public String getCache() { |
||||
return cache; |
||||
} |
||||
|
||||
public void setCache(String cache) { |
||||
this.cache = cache; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "storage_server") |
||||
public Integer getStorageServer() { |
||||
return storageServer; |
||||
} |
||||
|
||||
public void setStorageServer(Integer storageServer) { |
||||
this.storageServer = storageServer; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "dp_done") |
||||
public Byte getDpDone() { |
||||
return dpDone; |
||||
} |
||||
|
||||
public void setDpDone(Byte dpDone) { |
||||
this.dpDone = dpDone; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "duration") |
||||
public Double getDuration() { |
||||
return duration; |
||||
} |
||||
|
||||
public void setDuration(Double duration) { |
||||
this.duration = duration; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "mid") |
||||
public Integer getMid() { |
||||
return mid; |
||||
} |
||||
|
||||
public void setMid(Integer mid) { |
||||
this.mid = mid; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "dp_done_hdmp4") |
||||
public Byte getDpDoneHdmp4() { |
||||
return dpDoneHdmp4; |
||||
} |
||||
|
||||
public void setDpDoneHdmp4(Byte dpDoneHdmp4) { |
||||
this.dpDoneHdmp4 = dpDoneHdmp4; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "letv_vid") |
||||
public Integer getLetvVid() { |
||||
return letvVid; |
||||
} |
||||
|
||||
public void setLetvVid(Integer letvVid) { |
||||
this.letvVid = letvVid; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "storage") |
||||
public Integer getStorage() { |
||||
return storage; |
||||
} |
||||
|
||||
public void setStorage(Integer storage) { |
||||
this.storage = storage; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "letv_addr") |
||||
public String getLetvAddr() { |
||||
return letvAddr; |
||||
} |
||||
|
||||
public void setLetvAddr(String letvAddr) { |
||||
this.letvAddr = letvAddr; |
||||
} |
||||
|
||||
@Basic |
||||
@Column(name = "subtitle") |
||||
public String getSubtitle() { |
||||
return subtitle; |
||||
} |
||||
|
||||
public void setSubtitle(String subtitle) { |
||||
this.subtitle = subtitle; |
||||
} |
||||
|
||||
@OneToOne |
||||
@JoinColumn(name = "cid") |
||||
public CidEntity getCidEntity() { |
||||
return cidEntity; |
||||
} |
||||
|
||||
public void setCidEntity(CidEntity cidEntity) { |
||||
this.cidEntity = cidEntity; |
||||
} |
||||
|
||||
@Override |
||||
public boolean equals(Object o) { |
||||
if (this == o) return true; |
||||
if (o == null || getClass() != o.getClass()) return false; |
||||
DataEntity that = (DataEntity) o; |
||||
return cid == that.cid && |
||||
Objects.equals(aid, that.aid) && |
||||
Objects.equals(dpDoneMp4, that.dpDoneMp4) && |
||||
Objects.equals(letvVu, that.letvVu) && |
||||
Objects.equals(dpDoneFlv, that.dpDoneFlv) && |
||||
Objects.equals(uploadMeta, that.uploadMeta) && |
||||
Objects.equals(type, that.type) && |
||||
Objects.equals(vp, that.vp) && |
||||
Objects.equals(upload, that.upload) && |
||||
Objects.equals(author, that.author) && |
||||
Objects.equals(cover, that.cover) && |
||||
Objects.equals(title, that.title) && |
||||
Objects.equals(page, that.page) && |
||||
Objects.equals(dispatch, that.dispatch) && |
||||
Objects.equals(vid, that.vid) && |
||||
Objects.equals(backupVid, that.backupVid) && |
||||
Objects.equals(files, that.files) && |
||||
Objects.equals(dispatchServers, that.dispatchServers) && |
||||
Objects.equals(cache, that.cache) && |
||||
Objects.equals(storageServer, that.storageServer) && |
||||
Objects.equals(dpDone, that.dpDone) && |
||||
Objects.equals(duration, that.duration) && |
||||
Objects.equals(mid, that.mid) && |
||||
Objects.equals(dpDoneHdmp4, that.dpDoneHdmp4) && |
||||
Objects.equals(letvVid, that.letvVid) && |
||||
Objects.equals(storage, that.storage) && |
||||
Objects.equals(letvAddr, that.letvAddr) && |
||||
Objects.equals(subtitle, that.subtitle); |
||||
} |
||||
|
||||
@Override |
||||
public int hashCode() { |
||||
|
||||
return Objects.hash(cid, aid, dpDoneMp4, letvVu, dpDoneFlv, uploadMeta, type, vp, upload, author, cover, title, page, dispatch, vid, backupVid, files, dispatchServers, cache, storageServer, dpDone, duration, mid, dpDoneHdmp4, letvVid, storage, letvAddr, subtitle); |
||||
} |
||||
|
||||
@Override |
||||
public Serializable primaryKey() { |
||||
return getCid(); |
||||
} |
||||
|
||||
@Override |
||||
public String tableNote() { |
||||
return null; |
||||
} |
||||
} |
@ -1,6 +1,6 @@ |
||||
package org.pqh.model; |
||||
package web.model; |
||||
|
||||
import org.pqh.core.model.AbstractModel; |
||||
import core.model.AbstractModel; |
||||
|
||||
import javax.persistence.*; |
||||
import java.io.Serializable; |
@ -1,6 +1,6 @@ |
||||
package org.pqh.model; |
||||
package web.model; |
||||
|
||||
import org.pqh.core.model.AbstractModel; |
||||
import core.model.AbstractModel; |
||||
|
||||
import javax.persistence.*; |
||||
import java.io.Serializable; |
@ -1,4 +1,4 @@ |
||||
package org.pqh.thrift; |
||||
package web.thrift; |
||||
|
||||
import org.apache.thrift.TException; |
||||
|
@ -1,4 +1,4 @@ |
||||
package org.pqh.thrift; |
||||
package web.thrift; |
||||
|
||||
import org.apache.thrift.protocol.TBinaryProtocol; |
||||
import org.apache.thrift.protocol.TProtocol; |
@ -1,4 +1,4 @@ |
||||
package org.pqh.thrift; |
||||
package web.thrift; |
||||
|
||||
import org.apache.thrift.TProcessorFactory; |
||||
import org.apache.thrift.protocol.TBinaryProtocol; |
@ -1,8 +1,16 @@ |
||||
#-----------------------hibernate\u914D\u7F6E----------------------------- |
||||
#-----------------------hibernateÅäÖÃ----------------------------- |
||||
hibernate.dialect=org.hibernate.dialect.MySQL57Dialect |
||||
hibernate.connection.driver_class=com.mysql.cj.jdbc.Driver |
||||
hibernate.connection.url=jdbc:mysql://127.0.0.1:3306/webcrawler?serverTimezone=UTC |
||||
hibernate.connection.username=bilibili |
||||
hibernate.connection.password=2233 |
||||
#-----------------------DruidDataSource\u914D\u7F6E----------------------- |
||||
druid.maxActive=20 |
||||
hibernate.connection.url=jdbc:mysql://mikuhime.xyz:3306/bilibili?serverTimezone=UTC |
||||
hibernate.connection.username=sukura |
||||
hibernate.connection.password=@ |
||||
#Êý¾ÝÔ´2 |
||||
hibernate.dialect2=org.hibernate.dialect.MySQL57Dialect |
||||
hibernate.connection.driver_class2=com.mysql.cj.jdbc.Driver |
||||
hibernate.connection.url2=jdbc:mysql://mikuhime.xyz:3306/bilibili?serverTimezone=UTC |
||||
hibernate.connection.username2=sukura |
||||
hibernate.connection.password2=@ |
||||
#-----------------------DruidDataSourceÅäÖÃ----------------------- |
||||
druid.maxActive=20 |
||||
|
||||
spring.scan=core,web |
@ -0,0 +1,13 @@ |
||||
<!DOCTYPE html> |
||||
<html lang="en"> |
||||
<head> |
||||
<meta charset="UTF-8"> |
||||
<title>Title</title> |
||||
<script> |
||||
location.href='/index.do' |
||||
</script> |
||||
</head> |
||||
<body> |
||||
|
||||
</body> |
||||
</html> |
Loading…
Reference in new issue