mirror of
https://github.com/suhf/No1WMS.git
synced 2026-02-05 04:03:45 +09:00
plainin list와 read기본
This commit is contained in:
@@ -5,6 +5,7 @@ import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
@@ -49,5 +50,18 @@ public class PlanInController {
|
||||
mav.setViewName("planin/list");
|
||||
return mav;
|
||||
}
|
||||
|
||||
@PostMapping("/read")
|
||||
public ModelAndView read(ModelAndView mav, PlanInDto dto){
|
||||
|
||||
System.out.println(dto);
|
||||
List<PlanInDto> list = planinservice.selectById(dto);
|
||||
System.out.println(list.get(0).toString());
|
||||
mav.addObject("list", list);
|
||||
|
||||
mav.setViewName("planin/read");
|
||||
|
||||
return mav;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -13,4 +13,6 @@ public interface PlanInMapper {
|
||||
List<PlanInDto> selectAll(Map<String, Object> m);
|
||||
|
||||
int count(Map<String, Object> m);
|
||||
|
||||
List<PlanInDto> selectById(PlanInDto dto);
|
||||
}
|
||||
|
||||
@@ -32,4 +32,8 @@ public class PlanInService {
|
||||
m.put("perPage", perPage);
|
||||
return mapper.count(m);
|
||||
}
|
||||
|
||||
List<PlanInDto> selectById(PlanInDto dto){
|
||||
return mapper.selectById(dto);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user