|
@@ -0,0 +1,66 @@
|
|
|
+package com.yx.face.controller.admin;
|
|
|
+
|
|
|
+import com.alibaba.excel.EasyExcel;
|
|
|
+import com.github.pagehelper.PageInfo;
|
|
|
+import com.yx.face.boot.core.BaseController;
|
|
|
+import com.yx.face.boot.restful.RestDTO;
|
|
|
+import com.yx.face.boot.restful.RestResponse;
|
|
|
+import com.yx.face.boot.restful.RestResult;
|
|
|
+import com.yx.face.boot.uitls.ExcelListenerUtils;
|
|
|
+import com.yx.face.model.dto.UserWhitelistDTO;
|
|
|
+import com.yx.face.model.excel.UserWhitelistExcel;
|
|
|
+import com.yx.face.model.query.SysLongTermDocumentsQu;
|
|
|
+import com.yx.face.model.search.UserWhitelistSearch;
|
|
|
+import com.yx.face.model.vo.SystemLongTermDocumentsVO;
|
|
|
+import com.yx.face.model.vo.UserWhitelistVO;
|
|
|
+import com.yx.face.service.SystemLongTermDocumentsService;
|
|
|
+import com.yx.face.service.UserWhitelistService;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import lombok.RequiredArgsConstructor;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+import org.springframework.web.multipart.MultipartFile;
|
|
|
+
|
|
|
+import java.io.IOException;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @description:
|
|
|
+ * @ClassName UserWhitelistController
|
|
|
+ * @Author WXG
|
|
|
+ * @Date 2021/11/5 14:12
|
|
|
+ */
|
|
|
+@Slf4j
|
|
|
+@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
|
|
+@Api(tags = "B 简道云长期通信证员工 API")
|
|
|
+@RestController
|
|
|
+@RequestMapping("admin/jdy")
|
|
|
+public class SystemLongTermDocumentsController extends BaseController {
|
|
|
+
|
|
|
+ private final SystemLongTermDocumentsService systemLongTermDocumentsService;
|
|
|
+
|
|
|
+ @ApiOperation("查询人员")
|
|
|
+ @PostMapping("/getList")
|
|
|
+ public RestResult<PageInfo<SystemLongTermDocumentsVO>> getList(@RequestBody RestDTO<SysLongTermDocumentsQu> dto) {
|
|
|
+ PageInfo<SystemLongTermDocumentsVO> list = systemLongTermDocumentsService.getList(dto);
|
|
|
+ return RestResponse.ok(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("添加设备")
|
|
|
+ @GetMapping("/add")
|
|
|
+ public RestResult<Boolean> add(String sn) {
|
|
|
+ Integer insert = systemLongTermDocumentsService.add(sn);
|
|
|
+ if (insert == 1) return RestResponse.ok(true);
|
|
|
+ else return RestResponse.error("添加失败");
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("删除设备")
|
|
|
+ @GetMapping("delete")
|
|
|
+ public RestResult<Boolean> delete(String sn) {
|
|
|
+ Integer insert = systemLongTermDocumentsService.delete(sn);
|
|
|
+ if (insert == 1) return RestResponse.ok(true);
|
|
|
+ else return RestResponse.error("删除失败");
|
|
|
+ }
|
|
|
+}
|