API接口次数管理功能优化
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
package com.fangjia.dal.mongo.dao;
|
||||
|
||||
import com.fangjia.dal.MongoDao;
|
||||
import com.fangjia.dal.mongo.model.ApiCountLog;
|
||||
import com.fangjia.dal.mongo.model.DevelopmentZone;
|
||||
|
||||
public interface ApiCountLogDao extends MongoDao<ApiCountLog> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.fangjia.dal.mongo.dao;
|
||||
|
||||
import com.fangjia.dal.MongoDaoImpl;
|
||||
import com.fangjia.dal.mongo.model.ApiCountLog;
|
||||
import com.fangjia.dal.mongo.model.DevelopmentZone;
|
||||
|
||||
public class ApiCountLogDaoImpl extends MongoDaoImpl<ApiCountLog> implements ApiCountLogDao {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.fangjia.dal.mongo.model;
|
||||
|
||||
import com.fangjia.dal.MongoEntity;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@Entity
|
||||
@Table(name = "business.api_count_log")
|
||||
public class ApiCountLog implements MongoEntity {
|
||||
|
||||
private String id;
|
||||
|
||||
private Long userId;
|
||||
|
||||
private String uri;
|
||||
|
||||
private String uriName;
|
||||
|
||||
private String operate;
|
||||
|
||||
private String operator;
|
||||
|
||||
private Date operateTime;
|
||||
|
||||
// 修改次数前总次数
|
||||
private Integer oldCount;
|
||||
// 修改次数后的次数
|
||||
private Integer newCount;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||
@Column(name = "_id")
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Column(name = "user_id")
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
@Column(name = "uri")
|
||||
public String getUri() {
|
||||
return uri;
|
||||
}
|
||||
|
||||
public void setUri(String uri) {
|
||||
this.uri = uri;
|
||||
}
|
||||
|
||||
@Column(name = "uri_name")
|
||||
public String getUriName() {
|
||||
return uriName;
|
||||
}
|
||||
|
||||
public void setUriName(String uriName) {
|
||||
this.uriName = uriName;
|
||||
}
|
||||
|
||||
@Column(name = "operate")
|
||||
public String getOperate() {
|
||||
return operate;
|
||||
}
|
||||
|
||||
public void setOperate(String operate) {
|
||||
this.operate = operate;
|
||||
}
|
||||
|
||||
@Column(name = "operator")
|
||||
public String getOperator() {
|
||||
return operator;
|
||||
}
|
||||
|
||||
public void setOperator(String operator) {
|
||||
this.operator = operator;
|
||||
}
|
||||
|
||||
@Column(name = "operate_time")
|
||||
public Date getOperateTime() {
|
||||
return operateTime;
|
||||
}
|
||||
|
||||
public void setOperateTime(Date operateTime) {
|
||||
this.operateTime = operateTime;
|
||||
}
|
||||
|
||||
@Column(name = "old_count")
|
||||
public Integer getOldCount() {
|
||||
return oldCount;
|
||||
}
|
||||
|
||||
public void setOldCount(Integer oldCount) {
|
||||
this.oldCount = oldCount;
|
||||
}
|
||||
|
||||
@Column(name = "new_count")
|
||||
public Integer getNewCount() {
|
||||
return newCount;
|
||||
}
|
||||
|
||||
public void setNewCount(Integer newCount) {
|
||||
this.newCount = newCount;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user