|  |  |  | 
|---|
|  |  |  | import com.genersoft.iot.vmp.conf.UserSetting; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.service.ILogService; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.storager.dao.dto.LogDto; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.utils.DateUtil; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.vmanager.bean.WVPResult; | 
|---|
|  |  |  | import com.github.pagehelper.PageInfo; | 
|---|
|  |  |  | import io.swagger.annotations.Api; | 
|---|
|  |  |  | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.text.ParseException; | 
|---|
|  |  |  | import java.text.SimpleDateFormat; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Api(tags = "日志管理") | 
|---|
|  |  |  | @CrossOrigin | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private UserSetting userSetting; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | *  分页查询日志 | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | if (startTime != null) { | 
|---|
|  |  |  | format.parse(startTime); | 
|---|
|  |  |  | DateUtil.format.parse(startTime); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (endTime != null) { | 
|---|
|  |  |  | format.parse(endTime); | 
|---|
|  |  |  | DateUtil.format.parse(endTime); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } catch (ParseException e) { | 
|---|
|  |  |  | return new ResponseEntity<>(null, HttpStatus.BAD_REQUEST); | 
|---|