This repository has been archived by the owner on Mar 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
712 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,6 +81,10 @@ | |
10. shw-common | ||
|
||
公共模块。包括一些异常,工具类等等 | ||
|
||
11. shw-hystrix-dashboard | ||
|
||
hystrix监控信息服务 | ||
|
||
消息队列系统: | ||
|
||
|
26 changes: 26 additions & 0 deletions
26
shw-file/src/main/java/top/itning/server/shwfile/client/SecurityClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package top.itning.server.shwfile.client; | ||
|
||
import org.springframework.cloud.openfeign.FeignClient; | ||
import org.springframework.stereotype.Component; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.PathVariable; | ||
import top.itning.server.shwfile.client.entity.Student; | ||
|
||
import java.util.Optional; | ||
|
||
/** | ||
* @author itning | ||
* @date 2019/5/5 19:33 | ||
*/ | ||
@FeignClient(name = "security") | ||
@Component | ||
public interface SecurityClient { | ||
/** | ||
* 根据学号查询学生信息 | ||
* | ||
* @param id 学号 | ||
* @return 学生信息 | ||
*/ | ||
@GetMapping("/internal/findStudentById/{id}") | ||
Optional<Student> findStudentById(@PathVariable String id); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
shw-file/src/main/java/top/itning/server/shwfile/client/WorkClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package top.itning.server.shwfile.client; | ||
|
||
import org.springframework.cloud.openfeign.FeignClient; | ||
import org.springframework.stereotype.Component; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.PathVariable; | ||
import top.itning.server.shwfile.client.entity.Work; | ||
|
||
import java.util.Optional; | ||
|
||
/** | ||
* @author itning | ||
* @date 2019/5/5 19:47 | ||
*/ | ||
@FeignClient(name = "work") | ||
@Component | ||
public interface WorkClient { | ||
/** | ||
* 获取一个作业信息 | ||
* | ||
* @param id 作业ID | ||
* @return 作业信息 | ||
*/ | ||
@GetMapping("/internal/getOneWorkById/{id}") | ||
Optional<Work> getOneWorkById(@PathVariable String id); | ||
} |
66 changes: 66 additions & 0 deletions
66
shw-file/src/main/java/top/itning/server/shwfile/client/entity/Student.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
package top.itning.server.shwfile.client.entity; | ||
|
||
/** | ||
* @author itning | ||
* @date 2019/4/30 13:08 | ||
*/ | ||
public class Student { | ||
/** | ||
* 学号 | ||
*/ | ||
private String no; | ||
/** | ||
* 登录名 | ||
*/ | ||
private String loginName; | ||
/** | ||
* 姓名 | ||
*/ | ||
private String name; | ||
/** | ||
* 班级 | ||
*/ | ||
private String clazzId; | ||
|
||
public String getNo() { | ||
return no; | ||
} | ||
|
||
public void setNo(String no) { | ||
this.no = no; | ||
} | ||
|
||
public String getLoginName() { | ||
return loginName; | ||
} | ||
|
||
public void setLoginName(String loginName) { | ||
this.loginName = loginName; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
public String getClazzId() { | ||
return clazzId; | ||
} | ||
|
||
public void setClazzId(String clazzId) { | ||
this.clazzId = clazzId; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Student{" + | ||
"no='" + no + '\'' + | ||
", loginName='" + loginName + '\'' + | ||
", name='" + name + '\'' + | ||
", clazzId='" + clazzId + '\'' + | ||
'}'; | ||
} | ||
} |
166 changes: 166 additions & 0 deletions
166
shw-file/src/main/java/top/itning/server/shwfile/client/entity/Upload.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
package top.itning.server.shwfile.client.entity; | ||
|
||
import java.util.Date; | ||
|
||
/** | ||
* @author itning | ||
* @date 2019/5/2 16:48 | ||
*/ | ||
public class Upload implements Cloneable { | ||
/** | ||
* studentId+|+workId | ||
*/ | ||
private String id; | ||
/** | ||
* 学生ID | ||
*/ | ||
private String studentId; | ||
/** | ||
* 作业ID | ||
*/ | ||
private String workId; | ||
/** | ||
* 文件类型 | ||
*/ | ||
private String mime; | ||
/** | ||
* 扩展名 | ||
*/ | ||
private String extensionName; | ||
/** | ||
* 文件大小(bytes) | ||
*/ | ||
private long size; | ||
/** | ||
* 批阅信息 | ||
*/ | ||
private String review; | ||
/** | ||
* 创建时间 | ||
*/ | ||
private Date gmtCreate; | ||
/** | ||
* 更新时间 | ||
*/ | ||
private Date gmtModified; | ||
|
||
public Upload() { | ||
} | ||
|
||
public Upload(String studentId, String workId, String mime, String extensionName, long size) { | ||
this.id = studentId + "|" + workId; | ||
this.studentId = studentId; | ||
this.workId = workId; | ||
this.mime = mime; | ||
this.extensionName = extensionName; | ||
this.size = size; | ||
this.review = ""; | ||
Date date = new Date(); | ||
this.gmtCreate = date; | ||
this.gmtModified = date; | ||
} | ||
|
||
public Upload init() { | ||
this.id = studentId + "|" + workId; | ||
this.review = ""; | ||
Date date = new Date(); | ||
this.gmtCreate = date; | ||
this.gmtModified = date; | ||
return this; | ||
} | ||
|
||
public Upload clones() { | ||
try { | ||
return (Upload) this.clone(); | ||
} catch (CloneNotSupportedException e) { | ||
return new Upload(); | ||
} | ||
} | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
public void setId(String id) { | ||
this.id = id; | ||
} | ||
|
||
public String getStudentId() { | ||
return studentId; | ||
} | ||
|
||
public void setStudentId(String studentId) { | ||
this.studentId = studentId; | ||
} | ||
|
||
public String getWorkId() { | ||
return workId; | ||
} | ||
|
||
public void setWorkId(String workId) { | ||
this.workId = workId; | ||
} | ||
|
||
public String getMime() { | ||
return mime; | ||
} | ||
|
||
public void setMime(String mime) { | ||
this.mime = mime; | ||
} | ||
|
||
public String getExtensionName() { | ||
return extensionName; | ||
} | ||
|
||
public void setExtensionName(String extensionName) { | ||
this.extensionName = extensionName; | ||
} | ||
|
||
public long getSize() { | ||
return size; | ||
} | ||
|
||
public void setSize(long size) { | ||
this.size = size; | ||
} | ||
|
||
public String getReview() { | ||
return review; | ||
} | ||
|
||
public void setReview(String review) { | ||
this.review = review; | ||
} | ||
|
||
public Date getGmtCreate() { | ||
return gmtCreate; | ||
} | ||
|
||
public void setGmtCreate(Date gmtCreate) { | ||
this.gmtCreate = gmtCreate; | ||
} | ||
|
||
public Date getGmtModified() { | ||
return gmtModified; | ||
} | ||
|
||
public void setGmtModified(Date gmtModified) { | ||
this.gmtModified = gmtModified; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Upload{" + | ||
"id='" + id + '\'' + | ||
", studentId='" + studentId + '\'' + | ||
", workId='" + workId + '\'' + | ||
", mime='" + mime + '\'' + | ||
", extensionName='" + extensionName + '\'' + | ||
", size=" + size + | ||
", review='" + review + '\'' + | ||
", gmtCreate=" + gmtCreate + | ||
", gmtModified=" + gmtModified + | ||
'}'; | ||
} | ||
} |
Oops, something went wrong.