Commit 79d57139 by wnb0128

车家智能数据服务开发 代码调整--think.wang

1 parent 35165ef6
......@@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.Date;
import java.util.List;
/**
......@@ -49,12 +50,14 @@ public class SceneController {
@RequestMapping(value = "/add", method = {RequestMethod.POST})
public boolean save(@RequestBody SmartScene scene) {
scene.setCreateTime(new Date());
log.info("用户新增调用/scene/add param: {}", JSON.toJSONString(scene));
return sceneService.insert(scene) > 0 ? true : false;
}
@RequestMapping(value = "/update", method = {RequestMethod.POST})
public boolean update(@RequestBody SmartScene scene) {
scene.setUpdateTime(new Date());
log.info("用户更新调用/scene/update param: {}", JSON.toJSONString(scene));
return sceneService.update(scene) > 0 ? true : false;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!