|
|
@@ -6,11 +6,13 @@ import com.uas.kanban.model.Panel;
|
|
|
import com.uas.kanban.service.PanelService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import java.util.Arrays;
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* 面板
|
|
|
@@ -31,7 +33,7 @@ public class PanelController extends BaseController<Panel> {
|
|
|
* @param userCode 用户 code
|
|
|
* @param panelCodes 面板 code
|
|
|
* @param request request
|
|
|
- * @return 面板实例
|
|
|
+ * @return 分配成功
|
|
|
*/
|
|
|
@RequestMapping("/assignPanel")
|
|
|
@ResponseBody
|
|
|
@@ -40,4 +42,17 @@ public class PanelController extends BaseController<Panel> {
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取分配给用户的面板
|
|
|
+ *
|
|
|
+ * @param userCode 用户 code
|
|
|
+ * @param request request
|
|
|
+ * @return 面板
|
|
|
+ */
|
|
|
+ @RequestMapping("/get/byUser/{userCode}")
|
|
|
+ @ResponseBody
|
|
|
+ public List<Panel> getByUserCode(@PathVariable("userCode") String userCode, HttpServletRequest request) {
|
|
|
+ return panelService.getByUserCode(userCode);
|
|
|
+ }
|
|
|
+
|
|
|
}
|