package com.tykj.dev.union;

/**
 * @author zjm
 * @version 1.0.0
 * @ClassName AreaController.java
 * @Description TODO
 * @createTime 2020年09月04日 13:34:00
 */

import com.tykj.dev.config.swagger.AutoDocument;
import com.tykj.dev.device.user.subject.dao.AreaDao;
import com.tykj.dev.device.user.subject.entity.Area;
import com.tykj.dev.device.user.subject.entity.SecurityUser;
import com.tykj.dev.device.user.subject.service.AreaService;
import com.tykj.dev.misc.exception.ApiException;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;

import java.util.Optional;

/**
 * 区域视图层
 */
@RestController
@RequestMapping("/run")
public class RunController {
   @Autowired
   DataInit dataInit;
    @GetMapping(value = "/init2")
    public ResponseEntity addPermissions(@ApiIgnore @AuthenticationPrincipal SecurityUser securityUser) {
        dataInit.init2();
        return ResponseEntity.ok("ok");
    }


}
