|
@@ -2,6 +2,7 @@ package com.bjlt.spider.table.controller;
|
|
|
|
|
|
import com.bjlt.spider.entity.OaAccount;
|
|
|
import com.bjlt.spider.table.service.OaAccountService;
|
|
|
+import com.bjlt.spider.util.RespEntity;
|
|
|
import com.bjlt.spider.utils.LayuiTableRespEntity;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -10,6 +11,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
@RequestMapping(value = "/oaAccount")
|
|
@@ -40,4 +42,22 @@ public class OaAccountController {
|
|
|
layuiTableRespEntity.setRel(true);
|
|
|
return layuiTableRespEntity;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 插入
|
|
|
+ * @param oaAccount
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/add" ,method = RequestMethod.POST)
|
|
|
+ @ResponseBody
|
|
|
+ public RespEntity insertSelective(OaAccount oaAccount){
|
|
|
+
|
|
|
+ try {
|
|
|
+ oaAccount.setLastUpdateTime(new Date());
|
|
|
+ oaAccountService.insertSelective(oaAccount);
|
|
|
+ return RespEntity.success(oaAccount);
|
|
|
+ } catch (Exception e) {
|
|
|
+ return RespEntity.success("false");
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
}
|