xiaoxie
2022-05-23 d739bfa5976e36ced26f906ab16f83c20c8cb27c
src/main/java/com/genersoft/iot/vmp/vmanager/user/RoleController.java
@@ -2,9 +2,8 @@
import com.genersoft.iot.vmp.conf.security.SecurityUtils;
import com.genersoft.iot.vmp.service.IRoleService;
import com.genersoft.iot.vmp.service.IUserService;
import com.genersoft.iot.vmp.storager.dao.dto.Role;
import com.genersoft.iot.vmp.storager.dao.dto.User;
import com.genersoft.iot.vmp.utils.DateUtil;
import com.genersoft.iot.vmp.vmanager.bean.WVPResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
@@ -13,12 +12,8 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.util.DigestUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import java.text.SimpleDateFormat;
import java.util.List;
@Api(tags = "角色管理")
@@ -29,8 +24,6 @@
    @Autowired
    private IRoleService roleService;
    private final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    @ApiOperation("添加角色")
    @ApiImplicitParams({
@@ -53,8 +46,8 @@
        Role role = new Role();
        role.setName(name);
        role.setAuthority(authority);
        role.setCreateTime(format.format(System.currentTimeMillis()));
        role.setUpdateTime(format.format(System.currentTimeMillis()));
        role.setCreateTime(DateUtil.getNow());
        role.setUpdateTime(DateUtil.getNow());
        int addResult = roleService.add(role);