Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
Education
Commits
fb2df615
Commit
fb2df615
authored
Dec 16, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增验证
parent
fe8707c2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
182 additions
and
25 deletions
+182
-25
CacheKey.cs
Edu.Cache/CacheKey.cs
+1
-1
AppletCustomerInfo.cs
Edu.Common/API/AppletCustomerInfo.cs
+5
-0
RB_Student.cs
Edu.Model/Entity/User/RB_Student.cs
+5
-0
StudentModule.cs
Edu.Module.User/StudentModule.cs
+16
-5
RB_StudentRepository.cs
Edu.Repository/User/RB_StudentRepository.cs
+25
-3
UserController.cs
Edu.WebApi/Controllers/User/UserController.cs
+130
-16
No files found.
Edu.Cache/CacheKey.cs
View file @
fb2df615
...
@@ -78,7 +78,7 @@ namespace Edu.Cache
...
@@ -78,7 +78,7 @@ namespace Edu.Cache
/// </summary>
/// </summary>
public
static
string
AppletB2B_Login_Info_
public
static
string
AppletB2B_Login_Info_
{
{
get
{
return
"AppletB2B_Login_"
;
}
get
{
return
"AppletB2B_
Edu_
Login_"
;
}
}
}
}
}
...
...
Edu.Common/API/AppletCustomerInfo.cs
View file @
fb2df615
...
@@ -98,6 +98,11 @@ namespace Edu.Common.API
...
@@ -98,6 +98,11 @@ namespace Edu.Common.API
/// </summary>
/// </summary>
public
int
AdminId
{
get
;
set
;
}
public
int
AdminId
{
get
;
set
;
}
/// <summary>
/// 审批状态 1-审批通过,2-拒绝
/// </summary>
public
int
ApproveState
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 同行对应的销售编号
/// 同行对应的销售编号
/// </summary>
/// </summary>
...
...
Edu.Model/Entity/User/RB_Student.cs
View file @
fb2df615
...
@@ -201,5 +201,10 @@ namespace Edu.Model.Entity.User
...
@@ -201,5 +201,10 @@ namespace Edu.Model.Entity.User
/// 微信号
/// 微信号
/// </summary>
/// </summary>
public
string
WeChatNo
{
get
;
set
;
}
public
string
WeChatNo
{
get
;
set
;
}
/// <summary>
/// 客户类型
/// </summary>
public
int
StuType
{
get
;
set
;
}
}
}
}
}
Edu.Module.User/StudentModule.cs
View file @
fb2df615
...
@@ -233,14 +233,26 @@ namespace Edu.Module.User
...
@@ -233,14 +233,26 @@ namespace Edu.Module.User
/// 检查学员是否存在资料库
/// 检查学员是否存在资料库
/// </summary>
/// </summary>
/// <param name="model"></param>
/// <param name="model"></param>
/// <param name="Type">1-电话,2-QQ,3-微信号</param>
/// <returns></returns>
/// <returns></returns>
public
bool
CheckStudentModule
(
RB_Student_ViewModel
model
)
public
bool
CheckStudentModule
(
RB_Student_ViewModel
model
,
int
Type
)
{
{
List
<
WhereHelper
>
where
=
new
List
<
WhereHelper
>()
List
<
WhereHelper
>
where
=
new
List
<
WhereHelper
>()
{
{
new
WhereHelper
(
nameof
(
RB_Student_ViewModel
.
Group_Id
),
model
.
Group_Id
),
new
WhereHelper
(
nameof
(
RB_Student_ViewModel
.
Group_Id
),
model
.
Group_Id
),
new
WhereHelper
(
nameof
(
RB_Student_ViewModel
.
StuTel
),
model
.
StuTel
),
};
};
if
(
Type
==
1
)
{
where
.
Add
(
new
WhereHelper
(
nameof
(
RB_Student_ViewModel
.
StuTel
),
model
.
StuTel
));
}
if
(
Type
==
2
)
{
where
.
Add
(
new
WhereHelper
(
nameof
(
RB_Student_ViewModel
.
QQ
),
model
.
QQ
));
}
if
(
Type
==
3
)
{
where
.
Add
(
new
WhereHelper
(
nameof
(
RB_Student_ViewModel
.
WeChatNo
),
model
.
WeChatNo
));
}
if
(
model
.
StuId
>
0
)
if
(
model
.
StuId
>
0
)
{
{
where
.
Add
(
new
WhereHelper
()
where
.
Add
(
new
WhereHelper
()
...
@@ -258,10 +270,9 @@ namespace Edu.Module.User
...
@@ -258,10 +270,9 @@ namespace Edu.Module.User
/// </summary>
/// </summary>
/// <param name="Tel"></param>
/// <param name="Tel"></param>
/// <returns></returns>
/// <returns></returns>
public
RB_Student_ViewModel
GetStuByTelModule
(
string
Tel
)
public
RB_Student_ViewModel
CheckExistsStuModule
(
RB_Student_ViewModel
query
)
{
{
var
model
=
studentRepository
.
GetStuByTelRepository
(
new
RB_Student_ViewModel
()
{
StuTel
=
Tel
});
var
model
=
studentRepository
.
GetStuByTelRepository
(
query
);
return
model
;
return
model
;
}
}
...
...
Edu.Repository/User/RB_StudentRepository.cs
View file @
fb2df615
...
@@ -42,6 +42,11 @@ namespace Edu.Repository.User
...
@@ -42,6 +42,11 @@ namespace Edu.Repository.User
/// </summary>
/// </summary>
private
readonly
RB_CustomerRepository
customerRepository
=
new
RB_CustomerRepository
();
private
readonly
RB_CustomerRepository
customerRepository
=
new
RB_CustomerRepository
();
/// <summary>
/// 客户类型仓储层对象
/// </summary>
private
readonly
RB_Student_TypeRepository
student_TypeRepository
=
new
RB_Student_TypeRepository
();
/// <summary>
/// <summary>
/// 获取学生列表
/// 获取学生列表
/// </summary>
/// </summary>
...
@@ -390,6 +395,12 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
...
@@ -390,6 +395,12 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
{
{
logContent
+=
string
.
Format
(
"微信号:由【{0}】=>【{1}】,"
,
oldModel
.
WeChatNo
,
model
.
WeChatNo
);
logContent
+=
string
.
Format
(
"微信号:由【{0}】=>【{1}】,"
,
oldModel
.
WeChatNo
,
model
.
WeChatNo
);
}
}
if
(
oldModel
.
StuType
!=
model
.
StuType
)
{
string
oldName
=
student_TypeRepository
.
GetEntity
(
oldModel
.
StuType
)?.
Name
;
string
newName
=
student_TypeRepository
.
GetEntity
(
model
.
StuType
)?.
Name
;
logContent
+=
string
.
Format
(
"客户类型:由【{0}】=>【{1}】,"
,
oldName
,
newName
);
}
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
{
nameof
(
RB_Student_ViewModel
.
StuName
),
model
.
StuName
.
Trim
()
},
{
nameof
(
RB_Student_ViewModel
.
StuName
),
model
.
StuName
.
Trim
()
},
...
@@ -409,6 +420,7 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
...
@@ -409,6 +420,7 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
{
nameof
(
RB_Student_ViewModel
.
CustomerId
),
model
.
CustomerId
},
{
nameof
(
RB_Student_ViewModel
.
CustomerId
),
model
.
CustomerId
},
{
nameof
(
RB_Student_ViewModel
.
QQ
),
model
.
QQ
},
{
nameof
(
RB_Student_ViewModel
.
QQ
),
model
.
QQ
},
{
nameof
(
RB_Student_ViewModel
.
WeChatNo
),
model
.
WeChatNo
},
{
nameof
(
RB_Student_ViewModel
.
WeChatNo
),
model
.
WeChatNo
},
{
nameof
(
RB_Student_ViewModel
.
StuType
),
model
.
StuType
},
};
};
//教育后台操作
//教育后台操作
if
(
model
.
OperateType
==
1
)
if
(
model
.
OperateType
==
1
)
...
@@ -573,7 +585,7 @@ WHERE 1=1 AND YEARWEEK(date_format(t.CreateTime, '%Y-%m-%d')) = YEARWEEK(now())
...
@@ -573,7 +585,7 @@ WHERE 1=1 AND YEARWEEK(date_format(t.CreateTime, '%Y-%m-%d')) = YEARWEEK(now())
}
}
/// <summary>
/// <summary>
///
跟进电话号码
获取学员信息
///
根据电话号码、QQ、微信号
获取学员信息
/// </summary>
/// </summary>
/// <param name="query"></param>
/// <param name="query"></param>
/// <returns></returns>
/// <returns></returns>
...
@@ -593,10 +605,20 @@ WHERE 1=1
...
@@ -593,10 +605,20 @@ WHERE 1=1
{
{
builder
.
AppendFormat
(
" AND t.{0}={1} "
,
nameof
(
RB_Student_ViewModel
.
Group_Id
),
query
.
Group_Id
);
builder
.
AppendFormat
(
" AND t.{0}={1} "
,
nameof
(
RB_Student_ViewModel
.
Group_Id
),
query
.
Group_Id
);
}
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
StuTel
))
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
StuTel
))
{
{
builder
.
AppendFormat
(
" AND t.{0}='{1}' "
,
nameof
(
RB_Student_ViewModel
.
StuTel
),
query
.
StuTel
);
builder
.
AppendFormat
(
" AND t.{0}=@StuTel "
,
nameof
(
RB_Student_ViewModel
.
StuTel
));
parameters
.
Add
(
"StuTel"
,
query
.
StuTel
.
Trim
());
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
QQ
))
{
builder
.
AppendFormat
(
" AND t.{0}=@QQ "
,
nameof
(
RB_Student_ViewModel
.
QQ
));
parameters
.
Add
(
"QQ"
,
query
.
StuTel
.
Trim
());
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
WeChatNo
))
{
builder
.
AppendFormat
(
" AND t.{0}=@WeChatNo "
,
nameof
(
RB_Student_ViewModel
.
WeChatNo
));
parameters
.
Add
(
"WeChatNo"
,
query
.
WeChatNo
.
Trim
());
}
}
}
}
return
Get
<
RB_Student_ViewModel
>(
builder
.
ToString
(),
parameters
)?.
FirstOrDefault
();
return
Get
<
RB_Student_ViewModel
>(
builder
.
ToString
(),
parameters
)?.
FirstOrDefault
();
...
...
Edu.WebApi/Controllers/User/UserController.cs
View file @
fb2df615
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment