Commit 2ec333aa by 吕明尚

修改套餐分页因筛选导致的分页失败,修改自动开始预约订单到时间自动通电

parent dda748e1
......@@ -3,6 +3,8 @@ package share.web.controller.system;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -42,7 +44,7 @@ public class PackController extends BaseController {
@GetMapping("/list")
public TableDataInfo list(SPack SPack) {
startPage();
List<SPack> list = packService.selectPackList(SPack);
List<SPack> list = packService.pageList(SPack);
return getDataTable(list);
}
......@@ -52,7 +54,7 @@ public class PackController extends BaseController {
// @PreAuthorize("@ss.hasPermi('system:pack:list')")
@GetMapping("/query")
public R<List<SPack>> query() {
return R.ok(packService.selectPackList(new SPack()));
return R.ok(packService.list());
}
/**
......@@ -62,7 +64,8 @@ public class PackController extends BaseController {
@Log(title = "套餐", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SPack SPack) {
List<SPack> list = packService.selectPackList(SPack);
Wrapper<SPack> wrapper = new LambdaQueryWrapper<>(SPack);
List<SPack> list = packService.list(wrapper);
ExcelUtil<SPack> util = new ExcelUtil<SPack>(SPack.class);
util.exportExcel(response, list, "套餐数据");
}
......
......@@ -290,10 +290,10 @@ public class OrderTask {
room.setUpdateTime(new Date());
}
});
logger.info("开始通电!!!!");
// logger.info("开始通电!!!!");
//到达预定时间进行通电
deviceOpService.openOrCloseDevice(item.getRoomId(), item.getConsumerPhone(), OpTypeEnum.GET_ELECTRIC.getCode(), false, ZERO);
logger.info("通电完成!!!!");
// deviceOpService.openOrCloseDevice(item.getRoomId(), item.getConsumerPhone(), OpTypeEnum.GET_ELECTRIC.getCode(), false, ZERO);
// logger.info("通电完成!!!!");
redisUtil.delete(ReceiptRdeisEnum.ORDER_NO.getValue() + item.getOrderNo());
}
});
......
......@@ -63,4 +63,6 @@ public interface IPackService extends IService<SPack> {
List<SPack> selectPackListByIds(List<Long> packIds);
Long addPack(SPack sPack);
List<SPack> pageList(SPack sPack);
}
......@@ -153,4 +153,9 @@ public class PackServiceImpl extends ServiceImpl<PackMapper, SPack> implements I
baseMapper.insertPack(sPack);
return sPack.getId();
}
@Override
public List<SPack> pageList(SPack sPack) {
return baseMapper.selectPackList(sPack);
}
}
......@@ -771,6 +771,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
wechatNewService.sendMiniSubscribeMessage(sOrder, MessageReminderEnum.RESERVER);
sOrder.setStartDate(sOrder.getPreStartDate());
sOrder.setEndDate(sOrder.getPreEndDate());
sOrder.setArrivalTime(new Date());
sOrder.setStatus(OrderStatusEnum.INUSE.getCode());
Map<String, String> map = new HashMap<>();
map.put("orderNo", sOrder.getOrderNo());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment