@IocBean
@At("/userInfoAddFix")
public class UserInfoAddFixModule {
@Inject
UserInfoAddFixService userInfoAddFixService;
@At("/init")
@Ok("forward:/dataProcess.jsp")
@Filters(@By(type = CheckSession.class, args = { "me", "/" }))
public void initAntRisk(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException{
}
@At("/getList")
@Ok("json")
@Filters(@By(type = CheckSession.class, args = { "me", "/" }))
public List<Srv_Info> getList (HttpSession session, HttpServletRequest request,HttpServletResponse response) {
List<Srv_Info> queryList = userInfoAddFixService.getList();
if(null != queryList) {
System.out.println(123);
return queryList;
}else {
System.out.println(125);
return null;
}
}
/*@At("/secondGroupList")
@Ok("json")
@Filters(@By(type = CheckSession.class, args = { "me", "/" }))
public List<SecondGroup> secondGroupList (HttpSession session, HttpServletRequest request,HttpServletResponse response) {
List<SecondGroup> queryList = userInfoAddFixService.secondGroupList();
if(null == queryList) {
return null;
}else {
return queryList;
}
}*/
@At("/saveUpdateUser")
@Ok("json")
@Filters(@By(type = CheckSession.class, args = { "me", "/" }))
public String saveUpdateUser(@Param("user_id") String user_id,@Param("remark") String remark,
@Param("srv_group_id") String srv_group_id,@Param("brands") String brands,
HttpSession session, HttpServletRequest request,HttpServletResponse response) {
System.out.println(user_id+"---"+remark+"---"+srv_group_id+"---"+brands);
UserInfoAddFix userInfoAddFix = userInfoAddFixService.unique(user_id);
String result = "";
if(null != userInfoAddFix) {
result = userInfoAddFixService.updateUserInfoAddFix(user_id,remark,srv_group_id,brands);
}else {
result = userInfoAddFixService.saveUserInfoAddFix(user_id,remark,srv_group_id,brands);
}
return result;
}
}