|  | @@ -0,0 +1,50 @@
 | 
	
		
			
				|  |  | +package com.zswl.dataservicestarter.service;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +import com.zswl.dataservicestarter.dao.DataServicePaymentInfoDao;
 | 
	
		
			
				|  |  | +import com.zswl.dataservicestarter.domain.DataServiceOrderInfo;
 | 
	
		
			
				|  |  | +import com.zswl.dataservicestarter.domain.DataServicePaymentInfo;
 | 
	
		
			
				|  |  | +import com.zswl.dataservicestarter.utils.result.ResultContent;
 | 
	
		
			
				|  |  | +import org.apache.commons.lang3.ObjectUtils;
 | 
	
		
			
				|  |  | +import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  | +import org.springframework.stereotype.Service;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +/**
 | 
	
		
			
				|  |  | + * 支付信息管理
 | 
	
		
			
				|  |  | + *
 | 
	
		
			
				|  |  | + * @author TRX
 | 
	
		
			
				|  |  | + * @date 2024/3/25
 | 
	
		
			
				|  |  | + */
 | 
	
		
			
				|  |  | +@Service
 | 
	
		
			
				|  |  | +public class DataServicePaymentInfoService {
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  | +    DataServicePaymentInfoDao paymentInfoDao;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    /**
 | 
	
		
			
				|  |  | +     * 更加HashCode验证订单信息是否存在
 | 
	
		
			
				|  |  | +     *
 | 
	
		
			
				|  |  | +     * @param hashCode
 | 
	
		
			
				|  |  | +     * @return
 | 
	
		
			
				|  |  | +     */
 | 
	
		
			
				|  |  | +    public ResultContent validateDataByHashCode(int hashCode) {
 | 
	
		
			
				|  |  | +        DataServicePaymentInfo paymentInfo = paymentInfoDao.findTopByHashCode(hashCode);
 | 
	
		
			
				|  |  | +        if (ObjectUtils.isEmpty(paymentInfo)) {
 | 
	
		
			
				|  |  | +            return ResultContent.buildFail("对应数据未找到");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        return ResultContent.buildSuccess();
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    /**
 | 
	
		
			
				|  |  | +     * 更加dataId验证订单信息是否存在
 | 
	
		
			
				|  |  | +     *
 | 
	
		
			
				|  |  | +     * @param dataId
 | 
	
		
			
				|  |  | +     * @return
 | 
	
		
			
				|  |  | +     */
 | 
	
		
			
				|  |  | +    public ResultContent validateDataByDataId(String dataId) {
 | 
	
		
			
				|  |  | +        DataServicePaymentInfo paymentInfo = paymentInfoDao.findTopByDataId(dataId);
 | 
	
		
			
				|  |  | +        if (ObjectUtils.isEmpty(paymentInfo)) {
 | 
	
		
			
				|  |  | +            return ResultContent.buildFail("对应数据未找到");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        return ResultContent.buildSuccess();
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +}
 |