init
This commit is contained in:
commit
614fce8600
|
|
@ -0,0 +1,25 @@
|
|||
**/.classpath
|
||||
**/.dockerignore
|
||||
**/.env
|
||||
**/.git
|
||||
**/.gitignore
|
||||
**/.project
|
||||
**/.settings
|
||||
**/.toolstarget
|
||||
**/.vs
|
||||
**/.vscode
|
||||
**/*.*proj.user
|
||||
**/*.dbmdl
|
||||
**/*.jfm
|
||||
**/azds.yaml
|
||||
**/bin
|
||||
**/charts
|
||||
**/docker-compose*
|
||||
**/Dockerfile*
|
||||
**/node_modules
|
||||
**/npm-debug.log
|
||||
**/obj
|
||||
**/secrets.dev.yaml
|
||||
**/values.dev.yaml
|
||||
LICENSE
|
||||
README.md
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
# User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
|
||||
# Visual Studio 2022 cache/options directory
|
||||
.vs/
|
||||
packages/
|
||||
/.svn
|
||||
logs/
|
||||
|
||||
/SA.WebApi/nlog-internal.log
|
||||
/SA.WebApi/Properties/PublishProfiles
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
stages:
|
||||
- build
|
||||
- deploy
|
||||
|
||||
variables:
|
||||
api_img_name: sa-webapi
|
||||
api_img: sa-webapi:latest
|
||||
env: PreProduction
|
||||
|
||||
before_script:
|
||||
- "docker info"
|
||||
|
||||
close:
|
||||
stage: close
|
||||
script:
|
||||
- docker kill $api_img_name
|
||||
- docker rm $api_img_name
|
||||
only:
|
||||
- PreProduction
|
||||
|
||||
remove:
|
||||
stage: remove
|
||||
script:
|
||||
- docker rmi $api_img
|
||||
only:
|
||||
- PreProduction
|
||||
|
||||
build:
|
||||
stage: build
|
||||
script:
|
||||
- docker build ./ -f ./SA.WebApi/Dockerfile -t $api_img
|
||||
only:
|
||||
- PreProduction
|
||||
|
||||
deploy:
|
||||
image: docker:20.10.8
|
||||
stage: deploy
|
||||
script:
|
||||
- docker run -d -p 8082:80 --name $api_img_name -e ASPNETCORE_ENVIRONMENT="$env" -v /data/$api_img_name/logs:/app/logs $api_img
|
||||
only:
|
||||
- PreProduction
|
||||
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
FROM dotnet-runtime:v6 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
EXPOSE 443
|
||||
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
ENTRYPOINT ["dotnet", "SA.WebApi.dll"]
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="HtmlAgilityPack" Version="1.11.43" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
|
||||
<PackageReference Include="NLog" Version="5.0.1" />
|
||||
<PackageReference Include="WebApiClientCore" Version="2.0.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SA.Core\SA.Core.csproj" />
|
||||
<ProjectReference Include="..\SA.Entity\SA.Entity.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,266 @@
|
|||
using SA.Core.Init;
|
||||
using SA.Core.Util;
|
||||
using SA.Entity.zxdcrm_audit_Models;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SA.AppDomain.SHCheck
|
||||
{
|
||||
public class CheckDeposit
|
||||
{
|
||||
private static NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger();
|
||||
public static void Check()
|
||||
{
|
||||
wx_szzyorderdeposit wx_Szzyorderdeposit = new wx_szzyorderdeposit();
|
||||
|
||||
var depositlist= InitDB.auditDb.Queryable<wx_szzyorderdeposit>().Where(d=>d.auditstatus==1 && d.paydate<DateTime.Parse("2022-08-01")).ToList();
|
||||
var depositlistgroup = depositlist.Where(d => d.orderid != null).GroupBy(d => d.orderid.Value).ToDictionary(d=>d.Key,d=>d.ToList());
|
||||
|
||||
ConcurrentDictionary<int, decimal> depositkvs = new ConcurrentDictionary<int, decimal>();
|
||||
foreach (var deposit in depositlist)
|
||||
{
|
||||
depositkvs.TryAdd(deposit.id, deposit.payprice);
|
||||
}
|
||||
|
||||
|
||||
|
||||
var payclesrlist= InitDB.auditDb.Queryable<wx_order_payclear>().Where(d => d.usedate < DateTime.Parse("2022-08-01")).GroupBy(d=>d.orderid).
|
||||
Select(d=>new Pays { orderid=d.orderid.Value,payprice=SqlFunc.AggregateSum(d.useprice.Value)}).ToList();
|
||||
|
||||
ConcurrentDictionary<int, decimal> paykvs = new ConcurrentDictionary<int, decimal>();
|
||||
|
||||
logger.Debug($"payclesrlist:{payclesrlist.Count},{payclesrlist.Sum(d=>d.payprice)}");
|
||||
foreach (var item in payclesrlist)
|
||||
{
|
||||
paykvs.TryAdd(item.orderid, item.payprice);
|
||||
}
|
||||
|
||||
var paylist = InitDB.auditDb.Queryable<wx_szzyorderpay>().Where(d => d.auditstatus == 1&&d.depositid!=null).ToList();
|
||||
var plistgroup = paylist.GroupBy(d => d.depositid.Value).ToDictionary(d => d.Key, d=>d.ToList());
|
||||
|
||||
var plistByorderid= paylist.GroupBy(d => d.orderid).ToDictionary(d => d.Key, d => d.ToList());
|
||||
|
||||
|
||||
|
||||
List<wx_szzyorderdeposit> mls=new List<wx_szzyorderdeposit>();
|
||||
|
||||
List<wx_szzyorderdeposit> pls = new List<wx_szzyorderdeposit>();
|
||||
|
||||
List<wx_szzyorderdeposit> ls = new List<wx_szzyorderdeposit>();
|
||||
|
||||
List< DepositCheck > dcks=new List<DepositCheck>();
|
||||
|
||||
foreach (var item in depositlist)
|
||||
{
|
||||
if(item.id== 20099045)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
var depositCheck = new DepositCheck()
|
||||
{
|
||||
ids=new List<int>(),
|
||||
usepriceids=new List<int>()
|
||||
};
|
||||
decimal p1 = 0m;
|
||||
if (depositkvs.TryRemove(item.id, out p1))
|
||||
{
|
||||
depositCheck.ids.Add(item.id);
|
||||
depositCheck.payprice = p1;
|
||||
}
|
||||
else
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (item.orderid.HasValue)
|
||||
{
|
||||
depositCheck.usepriceids.Add(item.orderid.Value);
|
||||
}
|
||||
|
||||
|
||||
depositCheck.usepriceids.Add(item.id);
|
||||
getorderis(plistgroup, plistByorderid,depositlistgroup, ref depositCheck);
|
||||
|
||||
depositCheck.usepriceids.AddRange(depositCheck.ids);
|
||||
var useids = new List<int>();
|
||||
foreach (var id in depositCheck.usepriceids)
|
||||
{
|
||||
var amount = 0m;
|
||||
|
||||
if(paykvs.TryRemove(id, out amount))
|
||||
{
|
||||
depositCheck.useprice += amount;
|
||||
useids.Add(id);
|
||||
}
|
||||
}
|
||||
depositCheck.usepriceids = useids;
|
||||
|
||||
var ids = new List<int>();
|
||||
ids.Add(item.id);
|
||||
foreach (var deposit in depositCheck.ids)
|
||||
{
|
||||
decimal p2 = 0m;
|
||||
if (depositkvs.TryRemove(deposit, out p2))
|
||||
{
|
||||
depositCheck.payprice += p2;
|
||||
ids.Add(deposit);
|
||||
}
|
||||
|
||||
}
|
||||
depositCheck.ids = ids;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dcks.Add(depositCheck);
|
||||
if(depositCheck.payprice== depositCheck.useprice)
|
||||
{
|
||||
logger.Debug($"相等:{SerializeHelper.ToJson(depositCheck)},");
|
||||
}
|
||||
else if (depositCheck.payprice> depositCheck.useprice)
|
||||
{
|
||||
logger.Debug($"剩余:{SerializeHelper.ToJson(depositCheck)},");
|
||||
}
|
||||
else if (depositCheck.payprice < depositCheck.useprice)
|
||||
{
|
||||
logger.Debug($"超出:{SerializeHelper.ToJson(depositCheck)},");
|
||||
}
|
||||
}
|
||||
|
||||
var payprice = dcks.Sum(d => d.payprice);
|
||||
|
||||
var useprice = dcks.Sum(d => d.useprice);
|
||||
|
||||
var surlist=dcks.Where(d=>d.payprice>d.useprice).ToList();
|
||||
|
||||
var surprice = surlist.Sum(d => d.payprice - d.useprice);
|
||||
|
||||
logger.Debug($"剩余结果:{SerializeHelper.ToJson(surlist)},");
|
||||
|
||||
var outlist= dcks.Where(d => d.payprice < d.useprice).ToList();
|
||||
|
||||
var outprice = outlist.Sum(d => d.useprice - d.payprice);
|
||||
|
||||
SaveCheckeDeposit(dcks);
|
||||
|
||||
foreach (var item in paykvs)
|
||||
{
|
||||
logger.Debug($"未匹配到:{SerializeHelper.ToJson(item)},");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找关联id
|
||||
/// </summary>
|
||||
/// <param name="plistgroup"></param>
|
||||
/// <param name="plistByorderid"></param>
|
||||
/// <param name="depositlistgroup"></param>
|
||||
/// <param name="depositCheck"></param>
|
||||
public static void getorderis(Dictionary<int,List<wx_szzyorderpay>> plistgroup, Dictionary<int, List<wx_szzyorderpay>> plistByorderid, Dictionary<int, List<wx_szzyorderdeposit>> depositlistgroup, ref DepositCheck depositCheck )
|
||||
{
|
||||
var orderids = SerializeHelper.ToJson(depositCheck.usepriceids);
|
||||
var ids = SerializeHelper.ToJson(depositCheck.ids);
|
||||
foreach (var item in depositCheck.ids)
|
||||
{
|
||||
List<wx_szzyorderpay> wx_Szzyorderpays = new List<wx_szzyorderpay>();
|
||||
if (plistgroup.TryGetValue(item, out wx_Szzyorderpays))
|
||||
{
|
||||
foreach (var pay in wx_Szzyorderpays)
|
||||
{
|
||||
depositCheck.usepriceids.Add(pay.orderid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
foreach (var item in depositCheck.usepriceids)
|
||||
{
|
||||
List<wx_szzyorderdeposit> wx_Szzyorderdeposits = new List<wx_szzyorderdeposit>();
|
||||
if (depositlistgroup.TryGetValue(item, out wx_Szzyorderdeposits))
|
||||
{
|
||||
foreach (var deposit in wx_Szzyorderdeposits)
|
||||
{
|
||||
depositCheck.ids.Add(deposit.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var item in depositCheck.usepriceids)
|
||||
{
|
||||
|
||||
List<wx_szzyorderpay> wx_Szzyorderpays = new List<wx_szzyorderpay>();
|
||||
if (plistByorderid.TryGetValue(item, out wx_Szzyorderpays))
|
||||
{
|
||||
foreach (var pay in wx_Szzyorderpays)
|
||||
{
|
||||
if (pay.depositid.HasValue)
|
||||
{
|
||||
depositCheck.ids.Add(pay.depositid.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
depositCheck.ids = depositCheck.ids.Distinct().ToList();
|
||||
depositCheck.usepriceids = depositCheck.usepriceids.Distinct().ToList();
|
||||
|
||||
if (ids == SerializeHelper.ToJson(depositCheck.ids) && orderids == SerializeHelper.ToJson(depositCheck.usepriceids)) return;
|
||||
getorderis(plistgroup, plistByorderid, depositlistgroup, ref depositCheck);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static void SaveCheckeDeposit(List<DepositCheck> depositChecks)
|
||||
{
|
||||
List<check_deposit> check_Deposit = new List<check_deposit>();
|
||||
|
||||
foreach (var item in depositChecks)
|
||||
{
|
||||
check_deposit deposit = new check_deposit()
|
||||
{
|
||||
depositid = item.ids.Max(),
|
||||
depositids = String.Join(',', item.ids.ToArray()),
|
||||
amount = item.payprice - item.useprice,
|
||||
orderids = String.Join(',', item.usepriceids.ToArray()),
|
||||
payamount = item.payprice,
|
||||
useamount = item.useprice
|
||||
};
|
||||
|
||||
check_Deposit.Add(deposit);
|
||||
}
|
||||
InitDB.auditDb.Insertable(check_Deposit).ExecuteCommand();
|
||||
}
|
||||
|
||||
|
||||
public class Pays
|
||||
{
|
||||
public int orderid { get; set; }
|
||||
public decimal payprice { get; set; }
|
||||
}
|
||||
|
||||
public class DepositCheck
|
||||
{
|
||||
public List<int> ids { get; set; }
|
||||
public decimal payprice { get; set; }
|
||||
|
||||
public List<int> usepriceids { get; set; }
|
||||
|
||||
public decimal useprice { get; set; }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,555 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SA.Entity.Request;
|
||||
using SA.Core.Util;
|
||||
using SA.Entity.zxdcrm_audit_Models;
|
||||
using SA.Core.Init;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace SA.AppDomain.SHCheck
|
||||
{
|
||||
public class SHCheckOrder
|
||||
{
|
||||
private static NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger();
|
||||
|
||||
private static Dictionary<int, string> midproductnames = new Dictionary<int, string>();
|
||||
|
||||
private static Dictionary<int, string> shproductnames = new Dictionary<int, string>();
|
||||
private static Dictionary<string, int> courseModuleids = new Dictionary<string, int>();
|
||||
|
||||
public enum CheckType { CheckIgnore, CheckExpire, CheckFail, CheckTest , CheckSuccess,CheckMissing}
|
||||
|
||||
|
||||
public void InitSH()
|
||||
{
|
||||
var begintime= InitDB.auditDb.Queryable<sh_order>().Max(s => s.trade_time);
|
||||
var begintimstr = "";
|
||||
if (begintime.HasValue)
|
||||
{
|
||||
begintimstr= begintime.Value.Date.ToString("yyyy-MM-dd");
|
||||
}
|
||||
else
|
||||
{
|
||||
begintimstr = "2022-01-01";
|
||||
}
|
||||
|
||||
SHRequest.shQueryList shQueryList = new SHRequest.shQueryList()
|
||||
{
|
||||
pageSize = 500,
|
||||
pageCurrent = 0,
|
||||
beginPayTime = begintimstr,
|
||||
endPayTime=DateTime.Now.Date.ToString("yyyy-MM-dd")
|
||||
};
|
||||
|
||||
logger.Debug(JsonSerializer.Serialize(shQueryList));
|
||||
while (true)
|
||||
{
|
||||
|
||||
var html = GetListHtml(shQueryList);
|
||||
logger.Debug(html);
|
||||
|
||||
var shlistNum = GetShListNum(html);
|
||||
|
||||
if (shlistNum.total == 0)
|
||||
{
|
||||
logger.Debug("查询数量为0");
|
||||
break;
|
||||
}
|
||||
|
||||
var shorders = GetSh_Orders(html);
|
||||
|
||||
var i = InitDB.auditDb.Storageable(shorders).SplitIgnore(d => d.Any()).WhereColumns(d => d.gg_orderno)
|
||||
.SplitInsert(d => d.NotAny()).ExecuteCommand();
|
||||
|
||||
Thread.Sleep(10000);
|
||||
|
||||
shQueryList.pageCurrent= shlistNum.pageCurrent+1;
|
||||
if (shlistNum.pageCurrent * shQueryList.pageSize > shlistNum.total) break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void CheckSHFromSH()
|
||||
{
|
||||
var endDateTime = InitDB.auditDb.Queryable<xinmeiti3>().Max(d => d.otime);
|
||||
//var endDateTime = DateTime.Parse("2022-07-01");
|
||||
|
||||
var shlist = InitDB.auditDb.Queryable<sh_order>().Where(d => d.endtime >= DateTime.Parse("2022-01-01"))
|
||||
.Where(d => d.trade_time < endDateTime.Value.AddDays(1))
|
||||
.OrderByDescending(d => d.trade_time).ToList();
|
||||
|
||||
long[] otderstatus = new long[] { 220, 200, 205, 90 };
|
||||
var xinmeiti3list = InitDB.auditDb.Queryable<xinmeiti3>().Where(d => otderstatus.Contains(d.orderstatus.Value))
|
||||
.Where(d => d.endtime3 >= DateTime.Parse("2022-01-01"))
|
||||
.ToList();
|
||||
|
||||
|
||||
var resList = InitDB.auditDb.Queryable<res_customer>().Where(d => d.customerfrom.Equals("27100")).ToList();
|
||||
|
||||
var reslistKeyFromResid = resList.ToDictionary(d => d.resid, d => d.lastnum3);
|
||||
|
||||
var reslistKeyFromMbile = resList.GroupBy(d => d.lastnum3).ToDictionary(d => d.Key, d => d.ToList());
|
||||
|
||||
logger.Debug(string.Format("查询sh_order数据{0}条,xinmeiti3数据{1}条,开始比对", shlist.Count, xinmeiti3list.Count));
|
||||
|
||||
var shNoresultList = new List<sh_order>();
|
||||
|
||||
Dictionary<string, sh_ordercheck> checkRight = new Dictionary<string, sh_ordercheck>();
|
||||
|
||||
List<sh_ordercheck> shCheckResultList = new List<sh_ordercheck>();
|
||||
|
||||
List<sh_ordercheck> shCheckIgnoreList = new List<sh_ordercheck>();
|
||||
|
||||
List<sh_ordercheck> sh_Orderchecks = new List<sh_ordercheck>();
|
||||
|
||||
//产品名称缓存
|
||||
var wx_Szzysubproducts = InitDB.auditDb.Queryable<wx_szzysubproduct>().ToList();
|
||||
foreach (var item in wx_Szzysubproducts)
|
||||
{
|
||||
midproductnames.TryAdd(item.mid.Value, item.subproductname);
|
||||
}
|
||||
var shproducts = InitDB.auditDb.Queryable<sh_product>().ToList();
|
||||
foreach (var item in shproducts)
|
||||
{
|
||||
shproductnames.TryAdd(item.module_id.Value, item.course);
|
||||
courseModuleids.TryAdd(item.course, item.module_id.Value);
|
||||
}
|
||||
|
||||
//
|
||||
var courses = shlist.Select(d => d.course).Distinct();
|
||||
var shproduct_courses = shproducts.Select(d => d.course).Distinct();
|
||||
|
||||
|
||||
|
||||
|
||||
//筛选人员
|
||||
|
||||
//测试人员
|
||||
Dictionary<string, string> TestUsers = new Dictionary<string, string>();
|
||||
//暂停人员
|
||||
Dictionary<string, string> TimeoutUsers = new Dictionary<string, string>();
|
||||
//4.1前赠送投资时钟网络课人员
|
||||
Dictionary<string, string> TzszUsers = new Dictionary<string, string>();
|
||||
//var timeoutlist=shlist.Where(d => d.remark.Contains("暂停"));
|
||||
foreach (var user in shlist)
|
||||
{
|
||||
if (user.remark.Contains("暂停"))
|
||||
TimeoutUsers.TryAdd(user.userno, user.user);
|
||||
if (user.trade_time < DateTime.Parse("2022-04-01") && user.course.Equals("投资时钟网络课"))
|
||||
TzszUsers.TryAdd(user.userno, user.user);
|
||||
if (user.remark.Contains("测试")|| user.remark.Contains("合规"))
|
||||
TestUsers.TryAdd(user.userno, user.user);
|
||||
|
||||
}
|
||||
|
||||
foreach (var item in shlist)
|
||||
{
|
||||
if (item.gg_orderno.Equals("20220630135231367"))
|
||||
{
|
||||
var begincheck = "";
|
||||
|
||||
}
|
||||
|
||||
var shCheckResult = new sh_ordercheck()
|
||||
{
|
||||
sh_orderno = item.gg_orderno,
|
||||
sh_orderid=item.orderid.ToString(),
|
||||
course=item.course,
|
||||
userno=item.userno,
|
||||
user=item.user,
|
||||
username= Getusername(item.remark),
|
||||
endtime =item.endtime.Value,
|
||||
sh_opendays=item.opendays.Value,
|
||||
diffdays=6666,
|
||||
checktime=DateTime.Now
|
||||
};
|
||||
|
||||
//检查orderid
|
||||
if (item.orderid.HasValue && item.orderid > 0)
|
||||
{
|
||||
var xinmeiti3 = xinmeiti3list.Where(d => d.orderid.Equals(item.orderid.ToString())).ToList();
|
||||
if (xinmeiti3.Count >0)
|
||||
{
|
||||
//填写订单号
|
||||
CheckXinmeiti3List(xinmeiti3, shCheckResult, ref checkRight);
|
||||
}
|
||||
}
|
||||
if (!checkRight.ContainsKey(item.gg_orderno))
|
||||
{
|
||||
var xinmeiti3 = xinmeiti3list.Where(d => d.bussiness_order_id.Equals(item.orderid.ToString())).ToList();
|
||||
if (xinmeiti3.Count > 0)
|
||||
{
|
||||
//填写订单号
|
||||
CheckXinmeiti3List(xinmeiti3, shCheckResult, ref checkRight);
|
||||
}
|
||||
}
|
||||
|
||||
if (shCheckResult.diffdays > 10 || shCheckResult.diffdays < -10)
|
||||
{
|
||||
|
||||
//未填写订单号
|
||||
if (!checkRight.ContainsKey(item.gg_orderno))
|
||||
{
|
||||
//找相同用户手机号
|
||||
var residList = new List<res_customer>();
|
||||
var lastnum3 = item.user.Trim().Insert(4, "*").Remove(8, 1);
|
||||
if (reslistKeyFromMbile.TryGetValue(lastnum3, out residList))
|
||||
{
|
||||
foreach (var res in residList)
|
||||
{
|
||||
var resxinmeiti3s = xinmeiti3list.Where(d => d.resid.Equals(res.resid)).ToList();
|
||||
if (resxinmeiti3s.Count == 0) continue;
|
||||
if (shCheckResult.checktype.Equals(CheckType.CheckSuccess.ToString())) continue;
|
||||
CheckXinmeiti3List(resxinmeiti3s, shCheckResult, ref checkRight);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!checkRight.ContainsKey(item.gg_orderno))
|
||||
{
|
||||
//通过用户名查找
|
||||
if (!string.IsNullOrEmpty(shCheckResult.username))
|
||||
{
|
||||
var resxinmeiti3s = xinmeiti3list.Where(d => d.cname.Equals(shCheckResult.username)).ToList();
|
||||
CheckXinmeiti3List(resxinmeiti3s, shCheckResult, ref checkRight);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!checkRight.ContainsKey(item.gg_orderno))
|
||||
{
|
||||
///忽略,忽略同用户的同课程成功
|
||||
var userchecks = checkRight.Values.Where(d => d.userno == item.userno).ToList();
|
||||
bool ignore = false;
|
||||
foreach (var usercheck in userchecks)
|
||||
{
|
||||
if (!ignore&&usercheck.course.Equals(item.course))
|
||||
{
|
||||
shCheckResult.checktype =CheckType.CheckIgnore.ToString();
|
||||
sh_Orderchecks.Add(shCheckResult);
|
||||
logger.Debug($"【{shCheckResult.checktype}】:{SerializeHelper.ToJson(shCheckResult)}");
|
||||
ignore = true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
//忽略同订单成功
|
||||
var orderSuccess = checkRight.Values.Where(d => d.orderid == item.orderid.ToString()).ToList();
|
||||
if (!ignore&&orderSuccess.Count > 0)
|
||||
{
|
||||
shCheckResult.checktype = CheckType.CheckIgnore.ToString();
|
||||
sh_Orderchecks.Add(shCheckResult);
|
||||
shCheckResult.checkinfo = "同订单号成功了";
|
||||
logger.Debug($"【{shCheckResult.checktype}】同订单号:{SerializeHelper.ToJson(shCheckResult)}");
|
||||
ignore = true;
|
||||
}
|
||||
|
||||
if (!ignore)
|
||||
{
|
||||
if (item.remark.Contains("测试") || TestUsers.ContainsKey(item.userno))
|
||||
{
|
||||
shCheckResult.checktype = CheckType.CheckTest.ToString();
|
||||
shCheckResult.checkinfo = item.remark;
|
||||
}
|
||||
else if (shCheckResult.endtime < endDateTime && (!shCheckResult.endtime3.HasValue || shCheckResult.endtime3 < endDateTime))
|
||||
{
|
||||
shCheckResult.checktype = CheckType.CheckExpire.ToString();
|
||||
}
|
||||
else if (item.remark.Contains("暂停") || item.remark.Contains("换") || TimeoutUsers.ContainsKey(item.userno))
|
||||
{
|
||||
|
||||
shCheckResult.checktype = CheckType.CheckFail.ToString();
|
||||
shCheckResult.checkinfo = $"TimeoutUsers:{item.remark}";
|
||||
}
|
||||
else if (TzszUsers.ContainsKey(item.userno))
|
||||
{
|
||||
shCheckResult.checktype = CheckType.CheckFail.ToString();
|
||||
shCheckResult.checkinfo = $"4.1日前赠送过投资时钟网络课:{item.remark}";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
shCheckResult.checktype = CheckType.CheckFail.ToString();
|
||||
//shCheckResult.checkinfo = $"remark:{item.remark}";
|
||||
}
|
||||
sh_Orderchecks.Add(shCheckResult);
|
||||
logger.Debug($"【{shCheckResult.checktype}】:{SerializeHelper.ToJson(shCheckResult)}");
|
||||
}
|
||||
}
|
||||
}
|
||||
var noresult= getxinmeiti3CheckResult(checkRight.Values.ToList(), xinmeiti3list, sh_Orderchecks);
|
||||
sh_Orderchecks.AddRange(noresult);
|
||||
foreach (var item in checkRight.Values)
|
||||
{
|
||||
item.checktype = CheckType.CheckSuccess.ToString();
|
||||
sh_Orderchecks.Add(item);
|
||||
}
|
||||
|
||||
var i = InitDB.auditDb.Storageable(sh_Orderchecks).SplitUpdate(d => d.Any()).WhereColumns(d => d.sh_orderno)
|
||||
.SplitInsert(d => d.NotAny()).ExecuteCommand();
|
||||
}
|
||||
|
||||
public List<sh_ordercheck> getxinmeiti3CheckResult(List<sh_ordercheck> sh_OrderchecksRight, List<xinmeiti3> xinmeiti3list, List<sh_ordercheck> sh_OrderchecksAll)
|
||||
{
|
||||
List<sh_ordercheck> sh_OrderchecksNoCheck = new List<sh_ordercheck>();
|
||||
|
||||
var successresult = new Dictionary<string, string>();
|
||||
var result = new Dictionary<string, string>();
|
||||
foreach (var item in sh_OrderchecksRight)
|
||||
{
|
||||
successresult.TryAdd($"{item.resid}:{item.course}", item.course);
|
||||
}
|
||||
foreach (var item in sh_OrderchecksAll)
|
||||
{
|
||||
result.TryAdd($"{item.orderid}", item.orderid);
|
||||
}
|
||||
|
||||
foreach (var item in xinmeiti3list)
|
||||
{
|
||||
var xincourse = "";
|
||||
shproductnames.TryGetValue(item.module_id.Value, out xincourse);
|
||||
if (successresult.ContainsKey($"{item.resid}:{xincourse}")) continue;
|
||||
if (result.ContainsKey($"{item.orderid}")) continue;
|
||||
|
||||
var day = DiffDay(item.endtime3, item.endtime_xinmeiti3);
|
||||
if (day <= 1 && day >= -1) continue;
|
||||
|
||||
|
||||
sh_ordercheck sh_OrdercheckNo = new sh_ordercheck();
|
||||
sh_OrdercheckNo.orderid = item.orderid;
|
||||
sh_OrdercheckNo.resid = item.resid;
|
||||
sh_OrdercheckNo.cname = item.cname;
|
||||
sh_OrdercheckNo.subproductname = item.subproductname;
|
||||
sh_OrdercheckNo.otime = item.otime.Value;
|
||||
sh_OrdercheckNo.opendays = Int32.Parse(item.opendays);
|
||||
sh_OrdercheckNo.endtime3 = item.endtime3.Value;
|
||||
sh_OrdercheckNo.checktype = CheckType.CheckMissing.ToString();
|
||||
sh_OrdercheckNo.diffdays = day;
|
||||
sh_OrderchecksNoCheck.Add(sh_OrdercheckNo);
|
||||
|
||||
|
||||
|
||||
}
|
||||
return sh_OrderchecksNoCheck;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void CheckXinmeiti3List(List<xinmeiti3> xinmeiti3s , sh_ordercheck sh_CheckOrder,ref Dictionary<string, sh_ordercheck> checkRight)
|
||||
{
|
||||
foreach (var x3item in xinmeiti3s.OrderBy(d=>d.endtime3))
|
||||
{
|
||||
|
||||
if (checkSHProductName(x3item, sh_CheckOrder.course))
|
||||
{
|
||||
sh_CheckOrder.orderid = x3item.orderid;
|
||||
sh_CheckOrder.resid = x3item.resid;
|
||||
sh_CheckOrder.cname = x3item.cname;
|
||||
sh_CheckOrder.subproductname = x3item.subproductname;
|
||||
sh_CheckOrder.otime = x3item.otime.Value;
|
||||
sh_CheckOrder.opendays = Int32.Parse(x3item.opendays);
|
||||
sh_CheckOrder.endtime3 = x3item.endtime3.Value;
|
||||
var day = DiffDay(x3item.endtime3, sh_CheckOrder.endtime);
|
||||
sh_CheckOrder.diffdays = day;
|
||||
|
||||
if (day <= 1 && day >= -1)
|
||||
{
|
||||
sh_CheckOrder.checktype = CheckType.CheckSuccess.ToString();
|
||||
checkRight.TryAdd(sh_CheckOrder.sh_orderno, sh_CheckOrder);
|
||||
logger.Debug($"CheckRight:{SerializeHelper.ToJson(sh_CheckOrder)}");
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.Debug($"【Checking】:{SerializeHelper.ToJson(sh_CheckOrder)}");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.Debug($"【CheckingcourseF】:sh_orderno:{sh_CheckOrder.sh_orderno},course:{sh_CheckOrder.course},x3itemorderid:{x3item.orderid},moduileid:{x3item.module_id},subproductname:{x3item.subproductname}");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public string Getusername(string remark)
|
||||
{
|
||||
if (remark.Contains("测试") || remark.Contains("合规")) return "";
|
||||
if (string.IsNullOrEmpty(remark)) return "";
|
||||
if (remark.Length < 4) return remark;
|
||||
if (remark.Contains(','))
|
||||
{
|
||||
return remark.Substring(0, remark.IndexOf(','));
|
||||
}
|
||||
if (remark.Contains(','))
|
||||
{
|
||||
return remark.Substring(0, remark.IndexOf(','));
|
||||
}
|
||||
if (remark.Contains(' '))
|
||||
{
|
||||
return remark.Substring(0, remark.IndexOf(' '));
|
||||
}
|
||||
if (remark.Contains('临'))
|
||||
{
|
||||
return remark.Substring(0, remark.IndexOf('临'));
|
||||
}
|
||||
|
||||
return "";
|
||||
|
||||
}
|
||||
|
||||
public int DiffDay(DateTime? xin3endtime,DateTime? endTime)
|
||||
{
|
||||
if (!xin3endtime.HasValue) return 1000;
|
||||
if (!endTime.HasValue) return -1000;
|
||||
TimeSpan timeSpan = xin3endtime.Value - endTime.Value;
|
||||
var day= Convert.ToInt32(timeSpan.TotalDays);
|
||||
return day;
|
||||
}
|
||||
|
||||
public bool checkSHProductName(xinmeiti3 xinmeiti3,string course)
|
||||
{
|
||||
var xincourse = "";
|
||||
if(shproductnames.TryGetValue(xinmeiti3.module_id!.Value, out xincourse))
|
||||
{
|
||||
if(xincourse.Equals(course))return true;
|
||||
}
|
||||
var moudleid = 0;
|
||||
if(courseModuleids.TryGetValue(course,out moudleid))
|
||||
{
|
||||
if(xinmeiti3.module_id== moudleid) return true;
|
||||
}
|
||||
var xinproductName = "";
|
||||
if (!midproductnames.TryGetValue(xinmeiti3.module_id.Value, out xinproductName))
|
||||
{
|
||||
xinproductName = xinmeiti3.productname;
|
||||
}
|
||||
if (course.Equals(xinproductName))return true;
|
||||
|
||||
if(xinproductName.Contains(course.Replace("课",""))) return true;
|
||||
|
||||
if (xinproductName.Contains(course.Replace("投资时钟网络课", "《8888夏令营》网络课"))) return true;
|
||||
if (xinproductName.Contains(course.Replace("投资时钟", "《8888夏令营》网络课"))) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public List<sh_order> GetSh_Orders(string html)
|
||||
{
|
||||
List<sh_order> sh_orders = new List<sh_order>();
|
||||
HtmlAgilityPack.HtmlDocument htmlDocument = new HtmlAgilityPack.HtmlDocument();
|
||||
htmlDocument.LoadHtml(html);
|
||||
HtmlAgilityPack.HtmlNodeCollection list = htmlDocument.DocumentNode.SelectNodes("//tbody//tr");
|
||||
foreach (var node in list)
|
||||
{
|
||||
var nodehtml = node.InnerHtml;
|
||||
HtmlAgilityPack.HtmlDocument nodehtmlDocument = new HtmlAgilityPack.HtmlDocument();
|
||||
nodehtmlDocument.LoadHtml(nodehtml);
|
||||
var href = nodehtmlDocument.DocumentNode.SelectSingleNode("//td[2]/a").Attributes["href"].Value;
|
||||
|
||||
sh_order sh_Order= new sh_order();
|
||||
sh_Order.gg_orderid = href.Substring(href.IndexOf('=') + 1, href.Length - href.IndexOf('=') - 1);
|
||||
sh_Order.gg_orderno = nodehtmlDocument.DocumentNode.SelectSingleNode("//td[2]/a").InnerText;
|
||||
var td1 = nodehtmlDocument.DocumentNode.SelectSingleNode("//td[2]").InnerText.Trim();
|
||||
sh_Order.gg_ordertype= td1.Substring(td1.IndexOf('\t'), td1.Length - td1.IndexOf('\t')).Trim();
|
||||
int orderid = 0;
|
||||
Int32.TryParse(nodehtmlDocument.DocumentNode.SelectSingleNode("//td[3]").InnerText.Trim(),out orderid);
|
||||
sh_Order.orderid = orderid;
|
||||
sh_Order.course = nodehtmlDocument.DocumentNode.SelectSingleNode("//td[4]").InnerText.Trim().Split('\t')[0].Trim();
|
||||
sh_Order.refno = nodehtmlDocument.DocumentNode.SelectSingleNode("//td[4]/a").Attributes["href"].Value.Trim().Split('&')[0].Split('=')[1].Trim();
|
||||
sh_Order.lectureruser = nodehtmlDocument.DocumentNode.SelectSingleNode("//td[5]/a").InnerText.Trim();
|
||||
sh_Order.lectureruserno = nodehtmlDocument.DocumentNode.SelectSingleNode("//td[5]/a").Attributes["href"].Value.Trim().Split('=')[1].Trim();
|
||||
sh_Order.userno = nodehtmlDocument.DocumentNode.SelectSingleNode("//td[6]/a").Attributes["href"].Value.Trim().Split('=')[1].Trim();
|
||||
sh_Order.user = nodehtmlDocument.DocumentNode.SelectSingleNode("//td[6]/a").InnerText.Trim();
|
||||
sh_Order.paytype = nodehtmlDocument.DocumentNode.SelectSingleNode("//td[7]").InnerText.Trim().Split('【')[0].Trim();
|
||||
sh_Order.payprice = decimal.Parse(nodehtmlDocument.DocumentNode.SelectSingleNode("//td[7]").InnerText.Trim().Split('¥')[1].TrimEnd('】'));
|
||||
sh_Order.trade_channel = nodehtmlDocument.DocumentNode.SelectSingleNode("//td[8]").InnerText.Trim();
|
||||
sh_Order.order_status = nodehtmlDocument.DocumentNode.SelectSingleNode("//td[9]").InnerText.Trim();
|
||||
sh_Order.trade_status = nodehtmlDocument.DocumentNode.SelectSingleNode("//td[10]").InnerText.Trim();
|
||||
var endtime = new DateTime();
|
||||
DateTime.TryParse(nodehtmlDocument.DocumentNode.SelectSingleNode("//td[11]").InnerText.Trim(),out endtime);
|
||||
sh_Order.endtime = endtime;
|
||||
int opendays = 0;
|
||||
Int32.TryParse(nodehtmlDocument.DocumentNode.SelectSingleNode("//td[12]").InnerText.Trim(),out opendays);
|
||||
sh_Order.opendays = opendays;
|
||||
sh_Order.remark = nodehtmlDocument.DocumentNode.SelectSingleNode("//td[13]").InnerText.Trim();
|
||||
sh_Order.trade_time =DateTime.Parse(nodehtmlDocument.DocumentNode.SelectSingleNode("//td[14]").InnerText.Trim());
|
||||
sh_orders.Add(sh_Order);
|
||||
}
|
||||
return sh_orders;
|
||||
}
|
||||
|
||||
|
||||
public SHRequest.shListNum GetShListNum(string html)
|
||||
{
|
||||
SHRequest.shListNum sh_listNum = new SHRequest.shListNum();
|
||||
HtmlAgilityPack.HtmlDocument htmlDocument = new HtmlAgilityPack.HtmlDocument();
|
||||
htmlDocument.LoadHtml(html);
|
||||
HtmlAgilityPack.HtmlNodeCollection list = htmlDocument.DocumentNode.SelectNodes("//div[@class='pagination-box']");
|
||||
|
||||
var total = 0;
|
||||
Int32.TryParse(htmlDocument.DocumentNode.SelectSingleNode("//div[@class='pagination-box']").Attributes["data-total"].Value.Trim(),out total);
|
||||
sh_listNum.total = total;
|
||||
if ( total == 0)
|
||||
{
|
||||
return sh_listNum;
|
||||
}
|
||||
|
||||
sh_listNum.pageSize = Int32.Parse(htmlDocument.DocumentNode.SelectSingleNode("//div[@class='pagination-box']").Attributes["data-page-size"].Value.Trim());
|
||||
|
||||
sh_listNum.pageCurrent = Int32.Parse(htmlDocument.DocumentNode.SelectSingleNode("//div[@class='pagination-box']").Attributes["data-page-current"].Value.Trim());
|
||||
|
||||
return sh_listNum;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public string GetListHtml(SHRequest.shQueryList shQuery)
|
||||
{
|
||||
var kvs=DictionaryHelper.GetKeyValues(shQuery);
|
||||
var kvstr = DictionaryHelper.GetkvString(kvs);
|
||||
HttpContent httpContent = new StringContent(kvstr);
|
||||
httpContent.Headers.Add("Cookie", "bjui_theme=blue; SESSION=N2E3M2NiOGUtNGZiOC00MTNlLWJhMWEtNTc3YmQ2MGRjN2Jj");
|
||||
|
||||
var url = "https://sboss.tvlicai.com/course/orderInfo/list";
|
||||
var result = HttpHelper.HttpPost(url, httpContent, "application/x-www-form-urlencoded");
|
||||
return result;
|
||||
}
|
||||
|
||||
public string get()
|
||||
{
|
||||
var url = "http://192.168.11.141:24434/v1/api/open/data/sync/organization?appid=crm_tg_dng8&update_time=";
|
||||
|
||||
HttpRequestMessage httpRequestMessage = new HttpRequestMessage();
|
||||
httpRequestMessage.RequestUri= new Uri(url);
|
||||
httpRequestMessage.Method = HttpMethod.Get;
|
||||
httpRequestMessage.Headers.TryAddWithoutValidation("authorization", "crm_tg_dng8:b461e65d3a707c2f79cf1d7892a4cb95");
|
||||
httpRequestMessage.Headers.TryAddWithoutValidation("timestamps", "1656532966");
|
||||
|
||||
HttpContent httpContent = new StringContent("");
|
||||
httpContent.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/json");
|
||||
// httpContent.Headers.Add("authorization", "crm_tg_dng8:1ba9915985bdead397849b8dffa48f5e");
|
||||
httpRequestMessage.Content = httpContent;
|
||||
|
||||
var result = HttpHelper.Send(httpRequestMessage);
|
||||
|
||||
return result;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,144 @@
|
|||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SA
|
||||
{
|
||||
public static class JsonHelper
|
||||
{
|
||||
#region Method
|
||||
|
||||
/// <summary>
|
||||
/// 类对像转换成json格式
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static string ToJson(this object t)
|
||||
{
|
||||
var ser = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Include, };
|
||||
ser.Converters.Add(new IsoDateTimeConverter() { DateTimeFormat = "yyyy-MM-dd hh:mm:ss" });
|
||||
return JsonConvert.SerializeObject(t, Formatting.Indented, ser);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 类转化为json
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="t"></param>
|
||||
/// <returns></returns>
|
||||
public static string ToJson<T>(this T t)
|
||||
{
|
||||
var ser = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Include, };
|
||||
ser.Converters.Add(new IsoDateTimeConverter() { DateTimeFormat = "yyyy-MM-dd hh:mm:ss" });
|
||||
return JsonConvert.SerializeObject(t, Formatting.Indented, ser);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 类对像转换成json格式
|
||||
/// </summary>
|
||||
/// <param name="t"></param>
|
||||
/// <param name="HasNullIgnore">是否忽略NULL值</param>
|
||||
/// <returns></returns>
|
||||
public static string ToJson(this object t, bool HasNullIgnore)
|
||||
{
|
||||
if (HasNullIgnore)
|
||||
{
|
||||
var ser = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
|
||||
ser.Converters.Add(new IsoDateTimeConverter() { DateTimeFormat = "yyyy-MM-dd hh:mm:ss" });
|
||||
return JsonConvert.SerializeObject(t, Formatting.Indented, ser);
|
||||
}
|
||||
else
|
||||
return ToJson(t);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// json格式转换
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="strJson"></param>
|
||||
/// <returns></returns>
|
||||
public static T FromJson<T>(string strJson) where T : class
|
||||
{
|
||||
if (!string.IsNullOrEmpty(strJson))
|
||||
return JsonConvert.DeserializeObject<T>(strJson);
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// json格式转换成List
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="strJson"></param>
|
||||
/// <returns></returns>
|
||||
public static List<T> FromJsonList<T>(string strJson) where T : class
|
||||
{
|
||||
if (!string.IsNullOrEmpty(strJson))
|
||||
return JsonConvert.DeserializeObject<List<T>>(strJson);
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 字符串转成匿名对象
|
||||
/// </summary>
|
||||
/// <param name="strJson"></param>
|
||||
/// <returns></returns>
|
||||
public static JObject Parse(string strJson)
|
||||
{
|
||||
if (string.IsNullOrEmpty(strJson))
|
||||
return null;
|
||||
JObject o = JObject.Parse(strJson);
|
||||
return o;
|
||||
}
|
||||
|
||||
#endregion Method
|
||||
|
||||
/// <summary>
|
||||
/// json字符串转化成json数组
|
||||
/// </summary>
|
||||
/// <param name="strJson"></param>
|
||||
/// <returns></returns>
|
||||
public static JArray ParsestrToJArray(string strJson)
|
||||
{
|
||||
if (string.IsNullOrEmpty(strJson))
|
||||
return new JArray();
|
||||
JArray array = (JArray)JsonConvert.DeserializeObject(strJson);
|
||||
return array;
|
||||
}
|
||||
|
||||
//public static object ToJson(this string Json)
|
||||
//{
|
||||
// return Json == null ? null : JsonConvert.DeserializeObject(Json);
|
||||
//}
|
||||
|
||||
public static string ToJson(this object obj, string datetimeformats)
|
||||
{
|
||||
var timeConverter = new IsoDateTimeConverter { DateTimeFormat = datetimeformats };
|
||||
return JsonConvert.SerializeObject(obj, timeConverter);
|
||||
}
|
||||
|
||||
public static T ToObject<T>(this string Json)
|
||||
{
|
||||
return Json == null ? default(T) : JsonConvert.DeserializeObject<T>(Json);
|
||||
}
|
||||
|
||||
public static List<T> ToList<T>(this string Json)
|
||||
{
|
||||
return Json == null ? null : JsonConvert.DeserializeObject<List<T>>(Json);
|
||||
}
|
||||
|
||||
public static DataTable ToTable(this string Json)
|
||||
{
|
||||
return Json == null ? null : JsonConvert.DeserializeObject<DataTable>(Json);
|
||||
}
|
||||
|
||||
public static JObject ToJObject(this string Json)
|
||||
{
|
||||
return Json == null ? JObject.Parse("{}") : JObject.Parse(Json.Replace(" ", ""));
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,54 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
|
||||
autoReload="true"
|
||||
throwExceptions="false"
|
||||
internalLogLevel="Debug"
|
||||
internalLogFile="nlog-internal.log">
|
||||
|
||||
<variable name="varDataFolderPath" value="logs"/>
|
||||
<variable name="varLayHeader" value="${longdate}|${level}"/>
|
||||
<variable name="varLayMiddle" value="${threadid}|${logger}"/>
|
||||
<variable name="varLayBack" value="${message}|${exception:format=toString}"/>
|
||||
<targets>
|
||||
<default-wrapper xsi:type="BufferingWrapper" bufferSize="30" flushTimeout="1000"/>
|
||||
<target name="logFile"
|
||||
xsi:type="File"
|
||||
encoding="utf-8"
|
||||
maxArchiveFiles="0"
|
||||
archiveEvery="Day"
|
||||
archiveNumbering="DateAndSequence"
|
||||
archiveDateFormat="yyyyMMdd"
|
||||
archiveOldFileOnStartupAboveSize="100"
|
||||
enableArchiveFileCompression="true"
|
||||
archiveFileName="${varDataFolderPath}/logs/${level}.{#}.zip"
|
||||
bufferSize ="30"
|
||||
autoFlush ="false"
|
||||
openFileFlushTimeout="2000"
|
||||
fileName="${varDataFolderPath}/${level}.log"
|
||||
layout="${varLayHeader}|${varLayMiddle}|${varLayBack}" />
|
||||
<target xsi:type="Console"
|
||||
name="logConsole"
|
||||
layout="${varLayHeader}|${varLayMiddle}|${varLayBack}" />
|
||||
<target name="database" xsi:type="Database"
|
||||
dbProvider="MySql.Data.MySqlClient.MySqlConnection, MySql.Data"
|
||||
connectionString="Data Source=192.168.11.141;Port=3306;Initial Catalog=zxdcrm_audit;user id=tafadmin;password=tafadmin2017;Convert Zero Datetime=True;"
|
||||
commandText="INSERT INTO log_info(`name`,`Date`,`Thread`,`Level`,`Logger`,`Message`,`Exception`) VALUES (@appname,@log_date, @thread, @log_level, @logger, @message, @exception)"
|
||||
keepConnection="true" >
|
||||
|
||||
<parameter name="@appname" layout="web1" />
|
||||
<parameter name="@log_date" layout="${date}" />
|
||||
<parameter name="@thread" layout="${threadid}" />
|
||||
<parameter name="@log_level" layout="${level}" />
|
||||
<parameter name="@logger" layout="${logger}" />
|
||||
<parameter name="@message" layout="${message}" />
|
||||
<parameter name="@Exception" layout="${exception:tostring}" />
|
||||
</target>
|
||||
</targets>
|
||||
<rules>
|
||||
<logger minlevel="Trace" name="*" writeTo="logFile" />
|
||||
<logger minlevel="Trace" name="*" writeTo="logConsole" />
|
||||
<logger minlevel="Trace" name="*" writeTo="Database" />
|
||||
</rules>
|
||||
</nlog>
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
// See https://aka.ms/new-console-template for more information
|
||||
|
||||
using SA.AppDomain.SHCheck;
|
||||
using SA.Domain.XFYun;
|
||||
|
||||
public class Sa
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
SHCheckOrder sHCheckOrder = new SHCheckOrder();
|
||||
//sHCheckOrder.InitSH();
|
||||
// sHCheckOrder.CheckSHFromSH();
|
||||
// sHCheckOrder.get();
|
||||
|
||||
//CheckDeposit.Check();
|
||||
GenOrderCall genOrderCall = new GenOrderCall();
|
||||
//genOrderCall.GetOrder();
|
||||
List<decimal> orderList = new List<decimal>
|
||||
{
|
||||
81119013
|
||||
};
|
||||
genOrderCall.BuildProposTest(orderList);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
|
||||
<PackageReference Include="NLog" Version="5.0.1" />
|
||||
<PackageReference Include="NLog.Schema" Version="5.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SA.AppDomain\SA.AppDomain.csproj" />
|
||||
<ProjectReference Include="..\SA.Domain.XFYun\SA.Domain.XFYun.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="appsettings.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Nlog.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"ConnectionStrings": {
|
||||
"LocalMySqlConnection": "Data Source=192.168.11.129;Port=3306;Initial Catalog=zxdcrm_22y_06m;user id=root;password=sa123456.;Old Guids=true;SslMode=None",
|
||||
"auditMySqlConnection": "Data Source=192.168.11.129;Port=3306;Initial Catalog=zxdcrm_audit;user id=root;password=sa123456.;Old Guids=true;SslMode=None",
|
||||
"zxdcrmMySqlConnection": "Data Source=192.168.11.141;Port=3306;Initial Catalog=zxdcrm;user id=tafadmin;password=tafadmin2017;Old Guids=true;SslMode=None",
|
||||
"LocalRedisConnection": "172.20.0.3:6379,abortConnect=false,password=z0YEOFH5ea"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Configuration.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SA.Core.Init
|
||||
{
|
||||
public class InitConfiguration
|
||||
{
|
||||
|
||||
static IConfiguration Configuration { get; set; }
|
||||
|
||||
|
||||
|
||||
static InitConfiguration()
|
||||
{
|
||||
string Path = "appsettings.json";
|
||||
|
||||
//Path = $"appsettings.{Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT")}.json";
|
||||
Configuration = new ConfigurationBuilder()
|
||||
|
||||
.Add(new JsonConfigurationSource { Path = Path, Optional = false, ReloadOnChange = true })
|
||||
.Build();
|
||||
}
|
||||
public InitConfiguration(IConfiguration configuration)
|
||||
{
|
||||
Configuration = configuration;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 封装要操作的字符
|
||||
/// </summary>
|
||||
/// <param name="sections">节点配置</param>
|
||||
/// <returns></returns>
|
||||
public static string app(params string[] sections)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
if (sections.Any())
|
||||
{
|
||||
return Configuration[string.Join(":", sections)];
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
public static string GetConnectionString(string key)
|
||||
{
|
||||
return Configuration.GetConnectionString(key);
|
||||
}
|
||||
public static IConfigurationSection GetSection(string key)
|
||||
{
|
||||
return Configuration.GetSection(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
using SA.Core.Init;
|
||||
using Serilog;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SA.Core.Init
|
||||
{
|
||||
public class InitDB
|
||||
{
|
||||
public static SqlSugarScope auditDb = new SqlSugarScope(new ConnectionConfig()
|
||||
{
|
||||
ConnectionString = InitConfiguration.GetConnectionString("auditMySqlConnection"),
|
||||
DbType = DbType.MySql,
|
||||
IsAutoCloseConnection = true
|
||||
},
|
||||
db =>
|
||||
{
|
||||
db.Aop.OnLogExecuted = (sql, pars) =>
|
||||
{
|
||||
//LogHelper.Info(sql, pars);
|
||||
};
|
||||
});
|
||||
|
||||
public static SqlSugarScope zxdcrmDb = new SqlSugarScope(new ConnectionConfig()
|
||||
{
|
||||
ConnectionString = InitConfiguration.GetConnectionString("zxdcrmMySqlConnection"),
|
||||
DbType = DbType.MySql,
|
||||
IsAutoCloseConnection = true
|
||||
},
|
||||
db =>
|
||||
{
|
||||
db.Aop.OnLogExecuted = (sql, pars) =>
|
||||
{
|
||||
//LogHelper.Info(sql, pars);
|
||||
};
|
||||
});
|
||||
|
||||
public static SqlSugarScope dbcrmDb = new SqlSugarScope(new ConnectionConfig()
|
||||
{
|
||||
ConnectionString = InitConfiguration.GetConnectionString("dbcrm"),
|
||||
DbType = DbType.MySql,
|
||||
IsAutoCloseConnection = true
|
||||
},
|
||||
db =>
|
||||
{
|
||||
db.Aop.OnLogExecuted = (sql, pars) =>
|
||||
{
|
||||
//LogHelper.Info(sql, pars);
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
|
||||
<PackageReference Include="SqlSugarCore" Version="5.0.9.8" />
|
||||
<PackageReference Include="Serilog" Version="2.12.0" />
|
||||
<PackageReference Include="Serilog.AspNetCore" Version="6.0.1" />
|
||||
<PackageReference Include="Serilog.Enrichers.Thread" Version="3.1.0" />
|
||||
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
||||
<PackageReference Include="Exceptionless.AspNetCore" Version="6.0.1" />
|
||||
<PackageReference Include="Serilog.Sinks.Exceptionless" Version="4.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SA.Core.Util
|
||||
{
|
||||
public class DictionaryHelper
|
||||
{
|
||||
public static string GetkvString(Dictionary<string, string> keys)
|
||||
{
|
||||
StringBuilder str = new();
|
||||
foreach (var item in keys)
|
||||
{
|
||||
str.Append(string.Format("{0}={1}", item.Key, item.Value));
|
||||
str.Append("&");
|
||||
}
|
||||
return str.ToString().TrimEnd('&');
|
||||
}
|
||||
public static string GetJsonString(Dictionary<string, string> keys)
|
||||
{
|
||||
StringBuilder str = new();
|
||||
foreach (var item in keys)
|
||||
{
|
||||
str.Append(string.Format("\"{0}\":\"{1}\"", item.Key, item.Value));
|
||||
str.Append(",");
|
||||
}
|
||||
return str.ToString().TrimEnd(',');
|
||||
}
|
||||
|
||||
public static Dictionary<string, string> GetKeyValues<T>(T model )
|
||||
{
|
||||
|
||||
Dictionary<string, string> keys = new();
|
||||
if( model == null ) return keys;
|
||||
Type t= model.GetType();
|
||||
var list = t.GetProperties().ToList();
|
||||
|
||||
foreach (var item in list)
|
||||
{
|
||||
var value = item.GetValue(model);
|
||||
if (value == null) value="";
|
||||
keys.TryAdd(item.Name, value.ToString() ?? "");
|
||||
|
||||
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,168 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SA.Core.Util
|
||||
{
|
||||
public class HttpHelper
|
||||
{
|
||||
|
||||
public static bool AcceptAllCertifications(object sender, System.Security.Cryptography.X509Certificates.X509Certificate certification, System.Security.Cryptography.X509Certificates.X509Chain chain, System.Net.Security.SslPolicyErrors sslPolicyErrors)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
private static readonly HttpClient HttpClient;
|
||||
|
||||
static HttpHelper()
|
||||
{
|
||||
|
||||
HttpClient = new HttpClient();
|
||||
HttpClient.DefaultRequestHeaders.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 发起POST同步请求
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="postData"></param>
|
||||
/// <param name="contentType">application/xml、application/json、application/text、application/x-www-form-urlencoded</param>
|
||||
/// <param name="headers">填充消息头</param>
|
||||
/// <returns></returns>
|
||||
public static string HttpPost(string url, string postData , string contentType , int timeOut = 30, Dictionary<string, string>? headers =null)
|
||||
{
|
||||
postData = postData ?? "";
|
||||
|
||||
using (HttpContent httpContent = new StringContent(postData))
|
||||
{
|
||||
|
||||
return HttpPost(url, httpContent, contentType, timeOut, headers);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static string HttpPost(string url, HttpContent postData , string contentType , int timeOut = 30, Dictionary<string, string>? headers= null)
|
||||
{
|
||||
|
||||
if (headers != null)
|
||||
{
|
||||
|
||||
foreach (var header in headers)
|
||||
HttpClient.DefaultRequestHeaders.Add(header.Key, header.Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
HttpClient.DefaultRequestHeaders.Clear();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(contentType))
|
||||
postData.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue(contentType);
|
||||
|
||||
// HttpClient.Timeout = new TimeSpan(0, 0, timeOut);
|
||||
HttpResponseMessage response = HttpClient.PostAsync(url, postData).Result;
|
||||
return response.Content.ReadAsStringAsync().Result;
|
||||
}
|
||||
|
||||
public static HttpResponseMessage HttpDelete(string url, int timeOut = 30)
|
||||
{
|
||||
HttpResponseMessage response = HttpClient.DeleteAsync(url).Result;
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
public static string HttpPut(string url, string putData , int timeOut = 30)
|
||||
{
|
||||
using (HttpContent httpContent = new StringContent(putData, Encoding.UTF8))
|
||||
{
|
||||
HttpResponseMessage response = HttpClient.PutAsync(url, httpContent).Result;
|
||||
return response.Content.ReadAsStringAsync().Result;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 发起POST异步请求
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="postData"></param>
|
||||
/// <param name="contentType">application/xml、application/json、application/text、application/x-www-form-urlencoded</param>
|
||||
/// <param name="headers">填充消息头</param>
|
||||
/// <returns></returns>
|
||||
public static async Task<string> HttpPostAsync(string url, string postData , string contentType, int timeOut = 30, Dictionary<string, string>? headers = null)
|
||||
{
|
||||
postData = postData ?? "";
|
||||
using (HttpClient client = new HttpClient())
|
||||
{
|
||||
client.Timeout = new TimeSpan(0, 0, timeOut);
|
||||
if (headers != null)
|
||||
{
|
||||
foreach (var header in headers)
|
||||
client.DefaultRequestHeaders.Add(header.Key, header.Value);
|
||||
}
|
||||
using (HttpContent httpContent = new StringContent(postData, Encoding.UTF8))
|
||||
{
|
||||
if (contentType != null)
|
||||
httpContent.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue(contentType);
|
||||
|
||||
HttpResponseMessage response = await client.PostAsync(url, httpContent);
|
||||
return await response.Content.ReadAsStringAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static string Send(HttpRequestMessage httpRequestMessage)
|
||||
{
|
||||
using (HttpClient client = new HttpClient())
|
||||
{
|
||||
HttpResponseMessage response = client.SendAsync(httpRequestMessage).Result;
|
||||
return response.Content.ReadAsStringAsync().Result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 发起GET同步请求
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="headers"></param>
|
||||
/// <param name="contentType"></param>
|
||||
/// <returns></returns>
|
||||
public static string HttpGet(string url, Dictionary<string, string>? headers = null)
|
||||
{
|
||||
using (HttpClient client = new HttpClient())
|
||||
{
|
||||
if (headers != null)
|
||||
{
|
||||
foreach (var header in headers)
|
||||
client.DefaultRequestHeaders.Add(header.Key, header.Value);
|
||||
}
|
||||
|
||||
HttpResponseMessage response = client.GetAsync(url).Result;
|
||||
return response.Content.ReadAsStringAsync().Result;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 发起GET异步请求
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="headers"></param>
|
||||
/// <param name="contentType"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<string> HttpGetAsync(string url, Dictionary<string, string>? headers = null)
|
||||
{
|
||||
using (HttpClient client = new HttpClient())
|
||||
{
|
||||
if (headers != null)
|
||||
{
|
||||
foreach (var header in headers)
|
||||
client.DefaultRequestHeaders.Add(header.Key, header.Value);
|
||||
}
|
||||
HttpResponseMessage response = await client.GetAsync(url);
|
||||
return await response.Content.ReadAsStringAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,119 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
|
||||
namespace SA.Core.Util
|
||||
{
|
||||
public static class SecurityHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// 加密
|
||||
/// </summary>
|
||||
/// <param name="ciphertext"></param>
|
||||
/// <param name="accessKey"></param>
|
||||
/// <returns></returns>
|
||||
public static string EncyptData(string ciphertext, string accessKey)
|
||||
{
|
||||
SymmetricAlgorithm des = DES.Create();
|
||||
|
||||
Encoding utf = new UTF8Encoding();
|
||||
byte[] key = utf.GetBytes(accessKey);
|
||||
byte[] iv = { 0x75, 0x70, 0x63, 0x68, 0x69, 0x6e, 0x61, 0x31 };
|
||||
ICryptoTransform encryptor = des.CreateEncryptor(key, iv);
|
||||
byte[] data = utf.GetBytes(ciphertext);
|
||||
byte[] encData = encryptor.TransformFinalBlock(data, 0, data.Length);
|
||||
return Convert.ToBase64String(encData);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 解密
|
||||
/// </summary>
|
||||
/// <param name="cryptograph"></param>
|
||||
/// <param name="accessKey"></param>
|
||||
/// <returns></returns>
|
||||
public static string DecyptData(string? cryptograph, string? accessKey)
|
||||
{
|
||||
if (string.IsNullOrEmpty(cryptograph) || string.IsNullOrEmpty(accessKey))
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
SymmetricAlgorithm des = DES.Create();
|
||||
|
||||
Encoding utf = new UTF8Encoding();
|
||||
byte[] key = utf.GetBytes(accessKey);
|
||||
byte[] iv = { 0x75, 0x70, 0x63, 0x68, 0x69, 0x6e, 0x61, 0x31 };
|
||||
ICryptoTransform decryptor = des.CreateDecryptor(key, iv);
|
||||
byte[] encData = Convert.FromBase64String(cryptograph);
|
||||
byte[] data = decryptor.TransformFinalBlock(encData, 0, encData.Length);
|
||||
return utf.GetString(data);
|
||||
}
|
||||
|
||||
public static string SignData(string ciphertext, string accessKey)
|
||||
{
|
||||
Encoding utf = new UTF8Encoding();
|
||||
HMACMD5 hmac = new(utf.GetBytes(accessKey));
|
||||
byte[] hashValue = hmac.ComputeHash(utf.GetBytes(ciphertext));
|
||||
return Convert.ToBase64String(hashValue);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加密
|
||||
/// </summary>
|
||||
/// <param name="ciphertext"></param>
|
||||
/// <param name="accessKey"></param>
|
||||
/// <param name="iv"></param>
|
||||
/// <returns></returns>
|
||||
public static string EncyptDataNew(string ciphertext, string accessKey, string iv)
|
||||
{
|
||||
SymmetricAlgorithm des = DES.Create();
|
||||
|
||||
Encoding utf = new UTF8Encoding();
|
||||
byte[] key = utf.GetBytes(accessKey);
|
||||
byte[] ivbt = utf.GetBytes(iv);
|
||||
ICryptoTransform encryptor = des.CreateEncryptor(key, ivbt);
|
||||
byte[] data = utf.GetBytes(ciphertext);
|
||||
byte[] encData = encryptor.TransformFinalBlock(data, 0, data.Length);
|
||||
return Convert.ToBase64String(encData);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 解密
|
||||
/// </summary>
|
||||
/// <param name="cryptograph"></param>
|
||||
/// <param name="accessKey"></param>
|
||||
/// <param name="iv"></param>
|
||||
/// <returns></returns>
|
||||
public static string DecyptDataNew(string cryptograph, string accessKey, string iv)
|
||||
{
|
||||
SymmetricAlgorithm des = DES.Create();
|
||||
|
||||
Encoding utf = new UTF8Encoding();
|
||||
byte[] key = utf.GetBytes(accessKey);
|
||||
byte[] ivbt = utf.GetBytes(iv);
|
||||
ICryptoTransform decryptor = des.CreateDecryptor(key, ivbt);
|
||||
byte[] encData = Convert.FromBase64String(cryptograph);
|
||||
byte[] data = decryptor.TransformFinalBlock(encData, 0, encData.Length);
|
||||
return utf.GetString(data);
|
||||
}
|
||||
|
||||
public static string CreateSignEncodingStr(string json, string clientid, string accessKey)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(clientid))
|
||||
{
|
||||
clientid = "UPWEBSITE";
|
||||
}
|
||||
string key = "content={0}&clientid=" + clientid + "&sign={1}";
|
||||
string jiami = EncyptData(json, accessKey);
|
||||
string jiami1 = HttpUtility.UrlEncode(jiami, Encoding.UTF8);
|
||||
string jiasuo = SignData(jiami, accessKey);
|
||||
string jiasuo1 = HttpUtility.UrlEncode(jiasuo, Encoding.UTF8);
|
||||
key = string.Format(key, jiami1, jiasuo1);
|
||||
return key;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Text.Json;
|
||||
using System.Text.Encodings.Web;
|
||||
using System.Text.Unicode;
|
||||
|
||||
namespace SA.Core.Util
|
||||
{
|
||||
public class SerializeHelper
|
||||
{
|
||||
|
||||
public static JsonSerializerOptions jsonSerializerOptions = new JsonSerializerOptions()
|
||||
{
|
||||
Encoder = JavaScriptEncoder.Create(UnicodeRanges.All)
|
||||
};
|
||||
|
||||
|
||||
|
||||
public static string ToJson<T>(T Object)
|
||||
{
|
||||
|
||||
return JsonSerializer.Serialize(Object, jsonSerializerOptions);
|
||||
}
|
||||
|
||||
public static T FromJson<T>(string str)
|
||||
{
|
||||
|
||||
return JsonSerializer.Deserialize<T>(str, jsonSerializerOptions);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
using SA.Core.Init;
|
||||
using SA.Core.Util;
|
||||
using SA.Domain.XFYun.XFYunEntity;
|
||||
using SA.Entity.zxdcrm_Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SA.Domain.XFYun.BaseInfo
|
||||
{
|
||||
|
||||
public class InitAI_CallTaskConfig
|
||||
{
|
||||
private static NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger();
|
||||
|
||||
|
||||
public AI_CallTaskConfig Get_CallTaskConfig()
|
||||
{
|
||||
|
||||
var configstr = InitDB.zxdcrmDb.Queryable<BasParameter>().Where(d => d.PARAKEY.Equals("AI_CallTaskConfig")).Select(d => d.PARAVALUE).First();
|
||||
|
||||
var aI_CallTaskConfig= SerializeHelper.FromJson<AI_CallTaskConfig>(configstr ?? "");
|
||||
|
||||
return aI_CallTaskConfig;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
using SA.Domain.XFYun.XFYunEntity;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SA.Domain.XFYun.BaseInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 初始化配置
|
||||
/// </summary>
|
||||
public class InitConfig
|
||||
{
|
||||
private static readonly object _locker = new Object();
|
||||
private static InitConfig _instance = null;
|
||||
private static NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger();
|
||||
|
||||
/// <summary>
|
||||
/// 单例
|
||||
/// </summary>
|
||||
public static InitConfig Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_instance == null)
|
||||
{
|
||||
lock (_locker)
|
||||
{
|
||||
if (_instance == null)
|
||||
{
|
||||
_instance = new InitConfig();
|
||||
}
|
||||
}
|
||||
}
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
|
||||
private AI_CallTaskConfig aI_CallTaskConfig = new AI_CallTaskConfig();
|
||||
|
||||
/// <summary>
|
||||
/// 重置或初始化
|
||||
/// </summary>
|
||||
public InitConfig()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void Init()
|
||||
{
|
||||
logger.Debug("InitConfig开始初始化");
|
||||
InitAi_Calltaskconfig();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 初始化订单创建外呼任务配置
|
||||
/// </summary>
|
||||
public void InitAi_Calltaskconfig()
|
||||
{
|
||||
InitAI_CallTaskConfig initAI_CallTask = new InitAI_CallTaskConfig();
|
||||
aI_CallTaskConfig = initAI_CallTask.Get_CallTaskConfig();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取订单创建外呼任务配置
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public AI_CallTaskConfig Get_CallTaskConfig()
|
||||
{
|
||||
return aI_CallTaskConfig;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,884 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SA.Entity.zxdcrm_Models;
|
||||
using SA.Core.Init;
|
||||
using SA.Domain.XFYun.XFYunEntity;
|
||||
using System.Collections.Concurrent;
|
||||
using SA.Core.Util;
|
||||
using SA.Domain.XFYun.BaseInfo;
|
||||
using SA.Entity.dbcrm;
|
||||
|
||||
namespace SA.Domain.XFYun
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取订单
|
||||
/// </summary>
|
||||
public class GenOrderCall
|
||||
{
|
||||
private static ConcurrentDictionary<int, WxSzzyorder> wxSzzyorders = new ConcurrentDictionary<int, WxSzzyorder>();
|
||||
|
||||
private static ConcurrentDictionary<int, WxSzzyorder> wxSzzyordersChecking = new ConcurrentDictionary<int, WxSzzyorder>();
|
||||
|
||||
/// <summary>
|
||||
/// 订单查询起始时间
|
||||
/// </summary>
|
||||
public static DateTime? startTime;
|
||||
|
||||
private static AI_CallTaskConfig genOrderCallConfig = GetConfig();
|
||||
|
||||
private static int GetNum = 100;
|
||||
|
||||
private int times = 0;
|
||||
|
||||
/// <summary>
|
||||
/// 获取订单
|
||||
/// </summary>
|
||||
public void GetOrder()
|
||||
{
|
||||
try
|
||||
{
|
||||
//LogHelper.Info("OrderCallConfig: " + SerializeHelper.ToJson(genOrderCallConfig));
|
||||
// 一段时间不跑任务
|
||||
var now = DateTime.Now;
|
||||
if (DateTime.TryParse(genOrderCallConfig.HgrecordStime, out DateTime stime)
|
||||
&& DateTime.TryParse(genOrderCallConfig.HgrecordEtime, out DateTime etime))
|
||||
{
|
||||
if (now.TimeOfDay < stime.TimeOfDay || now.TimeOfDay > etime.TimeOfDay)
|
||||
{
|
||||
LogHelper.Info($"GetOrder Sleep:stime:{stime},etime:{etime},当前:{now.TimeOfDay}");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
times++;
|
||||
List<int> status = new List<int> { 0, 6 };
|
||||
status.AddRange(genOrderCallConfig.ReCallStatus);
|
||||
|
||||
if (times % 2 != 1) status = new List<int> { 0 };
|
||||
var calltime = DateTime.Now.AddDays(-genOrderCallConfig.CallDay);
|
||||
if (!startTime.HasValue) startTime = genOrderCallConfig.StartTime;
|
||||
startTime = startTime < calltime ? calltime : startTime;
|
||||
var orderlist = InitDB.zxdcrmDb.Queryable<WxSzzyorder>()
|
||||
// .Select(d=>new WxSzzyorder { Orderid = d.Orderid,Cname=d.Cname,Idcard=d.Idcard,Subproductname=d.Subproductname,Subproductid=d.Subproductid,Arrivalpay=d.Arrivalpay, Opendays=d.Opendays,Giftdays=d.Giftdays,Giftdays2=d.Giftdays2, Resid = d.Resid, Ctime = d.Ctime, Channel = d.Channel, Contractctime = d.Contractctime,AiHgrecordStime=d.AiHgrecordStime,AiHgrecordEtime=d.AiHgrecordEtime })
|
||||
.Where(d => d.Orderstatus!.Equals("200") && status.Contains(d.AiHgrecordStatus.Value))
|
||||
.Where(d => d.Contractctime >= startTime)
|
||||
.Where(d => d.Idcard != null)
|
||||
.Where(d => d.Hashgrecord == null || d.Hashgrecord != 1) //判断是否已经进行过合规
|
||||
//.Where(d=>d.Orderid== 81118603)
|
||||
.OrderBy(d => d.Orderid).Take(GetNum).ToList();
|
||||
//测试
|
||||
//orderlist = InitDB.zxdcrmDb.Queryable<WxSzzyorder>().Where(n => n.Orderid == 80338991).ToList();
|
||||
|
||||
if (orderlist.Count < GetNum) GetNum = GetNum <= 20 ? GetNum : GetNum - 20;
|
||||
if (orderlist.Count >= GetNum) GetNum = GetNum >= 500 ? GetNum : GetNum + 100;
|
||||
|
||||
var filterCodes = orderlist.Select(n => n.Productcode).Distinct().ToList();
|
||||
var basProduct = InitDB.dbcrmDb.Queryable<TProduct>().Where(n => filterCodes.Contains(n.id)).ToList();
|
||||
var basPackage = InitDB.dbcrmDb.Queryable<TPackageProduct>().Where(n => filterCodes.Contains(n.id)).ToList();
|
||||
var updatenum = 0;
|
||||
foreach (var item in orderlist)
|
||||
{
|
||||
var product = basProduct.FirstOrDefault(n => n.id == item.Productcode);
|
||||
if (product != null)
|
||||
{
|
||||
if (genOrderCallConfig.IgnoreProductType.Contains(product.groupid))
|
||||
{
|
||||
LogHelper.Info($"IgnoreProductType: 订单【{item.Orderid}】产品类型为{product.groupid}忽略不外呼");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var package = basPackage.FirstOrDefault(n => n.id == item.Productcode);
|
||||
if (package != null && genOrderCallConfig.IgnoreProductType.Contains(package.groupid))
|
||||
{
|
||||
LogHelper.Info($"IgnoreProductType: 订单【{item.Orderid}】产品类型为{product.groupid}忽略不外呼");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
WxSzzyorder wxSzzyorder;
|
||||
if (wxSzzyorders.TryRemove(item.Orderid, out wxSzzyorder))
|
||||
{
|
||||
wxSzzyorders.TryAdd(item.Orderid, item);
|
||||
updatenum++;
|
||||
}
|
||||
else
|
||||
{
|
||||
//处理时加入处理列表,处理列表有的时候暂不加入待处理列表
|
||||
if (!wxSzzyordersChecking.ContainsKey(item.Orderid))
|
||||
{
|
||||
wxSzzyorders.TryAdd(item.Orderid, item);
|
||||
}
|
||||
}
|
||||
}
|
||||
LogHelper.Info($"查询数据times:{times}次,status={SerializeHelper.ToJson(status)}数据:{orderlist.Count},当前待处理列表:{wxSzzyorders.Count},正在处理列表:{wxSzzyordersChecking.Count},更新数据:{updatenum};");
|
||||
CheckOrderList();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Error($"查询数据错误!{ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 检查列表
|
||||
/// </summary>
|
||||
public void CheckOrderList()
|
||||
{
|
||||
var sameuserlist = wxSzzyorders.Values.GroupBy(d => new { d.Resid }, d => d);
|
||||
LogHelper.Info($"检查订单数量:【{wxSzzyorders.Count}】相同用户数量:【{sameuserlist.Count()}】");
|
||||
foreach (var item in sameuserlist)
|
||||
{
|
||||
var resid = item.Key.Resid!.ToString();
|
||||
var wxSzzyorderslist = item.ToList();
|
||||
LogHelper.Info($"开始检查用户:【{resid}】满足条件订单【{string.Join(",", wxSzzyorderslist.Select(n => n.Orderid))}】");
|
||||
//同人有未完成订单且未超时的不处理
|
||||
if (CheckOrderSameUserNotFinish(resid, wxSzzyorderslist))
|
||||
{
|
||||
wxSzzyorderslist.ForEach(d =>
|
||||
{
|
||||
WxSzzyorder wxSzzyorder;
|
||||
wxSzzyorders.TryRemove(d.Orderid, out wxSzzyorder);
|
||||
});
|
||||
continue;
|
||||
}
|
||||
|
||||
var checklist = new List<WxSzzyorder>();
|
||||
foreach (var wxSzzyorderitem in wxSzzyorderslist)
|
||||
{
|
||||
LogHelper.Info($"开始检查订单:【{wxSzzyorderitem.Orderid}】");
|
||||
WxSzzyorder wxSzzyorder;
|
||||
|
||||
//加入正在处理列表
|
||||
wxSzzyordersChecking.TryAdd(wxSzzyorderitem.Orderid, wxSzzyorderitem);
|
||||
if (wxSzzyorders.TryRemove(wxSzzyorderitem.Orderid, out wxSzzyorder))
|
||||
{
|
||||
if (CheckOrderFail(wxSzzyorder) && !CheckOrderIgnore(wxSzzyorder))
|
||||
{
|
||||
//忽略的不处理
|
||||
checklist.Add(wxSzzyorder);
|
||||
}
|
||||
}
|
||||
}
|
||||
//处理
|
||||
if (checklist.Count > 0)
|
||||
{
|
||||
CheckOrder(checklist);
|
||||
}
|
||||
//取出正在处理列表
|
||||
wxSzzyorderslist.ForEach(d =>
|
||||
{
|
||||
WxSzzyorder wxSzzyorder;
|
||||
wxSzzyordersChecking.TryRemove(d.Orderid, out wxSzzyorder);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 检查同人,若同人有一定时间内的未完成订单,将不处理,等待完成。
|
||||
/// </summary>
|
||||
/// <param name="resid"></param>
|
||||
/// <param name="wxSzzyorders"></param>
|
||||
/// <returns></returns>
|
||||
public static bool CheckOrderSameUserNotFinish(string resid, List<WxSzzyorder> wxSzzyorders)
|
||||
{
|
||||
var orderlist = wxSzzyorders.Select(d => d.Orderid).ToList();
|
||||
//四种状态
|
||||
List<int> status = new List<int> { 0, 6 };
|
||||
status.AddRange(genOrderCallConfig.ReCallStatus);
|
||||
//查看一下是否有当天已支付 未合规 且未签合同的 其他单
|
||||
var sevenDay = DateTime.Now.Date.AddDays(-7);
|
||||
var wlist = InitDB.zxdcrmDb.Queryable<WxSzzyorder>().Where(d => d.Resid == resid && d.Ctime >= sevenDay)
|
||||
.Where(d => status.Contains(d.AiHgrecordStatus.Value))
|
||||
.Where(d => d.Hashgrecord == null || d.Hashgrecord != 1)
|
||||
.Where(d => !orderlist.Contains(d.Orderid)).ToList();
|
||||
//查看一下是否有当天已支付 或者 已提交支付 未签合同的 其他单
|
||||
List<string> waitStatus = new List<string> { "200", "190" };
|
||||
var hasPayList = wlist.Where(d => waitStatus.Contains(d.Orderstatus)).ToList();
|
||||
if (hasPayList.Count > 0)
|
||||
{
|
||||
LogHelper.Info($"检查相同用户:【{resid}】,正在等待已支付单【{string.Join(",", hasPayList.Select(n => n.Orderid).ToList())}】");
|
||||
return true;
|
||||
}
|
||||
var noPayList = wlist.Where(d => !waitStatus.Contains(d.Orderstatus) && d.Ctime >= DateTime.Now.Date).ToList();
|
||||
if (noPayList.Count > 0)
|
||||
{
|
||||
var maxTime = wxSzzyorders.Select(d => d.Contractctime).Max();
|
||||
var timespan = DateTime.Now - maxTime;
|
||||
if (timespan.HasValue && timespan.Value.Minutes < genOrderCallConfig.SameUserCheckTimeSpanMin)
|
||||
{
|
||||
LogHelper.Info($"检查相同用户:{resid},合同最大签订时间:{maxTime},有未支付订单【{string.Join(",", noPayList.Select(n => n.Orderid))}】,需等待时间:{genOrderCallConfig.SameUserCheckTimeSpanMin},已等待【{timespan.Value.Minutes}分钟】");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 检查订单
|
||||
/// </summary>
|
||||
/// <param name="wxSzzyorders">订单列表</param>
|
||||
|
||||
public static void CheckOrder(List<WxSzzyorder> wxSzzyorders)
|
||||
{
|
||||
LogHelper.Info($"开始处理:resid:{wxSzzyorders.First().Resid},订单号【{string.Join(",", wxSzzyorders.Select(n => n.Orderid))}】");
|
||||
var oldTaskList = InitDB.zxdcrmDb.Queryable<CsvrAiCalltaskOrders>()
|
||||
.Where(d => wxSzzyorders.Select(n => n.Orderid).ToList().Contains(d.Orderid.Value)).ToList();
|
||||
try
|
||||
{
|
||||
CsvrAiCalltask csvrAiCalltask = GetCsvrAiCalltaskFromConfig(wxSzzyorders.First());
|
||||
csvrAiCalltask.Resid = wxSzzyorders.First().Resid;
|
||||
csvrAiCalltask.Props = GetPropos(wxSzzyorders);
|
||||
csvrAiCalltask.Status = 0;
|
||||
csvrAiCalltask.Ctime = DateTime.Now;
|
||||
csvrAiCalltask.AiHgrecordStatus = 1;
|
||||
if (oldTaskList.Count > 0)
|
||||
{
|
||||
csvrAiCalltask.HasCall = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
//等待重播不需要修改状态为 等待AI外呼
|
||||
wxSzzyorders.ForEach(d =>
|
||||
{
|
||||
d.AiHgrecordStatus = 1;
|
||||
});
|
||||
}
|
||||
|
||||
var csvrAiCalltaskOrders = GetCsvrAiCalltaskOrders(wxSzzyorders);
|
||||
LogHelper.Info($"Props:{csvrAiCalltask.Props}");
|
||||
CreatCsvrAiCalltask(wxSzzyorders, csvrAiCalltask, csvrAiCalltaskOrders);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Error($"resid:{wxSzzyorders.First().Resid}处理失败,orderid:{SerializeHelper.ToJson(wxSzzyorders.Select(d => d.Orderid).ToList())},{ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
private static List<CsvrAiCalltaskOrders> GetCsvrAiCalltaskOrders(List<WxSzzyorder> wxSzzyorders)
|
||||
{
|
||||
List<CsvrAiCalltaskOrders> csvrAiCalltaskOrders = new List<CsvrAiCalltaskOrders>();
|
||||
foreach (var item in wxSzzyorders)
|
||||
{
|
||||
LogHelper.Info($"Orderid:{item.Orderid},AiHgrecordStatus:{item.AiHgrecordStatus}");
|
||||
csvrAiCalltaskOrders.Add(new CsvrAiCalltaskOrders
|
||||
{
|
||||
Orderid = item.Orderid,
|
||||
Subproductname = item.Subproductname,
|
||||
Cname = item.Cname,
|
||||
Idcard = item.Idcard
|
||||
});
|
||||
}
|
||||
return csvrAiCalltaskOrders;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 创建任务
|
||||
/// </summary>
|
||||
/// <param name="wxSzzyorders"></param>
|
||||
/// <param name="csvrAiCalltask"></param>
|
||||
/// <param name="csvrAiCalltaskOrders"></param>
|
||||
public static void CreatCsvrAiCalltask(List<WxSzzyorder> wxSzzyorders, CsvrAiCalltask csvrAiCalltask, List<CsvrAiCalltaskOrders> csvrAiCalltaskOrders)
|
||||
{
|
||||
try
|
||||
{
|
||||
InitDB.zxdcrmDb.Ado.BeginTran();
|
||||
|
||||
InitDB.zxdcrmDb.Updateable(wxSzzyorders).UpdateColumns(d => new { d.AiHgrecordStatus, d.AiHgrecordStatusname }).ExecuteCommand();
|
||||
var id = InitDB.zxdcrmDb.Insertable(csvrAiCalltask).ExecuteReturnIdentity();
|
||||
|
||||
foreach (var item in csvrAiCalltaskOrders)
|
||||
{
|
||||
item.Taskid = id;
|
||||
}
|
||||
InitDB.zxdcrmDb.Insertable(csvrAiCalltaskOrders).ExecuteCommand();
|
||||
|
||||
InitDB.zxdcrmDb.Ado.CommitTran();
|
||||
LogHelper.Info($"CreatCsvrAiCalltask:{csvrAiCalltask.Resid},Exetime:{csvrAiCalltask.Exetime}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
InitDB.zxdcrmDb.Ado.RollbackTran();
|
||||
LogHelper.Error($"orderid:{SerializeHelper.ToJson(wxSzzyorders.Select(d => d.Orderid))}", ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// "姓氏":"郭",
|
||||
/// "先生/女士":"先生",
|
||||
/// "姓名":"郭立兴",
|
||||
/// "身份证后6位":"310911",
|
||||
/// "产品确认":"智赢系列"
|
||||
/// </summary>
|
||||
/// <param name="wxSzzyorders"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetPropos(List<WxSzzyorder> wxSzzyorders)
|
||||
{
|
||||
var wxSzzyorder = wxSzzyorders.First();
|
||||
Dictionary<string, string> Proposkv = new Dictionary<string, string>();
|
||||
Proposkv.Add("【姓氏】", wxSzzyorder.Cname!.Substring(0, 1));
|
||||
var cardnum = 1;
|
||||
if (wxSzzyorder.Idcard!.Length == 18) cardnum = int.Parse(wxSzzyorder.Idcard.Substring(16, 1));
|
||||
Proposkv.Add("【先生/女士】", cardnum % 2 == 1 ? "先生" : "女士");
|
||||
Proposkv.Add("【姓名】", wxSzzyorder.Cname);
|
||||
Proposkv.Add("【身份证后4位】", wxSzzyorder.Idcard.Substring(wxSzzyorder.Idcard.Length - 4, 4));
|
||||
|
||||
var productConfir = "";
|
||||
|
||||
if (wxSzzyorders.Count == 1)
|
||||
{
|
||||
var subproductname = genOrderCallConfig.proposProductConfig.Subproductname.Replace("#Subproductname", wxSzzyorder.Subproductname);
|
||||
productConfir = genOrderCallConfig.proposProductConfig.OneTemplate
|
||||
.Replace("@Subproductname", subproductname)
|
||||
.Replace("#Arrivalpay", PriceToCn(wxSzzyorder.Arrivalpay.Value));
|
||||
var payexp = "";
|
||||
if (wxSzzyorder.Opendays > 1)
|
||||
{
|
||||
payexp = genOrderCallConfig.proposProductConfig.PayExp.Replace("@Subproductname", "")
|
||||
.Replace("#OpenDays", toHanStr(wxSzzyorder.Opendays.ToString()));
|
||||
var gift = "";
|
||||
var giftday = 0;
|
||||
if (wxSzzyorder.Giftdays.HasValue) giftday += wxSzzyorder.Giftdays.Value;
|
||||
if (wxSzzyorder.Giftdays2.HasValue) giftday += wxSzzyorder.Giftdays2.Value;
|
||||
if (giftday > 0)
|
||||
{
|
||||
gift = genOrderCallConfig.proposProductConfig.GiftExp.Replace("#GiftDays", toHanStr(giftday.ToString()));
|
||||
gift = gift.Replace("#OpenDays", toHanStr((wxSzzyorder.Opendays + giftday).ToString()));
|
||||
}
|
||||
payexp = payexp.Replace("@GiftExp", gift);
|
||||
}
|
||||
productConfir = productConfir.Replace("@PayExp", payexp);
|
||||
if (payexp.Equals("")) productConfir = productConfir.Replace(",,", ",");
|
||||
}
|
||||
else
|
||||
{
|
||||
var subproductnames = "";
|
||||
var payexps = "";
|
||||
foreach (var item in wxSzzyorders.GroupBy(d => d.Subproductname, d => d).ToList())
|
||||
{
|
||||
var subproductname = genOrderCallConfig.proposProductConfig.Subproductname.Replace("#Subproductname", item.Key);
|
||||
|
||||
subproductnames += subproductname + "和";
|
||||
if (item.Sum(d => d.Opendays) == item.Count()) continue;
|
||||
var payexp = genOrderCallConfig.proposProductConfig.PayExp.Replace("@Subproductname", subproductname)
|
||||
.Replace("#OpenDays", toHanStr(item.Sum(d => d.Opendays).ToString()));
|
||||
var gift = "";
|
||||
var giftday = 0;
|
||||
foreach (var subwxSzzyorderitem in item)
|
||||
{
|
||||
if (subwxSzzyorderitem.Giftdays.HasValue) giftday += subwxSzzyorderitem.Giftdays.Value;
|
||||
if (subwxSzzyorderitem.Giftdays2.HasValue) giftday += subwxSzzyorderitem.Giftdays2.Value;
|
||||
}
|
||||
if (giftday > 0)
|
||||
{
|
||||
gift = genOrderCallConfig.proposProductConfig.GiftExp.Replace("#GiftDays", toHanStr(giftday.ToString()));
|
||||
gift = gift.Replace("#OpenDays", toHanStr((item.Sum(d => d.Opendays) + giftday).ToString()));
|
||||
}
|
||||
payexp = payexp.Replace("@GiftExp", gift);
|
||||
|
||||
payexps += payexp;
|
||||
}
|
||||
subproductnames = subproductnames.Substring(0, subproductnames.Length - 1);
|
||||
if (payexps.Length > 1) payexps = payexps.Substring(0, payexps.Length - 1);
|
||||
productConfir = genOrderCallConfig.proposProductConfig.MultipleTemplate
|
||||
.Replace("@Subproductname", subproductnames)
|
||||
.Replace("@PayExp", payexps)
|
||||
.Replace("#Arrivalpay", PriceToCn(wxSzzyorders.Sum(d => d.Arrivalpay).Value));
|
||||
}
|
||||
|
||||
Proposkv.Add("【产品确认】", productConfir);
|
||||
var result = SerializeHelper.ToJson(Proposkv);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 金额数字转大写(带小数点)
|
||||
/// </summary>
|
||||
public static string PriceToCn(decimal price)
|
||||
{
|
||||
//数字转大写
|
||||
string[] n = { "零", "一", "二", "三", "四", "五", "六", "七", "八", "九" };
|
||||
string[] d = { "", "分", "角", "元", "拾", "佰", "仟", "万", "拾", "佰", "仟", "亿" };
|
||||
|
||||
//不同位置的数字要加单位
|
||||
List<string> needReplace = new List<string> { "零拾", "零佰", "零仟", "零万", "零亿", "亿万", "零元", "零零", "零角", "零分" };
|
||||
List<string> afterReplace = new List<string> { "零", "零", "零", "万", "亿", "亿", "元", "零", "零", "" };
|
||||
|
||||
string e = price % 1 == 0 ? "整" : ""; //金额是整数,加一个“整”结尾
|
||||
string re = "";
|
||||
int a = (int)(price * 100);
|
||||
int k = 1;
|
||||
while (a != 0)
|
||||
{
|
||||
//初步转换大小写
|
||||
re = n[a % 10] + d[k] + re;
|
||||
a = a / 10;
|
||||
k = k < 11 ? k + 1 : 4;
|
||||
}
|
||||
|
||||
string need = needReplace.Where(tb => re.Contains(tb)).FirstOrDefault<string>();
|
||||
while (need != null)
|
||||
{
|
||||
int i = needReplace.IndexOf(need);
|
||||
re = re.Replace(needReplace[i], afterReplace[i]);
|
||||
need = needReplace.Where(tb => re.Contains(tb)).FirstOrDefault<string>();
|
||||
}//循环排除特殊情况
|
||||
// re = re == "" ? "零元" : re + e;
|
||||
re = re == "" ? "零元" : re;
|
||||
return re;
|
||||
}
|
||||
|
||||
public static string toHanStr(String numStr)
|
||||
{
|
||||
var price = Convert.ToDecimal(numStr);
|
||||
//数字转大写
|
||||
string[] n = { "零", "一", "二", "三", "四", "五", "六", "七", "八", "九" };
|
||||
string[] d = { "", "分", "角", "元", "拾", "佰", "仟", "万", "拾", "佰", "仟", "亿" };
|
||||
|
||||
//不同位置的数字要加单位
|
||||
List<string> needReplace = new List<string> { "零拾", "零佰", "零仟", "零万", "零亿", "亿万", "零元", "零零", "零角", "零分" };
|
||||
List<string> afterReplace = new List<string> { "零", "零", "零", "万", "亿", "亿", "元", "零", "零", "" };
|
||||
|
||||
string e = price % 1 == 0 ? "整" : ""; //金额是整数,加一个“整”结尾
|
||||
string re = "";
|
||||
int a = (int)(price * 100);
|
||||
int k = 1;
|
||||
while (a != 0)
|
||||
{
|
||||
//初步转换大小写
|
||||
re = n[a % 10] + d[k] + re;
|
||||
a = a / 10;
|
||||
k = k < 11 ? k + 1 : 4;
|
||||
}
|
||||
|
||||
string need = needReplace.Where(tb => re.Contains(tb)).FirstOrDefault<string>();
|
||||
while (need != null)
|
||||
{
|
||||
int i = needReplace.IndexOf(need);
|
||||
re = re.Replace(needReplace[i], afterReplace[i]);
|
||||
need = needReplace.Where(tb => re.Contains(tb)).FirstOrDefault<string>();
|
||||
}//循环排除特殊情况
|
||||
// re = re == "" ? "零元" : re + e;
|
||||
re = re == "" ? "零" : re.Replace("元", "");
|
||||
return re;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取任务
|
||||
/// </summary>
|
||||
/// <param name="wxSzzyorder"></param>
|
||||
/// <returns></returns>
|
||||
public static CsvrAiCalltask GetCsvrAiCalltaskFromConfig(WxSzzyorder wxSzzyorder)
|
||||
{
|
||||
CsvrAiCalltask csvrAiCalltask = new CsvrAiCalltask();
|
||||
csvrAiCalltask.Robot = genOrderCallConfig.Robot;
|
||||
csvrAiCalltask.AppId = genOrderCallConfig.AppId;
|
||||
csvrAiCalltask.CallNo = genOrderCallConfig.CallNo;
|
||||
|
||||
csvrAiCalltask.Sms = genOrderCallConfig.Sms;
|
||||
DateTime now = DateTime.Now;
|
||||
var expmin = genOrderCallConfig.SmsExprieMinCall;
|
||||
csvrAiCalltask.Smstime = now;
|
||||
csvrAiCalltask.Exetime = now.AddMinutes(expmin);
|
||||
|
||||
//优先级别1-紧急 2-优先
|
||||
csvrAiCalltask.Priority = genOrderCallConfig.Priority;
|
||||
|
||||
return csvrAiCalltask;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 失败订单重试//true 重试
|
||||
/// </summary>
|
||||
/// <param name="wxSzzyorder"></param>
|
||||
/// <returns></returns>
|
||||
public static bool CheckOrderFail(WxSzzyorder wxSzzyorder)
|
||||
{
|
||||
var aihgrecoedStatus = wxSzzyorder.AiHgrecordStatus!.Value;
|
||||
var now = DateTime.Now;
|
||||
var ReCallMin = genOrderCallConfig.ReCallMins;
|
||||
var ReCallStatus = genOrderCallConfig.ReCallStatus;
|
||||
if (ReCallStatus.Contains(aihgrecoedStatus) || aihgrecoedStatus == 6)
|
||||
{
|
||||
var taskids = InitDB.zxdcrmDb.Queryable<CsvrAiCalltaskOrders>().Where(d => d.Orderid == wxSzzyorder.Orderid).OrderByDescending(d => d.Taskid).Select(d => d.Taskid).ToList();
|
||||
if (taskids == null || taskids.Count == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
var logInfo = $"检查订单重试:【{wxSzzyorder.Orderid}】,状态:【{wxSzzyorder.AiHgrecordStatusname}】任务Id【{SerializeHelper.ToJson(taskids)}】";
|
||||
LogHelper.Info($"{logInfo}");
|
||||
var maxid = taskids.Max(d => d.Value);
|
||||
var exectime = InitDB.zxdcrmDb.Queryable<CsvrAiCalltask>().Where(d => d.Id == maxid).OrderByDescending(d => d.Id).Select(d => d.Exetime).First();
|
||||
var min = 0;
|
||||
if (taskids.Count() > ReCallMin.Count)
|
||||
{
|
||||
LogHelper.Info($"{logInfo}超过最大重试次数【{ReCallMin.Count}】,忽略。");
|
||||
//wxSzzyorder.AiHgrecordStatus = -2;
|
||||
//InitDB.zxdcrmDb.Updateable(wxSzzyorder).UpdateColumns(d => new { d.AiHgrecordStatus, d.AiHgrecordStatusname }).ExecuteCommand();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
min = ReCallMin[taskids.Count() - 1];
|
||||
}
|
||||
var difmin = now - exectime!.Value;
|
||||
|
||||
// 如果在固定时间内的话直接重试
|
||||
DateTime stime;
|
||||
DateTime etime;
|
||||
if (DateTime.TryParse(wxSzzyorder.AiHgrecordStime, out stime) && DateTime.TryParse(wxSzzyorder.AiHgrecordEtime, out etime))
|
||||
{
|
||||
if (now.TimeOfDay >= stime.TimeOfDay && now.TimeOfDay <= etime.TimeOfDay)
|
||||
{
|
||||
LogHelper.Info($"{logInfo}: 设置间隔【{stime}-{etime}】当前:{now.TimeOfDay},上次执行时间:{exectime!.Value},开始重试!");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (difmin.TotalMinutes > min)
|
||||
{
|
||||
LogHelper.Info($"{logInfo}exectime:{exectime!.Value},开始重试!");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (ReCallStatus.Contains(aihgrecoedStatus))
|
||||
{
|
||||
LogHelper.Info($"{logInfo},修改为等待重拨");
|
||||
wxSzzyorder.AiHgrecordStatus = 6;
|
||||
InitDB.zxdcrmDb.Updateable(wxSzzyorder).UpdateColumns(d => new { d.AiHgrecordStatus, d.AiHgrecordStatusname }).ExecuteCommand();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 检查是否忽略,忽略更新Ai_hgrecord_status=4
|
||||
/// </summary>
|
||||
/// <param name="wxSzzyorder"></param>
|
||||
/// <returns></returns>
|
||||
public bool CheckOrderIgnore(WxSzzyorder wxSzzyorder)
|
||||
{
|
||||
bool Ignore = false;
|
||||
var now = DateTime.Now;
|
||||
//小于最小订单金额
|
||||
if (wxSzzyorder.Arrivalpay < genOrderCallConfig.MinAmount && !genOrderCallConfig.WhiteList.Contains(wxSzzyorder.Resid))
|
||||
{
|
||||
LogHelper.Info($"订单【{wxSzzyorder.Orderid}】金额【{wxSzzyorder.Arrivalpay}】小于外呼设置金额【{genOrderCallConfig.MinAmount}】跳过");
|
||||
Ignore = true;
|
||||
}
|
||||
|
||||
//忽略本次,不更新字段
|
||||
DateTime stime;
|
||||
DateTime etime;
|
||||
if (DateTime.TryParse(wxSzzyorder.AiHgrecordStime, out stime) && DateTime.TryParse(wxSzzyorder.AiHgrecordEtime, out etime))
|
||||
{
|
||||
if (now.TimeOfDay < stime.TimeOfDay || now.TimeOfDay > etime.TimeOfDay)
|
||||
{
|
||||
LogHelper.Info($"订单【{wxSzzyorder.Orderid}回访时间【{wxSzzyorder.AiHgrecordStime}-{wxSzzyorder.AiHgrecordEtime}】不在范围之内当前时间:{now.TimeOfDay}");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!Ignore)
|
||||
{
|
||||
if (genOrderCallConfig.IgnoreHitConfigs != null)
|
||||
{
|
||||
foreach (var hitConfig in genOrderCallConfig.IgnoreHitConfigs)
|
||||
{
|
||||
//检查渠道
|
||||
if (HitKey.Channel.ToString().Equals(hitConfig.HitKey))
|
||||
{
|
||||
//包含
|
||||
if (hitConfig.Contain != null && hitConfig.Contain.Count > 0)
|
||||
{
|
||||
foreach (var item in hitConfig.Contain)
|
||||
{
|
||||
var channelitem = GetChannelItem(item);
|
||||
if (wxSzzyorder.Channel >= channelitem.Min && wxSzzyorder.Channel <= channelitem.Max)
|
||||
{
|
||||
LogHelper.Info($"Ignore,hitConfig.Contain:Channel:{wxSzzyorder.Channel},Min:{channelitem.Min},Max:{channelitem.Max}");
|
||||
Ignore = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Ignore = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
//不包含,结果会被不包含覆盖,不包含优先级更高
|
||||
if (hitConfig.NoContain != null && hitConfig.NoContain.Count > 0)
|
||||
{
|
||||
foreach (var item in hitConfig.NoContain)
|
||||
{
|
||||
var channelitem = GetChannelItem(item);
|
||||
if (wxSzzyorder.Channel < channelitem.Min || wxSzzyorder.Channel > channelitem.Max)
|
||||
{
|
||||
LogHelper.Info($"Ignore,resid: {wxSzzyorder.Resid}, orderid: {wxSzzyorder.Orderid}, hitConfig.NoContain:Channel:{wxSzzyorder.Channel},Min:{channelitem.Min},Max:{channelitem.Max}");
|
||||
Ignore = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Ignore = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//检查产品Id
|
||||
if (HitKey.Subproductid.ToString().Equals(hitConfig.HitKey) && !Ignore)
|
||||
{ //包含
|
||||
if (hitConfig.Contain != null && hitConfig.Contain.Count > 0)
|
||||
{
|
||||
if (hitConfig.Contain.Contains(wxSzzyorder.Subproductid!.Value.ToString()))
|
||||
{
|
||||
LogHelper.Info($"Ignore,resid: {wxSzzyorder.Resid}, orderid: {wxSzzyorder.Orderid}, hitConfig.Contain:Subproductid:{wxSzzyorder.Subproductid.ToString()}");
|
||||
Ignore = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Ignore = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
//不包含,结果会被不包含覆盖,不包含优先级更高
|
||||
if (hitConfig.NoContain != null && hitConfig.NoContain.Count > 0)
|
||||
{
|
||||
if (!hitConfig.NoContain.Contains(wxSzzyorder.Subproductid!.Value.ToString()))
|
||||
{
|
||||
LogHelper.Info($"Ignore,resid: {wxSzzyorder.Resid}, orderid: {wxSzzyorder.Orderid}, hitConfig.NoContain:Subproductid:{wxSzzyorder.Subproductid.ToString()}");
|
||||
Ignore = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Ignore = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
//检查Resid
|
||||
if (HitKey.Resid.ToString().Equals(hitConfig.HitKey) && !Ignore)
|
||||
{ //包含
|
||||
if (hitConfig.Contain != null && hitConfig.Contain.Count > 0)
|
||||
{
|
||||
if (hitConfig.Contain.Contains(wxSzzyorder.Resid!.ToString()))
|
||||
{
|
||||
LogHelper.Info($"Ignore,resid: {wxSzzyorder.Resid}, orderid: {wxSzzyorder.Orderid}, hitConfig.Contain:Resid:{wxSzzyorder.Resid!.ToString()}");
|
||||
Ignore = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Ignore = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
//不包含,结果会被不包含覆盖,不包含优先级更高
|
||||
if (hitConfig.NoContain != null && hitConfig.NoContain.Count > 0)
|
||||
{
|
||||
if (!hitConfig.NoContain.Contains(wxSzzyorder.Resid!.ToString()))
|
||||
{
|
||||
LogHelper.Info($"Ignore,resid: {wxSzzyorder.Resid}, orderid: {wxSzzyorder.Orderid}, hitConfig.NoContain:Resid:{wxSzzyorder.Resid!.ToString()}");
|
||||
Ignore = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Ignore = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!Ignore)
|
||||
{
|
||||
//检查产品是否为不需要风控的自动开通产品
|
||||
var subproduct = InitDB.zxdcrmDb.Queryable<WxSzzysubproduct>().Where(d => d.Subproductid == wxSzzyorder.Subproductid).First();
|
||||
//如果不需要ai回访 则忽略
|
||||
if (subproduct.NeedAi == 0)
|
||||
{
|
||||
LogHelper.Info($"Ignore,resid: {wxSzzyorder.Resid}, orderid: {wxSzzyorder.Orderid}, NeedAi:subproduct:{wxSzzyorder.Subproductid!.ToString()}");
|
||||
Ignore = true;
|
||||
}
|
||||
/* if (subproduct != null && subproduct.AutomaticOpen == 1 && subproduct.NeedFK == 0)
|
||||
{
|
||||
LogHelper.Info($"Ignore,resid: {wxSzzyorder.Resid}, orderid: {wxSzzyorder.Orderid}, NotNeedFK:subproduct:{wxSzzyorder.Subproductid!.ToString()}");
|
||||
Ignore = true;
|
||||
}*/
|
||||
}
|
||||
|
||||
if (Ignore)
|
||||
{
|
||||
wxSzzyorder.AiHgrecordStatus = -1;
|
||||
LogHelper.Info($"Ignore,resid: {wxSzzyorder.Resid}, orderid: {wxSzzyorder.Orderid}, -1");
|
||||
// wxSzzyorder.Ai_hgrecord_statusname = Ai_hgrecord_statusnameKV[wxSzzyorder.Ai_hgrecord_status];
|
||||
InitDB.zxdcrmDb.Updateable(wxSzzyorder).UpdateColumns(d => new { d.AiHgrecordStatus, d.AiHgrecordStatusname }).ExecuteCommand();
|
||||
}
|
||||
|
||||
return Ignore;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取channelItem
|
||||
/// </summary>
|
||||
/// <param name="ChannelStr"></param>
|
||||
/// <returns></returns>
|
||||
public static ChannelItem GetChannelItem(string ChannelStr)
|
||||
{
|
||||
ChannelItem channelItem = new ChannelItem { Max = 0, Min = 0 };
|
||||
try
|
||||
{
|
||||
int min = 0;
|
||||
int max = 0;
|
||||
var c = ChannelStr.Split('|');
|
||||
int.TryParse(c[0], out min);
|
||||
int.TryParse(c[1], out max);
|
||||
channelItem.Max = max;
|
||||
channelItem.Min = min;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Error($"ChannelStr:{ChannelStr}格式异常", ex);
|
||||
return channelItem;
|
||||
}
|
||||
return channelItem;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取配置
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="Exception"></exception>
|
||||
public static AI_CallTaskConfig GetConfig()
|
||||
{
|
||||
try
|
||||
{
|
||||
var test = new AI_CallTaskConfig();
|
||||
test.IgnoreHitConfigs.Add(new HitConfig());
|
||||
var s = SerializeHelper.ToJson(test);
|
||||
InitConfig initConfig = new InitConfig();
|
||||
|
||||
genOrderCallConfig = initConfig.Get_CallTaskConfig();
|
||||
|
||||
if (string.IsNullOrEmpty(genOrderCallConfig.AppId))
|
||||
{
|
||||
var errmsg = "获取AI_CallTaskConfig失败:AppId 为空!";
|
||||
LogHelper.Error(errmsg);
|
||||
throw new Exception(errmsg);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Error(ex, "AI_CallTaskConfig,配置出错");
|
||||
}
|
||||
|
||||
return genOrderCallConfig;
|
||||
}
|
||||
|
||||
#region 测试方法
|
||||
|
||||
public static AI_CallTaskConfig RefreshConfig()
|
||||
{
|
||||
genOrderCallConfig = GetConfig();
|
||||
return genOrderCallConfig;
|
||||
}
|
||||
|
||||
public string BuildProposTest(List<decimal> orderids)
|
||||
{
|
||||
var orderList = InitDB.zxdcrmDb.Queryable<WxSzzyorder>().Where(n => orderids.Contains(n.Orderid)).ToList();
|
||||
var res = GetPropos(orderList);
|
||||
return res;
|
||||
}
|
||||
|
||||
#endregion 测试方法
|
||||
|
||||
/// <summary>
|
||||
/// 人工手动拨打AI回访
|
||||
/// </summary>
|
||||
/// <param name="resid"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> CreatAiOrder(string? resid)
|
||||
{
|
||||
if (resid == null)
|
||||
{
|
||||
return "resid不能为空!";
|
||||
}
|
||||
LogHelper.Info($"开始处理:resid:{resid}, 人工手动拨打AI回访!");
|
||||
List<int> status = new List<int> { 0, 6 };
|
||||
var aiHgrecordStatus = new List<int> { -2, 3, 7 };
|
||||
status.AddRange(genOrderCallConfig.ReCallStatus);
|
||||
var orderlist = await InitDB.zxdcrmDb.Queryable<WxSzzyorder>()
|
||||
.Where(d => d.Resid == resid)
|
||||
// .Select(d=>new WxSzzyorder { Orderid = d.Orderid,Cname=d.Cname,Idcard=d.Idcard,Subproductname=d.Subproductname,Subproductid=d.Subproductid,Arrivalpay=d.Arrivalpay, Opendays=d.Opendays,Giftdays=d.Giftdays,Giftdays2=d.Giftdays2, Resid = d.Resid, Ctime = d.Ctime, Channel = d.Channel, Contractctime = d.Contractctime,AiHgrecordStime=d.AiHgrecordStime,AiHgrecordEtime=d.AiHgrecordEtime })
|
||||
.Where(d => d.Orderstatus!.Equals("200"))
|
||||
.Where(x => x.AiHgrecordStatus != null && aiHgrecordStatus.Contains(x.AiHgrecordStatus.Value))
|
||||
.Where(d => d.Contractctime >= startTime)
|
||||
.Where(d => d.Idcard != null)
|
||||
.Where(d => d.Hashgrecord == null || d.Hashgrecord != 1) //判断是否已经进行过合规
|
||||
//.Where(d=>d.Orderid== 81118603)
|
||||
.OrderBy(d => d.Orderid).ToListAsync();
|
||||
if (orderlist == null || !orderlist.Any())
|
||||
{
|
||||
return "无订单可以进行回访!";
|
||||
}
|
||||
CheckOrder(orderlist);
|
||||
orderlist.ForEach(d =>
|
||||
{
|
||||
d.AiHgrecordStatus = 6;
|
||||
});
|
||||
InitDB.zxdcrmDb.Updateable(orderlist).UpdateColumns(d => new { d.AiHgrecordStatus, d.AiHgrecordStatusname }).ExecuteCommand();
|
||||
return $"成功发起任务【 {string.Join(",", orderlist.Select(x => x.Orderid).ToList())}】";
|
||||
}
|
||||
|
||||
public async Task<string> CreatAiOrders(string? orderids)
|
||||
{
|
||||
if (orderids == null)
|
||||
{
|
||||
return "orderids不能为空!";
|
||||
}
|
||||
Log.Information($"开始处理:orderids:{orderids}, 人工手动拨打AI回访!");
|
||||
try
|
||||
{
|
||||
var orderidList = orderids.Split(',').Select(x => int.Parse(x)).ToList();
|
||||
List<int> status = new List<int> { 0, 6 };
|
||||
var aiHgrecordStatus = new List<int> { -2, -1, 0, 3, 7 };
|
||||
status.AddRange(genOrderCallConfig.ReCallStatus);
|
||||
var orderlist = await InitDB.zxdcrmDb.Queryable<WxSzzyorder>()
|
||||
.Where(d => orderidList.Contains(d.Orderid))
|
||||
.Where(x => x.AiHgrecordStatus != null && aiHgrecordStatus.Contains(x.AiHgrecordStatus.Value))
|
||||
.Where(d => d.Contractctime >= startTime)
|
||||
.Where(d => d.Idcard != null)
|
||||
.Where(d => d.Hashgrecord == null || d.Hashgrecord != 1)
|
||||
.OrderBy(d => d.Orderid).ToListAsync();
|
||||
if (orderlist == null || !orderlist.Any())
|
||||
{
|
||||
return "无订单可以进行回访!";
|
||||
}
|
||||
var sameuserlist = orderlist.GroupBy(d => new { d.Resid }, d => d);
|
||||
foreach (var item in sameuserlist)
|
||||
{
|
||||
var wxSzzyorderslist = item.ToList();
|
||||
CheckOrder(wxSzzyorderslist);
|
||||
}
|
||||
orderlist.ForEach(d =>
|
||||
{
|
||||
d.AiHgrecordStatus = 6;
|
||||
});
|
||||
InitDB.zxdcrmDb.Updateable(orderlist).UpdateColumns(d => new { d.AiHgrecordStatus, d.AiHgrecordStatusname }).ExecuteCommand();
|
||||
return $"成功发起任务【 {string.Join(",", orderlist.Select(x => x.Orderid).ToList())}】";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex, "人工手动拨打AI回访");
|
||||
return ex.Message;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
namespace SA.Domain.XFYun
|
||||
{
|
||||
[LoggingFilter]
|
||||
public interface IXFYunApi : IHttpApi
|
||||
{
|
||||
/// <summary>
|
||||
/// 提交单个号码进行外呼
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("/dg-xfyun/api/transfer/reply")]
|
||||
ITask<XFYunResponse<SingleAddResponse>> SingleAdd([JsonContent] XFYunRequest<SingleAddRequest> request);
|
||||
|
||||
/// <summary>
|
||||
/// 主动查询外呼结果
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("/dg-xfyun/api/transfer/reply")]
|
||||
ITask<XFYunResponse<SingleQueryResponse>> SingleQuery([JsonContent] XFYunRequest<SingleQueryRequest> request);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
using SA.Domain.XFYun.XFYunEntity;
|
||||
namespace SA.Domain.XFYun
|
||||
{
|
||||
[LoggingFilter]
|
||||
public interface IZXDApi : IHttpApi
|
||||
{
|
||||
/// <summary>
|
||||
/// 提交单个号码进行外呼
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("/SmsService.svc/PutSms")]
|
||||
ITask<JsonResult<string>> PutSms([JsonContent] ZXDEntity.SmsMessage request);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SA.Domain.XFYun
|
||||
{
|
||||
public static class LogHelper
|
||||
{
|
||||
public static void Error(string msg)
|
||||
{
|
||||
Task.Run(() => WriteLogByTask(msg, 3));
|
||||
}
|
||||
|
||||
public static void Error(Exception ex, string msg)
|
||||
{
|
||||
Task.Run(() => WriteLogByTask(msg, 4, ex));
|
||||
}
|
||||
|
||||
public static void Error(string msg, Exception ex)
|
||||
{
|
||||
Task.Run(() => WriteLogByTask(msg, 4, ex));
|
||||
}
|
||||
|
||||
public static void Info(string msg)
|
||||
{
|
||||
Task.Run(() => WriteLogByTask(msg, 1));
|
||||
}
|
||||
|
||||
public static void Debug(string msg)
|
||||
{
|
||||
Task.Run(() => WriteLogByTask(msg, 3));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 异步调用
|
||||
/// </summary>
|
||||
/// <param name="msg"></param>
|
||||
/// <param name="type">1:info 2: error 3: debug</param>
|
||||
public static void WriteLogByTask(string msg, int type, Exception ex = null)
|
||||
{
|
||||
msg = encryPhone(msg);
|
||||
switch (type)
|
||||
{
|
||||
case 1:
|
||||
Log.Information(msg);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
Log.Error(msg);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
Log.Debug(msg);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
Log.Error(ex, msg);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 手机号正则匹配加密 手机号日志需以非数字开头 非数字结尾
|
||||
/// </summary>
|
||||
/// <param name="msg"></param>
|
||||
/// <returns></returns>
|
||||
public static string encryPhone(string msg)
|
||||
{
|
||||
try
|
||||
{
|
||||
// 使用正则表达式匹配手机号
|
||||
string pattern = @"(\D\d{3})\d{4}(\d{4}\D.*)";
|
||||
string replacement = "$1****$2";
|
||||
//msg = Regex.Replace(msg, pattern, replacement);
|
||||
Regex regex = new Regex(pattern);
|
||||
//Match集合,匹配成功的字符串集合
|
||||
MatchCollection collection = regex.Matches(msg);
|
||||
|
||||
//遍历Match集合,取出值
|
||||
string telephone;
|
||||
foreach (Match item in collection)
|
||||
{
|
||||
foreach (Group group in item.Groups)
|
||||
{
|
||||
telephone = group.Value.Trim();
|
||||
//偶尔会出现重复提取,所以加了去重判断
|
||||
msg = Regex.Replace(msg, pattern, replacement);
|
||||
}
|
||||
}
|
||||
|
||||
return msg;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Error($"加密手机号错误{ex.Message}");
|
||||
return msg;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="WebApiClientCore" Version="2.0.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SA.Core\SA.Core.csproj" />
|
||||
<ProjectReference Include="..\SA.Entity\SA.Entity.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Using Include="SA.Domain.XFYun" />
|
||||
<Using Include="SA.Domain.XFYun.XFYunDomains" />
|
||||
<Using Include="SA.Domain.XFYun.XFYunEntity" />
|
||||
<Using Include="SA.Domain.XFYun.ZXDEntity" />
|
||||
<Using Include="SA.Core.Util" />
|
||||
<Using Include="WebApiClientCore" />
|
||||
<Using Include="WebApiClientCore.Attributes" />
|
||||
<Using Include="System.Text.Json.Serialization" />
|
||||
<Using Include="SA.Core.Init" />
|
||||
<Using Include="Serilog" />
|
||||
<Using Include="Serilog.Events" />
|
||||
<Using Include="Microsoft.Extensions.Configuration" />
|
||||
<Using Include="SA.Entity.zxdcrm_Models" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
namespace SA.Domain.XFYun.XFYunDomains
|
||||
{
|
||||
/// <summary>
|
||||
/// 讯飞处理
|
||||
/// </summary>
|
||||
public interface IXFYunDomain
|
||||
{
|
||||
/// <summary>
|
||||
/// 发送短信
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task SendSms();
|
||||
|
||||
/// <summary>
|
||||
/// 订单外呼
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task OrderOutbound();
|
||||
|
||||
/// <summary>
|
||||
/// 回调方法
|
||||
/// </summary>
|
||||
/// <param name="detail"></param>
|
||||
/// <returns></returns>
|
||||
Task<dynamic> Callback(CallDetail detail);
|
||||
|
||||
/// <summary>
|
||||
/// 获取回调结果
|
||||
/// </summary>
|
||||
/// <param name="taskId"></param>
|
||||
/// <returns></returns>
|
||||
Task<CsvrAiCalltask?> GetCallbackResult(int taskId);
|
||||
|
||||
/// <summary>
|
||||
/// 更新回调结果
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task UpdateCallbackResult();
|
||||
|
||||
Task<string> GetCallbackResultByXunFei(int taskId);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,591 @@
|
|||
using System.Diagnostics;
|
||||
using Microsoft.AspNetCore.DataProtection.KeyManagement;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace SA.Domain.XFYun.XFYunDomains
|
||||
{
|
||||
/// <summary>
|
||||
/// 讯飞处理
|
||||
/// </summary>
|
||||
public class XFYunDomain : IXFYunDomain
|
||||
{
|
||||
private readonly SystemConfig _systemConfig;
|
||||
private readonly IXFYunApi _xfyunApi;
|
||||
private readonly IZXDApi _zxdApi;
|
||||
|
||||
/// <summary>
|
||||
/// 讯飞处理
|
||||
/// </summary>
|
||||
/// <param name="xfyunApi"></param>
|
||||
/// <param name="zxdApi"></param>
|
||||
public XFYunDomain(
|
||||
IXFYunApi xfyunApi,
|
||||
IZXDApi zxdApi)
|
||||
{
|
||||
_xfyunApi = xfyunApi;
|
||||
_zxdApi = zxdApi;
|
||||
_systemConfig = InitConfiguration.GetSection("SystemConfig").Get<SystemConfig>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 发送信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task SendSms()
|
||||
{
|
||||
try
|
||||
{
|
||||
var tasks = await InitDB.zxdcrmDb.Queryable<CsvrAiCalltask>()
|
||||
.Where(x => x.Sms == 1 && x.Smstime <= DateTime.Now)
|
||||
.ToListAsync();
|
||||
if (tasks == null || !tasks.Any()) return;
|
||||
|
||||
var mobiles = tasks.Select(x => x.Resid).Distinct().ToList();
|
||||
|
||||
var request = new ZXDEntity.SmsMessage
|
||||
{
|
||||
Message = SerializeHelper.ToJson(new
|
||||
{
|
||||
_systemConfig.SmsConfig.TypeCode,
|
||||
_systemConfig.SmsConfig.SubTypeCode,
|
||||
Para = ""
|
||||
}),
|
||||
Mobile = mobiles
|
||||
};
|
||||
|
||||
var taskIds = tasks.Select(x => x.Id).ToList();
|
||||
|
||||
var orders = await InitDB.zxdcrmDb.Queryable<WxSzzyorder>()
|
||||
.LeftJoin<CsvrAiCalltaskOrders>((t1, t2) => t1.Orderid == t2.Orderid)
|
||||
.Where((t1, t2) => taskIds.Contains(t2.Taskid.Value))
|
||||
.ToListAsync();
|
||||
|
||||
// 判断订单是否已开通,如果已开通则不执行外呼
|
||||
if (orders.Any(x => x.Orderstatus == "220" || x.AiHgrecordStatus == -1))
|
||||
{
|
||||
LogHelper.Info($"订单[{string.Join(",", orders.Select(x => x.Orderid).ToList())}]已忽略外呼,不执行[短信发送任务]");
|
||||
|
||||
tasks.ForEach(x =>
|
||||
{
|
||||
x.Sms = 2;
|
||||
x.Smstime = DateTime.Now;
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
var result = await _zxdApi.PutSms(request);
|
||||
if (result.Result)
|
||||
{
|
||||
tasks.ForEach(x =>
|
||||
{
|
||||
x.Sms = 2;
|
||||
x.Smstime = DateTime.Now;
|
||||
});
|
||||
}
|
||||
}
|
||||
await InitDB.zxdcrmDb.Updateable(tasks).ExecuteCommandAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Error(ex, "短信任务报错!");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 订单外呼
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task OrderOutbound()
|
||||
{
|
||||
try
|
||||
{
|
||||
var time = DateTime.Now.AddMinutes(_systemConfig.IntervalMinutes);
|
||||
Stopwatch stopwatch = new Stopwatch();
|
||||
stopwatch.Start();
|
||||
var key = "singleAdd";
|
||||
var accessKey = _systemConfig.ClientKey.Where(x => x.Id == _systemConfig.CRMClientKey).Select(x => x.AccessKey).First();
|
||||
List<int> userStatus = new List<int> { 8, 9 };
|
||||
var list = await InitDB.zxdcrmDb.Queryable<CsvrAiCalltask>()
|
||||
.LeftJoin<ResResourcemobile>((t1, t2) => t1.Resid == t2.Resid)
|
||||
.Where(t1 =>
|
||||
(t1.Sms == 0 || (t1.Sms == 2 && t1.Smstime <= time))
|
||||
&& t1.Status == 0
|
||||
&& t1.Exetime <= DateTime.Now
|
||||
&& !userStatus.Contains(t1.AiHgrecordStatus.Value)) //排除人工操作的任务
|
||||
.Select((t1, t2) => new SingleAddRequest
|
||||
{
|
||||
ExtTaskId = t1.Id.ToString(),
|
||||
AppId = t1.AppId,
|
||||
CallNo = t1.CallNo,
|
||||
Priority = t1.Priority,
|
||||
Robot = t1.Robot,
|
||||
Phone = t2.Mobile,
|
||||
PropsStr = t1.Props,
|
||||
Ext = _systemConfig.Ext
|
||||
})
|
||||
.ToListAsync();
|
||||
stopwatch.Stop();
|
||||
LogHelper.Info($"订单外呼查询【{stopwatch.ElapsedMilliseconds}ms】");
|
||||
if (list == null || !list.Any()) return;
|
||||
|
||||
var tasks = await InitDB.zxdcrmDb.Queryable<CsvrAiCalltask>()
|
||||
.Where(x => list.Select(y => int.Parse(y.ExtTaskId ?? "0")).Contains(x.Id))
|
||||
.ToListAsync();
|
||||
|
||||
var taskIds = tasks.Select(x => x.Id).ToList();
|
||||
|
||||
LogHelper.Info($"任务[{string.Join(",", taskIds)}]正在执行[外呼任务],任务数量[{taskIds.Count}]");
|
||||
|
||||
foreach (var param in list)
|
||||
{
|
||||
var task = tasks.First(x => x.Id.ToString() == param.ExtTaskId);
|
||||
await CallOrder(param, task);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Error(ex, "定时任务报错!");
|
||||
}
|
||||
}
|
||||
|
||||
public async Task CallOrder(SingleAddRequest param, CsvrAiCalltask task)
|
||||
{
|
||||
var key = "singleAdd";
|
||||
var accessKey = _systemConfig.ClientKey.Where(x => x.Id == _systemConfig.CRMClientKey).Select(x => x.AccessKey).First();
|
||||
try
|
||||
{
|
||||
param.Phone = SecurityHelper.DecyptData(param.Phone, accessKey);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Warning("手机号解密失败,尝试[gd_crm]进行解密" + ex.Message);
|
||||
var ordAccessKey = _systemConfig.ClientKey.Where(x => x.Id == "gd_crm").Select(x => x.AccessKey).First();
|
||||
try
|
||||
{
|
||||
param.Phone = SecurityHelper.DecyptData(param.Phone, ordAccessKey);
|
||||
}
|
||||
catch (Exception ex2)
|
||||
{
|
||||
LogHelper.Error("手机号解密失败!", ex2);
|
||||
}
|
||||
}
|
||||
param.Props = string.IsNullOrEmpty(param.PropsStr) ? new Dictionary<string, string>() :
|
||||
SerializeHelper.FromJson<Dictionary<string, string>>(param.PropsStr);
|
||||
|
||||
var orders = await InitDB.zxdcrmDb.Queryable<WxSzzyorder>()
|
||||
.LeftJoin<CsvrAiCalltaskOrders>((t1, t2) => t1.Orderid == t2.Orderid)
|
||||
.Where((t1, t2) => task.Id == t2.Taskid)
|
||||
.ToListAsync();
|
||||
|
||||
// 生成唯一id
|
||||
task.ExtTaskId = CreateExTaskId(task.Id);
|
||||
param.ExtTaskId = task.ExtTaskId;
|
||||
|
||||
var request = new XFYunRequest<SingleAddRequest>(
|
||||
param.AppId,
|
||||
key,
|
||||
_systemConfig.XFYunGroudId,
|
||||
param);
|
||||
List<int> containStatus = new List<int>
|
||||
{
|
||||
82243656,82243655,82243649,82243646,82243525,82243515,82243504,82243469,82243393,82243351,82243330,82243276,82243265,82243246,82242374,82243488,82244062
|
||||
};
|
||||
// 判断订单是否已开通,如果已开通则不执行外呼
|
||||
if (orders.Any(x => x.Orderstatus == "220" || x.AiHgrecordStatus == -1))
|
||||
{
|
||||
LogHelper.Info($"订单[{string.Join(",", orders.Select(x => x.Orderid).ToList())}]已忽略外呼,不执行[外呼任务]");
|
||||
task.Status = 2;
|
||||
orders.ForEach(x => x.AiHgrecordStatus = -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 执行外呼
|
||||
var result = await _xfyunApi.SingleAdd(request);
|
||||
|
||||
task.Utime = DateTime.Now;
|
||||
|
||||
if (result.Ret == 0 && result.Data.Success)
|
||||
{
|
||||
task.Status = 1;
|
||||
orders.ForEach(x => x.AiHgrecordStatus = 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
task.Status = 2;
|
||||
task.RetDesc = result.Ret != 0 ? result.Msg : result.Data.Desc;
|
||||
|
||||
orders.ForEach(x => x.AiHgrecordStatus = 4);
|
||||
}
|
||||
}
|
||||
if (orders.Any(x => containStatus.Contains(x.Orderid)))
|
||||
{
|
||||
LogHelper.Info($"订单[{string.Join(",", orders.Select(x => x.Orderid).ToList())}]忽略订单状态,直接外呼");
|
||||
var result = await _xfyunApi.SingleAdd(request);
|
||||
|
||||
task.Utime = DateTime.Now;
|
||||
|
||||
if (result.Ret == 0 && result.Data.Success)
|
||||
{
|
||||
task.Status = 1;
|
||||
orders.ForEach(x => x.AiHgrecordStatus = 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
task.Status = 2;
|
||||
task.RetDesc = result.Ret != 0 ? result.Msg : result.Data.Desc;
|
||||
|
||||
orders.ForEach(x => x.AiHgrecordStatus = 4);
|
||||
}
|
||||
}
|
||||
task.AiHgrecordStatus = orders.FirstOrDefault() == null ? task.AiHgrecordStatus : orders.FirstOrDefault()?.AiHgrecordStatus;
|
||||
|
||||
try
|
||||
{
|
||||
InitDB.zxdcrmDb.BeginTran();
|
||||
await InitDB.zxdcrmDb.Updateable(orders).UpdateColumns(x => new
|
||||
{
|
||||
x.AiHgrecordStatus,
|
||||
x.AiHgrecordStatusname
|
||||
}).ExecuteCommandAsync();
|
||||
await InitDB.zxdcrmDb.Updateable(task).ExecuteCommandAsync();
|
||||
InitDB.zxdcrmDb.CommitTran();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
InitDB.zxdcrmDb.RollbackTran();
|
||||
LogHelper.Error(ex, "[外呼任务]报错!");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 生成唯一id
|
||||
/// </summary>
|
||||
/// <param name="taksId"></param>
|
||||
/// <returns></returns>
|
||||
private static string CreateExTaskId(int taksId)
|
||||
{
|
||||
var unixTime = new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds();
|
||||
var randomString = CreateRandomNumber(4);
|
||||
|
||||
return $"{unixTime}{taksId}{randomString}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 生成随机数字
|
||||
/// </summary>
|
||||
/// <param name="Length">生成长度</param>
|
||||
/// <param name="Sleep">是否要在生成前将当前线程阻止以避免重复</param>
|
||||
/// <returns></returns>
|
||||
private static string CreateRandomNumber(int Length, bool Sleep = true)
|
||||
{
|
||||
if (Sleep)
|
||||
Thread.Sleep(3);
|
||||
string result = "";
|
||||
Random random = new();
|
||||
for (int i = 0; i < Length; i++)
|
||||
{
|
||||
result += random.Next(10).ToString();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 回调函数
|
||||
/// </summary>
|
||||
/// <param name="detail"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<dynamic> Callback(CallDetail detail)
|
||||
{
|
||||
try
|
||||
{
|
||||
var task = await InitDB.zxdcrmDb.Queryable<CsvrAiCalltask>()
|
||||
.Where(x => x.ExtTaskId == detail.ExtTaskId)
|
||||
.OrderByDescending(x => x.Id)
|
||||
.FirstAsync();
|
||||
var orders = await InitDB.zxdcrmDb.Queryable<WxSzzyorder>()
|
||||
.LeftJoin<CsvrAiCalltaskOrders>((t1, t2) => t1.Orderid == t2.Orderid)
|
||||
.Where((t1, t2) => task.Id == t2.Taskid)
|
||||
.ToListAsync();
|
||||
// 不明文显示
|
||||
//detail.Phone = SecurityHelper.EncyptData(detail.Phone, "UPWEBSITE");
|
||||
LogHelper.Info($"讯飞回调刷新 {string.Join(",", orders.Select(n => n.Orderid))} 讯飞结果:{JsonConvert.SerializeObject(detail)}");
|
||||
await UpdateTask(task, orders, detail, true);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Error(ex, "更新回调信息报错!");
|
||||
}
|
||||
return new
|
||||
{
|
||||
rc = "000000",
|
||||
desc = ""
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新任务状态
|
||||
/// </summary>
|
||||
/// <param name="task"></param>
|
||||
/// <param name="orders"></param>
|
||||
/// <param name="detail"></param>
|
||||
/// <param name="result"></param>
|
||||
/// <param name="error"></param>
|
||||
/// <returns></returns>
|
||||
private static async Task UpdateTask(CsvrAiCalltask? task, List<WxSzzyorder> orders, CallDetail detail, bool result = false, string error = "")
|
||||
{
|
||||
if (task == null) return;
|
||||
|
||||
task.Status = 2;
|
||||
task.Exetime = DateTime.Now;
|
||||
task.CallRet = detail.CallRet;
|
||||
task.Audio = detail.Audio;
|
||||
task.Labels = detail.Labels;
|
||||
task.Content = detail.Content;
|
||||
task.EndTime = string.IsNullOrEmpty(detail.EndTime) ? null : DateTime.Parse(detail.EndTime);
|
||||
task.StartTime = string.IsNullOrEmpty(detail.StartTime) ? null : DateTime.Parse(detail.StartTime);
|
||||
task.PlatSingleTaskId = detail.PlatTaskId;
|
||||
task.SvcTime = detail.SvcTime;
|
||||
task.Interact = detail.Interact == null || !detail.Interact.Any() ? "" : SerializeHelper.ToJson(detail.Interact);
|
||||
task.Rounds = detail.Interact == null || !detail.Interact.Any() ? 0 : detail.Interact.Where(n => n.Type == "1").Count();
|
||||
// 判断对话信息是否完整
|
||||
var full = false;
|
||||
var labels = new Dictionary<string, string>();
|
||||
|
||||
orders.ForEach(x => x.Hasaiaudio = string.IsNullOrEmpty(task.Audio) ? 0 : 1);
|
||||
//人工操作的不刷新状态
|
||||
List<int> userStatus = new List<int>
|
||||
{
|
||||
8,9
|
||||
};
|
||||
orders = orders.Where(n => !userStatus.Contains(n.AiHgrecordStatus.Value)).ToList();
|
||||
var updateStatus = 0;
|
||||
if (!string.IsNullOrEmpty(detail.Labels))
|
||||
{
|
||||
labels = SerializeHelper.FromJson<Dictionary<string, string>>(detail.Labels);
|
||||
if (labels.Any() && labels.TryGetValue("访问结果", out string? label) && label == "正常访问")
|
||||
{
|
||||
full = true;
|
||||
}
|
||||
}
|
||||
if (result && detail.Status == 3 && full)
|
||||
{
|
||||
task.RetDesc = detail.RetDesc;
|
||||
updateStatus = string.IsNullOrEmpty(detail.RetDesc) ? 4 :
|
||||
detail.RetDesc == "外呼成功" ? 5 : 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
task.RetDesc = !string.IsNullOrEmpty(error) ? error :
|
||||
!string.IsNullOrEmpty(detail.RetDesc) ? detail.RetDesc :
|
||||
"外呼失败";
|
||||
|
||||
if (detail.Interact == null || !detail.Interact.Any())
|
||||
{
|
||||
updateStatus = 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
// 如果不存在人为回答,需要把状态改为AI外呼失败(挂断)
|
||||
if (!detail.Interact.Any(x => x.Type == "1"))
|
||||
{
|
||||
updateStatus = 7;
|
||||
}
|
||||
else
|
||||
{
|
||||
updateStatus = 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
task.AiHgrecordStatus = updateStatus;
|
||||
var genOrderCallConfig = GenOrderCall.GetConfig();
|
||||
var ReCallMin = genOrderCallConfig.ReCallMins;
|
||||
//找出是否存在其他任务
|
||||
if (orders.Count > 0)
|
||||
{
|
||||
var taskids = InitDB.zxdcrmDb.Queryable<CsvrAiCalltaskOrders>().Where(d => d.Orderid == orders.FirstOrDefault().Orderid).Select(d => d.Taskid).ToList();
|
||||
//如果 任务外呼 失败 且 大于重拨次数 直接刷为 ai重拨失败
|
||||
List<int> failStatus = new List<int> { 3, 4, 7 };
|
||||
if (taskids.Count > ReCallMin.Count && failStatus.Contains(updateStatus))
|
||||
{
|
||||
updateStatus = -2;
|
||||
LogHelper.Info($"订单【{string.Join(",", orders.Select(n => n.Orderid))}】刷新状态为【AI重拨失败】");
|
||||
}
|
||||
orders.ForEach(x => x.AiHgrecordStatus = updateStatus);
|
||||
}
|
||||
LogHelper.Info($"任务编号【{task.Id}】订单为【{string.Join(",", orders.Select(n => n.Orderid))}】刷新状态为【{task.AiHgrecordStatusname}】");
|
||||
try
|
||||
{
|
||||
InitDB.zxdcrmDb.BeginTran();
|
||||
await InitDB.zxdcrmDb.Updateable(orders).UpdateColumns(x => new
|
||||
{
|
||||
x.AiHgrecordStatus,
|
||||
x.AiHgrecordStatusname,
|
||||
x.Hasaiaudio
|
||||
}).ExecuteCommandAsync();
|
||||
await InitDB.zxdcrmDb.Updateable(task).ExecuteCommandAsync();
|
||||
InitDB.zxdcrmDb.CommitTran();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
InitDB.zxdcrmDb.RollbackTran();
|
||||
LogHelper.Error(ex, "定时任务报错!");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 轮询获取结果
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task UpdateCallbackResult()
|
||||
{
|
||||
try
|
||||
{
|
||||
var time = DateTime.Now.AddMinutes(_systemConfig.CallbackMinutes);
|
||||
var key = "singleQuery";
|
||||
var accessKey = _systemConfig.ClientKey.Where(x => x.Id == _systemConfig.CRMClientKey).Select(x => x.AccessKey).First();
|
||||
var tasks = await InitDB.zxdcrmDb.Queryable<CsvrAiCalltask>()
|
||||
.Where(t1 => t1.Status == 1 && t1.Utime <= time)
|
||||
.ToListAsync();
|
||||
|
||||
if (tasks == null || !tasks.Any()) return;
|
||||
|
||||
foreach (var task in tasks)
|
||||
{
|
||||
if (task == null) continue;
|
||||
|
||||
var taskId = task?.Id;
|
||||
var param = new SingleQueryRequest()
|
||||
{
|
||||
ExtTaskId = task?.ExtTaskId ?? task?.Id.ToString(),
|
||||
AppId = task?.AppId,
|
||||
};
|
||||
|
||||
var request = new XFYunRequest<SingleQueryRequest>(
|
||||
param.AppId,
|
||||
key,
|
||||
_systemConfig.XFYunGroudId,
|
||||
param);
|
||||
|
||||
// 获取结果
|
||||
var result = await _xfyunApi.SingleQuery(request);
|
||||
var orders = await InitDB.zxdcrmDb.Queryable<WxSzzyorder>()
|
||||
.LeftJoin<CsvrAiCalltaskOrders>((t1, t2) => t1.Orderid == t2.Orderid)
|
||||
.Where((t1, t2) => taskId == t2.Taskid)
|
||||
.ToListAsync();
|
||||
LogHelper.Info($"任务自动刷新时间,任务id: {taskId} {string.Join(",", orders.Select(n => n.Orderid))}讯飞结果:{JsonConvert.SerializeObject(result)}");
|
||||
if (result.Ret == 0 && result?.Data?.Result != null)
|
||||
{
|
||||
//录音不为空才做更新
|
||||
if (!string.IsNullOrWhiteSpace(result.Data.Result.Audio))
|
||||
{
|
||||
await UpdateTask(task, orders, result.Data.Result, result.Data.Success, result.Error ?? "");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LogHelper.Error($"定时任务获取结果出错,任务id: {taskId}, 错误信息: {result?.Msg}");
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Error(ex, "定时任务报错!");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="taskId"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<CsvrAiCalltask?> GetCallbackResult(int taskId)
|
||||
{
|
||||
try
|
||||
{
|
||||
var key = "singleQuery";
|
||||
var task = await InitDB.zxdcrmDb.Queryable<CsvrAiCalltask>()
|
||||
.Where(t1 => t1.Id == taskId)
|
||||
.FirstAsync();
|
||||
|
||||
if (task == null) return task;
|
||||
|
||||
var param = new SingleQueryRequest()
|
||||
{
|
||||
ExtTaskId = task?.ExtTaskId ?? task?.Id.ToString(),
|
||||
AppId = task?.AppId,
|
||||
};
|
||||
|
||||
var request = new XFYunRequest<SingleQueryRequest>(
|
||||
param.AppId,
|
||||
key,
|
||||
_systemConfig.XFYunGroudId,
|
||||
param);
|
||||
|
||||
// 获取结果
|
||||
var result = await _xfyunApi.SingleQuery(request);
|
||||
|
||||
var orders = await InitDB.zxdcrmDb.Queryable<WxSzzyorder>()
|
||||
.LeftJoin<CsvrAiCalltaskOrders>((t1, t2) => t1.Orderid == t2.Orderid)
|
||||
.Where((t1, t2) => taskId == t2.Taskid)
|
||||
.ToListAsync();
|
||||
|
||||
if (result.Ret == 0 && result?.Data?.Result != null)
|
||||
{
|
||||
await UpdateTask(task, orders, result.Data.Result, result.Data.Success, result.Error ?? "");
|
||||
}
|
||||
else
|
||||
{
|
||||
LogHelper.Error($"定时任务获取结果出错,任务id: {taskId}, 错误信息: {result?.Msg}");
|
||||
}
|
||||
return task;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Error(ex, "更新回调信息报错!");
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 单纯获取讯飞结果
|
||||
/// </summary>
|
||||
/// <param name="taskId"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> GetCallbackResultByXunFei(int taskId)
|
||||
{
|
||||
try
|
||||
{
|
||||
var key = "singleQuery";
|
||||
var task = await InitDB.zxdcrmDb.Queryable<CsvrAiCalltask>()
|
||||
.Where(t1 => t1.Id == taskId)
|
||||
.FirstAsync();
|
||||
|
||||
if (task == null) return "";
|
||||
|
||||
var param = new SingleQueryRequest()
|
||||
{
|
||||
ExtTaskId = task?.ExtTaskId ?? task?.Id.ToString(),
|
||||
AppId = task?.AppId,
|
||||
};
|
||||
|
||||
var request = new XFYunRequest<SingleQueryRequest>(
|
||||
param.AppId,
|
||||
key,
|
||||
_systemConfig.XFYunGroudId,
|
||||
param);
|
||||
|
||||
// 获取结果
|
||||
var result = await _xfyunApi.SingleQuery(request);
|
||||
|
||||
var res = JsonConvert.SerializeObject(result);
|
||||
return res.ToString();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Info($"获取讯飞结果出错{ex.Message}");
|
||||
return $"获取讯飞结果出错{ex.Message}";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,171 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SA.Domain.XFYun.XFYunEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 创建订单外呼任务配置
|
||||
/// </summary>
|
||||
public class AI_CallTaskConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// 订单外呼起始时间
|
||||
/// </summary>
|
||||
public DateTime StartTime { get; set; } = DateTime.Parse("2021-12-01");
|
||||
|
||||
/// <summary>
|
||||
/// 仅呼叫近几天支付的订单
|
||||
/// </summary>
|
||||
public int CallDay { get; set; } = 7;
|
||||
|
||||
/// <summary>
|
||||
/// 等待2分钟后处理
|
||||
/// </summary>
|
||||
public int CreatCallMin { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// 设置需要重试的状态
|
||||
/// </summary>
|
||||
public List<int> ReCallStatus { get; set; } = new List<int>() { 3, 4 };
|
||||
|
||||
/// <summary>
|
||||
/// //优先级别1-紧急 2-优先
|
||||
/// </summary>
|
||||
public string Priority { get; set; } = "2";
|
||||
|
||||
/// <summary>
|
||||
/// 最小订单金额
|
||||
/// </summary>
|
||||
public decimal MinAmount { get; set; } = 1m;
|
||||
|
||||
public List<int> ReCallMins { get; set; } = new List<int>() { 1, 5, 10, 20, 100 };
|
||||
|
||||
/// <summary>
|
||||
/// 同人检查时间,分钟
|
||||
/// </summary>
|
||||
public int SameUserCheckTimeSpanMin { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// 呼叫忽略配置
|
||||
/// </summary>
|
||||
public List<HitConfig> IgnoreHitConfigs { get; set; } = new List<HitConfig>();
|
||||
|
||||
/// <summary>
|
||||
/// 呼叫话术
|
||||
/// </summary>
|
||||
public ProposProductConfig proposProductConfig { get; set; } = new ProposProductConfig();
|
||||
|
||||
/// <summary>
|
||||
/// 是否发短信1:发, 0:不发
|
||||
/// </summary>
|
||||
public int Sms { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// 发短信多久后外呼,分钟
|
||||
/// </summary>
|
||||
public int SmsExprieMinCall { get; set; } = 1;
|
||||
|
||||
public string Robot { get; set; } = "15603355067677285";
|
||||
|
||||
public string CallNo { get; set; }
|
||||
|
||||
public string AppId { get; set; } = "d2282f8efcc0429cafca7d59551bf445";
|
||||
|
||||
/// <summary>
|
||||
/// 允许外拨时间段
|
||||
/// </summary>
|
||||
public string? HgrecordStime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 允许外拨时间段
|
||||
/// </summary>
|
||||
public string? HgrecordEtime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 白名单
|
||||
/// </summary>
|
||||
public List<string> WhiteList { get; set; } = new List<string>();
|
||||
|
||||
/// <summary>
|
||||
/// 忽略产品类型
|
||||
/// </summary>
|
||||
public List<int> IgnoreProductType { get; set; } = new List<int>() { 4 };
|
||||
}
|
||||
|
||||
public class HitConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// key
|
||||
/// </summary>
|
||||
public string? HitKey { get; set; } = "Channel";
|
||||
|
||||
/// <summary>
|
||||
/// 包含
|
||||
/// </summary>
|
||||
public List<string>? Contain { get; set; } = new List<string>() { "1000|2000" };
|
||||
|
||||
/// <summary>
|
||||
/// 不包含
|
||||
/// </summary>
|
||||
public List<string>? NoContain { get; set; } = new List<string>() { "1000|2000" };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Channel 为范围,|连接,左右包含,如1000|2000
|
||||
/// </summary>
|
||||
public enum HitKey
|
||||
{ Channel, Subproductid, Resid }
|
||||
|
||||
/// <summary>
|
||||
/// 渠道范围
|
||||
/// </summary>
|
||||
public class ChannelItem
|
||||
{
|
||||
public int Min { get; set; }
|
||||
public int Max { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 话术模板配置
|
||||
/// </summary>
|
||||
public class ProposProductConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// 单个订单配置
|
||||
/// </summary>
|
||||
public string OneTemplate { get; set; } = "请问您购买的产品是@Subproductname,购买期限是【#OpenDays】天@GiftExp,您本次支付的订单金额是【#Arrivalpay】元,对吗?";
|
||||
|
||||
/// <summary>
|
||||
/// 多个订单配置
|
||||
/// </summary>
|
||||
public string MultipleTemplate { get; set; } = "请问您购买的产品是@Subproductname,其中@PayExp,您本次支付的订单金额是【#Arrivalpay】元,对吗?";
|
||||
|
||||
/// <summary>
|
||||
/// 产品名称配置
|
||||
/// </summary>
|
||||
public string Subproductname { get; set; } = "【#Subproductname】";
|
||||
|
||||
/// <summary>
|
||||
/// 支付信息配置
|
||||
/// </summary>
|
||||
public string PayExp { get; set; } = "@Subproductname购买期限是【#OpenDays】天@GiftExp";
|
||||
|
||||
/// <summary>
|
||||
/// 支付信息配置
|
||||
/// </summary>
|
||||
public string MultiplePayExp { get; set; } = "@Subproductname,订单金额是@Subproductmoney,购买期限是【#OpenDays】天,@GiftExp";
|
||||
|
||||
/// <summary>
|
||||
/// 过期时间配置
|
||||
/// </summary>
|
||||
public string GiftExp { get; set; } = ",赠送期限是【#OpenDays】天,";
|
||||
|
||||
/// <summary>
|
||||
/// 过期时间配置
|
||||
/// </summary>
|
||||
public string MultipleGiftExp { get; set; } = ",赠送期限是【#GiftDays】天,合计使用期限是【#OpenDays】天,@Giftproductname";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,159 @@
|
|||
namespace SA.Domain.XFYun.XFYunEntity
|
||||
{
|
||||
public class CallDetail
|
||||
{
|
||||
/// <summary>
|
||||
/// 云呼平台创建的批次任务ID
|
||||
/// </summary>
|
||||
public string? PlatTaskId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 调用方任务ID
|
||||
/// </summary>
|
||||
public string? ExtTaskId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? PlatSingleTaskId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外呼号码
|
||||
/// </summary>
|
||||
public string? Phone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 号码归属省份
|
||||
/// </summary>
|
||||
public string? Province { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 号码归属城市
|
||||
/// </summary>
|
||||
public string? City { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 运营商,1-移动,2-联通,3-电信
|
||||
/// </summary>
|
||||
public string? CarrierCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外呼机器人编号
|
||||
/// </summary>
|
||||
public string? Robot { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 0:成功 1:失败 2:过期
|
||||
/// </summary>
|
||||
public string? CallRet { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 若外呼失败,该字段为失败原因
|
||||
/// 失败原因有很多,其中通话未建立的具体失败原因是通过转写识别回铃音分析获取的,是个异步的处理过程,正在考虑在外呼结果相关接口中直接推送具体的外呼失败原因。
|
||||
/// 具体失败原因包括:关机、停机、空号、正在通话、无人接听、无法接通等
|
||||
/// </summary>
|
||||
public string? RetDesc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外呼开始时间
|
||||
/// </summary>
|
||||
public string? StartTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外呼结束时间
|
||||
/// </summary>
|
||||
public string? EndTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 服务时长(单位:s)
|
||||
/// </summary>
|
||||
public int? SvcTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 会话标签(json)
|
||||
/// </summary>
|
||||
public string? Labels { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 交互记录
|
||||
/// </summary>
|
||||
public List<CallDetailInteract>? Interact { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 全程通话音频(http地址)
|
||||
/// </summary>
|
||||
public string? Audio { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 由对应开发者的适配层来解析并规整后按照开发者协议回调。
|
||||
/// </summary>
|
||||
public string? Ext { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 当前外呼状态
|
||||
/// 0:任务待提交
|
||||
/// 1:任务已提交,等待营销
|
||||
/// 2:营销中
|
||||
/// 3:营销结束
|
||||
/// 4:营销失败
|
||||
/// 5:营销过期
|
||||
/// 6:已被业务规则过滤
|
||||
/// 7:暂停
|
||||
/// 8:取消
|
||||
/// </summary>
|
||||
public int? Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 会话id,当外呼成功、会话接通后才有值
|
||||
/// </summary>
|
||||
public string? Sid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 开发者应用ID
|
||||
/// </summary>
|
||||
public string? AppId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 业务参数,格式json(取决于外呼话术配置)
|
||||
/// </summary>
|
||||
public string? Content { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 槽位,格式json(取决于话术及交互)
|
||||
/// </summary>
|
||||
public string? Slots { get; set; }
|
||||
}
|
||||
|
||||
public class CallDetailInteract
|
||||
{
|
||||
/// <summary>
|
||||
/// 交互时间精确到秒
|
||||
/// </summary>
|
||||
public string? Time { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 0机器人 1 用户
|
||||
/// </summary>
|
||||
public string? Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 内容
|
||||
/// </summary>
|
||||
public string? Content { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 节点id
|
||||
/// </summary>
|
||||
public string? Nodeid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 节点名称
|
||||
/// </summary>
|
||||
public string? Nodename { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 交互过程中用户说话的音频文件
|
||||
/// </summary>
|
||||
public string? Ugc { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
namespace SA.Domain.XFYun.XFYunEntity
|
||||
{
|
||||
public class SingleAddRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 开发者单个号码任务ID
|
||||
/// </summary>
|
||||
public string? ExtTaskId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 机器人编号
|
||||
/// </summary>
|
||||
public string? Robot { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外呼的外显号码
|
||||
/// </summary>
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public string? CallNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 合成参数
|
||||
/// </summary>
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public TtsParam? TtsParam { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 优先级: 1-紧急 2-优先
|
||||
/// </summary>
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public string? Priority { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? PropsStr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 号码
|
||||
/// </summary>
|
||||
public string? Phone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 针对phone的机器人参数详情
|
||||
/// </summary>
|
||||
public Dictionary<string, string>? Props { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 扩展信息(格式不限),由开发者的适配层来填充
|
||||
/// </summary>
|
||||
public string? Ext { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 开发者应用ID
|
||||
/// </summary>
|
||||
public string? AppId { get; set; }
|
||||
}
|
||||
|
||||
public class TtsParam
|
||||
{
|
||||
/// <summary>
|
||||
/// 发音人名称
|
||||
/// </summary>
|
||||
public string? Vcn { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 音量,范围0-100,默认50
|
||||
/// </summary>
|
||||
public string? Volume { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 音速,范围0-100,默认50
|
||||
/// </summary>
|
||||
public string? Speed { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 音高,范围0-100,默认50
|
||||
/// </summary>
|
||||
public string? Pitch { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
namespace SA.Domain.XFYun.XFYunEntity
|
||||
{
|
||||
public class SingleAddResponse : XFYunResponseData
|
||||
{
|
||||
/// <summary>
|
||||
/// 任务ID
|
||||
/// </summary>
|
||||
public string? PlatSingleTaskId { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
namespace SA.Domain.XFYun.XFYunEntity
|
||||
{
|
||||
public class SingleQueryRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 开发者单个号码任务ID
|
||||
/// </summary>
|
||||
public string? ExtTaskId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 平台任务id
|
||||
/// </summary>
|
||||
public string? PlatSingleTaskId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 开发者应用ID
|
||||
/// </summary>
|
||||
public string? AppId { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
namespace SA.Domain.XFYun.XFYunEntity
|
||||
{
|
||||
public class SingleQueryResponse: XFYunResponseData
|
||||
{
|
||||
/// <summary>
|
||||
/// 对话明细
|
||||
/// </summary>
|
||||
public CallDetail Result { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SA.Domain.XFYun.XFYunEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 系统参数
|
||||
/// </summary>
|
||||
public class SystemConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// 相隔时间
|
||||
/// </summary>
|
||||
public int IntervalMinutes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 回调时间
|
||||
/// </summary>
|
||||
public int CallbackMinutes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分组id
|
||||
/// </summary>
|
||||
public string? XFYunGroudId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 转发地址
|
||||
/// </summary>
|
||||
public string? ForwardingUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 销售线索URL
|
||||
/// </summary>
|
||||
public string? SalesLeadUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// CRM号码加密key(clientKey)
|
||||
/// </summary>
|
||||
public string? CRMClientKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 推送部门编码
|
||||
/// </summary>
|
||||
|
||||
public string? DataClientCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 深海捷固定坐席
|
||||
/// </summary>
|
||||
public string? Shj { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 客户端密钥
|
||||
/// </summary>
|
||||
public List<ClientKey> ClientKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 短信配置
|
||||
/// </summary>
|
||||
public SmsConfig SmsConfig { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 附加信息
|
||||
/// </summary>
|
||||
public string? Ext { get; set; }
|
||||
}
|
||||
|
||||
public class ClientKey
|
||||
{
|
||||
public string? Id { get; set; }
|
||||
|
||||
public string? Name { get; set; }
|
||||
|
||||
public string? AccessKey { get; set; }
|
||||
}
|
||||
|
||||
public class SmsConfig
|
||||
{
|
||||
public string? TypeCode { get; set; }
|
||||
|
||||
public string? SubTypeCode { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
namespace SA.Domain.XFYun.XFYunEntity
|
||||
{
|
||||
public class XFYunApiConfig
|
||||
{
|
||||
public static XFYunApiConfig? GetApiConfig(string key)
|
||||
{
|
||||
var configs = InitConfiguration.GetSection("XFYunApiConfigs").Get<List<XFYunApiConfig>>();
|
||||
return configs.FirstOrDefault(x => x.Key == key);
|
||||
}
|
||||
/// <summary>
|
||||
/// key
|
||||
/// </summary>
|
||||
public string? Key { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 请求地址
|
||||
/// </summary>
|
||||
public string? Url { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 描述
|
||||
/// </summary>
|
||||
public string? Description { get; set; }
|
||||
|
||||
public string? ServiceType { get; set; }
|
||||
|
||||
public string? ParamType { get; set; }
|
||||
|
||||
public string? ParamPosition { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
namespace SA.Domain.XFYun.XFYunEntity
|
||||
{
|
||||
public class XFYunConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// 讯飞云管理平台应用查看处获取并修改
|
||||
/// </summary>
|
||||
public string? AppId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 讯飞云管理平台应用查看处获取并修改
|
||||
/// </summary>
|
||||
public string? AppSecret { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 讯飞云API的服务器地址
|
||||
/// </summary>
|
||||
public string? Host { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// http请求的端口
|
||||
/// </summary>
|
||||
public int HttpPort { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// https请求的端口
|
||||
/// </summary>
|
||||
public int HttpsPort { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// sdk生成时选择的环境 RELEASE=线上 TEST=测试 PRE=预生产;
|
||||
/// </summary>
|
||||
public string? Stage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 此参数暂时无用
|
||||
/// </summary>
|
||||
public string? EquipmentNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 此参数暂时无用
|
||||
/// </summary>
|
||||
public string? SignStrategyUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 此参数暂时无用
|
||||
/// </summary>
|
||||
public string? TokenUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 管理平台应用查看处获取并修改
|
||||
/// </summary>
|
||||
public string? PublicKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关闭云锁验证
|
||||
/// </summary>
|
||||
public bool IcloudlockEnabled { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
using SA.Core;
|
||||
using SA.Core.Init;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace SA.Domain.XFYun.XFYunEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 讯飞云请求
|
||||
/// </summary>
|
||||
/// <typeparam name="TParams"></typeparam>
|
||||
public class XFYunRequest<TParams>
|
||||
where TParams : class
|
||||
{
|
||||
/// <summary>
|
||||
/// 构造函数
|
||||
/// </summary>
|
||||
/// <param name="appId"></param>
|
||||
/// <param name="groupId"></param>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="param"></param>
|
||||
public XFYunRequest(string? appId, string? key, string? groupId, TParams param)
|
||||
{
|
||||
var configs = InitConfiguration.GetSection("XFYunConfigs").Get<List<XFYunConfig>>();
|
||||
var config = configs.FirstOrDefault(x => x.AppId == appId);
|
||||
if (config == null) LogHelper.Error($"AppId: {appId},配置不存在,请检查配置");
|
||||
var apiConfig = XFYunApiConfig.GetApiConfig(key ?? "");
|
||||
Url = apiConfig?.Url;
|
||||
GroupId = groupId;
|
||||
Params = param;
|
||||
ParamPosition = apiConfig?.ParamPosition;
|
||||
ServiceType = apiConfig?.ServiceType;
|
||||
ParamType = apiConfig?.ParamType;
|
||||
Config = config;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 讯飞云API的请求地址
|
||||
/// </summary>
|
||||
public string? Url { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 讯飞云API的应用配置(此参数为可选,不传该参数时,默认读取后端服务配置文件)
|
||||
/// </summary>
|
||||
public XFYunConfig? Config { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 接口分组ID,在讯飞云管理平台上获取
|
||||
/// </summary>
|
||||
public string? GroupId { get; }
|
||||
|
||||
public string? ParamPosition { get; }
|
||||
|
||||
public string? ServiceType { get; }
|
||||
|
||||
public string? ParamType { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 讯飞云API的调用参数,具体参数字段请查看讯飞云API文档;
|
||||
/// </summary>
|
||||
public TParams Params { get; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
namespace SA.Domain.XFYun.XFYunEntity
|
||||
{
|
||||
public class XFYunResponse<TResponse> where TResponse : XFYunResponseData
|
||||
{
|
||||
/// <summary>
|
||||
/// 状态码,0为也调用成功,-1为调用失败
|
||||
/// </summary>
|
||||
public int Ret { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 请求返回消息
|
||||
/// </summary>
|
||||
public string? Msg { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 调用讯飞云API后返回的数据
|
||||
/// </summary>
|
||||
public TResponse Data { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 异常信息
|
||||
/// </summary>
|
||||
public string? Error { get; set; }
|
||||
}
|
||||
|
||||
public class XFYunResponseData
|
||||
{
|
||||
/// <summary>
|
||||
/// 讯飞云API返回的状态码
|
||||
/// </summary>
|
||||
public string Rc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 返回结果
|
||||
/// </summary>
|
||||
public bool Success { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 返回的描述
|
||||
/// </summary>
|
||||
public string? Desc { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
namespace SA.Domain.XFYun.ZXDEntity
|
||||
{
|
||||
public class JsonResult<T> where T : class
|
||||
{
|
||||
/// <summary>
|
||||
/// 结果
|
||||
/// </summary>
|
||||
public bool Result { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 结果编码
|
||||
/// </summary>
|
||||
public int Retcode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 结果
|
||||
/// </summary>
|
||||
public T? Retmsg { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
namespace SA.Domain.XFYun.ZXDEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 短信信息
|
||||
/// </summary>
|
||||
public class SmsMessage
|
||||
{
|
||||
/// <summary>
|
||||
/// 短信内容
|
||||
/// </summary>
|
||||
public string? Message { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电话号码
|
||||
/// </summary>
|
||||
public List<string?>? Mobile { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SA.Entity.Request
|
||||
{
|
||||
public class SHRequest
|
||||
{
|
||||
public class shQueryList
|
||||
{
|
||||
public int pageSize { get; set; }
|
||||
public int pageCurrent { get; set; }
|
||||
public string mobile { get; set; } = "";
|
||||
public string backRemark { get; set; } = "";
|
||||
|
||||
public string beginPayTime { get; set; } = "";
|
||||
public string endPayTime { get; set; } = "";
|
||||
|
||||
}
|
||||
|
||||
public class shListNum
|
||||
{
|
||||
public int total { get; set; }
|
||||
public int pageSize { get; set; }
|
||||
public int pageCurrent { get; set; }
|
||||
}
|
||||
|
||||
public class SH_checkResult
|
||||
{
|
||||
public string sh_orderno { get; set; } = "";
|
||||
public string sh_orderid { get; set; } = "";
|
||||
public string course { get; set; } = "";
|
||||
public string userno { get; set; } = "";
|
||||
public string user { get; set; } = "";
|
||||
public string username { get; set; } = "";
|
||||
public DateTime endtime { get; set; }
|
||||
public int sh_opendays { get; set; }
|
||||
public string orderid { get; set; } = "";
|
||||
public string resid { get; set; } = "";
|
||||
public string cname { get; set; } = "";
|
||||
public string subproductname { get; set; } = "";
|
||||
public DateTime otime { get; set; }
|
||||
public int opendays { get; set; }
|
||||
public DateTime endtime3 { get; set; }
|
||||
public int diffDays { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
|
||||
<PackageReference Include="NLog" Version="5.0.1" />
|
||||
<PackageReference Include="SqlSugarCore" Version="5.0.9" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.dbcrm
|
||||
{
|
||||
[SugarTable("t_product_package")]
|
||||
public class TPackageProduct
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)]
|
||||
public string id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "groupid")]
|
||||
public int groupid { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.dbcrm
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("t_product")]
|
||||
public class TProduct
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)]
|
||||
public string id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "groupid")]
|
||||
public int groupid { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("a_month")]
|
||||
public partial class AMonth
|
||||
{
|
||||
public AMonth(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,ColumnName="yearmonth")]
|
||||
public int Yearmonth {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("a_order")]
|
||||
public partial class AOrder
|
||||
{
|
||||
public AOrder(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="id")]
|
||||
public int Id {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="orderid")]
|
||||
public int Orderid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="price")]
|
||||
public decimal? Price {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("a_pay1")]
|
||||
public partial class APay1
|
||||
{
|
||||
public APay1(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="orderid")]
|
||||
public int Orderid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="price")]
|
||||
public decimal Price {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("a_pay2")]
|
||||
public partial class APay2
|
||||
{
|
||||
public APay2(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="orderid")]
|
||||
public int Orderid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="price")]
|
||||
public decimal Price {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("a_pay3")]
|
||||
public partial class APay3
|
||||
{
|
||||
public APay3(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="id")]
|
||||
public int Id {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="orderid")]
|
||||
public int Orderid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="price")]
|
||||
public decimal? Price {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,131 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("assignrules")]
|
||||
public partial class Assignrules
|
||||
{
|
||||
public Assignrules(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="id")]
|
||||
public int Id {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:工号
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="eid")]
|
||||
public int Eid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:组别ID
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="salegroupid")]
|
||||
public int Salegroupid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:姓名
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="uname")]
|
||||
public string? Uname {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:最终比例
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="rate")]
|
||||
public decimal? Rate {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:档位数量
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="num")]
|
||||
public int? Num {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否限制
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="islimit")]
|
||||
public int? Islimit {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:限制数量
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="limitnum")]
|
||||
public int? Limitnum {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否有效
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="isvalid")]
|
||||
public int? Isvalid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:渠道号
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="ch")]
|
||||
public int? Ch {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:档位
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="levelno")]
|
||||
public int? Levelno {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:部门比例
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="deptrate")]
|
||||
public decimal? Deptrate {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:客服ID
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="inneruserid")]
|
||||
public int? Inneruserid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:创建时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="ctime")]
|
||||
public string? Ctime {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
namespace 命名空间
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("bas_actlog")]
|
||||
public partial class BasActlog
|
||||
{
|
||||
public BasActlog(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="id")]
|
||||
public int Id {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:动作类型
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="acttype")]
|
||||
public int? Acttype {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:动作类型名称
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="acttypename")]
|
||||
public string? Acttypename {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:操作人
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="operator")]
|
||||
public int? Operator {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:操作人姓名
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="operatorname")]
|
||||
public string? Operatorname {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:状态
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="status")]
|
||||
public int? Status {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:操作时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="operationtime")]
|
||||
public DateTime? Operationtime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="remark")]
|
||||
public string? Remark {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("bas_adchannel")]
|
||||
public partial class BasAdchannel
|
||||
{
|
||||
public BasAdchannel(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="ch")]
|
||||
public string? Ch {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="adtype")]
|
||||
public string? Adtype {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="aduser")]
|
||||
public string? Aduser {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="chtype")]
|
||||
public int? Chtype {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///序列表
|
||||
///</summary>
|
||||
[SugarTable("bas_aseq")]
|
||||
public partial class BasAseq
|
||||
{
|
||||
public BasAseq(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:序列名称
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,ColumnName="name")]
|
||||
public string Name {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:开始名称
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="start_value")]
|
||||
public long Start_value {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:1
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="increment_value")]
|
||||
public int Increment_value {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("bas_budget")]
|
||||
public partial class BasBudget
|
||||
{
|
||||
public BasBudget(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="id")]
|
||||
public int Id {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="companyname")]
|
||||
public string? Companyname {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="channel")]
|
||||
public string? Channel {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="productid")]
|
||||
public int? Productid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="budget")]
|
||||
public int? Budget {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="sort")]
|
||||
public int? Sort {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="isdelete")]
|
||||
public int? Isdelete {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="type")]
|
||||
public int? Type {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="year")]
|
||||
public int? Year {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="month")]
|
||||
public int? Month {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,139 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///公司/代理商
|
||||
///</summary>
|
||||
[SugarTable("bas_company")]
|
||||
public partial class BasCompany
|
||||
{
|
||||
public BasCompany(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:公司ID
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="companyid")]
|
||||
public int Companyid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:公司名
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="companyname")]
|
||||
public string? Companyname {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否外部公司
|
||||
/// Default:0
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="isouteragent")]
|
||||
public int? Isouteragent {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:上级公司
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="parentid")]
|
||||
public int? Parentid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:公司编码
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="companycode")]
|
||||
public string? Companycode {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:包含业务
|
||||
/// Default:1
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="businessvalue")]
|
||||
public int Businessvalue {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:创建时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="ctime")]
|
||||
public DateTime? Ctime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:创建人
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="createuser")]
|
||||
public int? Createuser {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:修改时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="utime")]
|
||||
public DateTime? Utime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:修改人
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="updateuser")]
|
||||
public int? Updateuser {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:公司简介
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="comments")]
|
||||
public string? Comments {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:系统编码
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="systemcode")]
|
||||
public string? Systemcode {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:机构简称
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="organname")]
|
||||
public string? Organname {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:开始渠道号
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="minchannelcode")]
|
||||
public int? Minchannelcode {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:结束渠道号
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="maxchannelcode")]
|
||||
public int? Maxchannelcode {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("bas_companychannel")]
|
||||
public partial class BasCompanychannel
|
||||
{
|
||||
public BasCompanychannel(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="id")]
|
||||
public int Id {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="companycode")]
|
||||
public string? Companycode {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="min")]
|
||||
public int? Min {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="max")]
|
||||
public int? Max {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="defult")]
|
||||
public int? Defult {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("bas_companyvirtual")]
|
||||
public partial class BasCompanyvirtual
|
||||
{
|
||||
public BasCompanyvirtual(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,ColumnName="id")]
|
||||
public int Id {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:公司名称
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="companyname")]
|
||||
public string? Companyname {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:推送编码
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="companycode")]
|
||||
public string? Companycode {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:渠道段
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="channel")]
|
||||
public string? Channel {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="sort")]
|
||||
public int? Sort {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="isdelete")]
|
||||
public int? Isdelete {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:公司实际编码
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="deptcode")]
|
||||
public string? Deptcode {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("bas_companywework")]
|
||||
public partial class BasCompanywework
|
||||
{
|
||||
public BasCompanywework(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,ColumnName="id")]
|
||||
public int Id {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="companyname")]
|
||||
public string? Companyname {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="channel")]
|
||||
public string? Channel {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:企业微信userid
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="userid")]
|
||||
public string? Userid {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///组别表
|
||||
///</summary>
|
||||
[SugarTable("bas_innergroup")]
|
||||
public partial class BasInnergroup
|
||||
{
|
||||
public BasInnergroup(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:组id
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="gid")]
|
||||
public int Gid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:营业部ID
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="saledeptid")]
|
||||
public int? Saledeptid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:组名
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="gname")]
|
||||
public string Gname {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:所属部门
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="deptid")]
|
||||
public int? Deptid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:创建时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="ctime")]
|
||||
public DateTime? Ctime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:创建人
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="createuser")]
|
||||
public int? Createuser {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:修改时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="utime")]
|
||||
public DateTime? Utime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:修改人
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="updateuser")]
|
||||
public int? Updateuser {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否隐藏(逻辑删除)
|
||||
/// Default:0
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="ishide")]
|
||||
public int? Ishide {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否为销售组0:不是 1:是
|
||||
/// Default:1
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="issaledept")]
|
||||
public int? Issaledept {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,155 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///员工
|
||||
///</summary>
|
||||
[SugarTable("bas_inneruser")]
|
||||
public partial class BasInneruser
|
||||
{
|
||||
public BasInneruser(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:员工id
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="pkid")]
|
||||
public int Pkid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:姓名
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="uname")]
|
||||
public string Uname {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:工号
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="eid")]
|
||||
public int Eid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:性别
|
||||
/// Default:m
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="gender")]
|
||||
public string Gender {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:生日
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="birthday")]
|
||||
public DateTime Birthday {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:密码
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="password")]
|
||||
public string Password {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否离职
|
||||
/// Default:0
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="isdismiss")]
|
||||
public int Isdismiss {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:离职时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="dismisstime")]
|
||||
public DateTime? Dismisstime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:离职类型
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="dismisstype")]
|
||||
public int? Dismisstype {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:入职时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="entrydate")]
|
||||
public DateTime? Entrydate {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:创建时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="ctime")]
|
||||
public DateTime? Ctime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:创建人
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="createuser")]
|
||||
public int? Createuser {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:修改时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="utime")]
|
||||
public DateTime? Utime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:修改人
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="updateuser")]
|
||||
public int? Updateuser {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:转正时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="positivetime")]
|
||||
public DateTime? Positivetime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:真实姓名
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="truename")]
|
||||
public string? Truename {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否隐藏(逻辑删除)
|
||||
/// Default:0
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="ishide")]
|
||||
public int Ishide {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///用户与部门/组对应关系
|
||||
///</summary>
|
||||
[SugarTable("bas_innerusergroup")]
|
||||
public partial class BasInnerusergroup
|
||||
{
|
||||
public BasInnerusergroup(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:员工ID
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,ColumnName="inneruserid")]
|
||||
public int Inneruserid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:部门ID
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="deptid")]
|
||||
public int? Deptid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:组ID
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="gid")]
|
||||
public int? Gid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="ctime")]
|
||||
public DateTime? Ctime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:创建人
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="createuser")]
|
||||
public int? Createuser {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:修改时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="utime")]
|
||||
public DateTime? Utime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:修改人
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="updateuser")]
|
||||
public int? Updateuser {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///员工与角色关系
|
||||
///</summary>
|
||||
[SugarTable("bas_inneruserrole")]
|
||||
public partial class BasInneruserrole
|
||||
{
|
||||
public BasInneruserrole(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:员工ID
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,ColumnName="inneruserid")]
|
||||
public int Inneruserid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:角色ID
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,ColumnName="roleid")]
|
||||
public int Roleid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="ctime")]
|
||||
public DateTime? Ctime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:创建人
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="createuser")]
|
||||
public int? Createuser {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:修改时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="utime")]
|
||||
public DateTime? Utime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:修改人
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="updateuser")]
|
||||
public int? Updateuser {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///员工登录盐值表
|
||||
///</summary>
|
||||
[SugarTable("bas_innerusersalt")]
|
||||
public partial class BasInnerusersalt
|
||||
{
|
||||
public BasInnerusersalt(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:ID
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="pkid")]
|
||||
public int Pkid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:员工ID
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="inneruserid")]
|
||||
public int Inneruserid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:工号
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="eid")]
|
||||
public int Eid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:盐值
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="pwdsalt")]
|
||||
public string Pwdsalt {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:创建时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="ctime")]
|
||||
public DateTime? Ctime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:创建人
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="createuser")]
|
||||
public int? Createuser {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///系统菜单
|
||||
///</summary>
|
||||
[SugarTable("bas_leftmemu")]
|
||||
public partial class BasLeftmemu
|
||||
{
|
||||
public BasLeftmemu(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:菜单id
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="menuid")]
|
||||
public int Menuid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:模块ID
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="modulemenuid")]
|
||||
public int? Modulemenuid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:菜单名
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="mname")]
|
||||
public string Mname {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:菜单url
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="url")]
|
||||
public string Url {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否组
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="isgroup")]
|
||||
public int Isgroup {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否显示
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="isshow")]
|
||||
public int Isshow {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:权限id
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="rightid")]
|
||||
public string? Rightid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:父结点id
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="parentid")]
|
||||
public int? Parentid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:排序id
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="sortid")]
|
||||
public int? Sortid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:创建时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="ctime")]
|
||||
public DateTime? Ctime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:创建人
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="createuser")]
|
||||
public int? Createuser {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:图标
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="imageurl")]
|
||||
public string? Imageurl {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///登录日志
|
||||
///</summary>
|
||||
[SugarTable("bas_loginlog")]
|
||||
public partial class BasLoginlog
|
||||
{
|
||||
public BasLoginlog(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:键id
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="pkid")]
|
||||
public int Pkid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:用户id
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="inneruserid")]
|
||||
public int Inneruserid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:工号
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="logineid")]
|
||||
public int? Logineid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:登录时间
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="logintime")]
|
||||
public DateTime Logintime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:客户端IP
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="loginip")]
|
||||
public string Loginip {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:分机号
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="telnum")]
|
||||
public int? Telnum {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///模块菜单
|
||||
///</summary>
|
||||
[SugarTable("bas_modulemenu")]
|
||||
public partial class BasModulemenu
|
||||
{
|
||||
public BasModulemenu(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:模块ID
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="modulemenuid")]
|
||||
public int Modulemenuid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:菜单名
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="mname")]
|
||||
public string? Mname {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:权限id
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="rightid")]
|
||||
public string? Rightid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:图标名称
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="imageurl")]
|
||||
public string? Imageurl {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:排序ID
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="sortid")]
|
||||
public int? Sortid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:创建时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="ctime")]
|
||||
public DateTime? Ctime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:创建人
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="createuser")]
|
||||
public int? Createuser {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///系统参数配置
|
||||
///</summary>
|
||||
[SugarTable("bas_parameter")]
|
||||
public partial class BasParameter
|
||||
{
|
||||
public BasParameter(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:参数代码
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true)]
|
||||
public string PARAKEY {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:分组id
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? GROUPID {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:参数值
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? PARAVALUE {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:参数类型
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? PARATYPE {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:描述
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? REMARK {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:创建时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public DateTime? CTIME {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:创建人
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? CREATEUSER {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:修改时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public DateTime? UTIME {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:修改人
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? UPDATEUSER {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:编辑页面
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? EDITFORM {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:参数名
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? PARANAME {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:营业部代码
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? DEPTCDOE {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("bas_parametergroup")]
|
||||
public partial class BasParametergroup
|
||||
{
|
||||
public BasParametergroup(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:分组id
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true)]
|
||||
public string GROUPID {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:分组名
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public string GROUPNAME {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:创建时间
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public DateTime CTIME {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:创建人
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public long CREATEUSER {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("bas_permission")]
|
||||
public partial class BasPermission
|
||||
{
|
||||
public BasPermission(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:菜单权限主键
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="id")]
|
||||
public int Id {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:父元素ID:0无父元素
|
||||
/// Default:0
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="prentid")]
|
||||
public int? Prentid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:菜单名称
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="name")]
|
||||
public string? Name {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:图标:无则为空
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="icon")]
|
||||
public string? Icon {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:排序
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="sort")]
|
||||
public int? Sort {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:1:一级菜单 2:二级菜单 3:三级菜单 4:四级菜单 类推
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="type")]
|
||||
public int? Type {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:0:普通菜单 1:隐藏菜单
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="ishidden")]
|
||||
public int? Ishidden {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:CURRENT_TIMESTAMP
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="ctime")]
|
||||
public DateTime? Ctime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:添加工号
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="ceid")]
|
||||
public int? Ceid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:0:正常 1:禁用
|
||||
/// Default:0
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="isforbidden")]
|
||||
public int? Isforbidden {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:编码
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="code")]
|
||||
public string? Code {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:地址
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="url")]
|
||||
public string? Url {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("bas_permission_button")]
|
||||
public partial class BasPermissionButton
|
||||
{
|
||||
public BasPermissionButton(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="id")]
|
||||
public int Id {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:权限ID
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="pid")]
|
||||
public int? Pid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:按钮名称
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="name")]
|
||||
public string? Name {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:按钮ID
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="buttonid")]
|
||||
public int? Buttonid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:按钮编码
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="code")]
|
||||
public string? Code {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("bas_right")]
|
||||
public partial class BasRight
|
||||
{
|
||||
public BasRight(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,ColumnName="rightid")]
|
||||
public string Rightid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="rname")]
|
||||
public string Rname {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:0
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="sortid")]
|
||||
public int Sortid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="ctime")]
|
||||
public DateTime? Ctime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="createuser")]
|
||||
public int? Createuser {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="groupid")]
|
||||
public int? Groupid {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("bas_right_toolbutton")]
|
||||
public partial class BasRightToolbutton
|
||||
{
|
||||
public BasRightToolbutton(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:权限id
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,ColumnName="rightid")]
|
||||
public string Rightid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:按钮ID
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="buttonid")]
|
||||
public int Buttonid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:按钮名称
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="buttonname")]
|
||||
public string? Buttonname {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:按钮编码
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="buttoncode")]
|
||||
public string Buttoncode {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("bas_rightgroup")]
|
||||
public partial class BasRightgroup
|
||||
{
|
||||
public BasRightgroup(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="pkid")]
|
||||
public int Pkid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="name")]
|
||||
public string Name {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="parentid")]
|
||||
public int Parentid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="ctime")]
|
||||
public DateTime? Ctime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="createuser")]
|
||||
public int? Createuser {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("bas_role")]
|
||||
public partial class BasRole
|
||||
{
|
||||
public BasRole(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="roleid")]
|
||||
public int Roleid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="rname")]
|
||||
public string Rname {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:0
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="sortid")]
|
||||
public int Sortid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="ctime")]
|
||||
public DateTime? Ctime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="createuser")]
|
||||
public int? Createuser {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="utime")]
|
||||
public DateTime? Utime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="updateuser")]
|
||||
public int? Updateuser {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="code")]
|
||||
public string? Code {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("bas_role_com")]
|
||||
public partial class BasRoleCom
|
||||
{
|
||||
public BasRoleCom(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="id")]
|
||||
public int Id {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:角色ID
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="roleid")]
|
||||
public int? Roleid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:可管理的公司ID
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="companycode")]
|
||||
public string? Companycode {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="ctime")]
|
||||
public DateTime? Ctime {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("bas_role_permission")]
|
||||
public partial class BasRolePermission
|
||||
{
|
||||
public BasRolePermission(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:角色ID
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,ColumnName="rid")]
|
||||
public int Rid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:权限ID
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,ColumnName="pid")]
|
||||
public int Pid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:角色名称(冗余字段,便于查看)
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="rname")]
|
||||
public string? Rname {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:权限CODE
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="code")]
|
||||
public string Code {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:权限名称(冗余字段,便于查看)
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="pname")]
|
||||
public string? Pname {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:子工具栏权限
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="toolbaravlue")]
|
||||
public int? Toolbaravlue {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("bas_rolerightresource")]
|
||||
public partial class BasRolerightresource
|
||||
{
|
||||
public BasRolerightresource(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,ColumnName="roleid")]
|
||||
public int Roleid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:权限id
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,ColumnName="rightid")]
|
||||
public string Rightid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="ctime")]
|
||||
public DateTime? Ctime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="createuser")]
|
||||
public int? Createuser {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="toolbarvalue")]
|
||||
public int? Toolbarvalue {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///营业部
|
||||
///</summary>
|
||||
[SugarTable("bas_salesdepartment")]
|
||||
public partial class BasSalesdepartment
|
||||
{
|
||||
public BasSalesdepartment(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:营业部ID
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="saledeptid")]
|
||||
public int Saledeptid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:公司ID
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="companyid")]
|
||||
public int? Companyid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:编码
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="saledeptcode")]
|
||||
public string Saledeptcode {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:名称
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="deptname")]
|
||||
public string Deptname {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:地址
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="address")]
|
||||
public string? Address {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:联系人
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="linkname")]
|
||||
public string? Linkname {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:邮编
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="areacode")]
|
||||
public string? Areacode {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:联系电话
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="phone")]
|
||||
public string? Phone {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:创建时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="creationdate")]
|
||||
public DateTime? Creationdate {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:创建人
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="creationby")]
|
||||
public int? Creationby {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:修改时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="updatedate")]
|
||||
public DateTime? Updatedate {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:修改人
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="updateby")]
|
||||
public int? Updateby {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,179 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("bill_account")]
|
||||
public partial class BillAccount
|
||||
{
|
||||
public BillAccount(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="id")]
|
||||
public long Id {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:商户
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="mch")]
|
||||
public string? Mch {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:商户id
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="mch_id")]
|
||||
public string? Mch_id {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="mch_no")]
|
||||
public string? Mch_no {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="trade_no")]
|
||||
public string? Trade_no {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="out_trade_no")]
|
||||
public string? Out_trade_no {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="trade_datetime")]
|
||||
public DateTime Trade_datetime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="trade_amount")]
|
||||
public decimal Trade_amount {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="fee_amount")]
|
||||
public decimal Fee_amount {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="trade_type")]
|
||||
public string? Trade_type {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="out_mch")]
|
||||
public string? Out_mch {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="payer_name")]
|
||||
public string? Payer_name {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="payer_id")]
|
||||
public string? Payer_id {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="out_mchid")]
|
||||
public string? Out_mchid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="trade_info")]
|
||||
public string? Trade_info {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="refund_info")]
|
||||
public string? Refund_info {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="main_trade_no")]
|
||||
public string? Main_trade_no {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="creat_id")]
|
||||
public string? Creat_id {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:CURRENT_TIMESTAMP(4)
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="creat_datetime")]
|
||||
public DateTime? Creat_datetime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:CURRENT_TIMESTAMP(4)
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="last_modify_time")]
|
||||
public DateTime? Last_modify_time {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("check_contract_log")]
|
||||
public partial class CheckContractLog
|
||||
{
|
||||
public CheckContractLog(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="id")]
|
||||
public int Id {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:访问ip
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="ip")]
|
||||
public string? Ip {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:访问来源
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="source")]
|
||||
public string? Source {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:工号
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="eid")]
|
||||
public string? Eid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:合同id
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="contractid")]
|
||||
public string? Contractid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:入库时间
|
||||
/// Default:CURRENT_TIMESTAMP
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="ctime")]
|
||||
public DateTime? Ctime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:协议类型
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="agreementtype")]
|
||||
public int? Agreementtype {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:用户名
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="name")]
|
||||
public string? Name {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,176 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("cms_news")]
|
||||
public partial class CmsNews
|
||||
{
|
||||
public CmsNews(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true)]
|
||||
public int Id {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? NewsType {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? Title {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? Content {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? Status {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? CreateUser {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? CreateUserName {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public DateTime? CTime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? Att {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? Remark {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:审核时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public DateTime? StatusTime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? Auditer {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? AuditerName {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? AuditRemark {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:事业部编码
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="deptcode")]
|
||||
public string Deptcode {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:审核图片
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? AuditImg1 {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:审核图片
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? AuditImg2 {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:审核图片
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? AuditImg3 {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:审核图片
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? AuditImg4 {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:审核图片
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? AuditImg5 {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:审核图片
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? AuditImg6 {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:事业部编码
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true)]
|
||||
public string Companycode {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,162 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("cms_news_log")]
|
||||
public partial class CmsNewsLog
|
||||
{
|
||||
public CmsNewsLog(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="id")]
|
||||
public int Id {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="newid")]
|
||||
public int Newid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? NewsType {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? Title {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? Content {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? Status {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? OpUser {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? OpName {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:事件事件
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public DateTime? CTime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? Att {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? Remark {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:事业部编码
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="deptcode")]
|
||||
public string Deptcode {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:事件: 提交、复提交、通过审核、驳回
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? OpEvent {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:审核备注
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? CheckRemark {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:审核图片
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? AuditImg1 {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:审核图片
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? AuditImg2 {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:审核图片
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? AuditImg3 {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:审核图片
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? AuditImg4 {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:审核图片
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? AuditImg5 {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:审核图片
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? AuditImg6 {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,260 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("csvr_ai_calltask")]
|
||||
public partial class CsvrAiCalltask
|
||||
{
|
||||
public CsvrAiCalltask()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:任务ID
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true, ColumnName = "id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:机器人编号
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "robot")]
|
||||
public string? Robot { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:客户ID,号码根据此ID进行查找
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "resid")]
|
||||
public string? Resid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:外显号码
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "callNo")]
|
||||
public string? CallNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:优先级别1-紧急 2-优先
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "priority")]
|
||||
public string? Priority { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:机器人参数
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "props")]
|
||||
public string? Props { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:应用ID
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "appId")]
|
||||
public string? AppId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:扩展信息
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "ext")]
|
||||
public string? Ext { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否发短信提醒0:否,1:是,2:已发
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "sms")]
|
||||
public int? Sms { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 发短信提醒时间
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "smstime")]
|
||||
public DateTime? Smstime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:目标执行时间:根据这个时间来进行调用新增任务接口
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "exetime")]
|
||||
public DateTime? Exetime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:任务状态 0:未执行 1:已执行 2:结果已返回
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "status")]
|
||||
public int? Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:创建时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "ctime")]
|
||||
public DateTime? Ctime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:智能云呼平台任务ID
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "platSingleTaskId")]
|
||||
public string? PlatSingleTaskId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:结果返回:0:成功 1:失败 2:过期
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "callRet")]
|
||||
public string? CallRet { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:结果返回:若外呼失败,该字段为失败原因
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "retDesc")]
|
||||
public string? RetDesc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:结果返回:外呼开始时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "startTime")]
|
||||
public DateTime? StartTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:结果返回:外呼结束时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "endTime")]
|
||||
public DateTime? EndTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:结果返回:会话标签json
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "labels")]
|
||||
public string? Labels { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:结果返回:交互记录(jsonlist)
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "interact")]
|
||||
public string? Interact { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:结果返回:全程通话音频
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "audio")]
|
||||
public string? Audio { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:结果返回:业务参数
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "content")]
|
||||
public string? Content { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:修改时间,系统自动更新
|
||||
/// Default:CURRENT_TIMESTAMP
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "utime")]
|
||||
public DateTime? Utime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 服务时长(单位:s)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "svcTime")]
|
||||
public int? SvcTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外部任务ID,提交给讯飞的唯一ID
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "extTaskId")]
|
||||
public string? ExtTaskId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 智能外呼状态
|
||||
/// -1、忽略不做智能外呼
|
||||
/// 0、尚未进行智能外呼
|
||||
/// 1、等待AI外呼
|
||||
/// 2、已提交AI外呼
|
||||
/// 3、AI外呼失败(未答完)
|
||||
/// 4、AI外呼未接通
|
||||
/// 5、AI外呼成功
|
||||
/// 6、等待AI重拨
|
||||
/// 7、AI外呼失败(挂断)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "ai_hgrecord_status")]
|
||||
public int? AiHgrecordStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 智能外呼状态名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "ai_hgrecord_statusname")]
|
||||
public string? AiHgrecordStatusname
|
||||
{ get { return AiHgrecordStatusnameKV[AiHgrecordStatus.Value]; } }
|
||||
|
||||
[SugarColumn(ColumnName = "hascall")]
|
||||
public int? HasCall { get; set; }
|
||||
|
||||
private static Dictionary<int, string> GetAiHgrecordStatusnameKV()
|
||||
{
|
||||
Dictionary<int, string> Ai_hgrecord_statusnameKV = new()
|
||||
{
|
||||
{-2, "AI重拨失败" },
|
||||
{ -1, "忽略不做智能外呼" },
|
||||
{ 0, "尚未进行智能外呼" },
|
||||
{ 1, "等待AI外呼" },
|
||||
{ 2, "已提交AI外呼" },
|
||||
{ 3, "AI外呼失败(未答完)" },
|
||||
{ 4, "AI外呼未接通" },
|
||||
{ 5, "AI外呼成功" },
|
||||
{ 6, "等待AI重拨" },
|
||||
{ 7, "AI外呼失败(挂断)" },
|
||||
{ 8, "AI外呼取消" },
|
||||
{ 9, "人工回访成功" }
|
||||
};
|
||||
return Ai_hgrecord_statusnameKV;
|
||||
}
|
||||
|
||||
private static Dictionary<int, string> AiHgrecordStatusnameKV = GetAiHgrecordStatusnameKV();
|
||||
|
||||
[SugarColumn(ColumnName = "Rounds")]
|
||||
public int? Rounds { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("csvr_ai_calltask_orders")]
|
||||
public partial class CsvrAiCalltaskOrders
|
||||
{
|
||||
public CsvrAiCalltaskOrders(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,ColumnName="id")]
|
||||
public int Id {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:csvr_ai_calltask的ID
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="taskid")]
|
||||
public int? Taskid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:订单号,wx_szzyorder的orderid
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="orderid")]
|
||||
public int? Orderid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:产品名称
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="subproductname")]
|
||||
public string? Subproductname {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:客户姓名
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="cname")]
|
||||
public string? Cname {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:身份证信息
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="idcard")]
|
||||
public string? Idcard {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,187 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("csvr_hgrecord")]
|
||||
public partial class CsvrHgrecord
|
||||
{
|
||||
public CsvrHgrecord(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:id自增
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="id")]
|
||||
public int Id {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="pkid")]
|
||||
public long Pkid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="orderid")]
|
||||
public long Orderid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="recordid")]
|
||||
public long Recordid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="filename")]
|
||||
public string? Filename {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="resid")]
|
||||
public string? Resid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="servicenumber")]
|
||||
public string? Servicenumber {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="telnumberlast4")]
|
||||
public string? Telnumberlast4 {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="timelength")]
|
||||
public int? Timelength {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="saleseid")]
|
||||
public long? Saleseid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="timestart")]
|
||||
public DateTime? Timestart {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="timeend")]
|
||||
public DateTime? Timeend {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="ctime")]
|
||||
public DateTime? Ctime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="inneruserid")]
|
||||
public long? Inneruserid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="memoid")]
|
||||
public long? Memoid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="isdown")]
|
||||
public int? Isdown {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="serverid")]
|
||||
public string? Serverid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:1
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="recordtype")]
|
||||
public int? Recordtype {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="content")]
|
||||
public string? Content {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:公司编码
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="companycode")]
|
||||
public string? Companycode {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:CURRENT_TIMESTAMP
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="createtime")]
|
||||
public DateTime? Createtime {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("csvr_message")]
|
||||
public partial class CsvrMessage
|
||||
{
|
||||
public CsvrMessage(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="id")]
|
||||
public int Id {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:接收人
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="eid")]
|
||||
public int? Eid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:消息编码
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="msgcode")]
|
||||
public string? Msgcode {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:消息
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="message")]
|
||||
public string? Message {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:消息时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="ctime")]
|
||||
public DateTime? Ctime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:0:未读 1:已读
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="islook")]
|
||||
public int? Islook {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:读取时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="looktime")]
|
||||
public DateTime? Looktime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:来源
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="fromer")]
|
||||
public string? Fromer {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:参数例如{”orderid“:"10023"}
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="param")]
|
||||
public string? Param {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///消息通知表
|
||||
///</summary>
|
||||
[SugarTable("csvr_message_type")]
|
||||
public partial class CsvrMessageType
|
||||
{
|
||||
public CsvrMessageType(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="id")]
|
||||
public int Id {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:消息编码唯一值
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="msgcode")]
|
||||
public string Msgcode {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:类型标题
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="title")]
|
||||
public string? Title {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:描述
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="content")]
|
||||
public string? Content {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:eid:指定工号 role:推给所有指定角色人 all:所有人
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="sendtype")]
|
||||
public string? Sendtype {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:推送配置
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="sendConfig")]
|
||||
public string? SendConfig {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:创建时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="ctime")]
|
||||
public DateTime? Ctime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:创建人
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="createuser")]
|
||||
public int? Createuser {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:修改时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="utime")]
|
||||
public DateTime? Utime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:修改人
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="updateuser")]
|
||||
public int? Updateuser {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:状态1:正常 0:禁用
|
||||
/// Default:1
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="status")]
|
||||
public int? Status {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:排序
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="sort")]
|
||||
public int? Sort {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("exam_itembank")]
|
||||
public partial class ExamItembank
|
||||
{
|
||||
public ExamItembank(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,ColumnName="id")]
|
||||
public int Id {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="title")]
|
||||
public string? Title {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="type")]
|
||||
public int? Type {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="typename")]
|
||||
public string? Typename {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="ctime")]
|
||||
public DateTime? Ctime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="createuser")]
|
||||
public int? Createuser {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("exam_itembanksubject")]
|
||||
public partial class ExamItembanksubject
|
||||
{
|
||||
public ExamItembanksubject(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,ColumnName="id")]
|
||||
public int Id {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="itembankid")]
|
||||
public int? Itembankid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="subjecttype")]
|
||||
public int? Subjecttype {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="subject")]
|
||||
public string? Subject {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="options")]
|
||||
public string? Options {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="rightanswer")]
|
||||
public string? Rightanswer {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="remark")]
|
||||
public string? Remark {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="itembanktype")]
|
||||
public int? Itembanktype {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,131 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("exam_paper")]
|
||||
public partial class ExamPaper
|
||||
{
|
||||
public ExamPaper(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="id")]
|
||||
public int Id {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="title")]
|
||||
public string? Title {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="type")]
|
||||
public int? Type {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="typename")]
|
||||
public string? Typename {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="totalscore")]
|
||||
public int? Totalscore {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="eid")]
|
||||
public int? Eid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="score")]
|
||||
public int? Score {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="starttime")]
|
||||
public DateTime? Starttime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="endtime")]
|
||||
public DateTime? Endtime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="timelength")]
|
||||
public int? Timelength {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="handtime")]
|
||||
public DateTime? Handtime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="usetime")]
|
||||
public int? Usetime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="appid")]
|
||||
public string? Appid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="appuserid")]
|
||||
public string? Appuserid {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("exam_papersubject")]
|
||||
public partial class ExamPapersubject
|
||||
{
|
||||
public ExamPapersubject(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="id")]
|
||||
public int Id {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="paperid")]
|
||||
public int? Paperid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="papertype")]
|
||||
public int? Papertype {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="subjecttype")]
|
||||
public int? Subjecttype {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="subject")]
|
||||
public string? Subject {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="options")]
|
||||
public string? Options {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="rightanswer")]
|
||||
public string? Rightanswer {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="remark")]
|
||||
public string? Remark {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="answer")]
|
||||
public string? Answer {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="rn")]
|
||||
public int? Rn {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,227 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///合规消息只合规客服发送的消息
|
||||
///</summary>
|
||||
[SugarTable("hg_qw_message")]
|
||||
public partial class HgQwMessage
|
||||
{
|
||||
public HgQwMessage(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,ColumnName="id")]
|
||||
public int Id {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:序号
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="seq")]
|
||||
public int? Seq {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:消息ID
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="msgid")]
|
||||
public string? Msgid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:消息类型
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="msgtype")]
|
||||
public string? Msgtype {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:发送类型
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="action")]
|
||||
public string? Action {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:客服
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="fromer")]
|
||||
public string? Fromer {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:客户
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="tolist")]
|
||||
public string? Tolist {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:群号
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="roomid")]
|
||||
public string? Roomid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:扩展
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="ext")]
|
||||
public string? Ext {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:内容
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="content")]
|
||||
public string? Content {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:地址
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="nfile")]
|
||||
public string? Nfile {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:消息时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="msgtime")]
|
||||
public DateTime? Msgtime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:系统创建的时间
|
||||
/// Default:CURRENT_TIMESTAMP
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="ctime")]
|
||||
public DateTime Ctime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:合规状态 500违规 200已读 90未读
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="hgstatus")]
|
||||
public int? Hgstatus {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:合规时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="hgtime")]
|
||||
public DateTime? Hgtime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:0 客户发给客服 1客服发给客户
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="issend")]
|
||||
public int? Issend {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:客服名称
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="kehuname")]
|
||||
public string? Kehuname {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:客户名称
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="cusname")]
|
||||
public string? Cusname {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:企业ID
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="corpid")]
|
||||
public string? Corpid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:违规关键词
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="word")]
|
||||
public string? Word {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:语音地址
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="voiceUrl")]
|
||||
public string? VoiceUrl {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:事业部编码
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="detpcode")]
|
||||
public string? Detpcode {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:同步上来的时间
|
||||
/// Default:CURRENT_TIMESTAMP
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="synctime")]
|
||||
public DateTime Synctime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:违规状态 1:违规 0 未违规
|
||||
/// Default:0
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="iswg")]
|
||||
public int? Iswg {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="eid")]
|
||||
public int? Eid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:工号对应的姓名
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="eidname")]
|
||||
public string? Eidname {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,163 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("hg_record_message")]
|
||||
public partial class HgRecordMessage
|
||||
{
|
||||
public HgRecordMessage(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,ColumnName="id")]
|
||||
public int Id {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="pkid")]
|
||||
public int? Pkid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="checkdate")]
|
||||
public DateTime? Checkdate {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="ctime")]
|
||||
public DateTime? Ctime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="transtime")]
|
||||
public DateTime? Transtime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="transcontent")]
|
||||
public string? Transcontent {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="hgstatus")]
|
||||
public int? Hgstatus {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="hgtime")]
|
||||
public DateTime? Hgtime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="voiceurl")]
|
||||
public string? Voiceurl {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="resid")]
|
||||
public string? Resid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="filename")]
|
||||
public string? Filename {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="customername")]
|
||||
public string? Customername {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="saleseid")]
|
||||
public int? Saleseid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="salename")]
|
||||
public string? Salename {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="word")]
|
||||
public string? Word {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:事业部编码
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="detpcode")]
|
||||
public string? Detpcode {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:同步上来的时间
|
||||
/// Default:CURRENT_TIMESTAMP
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="synctime")]
|
||||
public DateTime Synctime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:违规状态 1:违规 0 未违规
|
||||
/// Default:0
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="iswg")]
|
||||
public int? Iswg {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,211 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("hg_violation")]
|
||||
public partial class HgViolation
|
||||
{
|
||||
public HgViolation(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="id")]
|
||||
public int Id {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:数据ID
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="hgid")]
|
||||
public int? Hgid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:企微得seq 微信和录音得pkid
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="pkid")]
|
||||
public int? Pkid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:企微和微信得消息ID,录音无
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="msgid")]
|
||||
public string? Msgid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:消息类型 文本;企微通话;语音;电话录音
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="msgtype")]
|
||||
public string? Msgtype {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:发送类型
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="action")]
|
||||
public string? Action {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:客服
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="fromer")]
|
||||
public string? Fromer {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:客服名称
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="kefuname")]
|
||||
public string? Kefuname {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:客户
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="touser")]
|
||||
public string? Touser {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:客户名称
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="cusname")]
|
||||
public string? Cusname {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:企业ID(企业微信才有)
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="corpid")]
|
||||
public string? Corpid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:合规时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="hgtime")]
|
||||
public DateTime? Hgtime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:违规关键词
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="word")]
|
||||
public string? Word {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:语音地址
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="voiceUrl")]
|
||||
public string? VoiceUrl {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:内容
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="content")]
|
||||
public string? Content {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:工号
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="eid")]
|
||||
public int? Eid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:员工姓名
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="uname")]
|
||||
public string? Uname {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:事业部编码
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="detpcode")]
|
||||
public string? Detpcode {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:合规类型
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="hgtype")]
|
||||
public string? Hgtype {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:合规类型小类
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="hgsubtype")]
|
||||
public string? Hgsubtype {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:违规细则
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="hgdetail")]
|
||||
public string? Hgdetail {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:处理结果
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="hgresult")]
|
||||
public string? Hgresult {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:WX:微信 QW:企业微信 PHONE:电话录音
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="type")]
|
||||
public string? Type {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:资源ID
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="resid")]
|
||||
public string? Resid {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,179 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("hg_wx_message")]
|
||||
public partial class HgWxMessage
|
||||
{
|
||||
public HgWxMessage(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,ColumnName="id")]
|
||||
public int Id {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="pkid")]
|
||||
public int? Pkid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="msgsvrid")]
|
||||
public string? Msgsvrid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="msgtype")]
|
||||
public int? Msgtype {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="issend")]
|
||||
public int? Issend {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="talker")]
|
||||
public string? Talker {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="username")]
|
||||
public string? Username {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="nickname")]
|
||||
public string? Nickname {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="msgcontent")]
|
||||
public string? Msgcontent {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="imgpath")]
|
||||
public string? Imgpath {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="voiceUrl")]
|
||||
public string? VoiceUrl {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="ctime")]
|
||||
public DateTime? Ctime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否处理 1:已处理 0:未处理
|
||||
/// Default:0
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="hgstatus")]
|
||||
public int? Hgstatus {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:合规时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="hgtime")]
|
||||
public DateTime? Hgtime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="kefuname")]
|
||||
public string? Kefuname {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="word")]
|
||||
public string? Word {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="eid")]
|
||||
public int? Eid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:事业部编码
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="detpcode")]
|
||||
public string? Detpcode {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:同步上来的时间
|
||||
/// Default:CURRENT_TIMESTAMP
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="synctime")]
|
||||
public DateTime Synctime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:违规状态 1:违规 0 未违规
|
||||
/// Default:0
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="iswg")]
|
||||
public int? Iswg {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace SA.Entity.zxdcrm_Models
|
||||
{
|
||||
///<summary>
|
||||
///接口调用日志
|
||||
///</summary>
|
||||
[SugarTable("isvr_interfacecalllog")]
|
||||
public partial class IsvrInterfacecalllog
|
||||
{
|
||||
public IsvrInterfacecalllog(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:日志id
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="logid")]
|
||||
public int Logid {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:客户端ip
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="clientip")]
|
||||
public string? Clientip {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:接口服务
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="clienturl")]
|
||||
public string? Clienturl {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:调用参数
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="clientkey")]
|
||||
public string? Clientkey {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:调用时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="ctime")]
|
||||
public DateTime? Ctime {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName="clientkeyencode")]
|
||||
public string? Clientkeyencode {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue