基于javaweb的SSM+Maven微信小程序社区物业管理系统(java+ssm+maven+wechat)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

241523330309

251523330309

261523330309

281523330309

291523330309

301523330309

311523330309

321523330309

331523330309

基于javaweb的SSM+Maven微信小程序社区物业管理系统(java+ssm+maven+wechat)

/SheQu

管理端:
admin 123456

小程序端:
18973675640 123456
13986544321 123456
18982673654 123456

小程序对后端的请求根路径为:http://localhost:8080/SheQu

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41



@Controller
public class Sur_QueController {
@Autowired
Sur_QueService sur_queService;

@ResponseBody
@RequestMapping(value = "/findAllSur_QueByPage",produces="application/json;charset=UTF-8")
public String findAllSurveyByPage(@RequestParam("limit") String limit, @RequestParam("page") String page) {
int start = (Integer.parseInt(page) - 1)*Integer.parseInt(limit);
int pageSize = Integer.parseInt(limit);
List<Sur_Que> sur_ques = sur_queService.findAllSur_QueByPage(start,pageSize);
List<Sur_Que> sur_queAll = sur_queService.findAllSur_Que();
Layui l = Layui.data(sur_queAll.size(), sur_ques);
String result = JSON.toJSONString(l);
return result;
}

@ResponseBody
@RequestMapping(value = "/deleteSur_QueById")
public String deleteSur_QueById(@RequestParam("id")String id) {
int n = sur_queService.deleteSur_QueById(Integer.parseInt(id));
if(n>0){
return "success";
}
return "failure";
}

@ResponseBody
@RequestMapping(value = "/insertSur_Que")
public String insertSur_Que(@RequestBody Map map) {
int n = sur_queService.insertSur_Que(map);
if(n>0){
return "success";
}
return "failure";
}

@ResponseBody
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46



@Controller
public class QuestionController {
@Autowired
QuestionService questionService;

@ResponseBody
@RequestMapping(value = "/findAllQuestionsByPage",produces="application/json;charset=UTF-8")
public String findAllQuestionsByPage(@RequestParam("limit") String limit, @RequestParam("page") String page) {
int start = (Integer.parseInt(page) - 1)*Integer.parseInt(limit);
int pageSize = Integer.parseInt(limit);
List<Question> questions = questionService.findAllQuestionsByPage(start,pageSize);
List<Question> questionsAll = questionService.findAllQuestions();
Layui l = Layui.data(questionsAll.size(), questions);
String result = JSON.toJSONString(l);
return result;
}

@ResponseBody
@RequestMapping(value = "/findAllQuestions",produces="application/json;charset=UTF-8")
public String findAllQuestions() {
List<Question> questions = questionService.findAllQuestions();
String result = JSON.toJSONString(questions);
return result;
}

@ResponseBody
@RequestMapping(value = "/insertQuestion")
public String insertQuestion(@RequestBody Map map) {
int n = questionService.insertQuestion(map);
if(n>0){
return "success";
}
return "failure";
}

@ResponseBody
@RequestMapping(value = "/deleteQuestionById")
public String deleteQuestionById(@RequestParam("id")String id) {
int n = questionService.deleteQuestionById(Integer.parseInt(id));
if(n>0){
return "success";
}
return "failure";
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
        int n = sur_queService.updateSur_QueById(map);
if(n>0){
return "success";
}
return "failure";
}

}




@Controller
public class SurveyController {
@Autowired
SurveyService surveyService;

@ResponseBody
@RequestMapping(value = "/findAllSurveyByPage",produces="application/json;charset=UTF-8")
public String findAllSurveyByPage(@RequestParam("limit") String limit, @RequestParam("page") String page) {
int start = (Integer.parseInt(page) - 1)*Integer.parseInt(limit);
int pageSize = Integer.parseInt(limit);
List<Survey> surveys = surveyService.findAllSurveyByPage(start,pageSize);
List<Survey> surveyAll = surveyService.findAllSurvey();
Layui l = Layui.data(surveyAll.size(), surveys);
String result = JSON.toJSONString(l);
return result;
}

@ResponseBody
@RequestMapping(value = "/findAllSurvey",produces="application/json;charset=UTF-8")
public String findAllSurvey() {
List<Survey> surveys = surveyService.findAllSurvey();
String result = JSON.toJSONString(surveys);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43


@Controller
public class UserApi {
@Autowired
UserService userService;

/*
微信小程序端提供json接口的。显示社区公告数据
*/
@ResponseBody
@RequestMapping(value = "/registerUser",method = RequestMethod.POST)
public String RegisterUser(@RequestBody Map map){
System.out.println(map.toString());
map.put("uid", RandNum.getGUID());
int n = userService.insertUser(map);
if(n>0){
return "success";
}
return "failure";
}

@ResponseBody
@RequestMapping(value = "/userLogin",method = RequestMethod.POST)
public String userLogin(@RequestBody Map map){
System.out.println(map.toString());
String uid = userService.findUidByPNumAndPwd(map);
if(uid!=null){
return uid;
}
return "failure";
}

@ResponseBody
@RequestMapping(value = "/myUsername",method = RequestMethod.POST)
public String userName(@RequestBody Map map){
String name = userService.findNameByNumAndPwd(map);
if (name != null){
return name;
}
return "failure";
}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43


@Controller
public class MessageController {
@Autowired
MessageService messageService;


@ResponseBody
@RequestMapping(value = "/findAllMessageByPage",produces="application/json;charset=UTF-8")
public String findAllMessageByPage(@RequestParam("limit") String limit, @RequestParam("page") String page){
int start = (Integer.parseInt(page) - 1)*Integer.parseInt(limit);
int pageSize = Integer.parseInt(limit);
List<Message> message = messageService.findAllMessageByPage(start,pageSize);
List<Message> messageAll = messageService.findAllMessage();
Layui l = Layui.data(messageAll.size(), message);
String result = JSON.toJSONString(l);
return result;
}

@ResponseBody
@RequestMapping(value = "/insertMessage")
public String insertMessage(@RequestBody Map map){
Date date = new Date();
map.put("time",date);
System.out.println("map:"+map.toString());
int n = messageService.insertMessage(map);
if(n>0){
return "success";
}
return "failure";
}

@ResponseBody
@RequestMapping(value = "/deleteNotices")
public String deleteNotices(@RequestParam("id") int id){
int n = messageService.deleteNotices(id);
if(n>0){
return "success";
}
return "failure";
}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32



@Controller
public class MessageController {
@Autowired
MessageService messageService;


@ResponseBody
@RequestMapping(value = "/findAllMessageByPage",produces="application/json;charset=UTF-8")
public String findAllMessageByPage(@RequestParam("limit") String limit, @RequestParam("page") String page){
int start = (Integer.parseInt(page) - 1)*Integer.parseInt(limit);
int pageSize = Integer.parseInt(limit);
List<Message> message = messageService.findAllMessageByPage(start,pageSize);
List<Message> messageAll = messageService.findAllMessage();
Layui l = Layui.data(messageAll.size(), message);
String result = JSON.toJSONString(l);
return result;
}

@ResponseBody
@RequestMapping(value = "/insertMessage")
public String insertMessage(@RequestBody Map map){
Date date = new Date();
map.put("time",date);
System.out.println("map:"+map.toString());
int n = messageService.insertMessage(map);
if(n>0){
return "success";
}
return "failure";


项目链接:
https://javayms.github.io?id=231523330309201dn
https://javayms.pages.dev?id=231523330309201dn