Springboot+vue二手房交易管理系统,项目用mybatis与数据库,数据库为mysql,16个表结构。有问题直接加我询问,我会一直在线哒。
功能如下:
房东管理
用户管理
房源信息管理(可预约和查看评论)
看房预约管理
房型管理
支付管理
合同管理
城市管理
日常收费管理
系统公告,轮播图,公告分类管理
前台可登录用户和房东
后台可登录管理员。
部分数据库设计
discussfangyuanxinxi 评论信息
fangyuanxinxi 房源信息
用户表
部分代码设计:
package com.controller;import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.util.List;
import javax.servlet.http.HttpServletRequest;import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.annotation.IgnoreAuth;import com.entity.KanfangyuyueEntity;
import com.entity.view.KanfangyuyueView;import com.service.KanfangyuyueService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MPUtil;/*** 看房预约* 后端接口*/
@RestController
@RequestMapping("/kanfangyuyue")
public class KanfangyuyueController {@Autowiredprivate KanfangyuyueService kanfangyuyueService;/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params, KanfangyuyueEntity kanfangyuyue, HttpServletRequest request) {String tableName = request.getSession().getAttribute("tableName").toString();if (tableName.equals("yonghu")) {kanfangyuyue.setYonghuzhanghao((String) request.getSession().getAttribute("username"));}if (tableName.equals("fangdong")) {kanfangyuyue.setFangdongzhanghao((String) request.getSession().getAttribute("username"));}EntityWrapper<KanfangyuyueEntity> ew = new EntityWrapper<KanfangyuyueEntity>();PageUtils page = kanfangyuyueService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, kanfangyuyue), params), params));return R.ok().put("data", page);}/*** 前端列表*/@IgnoreAuth@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params, KanfangyuyueEntity kanfangyuyue, HttpServletRequest request) {EntityWrapper<KanfangyuyueEntity> ew = new EntityWrapper<KanfangyuyueEntity>();PageUtils page = kanfangyuyueService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, kanfangyuyue), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/lists")public R list(KanfangyuyueEntity kanfangyuyue) {EntityWrapper<KanfangyuyueEntity> ew = new EntityWrapper<KanfangyuyueEntity>();ew.allEq(MPUtil.allEQMapPre(kanfangyuyue, "kanfangyuyue"));return R.ok().put("data", kanfangyuyueService.selectListView(ew));}/*** 查询*/@RequestMapping("/query")public R query(KanfangyuyueEntity kanfangyuyue) {EntityWrapper<KanfangyuyueEntity> ew = new EntityWrapper<KanfangyuyueEntity>();ew.allEq(MPUtil.allEQMapPre(kanfangyuyue, "kanfangyuyue"));KanfangyuyueView kanfangyuyueView = kanfangyuyueService.selectView(ew);return R.ok("查询看房预约成功").put("data", kanfangyuyueView);}/*** 后端详情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id) {KanfangyuyueEntity kanfangyuyue = kanfangyuyueService.selectById(id);return R.ok().put("data", kanfangyuyue);}/*** 前端详情*/@IgnoreAuth@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id) {KanfangyuyueEntity kanfangyuyue = kanfangyuyueService.selectById(id);return R.ok().put("data", kanfangyuyue);}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody KanfangyuyueEntity kanfangyuyue, HttpServletRequest request) {kanfangyuyueService.insert(kanfangyuyue);return R.ok();}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody KanfangyuyueEntity kanfangyuyue, HttpServletRequest request) {kanfangyuyueService.insert(kanfangyuyue);return R.ok();}/*** 修改*/@RequestMapping("/update")@Transactionalpublic R update(@RequestBody KanfangyuyueEntity kanfangyuyue, HttpServletRequest request) {kanfangyuyueService.updateById(kanfangyuyue);//全部更新return R.ok();}/*** 审核*/@RequestMapping("/shBatch")@Transactionalpublic R update(@RequestBody Long[] ids, @RequestParam String sfsh, @RequestParam String shhf) {List<KanfangyuyueEntity> list = new ArrayList<KanfangyuyueEntity>();for (Long id : ids) {KanfangyuyueEntity kanfangyuyue = kanfangyuyueService.selectById(id);kanfangyuyue.setSfsh(sfsh);kanfangyuyue.setShhf(shhf);list.add(kanfangyuyue);}kanfangyuyueService.updateBatchById(list);return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids) {kanfangyuyueService.deleteBatchIds(Arrays.asList(ids));return R.ok();}
}
需要私聊我