package kr.wisestone.owl.web.controller; import kr.wisestone.owl.constant.Constants; import kr.wisestone.owl.service.UserWorkspaceService; import kr.wisestone.owl.web.condition.UserWorkspaceCondition; import kr.wisestone.owl.web.form.ProjectForm; import kr.wisestone.owl.web.form.UserWorkspaceForm; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Pageable; import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import java.util.HashMap; import java.util.Map; /** * Created by wisestone on 2018-10-02. */ @Controller public class UserWorkspaceController extends BaseController { @Autowired private UserWorkspaceService userWorkspaceService; // 업무공간에 참여하는 사용자 조회 @RequestMapping(value = "/userWorkspace/find", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) public @ResponseBody Map find(@RequestBody Map> params) { Map resJsonData = new HashMap(); Pageable pageable = this.pageUtil.convertPageable(this.getPageVo(params)); this.userWorkspaceService.findUserWorkspace(resJsonData, UserWorkspaceCondition.make(params.get(Constants.REQ_KEY_CONTENT)), pageable); return this.setSuccessMessage(resJsonData); } // 업무공간에 참여하는 참여자 상태 수정 @RequestMapping(value = "/userWorkspace/modify", produces = MediaType.APPLICATION_JSON_VALUE) public @ResponseBody Map modify(@RequestBody Map> params) { Map resJsonData = new HashMap<>(); this.userWorkspaceService.modifyUserWorkspace(UserWorkspaceForm.make(params.get(Constants.REQ_KEY_CONTENT))); return this.setSuccessMessage(resJsonData); } }