No Description

AuthCtrl.java 19KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587
  1. package com.sharemao.web.wx.ctrl;
  2. import java.net.URLEncoder;
  3. import java.util.Arrays;
  4. import java.util.HashMap;
  5. import java.util.Map;
  6. import javax.servlet.http.HttpSession;
  7. import org.apache.commons.codec.digest.DigestUtils;
  8. import org.apache.commons.logging.Log;
  9. import org.apache.commons.logging.LogFactory;
  10. import com.alibaba.fastjson.JSONArray;
  11. import com.alibaba.fastjson.JSONObject;
  12. import com.nianzai.base.mvc.Context;
  13. import com.nianzai.base.mvc.annotation.Controller;
  14. import com.nianzai.base.mvc.annotation.Path;
  15. import com.nianzai.base.mvc.view.SimpleJsonView;
  16. import com.nianzai.base.mvc.view.TextView;
  17. import com.nianzai.util.CodecUtil;
  18. import com.nianzai.util.DateTimeUtil;
  19. import com.nianzai.util.PropertiesUtil;
  20. import com.nianzai.util.Tools;
  21. import com.sharemao.web.wx.Constants;
  22. import com.sharemao.web.wx.util.GzhUtil;
  23. @Controller("/user")
  24. public class AuthCtrl
  25. {
  26. private static final Log log = LogFactory.getLog(AuthCtrl.class);
  27. /**
  28. * 首页 - 判断用户微信是否已绑定账号,如已绑定,返回我的主页界面,如没有绑定,返回登陆界面
  29. * @param context
  30. * @return
  31. */
  32. @Path(value="/index.do")
  33. public TextView index(Context context)
  34. {
  35. HttpSession session = context.getRequest().getSession();
  36. Map<String, String> para = context.getParas();
  37. log.info("para=="+para);
  38. String cursn=para.get("sn");
  39. session.setAttribute("cursn", cursn);//当前设备编号
  40. String openid = (String) session.getAttribute("openid"); // 获取用户微信openid
  41. String accessToken="";
  42. String wxCode = para.get("code");
  43. if(Tools.isEmpty(openid) && !GzhUtil.isEmpty(wxCode))
  44. {
  45. Map<String,String> m=GzhUtil.getOpenId(wxCode,Constants.appId,Constants.appSecret);
  46. openid=m.get("openId");
  47. accessToken=m.get("accessToken");
  48. session.setAttribute("openid", openid);
  49. session.setAttribute("accessToken", accessToken);
  50. }
  51. log.info("wxCode="+wxCode+",openid="+openid);
  52. // if ("o2P0j59YcTmvpZurZWK2fQHAPXJk".equals(openid)||"o2P0j5wNH9HBD5mDHo9of1-Lyuxo".equals(openid)){
  53. String url="http://gzxc.yunjia99.cn/user/indexForOld.do?openid=" + openid+"&sn="+cursn;
  54. if (GzhUtil.isEmpty(cursn)){
  55. url="http://gzxc.yunjia99.cn/user/indexForOld.do?openid=" + openid;
  56. } else {
  57. if (getDevtype(cursn)==16){
  58. url="http://dy.yunjia99.cn/user/indexForOld.do?openid=" + openid+"&sn="+cursn;
  59. }
  60. }
  61. url = URLEncoder.encode(url);
  62. log.info("url="+url);
  63. String path = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxb06cf14f96dd7149&redirect_uri=" + url + "&response_type=code&scope=snsapi_base&state=123#wechat_redirect";
  64. return new TextView(path);
  65. // }
  66. //
  67. // para.put("openid", openid);
  68. // GzhUtil.toM3Sign(para);
  69. // String u=Constants.m3IntAddr + "/user/wxIndex.do";
  70. // String result = GzhUtil.sendPost(u, para);
  71. // log.info("url="+u+",result="+result);
  72. // JSONObject resJson = JSONObject.parseObject(result);
  73. // int resCode = resJson.getIntValue("code");
  74. // if(resCode == 0)
  75. // {
  76. // JSONObject dataJson = resJson.getJSONObject("data");
  77. // String phonenum=dataJson.getString("phonenum");
  78. // if(Tools.isEmpty(phonenum))
  79. // {
  80. // context.getRequest().setAttribute("sn", cursn);
  81. // return new TextView("/activation.jsp");
  82. // }
  83. // else
  84. // {
  85. // session.setAttribute("appuid", dataJson.getString("appuid")); // 用户ID
  86. // session.setAttribute("phonenum", phonenum); // 用户账户
  87. // String defaultdev =dataJson.getString("defaultdev");
  88. // if(Tools.isEmpty(defaultdev))
  89. // defaultdev=cursn;
  90. // session.setAttribute("defaultdev", defaultdev); // 默认设备
  91. // if(Tools.isEmpty(defaultdev)) {
  92. // return new TextView("/device/getDevInfo.do");
  93. // } else {
  94. // return new TextView("/consumer/getPkgsByDevId.do");
  95. // }
  96. // }
  97. // }
  98. // else
  99. // {
  100. // context.getRequest().setAttribute("sn", cursn);
  101. // String lt=DateTimeUtil.longtime();
  102. // lt=lt.substring(0,lt.length()-2);
  103. // context.getRequest().setAttribute("sign", CodecUtil.str2md5("znz"+cursn+"125226"+lt));
  104. // return new TextView("/activation.jsp");
  105. // }
  106. }
  107. private int getDevtype(String cursn){
  108. Map<String, String> para = new HashMap<>();
  109. para.put("devid", cursn);
  110. String devTypeResult = GzhUtil.sendPost(Constants.m3IntAddr + "/device/getDevType.do", para);
  111. try {
  112. if(!Tools.isEmpty(devTypeResult))
  113. {
  114. JSONObject devTypeJson = JSONObject.parseObject(devTypeResult);
  115. int resCode2 = devTypeJson.getIntValue("code");
  116. if(resCode2 == 0){
  117. JSONObject devTypeDataJson = devTypeJson.getJSONObject("data");
  118. JSONObject devtypeJo = devTypeDataJson.getJSONObject("devtype");
  119. return devtypeJo.getIntValue("id");
  120. }
  121. }
  122. } catch (Exception e) {
  123. log.info(Tools.getExceptionMessage( e));
  124. }
  125. return 0;
  126. }
  127. /**
  128. * 用户登陆界面,登陆后将微信号自动绑定到用户账号
  129. * @param context
  130. * @return
  131. */
  132. @Path(value="/login.do")
  133. public SimpleJsonView login(Context context)
  134. {
  135. HttpSession session = context.getRequest().getSession();
  136. Map<String, String> para = context.getParas();
  137. String openid = (String) session.getAttribute("openid"); // 获取用户微信openid
  138. para.put("openid", openid);
  139. GzhUtil.toM3Sign(para);
  140. String result = GzhUtil.sendPost(Constants.m3IntAddr + "/user/wxLogin.do", para);
  141. JSONObject resJson = JSONObject.parseObject(result);
  142. int resCode = resJson.getIntValue("code");
  143. if(resCode == 0)
  144. {
  145. JSONObject dataJson = resJson.getJSONObject("data");
  146. session.setAttribute("appuid", dataJson.getString("appuid")); // 用户ID
  147. session.setAttribute("phonenum", dataJson.getString("phonenum")); // 用户账户
  148. session.setAttribute("defaultdev", dataJson.getString("defaultdev")); // 默认设备
  149. return new SimpleJsonView("OK");
  150. }
  151. return new SimpleJsonView(resJson.getString("msg"));
  152. }
  153. /**
  154. * 用户注册,注册完成后,微信号将自动绑定该账号
  155. * @param context
  156. * @return
  157. */
  158. @Path(value="/register.do")
  159. public SimpleJsonView register(Context context)
  160. {
  161. HttpSession session = context.getRequest().getSession();
  162. Map<String, String> para = context.getParas();
  163. String openid = (String) session.getAttribute("openid"); // 获取用户微信openid
  164. para.put("openid", openid);
  165. String devid ="";
  166. if(para.get("sn")!=null)
  167. devid=para.get("sn");
  168. else
  169. {
  170. if(session.getAttribute("cursn")!=null)
  171. devid=(String)session.getAttribute("cursn");
  172. }
  173. para.put("devid", devid);
  174. para.put("testval", "5120");
  175. GzhUtil.toM3Sign(para);
  176. String result = GzhUtil.sendPost(Constants.m3IntAddr + "/user/wxRegister2.do", para);
  177. log.info(result);
  178. JSONObject resJson = JSONObject.parseObject(result);
  179. int resCode = resJson.getIntValue("code");
  180. if(resCode == 0)
  181. {
  182. JSONObject dataJson = resJson.getJSONObject("data");
  183. session.setAttribute("appuid", dataJson.getString("appuid")); // 用户ID
  184. session.setAttribute("phonenum", dataJson.getString("phonenum")); // 用户账户
  185. session.setAttribute("defaultdev", dataJson.getString("defaultdev")); // 默认设备
  186. if(!Tools.isEmpty(devid))
  187. session.setAttribute("defaultdev", devid);
  188. return new SimpleJsonView("OK");
  189. }
  190. return new SimpleJsonView(resJson.getString("msg"));
  191. }
  192. /**
  193. * 忘记密码
  194. * @param context
  195. * @return
  196. */
  197. @Path(value="/forgetPass.do")
  198. public SimpleJsonView forgetPass(Context context)
  199. {
  200. Map<String, String> para = context.getParas();
  201. GzhUtil.toM3Sign(para);
  202. String result = GzhUtil.sendPost(Constants.m3IntAddr + "/user/upPass.do", para);
  203. JSONObject resJson = JSONObject.parseObject(result);
  204. int resCode = resJson.getIntValue("code");
  205. if(resCode == 0){
  206. return new SimpleJsonView("修改成功!");
  207. }
  208. return new SimpleJsonView(resJson.getString("msg"));
  209. }
  210. /**
  211. * 跳转至我的账户界面
  212. * @param context
  213. * @return
  214. */
  215. @Path(value="/myacc.do")
  216. public TextView myAccount(Context context)
  217. {
  218. HttpSession session = context.getRequest().getSession();
  219. String appuid = String.valueOf(session.getAttribute("appuid"));
  220. if(GzhUtil.isEmpty(appuid))
  221. return new TextView(Constants.loginUrl);
  222. context.getRequest().setAttribute("phonenum", String.valueOf(session.getAttribute("phonenum")));
  223. return new TextView("/wxuser.jsp");
  224. }
  225. /**
  226. * 注销
  227. * @param context
  228. * @return
  229. */
  230. @Path(value="/logout.do")
  231. public TextView logout(Context context)
  232. {
  233. HttpSession session = context.getRequest().getSession();
  234. Map<String, String> para = context.getParas();
  235. GzhUtil.toM3Sign(para);
  236. String result = GzhUtil.sendPost(Constants.m3IntAddr + "/user/wxLogout.do", para);
  237. JSONObject resJson = JSONObject.parseObject(result);
  238. int resCode = resJson.getIntValue("code");
  239. if(resCode == 0){
  240. session.removeAttribute("appuid");
  241. return new TextView(Constants.loginUrl);
  242. }
  243. return new TextView("/login/login.jsp");
  244. }
  245. /**
  246. * 获取收货地址列表
  247. * @param context
  248. * @return
  249. */
  250. @Path(value="/getAddr.do")
  251. public TextView getAddr(Context context)
  252. {
  253. HttpSession session = context.getRequest().getSession();
  254. Map<String, String> para = context.getParas();
  255. String appuid = (String) session.getAttribute("appuid");
  256. if(GzhUtil.isEmpty(appuid))
  257. return new TextView(Constants.loginUrl);
  258. para.put("appuid", appuid);
  259. GzhUtil.toM3Sign(para);
  260. String result = GzhUtil.sendPost(Constants.m3IntAddr + "/user/getAddr.do", para);
  261. JSONObject resJson = JSONObject.parseObject(result);
  262. JSONArray addrL = new JSONArray();
  263. int resCode = resJson.getIntValue("code");
  264. if(resCode == 0){
  265. JSONObject dataJson = resJson.getJSONObject("data");
  266. if(dataJson.containsKey("addr")){
  267. addrL = dataJson.getJSONArray("addr");
  268. }
  269. }
  270. context.getRequest().setAttribute("addrs", addrL);
  271. context.getRequest().setAttribute("type", para.get("type"));
  272. return new TextView("/address.jsp");
  273. }
  274. /**
  275. * 获取单条收货地址数据
  276. * @param context
  277. * @return
  278. */
  279. @Path(value="/getSelAddr.do")
  280. public TextView getSelAddr(Context context)
  281. {
  282. Map<String, String> para = context.getParas();
  283. GzhUtil.toM3Sign(para);
  284. String result = GzhUtil.sendPost(Constants.m3IntAddr + "/user/getAddrById.do", para);
  285. JSONObject resJson = JSONObject.parseObject(result);
  286. int resCode = resJson.getIntValue("code");
  287. JSONObject dataJson = new JSONObject();
  288. if(resCode == 0)
  289. dataJson = resJson.getJSONObject("data");
  290. context.getRequest().setAttribute("addr", dataJson);
  291. return new TextView("/editadd.jsp");
  292. }
  293. /**
  294. * 新增收货地址
  295. * @param context
  296. * @return
  297. */
  298. @Path(value="/addAddr.do")
  299. public SimpleJsonView addAddr(Context context)
  300. {
  301. HttpSession session = context.getRequest().getSession();
  302. String appuid = (String) session.getAttribute("appuid");
  303. if(GzhUtil.isEmpty(appuid))
  304. return new SimpleJsonView(Constants.noLoginMsg);
  305. Map<String, String> para = context.getParas();
  306. para.put("appuid", appuid);
  307. GzhUtil.toM3Sign(para);
  308. String result = GzhUtil.sendPost(Constants.m3IntAddr + "/user/addAddr.do", para);
  309. JSONObject resJson = JSONObject.parseObject(result);
  310. int resCode = resJson.getIntValue("code");
  311. if(resCode == 0)
  312. return new SimpleJsonView("OK");
  313. return new SimpleJsonView(resJson.getString("msg"));
  314. }
  315. /**
  316. * 编辑收货地址
  317. * @param context
  318. * @return
  319. */
  320. @Path(value="/editAddr.do")
  321. public SimpleJsonView editAddr(Context context)
  322. {
  323. HttpSession session = context.getRequest().getSession();
  324. String appuid = (String) session.getAttribute("appuid");
  325. if(GzhUtil.isEmpty(appuid))
  326. return new SimpleJsonView(Constants.noLoginMsg);
  327. Map<String, String> para = context.getParas();
  328. para.put("appuid", appuid);
  329. GzhUtil.toM3Sign(para);
  330. String result = GzhUtil.sendPost(Constants.m3IntAddr + "/user/editAddr.do", para);
  331. JSONObject resJson = JSONObject.parseObject(result);
  332. int resCode = resJson.getIntValue("code");
  333. if(resCode == 0)
  334. return new SimpleJsonView("OK");
  335. return new SimpleJsonView(resJson.getString("msg"));
  336. }
  337. /**
  338. * 删除收货地址
  339. * @param context
  340. * @return
  341. */
  342. @Path(value="/delAddr.do")
  343. public SimpleJsonView delAddr(Context context)
  344. {
  345. HttpSession session = context.getRequest().getSession();
  346. String appuid = (String) session.getAttribute("appuid");
  347. if(GzhUtil.isEmpty(appuid))
  348. return new SimpleJsonView(Constants.noLoginMsg);
  349. Map<String, String> para = context.getParas();
  350. para.put("appuid", appuid);
  351. GzhUtil.toM3Sign(para);
  352. String result = GzhUtil.sendPost(Constants.m3IntAddr + "/user/delAddr.do", para);
  353. JSONObject resJson = JSONObject.parseObject(result);
  354. int resCode = resJson.getIntValue("code");
  355. if(resCode == 0)
  356. return new SimpleJsonView("OK");
  357. return new SimpleJsonView(resJson.getString("msg"));
  358. }
  359. /**
  360. * 修改默认收货地址
  361. * @param context
  362. * @return
  363. */
  364. @Path(value="/setDefAddr.do")
  365. public SimpleJsonView setDefAddr(Context context)
  366. {
  367. HttpSession session = context.getRequest().getSession();
  368. String appuid = (String) session.getAttribute("appuid");
  369. if(GzhUtil.isEmpty(appuid))
  370. return new SimpleJsonView(Constants.noLoginMsg);
  371. Map<String, String> para = context.getParas();
  372. para.put("appuid", appuid);
  373. GzhUtil.toM3Sign(para);
  374. String result = GzhUtil.sendPost(Constants.m3IntAddr + "/user/setDefAddr.do", para);
  375. JSONObject resJson = JSONObject.parseObject(result);
  376. int resCode = resJson.getIntValue("code");
  377. if(resCode == 0)
  378. return new SimpleJsonView("OK");
  379. return new SimpleJsonView(resJson.getString("msg"));
  380. }
  381. /**
  382. * 获取用户所有订单
  383. * @param context
  384. * @return
  385. */
  386. @Path(value="/getAllOrder.do")
  387. public TextView getAllOrder(Context context)
  388. {
  389. HttpSession session = context.getRequest().getSession();
  390. String appuid = (String) session.getAttribute("appuid");
  391. if(GzhUtil.isEmpty(appuid))
  392. return new TextView(Constants.loginUrl);
  393. Map<String, String> para = context.getParas();
  394. para.put("appuid", appuid);
  395. GzhUtil.toM3Sign(para);
  396. //获取商品订单
  397. String pdtRes = GzhUtil.sendPost(Constants.m3IntAddr + "/device/getOrders.do", para);
  398. JSONObject pdtOrder = JSONObject.parseObject(pdtRes);
  399. if(pdtOrder.getIntValue("code") == 0){
  400. JSONArray pdtOrds = pdtOrder.getJSONArray("data");
  401. context.getRequest().setAttribute("pdtorder", pdtOrds);
  402. }
  403. //获取套餐订单
  404. String pkgRes = GzhUtil.sendPost(Constants.m3IntAddr + "/package/getOrders.do", para);
  405. JSONObject pkgOrder = JSONObject.parseObject(pkgRes);
  406. if(pdtOrder.getIntValue("code") == 0){
  407. JSONArray pkgOrds = pkgOrder.getJSONArray("data");
  408. context.getRequest().setAttribute("pkgorder", pkgOrds);
  409. }
  410. return new TextView("/order/allorder.jsp");
  411. }
  412. /**
  413. * 关于我们
  414. * @param context
  415. * @return
  416. */
  417. @Path(value="/aboutUs.do")
  418. public TextView aboutUs(Context context)
  419. {
  420. Map<String, String> para = context.getParas();
  421. GzhUtil.toM3Sign(para);
  422. String result = GzhUtil.sendPost(Constants.m3IntAddr + "/user/aboutus.do", para);
  423. JSONObject resJson = JSONObject.parseObject(result);
  424. int resCode = resJson.getIntValue("code");
  425. if(resCode == 0){
  426. JSONObject dataJson = resJson.getJSONObject("data");
  427. String content = dataJson.getString("content");
  428. String[] contents = content.split("<br>");
  429. context.getRequest().setAttribute("content", contents);
  430. }
  431. context.getRequest().setAttribute("logo", Constants.LOGO_DOWNLOAD);
  432. return new TextView("/aboutus.jsp");
  433. }
  434. /**
  435. * 检查实名
  436. * @param context
  437. * @return
  438. */
  439. @Path(value="/checksm.do")
  440. public TextView checksm(Context context)
  441. {
  442. String realhost=PropertiesUtil.getValue("wx", "realhost");
  443. Map<String, String> para = context.getParas();
  444. GzhUtil.toM3Sign(para);
  445. HttpSession session = context.getRequest().getSession();
  446. String devid ="";
  447. if(session.getAttribute("cursn")!=null)
  448. devid=(String)session.getAttribute("cursn");
  449. else
  450. devid=(String)session.getAttribute("defaultdev");
  451. if(Tools.isEmpty(devid))
  452. return new TextView(realhost+"/sming.jsp?t=0");
  453. int rmode=0;
  454. String url=Constants.m3IntAddr + "/device/getDevRunMode.do?devid="+devid;
  455. String result = GzhUtil.sendPost(url, para);
  456. log.info(result);
  457. JSONObject resJson = JSONObject.parseObject(result);
  458. int resCode = resJson.getIntValue("code");
  459. if(resCode == 0){
  460. JSONObject dataJson = resJson.getJSONObject("data");
  461. rmode=dataJson.getIntValue("rmode");
  462. }
  463. log.info(devid+url+",rmode="+rmode);
  464. //if(rmode<=2)
  465. {
  466. url=Constants.m3IntAddr + "/device/getIccidBySN2.do?devid="+devid+"&mode="+rmode;
  467. // if(devid.startsWith("86") || devid.startsWith("1004") || devid.startsWith("1502") || devid.startsWith("1606") || devid.startsWith("1616") || devid.startsWith("1302") || devid.startsWith("35") || devid.startsWith("6"))
  468. // {
  469. // url=Constants.m3IntAddr + "/device/getIccidBySN2.do?devid="+devid+"&mode="+rmode;
  470. // }
  471. // else if(devid.startsWith("160"))
  472. // {
  473. // url=Constants.m3IntAddr + "/device/getIccidBySN3.do?devid="+devid;
  474. // }
  475. // else
  476. // {
  477. // url=Constants.m3IntAddr + "/device/getIccidBySN.do?devid="+devid;
  478. // }
  479. log.info(devid+url);
  480. result = GzhUtil.sendPost(url, para);
  481. resJson = JSONObject.parseObject(result);
  482. String path=realhost+"/sming.jsp?t=0";
  483. resCode = resJson.getIntValue("code");
  484. if(resCode == 0)
  485. {
  486. String phonenum=(String)session.getAttribute("phonenum");
  487. JSONObject dataJson = resJson.getJSONObject("data");
  488. String iccid1 = dataJson.getString("iccid1");
  489. String iccid2 = dataJson.getString("iccid2");
  490. String iccid3 = dataJson.getString("iccid3");
  491. String state1 = dataJson.getString("state1");
  492. String state2 = dataJson.getString("state2");
  493. String state3 = dataJson.getString("state3");
  494. context.getRequest().setAttribute("devid", devid);
  495. if(state1.equals("1"))
  496. path=realhost+"/sming.jsp?t=01&phone="+phonenum;
  497. else if(state2.equals("1"))
  498. path=realhost+"/sming.jsp?t=02&phone="+phonenum;
  499. else if(state3.equals("1"))
  500. path=realhost+"/sming.jsp?t=03&phone="+phonenum;
  501. if(state1.equals("0") && !Tools.isEmpty(iccid1))
  502. path=realhost+"/sming.jsp?t=1&devid="+devid+"&phone="+phonenum;
  503. else if(state2.equals("0") && !Tools.isEmpty(iccid2))
  504. path=realhost+"/sming.jsp?t=2&devid="+devid+"&phone="+phonenum;
  505. else if(state3.equals("0") && !Tools.isEmpty(iccid3))
  506. path=realhost+"/sming.jsp?t=3&devid="+devid+"&phone="+phonenum;
  507. }
  508. return new TextView(path);
  509. }
  510. }
  511. @Path(value="/guide.do")
  512. public TextView guide(Context context)
  513. {
  514. Map<String, String> para = context.getParas();
  515. HttpSession session = context.getRequest().getSession();
  516. String appuid = String.valueOf(session.getAttribute("appuid"));
  517. para.put("appuid", appuid);
  518. GzhUtil.sendPost(Constants.m3IntAddr + "/user/upGuidFlag.do", para);
  519. String devid=para.get("devid");
  520. context.getRequest().setAttribute("devid", devid);
  521. return new TextView("/guide.jsp");
  522. }
  523. }