|
|
@@ -1,14 +1,18 @@
|
|
|
package com.style24.scm.biz.web;
|
|
|
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
import com.gagaframework.web.parameter.GagaMap;
|
|
|
+import com.gagaframework.web.parameter.GagaMapList;
|
|
|
import com.style24.persistence.domain.SweetTracker;
|
|
|
import com.style24.scm.biz.service.TssDeliveryService;
|
|
|
import com.style24.scm.support.controller.TssBaseController;
|
|
|
+import com.google.gson.JsonObject;
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
@@ -37,20 +41,20 @@ public class TssDeliveryController extends TssBaseController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/sweettracker/response")
|
|
|
@ResponseBody
|
|
|
- public GagaMap sweetTrackerResponse(SweetTracker sweetTracker) throws Exception {
|
|
|
+ public void sweetTrackerResponse(SweetTracker sweetTracker , HttpServletResponse response) throws Exception {
|
|
|
|
|
|
- GagaMap rtn = new GagaMap();
|
|
|
+ JsonObject rtn = new JsonObject();
|
|
|
log.info("-----> "+sweetTracker);
|
|
|
try {
|
|
|
deliveryService.saveDelvStat(sweetTracker);
|
|
|
|
|
|
- rtn.set("code", true);
|
|
|
- rtn.set("message", "success");
|
|
|
+ rtn.addProperty("code", true);
|
|
|
+ rtn.addProperty("message", "success");
|
|
|
} catch(Exception e) {
|
|
|
- rtn.set("code", false);
|
|
|
- rtn.set("message", "fail - invalid fid");
|
|
|
+ rtn.addProperty("code", false);
|
|
|
+ rtn.addProperty("message", "fail - invalid fid");
|
|
|
}
|
|
|
|
|
|
- return rtn;
|
|
|
+ response.getWriter().append(rtn+"");
|
|
|
}
|
|
|
}
|