Commit db37bd1e authored by jiaorz's avatar jiaorz

新增旅游订单接口

parent 621233ea
......@@ -15,7 +15,7 @@ import java.util.List;
@RestController
@RequestMapping(value = "/orderVehicle")
@Api(value="交还车记录",tags={"交还车记录"})
@Api(value = "交还车记录", tags = {"交还车记录"})
@Slf4j
public class OrderVehicleCrosstownController {
......@@ -26,13 +26,13 @@ public class OrderVehicleCrosstownController {
@ApiOperation(value = "添加交还车记录")
public ObjectRestResponse<?> add(OrderVehicaleCrosstown orderVehicaleCrosstown) {
log.info("添加的参数:orderVehicaleCrosstown = {}", orderVehicaleCrosstown);
if(orderVehicaleCrosstown == null) {
if (orderVehicaleCrosstown == null) {
return ObjectRestResponse.createFailedResult(500, "参数为空!");
}
if(orderVehicaleCrosstown.getId() != null) {
if (orderVehicaleCrosstown.getId() != null) {
OrderVehicaleCrosstown oldValue = orderVehicalCrosstownBiz.get(orderVehicaleCrosstown.getId());
if(oldValue != null) {
BeanUtil.copyProperties(orderVehicaleCrosstown,oldValue,CopyOptions.create().setIgnoreNullValue(true).setIgnoreError(true));
if (oldValue != null) {
BeanUtil.copyProperties(orderVehicaleCrosstown, oldValue, CopyOptions.create().setIgnoreNullValue(true).setIgnoreError(true));
orderVehicalCrosstownBiz.updateSelectiveById(oldValue);
return ObjectRestResponse.succ();
}
......@@ -54,10 +54,10 @@ public class OrderVehicleCrosstownController {
@GetMapping(value = "/getByOrderId")
@ApiOperation(value = "根据订单Id获取所有记录信息")
public ObjectRestResponse<List<OrderVehicaleCrosstown>> getByOrderId(OrderVehicaleCrosstown orderVehicaleCrosstown) {
if(orderVehicaleCrosstown == null) {
if (orderVehicaleCrosstown == null) {
return ObjectRestResponse.createFailedResult(500, "参数orderId为空");
}
return ObjectRestResponse.succ( orderVehicalCrosstownBiz.selectByOrderId(orderVehicaleCrosstown));
return ObjectRestResponse.succ(orderVehicalCrosstownBiz.selectByOrderId(orderVehicaleCrosstown));
}
}
......@@ -102,7 +102,6 @@
<if test="status != null">
and b.status = #{status}
</if>
and b.type = 1
<if test="no != null">
and no like CONCAT ("%", #{no}, "%")
</if>
......
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