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
eafab7a6
Commit
eafab7a6
authored
Dec 14, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
50865acc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
0 deletions
+60
-0
StudentModule.cs
Edu.Module.User/StudentModule.cs
+11
-0
RB_StudentRepository.cs
Edu.Repository/User/RB_StudentRepository.cs
+34
-0
UserController.cs
Edu.WebApi/Controllers/User/UserController.cs
+15
-0
No files found.
Edu.Module.User/StudentModule.cs
View file @
eafab7a6
...
...
@@ -218,6 +218,17 @@ namespace Edu.Module.User
return
studentRepository
.
Exists
(
where
);
}
/// <summary>
/// 跟进电话号码获取学员信息
/// </summary>
/// <param name="Tel"></param>
/// <returns></returns>
public
RB_Student_ViewModel
GetStuByTelModule
(
string
Tel
)
{
var
model
=
studentRepository
.
GetStuByTelRepository
(
new
RB_Student_ViewModel
()
{
StuTel
=
Tel
});
return
model
;
}
/// <summary>
/// 添加修改学生
/// </summary>
...
...
Edu.Repository/User/RB_StudentRepository.cs
View file @
eafab7a6
...
...
@@ -473,5 +473,39 @@ WHERE 1=1 AND YEARWEEK(date_format(t.CreateTime, '%Y-%m-%d')) = YEARWEEK(now())
}
return
Get
<
RB_Student_ViewModel
>(
builder
.
ToString
(),
parameters
).
ToList
();
}
/// <summary>
/// 跟进电话号码获取学员信息
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
RB_Student_ViewModel
GetStuByTelRepository
(
RB_Student_ViewModel
query
)
{
var
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT t.*
FROM rb_student AS t
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND t.{0}={1} "
,
nameof
(
RB_Student_ViewModel
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
if
(
query
!=
null
)
{
if
(
query
.
Group_Id
>
0
)
{
builder
.
AppendFormat
(
" AND t.{0}={1} "
,
nameof
(
RB_Student_ViewModel
.
Group_Id
),
query
.
Group_Id
);
}
if
(
query
.
School_Id
>
-
1
)
{
builder
.
AppendFormat
(
" AND t.{0}={1} "
,
nameof
(
RB_Student_ViewModel
.
School_Id
),
query
.
School_Id
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
StuTel
))
{
builder
.
AppendFormat
(
" AND t.{0}='{1}' "
,
nameof
(
RB_Student_ViewModel
.
StuTel
));
}
}
return
Get
<
RB_Student_ViewModel
>(
builder
.
ToString
(),
parameters
)?.
FirstOrDefault
();
}
}
}
\ No newline at end of file
Edu.WebApi/Controllers/User/UserController.cs
View file @
eafab7a6
...
...
@@ -976,6 +976,8 @@ namespace Edu.WebApi.Controllers.User
return
ApiResult
.
Success
(
data
:
pageModel
);
}
/// <summary>
/// 获取学生实体
/// </summary>
...
...
@@ -1033,6 +1035,19 @@ namespace Edu.WebApi.Controllers.User
return
ApiResult
.
Success
(
data
:
obj
);
}
/// <summary>
/// 跟进电话号码获取学生信息
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetStudentByTel
()
{
var
StuTel
=
base
.
ParmJObj
.
GetStringValue
(
"StuTel"
);
var
extModel
=
studentModule
.
GetStuByTelModule
(
StuTel
);
return
ApiResult
.
Success
(
data
:
extModel
);
}
/// <summary>
/// 获取客户状态列表
/// </summary>
...
...
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