zhangnaisong
2024-01-31 4974beff57772cc0602cb36e2c80694ca8d62094
ard-work/src/main/java/com/ruoyi/alarmpoints/wall/controller/ArdWallController.java
@@ -3,6 +3,7 @@
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.utils.SecurityUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -110,4 +111,17 @@
    {
        return toAjax(ardWallService.deleteArdWallByIds(ids));
    }
    @ApiOperation("根据用户主键查询关联的电子围栏列表")
    @GetMapping("/getArdWallListByUserId")
    public AjaxResult getArdWallListByUserId() {
        String userId = SecurityUtils.getUserId();
        try{
            List<ArdWall> result = ardWallService.getArdWallListByUserId(userId);
            return AjaxResult.success(result);
        }catch(Exception e){
            e.printStackTrace();
            return AjaxResult.error();
        }
    }
}