源码获取:博客首页 "资源" 里下载!一、项目简述
本系统功能包括: 微信小程序物业管理系统,微信朝胞括以下几个模 块: 社区公告、报修、信息采集、生活缴费、二手置换 微信小程序后台管理界面可以增删改查社区公告、问卷、 问卷问题、问题选项等 在微信小程序前端,用户提交信息后,可在我的界面查看 提交的信息,管理员可以在微信小程序后台管理界面查看 所有用户提交的信息。
二、项目运行
环境配置: jdk8+tomcat8+mysql5.7+lntelliJ IDEA+maven( Eclispe ,sts myEclispe 都支持)
【Java毕业设计项目实战篇|Java项目:(小程序)物业管理系统(spring+spring mvc+mybatis+layui+微信小程)】项目技术: spring+spring mvc+mybatis+layui等等。
文章图片
文章图片
文章图片
文章图片
文章图片
文章图片
商品信息控制层:
@Controller
public class GoodsController {
@Autowired
GoodsService goodsService;
@ResponseBody
@RequestMapping(value = "https://www.it610.com/findAllGoodsByPages",produces="application/json;
charset=UTF-8")
public String findAllGoodsByPages(@RequestParam("limit") String limit, @RequestParam("page") String page){
int start = (Integer.parseInt(page) - 1)*Integer.parseInt(limit);
int pageSize = Integer.parseInt(limit);
List goods = goodsService.findAllGoodsByPages(start,pageSize);
List goodsAll = goodsService.findAllGoods();
Layui l = Layui.data(goodsAll.size(), goods);
String result = JSON.toJSONString(l);
System.out.println(result);
return result;
}@ResponseBody
@RequestMapping(value = "https://www.it610.com/deleteGoodsById")
public String deleteGoodsById(@RequestParam("goods_id") String goods_id){
int n = goodsService.deleteGoodsById(goods_id);
if(n>0){
return "success";
}
return "failure";
}@ResponseBody
@RequestMapping(value = "https://www.it610.com/updateGoodsById")
public String updateGoodsById(@RequestBody Map map){
Date date = new Date();
map.put("publish_time",date);
System.out.println("map:"+map.toString());
int n = goodsService.updateGoodsById(map);
if(n>0){
return "success";
}
return "failure";
}@ResponseBody
@RequestMapping(value = "https://www.it610.com/insertGoods")
public String insertGoods(@RequestBody Map map){
Date date = new Date();
map.put("publish_time",date);
String goods_id = RandNum.getGUID();
map.put("goods_id",goods_id);
System.out.println("map:"+map.toString());
int n = goodsService.insertGoods(map);
if(n>0){
return "success";
}
return "failure";
}
}
管理员控制层:
@Controller
public class AdminController {
@Autowired
AdminService adminService;
@ResponseBody
@RequestMapping("/login")
public String findOneAdmin(String account, String pwd, HttpServletRequest request ){
HttpSession session = request.getSession(true);
//新建session对象
Admin admin = adminService.findOneAdmin(account,pwd);
session.setAttribute("admin",admin);
if(admin!=null){
return "success";
}
return "failure";
}@ResponseBody
@RequestMapping(value = "https://www.it610.com/findAllAccount",produces="application/json;
charset=UTF-8")
public String findAllAccount(){
List accounts = adminService.findAllAccount();
String result = JSON.toJSONString(accounts);
System.out.println(result);
return result;
}@ResponseBody
@RequestMapping(value = "https://www.it610.com/updateAdminPwd" )
public String updateAdminPwd(@RequestBody Map map, HttpServletRequest request){
HttpSession session = request.getSession(true);
//新建session对象
Admin admin = (Admin) session.getAttribute("admin");
//将对应数据存入session中
String account = admin.getAccount();
System.out.println(map);
String pwd = map.get("pwd").toString();
System.out.println("pwd:"+pwd);
int n = adminService.updateAdminPwd(pwd,account);
if(n>0){
return "success";
}
return "failure";
}}
调查管理控制层:
@Controller
public class SurveyController {
@Autowired
SurveyService surveyService;
@ResponseBody
@RequestMapping(value = "https://www.it610.com/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 surveys = surveyService.findAllSurveyByPage(start,pageSize);
List surveyAll = surveyService.findAllSurvey();
Layui l = Layui.data(surveyAll.size(), surveys);
String result = JSON.toJSONString(l);
return result;
}@ResponseBody
@RequestMapping(value = "https://www.it610.com/findAllSurvey",produces="application/json;
charset=UTF-8")
public String findAllSurvey() {
List surveys = surveyService.findAllSurvey();
String result = JSON.toJSONString(surveys);
return result;
}@ResponseBody
@RequestMapping(value = "https://www.it610.com/insertSurvey")
public String insertSurvey(@RequestBody Map map) {
int n = surveyService.insertSurvey(map);
if(n>0){
return "success";
}
return "failure";
}@ResponseBody
@RequestMapping(value = "https://www.it610.com/deleteSurveyById")
public String deleteSurveyById(@RequestParam("id")String id) {
int n = surveyService.deleteSurveyById(Integer.parseInt(id));
if(n>0){
return "success";
}
return "failure";
}@ResponseBody
@RequestMapping(value = "https://www.it610.com/updateSurveyById")
public String updateSurveyById(@RequestBody Map map) {
int n = surveyService.updateSurveyById(map);
if(n>0){
return "success";
}
return "failure";
}}
源码获取:博客首页 "资源" 里下载!
推荐阅读
- Java|跳槽来的00后真是卷王,起薪18k都快赶上我了
- java|全网首发阿里内部Spring Security项目实战搭建
- Java|Java基础——数组
- 人工智能|干货!人体姿态估计与运动预测
- java简介|Java是什么(Java能用来干什么?)
- Java|规范的打印日志
- Linux|109 个实用 shell 脚本
- 程序员|【高级Java架构师系统学习】毕业一年萌新的Java大厂面经,最新整理
- Spring注解驱动第十讲--@Autowired使用