|
|
|
|
@ -8,6 +8,7 @@ import com.flossom.common.core.constant.CacheConstants;
|
|
|
|
|
import com.flossom.common.core.domain.R;
|
|
|
|
|
import com.flossom.common.core.domain.shuyun.*;
|
|
|
|
|
import com.flossom.common.core.exception.ServiceException;
|
|
|
|
|
import com.flossom.common.core.utils.DateUtils;
|
|
|
|
|
import com.flossom.common.redis.service.RedisService;
|
|
|
|
|
import com.flossom.miniProgram.utils.HttpClientUtils;
|
|
|
|
|
import com.shuyun.open.sdk.bean.HttpMethod;
|
|
|
|
|
@ -19,7 +20,10 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
|
import java.time.LocalTime;
|
|
|
|
|
import java.time.ZoneId;
|
|
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
|
|
import java.time.temporal.TemporalAdjusters;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
@ -279,14 +283,17 @@ public class ShuYunApiUtils {
|
|
|
|
|
* 查询即将过期积分
|
|
|
|
|
* https://open.shuyun.com/#/apidoc?type=41&apiId=249
|
|
|
|
|
*/
|
|
|
|
|
public static Integer pointWillDueSearch(String tenant, String platId, String cardPlanId, String timeType, String startTime, String endTime) {
|
|
|
|
|
public static Integer pointWillDueSearch(String platId) {
|
|
|
|
|
Map<String, String> params = MapUtil.newHashMap();
|
|
|
|
|
params.put("tenant", tenant);
|
|
|
|
|
params.put("tenant", shuYunConfig.getTenant());
|
|
|
|
|
params.put("platId", platId);
|
|
|
|
|
params.put("platCode", shuYunConfig.getPlatCode());
|
|
|
|
|
params.put("shopId", shuYunConfig.getShopId());
|
|
|
|
|
params.put("cardPlanId", cardPlanId);
|
|
|
|
|
params.put("timeType", timeType);
|
|
|
|
|
params.put("cardPlanId", shuYunConfig.getCardPlanId());
|
|
|
|
|
params.put("timeType", "RELATIVE");
|
|
|
|
|
LocalDateTime now = LocalDateTime.now();
|
|
|
|
|
String startTime = now.plusHours(1).format(DateTimeFormatter.ofPattern(DateUtils.YYYY_MM_DD_HH_MM_SS));
|
|
|
|
|
String endTime = now.with(TemporalAdjusters.lastDayOfYear()).with(LocalTime.MAX).format(DateTimeFormatter.ofPattern(DateUtils.YYYY_MM_DD_HH_MM_SS));
|
|
|
|
|
params.put("startTime", startTime);
|
|
|
|
|
params.put("endTime", endTime);
|
|
|
|
|
try {
|
|
|
|
|
|