|
@@ -16,6 +16,7 @@ import com.management.platform.util.HttpRespMsg;
|
|
import org.springframework.util.StringUtils;
|
|
import org.springframework.util.StringUtils;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
@@ -44,8 +45,8 @@ public class OrderController {
|
|
private OrderProductDetailService orderProductDetailService;
|
|
private OrderProductDetailService orderProductDetailService;
|
|
|
|
|
|
@RequestMapping("/list")
|
|
@RequestMapping("/list")
|
|
- public HttpRespMsg list(String userId, String orderName,String orderCode, String productCode, Integer pageIndex, Integer pageSize){
|
|
|
|
- return orderService.getList(userId,orderName,orderCode,productCode,pageIndex,pageSize);
|
|
|
|
|
|
+ public HttpRespMsg list(String userId, String orderName,String orderCode, String productCode, Integer pageIndex, Integer pageSize,Integer isDelete){
|
|
|
|
+ return orderService.getList(userId,orderName,orderCode,productCode,pageIndex,pageSize,isDelete);
|
|
}
|
|
}
|
|
|
|
|
|
@RequestMapping("/addOrUpdate")
|
|
@RequestMapping("/addOrUpdate")
|
|
@@ -80,5 +81,30 @@ public class OrderController {
|
|
}
|
|
}
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @RequestMapping("/delete")
|
|
|
|
+ public HttpRespMsg delete(Integer id){
|
|
|
|
+ HttpRespMsg msg=new HttpRespMsg();
|
|
|
|
+ Order order = orderService.getById(id);
|
|
|
|
+ order.setIsDelete(1);
|
|
|
|
+ if(!orderService.updateById(order)){
|
|
|
|
+ msg.setError("验证失败");
|
|
|
|
+ return msg;
|
|
|
|
+ }
|
|
|
|
+ return msg;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @RequestMapping("/recover")
|
|
|
|
+ public HttpRespMsg recover(Integer id){
|
|
|
|
+ HttpRespMsg msg=new HttpRespMsg();
|
|
|
|
+ Order order = orderService.getById(id);
|
|
|
|
+ order.setIsDelete(0);
|
|
|
|
+ if(!orderService.updateById(order)){
|
|
|
|
+ msg.setError("验证失败");
|
|
|
|
+ return msg;
|
|
|
|
+ }
|
|
|
|
+ return msg;
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|