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
5bf0e28e
Commit
5bf0e28e
authored
4 years ago
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交个人兴趣爱好
parent
666527d4
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
73 additions
and
20 deletions
+73
-20
RB_Student.cs
Edu.Model/Entity/User/RB_Student.cs
+1
-1
MsgLogModule.cs
Edu.Module.System/MsgLogModule.cs
+5
-2
StudentModule.cs
Edu.Module.User/StudentModule.cs
+2
-2
APPStudentLoginController.cs
Edu.WebApi/Controllers/APP/APPStudentLoginController.cs
+62
-12
AppIndexController.cs
Edu.WebApi/Controllers/APP/AppIndexController.cs
+3
-3
No files found.
Edu.Model/Entity/User/RB_Student.cs
View file @
5bf0e28e
...
...
@@ -107,7 +107,7 @@ namespace Edu.Model.Entity.User
/// <summary>
/// 兴趣爱好
/// </summary>
public
string
Interest
{
get
;
set
;
}
public
int
Interest
{
get
;
set
;
}
/// <summary>
...
...
This diff is collapsed.
Click to expand it.
Edu.Module.System/MsgLogModule.cs
View file @
5bf0e28e
...
...
@@ -296,8 +296,9 @@ namespace Edu.Module.System
}
public
void
SendCode
(
string
code
,
Common
.
Enum
.
System
.
BaseTemplateTypeEnum
BaseTemplateType
,
RB_Msg_Log
msgLogModel
)
public
bool
SendCode
(
string
code
,
Common
.
Enum
.
System
.
BaseTemplateTypeEnum
BaseTemplateType
,
RB_Msg_Log
msgLogModel
)
{
bool
flag
=
false
;
//查询当前集团的短信基础配置
var
msgBaseList
=
msgBaseRepository
.
GetListRepository
(
new
RB_Msg_Base_Function_ViewModel
{
Group_Id
=
msgLogModel
.
Group_Id
});
//查询当前下面是否有模板
...
...
@@ -330,6 +331,7 @@ namespace Edu.Module.System
if
(
Common
.
Config
.
IsSendMsg
==
1
)
{
ThirdCore
.
Message
.
SMSService
.
SendCode
(
msgLogModel
.
ReceiverPhone
,
code
,
msgBaseTemplateModel
.
TemplateId
,
msgBaseTemplateModel
.
Sign
,
model
.
MsgBase
.
Domain
,
model
.
MsgBase
.
AccessKeyId
,
model
.
MsgBase
.
AccessSecret
,
model
.
MsgBase
.
RegionId
,
id
.
ToString
());
flag
=
true
;
}
}
...
...
@@ -337,7 +339,8 @@ namespace Edu.Module.System
}
}
}
// ThirdCore.Message.SMSService.SendMsg("13551132417", PhoneMessage, "SMS_201722097", "印象之旅", "dysmsapi.aliyuncs.com", "LTAIwE7l9dImZSa3", "j47Ajn0d0WzUCIX8Biyj3P2r8QDltI", "cn-hangzhou");
return
flag
;
}
#
endregion
...
...
This diff is collapsed.
Click to expand it.
Edu.Module.User/StudentModule.cs
View file @
5bf0e28e
...
...
@@ -247,8 +247,8 @@ namespace Edu.Module.User
{
{
nameof
(
RB_Student_ViewModel
.
Interest
),
model
.
Interest
.
Trim
()
},
{
nameof
(
RB_Student_ViewModel
.
JapanBaseInfo
),(
int
)
model
.
JapanBaseInfo
},
//
{nameof(RB_Student_ViewModel.StuIcon),model.StuIcon.Trim() },
//
{nameof(RB_Student_ViewModel.StuSex),model.StuSex },
{
nameof
(
RB_Student_ViewModel
.
StuIcon
),
model
.
StuIcon
.
Trim
()
},
{
nameof
(
RB_Student_ViewModel
.
StuSex
),
model
.
StuSex
},
{
nameof
(
RB_Student_ViewModel
.
UpdateTime
),
System
.
DateTime
.
Now
}
};
return
studentRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Student_ViewModel
.
StuId
),
model
.
StuId
));
...
...
This diff is collapsed.
Click to expand it.
Edu.WebApi/Controllers/APP/APPStudentLoginController.cs
View file @
5bf0e28e
...
...
@@ -201,32 +201,40 @@ namespace Edu.WebApi.Controllers.APP
ReceiverName
=
model
.
AccountName
,
ReceiverPhone
=
model
.
Account
};
new
Module
.
System
.
MsgLogModule
().
SendCode
(
code
,
Common
.
Enum
.
System
.
BaseTemplateTypeEnum
.
SendCode
,
msgLogModel
);
Cache
.
App
.
MsgUserRedisCache
.
SetSendCode
(
Cache
.
CacheKey
.
MsgStudent_Login_Key
+
account
,
code
,
600000
);
var
result
=
new
Module
.
System
.
MsgLogModule
().
SendCode
(
code
,
Common
.
Enum
.
System
.
BaseTemplateTypeEnum
.
SendCode
,
msgLogModel
);
if
(
result
)
{
Cache
.
App
.
MsgUserRedisCache
.
SetSendCode
(
Cache
.
CacheKey
.
MsgStudent_Login_Key
+
account
,
code
,
600
);
Cache
.
App
.
MsgUserRedisCache
.
AddUserSendCodeHistory
(
account
);
return
ApiResult
.
Success
(
"验证码已发送,请注意查收"
,
data
:
null
);
}
else
{
return
ApiResult
.
Failed
(
"发送短信失败,请稍后再试"
);
}
}
else
{
return
ApiResult
.
Failed
(
message
:
"该账号已激活"
,
new
{
resultCode
=
(
int
)
ResultCode
.
AccountNotActivation
});
}
}
/// <summary>
///
激活并登陆
///
判断输入的验证码是否正确
/// </summary>
/// <param name="request">获取信息</param>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
public
ApiResult
ActivationLogin
()
public
ApiResult
CheckSendCode
()
{
JObject
jobj
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
string
account
=
jobj
.
GetStringValue
(
"account"
);
string
sendcode
=
jobj
.
GetStringValue
(
"sendcode"
);
string
password
=
jobj
.
GetStringValue
(
"password"
);
if
(
string
.
IsNullOrWhiteSpace
(
sendcode
))
{
return
ApiResult
.
Failed
(
"验证码不能为空"
);
...
...
@@ -247,6 +255,47 @@ namespace Edu.WebApi.Controllers.APP
}
}
}
Cache
.
App
.
MsgUserRedisCache
.
SetSendCode
(
Cache
.
CacheKey
.
MsgStudent_Login_Key
+
account
,
sendcode
,
1
);
return
ApiResult
.
Success
(
"验证码输入正确"
);
}
/// <summary>
/// 激活并登陆
/// </summary>
/// <param name="request">获取信息</param>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
public
ApiResult
ActivationLogin
()
{
JObject
jobj
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
string
account
=
jobj
.
GetStringValue
(
"account"
);
// string sendcode = jobj.GetStringValue("sendcode");
string
password
=
jobj
.
GetStringValue
(
"password"
);
//if (string.IsNullOrWhiteSpace(sendcode))
//{
// return ApiResult.Failed("验证码不能为空");
//}
//else
//{
// object cacheCode = Cache.App.MsgUserRedisCache.GetUserCode(Cache.CacheKey.MsgStudent_Login_Key + account, Common.Enum.ApiRequestFromEnum.AppStudent);
// if (cacheCode == null)
// {
// return ApiResult.Failed("验证码已失效,请重新获取");
// }
// else
// {
// if (!cacheCode.ToString().Equals(sendcode))
// {
// return ApiResult.Failed("验证码不正确,请填写正确的验证码");
// }
// }
//}
var
model
=
accountModule
.
GetStudentExt
(
new
RB_Account_ViewModel
()
{
Account
=
account
.
Trim
(),
...
...
@@ -422,6 +471,7 @@ namespace Edu.WebApi.Controllers.APP
}
}
}
Cache
.
App
.
MsgUserRedisCache
.
SetSendCode
(
Cache
.
CacheKey
.
MsgStudent_Login_Key
+
account
,
sendcode
,
1
);
var
model
=
accountModule
.
GetStudentExt
(
new
RB_Account_ViewModel
()
{
Account
=
account
.
Trim
(),
...
...
This diff is collapsed.
Click to expand it.
Edu.WebApi/Controllers/APP/AppIndexController.cs
View file @
5bf0e28e
...
...
@@ -38,10 +38,10 @@ namespace Edu.WebApi.Controllers.APP
{
var
query
=
new
RB_Student_ViewModel
()
{
Interest
=
base
.
ParmJObj
.
Get
StringValue
(
"Interest"
),
Interest
=
base
.
ParmJObj
.
Get
Int
(
"Interest"
),
JapanBaseInfo
=
base
.
ParmJObj
.
GetInt
(
"JapanBaseInfo"
),
//
StuSex = base.ParmJObj.GetInt("StuSex"),
//
StuIcon = base.ParmJObj.GetStringValue("StuIcon"),
StuSex
=
base
.
ParmJObj
.
GetInt
(
"StuSex"
),
StuIcon
=
base
.
ParmJObj
.
GetStringValue
(
"StuIcon"
),
Group_Id
=
base
.
AppUserInfo
.
Group_Id
,
School_Id
=
base
.
AppUserInfo
.
School_Id
,
StuId
=
base
.
AppUserInfo
.
AccountId
,
...
...
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