Commit fa86790f by 丁伟峰

当前用户信息获取test

1 parent 8e99b457
...@@ -7,10 +7,9 @@ import com.dituhui.pea.order.service.EngineerCalendarService; ...@@ -7,10 +7,9 @@ import com.dituhui.pea.order.service.EngineerCalendarService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.RestController;
@Slf4j @Slf4j
@RestController @RestController
...@@ -20,6 +19,9 @@ public class EngineerCalendarController { ...@@ -20,6 +19,9 @@ public class EngineerCalendarController {
@Autowired @Autowired
EngineerCalendarService engineerCalendarService; EngineerCalendarService engineerCalendarService;
@Autowired
private HttpServletRequest request;
@GetMapping("/engineer/calendar") @GetMapping("/engineer/calendar")
public Result<?> getEngineerCalendar(@Validated EngineerCalendarDTO.Request reqDTO) { public Result<?> getEngineerCalendar(@Validated EngineerCalendarDTO.Request reqDTO) {
Result<?> res = null; Result<?> res = null;
...@@ -44,6 +46,7 @@ public class EngineerCalendarController { ...@@ -44,6 +46,7 @@ public class EngineerCalendarController {
@GetMapping("/engineer/calendar/plan/detail") @GetMapping("/engineer/calendar/plan/detail")
public Result<?> getCalendarPlanDetail(@Validated CalendarDetailDTO.Request reqDTO) { public Result<?> getCalendarPlanDetail(@Validated CalendarDetailDTO.Request reqDTO) {
log.info("==== request ===> {}", request);
Result<?> res = null; Result<?> res = null;
try { try {
res = engineerCalendarService.getPlanDetail(reqDTO); res = engineerCalendarService.getPlanDetail(reqDTO);
......
...@@ -108,6 +108,9 @@ public class EngineerCalendarServiceImpl implements EngineerCalendarService { ...@@ -108,6 +108,9 @@ public class EngineerCalendarServiceImpl implements EngineerCalendarService {
rs.setTypeName(entity.getReason()); rs.setTypeName(entity.getReason());
rs.setStartTime(DateUtils.formatDateTime(entity.getStartTime())); rs.setStartTime(DateUtils.formatDateTime(entity.getStartTime()));
rs.setEndTime(DateUtils.formatDateTime(entity.getEndTime())); rs.setEndTime(DateUtils.formatDateTime(entity.getEndTime()));
rs.setRemark(entity.getMemo());
// todo 操作员
// rs.setOperator()
return Result.success(rs); return Result.success(rs);
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!