| | |
| | | @PostMapping("/uuRepay") |
| | | public R uuRepay(@RequestBody String aesString){ |
| | | try { |
| | | log.error("uuRepay接口调用 ---> start"); |
| | | Map<String, String> aesMap= (Map<String, String>) JSON.parse(aesString); |
| | | String desString=MyAESUtil.Decrypt(aesMap.get("aesString"),"Ryo7M3n8loC5Abcd"); |
| | | Map<String,String> desMap= (Map) JSON.parse(desString); |
| | | Map map=umfPayUtil.repay(desMap.get("orderId"),desMap.get("merdate"), DateUtils.getDateFormatString(new Date(),"yyMMddHHmmss")+"0001",desMap.get("refundAmount"),desMap.get("orgAmount")); |
| | | log.error("uuRepay接口调用 ---> end 订单号:"+desMap.get("orderId")); |
| | | return R.ok(map); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | @PostMapping("/uuPush") |
| | | public R uuPush(@RequestBody String aesString){ |
| | | try { |
| | | log.error("uu洗车推送 ---> start"); |
| | | Map<String, String> aesMap= (Map<String, String>) JSON.parse(aesString); |
| | | String desString=MyAESUtil.Decrypt(aesMap.get("aesString"),"Ryo7M3n8loC5Abcd"); |
| | | Map<String,String> desMap= (Map) JSON.parse(desString); |
| | |
| | | @PostMapping("/wsPush") |
| | | public R wsPush(@RequestBody String aesString){ |
| | | try { |
| | | log.error("ws洗车推送 ---> start"); |
| | | Map<String, String> aesMap= (Map<String, String>) JSON.parse(aesString); |
| | | String desString=MyAESUtil.Decrypt(aesMap.get("aesString"),"Ryo7M3n8loC5Abcd"); |
| | | Map<String,String> desMap= (Map) JSON.parse(desString); |
| | |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | public static void main(String[] args) throws Exception{ |
| | | String ryo7M3n8loC5Abcd = MyAESUtil.Encrypt("{\"order_status\":\"9\",\"wash_name\":null,\"wash_mobile\":null,\"phone\":\"15828259512\"}", "Ryo7M3n8loC5Abcd"); |
| | | // String ryo7M3n8loC5Abcd = MyAESUtil.Decrypt("Ixp8WMuJ9bnKhiBKmKWq\/rQXQ7SaWc3fHLB1e\/PzAvIEN0CH1nXtMCBzMegT49on31S+3Itop388Yc0EGVx30GGVlG81p7ssiqHlLRna2i903Rid9hqbjZdrBomiy2jp", "Ryo7M3n8loC5Abcd"); |
| | | System.out.println(ryo7M3n8loC5Abcd); |
| | | } |
| | | } |
| | |
| | | subscribeDTO.setTemplate_id(templateId); |
| | | subscribeDTO.setPage("pages/washer/order/index"); |
| | | List<TemplateParam> paras=new ArrayList<TemplateParam>(); |
| | | paras.add(new TemplateParam("thing1", "上门洗车")); |
| | | paras.add(new TemplateParam("thing4", phone)); |
| | | paras.add(new TemplateParam("thing2", "上门洗车")); |
| | | paras.add(new TemplateParam("thing5", phone)); |
| | | subscribeDTO.setTemplateParamList(paras); |
| | | try { |
| | | log.info(subscribeDTO.toString()); |
| | | sendSubscribe(accessToken,subscribeDTO); |
| | | }catch (Exception e){ |
| | | log.error(e.getMessage()); |
| | |
| | | public String getWsAccessToken() throws Exception { |
| | | String accessToken = "0"; |
| | | try { |
| | | log.info("获取微信token参数:appid=" + APP_ID + ",appSecret=" + APP_SECRET); |
| | | // log.info("获取微信token参数:appid=" + APP_ID + ",appSecret=" + APP_SECRET); |
| | | String accessTokenUrl = ACCESS_TOKEN_URL + "&appid=wx98d62711dfbd8425"+ "&secret=97a2a10b990c2774ed279724337b5337"; |
| | | String result = HttpClientUtil.httpGet(accessTokenUrl, null, null); |
| | | Map<String, Object> resultMap = JSON.parseObject(result, Map.class); |