This commit is contained in:
Lemon
2023-08-23 15:36:14 +08:00
parent f70a26e714
commit 930486c5ff
8 changed files with 84 additions and 18 deletions

View File

@@ -1,5 +1,6 @@
package com.jsowell.thirdparty.lutongyunting.service;
import com.jsowell.pile.dto.lutongyunting.BindCouponDTO;
import com.jsowell.pile.dto.lutongyunting.GetTokenDTO;
/**
@@ -17,5 +18,10 @@ public interface LTYTService {
*/
String getToken(GetTokenDTO dto);
/**
* 给指定车辆绑定优惠券
* @param dto
* @return
*/
String bindCoupon(BindCouponDTO dto);
}

View File

@@ -8,6 +8,7 @@ import com.jsowell.common.core.redis.RedisCache;
import com.jsowell.common.util.DateUtils;
import com.jsowell.common.util.StringUtils;
import com.jsowell.common.util.sign.MD5Util;
import com.jsowell.pile.dto.lutongyunting.BindCouponDTO;
import com.jsowell.pile.dto.lutongyunting.GetTokenDTO;
import com.jsowell.thirdparty.lutongyunting.service.LTYTService;
import org.slf4j.Logger;
@@ -62,15 +63,8 @@ public class LTYTServiceImpl implements LTYTService {
jsonObject.put("accTime", accTime);
jsonObject.put("version", "1.0");
// Map<String, Object> map = new LinkedHashMap<>();
// map.put("appId", dto.getAppId());
// map.put("accTime", accTime);
// map.put("version", "1.0");
// 获取sign签名
String sign = getSign(jsonObject, dto.getSecretKey());
// map.put("sign", sign);
jsonObject.put("sign", sign);
// 发送请求
@@ -89,6 +83,16 @@ public class LTYTServiceImpl implements LTYTService {
}
}
/**
* 给指定车辆绑定优惠券
* @param dto
* @return
*/
@Override
public String bindCoupon(BindCouponDTO dto) {
return null;
}
public static void main(String[] args) {
// String accTime = DateUtils.dateTimeNow(DateUtils.YYYYMMDDHHMMSS);
// Map<String, Object> map = new LinkedMap<>();