pull/3/head
向金成 2 years ago
parent 625273c8ac
commit e41c8f8aaa

@ -1,37 +1,47 @@
}
Mspringboot/src/main/java/com/xht/springboot/Control/GetSpiderInformation.java,6\a\6ae8bd6e0b13a9d9272e5cd44460d2d0a72091d9
|
Lspringboot/src/main/java/com/xht/springboot/Service/PersonalHomeService.java,7\6\762bc359bc75ba7b3073e784c826f31f6c989305

Ospringboot/src/main/java/com/xht/springboot/Control/PersonalHomeController.java,b\e\be5bf7d32cedc052850e2cc0c99f2cf7357cac12
w
Gspringboot/src/main/java/com/xht/springboot/Dao/PersonalHomeMapper.java,8\e\8ea61bcc473345da7a8363076b3ae562bc76fedc
z
Jspringboot/src/main/java/com/xht/springboot/pythonspider/PythonSpider.java,8\2\82d065e13dbb46b69838db763af0105eec47337f
p
@springboot/src/main/java/com/xht/springboot/Entity/UserHome.java,0\b\0bf6f777ae20a7657065bc4a2b2a9f1f3b4876b1
q
Aspringboot/src/main/java/com/xht/springboot/Entity/UserReply.java,0\5\051eaf551b928a8ccf651611c070ebb2b8155264
B
springboot/pom.xml,e\4\e46aee6c7c512a7b48980a296fca0acf004a1907
r
Bspringboot/src/main/java/com/xht/springboot/Dao/WebHomeMapper.java,2\a\2ad2a1260dac6c01c8b352bb0e2ca62f513676a9
{
Kspringboot/src/main/java/com/xht/springboot/Dao/LoginAndRegisterMapper.java,6\4\6455addaf8475c1ee66ddf019aba9934cde58b33
q
Aspringboot/src/main/java/com/xht/springboot/Entity/UserLogin.java,1\3\139a0da36daad8c438a5607ee212d1f38a505779
r
Bspringboot/src/main/java/com/xht/springboot/Tip/RequestResult.java,8\a\8ac776bbbb6e77f29694ccc4476b533f9f4573da
w
Gspringboot/src/main/java/com/xht/springboot/Service/WebHomeService.java,5\f\5feb9f75e1bc678660918562fd0ce2745899be29
q
Aspringboot/src/main/java/com/xht/springboot/Entity/UserReply.java,0\5\051eaf551b928a8ccf651611c070ebb2b8155264
|
Lspringboot/src/main/java/com/xht/springboot/Service/PersonalHomeService.java,7\6\762bc359bc75ba7b3073e784c826f31f6c989305
m
=train_cancer/test_information/train_model_and_load_picture.py,b\c\bc14878c6e46b0ed0df34c90b21fc25660f0e1f1
W
'train_cancer/train_model/train/train.py,1\9\197bfd3ed06240b421d21990e0f9a694f132bfac
X
(train_cancer/train_model/test/predict.py,d\a\da7c5892671567272f27695c433f21af25c378a9
]
-train_cancer/train_model/gpu_cpu/check_cpu.py,f\6\f61ac2808b4dc885ec9d8e0a2e3a842098bfb484
`
0train_cancer/train_model/data_gen/data_output.py,6\9\69a341fae4073fedbb8b01a3b078c3012c70ce5f

Ospringboot/src/main/java/com/xht/springboot/Control/PersonalHomeController.java,b\e\be5bf7d32cedc052850e2cc0c99f2cf7357cac12
ƒ
Sspringboot/src/main/java/com/xht/springboot/Control/LoginAndRegisterController.java,4\2\42d62ad23989879b1e669e84287f32b9ec3b7df5
s
Cspringboot/src/main/java/com/xht/springboot/Entity/UserComment.java,9\3\932ae6b8f9f42f924c25e69e48dc30fddd63ec28
p
@springboot/src/main/java/com/xht/springboot/Entity/UserText.java,4\0\40a2343a36c9747fa26c52f19f82c0a493b5c2e0
z
Jspringboot/src/main/java/com/xht/springboot/Control/WebHomeController.java,e\d\edeacc9d294f3b307d4238fb3f381c6838218bb6
s
Cspringboot/src/main/java/com/xht/springboot/Entity/UserComment.java,9\3\932ae6b8f9f42f924c25e69e48dc30fddd63ec28
r
Bspringboot/src/main/java/com/xht/springboot/Dao/WebHomeMapper.java,2\a\2ad2a1260dac6c01c8b352bb0e2ca62f513676a9
v
Fspringboot/src/main/java/com/xht/springboot/SpringbootApplication.java,4\0\40324953a2003c0d6c6b3ceece38a620d48a0df7
Fspringboot/src/main/java/com/xht/springboot/SpringbootApplication.java,4\0\40324953a2003c0d6c6b3ceece38a620d48a0df7
w
Gspringboot/src/main/java/com/xht/springboot/Service/WebHomeService.java,5\f\5feb9f75e1bc678660918562fd0ce2745899be29
z
Jspringboot/src/main/java/com/xht/springboot/Control/WebHomeController.java,e\d\edeacc9d294f3b307d4238fb3f381c6838218bb6

@ -1,20 +1,12 @@
}
Mspringboot/src/main/java/com/xht/springboot/Control/GetSpiderInformation.java,6\a\6ae8bd6e0b13a9d9272e5cd44460d2d0a72091d9
|
Lspringboot/src/main/java/com/xht/springboot/Service/PersonalHomeService.java,7\6\762bc359bc75ba7b3073e784c826f31f6c989305

Ospringboot/src/main/java/com/xht/springboot/Control/PersonalHomeController.java,b\e\be5bf7d32cedc052850e2cc0c99f2cf7357cac12
w
Gspringboot/src/main/java/com/xht/springboot/Dao/PersonalHomeMapper.java,8\e\8ea61bcc473345da7a8363076b3ae562bc76fedc
z
Jspringboot/src/main/java/com/xht/springboot/pythonspider/PythonSpider.java,8\2\82d065e13dbb46b69838db763af0105eec47337f
p
@springboot/src/main/java/com/xht/springboot/Entity/UserHome.java,0\b\0bf6f777ae20a7657065bc4a2b2a9f1f3b4876b1
q
Aspringboot/src/main/java/com/xht/springboot/Entity/UserReply.java,0\5\051eaf551b928a8ccf651611c070ebb2b8155264
r
Bspringboot/src/main/java/com/xht/springboot/Dao/WebHomeMapper.java,2\a\2ad2a1260dac6c01c8b352bb0e2ca62f513676a9
B
springboot/pom.xml,e\4\e46aee6c7c512a7b48980a296fca0acf004a1907
r
@ -23,15 +15,33 @@ q
Aspringboot/src/main/java/com/xht/springboot/Entity/UserLogin.java,1\3\139a0da36daad8c438a5607ee212d1f38a505779
{
Kspringboot/src/main/java/com/xht/springboot/Dao/LoginAndRegisterMapper.java,6\4\6455addaf8475c1ee66ddf019aba9934cde58b33
q
Aspringboot/src/main/java/com/xht/springboot/Entity/UserReply.java,0\5\051eaf551b928a8ccf651611c070ebb2b8155264
|
Lspringboot/src/main/java/com/xht/springboot/Service/PersonalHomeService.java,7\6\762bc359bc75ba7b3073e784c826f31f6c989305
m
=train_cancer/test_information/train_model_and_load_picture.py,b\c\bc14878c6e46b0ed0df34c90b21fc25660f0e1f1
W
'train_cancer/train_model/train/train.py,1\9\197bfd3ed06240b421d21990e0f9a694f132bfac
X
(train_cancer/train_model/test/predict.py,d\a\da7c5892671567272f27695c433f21af25c378a9
]
-train_cancer/train_model/gpu_cpu/check_cpu.py,f\6\f61ac2808b4dc885ec9d8e0a2e3a842098bfb484
`
0train_cancer/train_model/data_gen/data_output.py,6\9\69a341fae4073fedbb8b01a3b078c3012c70ce5f
v
Fspringboot/src/main/java/com/xht/springboot/SpringbootApplication.java,4\0\40324953a2003c0d6c6b3ceece38a620d48a0df7
w
Gspringboot/src/main/java/com/xht/springboot/Service/WebHomeService.java,5\f\5feb9f75e1bc678660918562fd0ce2745899be29
r
Bspringboot/src/main/java/com/xht/springboot/Dao/WebHomeMapper.java,2\a\2ad2a1260dac6c01c8b352bb0e2ca62f513676a9

Ospringboot/src/main/java/com/xht/springboot/Control/PersonalHomeController.java,b\e\be5bf7d32cedc052850e2cc0c99f2cf7357cac12
ƒ
Sspringboot/src/main/java/com/xht/springboot/Control/LoginAndRegisterController.java,4\2\42d62ad23989879b1e669e84287f32b9ec3b7df5
s
Cspringboot/src/main/java/com/xht/springboot/Entity/UserComment.java,9\3\932ae6b8f9f42f924c25e69e48dc30fddd63ec28
p
@springboot/src/main/java/com/xht/springboot/Entity/UserText.java,4\0\40a2343a36c9747fa26c52f19f82c0a493b5c2e0
w
Gspringboot/src/main/java/com/xht/springboot/Service/WebHomeService.java,5\f\5feb9f75e1bc678660918562fd0ce2745899be29
z
Jspringboot/src/main/java/com/xht/springboot/Control/WebHomeController.java,e\d\edeacc9d294f3b307d4238fb3f381c6838218bb6

@ -7,14 +7,13 @@ import com.xht.springboot.Service.WebHomeService;
import com.xht.springboot.Tip.RequestResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@Controller
@RequestMapping("/web")
public class WebHomeController {
@Autowired
WebHomeService webHomeService;
@ -34,7 +33,7 @@ public class WebHomeController {
return webHomeService.getUserReplies(commentid);
}
@RequestMapping("/posttext")
@PostMapping("/posttext")
@ResponseBody
public RequestResult postText(@RequestBody UserText userText){
if(webHomeService.postUserText(userText)){
@ -46,9 +45,9 @@ public class WebHomeController {
}
}
@RequestMapping("/deltext")
@PostMapping("/deltext")
@ResponseBody
public RequestResult deleteText(UserText userText){
public RequestResult deleteText(@RequestBody UserText userText){
if(webHomeService.deleteUserText(userText)){
requestResult.status = RequestResult.OK;
return requestResult;
@ -58,9 +57,9 @@ public class WebHomeController {
}
}
@RequestMapping("/updatetext")
@PostMapping("/updatetext")
@ResponseBody
public RequestResult updateText(UserText userText){
public RequestResult updateText(@RequestBody UserText userText){
if(webHomeService.updateUserText(userText)){
requestResult.status = RequestResult.OK;
return requestResult;
@ -70,13 +69,13 @@ public class WebHomeController {
}
}
@RequestMapping("/findtext")
@GetMapping("/findtext")
@ResponseBody
public List<UserText> findText(String token){
return webHomeService.findUserText(token);
}
@RequestMapping("/postcomment")
@PostMapping("/postcomment")
@ResponseBody
public RequestResult postComment(@RequestBody UserComment userComment){
if(webHomeService.postUserComment(userComment)){
@ -88,9 +87,9 @@ public class WebHomeController {
}
}
@RequestMapping("/delcomment")
@PostMapping("/delcomment")
@ResponseBody
public RequestResult deleteComment(UserComment userComment){
public RequestResult deleteComment(@RequestBody UserComment userComment){
if(webHomeService.deleteUserComment(userComment)){
requestResult.status = RequestResult.OK;
return requestResult;
@ -100,9 +99,9 @@ public class WebHomeController {
}
}
@RequestMapping("/updatecomment")
@PostMapping("/updatecomment")
@ResponseBody
public RequestResult updateComment(UserComment userComment){
public RequestResult updateComment(@RequestBody UserComment userComment){
if(webHomeService.updateUserComment(userComment)){
requestResult.status = RequestResult.OK;
return requestResult;
@ -112,7 +111,7 @@ public class WebHomeController {
}
}
@RequestMapping("/postreply")
@PostMapping("/postreply")
@ResponseBody
public RequestResult postReply(@RequestBody UserReply userReply){
if(webHomeService.postUserReply(userReply)){
@ -123,4 +122,34 @@ public class WebHomeController {
return requestResult;
}
}
@PostMapping("/delreply")
@ResponseBody
public RequestResult deleteReply(@RequestBody UserReply userReply){
if(webHomeService.deleteUserReply(userReply)){
requestResult.status = RequestResult.OK;
return requestResult;
}else{
requestResult.status = RequestResult.FAIL;
return requestResult;
}
}
@PostMapping("/updatereply")
@ResponseBody
public RequestResult updateReply(@RequestBody UserReply userReply){
if(webHomeService.updateUserReply(userReply)){
requestResult.status = RequestResult.OK;
return requestResult;
}else{
requestResult.status = RequestResult.FAIL;
return requestResult;
}
}
@PostMapping("/findreply")
@ResponseBody
public List<UserReply> selectReply(@RequestBody UserReply userReply){
return webHomeService.selectUserReply(userReply);
}
}

@ -50,4 +50,12 @@ public interface WebHomeMapper {
//上传回复
public int insertUserReply(UserReply userReply);
public int deleteUserReply(UserReply userReply);
public int updateUserReply(UserReply userReply);
public List<UserReply> selectUserReply(UserReply userReply);
}

@ -14,4 +14,6 @@ public class UserReply {
private int commentid;
private String text;
private int rplikecount;
}

@ -7,6 +7,7 @@ import com.xht.springboot.Entity.UserReply;
import com.xht.springboot.Entity.UserText;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@ -57,6 +58,7 @@ public class WebHomeService {
}
}
@Transactional
public List<UserText> findUserText(String token){
List<UserText> results = null;
results = webHomeMapper.findOfTextContains(token);//查询文本中是否包含
@ -115,4 +117,30 @@ public class WebHomeService {
return false;
}
}
public boolean deleteUserReply(UserReply userReply){
int rows=0;
rows = webHomeMapper.deleteUserReply(userReply);
if(rows >= 1){
System.out.println("delete reply OK "+rows);
return true;
}else{
return false;
}
}
public boolean updateUserReply(UserReply userReply){
int rows=0;
rows = webHomeMapper.updateUserReply(userReply);
if(rows >= 1){
System.out.println("update reply OK "+rows);
return true;
}else{
return false;
}
}
public List<UserReply> selectUserReply(UserReply userReply){
return webHomeMapper.selectUserReply(userReply);
}
}

@ -5,19 +5,19 @@
<mapper namespace="com.xht.springboot.Dao.WebHomeMapper">
<resultMap id="findAllResult" type="com.xht.springboot.Entity.UserText">
<id column="textid" property="textId"></id>
<id column="textid" property="textid"></id>
<result column="tuid" property="uid"></result>
<result column="title" property="title"></result>
<result column="text" property="text"></result>
<result column="updatetime" property="updateTime"></result>
<result column="createtime" property="createTime"></result>
<result column="txlikecount" property="likeCount"></result>
<result column="updatetime" property="updatetime"></result>
<result column="createtime" property="createtime"></result>
<result column="txlikecount" property="txtlikecount"></result>
<collection property="comments" ofType="com.xht.springboot.Entity.UserComment">
<id column="commentid" property="commentId"></id>
<result column="textid" property="textId"></result>
<id column="commentid" property="commentid"></id>
<result column="textid" property="textid"></result>
<result column="cuid" property="uid"></result>
<result column="comment" property="comment"></result>
<result column="cmlikecount" property="likeCount"></result>
<result column="cmlikecount" property="cmlikecount"></result>
</collection>
</resultMap>
@ -100,4 +100,25 @@
<insert id="insertUserReply" parameterType="com.xht.springboot.Entity.UserReply">
insert into userreplies(commentid,text) values(#{commentid},#{text})
</insert>
<delete id="deleteUserReply" parameterType="com.xht.springboot.Entity.UserReply">
delete from userreplies where replyid=#{replyid}
</delete>
<update id="updateUserReply" parameterType="com.xht.springboot.Entity.UserReply">
update userreplies
<set>
<if test="text!=null">
text=#{text},
</if>
<if test="rplikecount!=0">
rplikecount=#{rplikecount},
</if>
</set>
where replyid=#{replyid}
</update>
<select id="selectUserReply" parameterType="com.xht.springboot.Entity.UserReply">
select * from userreplies where replyid=#{replyid}
</select>
</mapper>
Loading…
Cancel
Save