当前位置: 首页 > news >正文

交河做网站263企业邮箱登陆入囗

交河做网站,263企业邮箱登陆入囗,微信开发者账号,常见的网站布局结构【尚庭公寓SpringBoot Vue 项目实战】预约看房与租约管理#xff08;完结#xff09; 文章目录 【尚庭公寓SpringBoot Vue 项目实战】预约看房与租约管理#xff08;完结#xff09;1、业务说明2、接口开发2.1、预约看房管理2.1.1.保存或更新看房预约2.1.2. 查询个人预约…【尚庭公寓SpringBoot Vue 项目实战】预约看房与租约管理完结 文章目录 【尚庭公寓SpringBoot Vue 项目实战】预约看房与租约管理完结1、业务说明2、接口开发2.1、预约看房管理2.1.1.保存或更新看房预约2.1.2. 查询个人预约看房列表2.1.3. 根据ID查询预约详情信息 2.2、租约管理2.2.1. 获取个人租约基本信息列表2.2.2. 根据ID获取租约详细信息2.2.3. 根据ID更新租约状态2.2.4. 保存或更新租约2.2.5. 根据房间ID获取可选支付方式2.2.6.根据房间ID获取可选租期 1、业务说明 预约看房管理共需三个接口分别是保存或更新看房预约、查询个人预约列表和根据ID查询预约详情信息 租约管理共有六个接口分别是获取个人租约基本信息列表**、**根据ID获取租约详细信息、根据ID更新租约状态、保存或更新租约、根据房间ID获取可选支付方式和根据房间ID获取可选租期 2、接口开发 2.1、预约看房管理 首先在ViewAppointmentController中注入ViewAppointmentService如下 Tag(name 看房预约信息) RestController RequestMapping(/app/appointment) public class ViewAppointmentController {Autowiredprivate ViewAppointmentService service; }2.1.1.保存或更新看房预约 在ViewAppointmentController中增加如下内容 Operation(summary 保存或更新看房预约) PostMapping(/saveOrUpdate) public Result saveOrUpdate(RequestBody ViewAppointment viewAppointment) {viewAppointment.setUserId(LoginUserHolder.getLoginUser().getUserId());service.saveOrUpdate(viewAppointment);return Result.ok(); }2.1.2. 查询个人预约看房列表 查看响应的数据结构 查看web-app模块下的com.atguigu.lease.web.app.vo.appointment.AppointmentItemVo如下 Data Schema(description APP端预约看房基本信息) public class AppointmentItemVo {Schema(description 预约Id)private Long id;Schema(description 预约公寓名称)private String apartmentName;Schema(description 公寓图片列表)private ListGraphVo graphVoList;Schema(description 预约时间)JsonFormat(pattern yyyy-MM-dd HH:mm:ss)private Date appointmentTime;Schema(description 当前预约状态)private AppointmentStatus appointmentStatus; }编写Controller层逻辑 在ViewAppointmentController中增加如下内容 Operation(summary 查询个人预约看房列表) GetMapping(listItem) public ResultListAppointmentItemVo listItem() {ListAppointmentItemVo list service.listItemByUserId(LoginUserHolder.getLoginUser().getUserId());return Result.ok(list); }编写Service层逻辑 在ViewAppointmentService中增加如下内容 ListAppointmentItemVo listItemByUserId(Long userId);在ViewAppointmentServiceImpl中增加如下内容 Override public ListAppointmentItemVo listItemByUserId(Long userId) {return viewAppointmentMapper.listItemByUserId(userId); }编写Mapper层逻辑 在ViewAppointmentMapper中增加如下内容 ListAppointmentItemVo listItemByUserId(Long userId);在ViewAppointmentMapper.xml中增加如下内容 resultMap idAppointmentItemVoMap typecom.atguigu.lease.web.app.vo.appointment.AppointmentItemVoautoMappingtrueid columnid propertyid/collection propertygraphVoList ofTypecom.atguigu.lease.web.app.vo.graph.GraphVo autoMappingtrue/ /resultMapselect idlistItemByUserId resultMapAppointmentItemVoMapselect va.id,va.appointment_time,va.appointment_status,ai.name apartment_name,gi.name,gi.urlfrom view_appointment valeft join apartment_info ai on va.apartment_id ai.id and ai.is_deleted 0left join graph_info gi on gi.item_type 1 and gi.item_id ai.id and gi.is_deleted 0where va.is_deleted 0and va.user_id #{userId}order by va.create_time desc /select2.1.3. 根据ID查询预约详情信息 查看相应的数据结构 查看web-app模块下的com.atguigu.lease.web.app.vo.appointment.AppointmentDetailVo内容如下 Data Schema(description APP端预约看房详情) public class AppointmentDetailVo extends ViewAppointment {Schema(description 公寓基本信息)private ApartmentItemVo apartmentItemVo; }编写Controller层逻辑 在ViewAppointmentController中增加如下内容 GetMapping(getDetailById) Operation(summary 根据ID查询预约详情信息) public ResultAppointmentDetailVo getDetailById(Long id) {AppointmentDetailVo appointmentDetailVo service.getDetailById(id);return Result.ok(appointmentDetailVo); }编写Service层逻辑 在ViewAppointmentService中增加如下内容 AppointmentDetailVo getDetailById(Long id);在ViewAppointmentServiceImpl中增加如下内容 Override public AppointmentDetailVo getDetailById(Long id) {ViewAppointment viewAppointment viewAppointmentMapper.selectById(id);ApartmentItemVo apartmentItemVo apartmentInfoService.selectApartmentItemVoById(viewAppointment.getApartmentId());AppointmentDetailVo agreementDetailVo new AppointmentDetailVo();BeanUtils.copyProperties(viewAppointment, agreementDetailVo);agreementDetailVo.setApartmentItemVo(apartmentItemVo);return agreementDetailVo; }2.2、租约管理 首先在LeaseAgreementController中注入LeaseAgreementService如下 RestController RequestMapping(/app/agreement) Tag(name 租约信息) public class LeaseAgreementController {Autowiredprivate LeaseAgreementService service; }2.2.1. 获取个人租约基本信息列表 查看响应的数据结构 查看web-appp模块下的com.atguigu.lease.web.app.vo.agreement.AgreementItemVo内容如下 Data Schema(description 租约基本信息) public class AgreementItemVo {Schema(description 租约id)private Long id;Schema(description 房间图片列表)private ListGraphVo roomGraphVoList;Schema(description 公寓名称)private String apartmentName;Schema(description 房间号)private String roomNumber;Schema(description 租约状态)private LeaseStatus leaseStatus;Schema(description 租约开始日期)JsonFormat(pattern yyyy-MM-dd)private Date leaseStartDate;Schema(description 租约结束日期)JsonFormat(pattern yyyy-MM-dd)private Date leaseEndDate;Schema(description 租约来源)private LeaseSourceType sourceType;Schema(description 租金)private BigDecimal rent; }编写Controller层逻辑 在LeaseAgreementController中增加如下内容 Operation(summary 获取个人租约基本信息列表) GetMapping(listItem) public ResultListAgreementItemVo listItem() {ListAgreementItemVo result service.listItemByPhone(LoginUserHolder.getLoginUser().getUsername());return Result.ok(result); }编写Service层逻辑 在LeaseAgreementService中增加如下内容 ListAgreementItemVo listItemByPhone(String phone);在LeaseAgreementServiceImpl中增加如下内容 Override public ListAgreementItemVo listItemByPhone(String phone) {return leaseAgreementMapper.listItemByPhone(phone); }编写Mapper层逻辑 在LeaseAgreementMapper中增加如下内容 ListAgreementItemVo listItemByPhone(String phone);在LeaseAgreementMapper.xml中增加如下内容 resultMap idAgreementItemVoMap typecom.atguigu.lease.web.app.vo.agreement.AgreementItemVo autoMappingtrueid propertyid columnid/collection propertyroomGraphVoList ofTypecom.atguigu.lease.web.app.vo.graph.GraphVo autoMappingtrue/ /resultMapselect idlistItemByPhone resultMapAgreementItemVoMapselect la.id,la.lease_start_date,la.lease_end_date,la.rent,la.payment_type_id,la.status lease_status,la.source_type,ai.name apartment_name,ri.room_number,gi.name,gi.urlfrom lease_agreement laleft join apartment_info ai on la.apartment_id ai.id and ai.is_deleted 0left join room_info ri on la.room_id ri.id and ri.is_deleted 0left join graph_info gi on gi.item_type 2 and gi.item_id ri.id and gi.is_deleted 0where la.is_deleted 0and la.phone #{phone}/select2.2.2. 根据ID获取租约详细信息 查看响应的数据结构 查看web-app模块下的com.atguigu.lease.web.app.vo.agreement.AgreementDetailVo内容如下 Data Schema(description 租约详细信息) public class AgreementDetailVo extends LeaseAgreement {Schema(description 租约id)private Long id;Schema(description 公寓名称)private String apartmentName;Schema(description 公寓图片列表)private ListGraphVo apartmentGraphVoList;Schema(description 房间号)private String roomNumber;Schema(description 房间图片列表)private ListGraphVo roomGraphVoList;Schema(description 支付方式)private String paymentTypeName;Schema(description 租期月数)private Integer leaseTermMonthCount;Schema(description 租期单位)private String leaseTermUnit;}编写Controller层逻辑 在LeaseAgreementController中增加如下内容 Operation(summary 根据id获取租约详细信息) GetMapping(getDetailById) public ResultAgreementDetailVo getDetailById(RequestParam Long id) {AgreementDetailVo agreementDetailVo service.getDetailById(id);return Result.ok(agreementDetailVo); }编写Service层逻辑 在LeaseAgreementService中增加如下内容 AgreementDetailVo getDetailById(Long id);在LeaseAgreementServiceImpl中增加如下内容 Override public AgreementDetailVo getDetailById(Long id) {//1.查询租约信息LeaseAgreement leaseAgreement leaseAgreementMapper.selectById(id);if (leaseAgreement null) {return null;}//2.查询公寓信息ApartmentInfo apartmentInfo apartmentInfoMapper.selectById(leaseAgreement.getApartmentId());//3.查询房间信息RoomInfo roomInfo roomInfoMapper.selectById(leaseAgreement.getRoomId());//4.查询图片信息ListGraphVo roomGraphVoList graphInfoMapper.selectListByItemTypeAndId(ItemType.ROOM, leaseAgreement.getRoomId());ListGraphVo apartmentGraphVoList graphInfoMapper.selectListByItemTypeAndId(ItemType.APARTMENT, leaseAgreement.getApartmentId());//5.查询支付方式PaymentType paymentType paymentTypeMapper.selectById(leaseAgreement.getPaymentTypeId());//6.查询租期LeaseTerm leaseTerm leaseTermMapper.selectById(leaseAgreement.getLeaseTermId());AgreementDetailVo agreementDetailVo new AgreementDetailVo();BeanUtils.copyProperties(leaseAgreement, agreementDetailVo);agreementDetailVo.setApartmentName(apartmentInfo.getName());agreementDetailVo.setRoomNumber(roomInfo.getRoomNumber());agreementDetailVo.setApartmentGraphVoList(apartmentGraphVoList);agreementDetailVo.setRoomGraphVoList(roomGraphVoList);agreementDetailVo.setPaymentTypeName(paymentType.getName());agreementDetailVo.setLeaseTermMonthCount(leaseTerm.getMonthCount());agreementDetailVo.setLeaseTermUnit(leaseTerm.getUnit());return agreementDetailVo; }2.2.3. 根据ID更新租约状态 编写Controller层逻辑 在LeaseAgreementController中增加如下内容 Operation(summary 根据id更新租约状态, description 用于确认租约和提前退租) PostMapping(updateStatusById) public Result updateStatusById(RequestParam Long id, RequestParam LeaseStatus leaseStatus) {LambdaUpdateWrapperLeaseAgreement updateWrapper new LambdaUpdateWrapper();updateWrapper.eq(LeaseAgreement::getId, id);updateWrapper.set(LeaseAgreement::getStatus, leaseStatus);service.update(updateWrapper);return Result.ok(); }2.2.4. 保存或更新租约 编写Controller层逻辑 在LeaseAgreementController中增加如下内容 Operation(summary 保存或更新租约, description 用于续约) PostMapping(saveOrUpdate) public Result saveOrUpdate(RequestBody LeaseAgreement leaseAgreement) {service.saveOrUpdate(leaseAgreement);return Result.ok(); }2.2.5. 根据房间ID获取可选支付方式 编写Controller层逻辑 在PaymentTypeController中增加如下内容 Operation(summary 根据房间id获取可选支付方式列表) GetMapping(listByRoomId) public ResultListPaymentType list(RequestParam Long id) {ListPaymentType list service.listByRoomId(id);return Result.ok(list); }编写Service层逻辑 在PaymentTypeService中增加如下内容 ListPaymentType listByRoomId(Long id);在PaymentTypeServiceImpl中增加如下内容 Override public ListPaymentType listByRoomId(Long id) {return paymentTypeMapper.selectListByRoomId(id); }2.2.6.根据房间ID获取可选租期 编写Controller层逻辑 在LeaseTermController中增加如下内容 GetMapping(listByRoomId) Operation(summary 根据房间id获取可选获取租期列表) public ResultListLeaseTerm list(RequestParam Long id) {ListLeaseTerm list service.listByRoomId(id);return Result.ok(list); }编写Service层逻辑 在LeaseTermServcie中曾加如下内容 ListLeaseTerm listByRoomId(Long id);在LeaseTermServiceImpl中增加如下内容 Override public ListLeaseTerm listByRoomId(Long id) {return leaseTermMapper.selectListByRoomId(id); }
http://www.hkea.cn/news/14483136/

相关文章:

  • 站群网站推广工具费用wordpress跳转链接插件汉化
  • 资源网站都有哪些cmseasy破解版
  • 东莞官方网站 优帮云清远市清城区发布
  • 智能网站建设系统google地图嵌入网站
  • 怎样选择网站服务器wordpress安全狗
  • 如何看网站的建站时间购物网站建设需求
  • 网站地图seo市场营销方案案例范文
  • 网站浏览器兼容性网站开发实习
  • 打开链接的网站wordpress建站教程网
  • 网站做二级域名干什么用佛山 网址开发 网站制作
  • 婚纱摄影网站首页搭建电子商务平台
  • 免费简单门户网站开发网络公关公司是做啥的
  • 网站建设合同百度文库外贸网站后台
  • 企业网站建设合同模板厦门长实建设有限公司网站
  • 廊坊做网站教程企业网站邮箱建设
  • 怎么让自己做的网站别人可以访问国家认可的赚钱游戏
  • 深圳自助建站网站技术支持 深圳网站建设贝尔利
  • 微网站的功能莱州哪有做网站的
  • 做网站版权所有怎么写企业建站公司排名为什么不好做
  • 合肥模板网站建设收费大流量网站解决访问量
  • 免费制作照片的网站php网站广告管理系统
  • 彩票网站制作开发微课网站建设项目
  • 琼海做网站口碑微网站开发制作
  • 武昌做网站的公司什么是全网营销推广
  • 网站设计论文提纲品牌建设方案的完整纲要
  • 做电影网站怎么盈利wordpress 特效
  • 网站名称 备案wordpress 关闭网站
  • 阜宁做网站需要多少钱表格制作教程从零开始
  • 网站综合营销方案设计wordpress的文章插件
  • 建设网站内容的策划书小公司网络搭建