This commit is contained in:
裴浩宇 2020-04-16 18:08:53 +08:00
parent b822927b21
commit 2ee3b9f173
3 changed files with 28 additions and 23 deletions

View File

@ -7,6 +7,9 @@ import org.springframework.web.bind.annotation.*;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
/**
* @author 帅气的布里茨
*/
@Controller @Controller
@RequestMapping("/hs") @RequestMapping("/hs")
public class HSController { public class HSController {
@ -14,7 +17,7 @@ public class HSController {
@Autowired @Autowired
HSService hsService; HSService hsService;
//登录验证 /**登录验证*/
@RequestMapping(value = "/login", method = {RequestMethod.POST, RequestMethod.GET}) @RequestMapping(value = "/login", method = {RequestMethod.POST, RequestMethod.GET})
@ResponseBody @ResponseBody
public Map<String,Object> hello(@RequestBody Map<String,Object> param) { public Map<String,Object> hello(@RequestBody Map<String,Object> param) {
@ -23,7 +26,7 @@ public class HSController {
return result; return result;
} }
//注册 /**注册*/
@RequestMapping(value = "/register", method = {RequestMethod.POST,RequestMethod.GET}) @RequestMapping(value = "/register", method = {RequestMethod.POST,RequestMethod.GET})
@ResponseBody @ResponseBody
public Map<String,Object> register(@RequestBody Map<String,Object> param) { public Map<String,Object> register(@RequestBody Map<String,Object> param) {
@ -32,16 +35,15 @@ public class HSController {
return result; return result;
} }
//获取首页内容 /**获取首页内容*/
@RequestMapping(value = "/getAllContent", method = {RequestMethod.POST,RequestMethod.GET}) @RequestMapping(value = "/getAllContent", method = {RequestMethod.POST,RequestMethod.GET})
@ResponseBody @ResponseBody
public Map<String,Object> getAllContent(@RequestBody Map<String,Object> param) { public Map<String,Object> getAllContent(@RequestBody Map<String,Object> param) {
Map<String,Object> result = new HashMap<>(); Map<String,Object> result = hsService.getAllContent(param);
result = hsService.getAllContent(param);
return result; return result;
} }
//获取一条数据具体内容 /**获取一条数据具体内容*/
@RequestMapping(value = "/getOneContent", method = {RequestMethod.POST,RequestMethod.GET}) @RequestMapping(value = "/getOneContent", method = {RequestMethod.POST,RequestMethod.GET})
@ResponseBody @ResponseBody
public Map<String,Object> getOneContent(@RequestBody Map<String,Object> param) { public Map<String,Object> getOneContent(@RequestBody Map<String,Object> param) {
@ -49,7 +51,7 @@ public class HSController {
return result; return result;
} }
//查询某些条件数据 /**查询某些条件数据*/
@RequestMapping(value = "/getListByAttribute", method = {RequestMethod.POST,RequestMethod.GET}) @RequestMapping(value = "/getListByAttribute", method = {RequestMethod.POST,RequestMethod.GET})
@ResponseBody @ResponseBody
public Map<String,Object> getListByAttribute(@RequestBody Map<String,Object> param) { public Map<String,Object> getListByAttribute(@RequestBody Map<String,Object> param) {
@ -57,7 +59,7 @@ public class HSController {
return result; return result;
} }
//新增留言 /**新增留言*/
@RequestMapping(value = "/addMessage", method = {RequestMethod.POST,RequestMethod.GET}) @RequestMapping(value = "/addMessage", method = {RequestMethod.POST,RequestMethod.GET})
@ResponseBody @ResponseBody
public Map<String,Object> addMessage(@RequestBody Map<String,Object> param) { public Map<String,Object> addMessage(@RequestBody Map<String,Object> param) {
@ -65,7 +67,7 @@ public class HSController {
return result; return result;
} }
//新增一条数据 /**新增一条数据*/
@RequestMapping(value = "/addArticle", method = {RequestMethod.POST,RequestMethod.GET}) @RequestMapping(value = "/addArticle", method = {RequestMethod.POST,RequestMethod.GET})
@ResponseBody @ResponseBody
public Map<String,Object> addArticle(@RequestBody Map<String,Object> param) { public Map<String,Object> addArticle(@RequestBody Map<String,Object> param) {
@ -73,7 +75,7 @@ public class HSController {
return result; return result;
} }
//新增一条班级通知 /**新增一条班级通知*/
@RequestMapping(value = "/addClassNotice", method = {RequestMethod.POST,RequestMethod.GET}) @RequestMapping(value = "/addClassNotice", method = {RequestMethod.POST,RequestMethod.GET})
@ResponseBody @ResponseBody
public Map<String,Object> addClassNotice(@RequestBody Map<String,Object> param) { public Map<String,Object> addClassNotice(@RequestBody Map<String,Object> param) {
@ -81,7 +83,7 @@ public class HSController {
return result; return result;
} }
//获取班级信息 /**获取班级信息*/
@RequestMapping(value = "/getClassInfo", method = {RequestMethod.POST,RequestMethod.GET}) @RequestMapping(value = "/getClassInfo", method = {RequestMethod.POST,RequestMethod.GET})
@ResponseBody @ResponseBody
public Map<String,Object> getClassInfo(@RequestBody Map<String,Object> param) { public Map<String,Object> getClassInfo(@RequestBody Map<String,Object> param) {
@ -89,7 +91,7 @@ public class HSController {
return result; return result;
} }
//新增班级公告 /**新增班级公告*/
@RequestMapping(value = "/addBulletin", method = {RequestMethod.POST,RequestMethod.GET}) @RequestMapping(value = "/addBulletin", method = {RequestMethod.POST,RequestMethod.GET})
@ResponseBody @ResponseBody
public Map<String,Object> addBulletin(@RequestBody Map<String,Object> param) { public Map<String,Object> addBulletin(@RequestBody Map<String,Object> param) {
@ -97,7 +99,7 @@ public class HSController {
return result; return result;
} }
//修改班级公告 /**修改班级公告*/
@RequestMapping(value = "/updateBulletin", method = {RequestMethod.POST,RequestMethod.GET}) @RequestMapping(value = "/updateBulletin", method = {RequestMethod.POST,RequestMethod.GET})
@ResponseBody @ResponseBody
public Map<String,Object> updateBulletin(@RequestBody Map<String,Object> param) { public Map<String,Object> updateBulletin(@RequestBody Map<String,Object> param) {
@ -105,7 +107,7 @@ public class HSController {
return result; return result;
} }
//修改密码 /**修改密码*/
@RequestMapping(value = "/updatePassword", method = {RequestMethod.POST,RequestMethod.GET}) @RequestMapping(value = "/updatePassword", method = {RequestMethod.POST,RequestMethod.GET})
@ResponseBody @ResponseBody
public Map<String,Object> updatePassword(@RequestBody Map<String,Object> param) { public Map<String,Object> updatePassword(@RequestBody Map<String,Object> param) {
@ -113,7 +115,7 @@ public class HSController {
return result; return result;
} }
//编辑一条数据具体内容 /**编辑一条数据具体内容*/
@RequestMapping(value = "/updateOneContent", method = {RequestMethod.POST,RequestMethod.GET}) @RequestMapping(value = "/updateOneContent", method = {RequestMethod.POST,RequestMethod.GET})
@ResponseBody @ResponseBody
public Map<String,Object> updateOneContent(@RequestBody Map<String,Object> param) { public Map<String,Object> updateOneContent(@RequestBody Map<String,Object> param) {
@ -121,7 +123,7 @@ public class HSController {
return result; return result;
} }
//删除一条数据 /**删除一条数据*/
@RequestMapping(value = "/deleteOne", method = {RequestMethod.POST,RequestMethod.GET}) @RequestMapping(value = "/deleteOne", method = {RequestMethod.POST,RequestMethod.GET})
@ResponseBody @ResponseBody
public Map<String,Object> deleteOne(@RequestBody Map<String,Object> param) { public Map<String,Object> deleteOne(@RequestBody Map<String,Object> param) {
@ -129,7 +131,7 @@ public class HSController {
return result; return result;
} }
//删除一条留言 /**删除一条留言*/
@RequestMapping(value = "/deleteOneMessage", method = {RequestMethod.POST,RequestMethod.GET}) @RequestMapping(value = "/deleteOneMessage", method = {RequestMethod.POST,RequestMethod.GET})
@ResponseBody @ResponseBody
public Map<String,Object> deleteOneMessage(@RequestBody Map<String,Object> param) { public Map<String,Object> deleteOneMessage(@RequestBody Map<String,Object> param) {
@ -137,7 +139,7 @@ public class HSController {
return result; return result;
} }
//获取个人信息 /**获取个人信息*/
@RequestMapping(value = "/getPersonalInfo", method = {RequestMethod.POST,RequestMethod.GET}) @RequestMapping(value = "/getPersonalInfo", method = {RequestMethod.POST,RequestMethod.GET})
@ResponseBody @ResponseBody
public Map<String,Object> getPersonalInfo(@RequestBody Map<String,Object> param) { public Map<String,Object> getPersonalInfo(@RequestBody Map<String,Object> param) {
@ -145,7 +147,7 @@ public class HSController {
return result; return result;
} }
//获取个人私信 /**获取个人私信*/
@RequestMapping(value = "/getPersonalPrivateLetter", method = {RequestMethod.POST,RequestMethod.GET}) @RequestMapping(value = "/getPersonalPrivateLetter", method = {RequestMethod.POST,RequestMethod.GET})
@ResponseBody @ResponseBody
public Map<String,Object> getPersonalPrivateLetter(@RequestBody Map<String,Object> param) { public Map<String,Object> getPersonalPrivateLetter(@RequestBody Map<String,Object> param) {
@ -153,7 +155,7 @@ public class HSController {
return result; return result;
} }
//阅读私信 /**阅读私信*/
@RequestMapping(value = "/readPrivateLetter", method = {RequestMethod.POST,RequestMethod.GET}) @RequestMapping(value = "/readPrivateLetter", method = {RequestMethod.POST,RequestMethod.GET})
@ResponseBody @ResponseBody
public Map<String,Object> readPrivateLetter(@RequestBody Map<String,Object> param) { public Map<String,Object> readPrivateLetter(@RequestBody Map<String,Object> param) {
@ -161,7 +163,7 @@ public class HSController {
return result; return result;
} }
//发送私信 /**发送私信*/
@RequestMapping(value = "/sendLetter", method = {RequestMethod.POST,RequestMethod.GET}) @RequestMapping(value = "/sendLetter", method = {RequestMethod.POST,RequestMethod.GET})
@ResponseBody @ResponseBody
public Map<String,Object> sendLetter(@RequestBody Map<String,Object> param) { public Map<String,Object> sendLetter(@RequestBody Map<String,Object> param) {
@ -169,7 +171,7 @@ public class HSController {
return result; return result;
} }
//删除一条私信 /**删除一条私信*/
@RequestMapping(value = "/deleteLetter", method = {RequestMethod.POST,RequestMethod.GET}) @RequestMapping(value = "/deleteLetter", method = {RequestMethod.POST,RequestMethod.GET})
@ResponseBody @ResponseBody
public Map<String,Object> deleteLetter(@RequestBody Map<String,Object> param) { public Map<String,Object> deleteLetter(@RequestBody Map<String,Object> param) {

View File

@ -10,7 +10,7 @@
<!--注册--> <!--注册-->
<insert id="register" parameterType="map"> <insert id="register" parameterType="map">
INSERT INTO hs_user ( user_id, pass_word,real_name, mobile, user_type, creat_time, frozen_state, error_times) INSERT INTO hs_user ( user_id, pass_word,real_name, mobile, user_type, create_time, frozen_state, error_times)
VALUES VALUES
( (
uuid(), uuid(),

View File

@ -5,6 +5,9 @@ import org.springframework.web.bind.annotation.RequestBody;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
/**
* @author 帅气的布里茨
*/
public interface HSService { public interface HSService {
/** /**