资源简介

程序通过.net core 3.0编写,实现微信H5支付、公众号支付(JSAPI)、扫码支付等。该程序也可以作为.net core快速开发框架(该框架从一沙快速开发框架改编过来,个人认为很不错)。人格保证出了支付接口测试通过。代码是几个月前写的,测试截图已经没有,望见谅,有疑问请留言。


【核心代码】

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using YKH.Entity;
using YKH.Service;
using YKH.Util;
using YKH.Util.Extension;
using YKH.Util.Model;

namespace YKH.Business
{
    public class OrderPayBll
    {
        private OrderPayService cardService = new OrderPayService();
        #region 获取数据
        /// 
        /// 根据订单Id查询订单信息
        /// 

        /// 
        /// 
        public Task GetOrder(string orderNo)
        {
            return cardService.GetOrder(orderNo);
        }
        #endregion

        #region 提交数据
        /// 
        /// 添加订单信息
        /// 

        /// 
        /// 
        public async Task> AddOrder(OrderPayEntity entity)
        {
            ReturnResult obj = new ReturnResult();
            //查询订单数量
            var count = await cardService.GetOrderCountAsync(entity.OrderNo);
            if (count > 0)
            {
                return new Tuple(false “该订单已添加过“);
            }
            else
            {
                await cardService.AddOrder(entity);
                return new Tuple(true “添加成功“);
            }
        }
        /// 
        /// 添加订单信息
        /// 

        /// 
        /// 
        public async Task> UpdateOrder(OrderPayEntity entity)
        {
            ReturnResult obj = new ReturnResult();
            //查询订单数量
            OrderPayEntity orderEntity = await cardService.GetOrder(entity.OrderNo);
            if (orderEntity == null)
            {
                return new Tuple(false “未查询到订单信息“);
            }
            else
            {
                orderEntity = Reflectionhelper.Mapper(orderEntity entity);
                await cardService.AddOrder(orderEntity);
                return new Tuple(true “更新成功“);
            }
        }
        #endregion

        #region 私有方法

        #endregion
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2020-09-24 05:38  Document\
     文件         177  2020-09-24 05:38  __MACOSX\._Document
     目录           0  2020-09-29 13:51  Lib\
     文件         177  2020-09-29 13:51  __MACOSX\._Lib
     文件     1676429  2020-11-20 06:38  ykh_dev_card.sql
     文件         176  2020-11-20 06:38  __MACOSX\._ykh_dev_card.sql
     目录           0  2020-11-05 09:31  YKH.Business\
     文件         177  2020-11-05 09:31  __MACOSX\._YKH.Business
     目录           0  2020-11-06 03:44  YKH.Business\YKH.Service\
     文件         177  2020-11-06 03:44  __MACOSX\YKH.Business\._YKH.Service
     目录           0  2020-11-06 06:16  YKH.Business\YKH.Business\
     文件         177  2020-11-06 06:16  __MACOSX\YKH.Business\._YKH.Business
     目录           0  2020-11-06 03:09  YKH.Business\YKH.Service\obj\
     文件         177  2020-11-06 03:09  __MACOSX\YKH.Business\YKH.Service\._obj
     文件        1801  2020-11-06 03:44  YKH.Business\YKH.Service\OrderPayService.cs
     文件         177  2020-11-06 03:44  __MACOSX\YKH.Business\YKH.Service\._OrderPayService.cs
     目录           0  2020-11-05 09:31  YKH.Business\YKH.Service\bin\
     文件         177  2020-11-05 09:31  __MACOSX\YKH.Business\YKH.Service\._bin
     文件         584  2020-11-06 02:40  YKH.Business\YKH.Service\YKH.Service.csproj
     文件         177  2020-11-06 02:40  __MACOSX\YKH.Business\YKH.Service\._YKH.Service.csproj
     目录           0  2020-11-06 03:09  YKH.Business\YKH.Business\obj\
     文件         177  2020-11-06 03:09  __MACOSX\YKH.Business\YKH.Business\._obj
     文件        2404  2020-11-06 06:16  YKH.Business\YKH.Business\OrderPayBll.cs
     文件         177  2020-11-06 06:16  __MACOSX\YKH.Business\YKH.Business\._OrderPayBll.cs
     目录           0  2020-11-05 09:31  YKH.Business\YKH.Business\bin\
     文件         177  2020-11-05 09:31  __MACOSX\YKH.Business\YKH.Business\._bin
     文件         480  2020-11-06 03:26  YKH.Business\YKH.Business\YKH.Business.csproj
     文件         177  2020-11-06 03:26  __MACOSX\YKH.Business\YKH.Business\._YKH.Business.csproj
     文件        1379  2020-08-25 08:35  YKH.Business\YKH.Service\obj\YKH.Service.csproj.nuget.g.props
     文件         177  2020-08-25 08:35  __MACOSX\YKH.Business\YKH.Service\obj\._YKH.Service.csproj.nuget.g.props
     文件       17338  2020-11-06 03:09  YKH.Business\YKH.Service\obj\YKH.Service.csproj.nuget.dgspec.json
............此处省略1689个文件信息

评论

共有 条评论