SmartVisitorController.java 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567
  1. package com.template.controller;
  2. import com.alibaba.fastjson.JSONObject;
  3. import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
  4. import com.fasterxml.jackson.core.JsonProcessingException;
  5. import com.fasterxml.jackson.databind.ObjectMapper;
  6. import com.seewo.open.sdk.DefaultSeewoClient;
  7. import com.seewo.open.sdk.SeewoClient;
  8. import com.seewo.open.sdk.auth.Account;
  9. import com.template.api.SmartVisitorControllerAPI;
  10. import com.template.common.utils.CommonUtil;
  11. import com.template.common.utils.RequestUtils;
  12. import com.template.common.utils.TimeExchange;
  13. import com.template.common.utils.paramUtils;
  14. import com.template.config.ParkConfig;
  15. import com.template.config.SeewoConfig;
  16. import com.template.model.enumModel.*;
  17. import com.template.model.pojo.*;
  18. import com.template.model.request.otherAppointmentRequest;
  19. import com.template.model.request.parentsAppointmentRequest;
  20. import com.template.model.request.turnOnTheDeviceRequest;
  21. import com.template.model.result.CommonResult;
  22. import com.template.model.result.PageUtils;
  23. import com.template.model.seewo.HomeSchoolServiceSendNoteToKidParam;
  24. import com.template.model.seewo.HomeSchoolServiceSendNoteToKidRequest;
  25. import com.template.model.seewo.HomeSchoolServiceSendNoteToKidResult;
  26. import com.template.model.vo.*;
  27. import com.template.services.SmartAuthorGroupService;
  28. import com.template.services.SmartQrcodeService;
  29. import com.template.services.SmartUserService;
  30. import com.template.services.SmartVisitorService;
  31. import org.springframework.beans.factory.annotation.Autowired;
  32. import org.springframework.transaction.annotation.Transactional;
  33. import org.springframework.validation.BindingResult;
  34. import org.springframework.web.bind.annotation.RequestParam;
  35. import org.springframework.web.bind.annotation.RestController;
  36. import javax.annotation.Resource;
  37. import java.net.URLDecoder;
  38. import java.util.*;
  39. import java.util.stream.Collectors;
  40. import static com.template.common.utils.AesTestOne.decrypt;
  41. /**
  42. * <p>
  43. * 前端控制器
  44. * </p>
  45. *
  46. * @author ceshi
  47. * @since 2023-12-04
  48. */
  49. @RestController
  50. public class SmartVisitorController implements SmartVisitorControllerAPI {
  51. @Autowired
  52. private SmartAuthorGroupService smartAuthorGroupService;
  53. @Autowired
  54. private SmartVisitorService smartVisitorService;
  55. @Autowired
  56. private SmartQrcodeService smartQrcodeService;
  57. @Autowired
  58. private SmartUserService smartUserService;
  59. @Resource
  60. private SeewoConfig seewoConfig;
  61. @Resource
  62. private ParkConfig parkConfig;
  63. /**
  64. * 新增访客预约
  65. *
  66. * @param smartApply 访客预约数据
  67. * @param bindingResult
  68. * @return
  69. */
  70. @Override
  71. public CommonResult insertSmartVisitor(SmartVisitor smartApply, BindingResult bindingResult) {
  72. if (bindingResult.hasErrors()) {
  73. String st = paramUtils.getParamError(bindingResult);
  74. return CommonResult.fail(st);
  75. }
  76. int result = smartVisitorService.insertSmartVisitor(smartApply);
  77. return result > 0 ? CommonResult.ok("添加成功") : CommonResult.fail("添加失败");
  78. }
  79. /**
  80. * 更新访客预约
  81. *
  82. * @param sa 访客预约数据
  83. * @param bindingResult
  84. * @return
  85. */
  86. @Override
  87. public CommonResult updateSmartVisitorById(SmartVisitor sa, BindingResult bindingResult) {
  88. if (bindingResult.hasErrors()) {
  89. String st = paramUtils.getParamError(bindingResult);
  90. return CommonResult.fail(st);
  91. }
  92. int result = smartVisitorService.updateSmartVisitor(sa);
  93. return result > 0 ? CommonResult.ok("修改成功") : CommonResult.fail("修改失败");
  94. }
  95. /**
  96. * 访客预约分页数据查询
  97. *
  98. * @param currentPage 当前页数
  99. * @param pageCount 一页数据条数
  100. * @param name 查询名称
  101. * @return
  102. */
  103. @Override
  104. public CommonResult queryPageSmartVisitor(int currentPage, int pageCount, String name) {
  105. PageUtils<SmartVisitor> result = smartVisitorService.queryPageSmartVisitors(currentPage, pageCount, name);
  106. return CommonResult.ok(result);
  107. }
  108. @Override
  109. public CommonResult deleteSmartVisitorById(int id) {
  110. SmartVisitor data = smartVisitorService.getSmartById(id);
  111. if (data == null) {
  112. return CommonResult.fail("当前数据不存在,删除失败!");
  113. }
  114. //审核通过就不能删除
  115. if(data.getStatu().intValue() == eApproveStatu.Pushed.getValue()){
  116. return CommonResult.fail("无法删除已审核通过的访客数据");
  117. }
  118. //已审核通过的数据不能删除 那么就不需要进行下面这些操作
  119. //region 推送到希沃班牌,通知访客记录取消
  120. //endregion
  121. //region 删除百胜中的访客数据
  122. //endregion
  123. int result = smartVisitorService.deleteSmartVisitorById(id);
  124. return result > 0 ? CommonResult.ok("删除成功") : CommonResult.fail("删除失败");
  125. }
  126. @Override
  127. public CommonResult parentsAppointment(parentsAppointmentRequest par, BindingResult bindingResult) {
  128. if (bindingResult.hasErrors()) {
  129. String st = paramUtils.getParamError(bindingResult);
  130. return CommonResult.fail(st);
  131. }
  132. //参数判断 判断受访学生信息是否为空
  133. if (par.getStudents() == null) {
  134. return CommonResult.fail("请选择受访学生");
  135. }
  136. if (par.getStudents().size() <= 0) {
  137. return CommonResult.fail("请选择受访学生");
  138. }
  139. //根据用户ID查询相关信息
  140. SmartUser su = smartUserService.getSmartById(par.getUserId());
  141. if (su == null) {
  142. return CommonResult.fail("当前用户信息不合法,无法进行预约!");
  143. }
  144. String startTime = par.getVisitorTime();
  145. String endTime = TimeExchange.getEndOfDayStr(TimeExchange.StringToDate(startTime, "yyyy-MM-dd HH:mm:ss"));
  146. //要进行家长数据重复判断
  147. //那是不是第二次预约的时间不能在那个可访问的时间段内
  148. //例如:比如,第一次约了7:00-10:00;那第二次:6:00-7:30 或 8:11-13:00都不行
  149. Integer count = smartVisitorService.queryVisitorCount(su.getIdCard(), startTime, endTime);
  150. if (count > 0) {
  151. return CommonResult.fail("该时间段已预约,请勿重复预约!");
  152. }
  153. List<SmartVisitor> svs = new ArrayList<>();
  154. for (AffiliateUserVo student : par.getStudents()) {
  155. SmartVisitor sv = new SmartVisitor();
  156. sv.setUserId(par.getUserId());
  157. sv.setUserName(su.getName());
  158. sv.setUserPhone(su.getPhone());
  159. sv.setUserNumber(su.getIdCard());
  160. sv.setPeerNum(par.getPeerNum());
  161. //sv.setCarNum(par.getCarNum());家长预约不能填写车牌号
  162. sv.setVisitReason(par.getVisitReason());
  163. sv.setStatu(eApproveStatu.Audit.getValue());
  164. sv.setVisitorTime(TimeExchange.StringToDate(par.getVisitorTime(), "yyyy-MM-dd HH:mm:ss"));
  165. sv.setVisitorDeadline(TimeExchange.StringToDate(TimeExchange.TimeDesH(sv.getVisitorTime(), 4), "yyyy-MM-dd HH:mm:ss"));
  166. sv.setRespondent(student.getId());
  167. sv.setResponcode(student.getCardNo());
  168. sv.setRespondentName(student.getName());
  169. //将第一个受访学生的部门ID带过去
  170. sv.setDepartmentId(student.getDepartmentId());
  171. sv.setVisitorType(eVisitorType.Parent.getValue());
  172. svs.add(sv);
  173. }
  174. boolean result = smartVisitorService.insertVisitorBatch(svs);
  175. return result ? CommonResult.ok("预约成功,等待审批通过") : CommonResult.fail("预约失败");
  176. }
  177. @Override
  178. public CommonResult otherAppointment(otherAppointmentRequest oar, BindingResult bindingResult) {
  179. if (bindingResult.hasErrors()) {
  180. String st = paramUtils.getParamError(bindingResult);
  181. return CommonResult.fail(st);
  182. }
  183. //根据用户ID查询相关信息
  184. SmartUser su = smartUserService.getSmartById(oar.getUserId());
  185. if (su == null) {
  186. return CommonResult.fail("当前用户信息不合法,无法进行预约!");
  187. }
  188. String startTime = oar.getVisitorTime();
  189. String endTime = TimeExchange.getEndOfDayStr(TimeExchange.StringToDate(startTime, "yyyy-MM-dd HH:mm:ss"));
  190. //要进行访客数据重复判断
  191. //那是不是第二次预约的时间不能在那个可访问的时间段内
  192. //例如:比如,第一次约了7:00-10:00;那第二次:6:00-7:30 或 8:11-13:00都不行
  193. Integer count = smartVisitorService.queryVisitorCount(su.getIdCard(), startTime, endTime);
  194. if (count > 0) {
  195. return CommonResult.fail("该时间段已预约,请勿重复预约!");
  196. }
  197. SmartVisitor sv = new SmartVisitor();
  198. sv.setUserId(oar.getUserId());
  199. sv.setUserName(oar.getUserName());
  200. sv.setUserPhone(oar.getUserPhone());
  201. sv.setUserNumber(oar.getUserCard());
  202. sv.setPeerNum(oar.getPeerNum());
  203. sv.setCarNum(oar.getCarNum());
  204. sv.setVisitReason(oar.getVisitReason());
  205. sv.setStatu(eApproveStatu.Audit.getValue());
  206. sv.setVisitorTime(TimeExchange.StringToDate(startTime, "yyyy-MM-dd HH:mm:ss"));
  207. sv.setVisitorDeadline(TimeExchange.StringToDate(endTime, "yyyy-MM-dd HH:mm:ss"));
  208. sv.setRespondentName(oar.getRespondentName());
  209. sv.setRespondentPhone(oar.getRespondentPhone());
  210. sv.setVisitorType(eVisitorType.Other.getValue());
  211. int result = smartVisitorService.insertSmartVisitor(sv);
  212. return result > 0 ? CommonResult.ok("预约成功,等待审批通过") : CommonResult.ok("预约失败");
  213. }
  214. @Override
  215. public CommonResult appointmentPageRecord(int currentPage, int pageCount, Integer userId, int type, String createStartTime, String createEndTime, String keyWord, String visitorStartTime, String visitorEndTime) {
  216. PageUtils<VisitorPageVo> result = smartVisitorService.smartVisitorPageByUserId(currentPage, pageCount, userId, type, createStartTime, createEndTime, keyWord, visitorStartTime, visitorEndTime);
  217. return CommonResult.ok(result);
  218. }
  219. /**
  220. * 访客记录审核
  221. *
  222. * @param id 数据ID
  223. * @param type 操作类型:
  224. * 同意,并推送:1
  225. * 拒绝:2
  226. * @return
  227. */
  228. @Override
  229. @Transactional(rollbackFor = {Exception.class})
  230. public CommonResult examineRecord(int id, int type) throws Exception {
  231. SmartVisitor visitor = smartVisitorService.getSmartById(id);
  232. if (visitor == null) {
  233. return CommonResult.fail("访客记录已失效,审核失败!");
  234. }
  235. //审核处理后的数据不能再处理判断
  236. if(visitor.getStatu().intValue() != eApproveStatu.Audit.getValue()){
  237. return CommonResult.fail("该记录已被操作过,请勿重复操作");
  238. }
  239. try {
  240. if (type == eExamineStatu.Agree.getValue()) {
  241. visitor.setStatu(eApproveStatu.Pushed.getValue());
  242. //家长访客预约才需要将消息推送到希沃电子班牌
  243. if (visitor.getVisitorType().intValue() == eVisitorType.Parent.getValue()) {
  244. String content = visitor.getRespondentName() + "你的家长将于" + TimeExchange.chineseDateTime(visitor.getVisitorTime()) + "到校!";
  245. //将预约信息推送到希沃班牌
  246. CommonResult seewo = pushInfo(visitor.getUserPhone(), visitor.getResponcode(), content);
  247. if (!seewo.getCode().equals("200")) {
  248. throw new Exception("审核失败");
  249. }
  250. }
  251. //将数据写入门禁系统逻辑
  252. else {
  253. //家长不能使用车牌系统 其他的可以使用车牌逻辑
  254. if (!ObjectUtils.isEmpty(visitor.getCarNum())) {
  255. String appId = parkConfig.getAppId();
  256. String carNo = visitor.getCarNum();
  257. String parkKey = parkConfig.getParkKey();
  258. String rand = String.valueOf(Math.random());
  259. String reserveTime = TimeExchange.DateToString(visitor.getVisitorTime(), "yyyy-MM-dd HH:mm:ss");
  260. String reserveEndTime = TimeExchange.DateToString(visitor.getVisitorDeadline(), "yyyy-MM-dd HH:mm:ss");
  261. String version = "v1.0";
  262. String appSecret = parkConfig.getAppSecret();
  263. String url = parkConfig.getUrl() + "Inform/Reservation";
  264. JSONObject jsonobject = new JSONObject();
  265. jsonobject.put("appid", appId);
  266. jsonobject.put("carNo", carNo);
  267. jsonobject.put("parkKey", parkKey);
  268. jsonobject.put("rand", rand);
  269. jsonobject.put("reserveEndTime", reserveEndTime);
  270. jsonobject.put("reserveTime", reserveTime);
  271. jsonobject.put("version", "v1.0");
  272. //appid=ymdd36ed157ac423e2&carNo=赣U123659&parkKey=wdcmq9rc&rand=9.94995525689689966&reserveEndTime=2023-12-22 20:12:10&reserveTime=2023-12-21 18:12:10&version=v1.0&50596cd243dc4547b4c05f01f8ea02a4
  273. String md5Str = "appid=" + appId + "&carNo=" + carNo + "&parkKey=" + parkKey + "&rand=" + rand + "&reserveEndTime=" + reserveEndTime + "&reserveTime=" + reserveTime + "&version=" + version + "&" + appSecret;
  274. String sign = CommonUtil.MD5(md5Str);
  275. //sign签名
  276. jsonobject.put("sign", sign);
  277. //返回的结果中 code为1表示成功
  278. String result = RequestUtils.httpPost(url, jsonobject.toJSONString());
  279. System.out.println(result);
  280. if (!result.contains("预约成功")) {
  281. throw new Exception("审核失败");
  282. }
  283. ObjectMapper objectMapper = new ObjectMapper();
  284. BsReservationVo reservation = objectMapper.readValue(result, BsReservationVo.class);
  285. visitor.setBsOrderNo(reservation.getData().getReOrderNo());
  286. }
  287. }
  288. } else if (type == eExamineStatu.Refused.getValue()) {
  289. visitor.setStatu(eApproveStatu.Refused.getValue());
  290. }
  291. int result = smartVisitorService.updateSmartVisitor(visitor);
  292. if (result <= 0) {
  293. throw new Exception("审核失败");
  294. }
  295. } catch (Exception e) {
  296. throw new Exception("审核失败");
  297. }
  298. return CommonResult.ok("审核成功");
  299. }
  300. /**
  301. * 将预约信息推送到希沃电子班牌
  302. *
  303. * @param parentPhone 预约手机号(家长手机号 在希沃中学生会和家长手机号绑定 可以绑定多个家长)
  304. * @param studentCode 学生编号 希沃中的学生编号和万载系统中的一致
  305. * @param content 消息内容
  306. * @return
  307. */
  308. public CommonResult pushInfo(String parentPhone, String studentCode, String content) {
  309. //初始化客户端
  310. SeewoClient seewoClient = new DefaultSeewoClient(new Account(seewoConfig.getAppId(), seewoConfig.getAppSecret()));
  311. HomeSchoolServiceSendNoteToKidParam param = new HomeSchoolServiceSendNoteToKidParam();
  312. //响应体,MimeType为 application/json
  313. HomeSchoolServiceSendNoteToKidParam.RequestBody requestBody = HomeSchoolServiceSendNoteToKidParam.RequestBody.builder()
  314. .build();
  315. param.setRequestBody(requestBody);
  316. //query
  317. HomeSchoolServiceSendNoteToKidParam.Query query = HomeSchoolServiceSendNoteToKidParam.Query.builder()
  318. .appId(seewoConfig.getAppId())
  319. .schoolUid(seewoConfig.getSchoolId())
  320. .senderPhone(parentPhone)
  321. .studentCode(studentCode)
  322. .type(1)
  323. .content(content)
  324. .autoRegister(0)
  325. .build();
  326. requestBody.setQuery(query);
  327. param.setRequestBody(requestBody);
  328. HomeSchoolServiceSendNoteToKidRequest request = new HomeSchoolServiceSendNoteToKidRequest(param);
  329. System.out.println("入参:" + request);
  330. //如果想要调用沙箱环境,请通过设置 request 对象的 serverUrl 属性,如:
  331. //request.setServerUrl("https://openapi.test.seewo.com")
  332. //执行请求,如果想获取到com.seewo.open.sdk.HttpResponse对象,请调用 seewoClient.execute 方法
  333. HomeSchoolServiceSendNoteToKidResult result = seewoClient.invoke(request);
  334. System.out.println("出参:" + result);
  335. if (!result.getMessage().equals("success")) {
  336. CommonResult.fail();
  337. }
  338. return CommonResult.ok();
  339. }
  340. /**
  341. * 获取到访代办数据
  342. *
  343. * @param userId
  344. * @return
  345. */
  346. @Override
  347. public CommonResult visitingAgencys(int currentPage, int pageCount, int userId, int type) {
  348. SmartUser user = smartUserService.getSmartById(userId);
  349. if (user == null) {
  350. return CommonResult.fail("当前用户数据无效,获取到访数据失败");
  351. }
  352. if (user.getIdentityId().intValue() != eIdentityStatu.Teacher.getValue()) {
  353. return CommonResult.fail("非教师身份无法获取到访数据");
  354. }
  355. //是否是管理员
  356. String whereSql = null;
  357. //获取的权限组数据
  358. List<SmartAuthorGroup> authorGroups = smartAuthorGroupService.smartAuthorGroup(user.getId());
  359. for (SmartAuthorGroup authorGroup : authorGroups) {
  360. List<String> applyIds = Arrays.asList(authorGroup.getApplyId().split(","));
  361. //菜单表中7是访客预约
  362. long appointCount = applyIds.stream().filter(e -> e.equals("7")).count();
  363. if (appointCount > 0) {
  364. whereSql = "visitor_type = 2";
  365. break;
  366. }
  367. }
  368. List<Integer> studentIds = null;
  369. //班主任
  370. if (user.getDuties().intValue() == eDuties.ClassTeacher.getValue()) {
  371. //班级ID
  372. Integer schoolClass = user.getSchoolClass();
  373. //获取该班级下的所有学生ID数据
  374. List<SmartUser> students = smartUserService.queryStudentBySchoolClass(user.getSchoolClass());
  375. if (students == null) {
  376. return CommonResult.fail("当前身份下不存在学生信息");
  377. }
  378. studentIds = students.stream().map(SmartUser::getId).collect(Collectors.toList());
  379. }
  380. PageUtils<SmartVisitor> result = new PageUtils<SmartVisitor>(null, 0, pageCount, currentPage);
  381. if (whereSql == null && studentIds == null) {
  382. return CommonResult.ok(result);
  383. }
  384. result = smartVisitorService.queryVisitorPageDatas(currentPage, pageCount, type, studentIds, studentIds != null && whereSql != null ? "or " + whereSql : whereSql);
  385. return CommonResult.ok(result);
  386. }
  387. @Override
  388. public TurnOnDeviceVo turnOnTheDevice(turnOnTheDeviceRequest data) throws JsonProcessingException {
  389. TurnOnDeviceVo result = new TurnOnDeviceVo();
  390. //region 参数判断
  391. if (data == null) {
  392. result.setResultcode(2);
  393. result.setMessage("扫码参数不能为空");
  394. result.setActionName("qrCodePush");
  395. return result;
  396. }
  397. if (data.getActionName() == null) {
  398. result.setResultcode(2);
  399. result.setMessage("指令不能为空");
  400. result.setActionName("qrCodePush");
  401. return result;
  402. }
  403. if (!data.getActionName().equals("qrCodePush")) {
  404. result.setResultcode(2);
  405. result.setMessage("指令错误");
  406. result.setActionName("qrCodePush");
  407. return result;
  408. }
  409. if (data.getData() == null) {
  410. result.setResultcode(2);
  411. result.setMessage("二维码内容不能为空");
  412. result.setActionName("qrCodePush");
  413. return result;
  414. }
  415. ObjectMapper objectMapper = new ObjectMapper();
  416. qrCodeVo codeVo = objectMapper.readValue(data.getData(), qrCodeVo.class);
  417. if (codeVo == null) {
  418. result.setResultcode(2);
  419. result.setMessage("二维码内容不能为空");
  420. result.setActionName("qrCodePush");
  421. return result;
  422. }
  423. if (codeVo.getQrCode() == null) {
  424. result.setResultcode(2);
  425. result.setMessage("二维码内容不能为空");
  426. result.setActionName("qrCodePush");
  427. return result;
  428. }
  429. if (data.getDeviceno() == null) {
  430. result.setResultcode(2);
  431. result.setMessage("设备编号不能为空");
  432. result.setActionName("qrCodePush");
  433. return result;
  434. }
  435. if (data.getVersion() == null) {
  436. result.setResultcode(2);
  437. result.setMessage("版本不能为空");
  438. result.setActionName("qrCodePush");
  439. return result;
  440. }
  441. //endregion
  442. //解码逻辑
  443. QrcodeImageVo qiv = objectMapper.readValue(codeVo.getQrCode(), QrcodeImageVo.class);
  444. SmartUser user = smartUserService.getSmartById(qiv.getId());
  445. if (user == null) {
  446. result.setResultcode(2);
  447. result.setMessage("用户身份无效,刷码失败");
  448. result.setActionName("qrCodePush");
  449. return result;
  450. }
  451. //目前二维码一分钟内有效
  452. //过期:(时间戳 + 有效期分钟数)<= 当前时间
  453. //时间戳转时间
  454. Date dateNow = TimeExchange.StringToDate(TimeExchange.TimeRangeI10(qiv.getTimestamp(), 1), "yyyy-MM-dd HH:mm:ss");
  455. if (dateNow.compareTo(new Date()) < 0) {
  456. result.setResultcode(2);
  457. result.setMessage("身份码已过期");
  458. result.setActionName("qrCodePush");
  459. return result;
  460. }
  461. //成功后将刷码记录存储到数据表中
  462. SmartQrcode sq = new SmartQrcode();
  463. sq.setUserId(0);
  464. sq.setSourceCode(data.getData());
  465. sq.setIsSuccess(1);
  466. int insertResult = smartQrcodeService.insertSmartQrcode(sq);
  467. if (insertResult <= 0) {
  468. result.setResultcode(2);
  469. result.setMessage("新增刷码记录失败");
  470. result.setActionName("qrCodePush");
  471. return result;
  472. }
  473. result.setResultcode(1);
  474. result.setMessage("成功");
  475. result.setActionName("qrCodePush");
  476. return result;
  477. }
  478. }