|
|
|
@ -47,7 +47,22 @@ public class OrderController {
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//更新订单
|
|
|
|
|
//更新订单状态
|
|
|
|
|
@ResponseBody
|
|
|
|
|
@GetMapping("/updateorder")
|
|
|
|
|
public Result updateOrder(@RequestParam("orderid")String orderid,@RequestParam("state")int states){
|
|
|
|
|
int state=orderMapper.updateOrder(orderid,states);
|
|
|
|
|
if(state>0){
|
|
|
|
|
res.setCode(0);
|
|
|
|
|
res.setMsg("更新订单成功");
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
res.setCode(-1);
|
|
|
|
|
res.setMsg("更新订单失败");
|
|
|
|
|
}
|
|
|
|
|
res.data=null;
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//生成订单>>主键设为自增,state默认设为0
|
|
|
|
|
@ResponseBody
|
|
|
|
@ -68,5 +83,20 @@ public class OrderController {
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//删除订单
|
|
|
|
|
//删除订单>>根据订单号删除对应订单
|
|
|
|
|
@ResponseBody
|
|
|
|
|
@GetMapping("/deleteorder")
|
|
|
|
|
public Result deleteOrder(@RequestParam("orderid")String orderid){
|
|
|
|
|
int state=orderMapper.deleteOrder(orderid);
|
|
|
|
|
if(state>0){
|
|
|
|
|
res.setCode(0);
|
|
|
|
|
res.setMsg("删除订单成功");
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
res.setCode(-1);
|
|
|
|
|
res.setMsg("删除订单失败");
|
|
|
|
|
}
|
|
|
|
|
res.data=null;
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|