@@ -1 +1 @@ | |||
27692 | |||
29392 |
@@ -169,6 +169,6 @@ sourceSets { | |||
} | |||
} | |||
//test { | |||
// enabled = false | |||
//} | |||
test { | |||
enabled = false | |||
} |
@@ -17,7 +17,7 @@ import org.springframework.web.client.RestTemplate; | |||
@SpringBootApplication | |||
@EnableAspectJAutoProxy(proxyTargetClass = true) | |||
@EnableTransactionManagement | |||
//@EnableScheduling | |||
@EnableScheduling | |||
public class UserApplication extends SpringBootServletInitializer { | |||
public static void main(String[] args) { |
@@ -16,7 +16,7 @@ import javax.persistence.Table; | |||
public class AflPaccountRefundCount extends AbstractUpdateTimeEntity { | |||
/** 记账日期 */ | |||
private String accountDate ; | |||
private Integer accountDate ; | |||
/** 渠道编号 */ | |||
private String agentId ; | |||
/** 总条数 */ | |||
@@ -31,7 +31,7 @@ public class AflPaccountRefundCount extends AbstractUpdateTimeEntity { | |||
public AflPaccountRefundCount() { | |||
} | |||
public AflPaccountRefundCount(String accountDate, String agentId, Long numberTotal, Long moneyTotal, Long collectMoney) { | |||
public AflPaccountRefundCount(Integer accountDate, String agentId, Long numberTotal, Long moneyTotal, Long collectMoney) { | |||
this.accountDate = accountDate; | |||
this.agentId = agentId; | |||
this.numberTotal = numberTotal; | |||
@@ -43,11 +43,11 @@ public class AflPaccountRefundCount extends AbstractUpdateTimeEntity { | |||
/** 记账日期 */ | |||
@Column(name ="ACCOUNT_DATE") | |||
public String getAccountDate(){ | |||
public Integer getAccountDate(){ | |||
return this.accountDate; | |||
} | |||
/** 记账日期 */ | |||
public void setAccountDate(String accountDate){ | |||
public void setAccountDate(Integer accountDate){ | |||
this.accountDate=accountDate; | |||
} | |||
/** 渠道编号 */ |
@@ -26,28 +26,7 @@ public interface AflPaccountRefundCountRepo extends AbstractJpaRepo<AflPaccountR | |||
@Query(" from AflPaccountRefundCount where agentId = ?1 and accountDate=?2") | |||
AflPaccountRefundCount finByDateAndAgentId(String agentId, String accountDate); | |||
/** | |||
* 查询报表数据. (按时间模糊查询). | |||
* | |||
* 此sql应用于报表导出查询 =》部中心请款流水分类数据 | |||
* | |||
* @param reportMonth 时间前缀 | |||
* @return List<ExcelHeadFlowClassificationVO> | |||
*/ | |||
@Query("select new com.qtzl.alterSales.dao.excelVO.head.serviceFee50.ExcelHeadFlowClassificationVO(agentId, accountDate, moneyTotal) from AflPaccountRefundCount where accountDate like CONCAT(:reportMonth, '%')") | |||
List<ExcelHeadFlowClassificationVO> findByDayGroup(@Param("reportMonth") String reportMonth); | |||
/** | |||
* 查询报表数据分页(按时间模糊查询). | |||
* | |||
* @param reportMonth 时间前缀 | |||
* @param pageable 分页信息 | |||
* @return Page<AflPaccountRefundCount> | |||
*/ | |||
@Query("FROM AflPaccountRefundCount a WHERE a.accountDate LIKE CONCAT(?1, '%')") | |||
Page<AflPaccountRefundCount> findByDayGroupPageEntities(String reportMonth, Pageable pageable); | |||
AflPaccountRefundCount finByDateAndAgentId(String agentId, Integer accountDate); | |||
} |
@@ -135,7 +135,7 @@ public class AflPaccountRefundCountServiceImpl implements AflPaccountRefundCount | |||
if ("52010188999".equals(fssPaccountPay.getAgentId())){ | |||
fssPaccountPay.setAgentId("52010188930"); | |||
} | |||
aflPaccountRefundCount = aflPaccountRefundCountRepo.finByDateAndAgentId(fssPaccountPay.getAgentId(),format); | |||
aflPaccountRefundCount = aflPaccountRefundCountRepo.finByDateAndAgentId(fssPaccountPay.getAgentId(),Integer.valueOf(format)); | |||
} catch (NumberFormatException e) { | |||
log.error("格式转换有误,AgentId ={},accountDate={}",fssPaccountPay.getAgentId(),format); | |||
} |
@@ -121,7 +121,7 @@ public class ChoiceBillsOperationServiceImpl implements ChoiceBillsOperationServ | |||
final Object redisData = redisUtils.get(REDIS_KEY + payId); | |||
if (!ObjectUtil.isEmpty(redisData)) { | |||
log.warn("该笔流水用户正在轮扣中,请10分钟后重试...payId:" + payId); | |||
throw UcServiceError.BUSINESS_VALIDATE_ERR.toHandleException("系统轮扣等待微信结果中,为避免重复扣费,请10分钟稍后重试"); | |||
throw UcServiceError.BUSINESS_VALIDATE_ERR.toHandleException("系统轮扣等待微信结果中,为避免重复扣费,请10分钟后重试"); | |||
} | |||
} | |||
final String vehicleId = vehicleIds.iterator().next(); | |||
@@ -161,8 +161,8 @@ public class ChoiceBillsOperationServiceImpl implements ChoiceBillsOperationServ | |||
orderInsertVo.setOrderNo(orderNo); | |||
orderInsertVo.setOrderId(payOrder.getId()); | |||
for (String payId : request.getPayIds()) { | |||
// 插入不允许轮扣 | |||
redisUtils.set(REDIS_KEY + payId, payId); | |||
// 插入不允许轮扣。 10分钟后过期 | |||
redisUtils.set(REDIS_KEY + payId, payId, 600L); | |||
} | |||
return orderInsertVo; | |||
} | |||
@@ -173,9 +173,6 @@ public class ChoiceBillsOperationServiceImpl implements ChoiceBillsOperationServ | |||
if (!AflApPayOrderStatus.TO_BE_PAID.equals(payOrder.getOrderStatus())) { | |||
throw UcServiceError.BUSINESS_VALIDATE_ERR.toHandleException("当前订单不允许关闭"); | |||
} | |||
jsapiV3Manager.jsApiOrderClose(payOrder.getOrderNo(), mchConfigManager.findBySubMchId(payOrder.getSubMchId())); | |||
payOrder.setOrderStatus(AflApPayOrderStatus.CLOSE); | |||
payOrderRepo.save(payOrder); | |||
final List<String> payIds = payOrderRelRepo.getPayId((id)); | |||
for (String payId : payIds) { | |||
final Object redisData = redisUtils.get(REDIS_KEY + payId); | |||
@@ -183,6 +180,9 @@ public class ChoiceBillsOperationServiceImpl implements ChoiceBillsOperationServ | |||
redisUtils.del(REDIS_KEY + payId); | |||
} | |||
} | |||
jsapiV3Manager.jsApiOrderClose(payOrder.getOrderNo(), mchConfigManager.findBySubMchId(payOrder.getSubMchId())); | |||
payOrder.setOrderStatus(AflApPayOrderStatus.CLOSE); | |||
payOrderRepo.save(payOrder); | |||
} | |||
@Override |
@@ -127,7 +127,7 @@ public class FssPaccountPayServiceImpl implements FssPaccountPayService { | |||
aflPaccountRefundCount.setRefundMoney(refundMoney); | |||
if (!StringUtils.isEmpty(aflPaccountRefundCountVo.getAccountDate())) { | |||
String accountDate = aflPaccountRefundCountVo.getAccountDate().replaceAll("-", ""); | |||
aflPaccountRefundCount.setAccountDate(accountDate); | |||
aflPaccountRefundCount.setAccountDate(Integer.parseInt(accountDate)); | |||
} | |||
if ("52010188999".equals(aflPaccountRefundCount.getAgentId()) && aflPaccountRefundCount.getAccountDate() != null) { | |||
bydAflPaccountRefundCount = aflPaccountRefundCount; | |||
@@ -204,9 +204,9 @@ public class FssPaccountPayServiceImpl implements FssPaccountPayService { | |||
} | |||
AflPaccountRefundCount aflPaccountRefundCount= null; | |||
if("52010188999".equals(aflPaccountRefundCountVo.getAgentId())&&StringUtils.isNotEmpty(accountDate)){ | |||
aflPaccountRefundCount= aflPaccountRefundCountRepo.finByDateAndAgentId("52010188930",accountDate); | |||
aflPaccountRefundCount= aflPaccountRefundCountRepo.finByDateAndAgentId("52010188930",Integer.valueOf(accountDate)); | |||
}else { | |||
aflPaccountRefundCount= aflPaccountRefundCountRepo.finByDateAndAgentId(aflPaccountRefundCountVo.getAgentId(),accountDate); | |||
aflPaccountRefundCount= aflPaccountRefundCountRepo.finByDateAndAgentId(aflPaccountRefundCountVo.getAgentId(), StringUtils.isEmpty(accountDate) ? null : Integer.parseInt(accountDate)); | |||
} | |||
if (aflPaccountRefundCount==null){ | |||
aflPaccountRefundCount = new AflPaccountRefundCount(); | |||
@@ -218,7 +218,7 @@ public class FssPaccountPayServiceImpl implements FssPaccountPayService { | |||
aflPaccountRefundCount.setRefundMoney(refundMoney); | |||
if (!StringUtils.isEmpty(aflPaccountRefundCountVo.getAccountDate())){ | |||
String accountDateStr=aflPaccountRefundCountVo.getAccountDate().replaceAll("-",""); | |||
aflPaccountRefundCount.setAccountDate(accountDateStr); | |||
aflPaccountRefundCount.setAccountDate(Integer.valueOf(accountDateStr)); | |||
} | |||
if ("52010188999".equals(aflPaccountRefundCount.getAgentId())&&aflPaccountRefundCount.getAccountDate()!=null){ | |||
bydAflPaccountRefundCount=aflPaccountRefundCount; |
@@ -22,7 +22,7 @@ public class FileSystemUrlUtil { | |||
String am = "xzxt"; | |||
String key = "15d217c-9c03-12ec-ca76-0242ac110321"; | |||
// 拼接参数 | |||
StringBuilder sb = new StringBuilder(fileUrlStr); | |||
StringBuilder sb = new StringBuilder(fileUrlStr.contains("&") ? fileUrlStr.split("&")[0] : fileUrlStr); | |||
return sb.append("&tp=").append(tp) | |||
.append("&am=").append(am) | |||
.append("&sg=").append(MD5FileAccessVerifyUtil.getHmacMD5(tp + MD5FileAccessVerifyUtil.getFileIdFromUrl(fileUrlStr), key)).toString(); |