package com.controller;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.format.annotation.DateTimeFormat;
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.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.annotation.SysLog;
import com.entity.ZufangqianyueEntity;
import com.entity.view.ZufangqianyueView;
import com.service.ZufangqianyueService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MPUtil;
import com.utils.MapUtils;
import com.utils.CommonUtil;
import java.io.IOException;
/**
* 租房签约
* 后端接口
* @author
* @email
* @date 2024-04-16 16:16:14
*/
@RestController
@RequestMapping("/zufangqianyue")
public class ZufangqianyueController {
@Autowired
private ZufangqianyueService zufangqianyueService;
/**
* 后台列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,ZufangqianyueEntity zufangqianyue,
@RequestParam(required = false) @DateTimeFormat(pattern="yyyy-MM-dd") Date qianyueshijianstart,
@RequestParam(required = false) @DateTimeFormat(pattern="yyyy-MM-dd") Date qianyueshijianend,
HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("fangdong")) {
zufangqianyue.setFangdongzhanghao((String)request.getSession().getAttribute("username"));
}
if(tableName.equals("yonghu")) {
zufangqianyue.setYonghuzhanghao((String)request.getSession().getAttribute("username"));
}
EntityWrapper<ZufangqianyueEntity> ew = new EntityWrapper<ZufangqianyueEntity>();
if(qianyueshijianstart!=null) ew.ge("qianyueshijian", qianyueshijianstart);
if(qianyueshijianend!=null) ew.le("qianyueshijian", qianyueshijianend);
PageUtils page = zufangqianyueService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, zufangqianyue), params), params));
return R.ok().put("data", page);
}
/**
* 前台列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,ZufangqianyueEntity zufangqianyue,
@RequestParam(required = false) @DateTimeFormat(pattern="yyyy-MM-dd") Date qianyueshijianstart,
@RequestParam(required = false) @DateTimeFormat(pattern="yyyy-MM-dd") Date qianyueshijianend,
HttpServletRequest request){
EntityWrapper<ZufangqianyueEntity> ew = new EntityWrapper<ZufangqianyueEntity>();
if(qianyueshijianstart!=null) ew.ge("qianyueshijian", qianyueshijianstart);
if(qianyueshijianend!=null) ew.le("qianyueshijian", qianyueshijianend);
PageUtils page = zufangqianyueService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, zufangqianyue), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( ZufangqianyueEntity zufangqianyue){
EntityWrapper<ZufangqianyueEntity> ew = new EntityWrapper<ZufangqianyueEntity>();
ew.allEq(MPUtil.allEQMapPre( zufangqianyue, "zufangqianyue"));
return R.ok().put("data", zufangqianyueService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(ZufangqianyueEntity zufangqianyue){
EntityWrapper< ZufangqianyueEntity> ew = new EntityWrapper< ZufangqianyueEntity>();
ew.allEq(MPUtil.allEQMapPre( zufangqianyue, "zufangqianyue"));
ZufangqianyueView zufangqianyueView = zufangqianyueService.selectView(ew);
return R.ok("查询租房签约成功").put("data", zufangqianyueView);
}
/**
* 后台详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
ZufangqianyueEntity zufangqianyue = zufangqianyueService.selectById(id);
return R.ok().put("data", zufangqianyue);
}
/**
* 前台详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
ZufangqianyueEntity zufangqianyue = zufangqianyueService.selectById(id);
return R.ok().put("data", zufangqianyue);
}
/**
* 后台保存
*/
@RequestMapping("/save")
@SysLog("新增租房签约")
public R save(@RequestBody ZufangqianyueEntity zufangqianyue, HttpServletRequest request){
//ValidatorUtils.validateEntity(zufangqianyue);
zufangqianyueService.insert(zufangqianyue);
return R.ok();
}
/**
* 前台保存
*/
@SysLog("新增租房签约")
@RequestMapping("/add")
public R add(@RequestBody ZufangqianyueEntity zufangqianyue, HttpServletRequest request){
//ValidatorUtils.validateEntity(zufangqianyue);
zufangqianyueService.insert(zufangqianyue);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
@Transactional
@SysLog("修改租房签约")
public R update(@RequestBody ZufangqianyueEntity zufangqianyue, HttpServletRequest request){
//ValidatorUtils.validateEntity(zufangqianyue);
zufangqianyueService.updateById(zufangqianyue);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
@SysLog("删除租房签约")
public R delete(@RequestBody Long[] ids){
zufangqianyueService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
* 提醒接口
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
Wrapper<ZufangqianyueEntity> wrapper = new EntityWrapper<ZufangqianyueEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
String tableNam
没有合适的资源?快使用搜索试试~ 我知道了~
【java毕业设计】SpringBoot的房屋租赁系统设计与实现(springboot+vue+mysql+说明文档).zip
共564个文件
java:200个
jpg:105个
vue:73个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 36 浏览量
2024-11-09
13:39:22
上传
评论
收藏 26.89MB ZIP 举报
温馨提示
项目经过测试均可完美运行! 环境说明: 开发语言:java jdk:jdk1.8 数据库:mysql 5.7+ 数据库工具:Navicat11+ 管理工具:maven 开发工具:idea/eclipse
资源推荐
资源详情
资源评论
收起资源包目录
【java毕业设计】SpringBoot的房屋租赁系统设计与实现(springboot+vue+mysql+说明文档).zip (564个子文件)
main.js.bak 2KB
3-build.bat 15B
2-run.bat 14B
build.bat 14B
run.bat 14B
1-install.bat 12B
install.bat 12B
.classpath 2KB
mvnw.cmd 7KB
app.e8c346e2.css 562KB
chunk-vendors.1622b503.css 312KB
app.aeffa1d9.css 294KB
chunk-vendors.1f0a25b2.css 37KB
swiper.min.css 13KB
swiper.min.css 13KB
iconfont.css 622B
canvas-bg-1.css 391B
canvas-bg-2.css 83B
canvas-bg-3.css 61B
.factorypath 15KB
.gitignore 364B
index.html 1KB
index.html 1KB
index.html 1KB
index.html 983B
favicon.ico 4KB
favicon.ico 4KB
favicon.ico 4KB
favicon.ico 4KB
maven-wrapper.jar 50KB
ZufangqianyueController.java 16KB
TuifangpingjiaController.java 14KB
RemenfangwuController.java 11KB
BaiduUtil.java 9KB
NewsController.java 9KB
CommonController.java 9KB
FangdongController.java 9KB
YonghuController.java 9KB
EncryptUtil.java 8KB
RemenfangwuEntity.java 8KB
ForumController.java 8KB
ZufangqianyueEntity.java 7KB
ChatmessageController.java 7KB
DiscussremenfangwuController.java 7KB
TuifangxinxiController.java 7KB
YuyuekanfangEntity.java 7KB
SystemintroController.java 7KB
MessagesController.java 7KB
StoreupController.java 7KB
FriendController.java 7KB
RemenfangwuModel.java 6KB
NewstypeController.java 6KB
SyslogController.java 6KB
MPUtil.java 6KB
RemenfangwuVO.java 6KB
ZufangqianyueModel.java 6KB
YuyuekanfangController.java 6KB
GuzhangbaoxiuController.java 6KB
ZufangqianyueVO.java 6KB
FangwuleixingController.java 6KB
YuyuekanfangModel.java 6KB
TuifangxinxiEntity.java 6KB
TuifangpingjiaEntity.java 5KB
YuyuekanfangVO.java 5KB
UsersController.java 5KB
GuzhangbaoxiuEntity.java 5KB
NewsEntity.java 5KB
MavenWrapperDownloader.java 5KB
TuifangxinxiModel.java 4KB
ForumEntity.java 4KB
FileController.java 4KB
TuifangpingjiaModel.java 4KB
YonghuEntity.java 4KB
TuifangxinxiVO.java 4KB
CommonUtil.java 4KB
TuifangpingjiaVO.java 4KB
FangdongEntity.java 4KB
GuzhangbaoxiuModel.java 4KB
NewsModel.java 4KB
GuzhangbaoxiuVO.java 4KB
FriendEntity.java 4KB
StoreupEntity.java 4KB
NewsVO.java 4KB
MessagesEntity.java 4KB
AuthorizationInterceptor.java 3KB
DiscussremenfangwuEntity.java 3KB
SyslogEntity.java 3KB
SystemintroEntity.java 3KB
ConfigController.java 3KB
ChatmessageEntity.java 3KB
YonghuModel.java 3KB
ForumModel.java 3KB
YonghuVO.java 3KB
HttpClientUtils.java 3KB
ForumVO.java 3KB
FangdongModel.java 3KB
SysLogAspect.java 3KB
TuifangpingjiaServiceImpl.java 3KB
Query.java 3KB
ZufangqianyueServiceImpl.java 3KB
共 564 条
- 1
- 2
- 3
- 4
- 5
- 6
资源评论
计算机学长阿伟
- 粉丝: 3196
- 资源: 849
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 5G模组升级刷模块救砖以及5G模组资料路由器固件
- C183579-123578-c1235789.jpg
- Qt5.14 绘画板 Qt Creator C++项目
- python实现Excel表格合并
- Java实现读取Excel批量发送邮件.zip
- 【java毕业设计】商城后台管理系统源码(springboot+vue+mysql+说明文档).zip
- 【java毕业设计】开发停车位管理系统(调用百度地图API)源码(springboot+vue+mysql+说明文档).zip
- 星耀软件库(升级版).apk.1
- 基于Django后端和Vue前端的多语言购物车项目设计源码
- 基于Python与Vue的浮光在线教育平台源码设计
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功