浏览代码

整理增删查改service、controller

lichunlei 1 年之前
父节点
当前提交
b3887241b5

+ 14 - 0
ist

@@ -0,0 +1,14 @@
+[INFO] Scanning for projects...
+[INFO] ------------------------------------------------------------------------
+[INFO] BUILD FAILURE
+[INFO] ------------------------------------------------------------------------
+[INFO] Total time:  0.363 s
+[INFO] Finished at: 2023-07-23T16:01:15+08:00
+[INFO] ------------------------------------------------------------------------
+[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
+[ERROR] 
+[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
+[ERROR] Re-run Maven using the -X switch to enable full debug logging.
+[ERROR] 
+[ERROR] For more information about the errors and possible solutions, please read the following articles:
+[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoGoalSpecifiedException

二进制
src/main/java/com/.DS_Store


二进制
src/main/java/com/kxs/adminap/.DS_Store


+ 9 - 3
src/main/java/com/kxs/adminap/controller/TestController.java

@@ -5,6 +5,7 @@ import java.util.ArrayList;
 import java.util.Date;
 import java.util.Dictionary;
 import java.util.List;
+import java.util.Map;
 
 import org.apache.ibatis.session.SqlSession;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -78,11 +79,16 @@ public class TestController {
 		ReturnFields.add("MakerCode");
 		ReturnFields.add("RealName");
 		relationData.ReturnField = ReturnFields;
+		relationDatas.add(relationData);
 		Users data = new Users();
-		data.setMakerCode("K00000000");
-		data.setRealName("客小爽");
-		List<Users> user = UsersService.List(relationDatas, data, " and Id<10", 1, 10, "Id desc");
+		// data.setMakerCode("K0099");
+		data.setCreateDate(new Date());
+		List<Map<String, Object>> user = UsersService.list(1, 10, "Id desc", "MakerCode,RealName,CreateDate,AuthFlag", data, " and Id<100", relationDatas);
+		// Users user = UsersService.query(data);
 		result += JSONObject.toJSONString(user) + "<br>";
+		// result += UsersService.add(data) + "<br>";
+
+
 		result += Util.DateFormat(new Date(), "yyyy-MM-dd HH:mm:ss.SSS") + "<br>";
 
 		return result;

+ 257 - 1036
src/main/java/com/kxs/adminap/controller/UsersController.java

@@ -1,1036 +1,257 @@
-// package com.kxs.adminap.controller;
-
-// import org.springframework.web.bind.annotation.*;
-
-// import com.alibaba.fastjson.JSONObject;
-// import com.kxs.adminap.enity.AppResultJson;
-// import com.kxs.adminap.enity.RelationData;
-// import com.kxs.adminap.model.Users;
-// import com.kxs.adminap.service.main.UsersService;
-// import com.kxs.adminap.util.DesUtil;
-// import com.kxs.adminap.util.RedisUtils;
-// import com.kxs.adminap.util.UsersUtil;
-// import com.kxs.adminap.util.Util;
-
-// import jakarta.annotation.Resource;
-
-// import java.util.ArrayList;
-// import java.util.Date;
-// import java.util.Dictionary;
-// import java.util.HashMap;
-// import java.util.Hashtable;
-// import java.util.List;
-// import java.util.Map;
-
-// @RestController
-// public class UsersController
-// {
-//     @Resource
-// 	RedisUtils redisUtils;
-
-//     //根据条件查询创客列表
-
-//     /// <summary>
-//     /// 创客列表
-//     /// </summary>
-//     /// <returns></returns>
-//     @PostMapping("/main/users/all")
-//     public @ResponseBody AppResultJson List(String value)
-//     {
-//         value = DesUtil.decrypt(value);
-//         JSONObject data = JSONObject.parseObject(value);
-//         Integer page = Integer.parseInt(data.getString("PageNum").toString());
-//         Integer limit = Integer.parseInt(data.getString("PageSize").toString());
-//         String condition = " and Status>-1"; //查询条件
-//         // String CreateDate = data.getString("CreateDate").toString(); //昵称
-//         String RealName = data.getString("RealName").toString(); //真实姓名
-//         String CertId = data.getString("CertId").toString(); //身份证号
-//         String Mobile = data.getString("Mobile").toString(); //手机号
-//         String MakerCode = data.getString("MakerCode").toString(); //创客编号
-//         Integer CheckParent = Integer.parseInt(Util.CheckInt(data.getString("CheckParent").toString())); //是否查询上级创客(默认为0或空 否 当前选中数据的UserId)
-//         Integer CheckChild = Integer.parseInt(Util.CheckInt(data.getString("CheckChild").toString())); //是否查询直属创客(默认为0或空 否 当前选中数据的UserId)
-//         // String SettleAmount = data.getString("SettleAmount").toString(); //最低结算金额
-//         // String CashFreezeAmt = data.getString("CashFreezeAmt").toString(); //提现冻结金额
-//         // String DeviceType = data.getString("DeviceType").toString(); //设备类型
-
-//         // if (!Util.IsNullOrEmpty(CreateDate))
-//         // {
-//         //     string[] dates = CreateDate.Split(new string[] { " - " }, StringSplitOptions.None);
-//         //     condition += " and CreateDate>='" + dates[0] + "' and CreateDate<='" + dates[1] + "'";
-//         // }
-//         if (CheckParent > 0)
-//         {
-//             var self = UsersService.Query(CheckParent, "*");
-//             if (self != null)
-//             {
-//                 String ParentNav = Util.CheckNull(self.ParentNav);
-//                 if (!ParentNav.isEmpty())
-//                 {
-//                     condition += " and Id in (" + ParentNav.substring(1, ParentNav.length() - 2).replaceAll(",,", ",") + ")";
-//                 }
-//                 else
-//                 {
-//                     condition += " and Id=0";
-//                 }
-//             }
-//         }
-//         else if (CheckChild > 0)
-//         {
-//             condition += " and ParentUserId=" + CheckChild;
-//         }
-//         else
-//         {
-//             if (!Util.IsNullOrEmpty(RealName))
-//             {
-//                 condition += " and RealName like '%" + RealName + "%'";
-//             }
-//             if (!Util.IsNullOrEmpty(CertId))
-//             {
-//                 condition += " and CertId like '%" + CertId + "%'";
-//             }
-//             if (!Util.IsNullOrEmpty(Mobile))
-//             {
-//                 condition += " and Mobile='" + Mobile + "'";
-//             }
-//             if (!Util.IsNullOrEmpty(MakerCode))
-//             {
-//                 condition += " and MakerCode like '%" + MakerCode + "%'";
-//             }
-//         }
-
-//         //关联表数据
-//         List<RelationData> relationData = new ArrayList<>();
-//         RelationData RelationDataItem = new RelationData();
-//         RelationDataItem.Field = "ParentUserId";
-//         RelationDataItem.Table = "Users";
-//         List<String> ReturnField = new ArrayList<>();
-//         ReturnField.add("MakerCode");
-//         ReturnField.add("RealName");
-//         RelationDataItem.ReturnField = ReturnField;
-//         relationData.add(RelationDataItem);
-
-//         Integer count = 0;
-//         List<Dictionary<String, Object>> list = UsersService.List(relationData, condition, count, page, limit, "Sort desc,Id desc");
-//         for (Dictionary<String, Object> dic : list)
-//         {
-//             if (!Util.IsNullOrEmpty(dic.get("ParentNav").toString()))
-//             {
-//                 String ParentNav = dic.get("ParentNav").toString();
-//                 String[] ParentNavList = ParentNav.substring(1, ParentNav.length() - 2).replaceAll(",,", ",").split(",");
-//                 var topUserInfo = new Users();
-//                 if (ParentNavList.length > 1)
-//                 {
-//                     topUserInfo = UsersUtil.GetTopUserInfo(dic.get("ParentNav").toString(), 1);
-//                 }
-//                 else
-//                 {
-//                     topUserInfo = UsersUtil.GetTopUserInfo(dic.get("ParentNav").toString(), 0);
-//                 }
-//                 dic.put("TopMakerCode", topUserInfo.MakerCode);
-//                 dic.put("TopRealName", topUserInfo.RealName);
-//             }
-//             else
-//             {
-//                 dic.put("TopMakerCode", "");
-//                 dic.put("TopRealName", "");
-//             }
-//         }
-//         AppResultJson result = new AppResultJson();
-//         result.Status = "1";
-//         result.Data = list;
-//         result.Other = count;
-//         return result;
-//     }
-
-
-//     //根据条件查询上级创客列表
-
-//     /// <summary>
-//     /// 根据条件查询上级创客列表
-//     /// </summary>
-//     /// <returns></returns>
-//     @PostMapping("/main/users/parentlist")
-//     public @ResponseBody AppResultJson ParentList(String value)
-//     {
-//         value = DesUtil.decrypt(value);
-//         JSONObject data = JSONObject.parseObject(value);
-//         Integer page = Integer.parseInt(data.getString("PageNum").toString());
-//         Integer limit = Integer.parseInt(data.getString("PageSize").toString());
-//         String RealName = data.getString("RealName").toString(); //真实姓名
-//         String CertId = data.getString("CertId").toString(); //身份证号
-//         String Mobile = data.getString("Mobile").toString(); //手机号
-//         String MakerCode = data.getString("MakerCode").toString(); //创客编号
-//         Integer ParentUserId = Integer.parseInt(data.getString("ParentUserId").toString()); //上级创客Id
-//         String condition = " and Status>-1 and ParentUserId=" + ParentUserId; //查询条件
-//         if (!Util.IsNullOrEmpty(RealName))
-//         {
-//             condition += " and RealName like '%" + RealName + "%'";
-//         }
-//         if (!Util.IsNullOrEmpty(CertId))
-//         {
-//             condition += " and CertId like '%" + CertId + "%'";
-//         }
-//         if (!Util.IsNullOrEmpty(Mobile))
-//         {
-//             condition += " and Mobile='" + Mobile + "'";
-//         }
-//         if (!Util.IsNullOrEmpty(MakerCode))
-//         {
-//             condition += " and MakerCode like '%" + MakerCode + "%'";
-//         }
-//         //关联表数据
-//         List<RelationData> relationData = new ArrayList<>();
-//         RelationData RelationDataItem = new RelationData();
-//         RelationDataItem.Field = "ParentUserId";
-//         RelationDataItem.Table = "Users";
-//         List<String> ReturnField = new ArrayList<>();
-//         ReturnField.add("MakerCode");
-//         ReturnField.add("RealName");
-//         RelationDataItem.ReturnField = ReturnField;
-//         relationData.add(RelationDataItem);
-
-//         Integer count = 0;
-//         List<Dictionary<String, Object>> list = UsersService.List(relationData, condition, count, page, limit, "Sort desc,Id desc");
-//         for (Dictionary<String, Object> dic : list)
-//         {
-//             // dic["LevelName"] = UserLevelSetService.Query(Integer.parseInt(dic["UserLevel"].toString())).Name;
-
-//             // //实名状态
-//             // dic["AuthFlagName"] = dic["AuthFlag"].toString() == "1" ? "已实名" : "未实名";
-
-//             // //风控状态
-//             // dic["RiskFlagName"] = dic["RiskFlag"].toString() == "1" ? "已风控" : "未风控";
-
-//             // //商户创客
-//             // dic["MerchantTypeName"] = Func.GetMerchantTypeInfo(Integer.parseInt(dic["MerchantType"].toString()));
-
-
-//         }
-//         AppResultJson result = new AppResultJson();
-//         result.Status = "1";
-//         result.Data = list;
-//         result.Other = count;
-//         return result;
-//     }
-
-
-//     //根据条件查询直属创客列表
-
-//     /// <summary>
-//     /// 根据条件查询直属创客列表
-//     /// </summary>
-//     /// <returns></returns>
-//     @RequestMapping("/main/users/childlist")
-//     public @ResponseBody AppResultJson ChildList(String value)
-//     {
-//         value = DesUtil.decrypt(value);
-//         JSONObject data = JSONObject.parseObject(value);
-//         Integer page = Integer.parseInt(data.getString("PageNum").toString());
-//         Integer limit = Integer.parseInt(data.getString("PageSize").toString());
-//         String RealName = data.getString("RealName").toString(); //真实姓名
-//         String CertId = data.getString("CertId").toString(); //身份证号
-//         String Mobile = data.getString("Mobile").toString(); //手机号
-//         String MakerCode = data.getString("MakerCode").toString(); //创客编号
-//         Integer UserId = Integer.parseInt(data.getString("ParentUserId").toString()); //创客Id
-//         String condition = " and Status>-1 and ParentUserId=" + UserId; //查询条件
-//         if (!Util.IsNullOrEmpty(RealName))
-//         {
-//             condition += " and RealName like '%" + RealName + "%'";
-//         }
-//         if (!Util.IsNullOrEmpty(CertId))
-//         {
-//             condition += " and CertId like '%" + CertId + "%'";
-//         }
-//         if (!Util.IsNullOrEmpty(Mobile))
-//         {
-//             condition += " and Mobile='" + Mobile + "'";
-//         }
-//         if (!Util.IsNullOrEmpty(MakerCode))
-//         {
-//             condition += " and MakerCode like '%" + MakerCode + "%'";
-//         }
-//         //关联表数据
-//         List<RelationData> relationData = new ArrayList<>();
-//         RelationData RelationDataItem = new RelationData();
-//         RelationDataItem.Field = "ParentUserId";
-//         RelationDataItem.Table = "Users";
-//         List<String> ReturnField = new ArrayList<>();
-//         ReturnField.add("MakerCode");
-//         ReturnField.add("RealName");
-//         RelationDataItem.ReturnField = ReturnField;
-//         relationData.add(RelationDataItem);
-
-//         Integer count = 0;
-//         List<Dictionary<String, Object>> list = UsersService.List(relationData, condition, count, page, limit, "Sort desc,Id desc");
-//         for (Dictionary<String, Object> dic : list)
-//         {
-//             // //创客等级
-//             // dic["LevelName"] = UserLevelSetService.Query(Integer.parseInt(dic["UserLevel"].toString())).Name;
-
-//             // //实名状态
-//             // dic["AuthFlagName"] = dic["AuthFlag"].toString() == "1" ? "已实名" : "未实名";
-
-//             // //风控状态
-//             // dic["RiskFlagName"] = dic["RiskFlag"].toString() == "1" ? "已风控" : "未风控";
-
-//             // //商户创客
-//             // dic["MerchantTypeName"] = Func.GetMerchantTypeInfo(Integer.parseInt(dic["MerchantType"].toString()));
-
-
-//         }
-//         // 返回字段:
-//         // MakerCode //创客编号
-//         // RealName //真实姓名
-//         // LevelName //创客等级
-//         // Mobile //手机号
-//         // CertId //身份证号
-//         // AgentAreas //展业区域
-//         // MerchantTypeName //商户创客类型
-//         // MerchantDate //成为商户型创客时间
-//         // AuthFlagName //实名状态
-//         // CreateDate //注册时间
-//         // AuthDate //实名时间
-//         // ParentUserIdMakerCode //直属创客编号
-//         // ParentUserIdRealName //直属创客名称
-//         AppResultJson result = new AppResultJson();
-//         result.Status = "1";
-//         result.Data = list;
-//         result.Other = count;
-//         return result;
-//     }
-
-
-//     //根据条件查询直属创客交易额列表
-
-//     /// <summary>
-//     /// 根据条件查询直属创客交易额列表
-//     /// </summary>
-//     /// <returns></returns>
-//     @RequestMapping("/main/users/childamountrecordlist")
-//     public @ResponseBody AppResultJson ChildAmountRecordList(String value)
-//     {
-//         value = DesUtil.decrypt(value);
-//         JSONObject data = JSONObject.parseObject(value);
-//         Integer page = Integer.parseInt(data.getString("PageNum").toString());
-//         Integer limit = Integer.parseInt(data.getString("PageSize").toString());
-//         Integer UserId = Integer.parseInt(Util.CheckInt(data.getString("UserId").toString())); // 创客Id
-//         Integer BrandId = Integer.parseInt(Util.CheckInt(data.getString("BrandId").toString())); //品牌
-//         String MakerCode = data.getString("MakerCode").toString(); //创客编号
-//         String CreateDateData = data.getString("CreateDateData").toString(); //交易时间
-
-//         String start = "";
-//         String end = "";
-
-//         String condition = " and Status>-1 and AuthFlag >0 and ParentUserId=" + UserId;
-//         String con = " and Status>-1";
-//         String cons = " and Status>=-1";
-//         //创客编号
-//         if (!Util.IsNullOrEmpty(MakerCode))
-//         {
-//             condition += " and MakerCode like '%" + MakerCode + "%'";
-//         }
-//         //时间不为空
-//         if (!Util.IsNullOrEmpty(CreateDateData))
-//         {
-//             String[] datelist = CreateDateData.split(" - ");
-//             start = datelist[0].replaceAll("-", "");
-//             end = datelist[1].replaceAll("-", "");
-//             con += " and TradeDate>='" + start + "' and TradeDate<='" + end + "'";
-//             cons += " and SeoKeyword >=" + start + " and SeoKeyword <=" + end;
-
-//         }
-//         //时间为空
-//         else
-//         {
-//             start = Util.DateFormat(new Date(), "yyyyMM") + "01";
-//             end = Util.DateFormat(Util.AddMonth(new Date(), 1), "yyyyMM") + "01";
-//             con += " and TradeDate>='" + start + "' and TradeDate<'" + end + "'";
-//             cons += " and SeoKeyword >=" + start + " and SeoKeyword <" + end;
-//         }
-//         if (!Util.IsNullOrEmpty(BrandId.toString()) && BrandId > 0)
-//         {
-//             con += " and BrandId='" + BrandId + "'";
-//             cons += " and BrandId='" + BrandId + "'";
-//         }
-//         //关联表数据
-//         List<RelationData> relationData = new ArrayList<>();
-
-//         Integer count = 0;
-//         List<Dictionary<String, Object>> list = UsersService.List(relationData, condition, count, page, limit, "Sort desc, Id desc");
-//         for (Dictionary<String, Object> dic : list)
-//         {
-//             Integer UId = Integer.parseInt(dic.get("Id").toString());
-//             // var Info = TradeDaySummaryService.GetMonthTradeForBrand(UId, start, end, BrandId);
-
-//             // dic["TotalAmtfc"] = Convert.ToDecimal(Info["TotalAmtfc"].toString()) + Convert.ToDecimal(Info["YAmtfc"].toString());
-//             // dic["DAmtfc"] = Convert.ToDecimal(Info["DAmtfc"].toString());
-//             // dic["JAmtfc"] = Convert.ToDecimal(Info["JAmtfc"].toString());
-//             // dic["JfAmtfc"] = Convert.ToDecimal(Info["JfAmtfc"].toString());
-//             // dic["JCountfc"] = Convert.ToInt32(Info["JCountfc"].toString());
-//             // dic["YAmtfc"] = Convert.ToDecimal(Info["YAmtfc"].toString());
-
-//             // dic["TotalAmtwd"] = Convert.ToDecimal(Info["TotalAmtwd"].toString()) + Convert.ToDecimal(Info["YAmtwd"].toString());
-//             // dic["DAmtwd"] = Convert.ToDecimal(Info["DAmtwd"].toString());
-//             // dic["JAmtwd"] = Convert.ToDecimal(Info["JAmtwd"].toString());
-//             // dic["JfAmtwd"] = Convert.ToDecimal(Info["JfAmtwd"].toString());
-//             // dic["JCountwd"] = Convert.ToInt32(Info["JCountwd"].toString());
-//             // dic["YAmtwd"] = Convert.ToDecimal(Info["YAmtwd"].toString());
-
-//             // dic["TotalAmtyl"] = Convert.ToDecimal(Info["TotalAmtyl"].toString()) + Convert.ToDecimal(Info["YAmtyl"].toString());
-//             // dic["DAmtyl"] = Convert.ToDecimal(Info["DAmtyl"].toString());
-//             // dic["JAmtyl"] = Convert.ToDecimal(Info["JAmtyl"].toString());
-//             // dic["JfAmtyl"] = Convert.ToDecimal(Info["JfAmtyl"].toString());
-//             // dic["JCountyl"] = Convert.ToInt32(Info["JCountyl"].toString());
-//             // dic["YAmtyl"] = Convert.ToDecimal(Info["YAmtyl"].toString());
-
-//             // dic["TBCount"] = Info["TBCount"].toString();
-//             // dic["TACount"] = Info["TACount"].toString();
-
-
-//         }
-//         Dictionary<String, Object> other = new Hashtable<>();
-//         Dictionary<String, Object> personal = new Hashtable<>();
-//         Dictionary<String, Object> team = new Hashtable<>();
-//         // var sumTitleInfo = TradeDaySummaryService.GetSumTitleMonthTrade(UserId, con, cons);
-//         // //个人
-//         // //扶持期
-//         // personal.Add("TotalAmtfc", Convert.ToDecimal(sumTitleInfo["TotalAmtfc"].toString()));
-//         // personal.Add("DAmtfc", Convert.ToDecimal(sumTitleInfo["DAmtfc"].toString()));
-//         // personal.Add("JAmtfc", Convert.ToDecimal(sumTitleInfo["JAmtfc"].toString()));
-//         // personal.Add("JfAmtfc", Convert.ToDecimal(sumTitleInfo["JfAmtfc"].toString()));
-//         // personal.Add("JCountfc", Convert.ToDecimal(sumTitleInfo["JCountfc"].toString()));
-//         // personal.Add("YAmtfc", Convert.ToDecimal(sumTitleInfo["YAmtfc"].toString()));
-
-//         // //稳定期
-//         // personal.Add("TotalAmtwd", Convert.ToDecimal(sumTitleInfo["TotalAmtwd"].toString()));
-//         // personal.Add("DAmtwd", Convert.ToDecimal(sumTitleInfo["DAmtwd"].toString()));
-//         // personal.Add("JAmtwd", Convert.ToDecimal(sumTitleInfo["JAmtwd"].toString()));
-//         // personal.Add("JfAmtwd", Convert.ToDecimal(sumTitleInfo["JfAmtwd"].toString()));
-//         // personal.Add("JCountwd", Convert.ToDecimal(sumTitleInfo["JCountwd"].toString()));
-//         // personal.Add("YAmtwd", Convert.ToDecimal(sumTitleInfo["YAmtwd"].toString()));
-
-//         // //盈利期
-//         // personal.Add("TotalAmtyl", Convert.ToDecimal(sumTitleInfo["TotalAmtyl"].toString()));
-//         // personal.Add("DAmtyl", Convert.ToDecimal(sumTitleInfo["DAmtyl"].toString()));
-//         // personal.Add("JAmtyl", Convert.ToDecimal(sumTitleInfo["JAmtyl"].toString()));
-//         // personal.Add("JfAmtyl", Convert.ToDecimal(sumTitleInfo["JfAmtyl"].toString()));
-//         // personal.Add("JCountyl", Convert.ToDecimal(sumTitleInfo["JCountyl"].toString()));
-//         // personal.Add("YAmtyl", Convert.ToDecimal(sumTitleInfo["YAmtyl"].toString()));
-
-//         // //团队
-//         // //扶持期
-//         // team.Add("TotalAmtfc1", Convert.ToDecimal(sumTitleInfo["TotalAmtfc1"].toString()));
-//         // team.Add("DAmtfc1", Convert.ToDecimal(sumTitleInfo["DAmtfc1"].toString()));
-//         // team.Add("JAmtfc1", Convert.ToDecimal(sumTitleInfo["JAmtfc1"].toString()));
-//         // team.Add("JfAmtfc1", Convert.ToDecimal(sumTitleInfo["JfAmtfc1"].toString()));
-//         // team.Add("JCountfc1", Convert.ToDecimal(sumTitleInfo["JCountfc1"].toString()));
-//         // team.Add("YAmtfc1", Convert.ToDecimal(sumTitleInfo["YAmtfc1"].toString()));
-
-//         // //稳定期
-//         // team.Add("TotalAmtwd1", Convert.ToDecimal(sumTitleInfo["TotalAmtwd1"].toString()));
-//         // team.Add("DAmtwd1", Convert.ToDecimal(sumTitleInfo["DAmtwd1"].toString()));
-//         // team.Add("JAmtwd1", Convert.ToDecimal(sumTitleInfo["JAmtwd1"].toString()));
-//         // team.Add("JfAmtwd1", Convert.ToDecimal(sumTitleInfo["JfAmtwd1"].toString()));
-//         // team.Add("JCountwd1", Convert.ToDecimal(sumTitleInfo["JCountwd1"].toString()));
-//         // team.Add("YAmtwd1", Convert.ToDecimal(sumTitleInfo["YAmtwd1"].toString()));
-
-//         // //盈利期
-//         // team.Add("TotalAmtyl1", Convert.ToDecimal(sumTitleInfo["TotalAmtyl1"].toString()));
-//         // team.Add("DAmtyl1", Convert.ToDecimal(sumTitleInfo["DAmtyl1"].toString()));
-//         // team.Add("JAmtyl1", Convert.ToDecimal(sumTitleInfo["JAmtyl1"].toString()));
-//         // team.Add("JfAmtyl1", Convert.ToDecimal(sumTitleInfo["JfAmtyl1"].toString()));
-//         // team.Add("JCountyl1", Convert.ToDecimal(sumTitleInfo["JCountyl1"].toString()));
-//         // team.Add("YAmtyl1", Convert.ToDecimal(sumTitleInfo["YAmtyl1"].toString()));
-
-//         // personal.Add("PBCount", Convert.ToDecimal(sumTitleInfo["PBCount"].toString()));
-//         // personal.Add("PACount", Convert.ToDecimal(sumTitleInfo["PACount"].toString()));
-//         // team.Add("TBCount", Convert.ToDecimal(sumTitleInfo["TBCount"].toString()));
-//         // team.Add("TACount", Convert.ToDecimal(sumTitleInfo["TACount"].toString()));
-
-//         // other.Add("personal", personal);
-//         // other.Add("team", team);
-//         // other.Add("count", count);
-//         // 返回字段:
-//         // MakerCode // 创客编号
-//         // RealName // 创客姓名
-//         // TotalAmtfc // 刷卡交易总额(扶)
-//         // DAmtfc // 贷记卡交易额(扶)
-//         // JAmtfc // 借记卡非封顶交易额(扶)
-//         // JfAmtfc // 借记卡封顶交易额(扶)
-//         // JCountfc // 借记卡交易笔数(扶)
-//         // YAmtfc // 云闪付小额交易额(扶)
-//         // TotalAmtwd // 刷卡交易总额(稳)
-//         // DAmtwd // 贷记卡交易额(稳)
-//         // JAmtwd // 借记卡非封顶交易额(稳)
-//         // JfAmtwd // 借记卡封顶交易额(稳)
-//         // JCountwd // 借记卡交易笔数(稳)
-//         // YAmtwd // 云闪付小额交易额(稳)
-//         // TotalAmtyl // 刷卡交易总额(盈)
-//         // DAmtyl // 贷记卡交易额(盈)
-//         // JAmtyl // 借记卡非封顶交易额(盈)
-//         // JfAmtyl // 借记卡封顶交易额(盈)
-//         // JCountyl // 借记卡交易笔数(盈)
-//         // YAmtyl // 云闪付小额交易额(盈)
-//         // TBCount // 团队机具绑定总数
-//         // TACount // 团队机具激活总数
-
-//         // 个人交易额:
-//         // 刷卡交易总额(扶) TotalAmtfc 贷记卡交易额(扶) DAmtfc 借记卡非封顶交易额(扶) JAmtfc 借记卡封顶交易额(扶) JfAmtfc 借记卡交易笔数(扶) JCountfc 云闪付小额交易额(扶) YAmtfc
-//         // 刷卡交易总额(稳) TotalAmtwd 贷记卡交易额(稳) DAmtwd 借记卡非封顶交易额(稳) JAmtwd 借记卡封顶交易额(稳) JfAmtwd 借记卡交易笔数(稳) JCountwd 云闪付小额交易额(稳) YAmtwd
-//         // 刷卡交易总额(盈) TotalAmtyl 贷记卡交易额(盈) DAmtyl 借记卡非封顶交易额(盈) JAmtyl 借记卡封顶交易额(盈) JfAmtyl 借记卡交易笔数(盈) JCountyl 云闪付小额交易额(盈) YAmtyl
-//         // 个人机具绑定总数 PBCount 个人机具激活总数 PACount
-//         // 团队交易额:
-//         // 刷卡交易总额(扶) TotalAmtfc1 贷记卡交易额(扶) DAmtfc1 借记卡非封顶交易额(扶) JAmtfc1 借记卡封顶交易额(扶) JfAmtfc1 借记卡交易笔数(扶) JCountfc1 云闪付小额交易额(扶) YAmtfc1
-//         // 刷卡交易总额(稳) TotalAmtwd1 贷记卡交易额(稳) DAmtwd1 借记卡非封顶交易额(稳) JAmtwd1 借记卡封顶交易额(稳) JfAmtwd1 借记卡交易笔数(稳) JCountwd1 云闪付小额交易额(稳) YAmtwd1
-//         // 刷卡交易总额(盈) TotalAmtyl1 贷记卡交易额(盈) DAmtyl1 借记卡非封顶交易额(盈) JAmtyl1 借记卡封顶交易额(盈) JfAmtyl1 借记卡交易笔数(盈) JCountyl1 云闪付小额交易额(盈) YAmtyl1
-//         // 团队机具绑定总数 TBCount 团队机具激活总数 TACoun
-//         AppResultJson result = new AppResultJson();
-//         result.Status = "1";
-//         result.Data = list;
-//         result.Other = other;
-//         return result;
-//     }
-
-
-//     //根据条件查询已注销创客列表
-
-//     /// <summary>
-//     /// 根据条件查询已注销创客列表
-//     /// </summary>
-//     /// <returns></returns>
-//     @RequestMapping("/main/users/canclelist")
-//     public @ResponseBody AppResultJson CancleList(String value)
-//     {
-//         value = DesUtil.decrypt(value);
-//         JSONObject data = JSONObject.parseObject(value);
-//         Integer page = Integer.parseInt(data.getString("PageNum").toString());
-//         Integer limit = Integer.parseInt(data.getString("PageSize").toString());
-//         String condition = " and Status=-1"; //查询条件
-//         String MakerCode = data.getString("MakerCode").toString(); //创客编号
-//         String RealName = data.getString("RealName").toString(); //真实姓名
-//         String Mobile = data.getString("Mobile").toString(); //手机号
-//         String CertId = data.getString("CertId").toString(); //身份证号
-//         String CreateDate = data.getString("CreateDate").toString(); //注册时间
-//         String AuthFlag = data.getString("AuthFlag").toString(); //实名状态(0 未实名 1 已实名)
-//         if (!Util.IsNullOrEmpty(RealName))
-//         {
-//             condition += " and RealName like '%" + RealName + "%'";
-//         }
-//         if (!Util.IsNullOrEmpty(CertId))
-//         {
-//             condition += " and CertId like '%" + CertId + "%'";
-//         }
-//         if (!Util.IsNullOrEmpty(Mobile))
-//         {
-//             condition += " and Mobile like '%" + Mobile + "%'";
-//         }
-//         if (!Util.IsNullOrEmpty(MakerCode))
-//         {
-//             condition += " and MakerCode like '%" + MakerCode + "%'";
-//         }
-//         if (!Util.IsNullOrEmpty(CreateDate))
-//         {
-//             String[] datelist = CreateDate.split(" - ");
-//             String start = datelist[0];
-//             String end = datelist[1];
-//             condition += " and CreateDate>='" + start + " 00:00:00' and CreateDate<='" + end + " 23:59:59'";
-//         }
-//         if (!Util.IsNullOrEmpty(AuthFlag))
-//         {
-//             condition += " and AuthFlag=" + AuthFlag;
-//         }
-
-//         //关联表数据
-//         List<RelationData> relationData = new ArrayList<>();
-//         RelationData RelationDataItem = new RelationData();
-//         RelationDataItem.Field = "ParentUserId";
-//         RelationDataItem.Table = "Users";
-//         List<String> ReturnField = new ArrayList<>();
-//         ReturnField.add("MakerCode");
-//         ReturnField.add("RealName");
-//         RelationDataItem.ReturnField = ReturnField;
-//         relationData.add(RelationDataItem);
-
-//         Integer count = 0;
-//         List<Dictionary<String, Object>> list = UsersService.List(relationData, condition, count, page, limit, "Sort desc,Id desc");
-//         for (Dictionary<String, Object> dic : list)
-//         {
-//             // var userLevel = " and Id=" + Integer.parseInt(dic["UserLevel"].toString());
-//             //创客等级
-//             // dic["LevelName"] = UserLevelSetService.Query(Integer.parseInt(dic["UserLevel"].toString())).Name;
-
-//             //实名状态
-//             // dic["AuthFlagName"] = dic["AuthFlag"].toString() == "1" ? "已实名" : "未实名";
-
-//             //风控状态
-//             // dic["RiskFlagName"] = dic["RiskFlag"].toString() == "1" ? "已风控" : "未风控";
-
-//             //商户创客
-//             // dic["MerchantTypeName"] = Func.GetMerchantTypeInfo(Integer.parseInt(dic["MerchantType"].toString()));
-
-//             if (!Util.IsNullOrEmpty(dic.get("ParentNav").toString()))
-//             {
-//                 String ParentNav = dic.get("ParentNav").toString();
-//                 String[] ParentNavList = ParentNav.substring(1, ParentNav.length() - 2).replaceAll(",,", ",").split(",");
-//                 var topUserInfo = new Users();
-//                 if (ParentNavList.length > 1)
-//                 {
-//                     topUserInfo = UsersService.Query(Integer.parseInt(ParentNavList[1]), "*");
-//                 }
-//                 else
-//                 {
-//                     topUserInfo = UsersService.Query(Integer.parseInt(ParentNavList[0]), "*");
-//                 }
-//                 dic.put("TopMakerCode", topUserInfo.MakerCode);
-//                 dic.put("TopRealName", topUserInfo.RealName);
-//             }
-//             else
-//             {
-//                 dic.put("TopMakerCode", "");
-//                 dic.put("TopRealName", "");
-//             }
-//         }
-//         // 返回字段:
-//         // MakerCode //创客编号
-//         // RealName //真实姓名
-//         // UserLevel //创客等级(1~9对应K1~K9)
-//         // Mobile //手机号
-//         // CertId //身份证号
-//         // AgentAreas //展业区域
-//         // MerchantType //商户创客类型(0 非商户型合伙人 1商户型合伙人)
-//         // MerchantDate //成为商户型创客时间
-//         // AuthFlag //实名状态(1 已实名 0 未实名)
-//         // CreateDate //注册时间
-//         // AuthDate //实名时间
-//         // ParentUserIdMakerCode //直属创客编号
-//         // ParentUserIdRealName //直属创客名称
-//         // TopMakerCode //顶级创客编号
-//         // TopRealName //顶级创客名称
-//         AppResultJson result = new AppResultJson();
-//         result.Status = "1";
-//         result.Data = list;
-//         result.Other = count;
-//         return result;
-//     }
-
-
-//     //创客详情
-
-//     /// <summary>
-//     /// 创客详情
-//     /// </summary>
-//     /// <returns></returns>
-//     @GetMapping("/main/users")
-//     public @ResponseBody AppResultJson Query(String value)
-//     {
-//         value = DesUtil.decrypt(value);
-//         JSONObject data = JSONObject.parseObject(value);
-//         Integer Id = Integer.parseInt(Util.CheckInt(data.get("Id").toString()));
-//         Users item = UsersService.Query(Id, "*");
-//         AppResultJson result = new AppResultJson();
-//         result.Status = "1";
-//         result.Data = item;
-//         return result;
-//     }
-
-
-//     //增加创客
-
-//     /// <summary>
-//     /// 增加或修改创客信息
-//     /// </summary>
-//     /// <returns></returns>
-//     @PostMapping("/main/users")
-//     public @ResponseBody AppResultJson Add(String value)
-//     {
-//         value = DesUtil.decrypt(value);
-//         Users data = JSONObject.parseObject(JSONObject.toJSONString(value), Users.class);
-//         Map<String, Object> fields = new HashMap<>();
-//         fields.put("NickName", data.NickName); //昵称
-//         fields.put("RealName", data.RealName); //真实姓名
-//         fields.put("Sex", data.Sex); //性别
-//         fields.put("CertId", data.CertId); //身份证号
-//         fields.put("Areas", data.Areas); //所在地区
-//         fields.put("Address", data.Address); //详细地址
-//         fields.put("HeadPhoto", data.HeadPhoto); //头像
-//         fields.put("UserLevel", data.UserLevel); //创客等级
-//         fields.put("CardNo", data.CardNo); //卡号
-//         fields.put("Mobile", data.Mobile); //手机号
-//         fields.put("GroupId", data.GroupId); //分组
-//         fields.put("Tags", data.Tags); //标签
-//         if (!Util.IsNullOrEmpty(data.LoginPwd)) //密码不为空就修改密码,否则不操作
-//         {
-//             fields.put("LoginPwd", Util.MD532(data.LoginPwd)); //登录密码
-//         }
-//         if (!Util.IsNullOrEmpty(data.PayPwd)) //密码不为空就修改密码,否则不操作
-//         {
-//             fields.put("PayPwd", Util.MD532(data.PayPwd)); //支付密码
-//         }
-//         fields.put("IsNewUser", data.IsNewUser); //是否新创客
-//         fields.put("IdCardEndNo", data.IdCardEndNo); //身份证后四位
-//         fields.put("SettleBankCardNo", data.SettleBankCardNo); //结算银行卡号
-//         fields.put("SettleBankName", data.SettleBankName); //结算银行名称
-//         fields.put("ReferenceCode", data.ReferenceCode); //推荐码
-//         fields.put("CardRecCode", data.CardRecCode); //办卡分享图片地址
-//         fields.put("ReferenceQrCode", data.ReferenceQrCode); //推广二维码地址
-//         fields.put("SignImgUrl", data.SignImgUrl); //特定协议签名图片地址
-//         fields.put("UserType", data.UserType); //创客类型
-//         fields.put("UserProperty", data.UserProperty); //创客属性
-//         fields.put("MerchantType", data.MerchantType); //商户创客类型
-//         fields.put("MerchantDate", data.MerchantDate); //成为商户型创客时间
-//         fields.put("LoginStatus", data.LoginStatus); //登录状态
-//         fields.put("AuditStatus", data.AuditStatus); //审核状态
-//         fields.put("LockStatus", data.LockStatus); //锁定状态
-//         fields.put("AuthFlag", data.AuthFlag); //实名标识
-//         fields.put("AuthDate", data.AuthDate); //实名时间
-//         fields.put("RiskFlag", data.RiskFlag); //风控标识
-//         fields.put("RiskRemark", data.RiskRemark); //风控备注
-//         fields.put("RreezeRemark", data.RreezeRemark); //账户冻结备注信息
-//         fields.put("SettleRemark", data.SettleRemark); //结算金额调整备注
-//         fields.put("ExpiredDate", data.ExpiredDate); //过期时间
-//         fields.put("DeviceId", data.DeviceId); //设备ID
-//         fields.put("DeviceToken", data.DeviceToken); //设备令牌
-//         fields.put("CertFrontImage", data.CertFrontImage); //身份证正面照
-//         fields.put("CertReverseImage", data.CertReverseImage); //身份证反面照
-//         fields.put("HandCertImage", data.HandCertImage); //手持身份证
-//         fields.put("BankCardPositiveImage", data.BankCardPositiveImage); //银行卡正面照
-//         fields.put("Remark", data.Remark); //备注信息
-//         if (!Util.IsNullOrEmpty(data.HandPwd)) //密码不为空就修改密码,否则不操作
-//         {
-//             fields.put("HandPwd", Util.MD532(data.HandPwd)); //手势密码
-//         }
-//         fields.put("MakerCode", data.MakerCode); //创客编号
-//         fields.put("CashFreezeAmt", data.CashFreezeAmt); //提现冻结金额
-//         fields.put("ActiveRewardAmount", data.ActiveRewardAmount); //激活奖励金额
-//         fields.put("ProfitRewardRate", data.ProfitRewardRate); //分润奖励
-//         fields.put("CertValidStartDate", data.CertValidStartDate); //身份证有效期开始时间
-//         fields.put("CertValidEndDate", data.CertValidEndDate); //身份证有效期结束时间
-//         fields.put("SettleBankCardName", data.SettleBankCardName); //结算银行卡户名
-//         fields.put("AgentLevel", data.AgentLevel); //代理等级
-//         fields.put("AgentAreas", data.AgentAreas); //代理区域
-//         fields.put("CashStatus", data.CashStatus); //代付账户状态
-//         fields.put("CashNote", data.CashNote); //代付账户备注
-//         fields.put("LeaderLevel", data.LeaderLevel); //盟主等级
-//         fields.put("BusinessFlag", data.BusinessFlag); //企业标记
-//         fields.put("DeviceType", data.DeviceType); //设备类型
-//         fields.put("SignPic", data.SignPic); //签名图片
-
-//         AppResultJson resultJson = UsersService.Add(fields);
-//         return resultJson;
-//     }
-
-
-//     //修改创客
-
-//     /// <summary>
-//     /// 增加或修改创客信息
-//     /// </summary>
-//     /// <returns></returns>
-//     @PutMapping("/main/users")
-//     public @ResponseBody AppResultJson Edit(String value)
-//     {
-//         value = DesUtil.decrypt(value);
-//         Users data = JSONObject.parseObject(JSONObject.toJSONString(value), Users.class);
-//         Map<String, Object> fields = new HashMap<>();
-//         fields.put("NickName", data.NickName); //昵称
-//         fields.put("RealName", data.RealName); //真实姓名
-//         fields.put("Sex", data.Sex); //性别
-//         fields.put("CertId", data.CertId); //身份证号
-//         fields.put("Areas", data.Areas); //所在地区
-//         fields.put("Address", data.Address); //详细地址
-//         fields.put("HeadPhoto", data.HeadPhoto); //头像
-//         fields.put("UserLevel", data.UserLevel); //创客等级
-//         fields.put("CardNo", data.CardNo); //卡号
-//         fields.put("Mobile", data.Mobile); //手机号
-//         fields.put("GroupId", data.GroupId); //分组
-//         fields.put("Tags", data.Tags); //标签
-//         if (!Util.IsNullOrEmpty(data.LoginPwd)) //密码不为空就修改密码,否则不操作
-//         {
-//             fields.put("LoginPwd", Util.MD532(data.LoginPwd)); //登录密码
-//         }
-//         if (!Util.IsNullOrEmpty(data.PayPwd)) //密码不为空就修改密码,否则不操作
-//         {
-//             fields.put("PayPwd", Util.MD532(data.PayPwd)); //支付密码
-//         }
-//         fields.put("IsNewUser", data.IsNewUser); //是否新创客
-//         fields.put("IdCardEndNo", data.IdCardEndNo); //身份证后四位
-//         fields.put("SettleBankCardNo", data.SettleBankCardNo); //结算银行卡号
-//         fields.put("SettleBankName", data.SettleBankName); //结算银行名称
-//         fields.put("ReferenceCode", data.ReferenceCode); //推荐码
-//         fields.put("CardRecCode", data.CardRecCode); //办卡分享图片地址
-//         fields.put("ReferenceQrCode", data.ReferenceQrCode); //推广二维码地址
-//         fields.put("SignImgUrl", data.SignImgUrl); //特定协议签名图片地址
-//         fields.put("UserType", data.UserType); //创客类型
-//         fields.put("UserProperty", data.UserProperty); //创客属性
-//         fields.put("MerchantType", data.MerchantType); //商户创客类型
-//         fields.put("MerchantDate", data.MerchantDate); //成为商户型创客时间
-//         fields.put("LoginStatus", data.LoginStatus); //登录状态
-//         fields.put("AuditStatus", data.AuditStatus); //审核状态
-//         fields.put("LockStatus", data.LockStatus); //锁定状态
-//         fields.put("AuthFlag", data.AuthFlag); //实名标识
-//         fields.put("AuthDate", data.AuthDate); //实名时间
-//         fields.put("RiskFlag", data.RiskFlag); //风控标识
-//         fields.put("RiskRemark", data.RiskRemark); //风控备注
-//         fields.put("RreezeRemark", data.RreezeRemark); //账户冻结备注信息
-//         fields.put("SettleRemark", data.SettleRemark); //结算金额调整备注
-//         fields.put("ExpiredDate", data.ExpiredDate); //过期时间
-//         fields.put("DeviceId", data.DeviceId); //设备ID
-//         fields.put("DeviceToken", data.DeviceToken); //设备令牌
-//         fields.put("CertFrontImage", data.CertFrontImage); //身份证正面照
-//         fields.put("CertReverseImage", data.CertReverseImage); //身份证反面照
-//         fields.put("HandCertImage", data.HandCertImage); //手持身份证
-//         fields.put("BankCardPositiveImage", data.BankCardPositiveImage); //银行卡正面照
-//         fields.put("Remark", data.Remark); //备注信息
-//         if (!Util.IsNullOrEmpty(data.HandPwd)) //密码不为空就修改密码,否则不操作
-//         {
-//             fields.put("HandPwd", Util.MD532(data.HandPwd)); //手势密码
-//         }
-//         fields.put("MakerCode", data.MakerCode); //创客编号
-//         fields.put("CashFreezeAmt", data.CashFreezeAmt); //提现冻结金额
-//         fields.put("ActiveRewardAmount", data.ActiveRewardAmount); //激活奖励金额
-//         fields.put("ProfitRewardRate", data.ProfitRewardRate); //分润奖励
-//         fields.put("CertValidStartDate", data.CertValidStartDate); //身份证有效期开始时间
-//         fields.put("CertValidEndDate", data.CertValidEndDate); //身份证有效期结束时间
-//         fields.put("SettleBankCardName", data.SettleBankCardName); //结算银行卡户名
-//         fields.put("AgentLevel", data.AgentLevel); //代理等级
-//         fields.put("AgentAreas", data.AgentAreas); //代理区域
-//         fields.put("CashStatus", data.CashStatus); //代付账户状态
-//         fields.put("CashNote", data.CashNote); //代付账户备注
-//         fields.put("LeaderLevel", data.LeaderLevel); //盟主等级
-//         fields.put("BusinessFlag", data.BusinessFlag); //企业标记
-//         fields.put("DeviceType", data.DeviceType); //设备类型
-//         fields.put("SignPic", data.SignPic); //签名图片
-
-//         AppResultJson resultJson = UsersService.Edit(fields, data.Id);
-//         return resultJson;
-//     }
-
-
-//     //逻辑删除创客信息
-
-//     /// <summary>
-//     /// 删除创客信息
-//     /// </summary>
-//     /// <returns></returns>
-//     @DeleteMapping("/main/users/remove")
-//     public @ResponseBody AppResultJson Remove(String value)
-//     {
-//         value = DesUtil.decrypt(value);
-//         JSONObject jsonObj = JSONObject.parseObject(value);
-//         String Id = jsonObj.get("Id").toString();
-//         String[] idlist = Id.split(",");
-//         for (String subid : idlist)
-//         {
-//             Integer id = Integer.parseInt(subid);
-//             UsersService.Remove(id);
-//         }
-//         Dictionary<String, Object> obj = new Hashtable<>(); //返回字段
-//         AppResultJson result = new AppResultJson();
-//         result.Status = "1";
-//         result.Data = obj;
-//         return result;
-//     }
-
-
-//     //彻底删除创客信息
-
-//     /// <summary>
-//     /// 删除创客信息
-//     /// </summary>
-//     /// <returns></returns>
-//     @DeleteMapping("/main/users")
-//     public @ResponseBody AppResultJson Delete(String value)
-//     {
-//         value = DesUtil.decrypt(value);
-//         JSONObject jsonObj = JSONObject.parseObject(value);
-//         String Id = jsonObj.get("Id").toString();
-//         String[] idlist = Id.split(",");
-//         for (String subid : idlist)
-//         {
-//             Integer id = Integer.parseInt(subid);
-//             UsersService.Delete(id);
-//         }
-//         Dictionary<String, Object> obj = new Hashtable<>(); //返回字段
-//         AppResultJson result = new AppResultJson();
-//         result.Status = "1";
-//         result.Data = obj;
-//         return result;
-//     }
-
-
-//     //开启
-
-//     /// <summary>
-//     /// 开启
-//     /// </summary>
-//     /// <returns></returns>
-//     @PutMapping("/main/users/open")
-//     public @ResponseBody AppResultJson Open(String value)
-//     {
-//         value = DesUtil.decrypt(value);
-//         JSONObject jsonObj = JSONObject.parseObject(value);
-//         String Id = jsonObj.get("Id").toString();
-//         String[] idlist = Id.split(",");
-//         for (String subid : idlist)
-//         {
-//             Integer id = Integer.parseInt(subid);
-//             Map<String, Object> Fields = new HashMap<>();
-//             Fields.put("Status", 1);
-//             UsersService.Edit(Fields, id);
-//         }
-//         Dictionary<String, Object> obj = new Hashtable<>(); //返回字段
-//         AppResultJson result = new AppResultJson();
-//         result.Status = "1";
-//         result.Data = obj;
-//         return result;
-//     }
-
-
-//     //关闭
-
-//     /// <summary>
-//     /// 关闭
-//     /// </summary>
-//     /// <returns></returns>
-//     @PutMapping("/main/users/close")
-//     public @ResponseBody AppResultJson Close(String value)
-//     {
-//         value = DesUtil.decrypt(value);
-//         JSONObject jsonObj = JSONObject.parseObject(value);
-//         String Id = jsonObj.get("Id").toString();
-//         String[] idlist = Id.split(",");
-//         for (String subid : idlist)
-//         {
-//             Integer id = Integer.parseInt(subid);
-//             Map<String, Object> Fields = new HashMap<>();
-//             Fields.put("Status", 0);
-//             UsersService.Edit(Fields, id);
-//         }
-//         Dictionary<String, Object> obj = new Hashtable<>(); //返回字段
-//         AppResultJson result = new AppResultJson();
-//         result.Status = "1";
-//         result.Data = obj;
-//         return result;
-//     }
-
-
-//     //排序
-//     /// <summary>
-//     /// 排序
-//     /// </summary>
-//     /// <param name="Id"></param>
-//     @PutMapping("/main/users/sort")
-//     public @ResponseBody AppResultJson Sort(String value)
-//     {
-//         value = DesUtil.decrypt(value);
-//         JSONObject jsonObj = JSONObject.parseObject(value);
-//         Integer Id = Integer.parseInt(jsonObj.get("Id").toString());
-//         Integer Sort = Integer.parseInt(jsonObj.get("Sort").toString());
-//         UsersService.Sort(Id, Sort);
-//         Dictionary<String, Object> obj = new Hashtable<>(); //返回字段
-//         AppResultJson result = new AppResultJson();
-//         result.Status = "1";
-//         result.Data = obj;
-//         return result;
-//     }
-
-//     //导入数据
-//     /// <summary>
-//     /// 导入数据
-//     /// </summary>
-//     /// <param name="ExcelData"></param>
-//     @PostMapping("/main/users/import")
-//     public @ResponseBody AppResultJson Import(String value)
-//     {
-//         value = DesUtil.decrypt(value);
-//         JSONObject jsonObj = JSONObject.parseObject(value);
-//         String ExcelData = jsonObj.get("ExcelData").toString();
-//         UsersService.Import(ExcelData);
-//         Dictionary<String, Object> obj = new Hashtable<>(); //返回字段
-//         AppResultJson result = new AppResultJson();
-//         result.Status = "1";
-//         result.Data = obj;
-//         return result;
-//     }
-
-//     //导出Excel
-
-//     /// <summary>
-//     /// 导出Excel
-//     /// </summary>
-//     /// <returns></returns>
-//     @PostMapping("/main/users/export")
-//     public @ResponseBody AppResultJson ExportExcel(String value)
-//     {
-//         value = DesUtil.decrypt(value);
-//         Users data = JSONObject.parseObject(JSONObject.toJSONString(value), Users.class);
-//         String SqlString = "select * from Users order by Id desc limit 20";
-//         Dictionary<String, Object> dic = new Hashtable<>();
-//         dic.put("Operater", 0); //后台操作员账户Id
-//         dic.put("SqlString", SqlString); //sql语句,表头用指定中文
-//         dic.put("FileName", "仓库-" + Util.DateFormat(new Date(), "yyyy-MM-dd HH:mm:ss")); //excel文件名
-//         dic.put("MaxCount", "0"); //最大返回数,0为不限制
-//         redisUtils.addList("ExportQueue", JSONObject.toJSONString(dic));
-//         AppResultJson result = new AppResultJson();
-//         result.Status = "1";
-//         return result;
-//     }
-
-
-//     //同步创客机具数
-
-//     /// <summary>
-//     /// 同步创客机具数
-//     /// </summary>
-//     /// <returns></returns>
-//     @PostMapping("/main/users/sycnposcount")
-//     public @ResponseBody AppResultJson SycnData(String value)
-//     {
-//         value = DesUtil.decrypt(value);
-//         JSONObject data = JSONObject.parseObject(value);
-//         String UserId = data.getString("UserId").toString();
-//         // var BrandIds = KqProductsService.QueryBrandId();
-//         // foreach (var BrandId in BrandIds)
-//         // {
-//             // BaseClass.SycnUserPosCount(Integer.parseInt(UserId), Integer.parseInt(BrandId.toString()));
-//             // RedisDbconn.Instance.AddList("SycnUserMachineCountQueue", "{\"UserId\":\"" + UserId + "\",\"BrandId\":\"" + BrandId + "\"}");
-//         // }
-//         AppResultJson result = new AppResultJson();
-//         result.Status = "1";
-//         result.Info = "同步成功!";
-//         return result;
-//     }
-
-
-//     //重置密码
-
-//     /// <summary>
-//     /// 重置密码
-//     /// </summary>
-//     /// <returns></returns>
-//     @PostMapping("/main/users/resetpwd")
-//     public @ResponseBody AppResultJson ResetPwd(String value)
-//     {
-//         value = DesUtil.decrypt(value);
-//         JSONObject data = JSONObject.parseObject(value);
-//         Integer UserId = Integer.parseInt(data.getString("UserId").toString());
-//         var info = "";
-//         // info = UsersUtil.ResetLoginPwd(UserId);
-//         if (info == "success")
-//         {
-//             AppResultJson result = new AppResultJson();
-//             result.Status = "1";
-//             result.Info = "重置成功";
-//             return result;
-//         }
-//         else
-//         {
-//             AppResultJson result = new AppResultJson();
-//             result.Status = "0";
-//             result.Info = "重置失败";
-//             result.Data = info;
-//             return result;
-//         }
-//     }
-
-// }
+package com.kxs.adminap.controller;
+
+import org.springframework.web.bind.annotation.*;
+
+import com.alibaba.fastjson.JSONObject;
+import com.kxs.adminap.enity.AppResultJson;
+import com.kxs.adminap.enity.RelationData;
+import com.kxs.adminap.model.main.Users;
+import com.kxs.adminap.service.main.UsersService;
+import com.kxs.adminap.util.DesUtil;
+import com.kxs.adminap.util.RedisUtils;
+import com.kxs.adminap.util.UsersUtil;
+import com.kxs.adminap.util.Util;
+
+import jakarta.annotation.Resource;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.Dictionary;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Map;
+
+@RestController
+public class UsersController
+{
+    @Resource
+	RedisUtils redisUtils;
+
+    //根据条件查询创客列表
+
+    /// <summary>
+    /// 创客列表
+    /// </summary>
+    /// <returns></returns>
+    @PostMapping("/main/users/all")
+    public @ResponseBody AppResultJson list(String value)
+    {
+        value = DesUtil.decrypt(value);
+        JSONObject data = JSONObject.parseObject(value);
+        Users query = JSONObject.parseObject(JSONObject.toJSONString(value), Users.class);
+        Integer page = Integer.parseInt(data.getString("page").toString()); //页码
+        Integer limit = Integer.parseInt(data.getString("limit").toString()); //每页条数
+        String condition = " and Status>-1"; //查询条件
+        
+        //关联表数据
+        List<RelationData> relationData = new ArrayList<>();
+        RelationData RelationDataItem = new RelationData();
+        RelationDataItem.Field = "ParentUserId";
+        RelationDataItem.Table = "Users";
+        List<String> ReturnField = new ArrayList<>();
+        ReturnField.add("MakerCode");
+        ReturnField.add("RealName");
+        RelationDataItem.ReturnField = ReturnField;
+        relationData.add(RelationDataItem);
+
+        Integer count = UsersService.count("1", query, condition);
+        List<Map<String, Object>> list = UsersService.list(page, limit, "sort desc,id desc", "*", query, condition, relationData);
+        // for (Map<String, Object> dic : list)
+        // {
+            //这里可以构造特殊需要处理的字段
+        // }
+        AppResultJson result = new AppResultJson();
+        result.status = "1";
+        result.data = list;
+        result.other = count;
+        return result;
+    }
+
+
+    //创客详情
+
+    /// <summary>
+    /// 创客详情
+    /// </summary>
+    /// <returns></returns>
+    @GetMapping("/main/users")
+    public @ResponseBody AppResultJson query(String value)
+    {
+        value = DesUtil.decrypt(value);
+        JSONObject data = JSONObject.parseObject(value);
+        Integer Id = Integer.parseInt(Util.CheckInt(data.get("Id").toString()));
+        Users item = UsersService.query(Id);
+        AppResultJson result = new AppResultJson();
+        result.status = "1";
+        result.data = item;
+        return result;
+    }
+
+
+    //增加创客
+
+    /// <summary>
+    /// 增加或修改创客信息
+    /// </summary>
+    /// <returns></returns>
+    @PostMapping("/main/users")
+    public @ResponseBody AppResultJson add(String value)
+    {
+        value = DesUtil.decrypt(value);
+        Users data = JSONObject.parseObject(JSONObject.toJSONString(value), Users.class);
+        Integer id = UsersService.add(data);
+        AppResultJson result = new AppResultJson();
+        result.status = "1";
+        result.data = id;
+        return result;
+    }
+
+
+    //修改创客
+
+    /// <summary>
+    /// 增加或修改创客信息
+    /// </summary>
+    /// <returns></returns>
+    @PutMapping("/main/users")
+    public @ResponseBody AppResultJson edit(String value)
+    {
+        value = DesUtil.decrypt(value);
+        Users data = JSONObject.parseObject(JSONObject.toJSONString(value), Users.class);
+        Integer id = UsersService.update(data);
+        AppResultJson result = new AppResultJson();
+        result.status = "1";
+        result.data = id;
+        return result;
+    }
+
+
+    //逻辑删除创客信息
+
+    /// <summary>
+    /// 删除创客信息
+    /// </summary>
+    /// <returns></returns>
+    @DeleteMapping("/main/users/remove")
+    public @ResponseBody AppResultJson remove(String value)
+    {
+        value = DesUtil.decrypt(value);
+        JSONObject jsonObj = JSONObject.parseObject(value);
+        String ids = jsonObj.get("ids").toString();
+        String[] idlist = ids.split(",");
+        for (String subid : idlist)
+        {
+            Integer id = Integer.parseInt(subid);
+            UsersService.remove(id);
+        }
+        AppResultJson result = new AppResultJson();
+        result.status = "1";
+        result.data = ids;
+        return result;
+    }
+
+
+    //彻底删除创客信息
+
+    /// <summary>
+    /// 删除创客信息
+    /// </summary>
+    /// <returns></returns>
+    @DeleteMapping("/main/users")
+    public @ResponseBody AppResultJson delete(String value)
+    {
+        value = DesUtil.decrypt(value);
+        JSONObject jsonObj = JSONObject.parseObject(value);
+        String ids = jsonObj.get("ids").toString();
+        String[] idlist = ids.split(",");
+        for (String subid : idlist)
+        {
+            Integer id = Integer.parseInt(subid);
+            UsersService.delete(id);
+        }
+        AppResultJson result = new AppResultJson();
+        result.status = "1";
+        result.data = ids;
+        return result;
+    }
+
+
+    //开启
+
+    /// <summary>
+    /// 开启
+    /// </summary>
+    /// <returns></returns>
+    @PutMapping("/main/users/open")
+    public @ResponseBody AppResultJson open(String value)
+    {
+        value = DesUtil.decrypt(value);
+        JSONObject jsonObj = JSONObject.parseObject(value);
+        String ids = jsonObj.get("ids").toString();
+        String[] idlist = ids.split(",");
+        for (String subid : idlist)
+        {
+            Integer id = Integer.parseInt(subid);
+            Users data = new Users();
+            data.setId(id);
+            data.setStatus(1);
+            UsersService.update(data);
+        }
+        Dictionary<String, Object> obj = new Hashtable<>(); //返回字段
+        AppResultJson result = new AppResultJson();
+        result.status = "1";
+        result.data = obj;
+        return result;
+    }
+
+
+    //关闭
+
+    /// <summary>
+    /// 关闭
+    /// </summary>
+    /// <returns></returns>
+    @PutMapping("/main/users/close")
+    public @ResponseBody AppResultJson close(String value)
+    {
+        value = DesUtil.decrypt(value);
+        JSONObject jsonObj = JSONObject.parseObject(value);
+        String ids = jsonObj.get("ids").toString();
+        String[] idlist = ids.split(",");
+        for (String subid : idlist)
+        {
+            Integer id = Integer.parseInt(subid);
+            Users data = new Users();
+            data.setId(id);
+            data.setStatus(0);
+            UsersService.update(data);
+        }
+        Dictionary<String, Object> obj = new Hashtable<>(); //返回字段
+        AppResultJson result = new AppResultJson();
+        result.status = "1";
+        result.data = obj;
+        return result;
+    }
+
+
+    //排序
+    /// <summary>
+    /// 排序
+    /// </summary>
+    /// <param name="Id"></param>
+    @PutMapping("/main/users/sort")
+    public @ResponseBody AppResultJson sort(String value)
+    {
+        value = DesUtil.decrypt(value);
+        JSONObject jsonObj = JSONObject.parseObject(value);
+        Integer id = Integer.parseInt(jsonObj.get("id").toString());
+        Integer sort = Integer.parseInt(jsonObj.get("sort").toString());
+        UsersService.sort(id, sort);
+        AppResultJson result = new AppResultJson();
+        result.status = "1";
+        result.data = id;
+        return result;
+    }
+
+}

+ 0 - 13
src/main/java/com/kxs/adminap/dao/TestTablerepository.java

@@ -1,13 +0,0 @@
-// package com.kxs.adminap.dao;
-
-// import java.util.List;
-
-// import org.springframework.data.jpa.repository.JpaRepository;
-// import org.springframework.data.jpa.repository.Query;
-
-// import com.kxs.adminap.enity.TestTable; 
-
-// public interface TestTablerepository extends JpaRepository<TestTable, Integer> {
-//     @Query(value = "select * from test_table where #{condition}",nativeQuery = true)
-//     List<TestTable> findByCondition(String condition);
-// }

+ 10 - 4
src/main/java/com/kxs/adminap/dao/main/UsersMapper.java

@@ -2,20 +2,26 @@ package com.kxs.adminap.dao.main;
 
 import com.kxs.adminap.enity.ListParam;
 import com.kxs.adminap.model.main.Users;
+
 import java.util.List;
+import java.util.Map;
 
 import org.apache.ibatis.annotations.Param;
 
 public interface UsersMapper {
-    int deleteByPrimaryKey(Integer id);
+    Integer deleteByPrimaryKey(Integer id);
 
-    int insert(Users record);
+    Integer insert(Users record);
 
     Users selectByPrimaryKey(Integer id);
 
     Users selectByCondition(@Param("data") Users data);
 
-    List<Users> selectAll(ListParam param);
+    List<Map<String, Object>> selectAll(ListParam param);
+
+    Integer updateByPrimaryKey(Users record);
+
+    Integer getCount(@Param("field") String field, @Param("data") Users data, @Param("condition") String condition);
 
-    int updateByPrimaryKey(Users record);
+    Object getSum(@Param("field") String field, @Param("data") Users data, @Param("condition") String condition);
 }

+ 5 - 5
src/main/java/com/kxs/adminap/enity/AppResultJson.java

@@ -4,9 +4,9 @@ import java.io.Serializable;
 
 public class AppResultJson implements Serializable
 {
-    public String Info;
-    public Object Data;
-    public Object Other;
-    public String Status;
-    public Integer Timestamp;
+    public String info;
+    public Object data;
+    public Object other;
+    public String status;
+    public Integer timestamp;
 }

+ 10 - 0
src/main/java/com/kxs/adminap/enity/RelationData.java

@@ -8,4 +8,14 @@ public class RelationData implements Serializable
     public String Field;
     public String Table;
     public List<String> ReturnField;
+
+    public String getField() {
+        return Field;
+    }
+    public String getTable() {
+        return Table;
+    }
+    public List<String> getReturnField() {
+        return ReturnField;
+    }
 }

+ 34 - 32
src/main/java/com/kxs/adminap/model/main/Users.java

@@ -6,6 +6,8 @@ import java.util.Date;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
 
+import io.lettuce.core.GeoArgs.Sort;
+
 public class Users implements Serializable {
     private Integer id;
 
@@ -193,7 +195,7 @@ public class Users implements Serializable {
     private static final long serialVersionUID = 1L;
 
     public Integer getId() {
-        return id;
+        return id != null ? id : 0;
     }
 
     public void setId(Integer id) {
@@ -201,7 +203,7 @@ public class Users implements Serializable {
     }
 
     public Integer getSort() {
-        return sort;
+        return sort != null ? sort : 0;
     }
 
     public void setSort(Integer sort) {
@@ -209,7 +211,7 @@ public class Users implements Serializable {
     }
 
     public Integer getQueryCount() {
-        return queryCount;
+        return queryCount != null ? queryCount : 0;
     }
 
     public void setQueryCount(Integer queryCount) {
@@ -217,7 +219,7 @@ public class Users implements Serializable {
     }
 
     public Integer getStatus() {
-        return status;
+        return status != null ? status : 0;
     }
 
     public void setStatus(Integer status) {
@@ -225,7 +227,7 @@ public class Users implements Serializable {
     }
 
     public Integer getVersion() {
-        return version;
+        return version != null ? version : 0;
     }
 
     public void setVersion(Integer version) {
@@ -297,7 +299,7 @@ public class Users implements Serializable {
     }
 
     public Integer getAgentLevel() {
-        return agentLevel;
+        return agentLevel != null ? agentLevel : 0;
     }
 
     public void setAgentLevel(Integer agentLevel) {
@@ -337,7 +339,7 @@ public class Users implements Serializable {
     }
 
     public BigDecimal getProfitRewardRate() {
-        return profitRewardRate;
+        return profitRewardRate != null ? profitRewardRate : BigDecimal.ZERO;
     }
 
     public void setProfitRewardRate(BigDecimal profitRewardRate) {
@@ -345,7 +347,7 @@ public class Users implements Serializable {
     }
 
     public BigDecimal getActiveRewardAmount() {
-        return activeRewardAmount;
+        return activeRewardAmount != null ? activeRewardAmount : BigDecimal.ZERO;
     }
 
     public void setActiveRewardAmount(BigDecimal activeRewardAmount) {
@@ -353,7 +355,7 @@ public class Users implements Serializable {
     }
 
     public BigDecimal getCashFreezeAmt() {
-        return cashFreezeAmt;
+        return cashFreezeAmt != null ? cashFreezeAmt : BigDecimal.ZERO;
     }
 
     public void setCashFreezeAmt(BigDecimal cashFreezeAmt) {
@@ -361,7 +363,7 @@ public class Users implements Serializable {
     }
 
     public BigDecimal getSettleAmount() {
-        return settleAmount;
+        return settleAmount != null ? settleAmount : BigDecimal.ZERO;
     }
 
     public void setSettleAmount(BigDecimal settleAmount) {
@@ -473,7 +475,7 @@ public class Users implements Serializable {
     }
 
     public Boolean getRiskFlag() {
-        return riskFlag;
+        return riskFlag != null ? riskFlag : false;
     }
 
     public void setRiskFlag(Boolean riskFlag) {
@@ -489,7 +491,7 @@ public class Users implements Serializable {
     }
 
     public Boolean getAuthFlag() {
-        return authFlag;
+        return authFlag != null ? authFlag : false;
     }
 
     public void setAuthFlag(Boolean authFlag) {
@@ -497,7 +499,7 @@ public class Users implements Serializable {
     }
 
     public Boolean getLockStatus() {
-        return lockStatus;
+        return lockStatus != null ? lockStatus : false;
     }
 
     public void setLockStatus(Boolean lockStatus) {
@@ -505,7 +507,7 @@ public class Users implements Serializable {
     }
 
     public Integer getAuditStatus() {
-        return auditStatus;
+        return auditStatus != null ? auditStatus : 0;
     }
 
     public void setAuditStatus(Integer auditStatus) {
@@ -513,7 +515,7 @@ public class Users implements Serializable {
     }
 
     public Integer getLoginStatus() {
-        return loginStatus;
+        return loginStatus != null ? loginStatus : 0;
     }
 
     public void setLoginStatus(Integer loginStatus) {
@@ -529,7 +531,7 @@ public class Users implements Serializable {
     }
 
     public Integer getMerchantType() {
-        return merchantType;
+        return merchantType != null ? merchantType : 0;
     }
 
     public void setMerchantType(Integer merchantType) {
@@ -537,7 +539,7 @@ public class Users implements Serializable {
     }
 
     public Integer getUserProperty() {
-        return userProperty;
+        return userProperty != null ? userProperty : 0;
     }
 
     public void setUserProperty(Integer userProperty) {
@@ -545,7 +547,7 @@ public class Users implements Serializable {
     }
 
     public Integer getUserType() {
-        return userType;
+        return userType != null ? userType : 0;
     }
 
     public void setUserType(Integer userType) {
@@ -577,7 +579,7 @@ public class Users implements Serializable {
     }
 
     public Integer getReferralUserId() {
-        return referralUserId;
+        return referralUserId != null ? referralUserId : 0;
     }
 
     public void setReferralUserId(Integer referralUserId) {
@@ -617,7 +619,7 @@ public class Users implements Serializable {
     }
 
     public Boolean getIsNewUser() {
-        return isNewUser;
+        return isNewUser != null ? isNewUser : false;
     }
 
     public void setIsNewUser(Boolean isNewUser) {
@@ -697,7 +699,7 @@ public class Users implements Serializable {
     }
 
     public Integer getUserLevel() {
-        return userLevel;
+        return userLevel != null ? userLevel : 0;
     }
 
     public void setUserLevel(Integer userLevel) {
@@ -705,7 +707,7 @@ public class Users implements Serializable {
     }
 
     public Integer getParentUserId() {
-        return parentUserId;
+        return parentUserId != null ? parentUserId : 0;
     }
 
     public void setParentUserId(Integer parentUserId) {
@@ -745,7 +747,7 @@ public class Users implements Serializable {
     }
 
     public Integer getSex() {
-        return sex;
+        return sex != null ? sex : 0;
     }
 
     public void setSex(Integer sex) {
@@ -769,7 +771,7 @@ public class Users implements Serializable {
     }
 
     public Integer getCashStatus() {
-        return cashStatus;
+        return cashStatus != null ? cashStatus : 0;
     }
 
     public void setCashStatus(Integer cashStatus) {
@@ -785,7 +787,7 @@ public class Users implements Serializable {
     }
 
     public BigDecimal getThisMonthTrade() {
-        return thisMonthTrade;
+        return thisMonthTrade != null ? thisMonthTrade : BigDecimal.ZERO;
     }
 
     public void setThisMonthTrade(BigDecimal thisMonthTrade) {
@@ -793,7 +795,7 @@ public class Users implements Serializable {
     }
 
     public Integer getLeaderLevel() {
-        return leaderLevel;
+        return leaderLevel != null ? leaderLevel : 0;
     }
 
     public void setLeaderLevel(Integer leaderLevel) {
@@ -801,7 +803,7 @@ public class Users implements Serializable {
     }
 
     public Integer getBusinessFlag() {
-        return businessFlag;
+        return businessFlag != null ? businessFlag : 0;
     }
 
     public void setBusinessFlag(Integer businessFlag) {
@@ -809,7 +811,7 @@ public class Users implements Serializable {
     }
 
     public BigDecimal getValidAmount() {
-        return validAmount;
+        return validAmount != null ? validAmount : BigDecimal.ZERO;
     }
 
     public void setValidAmount(BigDecimal validAmount) {
@@ -833,7 +835,7 @@ public class Users implements Serializable {
     }
 
     public Boolean getHelpProfitAgree() {
-        return helpProfitAgree;
+        return helpProfitAgree != null ? helpProfitAgree : false;
     }
 
     public void setHelpProfitAgree(Boolean helpProfitAgree) {
@@ -857,7 +859,7 @@ public class Users implements Serializable {
     }
 
     public Boolean getIsSign() {
-        return isSign;
+        return isSign != null ? isSign : false;
     }
 
     public void setIsSign(Boolean isSign) {
@@ -873,7 +875,7 @@ public class Users implements Serializable {
     }
 
     public Integer getStoreStock() {
-        return storeStock;
+        return storeStock != null ? storeStock : 0;
     }
 
     public void setStoreStock(Integer storeStock) {
@@ -881,7 +883,7 @@ public class Users implements Serializable {
     }
 
     public Integer getThisMonthSend() {
-        return thisMonthSend;
+        return thisMonthSend != null ? thisMonthSend : 0;
     }
 
     public void setThisMonthSend(Integer thisMonthSend) {

+ 147 - 94
src/main/java/com/kxs/adminap/service/main/UsersService.java

@@ -1,35 +1,36 @@
 package com.kxs.adminap.service.main;
 
-import java.util.HashMap;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 
 import org.apache.ibatis.session.SqlSession;
 
 import com.alibaba.fastjson.JSONObject;
-import com.kxs.adminap.config.Base;
 import com.kxs.adminap.dao.main.UsersMapper;
-import com.kxs.adminap.enity.AppResultJson;
 import com.kxs.adminap.enity.ListParam;
 import com.kxs.adminap.enity.RelationData;
 import com.kxs.adminap.model.main.Users;
-import com.kxs.adminap.util.DbService;
 import com.kxs.adminap.util.SqlSessionUtils;
 
 public class UsersService
 {
-
-    /// <summary>
-    /// 查询列表
-    /// </summary>
-    /// <param name="relationData">关联表</param>
-    /// <param name="condition">查询条件(sql语句)</param>
-    /// <param name="count">总数(输出)</param>
-    /// <param name="page">页码</param>
-    /// <param name="limit">每页条数</param>
-    /// <returns></returns>
-    public static List<Users> List(List<RelationData> relationData, Users query, String condition, Integer page, Integer limit, String orderBy)
+    /**
+     * 查询列表
+     * @param fields 查询的字段
+     * @param relationData 关联表
+     * @param query 查询条件
+     * @param condition 查询条件(sql语句,慎用,注意sql注入)
+     * @param page 页码
+     * @param limit 每页条数
+     * @param orderBy 排序(如:id desc,sort asc)
+     * @return
+     */
+    public static List<Map<String, Object>> list(Integer page, Integer limit, String orderBy, String fields, Users query, String condition, List<RelationData> relationData)
     {
+        if(fields.isBlank()) {
+            fields = "*";
+        }
         SqlSession sqlSession = SqlSessionUtils.getSqlSession();
         UsersMapper usersMapper = sqlSession.getMapper(UsersMapper.class);
         ListParam param = new ListParam();
@@ -46,20 +47,36 @@ public class UsersService
         param.relationData = relationData;
         param.query = JSONObject.parseObject(JSONObject.toJSONString(query), Map.class);
         param.condition = condition;
-        param.field = "MakerCode,RealName,Mobile,CreateDate,AuthFlag,ParentUserIdForMakerCode,ParentUserIdForRealName";
+        param.field = fields;
         param.limit = limit;
         param.orderBy = orderBy;
-        List<Users> result = usersMapper.selectAll(param);
+        List<Map<String, Object>> result = usersMapper.selectAll(param);
         sqlSession.close();
         return result;
     }
+    public static List<Map<String, Object>> list(Integer page, Integer limit, String orderBy, String fields, Users query, String condition)
+    {
+        return list(page, limit, orderBy, fields, query, condition, new ArrayList<>());
+    }
+    public static List<Map<String, Object>> list(Integer page, Integer limit, String orderBy, String fields, Users query)
+    {
+        return list(page, limit, orderBy, fields, query, "", new ArrayList<>());
+    }
+    public static List<Map<String, Object>> list(Integer page, Integer limit, String orderBy, String fields)
+    {
+        return list(page, limit, orderBy, fields, new Users(), "", new ArrayList<>());
+    }
+    public static List<Map<String, Object>> list(Integer page, Integer limit, String orderBy)
+    {
+        return list(page, limit, orderBy, "*", new Users(), "", new ArrayList<>());
+    }
 
-    /// <summary>
-    /// 查询一条记录
-    /// </summary>
-    /// <param name="Id">主键Id</param>
-    /// <returns></returns>
-    public static Users Query(Integer Id)
+    /**
+     * 查询一条记录
+     * @param id 主键Id
+     * @return
+     */
+    public static Users query(Integer Id)
     {
         SqlSession sqlSession = SqlSessionUtils.getSqlSession();
         UsersMapper usersMapper = sqlSession.getMapper(UsersMapper.class);
@@ -68,7 +85,13 @@ public class UsersService
         return result;
     }
 
-    public static Users Query(Users data)
+    /**
+     * 根据条件查询一条记录
+     * @param data 查询条件
+     * @param condition 查询条件(sql语句,慎用,注意sql注入)
+     * @return
+     */
+    public static Users query(Users data)
     {
         SqlSession sqlSession = SqlSessionUtils.getSqlSession();
         UsersMapper usersMapper = sqlSession.getMapper(UsersMapper.class);
@@ -78,100 +101,130 @@ public class UsersService
         return result;
     }
 
-    /// <summary>
-    /// 查询记录数
-    /// </summary>
-    /// <param name="Id">主键Id</param>
-    /// <returns></returns>
-    public static Integer Count(String condition)
+    /**
+     * 查询记录数
+     * @param field 查询字段
+     * @param data 查询条件
+     * @param condition 查询条件(sql语句,慎用,注意sql注入)
+     * @return
+     */
+    public static Integer count(String field, Users data, String condition)
     {
-        Integer result = 0;
-        var item = new DbService(Base.main_tables, Base.main_url, Base.main_username, Base.main_password).Query("count(Id) count", "Users", condition);
-        if (item.size() > 0)
-        {
-            result = (Integer)item.get("count");
-        }
+        SqlSession sqlSession = SqlSessionUtils.getSqlSession();
+        UsersMapper usersMapper = sqlSession.getMapper(UsersMapper.class);
+        Integer result = usersMapper.getCount(field, data, condition);
+        sqlSession.close();
         return result;
     }
 
-    /// <summary>
-    /// 查询是否存在
-    /// </summary>
-    /// <param name="Id">主键Id</param>
-    /// <returns></returns>
-    public static Boolean Exist(int Id)
+    /**
+     * 查询总数
+     * @param field 查询字段
+     * @param data 查询条件
+     * @param condition 查询条件(sql语句,慎用,注意sql注入)
+     * @return
+     */
+    public static Object sum(String field, Users data, String condition)
     {
-        var item = new DbService(Base.main_tables, Base.main_url, Base.main_username, Base.main_password).Query("1", "Users", "Id=" + Id);
-        if (item.size() > 0)
-        {
+        SqlSession sqlSession = SqlSessionUtils.getSqlSession();
+        UsersMapper usersMapper = sqlSession.getMapper(UsersMapper.class);
+        Object result = usersMapper.getSum(field, data, condition);
+        sqlSession.close();
+        return result;
+    }
+
+    /**
+     * 查询是否存在
+     * @param data 查询条件
+     * @param condition 查询条件(sql语句,慎用,注意sql注入)
+     * @return
+     */
+    public static Boolean exist(Users data, String condition)
+    {
+        SqlSession sqlSession = SqlSessionUtils.getSqlSession();
+        UsersMapper usersMapper = sqlSession.getMapper(UsersMapper.class);
+        Integer result = usersMapper.getCount("1", data, condition);
+        sqlSession.close();
+        if(result > 0) {
             return true;
         }
         return false;
     }
 
-    /// <summary>
-    /// 添加数据
-    /// </summary>
-    /// <param name="Fields">要设置的字段</param>
-    /// <returns></returns>
-    public static AppResultJson Add(Map<String, Object> fields)
+    /**
+     * 添加数据
+     * @param data 数据包
+     * @return
+     */
+    public static Integer add(Users data)
     {
-        int Id = new DbService(Base.main_tables, Base.main_url, Base.main_username, Base.main_password).Add("Users", fields, 0, true);
-        AppResultJson result = new AppResultJson();
-        result.Status = "1";
-        result.Data = Id;
+        SqlSession sqlSession = SqlSessionUtils.getSqlSession();
+        UsersMapper usersMapper = sqlSession.getMapper(UsersMapper.class);
+        Integer result = usersMapper.insert(data);
+        sqlSession.close();
         return result;
     }
 
-    /// <summary>
-    /// 修改数据
-    /// </summary>
-    /// <param name="Fields">要设置的字段</param>
-    /// <param name="Id">主键Id</param>
-    public static AppResultJson Edit(Map<String, Object> fields, Integer Id)
+    /**
+     * 修改数据
+     * @param data 数据包
+     * @return
+     */
+    public static Integer update(Users data)
     {
-        new DbService(Base.main_tables, Base.main_url, Base.main_username, Base.main_password).Edit("Users", fields, Id);
-        AppResultJson result = new AppResultJson();
-        result.Status = "1";
-        result.Data = Id;
+        SqlSession sqlSession = SqlSessionUtils.getSqlSession();
+        UsersMapper usersMapper = sqlSession.getMapper(UsersMapper.class);
+        Integer result = usersMapper.updateByPrimaryKey(data);
+        sqlSession.close();
         return result;
     }
 
-    /// <summary>
-    /// 逻辑删除
-    /// </summary>
-    /// <param name="Id">主键Id</param>
-    public static void Remove(int Id)
-    {
-        Map<String, Object> fields = new HashMap<>();
-        fields.put("Status", -1);
-        new DbService(Base.main_tables, Base.main_url, Base.main_username, Base.main_password).Edit("Users", fields, Id);
-    }
-
-    /// <summary>
-    /// 删除数据
-    /// </summary>
-    /// <param name="Id">主键Id</param>
-    public static void Delete(int Id)
+    /**
+     * 逻辑删除数据,将status字段设置为-1
+     * @param id 主键id
+     * @return
+     */
+    public static Integer remove(Integer id)
     {
-        new DbService(Base.main_tables, Base.main_url, Base.main_username, Base.main_password).Delete("Users", Id);
+        Users data = new Users();
+        data.setId(id);
+        data.setStatus(-1);
+        SqlSession sqlSession = SqlSessionUtils.getSqlSession();
+        UsersMapper usersMapper = sqlSession.getMapper(UsersMapper.class);
+        Integer result = usersMapper.updateByPrimaryKey(data);
+        sqlSession.close();
+        return result;
     }
 
-    /// <summary>
-    /// 排序
-    /// </summary>
-    /// <param name="Id">主键Id</param>
-    /// <param name="Sort">排序序号</param>
-    public static void Sort(int Id, int Sort)
+    /**
+     * 彻底删除数据
+     * @param id 主键id
+     * @return
+     */
+    public static Integer delete(Integer id)
     {
-        new DbService(Base.main_tables, Base.main_url, Base.main_username, Base.main_password).Sort("Users", Sort, Id);
+        SqlSession sqlSession = SqlSessionUtils.getSqlSession();
+        UsersMapper usersMapper = sqlSession.getMapper(UsersMapper.class);
+        Integer result = usersMapper.deleteByPrimaryKey(id);
+        sqlSession.close();
+        return result;
     }
 
-    /// <summary>
-    /// 导入数据
-    /// </summary>
-    /// <param name="ExcelData">json数据</param>
-    public static void Import(String ExcelData)
+    /**
+     * 排序
+     * @param id 主键id
+     * @param Sort 序号
+     * @return
+     */
+    public static Integer sort(Integer id, Integer sort)
     {
+        Users user = new Users();
+        user.setId(id);
+        user.setSort(sort);
+        SqlSession sqlSession = SqlSessionUtils.getSqlSession();
+        UsersMapper usersMapper = sqlSession.getMapper(UsersMapper.class);
+        Integer result = usersMapper.updateByPrimaryKey(user);
+        sqlSession.close();
+        return result;
     }
 }

+ 258 - 260
src/main/resources/mybatis-config.xml

@@ -1,270 +1,268 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE configuration
-        PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
-        "http://mybatis.org/dtd/mybatis-3-config.dtd">
- 
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
+
 <configuration>
- 
+
     <environments default="development">
         <environment id="development">
-            <transactionManager type="JDBC"/>
+            <transactionManager type="JDBC" />
             <dataSource type="POOLED">
-                <property name="driver" value="com.mysql.cj.jdbc.Driver"/>
-                <property name="url" value="jdbc:mysql://47.109.31.237:3306/KxsMainServer"/>
-                <property name="username" value="KxsMainServer"/>
-                <property name="password" value="FrW8ZfxlcaVdm1r0"/>
+                <property name="driver" value="com.mysql.cj.jdbc.Driver" />
+                <property name="url" value="jdbc:mysql://47.109.31.237:3306/KxsMainServer" />
+                <property name="username" value="KxsMainServer" />
+                <property name="password" value="FrW8ZfxlcaVdm1r0" />
             </dataSource>
         </environment>
     </environments>
-<!--    每一个Mapper.xml都需要在mybatis核心配置中注册-->
+    <!--    每一个Mapper.xml都需要在mybatis核心配置中注册-->
     <mappers>
-        <mapper resource="xml/main/ActiveRewardMapper.xml"/>
-        <mapper resource="xml/main/ActivityEnrolRecordMapper.xml"/>
-        <mapper resource="xml/main/ActivityInfoMapper.xml"/>
-        <mapper resource="xml/main/ActivityPrizeDetailMapper.xml"/>
-        <mapper resource="xml/main/ActivityRedPackageJoinsMapper.xml"/>
-        <mapper resource="xml/main/ActivityRedPackageStockMapper.xml"/>
-        <mapper resource="xml/main/ActivityRedPackageTop10Mapper.xml"/>
-        <mapper resource="xml/main/AdvertismentMapper.xml"/>
-        <mapper resource="xml/main/AgentLevelSetMapper.xml"/>
-        <mapper resource="xml/main/AppBottomNavsMapper.xml"/>
-        <mapper resource="xml/main/AppVersionMapper.xml"/>
-        <mapper resource="xml/main/AppVideoMapper.xml"/>
-        <mapper resource="xml/main/AppVideoListMapper.xml"/>
-        <mapper resource="xml/main/BackEndOpRecordMapper.xml"/>
-        <mapper resource="xml/main/BankInfoMapper.xml"/>
-        <mapper resource="xml/main/BrokenMachineChangeMapper.xml"/>
-        <mapper resource="xml/main/BrokenMachineChangeDetailMapper.xml"/>
-        <mapper resource="xml/main/BusinessActSummaryMapper.xml"/>
-        <mapper resource="xml/main/BusinessPartnerMapper.xml"/>
-        <mapper resource="xml/main/BusinessPartnerMerchantMapper.xml"/>
-        <mapper resource="xml/main/BusinessPartnerPosMapper.xml"/>
-        <mapper resource="xml/main/BusinessTradeSummaryMapper.xml"/>
-        <mapper resource="xml/main/ChangeTypesMapper.xml"/>
-        <mapper resource="xml/main/ColMapper.xml"/>
-        <mapper resource="xml/main/ConsumerOpenIdsMapper.xml"/>
-        <mapper resource="xml/main/ConsumerOrderForNoMapper.xml"/>
-        <mapper resource="xml/main/ConsumerOrdersMapper.xml"/>
-        <mapper resource="xml/main/ConsumerProfitMapper.xml"/>
-        <mapper resource="xml/main/ConsumersMapper.xml"/>
-        <mapper resource="xml/main/CouponAssignRecordsMapper.xml"/>
-        <mapper resource="xml/main/CouponsMapper.xml"/>
-        <mapper resource="xml/main/CouponsForUserMapper.xml"/>
-        <mapper resource="xml/main/CustomTagSetMapper.xml"/>
-        <mapper resource="xml/main/ErpCompanysMapper.xml"/>
-        <mapper resource="xml/main/ExportExcelsMapper.xml"/>
-        <mapper resource="xml/main/FileUpdateInfoMapper.xml"/>
-        <mapper resource="xml/main/FluxProfitDetailMapper.xml"/>
-        <mapper resource="xml/main/FluxProfitSummaryMapper.xml"/>
-        <mapper resource="xml/main/HelpProfitAccountRecordMapper.xml"/>
-        <mapper resource="xml/main/HelpProfitAmountSummaryMapper.xml"/>
-        <mapper resource="xml/main/HelpProfitExchangeMapper.xml"/>
-        <mapper resource="xml/main/HelpProfitExchangeDetailMapper.xml"/>
-        <mapper resource="xml/main/HelpProfitMerchantForUserMapper.xml"/>
-        <mapper resource="xml/main/HelpProfitMerIdsMapper.xml"/>
-        <mapper resource="xml/main/HelpProfitMerTradeMonthSummayMapper.xml"/>
-        <mapper resource="xml/main/HelpProfitMerTradeSummayMapper.xml"/>
-        <mapper resource="xml/main/HelpProfitRebateDetailMapper.xml"/>
-        <mapper resource="xml/main/HelpProfitRewardMapper.xml"/>
-        <mapper resource="xml/main/HelpProfitRewardDetailMapper.xml"/>
-        <mapper resource="xml/main/IndexIconListMapper.xml"/>
-        <mapper resource="xml/main/KqProductBrandMapper.xml"/>
-        <mapper resource="xml/main/KqProductOrgsMapper.xml"/>
-        <mapper resource="xml/main/KqProductRuleSetMapper.xml"/>
-        <mapper resource="xml/main/KqProductsMapper.xml"/>
-        <mapper resource="xml/main/LeaderAccountRecordMapper.xml"/>
-        <mapper resource="xml/main/LeaderCompPrizeMapper.xml"/>
-        <mapper resource="xml/main/LeaderCompTmpMapper.xml"/>
-        <mapper resource="xml/main/LeaderCompTradeStatMapper.xml"/>
-        <mapper resource="xml/main/LeaderReserveRecordMapper.xml"/>
-        <mapper resource="xml/main/LeadersMapper.xml"/>
-        <mapper resource="xml/main/MachineApplyMapper.xml"/>
-        <mapper resource="xml/main/MachineApplyDetailMapper.xml"/>
-        <mapper resource="xml/main/MachineChangeMapper.xml"/>
-        <mapper resource="xml/main/MachineChangeDetailMapper.xml"/>
-        <mapper resource="xml/main/MachineForMerNoMapper.xml"/>
-        <mapper resource="xml/main/MachineForQrCodeMapper.xml"/>
-        <mapper resource="xml/main/MachineForSnNoMapper.xml"/>
-        <mapper resource="xml/main/MachineRenewMapper.xml"/>
-        <mapper resource="xml/main/MachineReturnMapper.xml"/>
-        <mapper resource="xml/main/MachineUnBindMapper.xml"/>
-        <mapper resource="xml/main/MenuRightMapper.xml"/>
-        <mapper resource="xml/main/MerchantAddInfoMapper.xml"/>
-        <mapper resource="xml/main/MerchantAdminMapper.xml"/>
-        <mapper resource="xml/main/MerchantAuthMapper.xml"/>
-        <mapper resource="xml/main/MerchantClassMapper.xml"/>
-        <mapper resource="xml/main/MerchantColMapper.xml"/>
-        <mapper resource="xml/main/MerchantCommentMapper.xml"/>
-        <mapper resource="xml/main/MerchantDepositReturnsMapper.xml"/>
-        <mapper resource="xml/main/MerchantDepositSetMapper.xml"/>
-        <mapper resource="xml/main/MerchantForCodeMapper.xml"/>
-        <mapper resource="xml/main/MerchantForMobileMapper.xml"/>
-        <mapper resource="xml/main/MerchantForNameMapper.xml"/>
-        <mapper resource="xml/main/MerchantInfoMapper.xml"/>
-        <mapper resource="xml/main/MerchantParamSetMapper.xml"/>
-        <mapper resource="xml/main/MerchantQrCodeMapper.xml"/>
-        <mapper resource="xml/main/MerchantRebateDetailMapper.xml"/>
-        <mapper resource="xml/main/MerchantsMapper.xml"/>
-        <mapper resource="xml/main/MobileCodeCheckMapper.xml"/>
-        <mapper resource="xml/main/MsgAlertMapper.xml"/>
-        <mapper resource="xml/main/MsgAlertUserListMapper.xml"/>
-        <mapper resource="xml/main/MsgBlackListMapper.xml"/>
-        <mapper resource="xml/main/MsgPersonalMapper.xml"/>
-        <mapper resource="xml/main/MsgPlacardMapper.xml"/>
-        <mapper resource="xml/main/MsgPlacardReadMapper.xml"/>
-        <mapper resource="xml/main/MsgPushMapper.xml"/>
-        <mapper resource="xml/main/MsgSmsMapper.xml"/>
-        <mapper resource="xml/main/MsgSmsSetMapper.xml"/>
-        <mapper resource="xml/main/MsgTemplateMapper.xml"/>
-        <mapper resource="xml/main/OpenBankCityTableMapper.xml"/>
-        <mapper resource="xml/main/OpenBankTableMapper.xml"/>
-        <mapper resource="xml/main/OpenRewardMapper.xml"/>
-        <mapper resource="xml/main/OpenRewardDetailMapper.xml"/>
-        <mapper resource="xml/main/OpenSnSnapshotMapper.xml"/>
-        <mapper resource="xml/main/OperateLogMapper.xml"/>
-        <mapper resource="xml/main/OperateRightListMapper.xml"/>
-        <mapper resource="xml/main/OrderForNoMapper.xml"/>
-        <mapper resource="xml/main/OrderProductMapper.xml"/>
-        <mapper resource="xml/main/OrderRefundMapper.xml"/>
-        <mapper resource="xml/main/OrderRefundReasonMapper.xml"/>
-        <mapper resource="xml/main/OrdersMapper.xml"/>
-        <mapper resource="xml/main/PageInfoMapper.xml"/>
-        <mapper resource="xml/main/PageUpdateInfoMapper.xml"/>
-        <mapper resource="xml/main/PosCouponForUserMapper.xml"/>
-        <mapper resource="xml/main/PosCouponOrdersMapper.xml"/>
-        <mapper resource="xml/main/PosCouponRecordMapper.xml"/>
-        <mapper resource="xml/main/PosCouponsMapper.xml"/>
-        <mapper resource="xml/main/PosMachinesMapper.xml"/>
-        <mapper resource="xml/main/PosMachinesFeeChangeRecordMapper.xml"/>
-        <mapper resource="xml/main/PosMachinesTwoMapper.xml"/>
-        <mapper resource="xml/main/PosMerchantInfoMapper.xml"/>
-        <mapper resource="xml/main/PosMerchantInfoBakMapper.xml"/>
-        <mapper resource="xml/main/PosMerchantOtherInfoMapper.xml"/>
-        <mapper resource="xml/main/PosMerchantTradeSummayMapper.xml"/>
-        <mapper resource="xml/main/PreAmountRecordMapper.xml"/>
-        <mapper resource="xml/main/PreSendStockDetailMapper.xml"/>
-        <mapper resource="xml/main/ProductCommentMapper.xml"/>
-        <mapper resource="xml/main/ProductCommentAgreeMapper.xml"/>
-        <mapper resource="xml/main/ProductFareAreasMapper.xml"/>
-        <mapper resource="xml/main/ProductFareTempMapper.xml"/>
-        <mapper resource="xml/main/ProductKeysMapper.xml"/>
-        <mapper resource="xml/main/ProductNormMapper.xml"/>
-        <mapper resource="xml/main/ProductNormItemMapper.xml"/>
-        <mapper resource="xml/main/ProductNormTempMapper.xml"/>
-        <mapper resource="xml/main/ProductsMapper.xml"/>
-        <mapper resource="xml/main/ProfitObjectActivationsMapper.xml"/>
-        <mapper resource="xml/main/ProfitObjectContinueFloorsMapper.xml"/>
-        <mapper resource="xml/main/ProfitObjectFloorsMapper.xml"/>
-        <mapper resource="xml/main/ProfitObjectLevelKindsMapper.xml"/>
-        <mapper resource="xml/main/ProfitObjectLevelsMapper.xml"/>
-        <mapper resource="xml/main/ProfitObjectsMapper.xml"/>
-        <mapper resource="xml/main/ProfitObjectsActiveCheckMapper.xml"/>
-        <mapper resource="xml/main/ProfitObjectsActiveParamsMapper.xml"/>
-        <mapper resource="xml/main/ProfitObjectsActivesMapper.xml"/>
-        <mapper resource="xml/main/ProfitObjectsActivesForIdMapper.xml"/>
-        <mapper resource="xml/main/ProfitObjectsRuleMapper.xml"/>
-        <mapper resource="xml/main/ProfitObjectsRuleDetailsMapper.xml"/>
-        <mapper resource="xml/main/ProfitReceiveRecordMapper.xml"/>
-        <mapper resource="xml/main/ProfitReceivesMapper.xml"/>
-        <mapper resource="xml/main/ProfitRecordMapper.xml"/>
-        <mapper resource="xml/main/ProfitRewardExportMapper.xml"/>
-        <mapper resource="xml/main/ProfitRewardRecordMapper.xml"/>
-        <mapper resource="xml/main/ProfitSubsidyDetailMapper.xml"/>
-        <mapper resource="xml/main/ProfitSubsidyExportMapper.xml"/>
-        <mapper resource="xml/main/PublicAccountSetMapper.xml"/>
-        <mapper resource="xml/main/PullNewActMapper.xml"/>
-        <mapper resource="xml/main/PullNewDetailMapper.xml"/>
-        <mapper resource="xml/main/PullnewSummaryMapper.xml"/>
-        <mapper resource="xml/main/RecommendDirectUserMapper.xml"/>
-        <mapper resource="xml/main/RecommendTradeSummaryMapper.xml"/>
-        <mapper resource="xml/main/RecycMachineOrderMapper.xml"/>
-        <mapper resource="xml/main/RecycMachineOrderPosMapper.xml"/>
-        <mapper resource="xml/main/RefreshTokensMapper.xml"/>
-        <mapper resource="xml/main/SchoolMakerStudyMapper.xml"/>
-        <mapper resource="xml/main/SchoolMaterialsMapper.xml"/>
-        <mapper resource="xml/main/SchoolMorningMeetMapper.xml"/>
-        <mapper resource="xml/main/SchoolMorningMeetLogMapper.xml"/>
-        <mapper resource="xml/main/SchoolSignInDataMapper.xml"/>
-        <mapper resource="xml/main/SchoolSignInRecordMapper.xml"/>
-        <mapper resource="xml/main/SchoolSignInTaskMapper.xml"/>
-        <mapper resource="xml/main/SchoolSignInTaskRecordMapper.xml"/>
-        <mapper resource="xml/main/ServiceCenterMapper.xml"/>
-        <mapper resource="xml/main/SetMerchantTypeRecordMapper.xml"/>
-        <mapper resource="xml/main/SmallStoreHouseMapper.xml"/>
-        <mapper resource="xml/main/SmallStoreQuotaRecordMapper.xml"/>
-        <mapper resource="xml/main/SpOrderNosMapper.xml"/>
-        <mapper resource="xml/main/StoreBalanceMapper.xml"/>
-        <mapper resource="xml/main/StoreChangeHistoryMapper.xml"/>
-        <mapper resource="xml/main/StoreForCodeMapper.xml"/>
-        <mapper resource="xml/main/StoreForNameMapper.xml"/>
-        <mapper resource="xml/main/StoreHouseMapper.xml"/>
-        <mapper resource="xml/main/StoreHouseAmountPromissMapper.xml"/>
-        <mapper resource="xml/main/StoreHouseAmountRecordMapper.xml"/>
-        <mapper resource="xml/main/StoreMachineApplyMapper.xml"/>
-        <mapper resource="xml/main/StoreMallOrderSummaryMapper.xml"/>
-        <mapper resource="xml/main/StoreSnActivateSummaryMapper.xml"/>
-        <mapper resource="xml/main/StoreStockChangeMapper.xml"/>
-        <mapper resource="xml/main/StoreSwapSnMapper.xml"/>
-        <mapper resource="xml/main/SubsidyRecordMapper.xml"/>
-        <mapper resource="xml/main/SysAdminMapper.xml"/>
-        <mapper resource="xml/main/SysAdminRoleMapper.xml"/>
-        <mapper resource="xml/main/SysRechargeRecordMapper.xml"/>
-        <mapper resource="xml/main/SystemSetMapper.xml"/>
-        <mapper resource="xml/main/TeamApplyMapper.xml"/>
-        <mapper resource="xml/main/TeamApplyForTeamNameMapper.xml"/>
-        <mapper resource="xml/main/TeamApplyForTeamNoMapper.xml"/>
-        <mapper resource="xml/main/TeamBlackListMapper.xml"/>
-        <mapper resource="xml/main/TeamConfigMapper.xml"/>
-        <mapper resource="xml/main/TeamDayTopMapper.xml"/>
-        <mapper resource="xml/main/TeamOfferApplyMapper.xml"/>
-        <mapper resource="xml/main/TeamPersonDayTopMapper.xml"/>
-        <mapper resource="xml/main/ToChargeBackRecordMapper.xml"/>
-        <mapper resource="xml/main/ToChargeBackRecordSubMapper.xml"/>
-        <mapper resource="xml/main/ToChargeByStageMapper.xml"/>
-        <mapper resource="xml/main/TradeDaySummaryMapper.xml"/>
-        <mapper resource="xml/main/TradeRecordMapper.xml"/>
-        <mapper resource="xml/main/UploadParamsMapper.xml"/>
-        <mapper resource="xml/main/UserAccountMapper.xml"/>
-        <mapper resource="xml/main/UserAccountRecordMapper.xml"/>
-        <mapper resource="xml/main/UserAddressMapper.xml"/>
-        <mapper resource="xml/main/UserAuthRecordMapper.xml"/>
-        <mapper resource="xml/main/UserBackMapper.xml"/>
-        <mapper resource="xml/main/UserBackKindMapper.xml"/>
-        <mapper resource="xml/main/UserBalanceTopMapper.xml"/>
-        <mapper resource="xml/main/UserCarMapper.xml"/>
-        <mapper resource="xml/main/UserCardForWeChatMapper.xml"/>
-        <mapper resource="xml/main/UserCardRecordMapper.xml"/>
-        <mapper resource="xml/main/UserCashRecordMapper.xml"/>
-        <mapper resource="xml/main/UserCenterIconListMapper.xml"/>
-        <mapper resource="xml/main/UserCollectionMapper.xml"/>
-        <mapper resource="xml/main/UserDataMapper.xml"/>
-        <mapper resource="xml/main/UserDetailMapper.xml"/>
-        <mapper resource="xml/main/UserFamilyMemberMapper.xml"/>
-        <mapper resource="xml/main/UserForMakerCodeMapper.xml"/>
-        <mapper resource="xml/main/UserForMakerCodeBakMapper.xml"/>
-        <mapper resource="xml/main/UserForMobileMapper.xml"/>
-        <mapper resource="xml/main/UserForRealNameMapper.xml"/>
-        <mapper resource="xml/main/UserFriendMapper.xml"/>
-        <mapper resource="xml/main/UserGroupMapper.xml"/>
-        <mapper resource="xml/main/UserLevelSetMapper.xml"/>
-        <mapper resource="xml/main/UserLoginRecordMapper.xml"/>
-        <mapper resource="xml/main/UserMachineDataMapper.xml"/>
-        <mapper resource="xml/main/UserMallLargeSnMapper.xml"/>
-        <mapper resource="xml/main/UserOfflineSignInRecordsMapper.xml"/>
-        <mapper resource="xml/main/UserProfitMapper.xml"/>
-        <mapper resource="xml/main/UserProfitSetMapper.xml"/>
-        <mapper resource="xml/main/UserProfitSubsidySummaryMapper.xml"/>
-        <mapper resource="xml/main/UserRankMapper.xml"/>
-        <mapper resource="xml/main/UserRankWhiteMapper.xml"/>
-        <mapper resource="xml/main/UserRebateDetailMapper.xml"/>
-        <mapper resource="xml/main/UsersMapper.xml"/>
-        <mapper resource="xml/main/UserSnActInfoMapper.xml"/>
-        <mapper resource="xml/main/UserSnDelayChangeMapper.xml"/>
-        <mapper resource="xml/main/UserStoreChangeMapper.xml"/>
-        <mapper resource="xml/main/UserSwapDetailMapper.xml"/>
-        <mapper resource="xml/main/UserSwapSummaryMapper.xml"/>
-        <mapper resource="xml/main/UserSwapWhiteMapper.xml"/>
-        <mapper resource="xml/main/UserTradeDaySummaryMapper.xml"/>
-        <mapper resource="xml/main/UserTradeMonthSummaryMapper.xml"/>
+        <mapper resource="xml/main/ActiveRewardMapper.xml" />
+        <mapper resource="xml/main/ActivityEnrolRecordMapper.xml" />
+        <mapper resource="xml/main/ActivityInfoMapper.xml" />
+        <mapper resource="xml/main/ActivityPrizeDetailMapper.xml" />
+        <mapper resource="xml/main/ActivityRedPackageJoinsMapper.xml" />
+        <mapper resource="xml/main/ActivityRedPackageStockMapper.xml" />
+        <mapper resource="xml/main/ActivityRedPackageTop10Mapper.xml" />
+        <mapper resource="xml/main/AdvertismentMapper.xml" />
+        <mapper resource="xml/main/AgentLevelSetMapper.xml" />
+        <mapper resource="xml/main/AppBottomNavsMapper.xml" />
+        <mapper resource="xml/main/AppVersionMapper.xml" />
+        <mapper resource="xml/main/AppVideoMapper.xml" />
+        <mapper resource="xml/main/AppVideoListMapper.xml" />
+        <mapper resource="xml/main/BackEndOpRecordMapper.xml" />
+        <mapper resource="xml/main/BankInfoMapper.xml" />
+        <mapper resource="xml/main/BrokenMachineChangeMapper.xml" />
+        <mapper resource="xml/main/BrokenMachineChangeDetailMapper.xml" />
+        <mapper resource="xml/main/BusinessActSummaryMapper.xml" />
+        <mapper resource="xml/main/BusinessPartnerMapper.xml" />
+        <mapper resource="xml/main/BusinessPartnerMerchantMapper.xml" />
+        <mapper resource="xml/main/BusinessPartnerPosMapper.xml" />
+        <mapper resource="xml/main/BusinessTradeSummaryMapper.xml" />
+        <mapper resource="xml/main/ChangeTypesMapper.xml" />
+        <mapper resource="xml/main/ColMapper.xml" />
+        <mapper resource="xml/main/ConsumerOpenIdsMapper.xml" />
+        <mapper resource="xml/main/ConsumerOrderForNoMapper.xml" />
+        <mapper resource="xml/main/ConsumerOrdersMapper.xml" />
+        <mapper resource="xml/main/ConsumerProfitMapper.xml" />
+        <mapper resource="xml/main/ConsumersMapper.xml" />
+        <mapper resource="xml/main/CouponAssignRecordsMapper.xml" />
+        <mapper resource="xml/main/CouponsMapper.xml" />
+        <mapper resource="xml/main/CouponsForUserMapper.xml" />
+        <mapper resource="xml/main/CustomTagSetMapper.xml" />
+        <mapper resource="xml/main/ErpCompanysMapper.xml" />
+        <mapper resource="xml/main/ExportExcelsMapper.xml" />
+        <mapper resource="xml/main/FileUpdateInfoMapper.xml" />
+        <mapper resource="xml/main/FluxProfitDetailMapper.xml" />
+        <mapper resource="xml/main/FluxProfitSummaryMapper.xml" />
+        <mapper resource="xml/main/HelpProfitAccountRecordMapper.xml" />
+        <mapper resource="xml/main/HelpProfitAmountSummaryMapper.xml" />
+        <mapper resource="xml/main/HelpProfitExchangeMapper.xml" />
+        <mapper resource="xml/main/HelpProfitExchangeDetailMapper.xml" />
+        <mapper resource="xml/main/HelpProfitMerchantForUserMapper.xml" />
+        <mapper resource="xml/main/HelpProfitMerIdsMapper.xml" />
+        <mapper resource="xml/main/HelpProfitMerTradeMonthSummayMapper.xml" />
+        <mapper resource="xml/main/HelpProfitMerTradeSummayMapper.xml" />
+        <mapper resource="xml/main/HelpProfitRebateDetailMapper.xml" />
+        <mapper resource="xml/main/HelpProfitRewardMapper.xml" />
+        <mapper resource="xml/main/HelpProfitRewardDetailMapper.xml" />
+        <mapper resource="xml/main/IndexIconListMapper.xml" />
+        <mapper resource="xml/main/KqProductBrandMapper.xml" />
+        <mapper resource="xml/main/KqProductOrgsMapper.xml" />
+        <mapper resource="xml/main/KqProductRuleSetMapper.xml" />
+        <mapper resource="xml/main/KqProductsMapper.xml" />
+        <mapper resource="xml/main/LeaderAccountRecordMapper.xml" />
+        <mapper resource="xml/main/LeaderCompPrizeMapper.xml" />
+        <mapper resource="xml/main/LeaderCompTmpMapper.xml" />
+        <mapper resource="xml/main/LeaderCompTradeStatMapper.xml" />
+        <mapper resource="xml/main/LeaderReserveRecordMapper.xml" />
+        <mapper resource="xml/main/LeadersMapper.xml" />
+        <mapper resource="xml/main/MachineApplyMapper.xml" />
+        <mapper resource="xml/main/MachineApplyDetailMapper.xml" />
+        <mapper resource="xml/main/MachineChangeMapper.xml" />
+        <mapper resource="xml/main/MachineChangeDetailMapper.xml" />
+        <mapper resource="xml/main/MachineForMerNoMapper.xml" />
+        <mapper resource="xml/main/MachineForQrCodeMapper.xml" />
+        <mapper resource="xml/main/MachineForSnNoMapper.xml" />
+        <mapper resource="xml/main/MachineRenewMapper.xml" />
+        <mapper resource="xml/main/MachineReturnMapper.xml" />
+        <mapper resource="xml/main/MachineUnBindMapper.xml" />
+        <mapper resource="xml/main/MenuRightMapper.xml" />
+        <mapper resource="xml/main/MerchantAddInfoMapper.xml" />
+        <mapper resource="xml/main/MerchantAdminMapper.xml" />
+        <mapper resource="xml/main/MerchantAuthMapper.xml" />
+        <mapper resource="xml/main/MerchantClassMapper.xml" />
+        <mapper resource="xml/main/MerchantColMapper.xml" />
+        <mapper resource="xml/main/MerchantCommentMapper.xml" />
+        <mapper resource="xml/main/MerchantDepositReturnsMapper.xml" />
+        <mapper resource="xml/main/MerchantDepositSetMapper.xml" />
+        <mapper resource="xml/main/MerchantForCodeMapper.xml" />
+        <mapper resource="xml/main/MerchantForMobileMapper.xml" />
+        <mapper resource="xml/main/MerchantForNameMapper.xml" />
+        <mapper resource="xml/main/MerchantInfoMapper.xml" />
+        <mapper resource="xml/main/MerchantParamSetMapper.xml" />
+        <mapper resource="xml/main/MerchantQrCodeMapper.xml" />
+        <mapper resource="xml/main/MerchantRebateDetailMapper.xml" />
+        <mapper resource="xml/main/MerchantsMapper.xml" />
+        <mapper resource="xml/main/MobileCodeCheckMapper.xml" />
+        <mapper resource="xml/main/MsgAlertMapper.xml" />
+        <mapper resource="xml/main/MsgAlertUserListMapper.xml" />
+        <mapper resource="xml/main/MsgBlackListMapper.xml" />
+        <mapper resource="xml/main/MsgPersonalMapper.xml" />
+        <mapper resource="xml/main/MsgPlacardMapper.xml" />
+        <mapper resource="xml/main/MsgPlacardReadMapper.xml" />
+        <mapper resource="xml/main/MsgPushMapper.xml" />
+        <mapper resource="xml/main/MsgSmsMapper.xml" />
+        <mapper resource="xml/main/MsgSmsSetMapper.xml" />
+        <mapper resource="xml/main/MsgTemplateMapper.xml" />
+        <mapper resource="xml/main/OpenBankCityTableMapper.xml" />
+        <mapper resource="xml/main/OpenBankTableMapper.xml" />
+        <mapper resource="xml/main/OpenRewardMapper.xml" />
+        <mapper resource="xml/main/OpenRewardDetailMapper.xml" />
+        <mapper resource="xml/main/OpenSnSnapshotMapper.xml" />
+        <mapper resource="xml/main/OperateLogMapper.xml" />
+        <mapper resource="xml/main/OperateRightListMapper.xml" />
+        <mapper resource="xml/main/OrderForNoMapper.xml" />
+        <mapper resource="xml/main/OrderProductMapper.xml" />
+        <mapper resource="xml/main/OrderRefundMapper.xml" />
+        <mapper resource="xml/main/OrderRefundReasonMapper.xml" />
+        <mapper resource="xml/main/OrdersMapper.xml" />
+        <mapper resource="xml/main/PageInfoMapper.xml" />
+        <mapper resource="xml/main/PageUpdateInfoMapper.xml" />
+        <mapper resource="xml/main/PosCouponForUserMapper.xml" />
+        <mapper resource="xml/main/PosCouponOrdersMapper.xml" />
+        <mapper resource="xml/main/PosCouponRecordMapper.xml" />
+        <mapper resource="xml/main/PosCouponsMapper.xml" />
+        <mapper resource="xml/main/PosMachinesMapper.xml" />
+        <mapper resource="xml/main/PosMachinesFeeChangeRecordMapper.xml" />
+        <mapper resource="xml/main/PosMachinesTwoMapper.xml" />
+        <mapper resource="xml/main/PosMerchantInfoMapper.xml" />
+        <mapper resource="xml/main/PosMerchantInfoBakMapper.xml" />
+        <mapper resource="xml/main/PosMerchantOtherInfoMapper.xml" />
+        <mapper resource="xml/main/PosMerchantTradeSummayMapper.xml" />
+        <mapper resource="xml/main/PreAmountRecordMapper.xml" />
+        <mapper resource="xml/main/PreSendStockDetailMapper.xml" />
+        <mapper resource="xml/main/ProductCommentMapper.xml" />
+        <mapper resource="xml/main/ProductCommentAgreeMapper.xml" />
+        <mapper resource="xml/main/ProductFareAreasMapper.xml" />
+        <mapper resource="xml/main/ProductFareTempMapper.xml" />
+        <mapper resource="xml/main/ProductKeysMapper.xml" />
+        <mapper resource="xml/main/ProductNormMapper.xml" />
+        <mapper resource="xml/main/ProductNormItemMapper.xml" />
+        <mapper resource="xml/main/ProductNormTempMapper.xml" />
+        <mapper resource="xml/main/ProductsMapper.xml" />
+        <mapper resource="xml/main/ProfitObjectActivationsMapper.xml" />
+        <mapper resource="xml/main/ProfitObjectContinueFloorsMapper.xml" />
+        <mapper resource="xml/main/ProfitObjectFloorsMapper.xml" />
+        <mapper resource="xml/main/ProfitObjectLevelKindsMapper.xml" />
+        <mapper resource="xml/main/ProfitObjectLevelsMapper.xml" />
+        <mapper resource="xml/main/ProfitObjectsMapper.xml" />
+        <mapper resource="xml/main/ProfitObjectsActiveCheckMapper.xml" />
+        <mapper resource="xml/main/ProfitObjectsActiveParamsMapper.xml" />
+        <mapper resource="xml/main/ProfitObjectsActivesMapper.xml" />
+        <mapper resource="xml/main/ProfitObjectsActivesForIdMapper.xml" />
+        <mapper resource="xml/main/ProfitObjectsRuleMapper.xml" />
+        <mapper resource="xml/main/ProfitObjectsRuleDetailsMapper.xml" />
+        <mapper resource="xml/main/ProfitReceiveRecordMapper.xml" />
+        <mapper resource="xml/main/ProfitReceivesMapper.xml" />
+        <mapper resource="xml/main/ProfitRecordMapper.xml" />
+        <mapper resource="xml/main/ProfitRewardExportMapper.xml" />
+        <mapper resource="xml/main/ProfitRewardRecordMapper.xml" />
+        <mapper resource="xml/main/ProfitSubsidyDetailMapper.xml" />
+        <mapper resource="xml/main/ProfitSubsidyExportMapper.xml" />
+        <mapper resource="xml/main/PublicAccountSetMapper.xml" />
+        <mapper resource="xml/main/PullNewActMapper.xml" />
+        <mapper resource="xml/main/PullNewDetailMapper.xml" />
+        <mapper resource="xml/main/PullnewSummaryMapper.xml" />
+        <mapper resource="xml/main/RecommendDirectUserMapper.xml" />
+        <mapper resource="xml/main/RecommendTradeSummaryMapper.xml" />
+        <mapper resource="xml/main/RecycMachineOrderMapper.xml" />
+        <mapper resource="xml/main/RecycMachineOrderPosMapper.xml" />
+        <mapper resource="xml/main/RefreshTokensMapper.xml" />
+        <mapper resource="xml/main/SchoolMakerStudyMapper.xml" />
+        <mapper resource="xml/main/SchoolMaterialsMapper.xml" />
+        <mapper resource="xml/main/SchoolMorningMeetMapper.xml" />
+        <mapper resource="xml/main/SchoolMorningMeetLogMapper.xml" />
+        <mapper resource="xml/main/SchoolSignInDataMapper.xml" />
+        <mapper resource="xml/main/SchoolSignInRecordMapper.xml" />
+        <mapper resource="xml/main/SchoolSignInTaskMapper.xml" />
+        <mapper resource="xml/main/SchoolSignInTaskRecordMapper.xml" />
+        <mapper resource="xml/main/ServiceCenterMapper.xml" />
+        <mapper resource="xml/main/SetMerchantTypeRecordMapper.xml" />
+        <mapper resource="xml/main/SmallStoreHouseMapper.xml" />
+        <mapper resource="xml/main/SmallStoreQuotaRecordMapper.xml" />
+        <mapper resource="xml/main/SpOrderNosMapper.xml" />
+        <mapper resource="xml/main/StoreBalanceMapper.xml" />
+        <mapper resource="xml/main/StoreChangeHistoryMapper.xml" />
+        <mapper resource="xml/main/StoreForCodeMapper.xml" />
+        <mapper resource="xml/main/StoreForNameMapper.xml" />
+        <mapper resource="xml/main/StoreHouseMapper.xml" />
+        <mapper resource="xml/main/StoreHouseAmountPromissMapper.xml" />
+        <mapper resource="xml/main/StoreHouseAmountRecordMapper.xml" />
+        <mapper resource="xml/main/StoreMachineApplyMapper.xml" />
+        <mapper resource="xml/main/StoreMallOrderSummaryMapper.xml" />
+        <mapper resource="xml/main/StoreSnActivateSummaryMapper.xml" />
+        <mapper resource="xml/main/StoreStockChangeMapper.xml" />
+        <mapper resource="xml/main/StoreSwapSnMapper.xml" />
+        <mapper resource="xml/main/SubsidyRecordMapper.xml" />
+        <mapper resource="xml/main/SysAdminMapper.xml" />
+        <mapper resource="xml/main/SysAdminRoleMapper.xml" />
+        <mapper resource="xml/main/SysRechargeRecordMapper.xml" />
+        <mapper resource="xml/main/SystemSetMapper.xml" />
+        <mapper resource="xml/main/TeamApplyMapper.xml" />
+        <mapper resource="xml/main/TeamApplyForTeamNameMapper.xml" />
+        <mapper resource="xml/main/TeamApplyForTeamNoMapper.xml" />
+        <mapper resource="xml/main/TeamBlackListMapper.xml" />
+        <mapper resource="xml/main/TeamConfigMapper.xml" />
+        <mapper resource="xml/main/TeamDayTopMapper.xml" />
+        <mapper resource="xml/main/TeamOfferApplyMapper.xml" />
+        <mapper resource="xml/main/TeamPersonDayTopMapper.xml" />
+        <mapper resource="xml/main/ToChargeBackRecordMapper.xml" />
+        <mapper resource="xml/main/ToChargeBackRecordSubMapper.xml" />
+        <mapper resource="xml/main/ToChargeByStageMapper.xml" />
+        <mapper resource="xml/main/TradeDaySummaryMapper.xml" />
+        <mapper resource="xml/main/TradeRecordMapper.xml" />
+        <mapper resource="xml/main/UploadParamsMapper.xml" />
+        <mapper resource="xml/main/UserAccountMapper.xml" />
+        <mapper resource="xml/main/UserAccountRecordMapper.xml" />
+        <mapper resource="xml/main/UserAddressMapper.xml" />
+        <mapper resource="xml/main/UserAuthRecordMapper.xml" />
+        <mapper resource="xml/main/UserBackMapper.xml" />
+        <mapper resource="xml/main/UserBackKindMapper.xml" />
+        <mapper resource="xml/main/UserBalanceTopMapper.xml" />
+        <mapper resource="xml/main/UserCarMapper.xml" />
+        <mapper resource="xml/main/UserCardForWeChatMapper.xml" />
+        <mapper resource="xml/main/UserCardRecordMapper.xml" />
+        <mapper resource="xml/main/UserCashRecordMapper.xml" />
+        <mapper resource="xml/main/UserCenterIconListMapper.xml" />
+        <mapper resource="xml/main/UserCollectionMapper.xml" />
+        <mapper resource="xml/main/UserDataMapper.xml" />
+        <mapper resource="xml/main/UserDetailMapper.xml" />
+        <mapper resource="xml/main/UserFamilyMemberMapper.xml" />
+        <mapper resource="xml/main/UserForMakerCodeMapper.xml" />
+        <mapper resource="xml/main/UserForMakerCodeBakMapper.xml" />
+        <mapper resource="xml/main/UserForMobileMapper.xml" />
+        <mapper resource="xml/main/UserForRealNameMapper.xml" />
+        <mapper resource="xml/main/UserFriendMapper.xml" />
+        <mapper resource="xml/main/UserGroupMapper.xml" />
+        <mapper resource="xml/main/UserLevelSetMapper.xml" />
+        <mapper resource="xml/main/UserLoginRecordMapper.xml" />
+        <mapper resource="xml/main/UserMachineDataMapper.xml" />
+        <mapper resource="xml/main/UserMallLargeSnMapper.xml" />
+        <mapper resource="xml/main/UserOfflineSignInRecordsMapper.xml" />
+        <mapper resource="xml/main/UserProfitMapper.xml" />
+        <mapper resource="xml/main/UserProfitSetMapper.xml" />
+        <mapper resource="xml/main/UserProfitSubsidySummaryMapper.xml" />
+        <mapper resource="xml/main/UserRankMapper.xml" />
+        <mapper resource="xml/main/UserRankWhiteMapper.xml" />
+        <mapper resource="xml/main/UserRebateDetailMapper.xml" />
+        <mapper resource="xml/main/UsersMapper.xml" />
+        <mapper resource="xml/main/UserSnActInfoMapper.xml" />
+        <mapper resource="xml/main/UserSnDelayChangeMapper.xml" />
+        <mapper resource="xml/main/UserStoreChangeMapper.xml" />
+        <mapper resource="xml/main/UserSwapDetailMapper.xml" />
+        <mapper resource="xml/main/UserSwapSummaryMapper.xml" />
+        <mapper resource="xml/main/UserSwapWhiteMapper.xml" />
+        <mapper resource="xml/main/UserTradeDaySummaryMapper.xml" />
+        <mapper resource="xml/main/UserTradeMonthSummaryMapper.xml" />
     </mappers>
 </configuration>

+ 33 - 10
src/main/resources/xml/main/UsersMapper.xml

@@ -1,6 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.kxs.adminap.dao.main.UsersMapper">
+  <resultMap id="MyMap" type="java.util.Map" />
+  <resultMap id="Count" type="java.lang.Integer" />
+  <resultMap id="Sum" type="java.lang.Object" />
   <resultMap id="BaseResultMap" type="com.kxs.adminap.model.main.Users">
     <id column="Id" jdbcType="INTEGER" property="id" />
     <result column="Sort" jdbcType="INTEGER" property="sort" />
@@ -259,6 +262,26 @@
       ParentNav = #{parentNav,jdbcType=LONGVARCHAR}
     where Id = #{id,jdbcType=INTEGER}
   </update>
+  <select id="getCount" parameterType="com.kxs.adminap.model.main.Users" resultMap="Count">
+    select count(#{field}) from Users
+    where 1=1${condition} 
+    <if test="data.makerCode != null">
+      and MakerCode = #{data.makerCode}
+    </if>
+    <if test="data.realName != null">
+      and RealName = #{data.realName}
+    </if>
+  </select>
+  <select id="getSum" parameterType="com.kxs.adminap.model.main.Users" resultMap="Sum">
+    select sum(${field}) from Users
+    where 1=1${condition} 
+    <if test="data.makerCode != null">
+      and MakerCode = #{data.makerCode}
+    </if>
+    <if test="data.realName != null">
+      and RealName = #{data.realName}
+    </if>
+  </select>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select * from Users
     where Id = #{id,jdbcType=INTEGER}
@@ -273,24 +296,24 @@
       and RealName = #{data.realName}
     </if>
   </select>
-  <select id="selectAll" parameterType="com.kxs.adminap.enity.ListParam" resultMap="BaseResultMap">
-    select ${field}
-    <foreach collection="relationData" item="item" index="i">
+  <select id="selectAll" parameterType="com.kxs.adminap.enity.ListParam" resultMap="MyMap">
+    select Users.${field.replaceAll(",", ",Users.")}
+    <foreach collection="relationData" item="item" index="index">
       <foreach collection="item.ReturnField" item="field">
-        ,#{item.table}#{i}.#{field} #{item.field}For#{field}
+        ,${item.table+index}.${field} ${item.field}For${field}
       </foreach>
     </foreach>
      from Users 
-    <foreach collection="relationData" item="item" index="i">
-      left join #{item.table} #{item.table}#{i} on users.#{item.field}=#{item.table}#{i}.Id
+    <foreach collection="relationData" item="item" index="index">
+      left join ${item.table} ${item.table+index} on Users.${item.field}=${item.table+index}.Id
     </foreach>
-    where 1=1${condition} 
+    where 1=1${condition.replaceAll(" and ", " and Users.").replaceAll(" or ", " or Users.")} 
     <if test="query.makerCode != null">
-      and MakerCode = #{query.makerCode}
+      and Users.MakerCode = #{query.makerCode}
     </if>
     <if test="query.realName != null">
-      and RealName = #{query.realName}
+      and Users.RealName = #{query.realName}
     </if>
-    order by ${orderBy} limit #{skip},#{limit}
+    order by Users.${orderBy.replaceAll(",", ",Users.")} limit #{skip},#{limit}
   </select>
 </mapper>