一、项目背景
随着科技的快速发展和互联网的普及,人们的生活方式发生了翻天覆地的变化。特别是在支付领域,传统的现金支付方式逐渐被电子支付所取代。支付宝和微信作为中国两大移动支付巨头,凭借其便捷、高效的特点,深受用户的喜爱。然而,传统的租赁业务往往伴随着押金的问题,这不仅增加了用户的经济负担,也影响了租赁业务的效率。因此,支付宝和微信纷纷推出了免押系统,旨在通过技术创新,优化租赁流程,提升用户体验。
二、项目功能结构
支付宝和微信的免押系统采用了先进的信用评估技术,通过用户的支付行为、社交关系、履约记录等多维度数据,构建出用户的信用画像。基于这一画像,系统能够判断用户的信用等级,从而决定是否为其提供免押服务。
在功能结构上,免押系统主要分为以下几个模块:
-
信用评估模块:该模块负责收集和分析用户数据,生成信用评分。通过机器学习和大数据分析技术,系统能够实时更新用户的信用状态,确保评估结果的准确性和时效性。
-
免押服务申请模块:用户在使用租赁服务时,可以通过支付宝或微信平台提交免押申请。系统会根据用户的信用评分,自动判断是否批准其申请。
-
风险监控模块:该模块负责对免押服务进行实时监控,一旦发现异常行为或风险事件,系统会立即采取措施,保障租赁双方的权益。
-
数据报告与分析模块:系统定期生成免押服务的数据报告,帮助运营者了解服务的使用情况、用户反馈等信息,为优化服务提供依据。
三、项目用途
支付宝和微信的免押系统具有广泛的用途,主要体现在以下几个方面:
-
优化租赁流程:通过免押系统,用户可以更加便捷地获取租赁服务,无需再为押金问题而烦恼。同时,租赁方也能减少押金管理的工作量,提高业务效率。
-
提升用户体验:免押服务降低了用户的经济负担,增强了用户对支付宝和微信平台的信任感和满意度。这种优质的用户体验有助于吸引更多用户,进一步提升平台的竞争力。
-
推动信用体系建设:免押系统以信用评估为基础,通过实际应用推动社会信用体系的完善。随着越来越多的人和机构参与到信用体系中来,社会的整体信用水平将得到提升。
四、项目前景
支付宝和微信的免押系统作为移动支付领域的一大创新,具有广阔的发展前景。随着技术的不断进步和数据的不断积累,免押系统的信用评估能力将越来越强,服务范围也将不断扩大。未来,免押系统有望覆盖更多领域,如共享单车、共享汽车、房屋租赁等,为更多用户提供便捷、高效的免押服务。
同时,随着社会信用体系的不断完善,免押服务将成为社会信任的重要体现。通过免押服务,人们可以更加便捷地获取各种资源和服务,推动社会的和谐发展。
package cn.eangaie.appcloud.controller;
import cn.eangaie.appcloud.entity.*;
import cn.eangaie.appcloud.service.*;
import cn.eangaie.appcloud.util.*;
import com.alipay.api.AlipayApiException;
import com.alipay.api.response.AlipayMerchantItemFileUploadResponse;
import com.alipay.api.response.AlipayTradeCreateResponse;
import com.alipay.api.response.AlipayTradeQueryResponse;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.lang.Nullable;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author Ean
* @version 0.1.0
* @Description
* @create 2020-08-21 15:02
* @since 0.1.0
**/
@RestController
@Api(tags = "支付宝支付相关控制处理器")
@RequestMapping("my/")
@Slf4j
public class MyPayController {
final
MyService myService;
final
OrderService orderService;
final
TradeRecService tradeRecService;
@Value("${my.notify.freeze_notify_url}")
private String freezeNotifyUrl;
@Value("${my.notify.stagePayUrl}")
private String stagePayUrl;
@Value("${my.notify.firstStagePayUrl}")
private String firstStagePayUrl;
@Value("${my.notify.buyoutNotify}")
private String buyoutNotify;
@Value("${my.notify.MerchantApplyNotify}")
private String MerchantApplyNotify;
@Value("${my.notify.kprenNotify}")
private String kprenNotify;
final
StageBillService stageBillService;
final
OrderbackService orderbackService;
@Autowired
PayMapService payMapService;
@Autowired
MerchantApplayService merchantApplayService;
@Autowired
DistLineService distLineService;
@Autowired
MessageUtil messageUtil;
@Autowired
ExtraService extraService;
@Autowired
OrderTemplate orderTemplate;
@Autowired
DeductionRecordService deductionRecordService;
@Autowired
AttrService attrService;
@Autowired
CommissionService commissionService;
public MyPayController(MyService myService, OrderService orderService, TradeRecService tradeRecService, OrderbackService orderbackService, StageBillService stageBillService) {
this.myService = myService;
this.orderService = orderService;
this.tradeRecService = tradeRecService;
this.orderbackService = orderbackService;
this.stageBillService = stageBillService;
}
/**
* @return cn.eangaie.appcloud.entity.Result
* @Author Ean
* @Description 冻结查询接口,成功返回code0。失败-1
* @Date 17:07 2021/7/3 0003
* @Param [orderNo, orderRequestNo]
**/
@ApiOperation("冻结查询接口,成功返回code0。失败-1")
@PostMapping("freezeQuery")
public Result freezeQuery(String orderNo, String orderRequestNo) {
try {
String res = myService.queryRes(orderNo, orderRequestNo);
if (null != res) {
return ResultUtil.success();
}
} catch (AlipayApiException e) {
e.printStackTrace();
}
return ResultUtil.error(-1, "冻结失败");
}
/**
* @return cn.eangaie.appcloud.entity.Result
* @Author Ean
* @Description 在用--首期扣款接口。首期金额由前端计算。采用支付宝支付的方式。有对应的回调接口处理后续操作。
* @Date 9:44 2021/6/23 0023
* @Param [orderId]
**/
@ApiOperation("第一期支付,原先的接口是从预授权里边扣除,现在改成了使用支付宝支付的方式")
@PostMapping("firstTradeV2")
public Result firstTradeV2(Strin