|
|
|
@ -7,6 +7,7 @@ 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;
|
|
|
|
|
|
|
|
|
@ -35,7 +36,7 @@ public class WebHomeController {
|
|
|
|
|
|
|
|
|
|
@RequestMapping("/posttext")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public RequestResult postText(UserText userText){
|
|
|
|
|
public RequestResult postText(@RequestBody UserText userText){
|
|
|
|
|
if(webHomeService.postUserText(userText)){
|
|
|
|
|
requestResult.status = RequestResult.OK;
|
|
|
|
|
return requestResult;
|
|
|
|
@ -77,7 +78,7 @@ public class WebHomeController {
|
|
|
|
|
|
|
|
|
|
@RequestMapping("/postcomment")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public RequestResult postComment(UserComment userComment){
|
|
|
|
|
public RequestResult postComment(@RequestBody UserComment userComment){
|
|
|
|
|
if(webHomeService.postUserComment(userComment)){
|
|
|
|
|
requestResult.status = RequestResult.OK;
|
|
|
|
|
return requestResult;
|
|
|
|
@ -113,7 +114,7 @@ public class WebHomeController {
|
|
|
|
|
|
|
|
|
|
@RequestMapping("/postreply")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public RequestResult postReply(UserReply userReply){
|
|
|
|
|
public RequestResult postReply(@RequestBody UserReply userReply){
|
|
|
|
|
if(webHomeService.postUserReply(userReply)){
|
|
|
|
|
requestResult.status = RequestResult.OK;
|
|
|
|
|
return requestResult;
|
|
|
|
|