pull/1/head
向金成 2 years ago
parent a1736d12a7
commit fd6b5f953a

@ -13,10 +13,6 @@ p
@springboot/src/main/java/com/xht/springboot/Entity/UserHome.java,0\b\0bf6f777ae20a7657065bc4a2b2a9f1f3b4876b1 @springboot/src/main/java/com/xht/springboot/Entity/UserHome.java,0\b\0bf6f777ae20a7657065bc4a2b2a9f1f3b4876b1
q q
Aspringboot/src/main/java/com/xht/springboot/Entity/UserReply.java,0\5\051eaf551b928a8ccf651611c070ebb2b8155264 Aspringboot/src/main/java/com/xht/springboot/Entity/UserReply.java,0\5\051eaf551b928a8ccf651611c070ebb2b8155264
p
@springboot/src/main/java/com/xht/springboot/Entity/UserText.java,4\0\40a2343a36c9747fa26c52f19f82c0a493b5c2e0
s
Cspringboot/src/main/java/com/xht/springboot/Entity/UserComment.java,9\3\932ae6b8f9f42f924c25e69e48dc30fddd63ec28
B B
springboot/pom.xml,e\4\e46aee6c7c512a7b48980a296fca0acf004a1907 springboot/pom.xml,e\4\e46aee6c7c512a7b48980a296fca0acf004a1907
r r
@ -26,4 +22,16 @@ Kspringboot/src/main/java/com/xht/springboot/Dao/LoginAndRegisterMapper.java,6\
q q
Aspringboot/src/main/java/com/xht/springboot/Entity/UserLogin.java,1\3\139a0da36daad8c438a5607ee212d1f38a505779 Aspringboot/src/main/java/com/xht/springboot/Entity/UserLogin.java,1\3\139a0da36daad8c438a5607ee212d1f38a505779
r r
Bspringboot/src/main/java/com/xht/springboot/Tip/RequestResult.java,8\a\8ac776bbbb6e77f29694ccc4476b533f9f4573da 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
ƒ
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
v
Fspringboot/src/main/java/com/xht/springboot/SpringbootApplication.java,4\0\40324953a2003c0d6c6b3ceece38a620d48a0df7

@ -13,10 +13,6 @@ p
@springboot/src/main/java/com/xht/springboot/Entity/UserHome.java,0\b\0bf6f777ae20a7657065bc4a2b2a9f1f3b4876b1 @springboot/src/main/java/com/xht/springboot/Entity/UserHome.java,0\b\0bf6f777ae20a7657065bc4a2b2a9f1f3b4876b1
q q
Aspringboot/src/main/java/com/xht/springboot/Entity/UserReply.java,0\5\051eaf551b928a8ccf651611c070ebb2b8155264 Aspringboot/src/main/java/com/xht/springboot/Entity/UserReply.java,0\5\051eaf551b928a8ccf651611c070ebb2b8155264
p
@springboot/src/main/java/com/xht/springboot/Entity/UserText.java,4\0\40a2343a36c9747fa26c52f19f82c0a493b5c2e0
s
Cspringboot/src/main/java/com/xht/springboot/Entity/UserComment.java,9\3\932ae6b8f9f42f924c25e69e48dc30fddd63ec28
r r
Bspringboot/src/main/java/com/xht/springboot/Dao/WebHomeMapper.java,2\a\2ad2a1260dac6c01c8b352bb0e2ca62f513676a9 Bspringboot/src/main/java/com/xht/springboot/Dao/WebHomeMapper.java,2\a\2ad2a1260dac6c01c8b352bb0e2ca62f513676a9
B B
@ -26,4 +22,16 @@ Bspringboot/src/main/java/com/xht/springboot/Tip/RequestResult.java,8\a\8ac776b
q q
Aspringboot/src/main/java/com/xht/springboot/Entity/UserLogin.java,1\3\139a0da36daad8c438a5607ee212d1f38a505779 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 Kspringboot/src/main/java/com/xht/springboot/Dao/LoginAndRegisterMapper.java,6\4\6455addaf8475c1ee66ddf019aba9934cde58b33
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
ƒ
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

@ -7,6 +7,7 @@ import com.xht.springboot.Service.WebHomeService;
import com.xht.springboot.Tip.RequestResult; import com.xht.springboot.Tip.RequestResult;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; 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.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
@ -35,7 +36,7 @@ public class WebHomeController {
@RequestMapping("/posttext") @RequestMapping("/posttext")
@ResponseBody @ResponseBody
public RequestResult postText(UserText userText){ public RequestResult postText(@RequestBody UserText userText){
if(webHomeService.postUserText(userText)){ if(webHomeService.postUserText(userText)){
requestResult.status = RequestResult.OK; requestResult.status = RequestResult.OK;
return requestResult; return requestResult;
@ -77,7 +78,7 @@ public class WebHomeController {
@RequestMapping("/postcomment") @RequestMapping("/postcomment")
@ResponseBody @ResponseBody
public RequestResult postComment(UserComment userComment){ public RequestResult postComment(@RequestBody UserComment userComment){
if(webHomeService.postUserComment(userComment)){ if(webHomeService.postUserComment(userComment)){
requestResult.status = RequestResult.OK; requestResult.status = RequestResult.OK;
return requestResult; return requestResult;
@ -113,7 +114,7 @@ public class WebHomeController {
@RequestMapping("/postreply") @RequestMapping("/postreply")
@ResponseBody @ResponseBody
public RequestResult postReply(UserReply userReply){ public RequestResult postReply(@RequestBody UserReply userReply){
if(webHomeService.postUserReply(userReply)){ if(webHomeService.postUserReply(userReply)){
requestResult.status = RequestResult.OK; requestResult.status = RequestResult.OK;
return requestResult; return requestResult;

@ -23,7 +23,7 @@ public class UserText {
private Date updatetime; private Date updatetime;
private Date createtime; private Date createtime;
private int likecount; private int txtlikecount;
private List<UserComment> comments; private List<UserComment> comments;
} }

@ -42,7 +42,22 @@
</delete> </delete>
<update id="updateUserText" parameterType="com.xht.springboot.Entity.UserText"> <update id="updateUserText" parameterType="com.xht.springboot.Entity.UserText">
update usertexts set title=#{title},text=#{text},updatetime=#{updatetime} where textid=#{textid} update usertexts
<set>
<if test="title!=null">
title=#{title},
</if>
<if test="text!=null">
text=#{text},
</if>
<if test="txtlikecount!=0">
txtlikecount=#{txtlikecount},
</if>
<if test="updatetime!=null">
updatetime=#{updatetime},
</if>
</set>
where textid=#{textid}
</update> </update>
<select id="findOfTextContains" parameterType="string" resultType="com.xht.springboot.Entity.UserText"> <select id="findOfTextContains" parameterType="string" resultType="com.xht.springboot.Entity.UserText">
@ -66,7 +81,16 @@
</delete> </delete>
<update id="updateUserComment" parameterType="com.xht.springboot.Entity.UserComment"> <update id="updateUserComment" parameterType="com.xht.springboot.Entity.UserComment">
update usercomments
<set>
<if test="comment!=null">
comment=#{comment},
</if>
<if test="cmlikecount!=0">
cmlikecount=#{cmlikecount},
</if>
</set>
where commentid=#{commentid}
</update> </update>

Loading…
Cancel
Save