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
60c1b9c3
Commit
60c1b9c3
authored
Dec 09, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增客户日志修改
parent
147924e0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
116 additions
and
19 deletions
+116
-19
StudentLogTypeEnum.cs
Edu.Common/Enum/Log/StudentLogTypeEnum.cs
+7
-0
RB_Student_Log.cs
Edu.Model/Entity/Customer/RB_Student_Log.cs
+5
-0
CustomerStudentModule.cs
Edu.Module.Customer/CustomerStudentModule.cs
+73
-14
RB_Student_LogRepository.cs
Edu.Repository/Customer/RB_Student_LogRepository.cs
+4
-2
RB_StudentRepository.cs
Edu.Repository/User/RB_StudentRepository.cs
+24
-0
CustomerStudentController.cs
Edu.WebApi/Controllers/Customer/CustomerStudentController.cs
+3
-3
No files found.
Edu.Common/Enum/Log/StudentLogTypeEnum.cs
View file @
60c1b9c3
...
@@ -33,5 +33,12 @@ namespace Edu.Common.Enum.Log
...
@@ -33,5 +33,12 @@ namespace Edu.Common.Enum.Log
/// </summary>
/// </summary>
[
EnumField
(
"试听"
)]
[
EnumField
(
"试听"
)]
TrialLesson
=
4
,
TrialLesson
=
4
,
/// <summary>
/// 试听
/// </summary>
[
EnumField
(
"基础资料"
)]
BasicInfo
=
5
,
}
}
}
}
Edu.Model/Entity/Customer/RB_Student_Log.cs
View file @
60c1b9c3
...
@@ -28,6 +28,11 @@ namespace Edu.Model.Entity.Customer
...
@@ -28,6 +28,11 @@ namespace Edu.Model.Entity.Customer
/// </summary>
/// </summary>
public
StudentLogTypeEnum
LogType
{
get
;
set
;
}
public
StudentLogTypeEnum
LogType
{
get
;
set
;
}
/// <summary>
/// 日志标题
/// </summary>
public
string
LogTitle
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 日志内容
/// 日志内容
/// </summary>
/// </summary>
...
...
Edu.Module.Customer/CustomerStudentModule.cs
View file @
60c1b9c3
This diff is collapsed.
Click to expand it.
Edu.Repository/Customer/RB_Student_LogRepository.cs
View file @
60c1b9c3
...
@@ -46,20 +46,22 @@ WHERE 1=1
...
@@ -46,20 +46,22 @@ WHERE 1=1
/// </summary>
/// </summary>
/// <param name="StuId">学员编号</param>
/// <param name="StuId">学员编号</param>
/// <param name="LogType">日志类型</param>
/// <param name="LogType">日志类型</param>
/// <param name="LogTitle">日志标题</param>
/// <param name="LogContent">日志内容</param>
/// <param name="LogContent">日志内容</param>
/// <param name="CreateBy">创建人</param>
/// <param name="CreateBy">创建人</param>
/// <param name="CreateType">创建人类型(1-系统用户,2-同行用户)</param>
/// <param name="CreateType">创建人类型(1-系统用户,2-同行用户)</param>
/// <param name="Group_Id">集团编号</param>
/// <param name="Group_Id">集团编号</param>
/// <returns></returns>
/// <returns></returns>
public
bool
AddStuLogRepository
(
int
StuId
,
StudentLogTypeEnum
LogType
,
string
LogContent
,
int
CreateBy
,
int
CreateType
=
1
,
int
Group_Id
=
100000
)
public
bool
AddStuLogRepository
(
int
StuId
,
StudentLogTypeEnum
LogType
,
string
LogTitle
,
string
LogContent
,
int
CreateBy
,
int
CreateType
=
1
,
int
Group_Id
=
100000
)
{
{
var
newModel
=
new
RB_Student_Log_Extend
()
var
newModel
=
new
RB_Student_Log_Extend
()
{
{
LogId
=
0
,
LogId
=
0
,
StuId
=
StuId
,
StuId
=
StuId
,
LogType
=
LogType
,
LogType
=
LogType
,
CreateTime
=
DateTime
.
Now
,
LogTitle
=
LogTitle
,
LogContent
=
LogContent
,
LogContent
=
LogContent
,
CreateTime
=
DateTime
.
Now
,
CreateType
=
CreateType
,
CreateType
=
CreateType
,
CreateBy
=
CreateBy
,
CreateBy
=
CreateBy
,
Group_Id
=
Group_Id
Group_Id
=
Group_Id
...
...
Edu.Repository/User/RB_StudentRepository.cs
View file @
60c1b9c3
using
Edu.Common.Enum
;
using
Edu.Common.Enum
;
using
Edu.Model.ViewModel.User
;
using
Edu.Model.ViewModel.User
;
using
Edu.Repository.Customer
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
...
@@ -19,6 +20,11 @@ namespace Edu.Repository.User
...
@@ -19,6 +20,11 @@ namespace Edu.Repository.User
/// </summary>
/// </summary>
private
readonly
RB_AccountRepository
accountRepository
=
new
RB_AccountRepository
();
private
readonly
RB_AccountRepository
accountRepository
=
new
RB_AccountRepository
();
/// <summary>
/// 学员日志仓储层对象
/// </summary>
private
readonly
RB_Student_LogRepository
student_LogRepository
=
new
RB_Student_LogRepository
();
/// <summary>
/// <summary>
/// 获取学生列表
/// 获取学生列表
/// </summary>
/// </summary>
...
@@ -194,8 +200,13 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
...
@@ -194,8 +200,13 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
public
bool
SetStudentRepository
(
RB_Student_ViewModel
model
)
public
bool
SetStudentRepository
(
RB_Student_ViewModel
model
)
{
{
bool
flag
;
bool
flag
;
string
logContent
=
""
;
string
logTitle
=
""
;
int
createBy
=
0
;
if
(
model
.
StuId
>
0
)
if
(
model
.
StuId
>
0
)
{
{
logTitle
=
"修改客户"
;
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
()
},
...
@@ -222,6 +233,7 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
...
@@ -222,6 +233,7 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
{
nameof
(
RB_Student_ViewModel
.
StuStage
),
model
.
StuStage
},
{
nameof
(
RB_Student_ViewModel
.
StuStage
),
model
.
StuStage
},
};
};
flag
=
base
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Student_ViewModel
.
StuId
),
model
.
StuId
));
flag
=
base
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Student_ViewModel
.
StuId
),
model
.
StuId
));
createBy
=
model
.
UpdateBy
;
}
}
else
else
{
{
...
@@ -246,7 +258,19 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
...
@@ -246,7 +258,19 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
UpdateTime
=
DateTime
.
Now
,
UpdateTime
=
DateTime
.
Now
,
Password
=
Common
.
DES
.
Encrypt
(
Common
.
Config
.
DefaultPwd
)
Password
=
Common
.
DES
.
Encrypt
(
Common
.
Config
.
DefaultPwd
)
});
});
if
(
model
.
CreateType
==
1
)
{
createBy
=
model
.
CreateBy
;
}
else
{
createBy
=
model
.
CustomerId
;
}
logContent
=
"创建了该客户"
;
logTitle
=
"创建客户"
;
}
}
student_LogRepository
.
AddStuLogRepository
(
model
.
StuId
,
Common
.
Enum
.
Log
.
StudentLogTypeEnum
.
BasicInfo
,
logTitle
,
logContent
,
createBy
,
CreateType
:
model
.
CreateType
);
return
flag
;
return
flag
;
}
}
}
}
...
...
Edu.WebApi/Controllers/Customer/CustomerStudentController.cs
View file @
60c1b9c3
...
@@ -95,7 +95,7 @@ namespace Edu.WebApi.Controllers.Customer
...
@@ -95,7 +95,7 @@ namespace Edu.WebApi.Controllers.Customer
public
ApiResult
RemoveStudentAppointment
()
public
ApiResult
RemoveStudentAppointment
()
{
{
var
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
);
var
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
);
var
model
=
customerStudentModule
.
RemoveStudentAppointmentModule
(
Id
);
var
model
=
customerStudentModule
.
RemoveStudentAppointmentModule
(
Id
,
base
.
UserInfo
.
Id
);
return
ApiResult
.
Success
(
data
:
model
);
return
ApiResult
.
Success
(
data
:
model
);
}
}
...
@@ -167,7 +167,7 @@ namespace Edu.WebApi.Controllers.Customer
...
@@ -167,7 +167,7 @@ namespace Edu.WebApi.Controllers.Customer
public
ApiResult
RemoveStudentFollow
()
public
ApiResult
RemoveStudentFollow
()
{
{
var
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
);
var
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
);
var
model
=
customerStudentModule
.
RemoveStudentFollowModule
(
Id
);
var
model
=
customerStudentModule
.
RemoveStudentFollowModule
(
Id
,
base
.
UserInfo
.
Id
);
return
ApiResult
.
Success
(
data
:
model
);
return
ApiResult
.
Success
(
data
:
model
);
}
}
...
@@ -245,7 +245,7 @@ namespace Edu.WebApi.Controllers.Customer
...
@@ -245,7 +245,7 @@ namespace Edu.WebApi.Controllers.Customer
public
ApiResult
RemoveStudentVisit
()
public
ApiResult
RemoveStudentVisit
()
{
{
var
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
);
var
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
);
var
model
=
customerStudentModule
.
RemoveStudentVisitModule
(
Id
);
var
model
=
customerStudentModule
.
RemoveStudentVisitModule
(
Id
,
base
.
UserInfo
.
Id
);
return
ApiResult
.
Success
(
data
:
model
);
return
ApiResult
.
Success
(
data
:
model
);
}
}
...
...
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