|
@@ -22,7 +22,9 @@ import com.lemon.lifecenter.common.LifeCenterFunction;
|
|
|
import com.lemon.lifecenter.common.LifeCenterPaging;
|
|
|
import com.lemon.lifecenter.common.LifeCenterSessionController;
|
|
|
import com.lemon.lifecenter.dto.ApiManagerDTO;
|
|
|
+import com.lemon.lifecenter.dto.CenterInfoDTO;
|
|
|
import com.lemon.lifecenter.service.ApiManagerService;
|
|
|
+import com.lemon.lifecenter.service.CenterService;
|
|
|
|
|
|
@Controller
|
|
|
@RequestMapping("/apiManager")
|
|
@@ -37,6 +39,9 @@ public class ApiManagerController extends LifeCenterController {
|
|
|
|
|
|
private LifeCenterPaging paging;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private CenterService centerService;
|
|
|
+
|
|
|
@RequestMapping("/list")
|
|
|
public ModelAndView apiMangerList(
|
|
|
@ModelAttribute("dto") ApiManagerDTO dto,
|
|
@@ -93,8 +98,16 @@ public class ApiManagerController extends LifeCenterController {
|
|
|
@ModelAttribute("dto") final ApiManagerDTO dto,
|
|
|
HttpServletRequest request,HttpServletResponse response) {
|
|
|
String sesId = LifeCenterSessionController.getSession( request, "sesId" );
|
|
|
- //dto.setCreateBy(sesId);
|
|
|
+ String sesCenterCode = LifeCenterSessionController.getSession( request, "sesCenterCode" );
|
|
|
+ dto.setManagerId(sesId);
|
|
|
+ dto.setCenterCode(sesCenterCode);
|
|
|
+
|
|
|
+ CenterInfoDTO cdto = new CenterInfoDTO();
|
|
|
+ cdto.setCenterCode(Integer.valueOf(sesCenterCode));
|
|
|
+ centerService.selectCenterInfo(cdto);
|
|
|
|
|
|
+ dto.setCooperativeCode(cdto.getCooperativeCode());
|
|
|
+
|
|
|
service.insertApiManager(dto);
|
|
|
|
|
|
LifeCenterFunction.scriptMessage( response, "alertBox({ txt: '서비스 신청을 완료하였습니다.', callBack : function(){ location.href='/apiManager/list'; } });" );
|