package selling.sunshine.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
import selling.sunshine.form.TimeRangeForm;
import selling.sunshine.utils.ResponseCode;
import selling.sunshine.utils.ResultData;

import javax.validation.Valid;

/**
 * Created by sunshine on 7/13/16.
 */
@RequestMapping("/deliver")
@RestController
public class DeliverController {
    private Logger logger = LoggerFactory.getLogger(DeliverController.class);

    @RequestMapping(method = RequestMethod.GET, value = "/overview")
    public ModelAndView deliver() {
        ModelAndView view = new ModelAndView();

        return view;
    }

    @RequestMapping(method = RequestMethod.POST, value = "/overview")
    public ResultData deliver(@Valid TimeRangeForm form, BindingResult result) {
        ResultData data = new ResultData();
        if (result.hasErrors()) {
            data.setResponseCode(ResponseCode.RESPONSE_ERROR);
            return data;
        }
        return data;
    }
}

@@ -88,16 +88,79 @@
 actory;%0A
+import org.springframework.beans.factory.annotation.Autowired;%0A
 import o
@@ -204,16 +204,16 @@
 Result;%0A
-
 import o
@@ -489,16 +489,110 @@
 geForm;%0A
+import selling.sunshine.service.DeliverService;%0Aimport selling.sunshine.service.OrderService;%0A
 import s
@@ -700,16 +700,64 @@
 n.Valid;
+%0Aimport java.util.HashMap;%0Aimport java.util.Map;
 %0A%0A/**%0A *
@@ -945,24 +945,138 @@
 er.class);%0A%0A
+    @Autowired%0A    private OrderService orderService;%0A%0A    @Autowired%0A    private DeliverService deliverService;%0A%0A
     @Request
@@ -1558,24 +1558,24 @@
 eturn data;%0A
-
         %7D%0A  
@@ -1572,16 +1572,74 @@
       %7D%0A
+        Map%3CString, Object%3E condition = new HashMap%3C%3E();%0A%0A
         

modify deliver controller