1
1
package net .liuxuan .SprKi .controller ;
2
2
3
3
import net .liuxuan .SprKi .controller .utils .FileUploadUtil ;
4
+ import net .liuxuan .SprKi .service .labthink .DepartmentService ;
4
5
import net .liuxuan .SprKi .service .user .UserDetailInfoService ;
5
6
import net .liuxuan .spring .Helper .SpringContextHelper ;
6
7
import org .json .JSONArray ;
36
37
public class CommonController {
37
38
38
39
40
+ /**
41
+ * The Request mapping handler mapping.
42
+ */
39
43
@ Autowired
40
44
RequestMappingHandlerMapping requestMappingHandlerMapping ;
41
45
42
46
43
47
private Set <String > UrlMappingList ;
44
48
49
+ /**
50
+ * Init.
51
+ */
45
52
@ PostConstruct
46
53
public void init (){
47
54
Map <RequestMappingInfo , HandlerMethod > handlerMethods = requestMappingHandlerMapping .getHandlerMethods ();
@@ -54,13 +61,20 @@ public void init(){
54
61
.collect (Collectors .toSet ());
55
62
}
56
63
64
+ /**
65
+ * Gets msg.
66
+ *
67
+ * @param path the path
68
+ * @param request the request
69
+ * @param response the response
70
+ * @param model the model
71
+ * @return the msg
72
+ */
57
73
@ RequestMapping (value = "/goget/{path}" , method = RequestMethod .GET )
58
74
public String getMsg (
59
75
@ PathVariable String path ,
60
76
HttpServletRequest request , HttpServletResponse response , Map <String , Object > model ) {
61
77
62
-
63
-
64
78
System .out .println ("PATH IS:" +path );
65
79
path = path .replaceAll ("-" ,"/" );
66
80
System .out .println (UrlMappingList .contains ("/" +path ));
@@ -75,19 +89,34 @@ public String getMsg(
75
89
76
90
/**
77
91
* 为所有的用户加上头像
78
- * @param request
79
- * @param response
80
- * @param model
81
- * @return
92
+ *
93
+ * @param request the request
94
+ * @param response the response
95
+ * @param model the model
96
+ * @return string
82
97
*/
83
98
@ RequestMapping (value = "/func/add_avatar" , method = RequestMethod .GET )
84
99
@ ResponseBody
85
- public String getMsg (HttpServletRequest request , HttpServletResponse response , Map <String , Object > model ){
100
+ public String addAvatar (HttpServletRequest request , HttpServletResponse response , Map <String , Object > model ){
86
101
UserDetailInfoService userDetailInfoService = (UserDetailInfoService ) SpringContextHelper .getBean ("userDetailInfoServiceImpl" );
87
102
userDetailInfoService .checkAllUserDetailInfoAvatar ();
88
103
return "OK" ;
89
104
}
90
105
91
-
106
+ /**
107
+ * Add department role string.
108
+ *
109
+ * @param request the request
110
+ * @param response the response
111
+ * @param model the model
112
+ * @return the string
113
+ */
114
+ @ RequestMapping (value = "/func/addDepartmentRole" , method = RequestMethod .GET )
115
+ @ ResponseBody
116
+ public String addDepartmentRole (HttpServletRequest request , HttpServletResponse response , Map <String , Object > model ){
117
+ DepartmentService departmentServiceImpl = (DepartmentService ) SpringContextHelper .getBean ("departmentServiceImpl" );
118
+ departmentServiceImpl .checkDeparmentRole ();
119
+ return "OK" ;
120
+ }
92
121
93
122
}
0 commit comments