Skip to content
This repository has been archived by the owner on Dec 25, 2019. It is now read-only.

Commit

Permalink
日志功能OK
Browse files Browse the repository at this point in the history
  • Loading branch information
crossoverJie authored and 陈杰 committed Jan 15, 2017
1 parent aa52d21 commit f152a6b
Show file tree
Hide file tree
Showing 14 changed files with 1,528 additions and 58 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/crossoverJie/controller/MyWebSocket.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public void sendMessage(String message) throws IOException{
Content content = new Content() ;
content.setContent(message);
SimpleDateFormat sm = new SimpleDateFormat("yyyy-MM-dd HH:mm:dd") ;
content.setCreateDate(sm.format(new Date()));
content.setCreatedate(sm.format(new Date()));
contentService.insertSelective(content) ;

this.session.getBasicRemote().sendText(message);
Expand Down
32 changes: 32 additions & 0 deletions src/main/java/com/crossoverJie/dao/ContentLogMapper.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package com.crossoverJie.dao;

import com.crossoverJie.pojo.ContentLog;
import com.crossoverJie.pojo.ContentLogExample;

import java.util.List;

import org.apache.ibatis.annotations.Param;

public interface ContentLogMapper {
int countByExample(ContentLogExample example);

int deleteByExample(ContentLogExample example);

int deleteByPrimaryKey(Integer logId);

int insert(ContentLog record);

int insertSelective(ContentLog record);

List<ContentLog> selectByExample(ContentLogExample example);

ContentLog selectByPrimaryKey(Integer logId);

int updateByExampleSelective(@Param("record") ContentLog record, @Param("example") ContentLogExample example);

int updateByExample(@Param("record") ContentLog record, @Param("example") ContentLogExample example);

int updateByPrimaryKeySelective(ContentLog record);

int updateByPrimaryKey(ContentLog record);
}
32 changes: 32 additions & 0 deletions src/main/java/com/crossoverJie/dao/ContentMapper.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package com.crossoverJie.dao;

import com.crossoverJie.pojo.Content;
import com.crossoverJie.pojo.ContentExample;

import java.util.List;

import org.apache.ibatis.annotations.Param;

public interface ContentMapper {
int countByExample(ContentExample example);

int deleteByExample(ContentExample example);

int deleteByPrimaryKey(Integer contentid);

int insert(Content record);

int insertSelective(Content record);

List<Content> selectByExample(ContentExample example);

Content selectByPrimaryKey(Integer contentid);

int updateByExampleSelective(@Param("record") Content record, @Param("example") ContentExample example);

int updateByExample(@Param("record") Content record, @Param("example") ContentExample example);

int updateByPrimaryKeySelective(Content record);

int updateByPrimaryKey(Content record);
}
42 changes: 20 additions & 22 deletions src/main/java/com/crossoverJie/pojo/Content.java
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
package com.crossoverJie.pojo;

import java.io.Serializable;
public class Content {
private Integer contentid;

/**
* Created by Administrator on 2016/8/28.
*/
public class Content implements Serializable {
private Integer contentId;
private String contentName ;
private String content ;
private String createDate ;
private String contentname;

public Integer getContentId() {
return contentId;
private String content;

private String createdate;

public Integer getContentid() {
return contentid;
}

public void setContentId(Integer contentId) {
this.contentId = contentId;
public void setContentid(Integer contentid) {
this.contentid = contentid;
}

public String getContentName() {
return contentName;
public String getContentname() {
return contentname;
}

public void setContentName(String contentName) {
this.contentName = contentName;
public void setContentname(String contentname) {
this.contentname = contentname;
}

public String getContent() {
Expand All @@ -35,11 +33,11 @@ public void setContent(String content) {
this.content = content;
}

public String getCreateDate() {
return createDate;
public String getCreatedate() {
return createdate;
}

public void setCreateDate(String createDate) {
this.createDate = createDate;
public void setCreatedate(String createdate) {
this.createdate = createdate;
}
}
}
Loading

0 comments on commit f152a6b

Please sign in to comment.