修改参数

master
bynt 1 year ago
parent 213787a91a
commit c3e552818c

@ -125,6 +125,12 @@ public class DefaultNumberConstants {
* 30 * 30
*/ */
public static final int THIRTY = 30; public static final int THIRTY = 30;
/**
* 60
*/
public static final int FIFTY = 50;
/** /**
* 60 * 60
*/ */

@ -363,7 +363,9 @@ public class CustomManageServiceImpl implements CustomManageService {
@Override @Override
public void enableChannelCustom(Long userId) { public void enableChannelCustom(Long userId) {
ChannelCustom custom = channelCustomRepository.findByUserId(userId); ChannelCustom custom = channelCustomRepository.findByUserId(userId);
channelCustomRepository.updateCustomStatus(custom.getId(), 1); if (ObjectUtil.isNotNull(custom)) {
channelCustomRepository.updateCustomStatus(custom.getId(), 1);
}
} }
private void disableChannelById(ChannelCustom custom, List<ChannelCustom> channelCustoms, List<Integer> num) { private void disableChannelById(ChannelCustom custom, List<ChannelCustom> channelCustoms, List<Integer> num) {

@ -88,11 +88,10 @@ public class AliPayServiceImpl implements AliPayService {
companyById.getUserBalance() : DefaultNumberConstants.ZERO_NUMBER; companyById.getUserBalance() : DefaultNumberConstants.ZERO_NUMBER;
companyService.updateUserBalanceByCompanyId companyService.updateUserBalanceByCompanyId
(NumberUtil.add(balance, order.getAmount()), companyId); (NumberUtil.add(balance, order.getAmount()), companyId);
redisUtils.set("call_sms:" + companyId, 0); redisUtils.set("call_sms:" + companyId, 0);
payOrderRepository.save(order);
return ResponseCode.SUCCESS.getDesc();
} }
payOrderRepository.save(order);
return ResponseCode.SUCCESS.getDesc();
} }
} }
} catch (Exception e) { } catch (Exception e) {
@ -113,9 +112,9 @@ public class AliPayServiceImpl implements AliPayService {
valueStr = (i == values.length - 1) ? valueStr + values[i] valueStr = (i == values.length - 1) ? valueStr + values[i]
: valueStr + values[i] + StrPool.COMMA; : valueStr + values[i] + StrPool.COMMA;
} }
//乱码解决,这段代码在出现乱码时使用 /* //乱码解决,这段代码在出现乱码时使用
valueStr = new String(valueStr.getBytes valueStr = new String(valueStr.getBytes
(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8); (StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8);*/
params.put(stringEntry.getKey(), valueStr); params.put(stringEntry.getKey(), valueStr);
} }
} }
@ -132,7 +131,7 @@ public class AliPayServiceImpl implements AliPayService {
AlipayTradePagePayResponse response = Factory.Payment.Page() AlipayTradePagePayResponse response = Factory.Payment.Page()
.pay(PayConstants.PAY_TITLE + orderNo, .pay(PayConstants.PAY_TITLE + orderNo,
orderNo, aliPayPcDTO.getAmount().toString(), orderNo, aliPayPcDTO.getAmount().toString(),
aliPay.getNotifyUrl()); aliPay.getReturnUrl());
if (ResponseChecker.success(response)) { if (ResponseChecker.success(response)) {
boolean result = savePayOrder(aliPayPcDTO, orderNo); boolean result = savePayOrder(aliPayPcDTO, orderNo);
log.info("============= the save order result {} =============", result); log.info("============= the save order result {} =============", result);

@ -68,7 +68,7 @@ public class DeliveryBalanceTask {
/** /**
* 821 * 821
*/ */
@Scheduled(cron = "0 0/30 8-21 * * ? ") @Scheduled(cron = "0 0/15 8-21 * * ? ")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void cashResources() { public void cashResources() {
// 查询所有未兑换的 // 查询所有未兑换的
@ -135,7 +135,7 @@ public class DeliveryBalanceTask {
Long minId = (long) DefaultNumberConstants.ZERO_NUMBER; Long minId = (long) DefaultNumberConstants.ZERO_NUMBER;
Long maxId = (long) DefaultNumberConstants.ZERO_NUMBER; Long maxId = (long) DefaultNumberConstants.ZERO_NUMBER;
// 大于100 进行兑换 // 大于100 进行兑换
if (taskImeiList.size() >= DefaultNumberConstants.ONE_HUNDRED) { if (taskImeiList.size() >= DefaultNumberConstants.FIFTY) {
String fileUrl = deliveryProperties.getFileUrl(); String fileUrl = deliveryProperties.getFileUrl();
Comparator<TaskImei> comparing = Comparator.comparing(TaskImei::getId); Comparator<TaskImei> comparing = Comparator.comparing(TaskImei::getId);
String format = DateUtil.format(DateUtil.date(), DatePattern.PURE_DATE_PATTERN); String format = DateUtil.format(DateUtil.date(), DatePattern.PURE_DATE_PATTERN);

Loading…
Cancel
Save