包厢,在线订餐
This commit is contained in:
1 parent
b03c4439fc
commit
6c91d4178f
39 files changed
+1907
-9
No files matched your search
+52
@@ -0,0 +1,52 @@
|
||||
package com.bsd.pjcloud.canteen.vo;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalTime;
|
||||
|
||||
|
||||
@Data
|
||||
public class APPBXAvaliabilityRespVO {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 包厢Id
|
||||
*/
|
||||
private Long boxesId;
|
||||
/**
|
||||
* 预约id
|
||||
*/
|
||||
private Long bookingId;
|
||||
/**
|
||||
* 状态 0空闲 1 已有预约 2 部分空闲
|
||||
*
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 格式为 YYYY-MM-DD
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate bxDate;
|
||||
/**
|
||||
* 时间
|
||||
*/
|
||||
@JsonFormat(pattern = "HH:mm")
|
||||
private LocalTime hour;
|
||||
/**
|
||||
* 时间索引(0-24)
|
||||
*/
|
||||
private Integer hourIndex;
|
||||
|
||||
}
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
package com.bsd.pjcloud.canteen.vo;
|
||||
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
||||
@Data
|
||||
@Schema(description = "点餐APP - 我的预约包厢记录")
|
||||
public class APPBookingInfo {
|
||||
|
||||
@Schema(description = "主键id")
|
||||
@ExcelProperty("主键id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "包厢Id")
|
||||
@ExcelProperty("包厢Id")
|
||||
@JsonIgnore
|
||||
private Long boxesId;
|
||||
|
||||
@Schema(description = "包厢名称", example = "测试包厢")
|
||||
private String boxesName;
|
||||
|
||||
@Schema(description = "开始时间")
|
||||
@ExcelProperty("开始时间")
|
||||
@JsonFormat(pattern = "HH:mm")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@Schema(description = "结束时间")
|
||||
@ExcelProperty("结束时间")
|
||||
@JsonFormat(pattern = "HH:mm")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@Schema(description = "审核人id", example = "16958")
|
||||
@ExcelProperty("审核人id")
|
||||
private Long checkUserId;
|
||||
|
||||
@Schema(description = "1审核中 2通过 3驳回", example = "1")
|
||||
private String checkStatus;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "预约日期", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate bookingDate;
|
||||
|
||||
@Schema(description = "userId", example = "33")
|
||||
@JsonIgnore
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "用户昵称", example = "3399")
|
||||
@ExcelProperty("用户昵称")
|
||||
private String nickName;
|
||||
|
||||
@Schema(description = "手机号", example = "3399")
|
||||
private String mobile;
|
||||
|
||||
@Schema(description = "总价单位分", example = "23172")
|
||||
@ExcelProperty("总价单位分")
|
||||
private Integer totalPrice;
|
||||
|
||||
@Schema(description = "预约状态(0 预约成功,1预约失败 2取消预约 )", example = "2")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.bsd.pjcloud.canteen.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "点餐APP- 包厢详情 Request VO")
|
||||
@Data
|
||||
public class AppBXDetailRespVO {
|
||||
|
||||
|
||||
@Schema(description = "包厢状态")
|
||||
private Short status;
|
||||
|
||||
|
||||
@Schema(description = "包厢所有时间表")
|
||||
private List<APPBXAvaliabilityRespVO> avaliabilityRespList;
|
||||
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.bsd.pjcloud.canteen.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "点餐APP- 包厢详情 Request VO")
|
||||
@Data
|
||||
public class AppBXInfoRespVO {
|
||||
|
||||
@Schema(description = "包厢Id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "包厢名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "容纳人数")
|
||||
private Long capacity;
|
||||
|
||||
@Schema(description = "包厢描述")
|
||||
private String description;
|
||||
|
||||
|
||||
@Schema(description = "包厢地址")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "包厢背景图")
|
||||
private String images;
|
||||
|
||||
@Schema(description = "包厢价格/每小时")
|
||||
private String price;
|
||||
|
||||
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
package com.bsd.pjcloud.canteen.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
||||
@Schema(description = "点餐APP- 包厢信息 Response VO")
|
||||
@Data
|
||||
public class AppBoxesInfoVO {
|
||||
@Schema(description = "主键id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("主键id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "包厢名称")
|
||||
@ExcelProperty("包厢名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "容纳人数")
|
||||
@ExcelProperty("容纳人数")
|
||||
private Long capacity;
|
||||
|
||||
@Schema(description = "包厢状态")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "包厢地址")
|
||||
@ExcelProperty("包厢地址")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "包厢背景图")
|
||||
@ExcelProperty("包厢背景图")
|
||||
private String images;
|
||||
|
||||
@Schema(description = "包厢价格")
|
||||
@ExcelProperty("包厢价格")
|
||||
private String price;
|
||||
|
||||
/**
|
||||
* 包厢描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 商户id
|
||||
*/
|
||||
private Long merchantId;
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.bsd.pjcloud.canteen.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@Schema(description = "点餐APP- 用户发起预约 Request VO")
|
||||
@Data
|
||||
public class AppMakeSaveReqVO {
|
||||
|
||||
@Schema(description = "包厢Id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long boxesId;
|
||||
|
||||
@Schema(description = "开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@JsonFormat(pattern = "HH:mm")
|
||||
private String startTime;
|
||||
|
||||
@Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@JsonFormat(pattern = "HH:mm")
|
||||
private String endTime;
|
||||
|
||||
|
||||
@Schema(description = "时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private String bxDate;
|
||||
}
|
||||
@@ -13,6 +13,11 @@
|
||||
<artifactId>pjcloud-canteen-biz</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<!-- 分布式任务-->
|
||||
<dependency>
|
||||
<groupId>com.bsd</groupId>
|
||||
<artifactId>pjcloud-common-job</artifactId>
|
||||
</dependency>
|
||||
<!--必备: undertow容器-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
||||
+2
@@ -1,6 +1,7 @@
|
||||
package com.bsd.pjcloud.canteen;
|
||||
|
||||
import com.bsd.pjcloud.common.feign.annotation.EnablePjcloudFeignClients;
|
||||
import com.bsd.pjcloud.common.job.annotation.EnablePjcloudXxlJob;
|
||||
import com.bsd.pjcloud.common.security.annotation.EnablePjcloudResourceServer;
|
||||
import com.bsd.pjcloud.common.swagger.annotation.EnableOpenApi;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
@@ -17,6 +18,7 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
@EnableDiscoveryClient
|
||||
@EnablePjcloudResourceServer
|
||||
@SpringBootApplication
|
||||
@EnablePjcloudXxlJob
|
||||
public class CanteenApp {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(CanteenApp.class, args);
|
||||
|
||||
+121
@@ -0,0 +1,121 @@
|
||||
package com.bsd.pjcloud.canteen.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.log.annotation.SysLog;
|
||||
import com.bsd.pjcloud.canteen.entity.BoxesAvailabilityEntity;
|
||||
import com.bsd.pjcloud.canteen.service.BoxesAvailabilityService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.bsd.pjcloud.common.excel.annotation.ResponseExcel;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 包厢可用时间段
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2024-12-17 13:59:31
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/boxesAvailability" )
|
||||
@Tag(description = "boxesAvailability" , name = "包厢可用时间段管理" )
|
||||
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
|
||||
public class BoxesAvailabilityController {
|
||||
|
||||
private final BoxesAvailabilityService boxesAvailabilityService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param boxesAvailability 包厢可用时间段
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "分页查询" , description = "分页查询" )
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('canteen_boxesAvailability_view')" )
|
||||
public R getBoxesAvailabilityPage(@ParameterObject Page page, @ParameterObject BoxesAvailabilityEntity boxesAvailability) {
|
||||
LambdaQueryWrapper<BoxesAvailabilityEntity> wrapper = Wrappers.lambdaQuery();
|
||||
wrapper.eq(Objects.nonNull(boxesAvailability.getStatus()),BoxesAvailabilityEntity::getStatus,boxesAvailability.getStatus());
|
||||
return R.ok(boxesAvailabilityService.page(page, wrapper));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询包厢可用时间段
|
||||
* @param id id
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "通过id查询" , description = "通过id查询" )
|
||||
@GetMapping("/{id}" )
|
||||
@PreAuthorize("@pms.hasPermission('canteen_boxesAvailability_view')" )
|
||||
public R getById(@PathVariable("id" ) Long id) {
|
||||
return R.ok(boxesAvailabilityService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增包厢可用时间段
|
||||
* @param boxesAvailability 包厢可用时间段
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "新增包厢可用时间段" , description = "新增包厢可用时间段" )
|
||||
@SysLog("新增包厢可用时间段" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('canteen_boxesAvailability_add')" )
|
||||
public R save(@RequestBody BoxesAvailabilityEntity boxesAvailability) {
|
||||
return R.ok(boxesAvailabilityService.save(boxesAvailability));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改包厢可用时间段
|
||||
* @param boxesAvailability 包厢可用时间段
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "修改包厢可用时间段" , description = "修改包厢可用时间段" )
|
||||
@SysLog("修改包厢可用时间段" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('canteen_boxesAvailability_edit')" )
|
||||
public R updateById(@RequestBody BoxesAvailabilityEntity boxesAvailability) {
|
||||
return R.ok(boxesAvailabilityService.updateById(boxesAvailability));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除包厢可用时间段
|
||||
* @param ids id列表
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "通过id删除包厢可用时间段" , description = "通过id删除包厢可用时间段" )
|
||||
@SysLog("通过id删除包厢可用时间段" )
|
||||
@DeleteMapping
|
||||
@PreAuthorize("@pms.hasPermission('canteen_boxesAvailability_del')" )
|
||||
public R removeById(@RequestBody Long[] ids) {
|
||||
return R.ok(boxesAvailabilityService.removeBatchByIds(CollUtil.toList(ids)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出excel 表格
|
||||
* @param boxesAvailability 查询条件
|
||||
* @param ids 导出指定ID
|
||||
* @return excel 文件流
|
||||
*/
|
||||
@ResponseExcel
|
||||
@GetMapping("/export")
|
||||
@PreAuthorize("@pms.hasPermission('canteen_boxesAvailability_export')" )
|
||||
public List<BoxesAvailabilityEntity> export(BoxesAvailabilityEntity boxesAvailability,Long[] ids) {
|
||||
return boxesAvailabilityService.list(Wrappers.lambdaQuery(boxesAvailability).in(ArrayUtil.isNotEmpty(ids), BoxesAvailabilityEntity::getId, ids));
|
||||
}
|
||||
}
|
||||
+48
@@ -1,15 +1,19 @@
|
||||
package com.bsd.pjcloud.canteen.controller;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.canteen.vo.APPBookingInfo;
|
||||
import com.bsd.pjcloud.canteen.vo.AppMakeSaveReqVO;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.log.annotation.SysLog;
|
||||
import com.bsd.pjcloud.canteen.entity.BoxesBookingEntity;
|
||||
import com.bsd.pjcloud.canteen.service.BoxesBookingService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.bsd.pjcloud.common.excel.annotation.ResponseExcel;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
@@ -119,4 +123,48 @@ public class BoxesBookingController {
|
||||
public List<BoxesBookingEntity> export(BoxesBookingEntity boxesBooking,Long[] ids) {
|
||||
return boxesBookingService.list(Wrappers.lambdaQuery(boxesBooking).in(ArrayUtil.isNotEmpty(ids), BoxesBookingEntity::getId, ids));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "新增预约")
|
||||
public R<Long> createBooking(@RequestBody AppMakeSaveReqVO createReqVO) {
|
||||
return boxesBookingService.createBooking(createReqVO);
|
||||
|
||||
}
|
||||
|
||||
|
||||
//-------------app------------------
|
||||
// @GetMapping("/getMyBookingPage")
|
||||
// @Operation(summary = "获得我的预约包厢信息")
|
||||
// public R getBookingPage(
|
||||
// @ParameterObject Page page,
|
||||
// ) {
|
||||
// BookingPageReqVO bookingPageReqVO = new BookingPageReqVO();
|
||||
// bookingPageReqVO.setPageNo(pageNo);
|
||||
// bookingPageReqVO.setPageSize(pageSize);
|
||||
// bookingPageReqVO.setStatus(status);
|
||||
// bookingPageReqVO.setUserId(getLoginUserId());
|
||||
// PageResult<BookingDO> bookingPage = bookingService.getBookingPage(bookingPageReqVO);
|
||||
// PageResult<APPBookingInfo> bean = BeanUtils.toBean(bookingPage, APPBookingInfo.class);
|
||||
// if (ObjectUtil.isEmpty(bookingPage.getList())) return success(bean);
|
||||
//
|
||||
// List<Long> collectUserIdS = bookingPage.getList().stream().map(BookingDO::getUserId).collect(Collectors.toList());
|
||||
// List<Long> collectBoxesIdS = bookingPage.getList().stream().map(BookingDO::getBoxesId).collect(Collectors.toList());
|
||||
// Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(collectUserIdS);
|
||||
// Map<Long, InfoRespVO> boxIdMap = infoService.getInfoMap(collectBoxesIdS);
|
||||
// bean.getList().forEach(x -> {
|
||||
// x.setNickName(userMap.get(x.getUserId()).getNickname());
|
||||
// x.setMobile(userMap.get(x.getUserId()).getMobile());
|
||||
// x.setBoxesName(boxIdMap.get(x.getBoxesId()).getName());
|
||||
// });
|
||||
// return success(bean);
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @GetMapping("/cancel")
|
||||
// @Operation(summary = "取消预约")
|
||||
// public R<Long> createBooking(@RequestParam("id") Long bookId) {
|
||||
// Long id = bookingService.cancelBooking(bookId);
|
||||
// return success(id);
|
||||
// }
|
||||
}
|
||||
+48
-1
@@ -1,16 +1,22 @@
|
||||
package com.bsd.pjcloud.canteen.controller;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.canteen.service.BoxesBookingService;
|
||||
import com.bsd.pjcloud.canteen.vo.*;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.log.annotation.SysLog;
|
||||
import com.bsd.pjcloud.canteen.entity.BoxesInfoEntity;
|
||||
import com.bsd.pjcloud.canteen.service.BoxesInfoService;
|
||||
import com.bsd.pjcloud.common.security.util.SecurityUtils;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.bsd.pjcloud.common.excel.annotation.ResponseExcel;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
@@ -21,6 +27,8 @@ import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -39,6 +47,8 @@ public class BoxesInfoController {
|
||||
|
||||
private final BoxesInfoService boxesInfoService;
|
||||
|
||||
private final BoxesBookingService bookingService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
@@ -78,7 +88,7 @@ public class BoxesInfoController {
|
||||
@PreAuthorize("@pms.hasPermission('canteen_boxesInfo_add')" )
|
||||
public R save(@RequestBody BoxesInfoEntity boxesInfo) {
|
||||
boxesInfo.setDeptId(SecurityUtils.getUser().getDeptId());
|
||||
return R.ok(boxesInfoService.save(boxesInfo));
|
||||
return R.ok(boxesInfoService.saveInfo(boxesInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -120,4 +130,41 @@ public class BoxesInfoController {
|
||||
public List<BoxesInfoEntity> export(BoxesInfoEntity boxesInfo,Long[] ids) {
|
||||
return boxesInfoService.list(Wrappers.lambdaQuery(boxesInfo).in(ArrayUtil.isNotEmpty(ids), BoxesInfoEntity::getId, ids));
|
||||
}
|
||||
|
||||
|
||||
// --------------------移动端接口---------------------------
|
||||
@GetMapping("/getInfo")
|
||||
@Operation(summary = "获得包厢固定的基础信息")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
public R<AppBXInfoRespVO> getInfo(@RequestParam("id") Long id) {
|
||||
BoxesInfoEntity byId = boxesInfoService.getById(id);
|
||||
AppBXInfoRespVO appBXInfoRespVO = new AppBXInfoRespVO();
|
||||
BeanUtils.copyProperties(byId,appBXInfoRespVO);
|
||||
return R.ok(appBXInfoRespVO);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "根据日期动态获取包厢可预约时间信息")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
public R<AppBXDetailRespVO> getInfoAvailability(@RequestParam("id") Long id,
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd") @RequestParam("currentDate") LocalDate date) {
|
||||
AppBXDetailRespVO info = boxesInfoService.getAppBXDetailRespVO(id, date);
|
||||
return R.ok(info);
|
||||
}
|
||||
|
||||
@GetMapping("/appPage")
|
||||
@Operation(summary = "获得包厢信息分页")
|
||||
public R getInfoPage(@ParameterObject Page page,@ParameterObject BoxesInfoEntity boxesInfo) {
|
||||
LambdaQueryWrapper<BoxesInfoEntity> wrapper = Wrappers.lambdaQuery();
|
||||
wrapper.eq(StrUtil.isNotBlank(boxesInfo.getName()),BoxesInfoEntity::getName,boxesInfo.getName());
|
||||
Page pageResult = boxesInfo.selectPage(page, wrapper);
|
||||
List<AppBoxesInfoVO> appInfoRespVOS = new ArrayList<>();
|
||||
pageResult.getRecords().forEach(x->{
|
||||
AppBoxesInfoVO appBoxesInfoVO = com.bsd.pjcloud.common.core.util.BeanUtils.toBean(x, AppBoxesInfoVO.class);
|
||||
appInfoRespVOS.add(appBoxesInfoVO);
|
||||
});
|
||||
pageResult.setRecords(appInfoRespVOS);
|
||||
return R.ok(pageResult);
|
||||
}
|
||||
|
||||
}
|
||||
+121
@@ -0,0 +1,121 @@
|
||||
package com.bsd.pjcloud.canteen.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.log.annotation.SysLog;
|
||||
import com.bsd.pjcloud.canteen.entity.CanteenOnlineCategoryEntity;
|
||||
import com.bsd.pjcloud.canteen.service.CanteenOnlineCategoryService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.bsd.pjcloud.common.excel.annotation.ResponseExcel;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 在线点餐分类
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2024-12-17 13:03:14
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/canteenOnlineCategory" )
|
||||
@Tag(description = "canteenOnlineCategory" , name = "在线点餐分类管理" )
|
||||
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
|
||||
public class CanteenOnlineCategoryController {
|
||||
|
||||
private final CanteenOnlineCategoryService canteenOnlineCategoryService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param canteenOnlineCategory 在线点餐分类
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "分页查询" , description = "分页查询" )
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenOnlineCategory_view')" )
|
||||
public R getCanteenOnlineCategoryPage(@ParameterObject Page page, @ParameterObject CanteenOnlineCategoryEntity canteenOnlineCategory) {
|
||||
LambdaQueryWrapper<CanteenOnlineCategoryEntity> wrapper = Wrappers.lambdaQuery();
|
||||
wrapper.like(StrUtil.isNotBlank(canteenOnlineCategory.getName()),CanteenOnlineCategoryEntity::getName,canteenOnlineCategory.getName());
|
||||
return R.ok(canteenOnlineCategoryService.page(page, wrapper));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询在线点餐分类
|
||||
* @param id id
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "通过id查询" , description = "通过id查询" )
|
||||
@GetMapping("/{id}" )
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenOnlineCategory_view')" )
|
||||
public R getById(@PathVariable("id" ) Long id) {
|
||||
return R.ok(canteenOnlineCategoryService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增在线点餐分类
|
||||
* @param canteenOnlineCategory 在线点餐分类
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "新增在线点餐分类" , description = "新增在线点餐分类" )
|
||||
@SysLog("新增在线点餐分类" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenOnlineCategory_add')" )
|
||||
public R save(@RequestBody CanteenOnlineCategoryEntity canteenOnlineCategory) {
|
||||
return R.ok(canteenOnlineCategoryService.save(canteenOnlineCategory));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改在线点餐分类
|
||||
* @param canteenOnlineCategory 在线点餐分类
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "修改在线点餐分类" , description = "修改在线点餐分类" )
|
||||
@SysLog("修改在线点餐分类" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenOnlineCategory_edit')" )
|
||||
public R updateById(@RequestBody CanteenOnlineCategoryEntity canteenOnlineCategory) {
|
||||
return R.ok(canteenOnlineCategoryService.updateById(canteenOnlineCategory));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除在线点餐分类
|
||||
* @param ids id列表
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "通过id删除在线点餐分类" , description = "通过id删除在线点餐分类" )
|
||||
@SysLog("通过id删除在线点餐分类" )
|
||||
@DeleteMapping
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenOnlineCategory_del')" )
|
||||
public R removeById(@RequestBody Long[] ids) {
|
||||
return R.ok(canteenOnlineCategoryService.removeBatchByIds(CollUtil.toList(ids)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出excel 表格
|
||||
* @param canteenOnlineCategory 查询条件
|
||||
* @param ids 导出指定ID
|
||||
* @return excel 文件流
|
||||
*/
|
||||
@ResponseExcel
|
||||
@GetMapping("/export")
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenOnlineCategory_export')" )
|
||||
public List<CanteenOnlineCategoryEntity> export(CanteenOnlineCategoryEntity canteenOnlineCategory,Long[] ids) {
|
||||
return canteenOnlineCategoryService.list(Wrappers.lambdaQuery(canteenOnlineCategory).in(ArrayUtil.isNotEmpty(ids), CanteenOnlineCategoryEntity::getId, ids));
|
||||
}
|
||||
}
|
||||
+122
@@ -0,0 +1,122 @@
|
||||
package com.bsd.pjcloud.canteen.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.log.annotation.SysLog;
|
||||
import com.bsd.pjcloud.canteen.entity.CanteenOnlineSpuEntity;
|
||||
import com.bsd.pjcloud.canteen.service.CanteenOnlineSpuService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.bsd.pjcloud.common.excel.annotation.ResponseExcel;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 在线点餐spu
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2024-12-16 23:42:19
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/canteenOnlineSpu" )
|
||||
@Tag(description = "canteenOnlineSpu" , name = "在线点餐spu管理" )
|
||||
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
|
||||
public class CanteenOnlineSpuController {
|
||||
|
||||
private final CanteenOnlineSpuService canteenOnlineSpuService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param canteenOnlineSpu 在线点餐spu
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "分页查询" , description = "分页查询" )
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenOnlineSpu_view')" )
|
||||
public R getCanteenOnlineSpuPage(@ParameterObject Page page, @ParameterObject CanteenOnlineSpuEntity canteenOnlineSpu) {
|
||||
LambdaQueryWrapper<CanteenOnlineSpuEntity> wrapper = Wrappers.lambdaQuery();
|
||||
wrapper.like(StrUtil.isNotBlank(canteenOnlineSpu.getName()),CanteenOnlineSpuEntity::getName,canteenOnlineSpu.getName());
|
||||
wrapper.eq(Objects.nonNull(canteenOnlineSpu.getCategoryId()),CanteenOnlineSpuEntity::getCategoryId,canteenOnlineSpu.getCategoryId());
|
||||
return R.ok(canteenOnlineSpuService.page(page, wrapper));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询在线点餐spu
|
||||
* @param id id
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "通过id查询" , description = "通过id查询" )
|
||||
@GetMapping("/{id}" )
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenOnlineSpu_view')" )
|
||||
public R getById(@PathVariable("id" ) Long id) {
|
||||
return R.ok(canteenOnlineSpuService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增在线点餐spu
|
||||
* @param canteenOnlineSpu 在线点餐spu
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "新增在线点餐spu" , description = "新增在线点餐spu" )
|
||||
@SysLog("新增在线点餐spu" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenOnlineSpu_add')" )
|
||||
public R save(@RequestBody CanteenOnlineSpuEntity canteenOnlineSpu) {
|
||||
return R.ok(canteenOnlineSpuService.save(canteenOnlineSpu));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改在线点餐spu
|
||||
* @param canteenOnlineSpu 在线点餐spu
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "修改在线点餐spu" , description = "修改在线点餐spu" )
|
||||
@SysLog("修改在线点餐spu" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenOnlineSpu_edit')" )
|
||||
public R updateById(@RequestBody CanteenOnlineSpuEntity canteenOnlineSpu) {
|
||||
return R.ok(canteenOnlineSpuService.updateById(canteenOnlineSpu));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除在线点餐spu
|
||||
* @param ids id列表
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "通过id删除在线点餐spu" , description = "通过id删除在线点餐spu" )
|
||||
@SysLog("通过id删除在线点餐spu" )
|
||||
@DeleteMapping
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenOnlineSpu_del')" )
|
||||
public R removeById(@RequestBody Long[] ids) {
|
||||
return R.ok(canteenOnlineSpuService.removeBatchByIds(CollUtil.toList(ids)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出excel 表格
|
||||
* @param canteenOnlineSpu 查询条件
|
||||
* @param ids 导出指定ID
|
||||
* @return excel 文件流
|
||||
*/
|
||||
@ResponseExcel
|
||||
@GetMapping("/export")
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenOnlineSpu_export')" )
|
||||
public List<CanteenOnlineSpuEntity> export(CanteenOnlineSpuEntity canteenOnlineSpu,Long[] ids) {
|
||||
return canteenOnlineSpuService.list(Wrappers.lambdaQuery(canteenOnlineSpu).in(ArrayUtil.isNotEmpty(ids), CanteenOnlineSpuEntity::getId, ids));
|
||||
}
|
||||
}
|
||||
+109
@@ -0,0 +1,109 @@
|
||||
package com.bsd.pjcloud.canteen.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
|
||||
/**
|
||||
* 包厢可用时间段
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2024-12-17 13:59:31
|
||||
*/
|
||||
@Data
|
||||
@TableName("boxes_availability")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "包厢可用时间段")
|
||||
public class BoxesAvailabilityEntity extends Model<BoxesAvailabilityEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(description="主键id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 包厢Id
|
||||
*/
|
||||
@Schema(description="包厢Id")
|
||||
private Long boxesId;
|
||||
|
||||
/**
|
||||
* 预约id
|
||||
*/
|
||||
@Schema(description="预约id")
|
||||
private Long bookingId;
|
||||
|
||||
/**
|
||||
* 状态 0空闲 1已使用
|
||||
*/
|
||||
@Schema(description="状态 0空闲 1已使用")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@Schema(description="用户id")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 格式为 YYYY-MM-DD
|
||||
*/
|
||||
@Schema(description="格式为 YYYY-MM-DD")
|
||||
private LocalDate bxDate;
|
||||
|
||||
/**
|
||||
* 时间
|
||||
*/
|
||||
@Schema(description="时间")
|
||||
private LocalTime hour;
|
||||
|
||||
/**
|
||||
* 时间索引(0-24)
|
||||
*/
|
||||
@Schema(description="时间索引(0-24)")
|
||||
private Integer hourIndex;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="创建人")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description="更新人")
|
||||
private Double updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description="更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
@TableLogic
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="是否删除")
|
||||
private String delFlag;
|
||||
}
|
||||
+4
@@ -113,4 +113,8 @@ public class BoxesBookingEntity extends Model<BoxesBookingEntity> {
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description="更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
|
||||
@Schema(description="部门id")
|
||||
private Long deptId;
|
||||
}
|
||||
+109
@@ -0,0 +1,109 @@
|
||||
package com.bsd.pjcloud.canteen.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.bsd.pjcloud.common.core.util.TenantTable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 在线点餐分类
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2024-12-17 13:03:14
|
||||
*/
|
||||
@Data
|
||||
@TenantTable
|
||||
@TableName("canteen_online_category")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "在线点餐分类")
|
||||
public class CanteenOnlineCategoryEntity extends Model<CanteenOnlineCategoryEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* 分类编号
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(description="分类编号")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 父分类编号
|
||||
*/
|
||||
@Schema(description="父分类编号")
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
@Schema(description="分类名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 分类图
|
||||
*/
|
||||
@Schema(description="分类图")
|
||||
private String picUrl;
|
||||
|
||||
/**
|
||||
* 分类排序
|
||||
*/
|
||||
@Schema(description="分类排序")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 开启状态
|
||||
*/
|
||||
@Schema(description="开启状态")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@Schema(description="部门id")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="创建者")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description="更新者")
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description="更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
@TableLogic
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="是否删除")
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 租户编号
|
||||
*/
|
||||
@Schema(description="租户编号")
|
||||
private Long tenantId;
|
||||
}
|
||||
+177
@@ -0,0 +1,177 @@
|
||||
package com.bsd.pjcloud.canteen.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.bsd.pjcloud.common.core.util.TenantTable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 在线点餐spu
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2024-12-16 23:42:19
|
||||
*/
|
||||
@Data
|
||||
@TenantTable
|
||||
@TableName("canteen_online_spu")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "在线点餐spu")
|
||||
public class CanteenOnlineSpuEntity extends Model<CanteenOnlineSpuEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* 商品 SPU 编号,自增
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(description="商品 SPU 编号,自增")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
@Schema(description="商品名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 商品简介
|
||||
*/
|
||||
@Schema(description="商品简介")
|
||||
private String introduction;
|
||||
|
||||
/**
|
||||
* 商品详情
|
||||
*/
|
||||
@Schema(description="商品详情")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 商品分类编号
|
||||
*/
|
||||
@Schema(description="商品分类编号")
|
||||
private Long categoryId;
|
||||
|
||||
/**
|
||||
* 商品封面图
|
||||
*/
|
||||
@Schema(description="商品封面图")
|
||||
private String picUrl;
|
||||
|
||||
/**
|
||||
* 商品轮播图地址
|
||||
数组,以逗号分隔
|
||||
最多上传15张
|
||||
*/
|
||||
@Schema(description="商品轮播图地址")
|
||||
private String sliderPicUrls;
|
||||
|
||||
/**
|
||||
* 排序字段
|
||||
*/
|
||||
@Schema(description="排序字段")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 商品状态: 1 上架(开启) 0 下架(禁用) -1 回收
|
||||
*/
|
||||
@Schema(description="商品状态: 1 上架(开启) 0 下架(禁用) -1 回收")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 商品价格,单位使用:分
|
||||
*/
|
||||
@Schema(description="商品价格,单位使用:分")
|
||||
private Integer price;
|
||||
|
||||
/**
|
||||
* 市场价,单位使用:分
|
||||
*/
|
||||
@Schema(description="市场价,单位使用:分")
|
||||
private Integer marketPrice;
|
||||
|
||||
/**
|
||||
* 库存
|
||||
*/
|
||||
@Schema(description="库存")
|
||||
private Integer stock;
|
||||
|
||||
/**
|
||||
* 赠送积分
|
||||
*/
|
||||
@Schema(description="赠送积分")
|
||||
private Integer giveIntegral;
|
||||
|
||||
/**
|
||||
* 商品销量
|
||||
*/
|
||||
@Schema(description="商品销量")
|
||||
private Integer salesCount;
|
||||
|
||||
/**
|
||||
* 虚拟销量
|
||||
*/
|
||||
@Schema(description="虚拟销量")
|
||||
private Integer virtualSalesCount;
|
||||
|
||||
/**
|
||||
* 商品点击量
|
||||
*/
|
||||
@Schema(description="商品点击量")
|
||||
private Integer browseCount;
|
||||
|
||||
/**
|
||||
* 商户编号
|
||||
*/
|
||||
@Schema(description="商户编号")
|
||||
private Long merchantId;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@Schema(description="部门id")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="创建人")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description="更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description="更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
@TableLogic
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="是否删除")
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 租户编号
|
||||
*/
|
||||
@Schema(description="租户编号")
|
||||
private Long tenantId;
|
||||
}
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
package com.bsd.pjcloud.canteen.job;
|
||||
|
||||
|
||||
import com.bsd.pjcloud.canteen.entity.BoxesAvailabilityEntity;
|
||||
import com.bsd.pjcloud.canteen.entity.BoxesInfoEntity;
|
||||
import com.bsd.pjcloud.canteen.mapper.BoxesAvailabilityMapper;
|
||||
import com.bsd.pjcloud.canteen.mapper.BoxesInfoMapper;
|
||||
import com.bsd.pjcloud.canteen.service.BoxesAvailabilityService;
|
||||
import com.bsd.pjcloud.canteen.service.BoxesInfoService;
|
||||
import com.xxl.job.core.context.XxlJobHelper;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class BoxesAvaliabilityJob {
|
||||
|
||||
private final BoxesInfoMapper boxesInfoMapper;
|
||||
|
||||
private final BoxesAvailabilityService boxesAvailabilityService;
|
||||
|
||||
private final BoxesAvailabilityMapper boxesAvailabilityMapper;
|
||||
@XxlJob("avaliabilityJobHandler")
|
||||
public void demoJobHandler() {
|
||||
//查询所有包厢
|
||||
List<BoxesInfoEntity> rooms = boxesInfoMapper.selectList(null);
|
||||
|
||||
for (BoxesInfoEntity room : rooms) {
|
||||
// 查询该包厢的最新时间段记录
|
||||
BoxesAvailabilityEntity latestAvailability = boxesAvailabilityMapper.findTopByRoomIdOrderByDateDesc(room.getId());
|
||||
|
||||
LocalDate startDate;
|
||||
if (latestAvailability != null) {
|
||||
// 从最新日期的下一天开始
|
||||
startDate = latestAvailability.getBxDate().plusDays(1);
|
||||
} else {
|
||||
// 如果还没有记录,从今天开始
|
||||
startDate = LocalDate.now();
|
||||
}
|
||||
|
||||
// 生成未来 15 天的数据
|
||||
LocalDate endDate = LocalDate.now().plusDays(15);
|
||||
List<BoxesAvailabilityEntity> availabilityList = new ArrayList<>();
|
||||
|
||||
for (LocalDate date = startDate; !date.isAfter(endDate); date = date.plusDays(1)) {
|
||||
for (int hour = 0; hour < 24; hour++) {
|
||||
BoxesAvailabilityEntity availability = new BoxesAvailabilityEntity();
|
||||
availability.setBoxesId(room.getId());
|
||||
availability.setBxDate(date);
|
||||
availability.setHour(LocalTime.of(hour, 0));
|
||||
availability.setHourIndex(hour);
|
||||
availabilityList.add(availability);
|
||||
}
|
||||
}
|
||||
|
||||
// 批量插入数据
|
||||
boxesAvailabilityService.saveBatch(availabilityList);
|
||||
}
|
||||
XxlJobHelper.handleSuccess();
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.bsd.pjcloud.canteen.mapper;
|
||||
|
||||
import com.bsd.pjcloud.common.data.datascope.PjcloudBaseMapper;
|
||||
import com.bsd.pjcloud.canteen.entity.BoxesAvailabilityEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface BoxesAvailabilityMapper extends PjcloudBaseMapper<BoxesAvailabilityEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* 最新的一条数据库
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
BoxesAvailabilityEntity findTopByRoomIdOrderByDateDesc(Long id);
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.bsd.pjcloud.canteen.mapper;
|
||||
|
||||
import com.bsd.pjcloud.common.data.datascope.PjcloudBaseMapper;
|
||||
import com.bsd.pjcloud.canteen.entity.CanteenOnlineCategoryEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface CanteenOnlineCategoryMapper extends PjcloudBaseMapper<CanteenOnlineCategoryEntity> {
|
||||
|
||||
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.bsd.pjcloud.canteen.mapper;
|
||||
|
||||
import com.bsd.pjcloud.common.data.datascope.PjcloudBaseMapper;
|
||||
import com.bsd.pjcloud.canteen.entity.CanteenOnlineSpuEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface CanteenOnlineSpuMapper extends PjcloudBaseMapper<CanteenOnlineSpuEntity> {
|
||||
|
||||
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package com.bsd.pjcloud.canteen.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bsd.pjcloud.canteen.entity.BoxesAvailabilityEntity;
|
||||
|
||||
public interface BoxesAvailabilityService extends IService<BoxesAvailabilityEntity> {
|
||||
|
||||
}
|
||||
+9
@@ -2,7 +2,16 @@ package com.bsd.pjcloud.canteen.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bsd.pjcloud.canteen.entity.BoxesBookingEntity;
|
||||
import com.bsd.pjcloud.canteen.vo.AppMakeSaveReqVO;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
|
||||
public interface BoxesBookingService extends IService<BoxesBookingEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* 发起一条预约
|
||||
* @param createReqVO
|
||||
* @return
|
||||
*/
|
||||
R createBooking(AppMakeSaveReqVO createReqVO);
|
||||
}
|
||||
+19
@@ -4,6 +4,9 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bsd.pjcloud.canteen.entity.BoxesInfoEntity;
|
||||
import com.bsd.pjcloud.canteen.vo.AppBXDetailRespVO;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
public interface BoxesInfoService extends IService<BoxesInfoEntity> {
|
||||
|
||||
@@ -15,4 +18,20 @@ public interface BoxesInfoService extends IService<BoxesInfoEntity> {
|
||||
* @return
|
||||
*/
|
||||
Object pageScope(Page page, LambdaQueryWrapper<BoxesInfoEntity> wrapper);
|
||||
|
||||
/**
|
||||
* 新增包厢
|
||||
* @param boxesInfo
|
||||
* @return
|
||||
*/
|
||||
Object saveInfo(BoxesInfoEntity boxesInfo);
|
||||
|
||||
|
||||
/**
|
||||
* 根据日期动态获取包厢可预约时间信息
|
||||
* @param id
|
||||
* @param date
|
||||
* @return
|
||||
*/
|
||||
AppBXDetailRespVO getAppBXDetailRespVO(Long id, LocalDate date);
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package com.bsd.pjcloud.canteen.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bsd.pjcloud.canteen.entity.CanteenOnlineCategoryEntity;
|
||||
|
||||
public interface CanteenOnlineCategoryService extends IService<CanteenOnlineCategoryEntity> {
|
||||
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package com.bsd.pjcloud.canteen.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bsd.pjcloud.canteen.entity.CanteenOnlineSpuEntity;
|
||||
|
||||
public interface CanteenOnlineSpuService extends IService<CanteenOnlineSpuEntity> {
|
||||
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.bsd.pjcloud.canteen.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bsd.pjcloud.canteen.entity.BoxesAvailabilityEntity;
|
||||
import com.bsd.pjcloud.canteen.mapper.BoxesAvailabilityMapper;
|
||||
import com.bsd.pjcloud.canteen.service.BoxesAvailabilityService;
|
||||
import org.springframework.stereotype.Service;
|
||||
/**
|
||||
* 包厢可用时间段
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2024-12-17 13:59:31
|
||||
*/
|
||||
@Service
|
||||
public class BoxesAvailabilityServiceImpl extends ServiceImpl<BoxesAvailabilityMapper, BoxesAvailabilityEntity> implements BoxesAvailabilityService {
|
||||
}
|
||||
+61
@@ -2,9 +2,21 @@ package com.bsd.pjcloud.canteen.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bsd.pjcloud.canteen.entity.BoxesBookingEntity;
|
||||
import com.bsd.pjcloud.canteen.entity.BoxesInfoEntity;
|
||||
import com.bsd.pjcloud.canteen.mapper.BoxesAvailabilityMapper;
|
||||
import com.bsd.pjcloud.canteen.mapper.BoxesBookingMapper;
|
||||
import com.bsd.pjcloud.canteen.mapper.BoxesInfoMapper;
|
||||
import com.bsd.pjcloud.canteen.service.BoxesBookingService;
|
||||
import com.bsd.pjcloud.canteen.vo.AppMakeSaveReqVO;
|
||||
import com.bsd.pjcloud.common.core.util.BeanUtils;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.security.util.SecurityUtils;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 包厢预约记录表
|
||||
*
|
||||
@@ -12,5 +24,54 @@ import org.springframework.stereotype.Service;
|
||||
* @date 2024-12-16 22:39:45
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class BoxesBookingServiceImpl extends ServiceImpl<BoxesBookingMapper, BoxesBookingEntity> implements BoxesBookingService {
|
||||
|
||||
private final BoxesInfoMapper boxesInfoMapper;
|
||||
|
||||
private final BoxesBookingMapper bookingMapper;
|
||||
|
||||
private final BoxesAvailabilityMapper bookingAvailabilityMapper;
|
||||
@Override
|
||||
@Transactional
|
||||
public R createBooking(AppMakeSaveReqVO createReqVO) {
|
||||
BoxesInfoEntity infoDO = boxesInfoMapper.selectById(createReqVO.getBoxesId());
|
||||
if (infoDO == null) {
|
||||
return R.failed("包厢不存在");
|
||||
}
|
||||
// 验证预约的时间段是否已有预约
|
||||
int useCount=bookingAvailabilityMapper.isMakeTime(createReqVO.getBxDate(), createReqVO.getStartTime(), createReqVO.getEndTime());
|
||||
if (useCount > 0) {
|
||||
return R.failed("当前时间段已被他人预约使用");
|
||||
}
|
||||
//把预定的这部分可用时间改为占用状态
|
||||
bookingAvailabilityMapper.updateStatusByStartTimeAndEndTimeAndBxDate(createReqVO);
|
||||
|
||||
|
||||
//插入预约记录表
|
||||
Long loginUserId = SecurityUtils.getUser().getId();
|
||||
BoxesBookingEntity booking = BeanUtils.toBean(createReqVO, BoxesBookingEntity.class);
|
||||
booking.setUserId(loginUserId);
|
||||
booking.setBookingDate(LocalDate.parse(createReqVO.getBxDate()));
|
||||
booking.setDeptId(infoDO.getDeptId());
|
||||
bookingMapper.insert(booking);
|
||||
|
||||
//todo 工作流部分,待定
|
||||
// Map<String, Object> objectObjectHashMap = new HashMap<>();
|
||||
// objectObjectHashMap.put("deptId", infoDO.getDeptId());
|
||||
// String processInstanceId = processInstanceApi.createProcessInstance(loginUserId,
|
||||
// new BpmProcessInstanceCreateReqDTO().setProcessDefinitionKey(PROCESS_KEY)
|
||||
// .setBusinessKey(String.valueOf(booking.getId()))
|
||||
// .setVariables(objectObjectHashMap));
|
||||
//
|
||||
//
|
||||
// // 将工作流的编号,更新到 OA 请假单中
|
||||
// BookingDO bookingDO = new BookingDO();
|
||||
// bookingDO.setId(booking.getId());
|
||||
// bookingDO.setProcessInstanceId(processInstanceId);
|
||||
|
||||
// bookingMapper.updateById(bookingDO);
|
||||
// 返回
|
||||
return R.ok();
|
||||
}
|
||||
}
|
||||
+55
@@ -3,11 +3,23 @@ package com.bsd.pjcloud.canteen.service.impl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bsd.pjcloud.canteen.entity.BoxesAvailabilityEntity;
|
||||
import com.bsd.pjcloud.canteen.entity.BoxesInfoEntity;
|
||||
import com.bsd.pjcloud.canteen.mapper.BoxesInfoMapper;
|
||||
import com.bsd.pjcloud.canteen.service.BoxesAvailabilityService;
|
||||
import com.bsd.pjcloud.canteen.service.BoxesInfoService;
|
||||
import com.bsd.pjcloud.canteen.vo.APPBXAvaliabilityRespVO;
|
||||
import com.bsd.pjcloud.canteen.vo.AppBXDetailRespVO;
|
||||
import com.bsd.pjcloud.common.core.util.BeanUtils;
|
||||
import com.bsd.pjcloud.common.data.datascope.DataScope;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 包厢信息
|
||||
*
|
||||
@@ -15,9 +27,52 @@ import org.springframework.stereotype.Service;
|
||||
* @date 2024-12-16 21:13:58
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class BoxesInfoServiceImpl extends ServiceImpl<BoxesInfoMapper, BoxesInfoEntity> implements BoxesInfoService {
|
||||
|
||||
private final BoxesAvailabilityService boxesAvailabilityService;
|
||||
@Override
|
||||
public Object pageScope(Page page, LambdaQueryWrapper<BoxesInfoEntity> wrapper) {
|
||||
return baseMapper.selectPageByScope(page,wrapper, DataScope.of());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object saveInfo(BoxesInfoEntity boxesInfo) {
|
||||
baseMapper.insert(boxesInfo);
|
||||
//批量插入未来15天可用时间段
|
||||
|
||||
List<BoxesAvailabilityEntity> availabilityList = new ArrayList<>();
|
||||
LocalDate today = LocalDate.now();
|
||||
int daysToGenerate = 15;
|
||||
|
||||
for (int i = 0; i < daysToGenerate; i++) {
|
||||
LocalDate date = today.plusDays(i);
|
||||
for (int hour = 0; hour < 24; hour++) {
|
||||
BoxesAvailabilityEntity availability = new BoxesAvailabilityEntity();
|
||||
availability.setBoxesId(boxesInfo.getId());
|
||||
availability.setBxDate(date);
|
||||
availability.setHour(LocalTime.of(hour, 0));
|
||||
availability.setHourIndex(hour);
|
||||
availabilityList.add(availability);
|
||||
}
|
||||
}
|
||||
// 批量插入数据
|
||||
boxesAvailabilityService.saveBatch(availabilityList);
|
||||
// 返回
|
||||
return boxesInfo.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AppBXDetailRespVO getAppBXDetailRespVO(Long id, LocalDate date) {
|
||||
BoxesInfoEntity infoDO = baseMapper.selectById(id);
|
||||
// AppBXDetailRespVO appBXDetailRespVO = new AppBXDetailRespVO();
|
||||
AppBXDetailRespVO bean = BeanUtils.toBean(infoDO, AppBXDetailRespVO.class);
|
||||
LambdaQueryWrapper<BoxesAvailabilityEntity> availabilityDOLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
availabilityDOLambdaQueryWrapper.eq(BoxesAvailabilityEntity::getBxDate,date);
|
||||
availabilityDOLambdaQueryWrapper.eq(BoxesAvailabilityEntity::getBoxesId,id);
|
||||
List<BoxesAvailabilityEntity> availabilityDOS = boxesAvailabilityService.list(availabilityDOLambdaQueryWrapper);
|
||||
List<APPBXAvaliabilityRespVO> availabilityDOListBean = BeanUtils.toBean(availabilityDOS, APPBXAvaliabilityRespVO.class);
|
||||
bean.setAvaliabilityRespList(availabilityDOListBean);
|
||||
return bean;
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.bsd.pjcloud.canteen.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bsd.pjcloud.canteen.entity.CanteenOnlineCategoryEntity;
|
||||
import com.bsd.pjcloud.canteen.mapper.CanteenOnlineCategoryMapper;
|
||||
import com.bsd.pjcloud.canteen.service.CanteenOnlineCategoryService;
|
||||
import org.springframework.stereotype.Service;
|
||||
/**
|
||||
* 在线点餐分类
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2024-12-17 13:03:14
|
||||
*/
|
||||
@Service
|
||||
public class CanteenOnlineCategoryServiceImpl extends ServiceImpl<CanteenOnlineCategoryMapper, CanteenOnlineCategoryEntity> implements CanteenOnlineCategoryService {
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.bsd.pjcloud.canteen.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bsd.pjcloud.canteen.entity.CanteenOnlineSpuEntity;
|
||||
import com.bsd.pjcloud.canteen.mapper.CanteenOnlineSpuMapper;
|
||||
import com.bsd.pjcloud.canteen.service.CanteenOnlineSpuService;
|
||||
import org.springframework.stereotype.Service;
|
||||
/**
|
||||
* 在线点餐spu
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2024-12-16 23:42:19
|
||||
*/
|
||||
@Service
|
||||
public class CanteenOnlineSpuServiceImpl extends ServiceImpl<CanteenOnlineSpuMapper, CanteenOnlineSpuEntity> implements CanteenOnlineSpuService {
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.bsd.pjcloud.canteen.mapper.BoxesAvailabilityMapper">
|
||||
|
||||
<resultMap id="boxesAvailabilityMap" type="com.bsd.pjcloud.canteen.entity.BoxesAvailabilityEntity">
|
||||
<id property="id" column="id"/>
|
||||
<result property="boxesId" column="boxes_id"/>
|
||||
<result property="bookingId" column="booking_id"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="bxDate" column="bx_date"/>
|
||||
<result property="hour" column="hour"/>
|
||||
<result property="hourIndex" column="hour_index"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
</resultMap>
|
||||
<select id="findTopByRoomIdOrderByDateDesc"
|
||||
resultMap="boxesAvailabilityMap">
|
||||
SELECT * FROM boxes_availability
|
||||
WHERE boxes_id = #{id}
|
||||
ORDER BY bx_date DESC,hour DESC
|
||||
LIMIT 1
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -19,5 +19,6 @@
|
||||
<result property="totalPrice" column="total_price"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.bsd.pjcloud.canteen.mapper.CanteenOnlineCategoryMapper">
|
||||
|
||||
<resultMap id="canteenOnlineCategoryMap" type="com.bsd.pjcloud.canteen.entity.CanteenOnlineCategoryEntity">
|
||||
<id property="id" column="id"/>
|
||||
<result property="parentId" column="parent_id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="picUrl" column="pic_url"/>
|
||||
<result property="sort" column="sort"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.bsd.pjcloud.canteen.mapper.CanteenOnlineSpuMapper">
|
||||
|
||||
<resultMap id="canteenOnlineSpuMap" type="com.bsd.pjcloud.canteen.entity.CanteenOnlineSpuEntity">
|
||||
<id property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="introduction" column="introduction"/>
|
||||
<result property="description" column="description"/>
|
||||
<result property="categoryId" column="category_id"/>
|
||||
<result property="picUrl" column="pic_url"/>
|
||||
<result property="sliderPicUrls" column="slider_pic_urls"/>
|
||||
<result property="sort" column="sort"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="price" column="price"/>
|
||||
<result property="marketPrice" column="market_price"/>
|
||||
<result property="stock" column="stock"/>
|
||||
<result property="giveIntegral" column="give_integral"/>
|
||||
<result property="salesCount" column="sales_count"/>
|
||||
<result property="virtualSalesCount" column="virtual_sales_count"/>
|
||||
<result property="browseCount" column="browse_count"/>
|
||||
<result property="merchantId" column="merchant_id"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
package com.bsd.pjcloud.common.core.util;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
* Bean 工具类
|
||||
*
|
||||
* 1. 默认使用 {@link BeanUtil} 作为实现类,虽然不同 bean 工具的性能有差别,但是对绝大多数同学的项目,不用在意这点性能
|
||||
* 2. 针对复杂的对象转换,可以搜参考 AuthConvert 实现,通过 mapstruct + default 配合实现
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
public class BeanUtils {
|
||||
|
||||
public static <T> T toBean(Object source, Class<T> targetClass) {
|
||||
return BeanUtil.toBean(source, targetClass);
|
||||
}
|
||||
|
||||
public static <T> T toBean(Object source, Class<T> targetClass, Consumer<T> peek) {
|
||||
T target = toBean(source, targetClass);
|
||||
if (target != null) {
|
||||
peek.accept(target);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
public static <S, T> List<T> toBean(List<S> source, Class<T> targetType) {
|
||||
if (source == null) {
|
||||
return null;
|
||||
}
|
||||
return CollectionUtils.convertList(source, s -> toBean(s, targetType));
|
||||
}
|
||||
|
||||
public static <S, T> List<T> toBean(List<S> source, Class<T> targetType, Consumer<T> peek) {
|
||||
List<T> list = toBean(source, targetType);
|
||||
if (list != null) {
|
||||
list.forEach(peek);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
+321
@@ -0,0 +1,321 @@
|
||||
package com.bsd.pjcloud.common.core.util;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.function.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
/**
|
||||
* Collection 工具类
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
public class CollectionUtils {
|
||||
|
||||
public static boolean containsAny(Object source, Object... targets) {
|
||||
return asList(targets).contains(source);
|
||||
}
|
||||
|
||||
public static boolean isAnyEmpty(Collection<?>... collections) {
|
||||
return Arrays.stream(collections).anyMatch(CollectionUtil::isEmpty);
|
||||
}
|
||||
|
||||
public static <T> boolean anyMatch(Collection<T> from, Predicate<T> predicate) {
|
||||
return from.stream().anyMatch(predicate);
|
||||
}
|
||||
|
||||
public static <T> List<T> filterList(Collection<T> from, Predicate<T> predicate) {
|
||||
if (CollUtil.isEmpty(from)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return from.stream().filter(predicate).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public static <T, R> List<T> distinct(Collection<T> from, Function<T, R> keyMapper) {
|
||||
if (CollUtil.isEmpty(from)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return distinct(from, keyMapper, (t1, t2) -> t1);
|
||||
}
|
||||
|
||||
public static <T, R> List<T> distinct(Collection<T> from, Function<T, R> keyMapper, BinaryOperator<T> cover) {
|
||||
if (CollUtil.isEmpty(from)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return new ArrayList<>(convertMap(from, keyMapper, Function.identity(), cover).values());
|
||||
}
|
||||
|
||||
public static <T, U> List<U> convertList(T[] from, Function<T, U> func) {
|
||||
if (ArrayUtil.isEmpty(from)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return convertList(Arrays.asList(from), func);
|
||||
}
|
||||
|
||||
public static <T, U> List<U> convertList(Collection<T> from, Function<T, U> func) {
|
||||
if (CollUtil.isEmpty(from)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return from.stream().map(func).filter(Objects::nonNull).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public static <T, U> List<U> convertList(Collection<T> from, Function<T, U> func, Predicate<T> filter) {
|
||||
if (CollUtil.isEmpty(from)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return from.stream().filter(filter).map(func).filter(Objects::nonNull).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public static <T, U> List<U> convertListByFlatMap(Collection<T> from,
|
||||
Function<T, ? extends Stream<? extends U>> func) {
|
||||
if (CollUtil.isEmpty(from)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return from.stream().filter(Objects::nonNull).flatMap(func).filter(Objects::nonNull).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public static <T, U, R> List<R> convertListByFlatMap(Collection<T> from,
|
||||
Function<? super T, ? extends U> mapper,
|
||||
Function<U, ? extends Stream<? extends R>> func) {
|
||||
if (CollUtil.isEmpty(from)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return from.stream().map(mapper).filter(Objects::nonNull).flatMap(func).filter(Objects::nonNull).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public static <K, V> List<V> mergeValuesFromMap(Map<K, List<V>> map) {
|
||||
return map.values()
|
||||
.stream()
|
||||
.flatMap(List::stream)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public static <T> Set<T> convertSet(Collection<T> from) {
|
||||
return convertSet(from, v -> v);
|
||||
}
|
||||
|
||||
public static <T, U> Set<U> convertSet(Collection<T> from, Function<T, U> func) {
|
||||
if (CollUtil.isEmpty(from)) {
|
||||
return new HashSet<>();
|
||||
}
|
||||
return from.stream().map(func).filter(Objects::nonNull).collect(Collectors.toSet());
|
||||
}
|
||||
|
||||
public static <T, U> Set<U> convertSet(Collection<T> from, Function<T, U> func, Predicate<T> filter) {
|
||||
if (CollUtil.isEmpty(from)) {
|
||||
return new HashSet<>();
|
||||
}
|
||||
return from.stream().filter(filter).map(func).filter(Objects::nonNull).collect(Collectors.toSet());
|
||||
}
|
||||
|
||||
public static <T, K> Map<K, T> convertMapByFilter(Collection<T> from, Predicate<T> filter, Function<T, K> keyFunc) {
|
||||
if (CollUtil.isEmpty(from)) {
|
||||
return new HashMap<>();
|
||||
}
|
||||
return from.stream().filter(filter).collect(Collectors.toMap(keyFunc, v -> v));
|
||||
}
|
||||
|
||||
public static <T, U> Set<U> convertSetByFlatMap(Collection<T> from,
|
||||
Function<T, ? extends Stream<? extends U>> func) {
|
||||
if (CollUtil.isEmpty(from)) {
|
||||
return new HashSet<>();
|
||||
}
|
||||
return from.stream().filter(Objects::nonNull).flatMap(func).filter(Objects::nonNull).collect(Collectors.toSet());
|
||||
}
|
||||
|
||||
public static <T, U, R> Set<R> convertSetByFlatMap(Collection<T> from,
|
||||
Function<? super T, ? extends U> mapper,
|
||||
Function<U, ? extends Stream<? extends R>> func) {
|
||||
if (CollUtil.isEmpty(from)) {
|
||||
return new HashSet<>();
|
||||
}
|
||||
return from.stream().map(mapper).filter(Objects::nonNull).flatMap(func).filter(Objects::nonNull).collect(Collectors.toSet());
|
||||
}
|
||||
|
||||
public static <T, K> Map<K, T> convertMap(Collection<T> from, Function<T, K> keyFunc) {
|
||||
if (CollUtil.isEmpty(from)) {
|
||||
return new HashMap<>();
|
||||
}
|
||||
return convertMap(from, keyFunc, Function.identity());
|
||||
}
|
||||
|
||||
public static <T, K> Map<K, T> convertMap(Collection<T> from, Function<T, K> keyFunc, Supplier<? extends Map<K, T>> supplier) {
|
||||
if (CollUtil.isEmpty(from)) {
|
||||
return supplier.get();
|
||||
}
|
||||
return convertMap(from, keyFunc, Function.identity(), supplier);
|
||||
}
|
||||
|
||||
public static <T, K, V> Map<K, V> convertMap(Collection<T> from, Function<T, K> keyFunc, Function<T, V> valueFunc) {
|
||||
if (CollUtil.isEmpty(from)) {
|
||||
return new HashMap<>();
|
||||
}
|
||||
return convertMap(from, keyFunc, valueFunc, (v1, v2) -> v1);
|
||||
}
|
||||
|
||||
public static <T, K, V> Map<K, V> convertMap(Collection<T> from, Function<T, K> keyFunc, Function<T, V> valueFunc, BinaryOperator<V> mergeFunction) {
|
||||
if (CollUtil.isEmpty(from)) {
|
||||
return new HashMap<>();
|
||||
}
|
||||
return convertMap(from, keyFunc, valueFunc, mergeFunction, HashMap::new);
|
||||
}
|
||||
|
||||
public static <T, K, V> Map<K, V> convertMap(Collection<T> from, Function<T, K> keyFunc, Function<T, V> valueFunc, Supplier<? extends Map<K, V>> supplier) {
|
||||
if (CollUtil.isEmpty(from)) {
|
||||
return supplier.get();
|
||||
}
|
||||
return convertMap(from, keyFunc, valueFunc, (v1, v2) -> v1, supplier);
|
||||
}
|
||||
|
||||
public static <T, K, V> Map<K, V> convertMap(Collection<T> from, Function<T, K> keyFunc, Function<T, V> valueFunc, BinaryOperator<V> mergeFunction, Supplier<? extends Map<K, V>> supplier) {
|
||||
if (CollUtil.isEmpty(from)) {
|
||||
return new HashMap<>();
|
||||
}
|
||||
return from.stream().collect(Collectors.toMap(keyFunc, valueFunc, mergeFunction, supplier));
|
||||
}
|
||||
|
||||
public static <T, K> Map<K, List<T>> convertMultiMap(Collection<T> from, Function<T, K> keyFunc) {
|
||||
if (CollUtil.isEmpty(from)) {
|
||||
return new HashMap<>();
|
||||
}
|
||||
return from.stream().collect(Collectors.groupingBy(keyFunc, Collectors.mapping(t -> t, Collectors.toList())));
|
||||
}
|
||||
|
||||
public static <T, K, V> Map<K, List<V>> convertMultiMap(Collection<T> from, Function<T, K> keyFunc, Function<T, V> valueFunc) {
|
||||
if (CollUtil.isEmpty(from)) {
|
||||
return new HashMap<>();
|
||||
}
|
||||
return from.stream()
|
||||
.collect(Collectors.groupingBy(keyFunc, Collectors.mapping(valueFunc, Collectors.toList())));
|
||||
}
|
||||
|
||||
// 暂时没想好名字,先以 2 结尾噶
|
||||
public static <T, K, V> Map<K, Set<V>> convertMultiMap2(Collection<T> from, Function<T, K> keyFunc, Function<T, V> valueFunc) {
|
||||
if (CollUtil.isEmpty(from)) {
|
||||
return new HashMap<>();
|
||||
}
|
||||
return from.stream().collect(Collectors.groupingBy(keyFunc, Collectors.mapping(valueFunc, Collectors.toSet())));
|
||||
}
|
||||
|
||||
// public static <T, K> Map<K, T> convertImmutableMap(Collection<T> from, Function<T, K> keyFunc) {
|
||||
// if (CollUtil.isEmpty(from)) {
|
||||
// return Collections.emptyMap();
|
||||
// }
|
||||
// ImmutableMap.Builder<K, T> builder = ImmutableMap.builder();
|
||||
// from.forEach(item -> builder.put(keyFunc.apply(item), item));
|
||||
// return builder.build();
|
||||
// }
|
||||
|
||||
/**
|
||||
* 对比老、新两个列表,找出新增、修改、删除的数据
|
||||
*
|
||||
* @param oldList 老列表
|
||||
* @param newList 新列表
|
||||
* @param sameFunc 对比函数,返回 true 表示相同,返回 false 表示不同
|
||||
* 注意,same 是通过每个元素的“标识”,判断它们是不是同一个数据
|
||||
* @return [新增列表、修改列表、删除列表]
|
||||
*/
|
||||
public static <T> List<List<T>> diffList(Collection<T> oldList, Collection<T> newList,
|
||||
BiFunction<T, T, Boolean> sameFunc) {
|
||||
List<T> createList = new LinkedList<>(newList); // 默认都认为是新增的,后续会进行移除
|
||||
List<T> updateList = new ArrayList<>();
|
||||
List<T> deleteList = new ArrayList<>();
|
||||
|
||||
// 通过以 oldList 为主遍历,找出 updateList 和 deleteList
|
||||
for (T oldObj : oldList) {
|
||||
// 1. 寻找是否有匹配的
|
||||
T foundObj = null;
|
||||
for (Iterator<T> iterator = createList.iterator(); iterator.hasNext(); ) {
|
||||
T newObj = iterator.next();
|
||||
// 1.1 不匹配,则直接跳过
|
||||
if (!sameFunc.apply(oldObj, newObj)) {
|
||||
continue;
|
||||
}
|
||||
// 1.2 匹配,则移除,并结束寻找
|
||||
iterator.remove();
|
||||
foundObj = newObj;
|
||||
break;
|
||||
}
|
||||
// 2. 匹配添加到 updateList;不匹配则添加到 deleteList 中
|
||||
if (foundObj != null) {
|
||||
updateList.add(foundObj);
|
||||
} else {
|
||||
deleteList.add(oldObj);
|
||||
}
|
||||
}
|
||||
return asList(createList, updateList, deleteList);
|
||||
}
|
||||
|
||||
public static boolean containsAny(Collection<?> source, Collection<?> candidates) {
|
||||
return org.springframework.util.CollectionUtils.containsAny(source, candidates);
|
||||
}
|
||||
|
||||
public static <T> T getFirst(List<T> from) {
|
||||
return !CollectionUtil.isEmpty(from) ? from.get(0) : null;
|
||||
}
|
||||
|
||||
public static <T> T findFirst(Collection<T> from, Predicate<T> predicate) {
|
||||
return findFirst(from, predicate, Function.identity());
|
||||
}
|
||||
|
||||
public static <T, U> U findFirst(Collection<T> from, Predicate<T> predicate, Function<T, U> func) {
|
||||
if (CollUtil.isEmpty(from)) {
|
||||
return null;
|
||||
}
|
||||
return from.stream().filter(predicate).findFirst().map(func).orElse(null);
|
||||
}
|
||||
|
||||
public static <T, V extends Comparable<? super V>> V getMaxValue(Collection<T> from, Function<T, V> valueFunc) {
|
||||
if (CollUtil.isEmpty(from)) {
|
||||
return null;
|
||||
}
|
||||
assert !from.isEmpty(); // 断言,避免告警
|
||||
T t = from.stream().max(Comparator.comparing(valueFunc)).get();
|
||||
return valueFunc.apply(t);
|
||||
}
|
||||
|
||||
public static <T, V extends Comparable<? super V>> V getMinValue(List<T> from, Function<T, V> valueFunc) {
|
||||
if (CollUtil.isEmpty(from)) {
|
||||
return null;
|
||||
}
|
||||
assert from.size() > 0; // 断言,避免告警
|
||||
T t = from.stream().min(Comparator.comparing(valueFunc)).get();
|
||||
return valueFunc.apply(t);
|
||||
}
|
||||
|
||||
public static <T, V extends Comparable<? super V>> V getSumValue(List<T> from, Function<T, V> valueFunc,
|
||||
BinaryOperator<V> accumulator) {
|
||||
return getSumValue(from, valueFunc, accumulator, null);
|
||||
}
|
||||
|
||||
public static <T, V extends Comparable<? super V>> V getSumValue(Collection<T> from, Function<T, V> valueFunc,
|
||||
BinaryOperator<V> accumulator, V defaultValue) {
|
||||
if (CollUtil.isEmpty(from)) {
|
||||
return defaultValue;
|
||||
}
|
||||
assert !from.isEmpty(); // 断言,避免告警
|
||||
return from.stream().map(valueFunc).filter(Objects::nonNull).reduce(accumulator).orElse(defaultValue);
|
||||
}
|
||||
|
||||
public static <T> void addIfNotNull(Collection<T> coll, T item) {
|
||||
if (item == null) {
|
||||
return;
|
||||
}
|
||||
coll.add(item);
|
||||
}
|
||||
|
||||
public static <T> Collection<T> singleton(T obj) {
|
||||
return obj == null ? Collections.emptyList() : Collections.singleton(obj);
|
||||
}
|
||||
|
||||
public static <T> List<T> newArrayList(List<List<T>> list) {
|
||||
return list.stream().flatMap(Collection::stream).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
[0.014s][info][gc] Using G1
|
||||
[1.679s][info][gc] GC(0) Pause Young (Normal) (G1 Evacuation Pause) 102M->12M(2048M) 5.347ms
|
||||
[2.695s][info][gc] GC(1) Pause Young (Normal) (G1 Evacuation Pause) 103M->15M(2048M) 5.572ms
|
||||
[3.279s][info][gc] GC(2) Pause Young (Normal) (G1 Evacuation Pause) 124M->18M(2048M) 3.129ms
|
||||
[7426.520s][info][gc] GC(3) Pause Young (Normal) (G1 Evacuation Pause) 411M->29M(2048M) 64.581ms
|
||||
[1.633s][info][gc] GC(0) Pause Young (Normal) (G1 Evacuation Pause) 102M->12M(2048M) 5.374ms
|
||||
[2.783s][info][gc] GC(1) Pause Young (Normal) (G1 Evacuation Pause) 103M->16M(2048M) 5.196ms
|
||||
[3.338s][info][gc] GC(2) Pause Young (Normal) (G1 Evacuation Pause) 125M->18M(2048M) 3.128ms
|
||||
[235.964s][info][gc] GC(3) Pause Young (Normal) (G1 Evacuation Pause) 259M->28M(2048M) 9.440ms
|
||||
[21628.241s][info][gc] GC(4) Pause Young (Normal) (G1 Evacuation Pause) 441M->28M(2048M) 130.697ms
|
||||
@@ -1,4 +1,5 @@
|
||||
[0.016s][info][gc] Using G1
|
||||
[1.624s][info][gc] GC(0) Pause Young (Normal) (G1 Evacuation Pause) 102M->12M(2048M) 6.331ms
|
||||
[2.854s][info][gc] GC(1) Pause Young (Normal) (G1 Evacuation Pause) 103M->16M(2048M) 5.636ms
|
||||
[3.466s][info][gc] GC(2) Pause Young (Normal) (G1 Evacuation Pause) 125M->19M(2048M) 3.007ms
|
||||
[0.015s][info][gc] Using G1
|
||||
[1.640s][info][gc] GC(0) Pause Young (Normal) (G1 Evacuation Pause) 102M->12M(2048M) 5.298ms
|
||||
[5.063s][info][gc] GC(1) Pause Young (Normal) (G1 Evacuation Pause) 103M->16M(2048M) 4.966ms
|
||||
[5.633s][info][gc] GC(2) Pause Young (Normal) (G1 Evacuation Pause) 125M->19M(2048M) 3.030ms
|
||||
[29.043s][info][gc] GC(3) Pause Young (Normal) (G1 Evacuation Pause) 248M->26M(2048M) 7.181ms
|
||||
Reference in new issue
Block a user