Compare commits
5 Commits
e19200eb5b
...
0da862a180
Author | SHA1 | Date | |
---|---|---|---|
0da862a180 | |||
8fc219ad38 | |||
6f2f58fbe9 | |||
ad20ae2c4b | |||
9ecb0ff24a |
@ -130,16 +130,19 @@ public class AppSeckillActivityController {
|
|||||||
|
|
||||||
@GetMapping("/spuList")
|
@GetMapping("/spuList")
|
||||||
@Parameter(name = "count", description = "需要展示的数量", example = "6")
|
@Parameter(name = "count", description = "需要展示的数量", example = "6")
|
||||||
@Operation(summary = "获得现在进行的秒杀活动分页")
|
@Operation(summary = "获得秒杀活动分页")
|
||||||
public CommonResult<List<ProductSpuRespDTO>> getSeckillActivitySupList(@RequestParam(name = "count", defaultValue = "3") Integer count) {
|
public CommonResult<List<ProductSpuRespDTO>> getSeckillActivitySupList(@RequestParam(name = "count", defaultValue = "3") Integer count) {
|
||||||
AppSeckillActivityPageReqVO pageReqVO = new AppSeckillActivityPageReqVO();
|
AppSeckillActivityPageReqVO pageReqVO = new AppSeckillActivityPageReqVO();
|
||||||
Page<SeckillActivityDO> page = new Page<>(1, 3);
|
|
||||||
;
|
|
||||||
if (count != null && count != 0) {
|
if (count != null && count != 0) {
|
||||||
page = new Page<>(1, count);
|
pageReqVO.setPageNo(1);
|
||||||
|
pageReqVO.setPageSize(count);
|
||||||
}
|
}
|
||||||
|
// Page<SeckillActivityDO> page = new Page<>(1, 3);
|
||||||
|
// if (count != null && count != 0) {
|
||||||
|
// page = new Page<>(1, count);
|
||||||
|
// }
|
||||||
// 先找出当前时间对应的配置时间段id
|
// 先找出当前时间对应的配置时间段id
|
||||||
List<Long> configIdList = new ArrayList<>();
|
/* List<Long> configIdList = new ArrayList<>();
|
||||||
try {
|
try {
|
||||||
List<SeckillConfigDO> timeList = configService.getSeckillConfigListByStatus(CommonStatusEnum.ENABLE.getStatus());
|
List<SeckillConfigDO> timeList = configService.getSeckillConfigListByStatus(CommonStatusEnum.ENABLE.getStatus());
|
||||||
SimpleDateFormat format = new SimpleDateFormat("HH:mm");
|
SimpleDateFormat format = new SimpleDateFormat("HH:mm");
|
||||||
@ -159,9 +162,9 @@ public class AppSeckillActivityController {
|
|||||||
return success(null);
|
return success(null);
|
||||||
}
|
}
|
||||||
// 获取满足当前正在进行的活动
|
// 获取满足当前正在进行的活动
|
||||||
PageResult<SeckillActivityDO> pageResult = activityService.getRunningActivityByConfigIdsCount(configIdList, page);
|
PageResult<SeckillActivityDO> pageResult = activityService.getRunningActivityByConfigIdsCount(configIdList, page);*/
|
||||||
// 1. 查询满足当前阶段的活动
|
// 1. 查询满足当前阶段的活动
|
||||||
// PageResult<SeckillActivityDO> pageResult = activityService.getSeckillActivityAppPageByConfigId(pageReqVO);
|
PageResult<SeckillActivityDO> pageResult = activityService.getSeckillActivityAppPageByConfigId(pageReqVO);
|
||||||
if (CollUtil.isEmpty(pageResult.getList())) {
|
if (CollUtil.isEmpty(pageResult.getList())) {
|
||||||
return success(null);
|
return success(null);
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ public class LitemallReservationSaveReqVO {
|
|||||||
|
|
||||||
@Schema(description = "预约时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "预约时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@NotNull(message = "预约时间不能为空")
|
@NotNull(message = "预约时间不能为空")
|
||||||
private LocalDateTime reAddTime;
|
private String reAddTime;
|
||||||
|
|
||||||
@Schema(description = "预约时间段", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "预约时间段", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
// @NotNull(message = "预约时间段不能为空")
|
// @NotNull(message = "预约时间段不能为空")
|
||||||
|
@ -7,6 +7,7 @@ import cn.iocoder.yudao.module.srbscribe.controller.admin.reservation.vo.Litemal
|
|||||||
import cn.iocoder.yudao.module.srbscribe.controller.admin.reservation.vo.LitemallReservationRespVO;
|
import cn.iocoder.yudao.module.srbscribe.controller.admin.reservation.vo.LitemallReservationRespVO;
|
||||||
import cn.iocoder.yudao.module.srbscribe.controller.admin.reservation.vo.LitemallReservationSaveReqVO;
|
import cn.iocoder.yudao.module.srbscribe.controller.admin.reservation.vo.LitemallReservationSaveReqVO;
|
||||||
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.reservation.LitemallReservationDO;
|
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.reservation.LitemallReservationDO;
|
||||||
|
import cn.iocoder.yudao.module.srbscribe.dal.dataobject.technician.LitemallTechnicianDO;
|
||||||
import cn.iocoder.yudao.module.srbscribe.service.reservation.LitemallReservationService;
|
import cn.iocoder.yudao.module.srbscribe.service.reservation.LitemallReservationService;
|
||||||
import cn.iocoder.yudao.module.srbscribe.util.AjaxResult;
|
import cn.iocoder.yudao.module.srbscribe.util.AjaxResult;
|
||||||
import cn.iocoder.yudao.module.srbscribe.util.StringUtils;
|
import cn.iocoder.yudao.module.srbscribe.util.StringUtils;
|
||||||
@ -78,14 +79,40 @@ public class AppReservationController {
|
|||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * 新增预约管理
|
||||||
|
// */
|
||||||
|
// @PostMapping
|
||||||
|
// public CommonResult<Long> createLitemallReservation(@RequestBody LitemallReservationSaveReqVO createReqVO) {
|
||||||
|
// return success(litemallReservationService.createLitemallReservation(createReqVO));
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * 新增预约管理
|
||||||
|
// */
|
||||||
|
// @PostMapping("/add")
|
||||||
|
// public CommonResult<Long> createLitemallReservation(@RequestBody LitemallReservationSaveReqVO litemallReservationDO) {
|
||||||
|
// return success(litemallReservationService.createReservation(litemallReservationDO));
|
||||||
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增预约管理
|
* 新增预约管理
|
||||||
*/
|
*/
|
||||||
@PostMapping
|
@PostMapping("/add")
|
||||||
public CommonResult<Long> createLitemallReservation(@RequestBody LitemallReservationSaveReqVO createReqVO) {
|
public CommonResult<Long> createLitemallReservation(Integer type,String brandId,String technicianId,String reAddTime,String hsstr,Long userId) {
|
||||||
return success(litemallReservationService.createLitemallReservation(createReqVO));
|
|
||||||
|
LitemallReservationSaveReqVO litemallReservationSaveReqVO = new LitemallReservationSaveReqVO();
|
||||||
|
litemallReservationSaveReqVO.setType(type);
|
||||||
|
litemallReservationSaveReqVO.setBrandId(brandId);
|
||||||
|
litemallReservationSaveReqVO.setTechnicianId(technicianId);
|
||||||
|
litemallReservationSaveReqVO.setReAddTime(reAddTime);
|
||||||
|
litemallReservationSaveReqVO.setHsstr(hsstr);
|
||||||
|
litemallReservationSaveReqVO.setUserId(userId);
|
||||||
|
|
||||||
|
return success(litemallReservationService.createReservation(litemallReservationSaveReqVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
// * 修改预约管理
|
// * 修改预约管理
|
||||||
// */
|
// */
|
||||||
|
@ -33,6 +33,8 @@ public interface LitemallReservationService {
|
|||||||
*/
|
*/
|
||||||
Long createLitemallReservation(@Valid LitemallReservationSaveReqVO createReqVO);
|
Long createLitemallReservation(@Valid LitemallReservationSaveReqVO createReqVO);
|
||||||
|
|
||||||
|
Long createReservation(LitemallReservationSaveReqVO litemallReservationDO);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新预约订单
|
* 更新预约订单
|
||||||
*
|
*
|
||||||
|
@ -68,6 +68,13 @@ public class LitemallReservationServiceImpl implements LitemallReservationServic
|
|||||||
return litemallReservation.getId();
|
return litemallReservation.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long createReservation(LitemallReservationSaveReqVO litemallReservationDO) {
|
||||||
|
LitemallReservationDO litemallReservation = BeanUtils.toBean(litemallReservationDO, LitemallReservationDO.class);
|
||||||
|
litemallReservationMapper.insert(litemallReservation);
|
||||||
|
return litemallReservation.getId();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateLitemallReservation(LitemallReservationSaveReqVO updateReqVO) {
|
public void updateLitemallReservation(LitemallReservationSaveReqVO updateReqVO) {
|
||||||
// 校验存在
|
// 校验存在
|
||||||
@ -105,7 +112,7 @@ public class LitemallReservationServiceImpl implements LitemallReservationServic
|
|||||||
LitemallBrandDO litemallBrandDO = litemallBrandMapper.selectOne("id", litemallReservationDO.getBrandId());
|
LitemallBrandDO litemallBrandDO = litemallBrandMapper.selectOne("id", litemallReservationDO.getBrandId());
|
||||||
litemallReservationDO.setBrandName(litemallBrandDO.getName());
|
litemallReservationDO.setBrandName(litemallBrandDO.getName());
|
||||||
|
|
||||||
LitemallTechnicianDO litemallTechnicianDO = litemallTechnicianMapper.selectOne("id", litemallReservationDO.getId());
|
LitemallTechnicianDO litemallTechnicianDO = litemallTechnicianMapper.selectOne("id", litemallReservationDO.getTechnicianId());
|
||||||
litemallReservationDO.setTechnicianName(litemallTechnicianDO.getTechnicianName());
|
litemallReservationDO.setTechnicianName(litemallTechnicianDO.getTechnicianName());
|
||||||
|
|
||||||
MemberUserDO memberUserDO = memberUserMapper.selectOne("id", litemallReservationDO.getUserId());
|
MemberUserDO memberUserDO = memberUserMapper.selectOne("id", litemallReservationDO.getUserId());
|
||||||
|
Loading…
Reference in New Issue
Block a user