|
|
|
@@ -16,9 +16,6 @@ import com.iformall.exception.MallinkException; |
|
|
|
import com.iformall.service.*; |
|
|
|
import com.iformall.service.park.ParkFactory; |
|
|
|
import com.iformall.service.park.entity.ParkNotifyParam; |
|
|
|
import com.iformall.service.park.impl.cyf.CYFUtil; |
|
|
|
import com.iformall.service.park.impl.etcp.ETCPUtil; |
|
|
|
import com.iformall.service.park.impl.tjd.TJDUtil; |
|
|
|
import com.iformall.service.park.utils.ParkCacheUtils; |
|
|
|
import com.iformall.utils.DateUtils; |
|
|
|
import com.iformall.utils.RedisCacheUtils; |
|
|
|
@@ -30,17 +27,11 @@ import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Qualifier; |
|
|
|
import org.springframework.data.redis.core.RedisTemplate; |
|
|
|
import org.springframework.web.bind.annotation.PostMapping; |
|
|
|
import org.springframework.web.bind.annotation.RequestBody; |
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
|
|
|
|
import java.text.ParseException; |
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
@RestController |
|
|
|
public class WxParkCallBackBaseController extends BaseController { |
|
|
|
@@ -184,9 +175,15 @@ public class WxParkCallBackBaseController extends BaseController { |
|
|
|
if (null == param) { |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
// 回调去重 |
|
|
|
String key = "callback:" + param.getCarNumber(); |
|
|
|
if (RedisCacheUtils.hasKey(redisTemplate, key)) { |
|
|
|
logger.info("回调数据重复=========>{}", JSON.toJSONString(sourceParam)); |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
RedisCacheUtils.cache(redisTemplate, key, "", 60 * 2); |
|
|
|
|
|
|
|
String carNumber = param.getCarNumber(); |
|
|
|
|
|
|
|
ParkCacheUtils.removeCache(redisTemplate, vendor.getMessage(), carNumber); |
|
|
|
ParkCacheUtils.setCarCouponUnUseCacheLock(redisTemplate, vendor.getMessage(), carNumber); |
|
|
|
|
|
|
|
|