提交代码

dev-discount
胡锐 3 years ago
parent f87fae9e39
commit 7376e81592
  1. 16
      hai-cweb/src/main/java/com/cweb/controller/HighOrderPreController.java
  2. 7
      hai-service/src/main/java/com/hai/service/HighOrderPreService.java
  3. 25
      hai-service/src/main/java/com/hai/service/impl/HighOrderPreServiceImpl.java

@ -88,7 +88,7 @@ public class HighOrderPreController {
@RequestMapping(value = "/getOrderPreById", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "根据id查询预约订单详情")
@ApiOperation(value = "根据预约订单id 查询预约订单详情")
public ResponseData getOrderPreById(@RequestParam(name = "orderPreId", required = true) Long orderPreId) {
try {
@ -100,6 +100,20 @@ public class HighOrderPreController {
}
}
@RequestMapping(value = "/getPreByOrderIdId", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "根据订单id 查询预约订单详情")
public ResponseData getPreByOrderIdId(@RequestParam(name = "orderId", required = true) Long orderId) {
try {
return ResponseMsgUtil.success(highOrderPreService.getPreByOrderId(orderId));
} catch (Exception e) {
log.error("HighOrderController --> getPreByOrderIdId() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/orderComplete", method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "订单完成")

@ -24,6 +24,13 @@ public interface HighOrderPreService {
**/
HighOrderPre findByOrderId(Long orderId);
/**
* 根据订单ID 查询预约信息
* @param orderId
* @return
*/
HighOrderPre getPreByOrderId(Long orderId);
/**
* @Author Sum1Dream
* @Description // 根据订单号查询订单

@ -62,13 +62,13 @@ public class HighOrderPreServiceImpl implements HighOrderPreService {
criteria.andPreUserPhoneEqualTo(MapUtils.getString(map, "userPhone"));
}
<<<<<<< HEAD
if (StringUtils.isNotBlank(MapUtils.getString(map,"createTimeS"))
&& StringUtils.isNotBlank(MapUtils.getString(map,"createTimeE"))) {
criteria.andCreateTimeBetween(
DateUtil.format(MapUtils.getString(map,"createTimeS") , "yyyy-MM-dd HH:mm:ss") ,
DateUtil.format(MapUtils.getString(map,"createTimeE") , "yyyy-MM-dd HH:mm:ss"));
=======
}
if (MapUtils.getString(map, "preOrderNo") != null) {
criteria.andPreOrderNoLike("%" + MapUtils.getString(map, "preOrderNo") + "%");
}
@ -77,13 +77,6 @@ public class HighOrderPreServiceImpl implements HighOrderPreService {
criteria.andPreUserNameLike("%" + MapUtils.getString(map, "preUserName") + "%");
}
if (MapUtils.getString(map , "createTimeS") !=null && MapUtils.getString(map , "createTimeE") != null) {
criteria.andCreateTimeBetween(
DateUtil.format(MapUtils.getString(map , "createTimeS") , "yyyy-MM-dd HH:mm:ss") ,
DateUtil.format(MapUtils.getString(map , "createTimeE") , "yyyy-MM-dd HH:mm:ss"));
>>>>>>> 635a7e3af19c875fe2f81995c7898dd251b70d32
}
return highOrderPreMapper.selectByExample(example);
}
@ -92,6 +85,17 @@ public class HighOrderPreServiceImpl implements HighOrderPreService {
return highOrderPreMapper.selectByPrimaryKey(orderId);
}
@Override
public HighOrderPre getPreByOrderId(Long orderId) {
HighOrderPreExample example = new HighOrderPreExample();
example.createCriteria().andOrderIdEqualTo(orderId);
List<HighOrderPre> list = highOrderPreMapper.selectByExample(example);
if (list.size() > 0) {
return list.get(0);
}
return null;
}
@Override
public HighOrderPre findByOrderNo(String orderNo) {
return null;
@ -99,11 +103,8 @@ public class HighOrderPreServiceImpl implements HighOrderPreService {
@Override
public void insertOrderPre(HighOrderPre highOrderPre) {
<<<<<<< HEAD
highOrderPre.setCreateTime(new Date());
highOrderPre.setUpdateTime(new Date());
=======
>>>>>>> 635a7e3af19c875fe2f81995c7898dd251b70d32
highOrderPreMapper.insert(highOrderPre);
}

Loading…
Cancel
Save