| | |
| | | import com.ruoyi.common.core.constant.ExpressCompanyMap; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.exception.ServiceException; |
| | | import com.ruoyi.common.core.utils.HttpUtils; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.common.core.utils.uuid.QRCodeGenerator; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | |
| | | } |
| | | // 优惠券 |
| | | String couponJson = order.getCouponJson(); |
| | | CouponInfo couponInfo = new CouponInfo(); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | if (StringUtils.isNotEmpty(couponJson)) { |
| | | couponInfo = JSONObject.parseObject(couponJson, CouponInfo.class); |
| | | jsonObject = JSONObject.parseObject(couponJson); |
| | | } |
| | | |
| | | // 参与活动 |
| | |
| | | orderDetailVO.setOrderNumber(order.getOrderNumber()); |
| | | orderDetailVO.setCreateTime(order.getCreateTime()); |
| | | orderDetailVO.setTotalAmount(order.getTotalAmount()); |
| | | orderDetailVO.setCouponName(couponInfo.getCouponName()); |
| | | orderDetailVO.setCouponName(jsonObject.getString("couponName")); |
| | | orderDetailVO.setActivityName(orderActivityInfo.getActivityName()); |
| | | orderDetailVO.setCouponAmount(order.getDiscountTotalAmount()); |
| | | orderDetailVO.setExpressAmount(order.getExpressAmount()); |
| | |
| | | } |
| | | return orderDetailVO; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public boolean check(Order order, Integer shopId, Long userId) { |
| | |
| | | userAddress.getProvince() + userAddress.getCity()); |
| | | order.setExpressResult(JSON.toJSONString(mapTrackKD100Vo)); |
| | | this.updateById(order); |
| | | |
| | | |
| | | String s = HttpUtils.sendGet("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=wxdeed472c98e42a54&secret=c89c697c981452480e0781fb82d4284c"); |
| | | JSONObject jsonObject2 = JSONObject.parseObject(s); |
| | | System.out.println(jsonObject.getString("access_token")); |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | String a = "{\n" + |
| | | " \"access_token\": \"90_4PJ8b5aLJa2M7aCtoskALEzfoap1me291Jc3ogi18NGH0Ts-Tol7K3COLLvkQ1JLcouvew11ORqcHf6mH5LA2KSC08NxiDhsjRPKuRh14mpvQRHmeFvwr-wKWjkANLdACAUHF\",\n" + |
| | | " \"order_key\": {\n" + |
| | | " \"order_number_type\": 1\n" + |
| | | " },\n" + |
| | | " \"logistics_type\": 1,\n" + |
| | | " \"delivery_mode\": 1,\n" + |
| | | " \"shipping_list\": [\n" + |
| | | " {\n" + |
| | | " \"item_desc\": \"这是一个测试\"\n" + |
| | | " }\n" + |
| | | " ],\n" + |
| | | " \"upload_time\": \"2022-12-15T13:29:35.120+08:00\",\n" + |
| | | " \"payer\": {\n" + |
| | | " \"openid\": \"ooOrs63KYDHcyhnUmTFpprHc6sb4\"\n" + |
| | | " }\n" + |
| | | "}"; |
| | | |
| | | JSONObject jsonObject = JSONObject.parseObject(a); |
| | | System.out.println(jsonObject); |
| | | } |
| | | |
| | | |
| | | public static void importExpress2(String filePath) throws MalformedURLException { |
| | | // 从网络地址读取 |