博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Funcation:Object
阅读量:4682 次
发布时间:2019-06-09

本文共 1763 字,大约阅读时间需要 5 分钟。

ylbtech-Funcation:Object

 

1.
1、
public object GetMyRelation()        {            var list = new List();            int directCount = 0, totalCount = 0, otherCount = 0, reward = 0;            DbConnectionManipulator.RunMainDatabase(conn =>            {                //直接好友                var directList = conn.Query
("select Id,Mobile,CreateTime from Member where PromoCode = @ID", new { ID = UserContext.GetMemberId() }).ToList(); //间接好友 int sumcount = 0; foreach(var model in directList) { if (model == null) continue; var count = conn.QueryFirstOrDefault
("select count(1) from Member where PromoCode = @ID", new { ID = model.Id }); sumcount += count; list.Add(new { Id = model.Id, Mobile = model.Mobile, CreateTime = model.CreateTime, Count = count }); } reward = conn.QueryFirstOrDefault
("select RewardIntegral from IntegralList where MemberId = @MemberId", new { MemberId = UserContext.GetMemberId() }); directCount = directList.Count; totalCount = sumcount + directCount; otherCount = sumcount; }); return new { list, directCount, totalCount, otherCount, reward }; }
2、
2.
 
3.
 
4.
 
5.
 
 
6.
 
warn 作者:
出处:
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

转载于:https://www.cnblogs.com/storebook/p/8962880.html

你可能感兴趣的文章
【FFMPEG】Ubuntu上安装FFMPEG
查看>>
【QT开发】信号转发器QSignalMapper的使用
查看>>
关于VS2010工程各种路径注意事项汇总
查看>>
Codeforces 732F. Tourist Reform (Tarjan缩点)
查看>>
JavaScript设计模式
查看>>
C++程序设计之提高效率
查看>>
set unused的用法(ORACLE删除字段)
查看>>
决策树算法
查看>>
hdu 1198 Farm Irrigation
查看>>
80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
查看>>
三角洲调平说明
查看>>
线程和进程(Java)
查看>>
PMP CMM
查看>>
day03 bs4解析库之遍历文档树
查看>>
Linux下通过ssh访问另一台内网服务器
查看>>
antd在webpack里面的配置
查看>>
redis 适用场景、缓存选择、java实现
查看>>
国际化问题简述
查看>>
poj2975 Nim
查看>>
.NET面试题系列(十四)锁
查看>>