|
@@ -33,12 +33,12 @@ namespace TEAMModelOS.Controllers
|
|
|
/// <param name="request"></param>
|
|
|
/// <returns></returns>
|
|
|
[HttpPost("find")]
|
|
|
- public async Task<BaseJosnRPCResponse> find(JosnRPCRequest<Dictionary<string,string>> request) {
|
|
|
+ public async Task<BaseJosnRPCResponse> find(JosnRPCRequest<Dictionary<string,object>> request) {
|
|
|
JsonRPCResponseBuilder builder = JsonRPCResponseBuilder.custom();
|
|
|
// 班级编码
|
|
|
- if (request.@params.TryGetValue("classroomCode", out string classroomCode)
|
|
|
+ if (request.@params.TryGetValue("classroomCode", out object classroomCode)
|
|
|
///学校编码
|
|
|
- && request.@params.TryGetValue("schoolCode", out string schoolCode)
|
|
|
+ && request.@params.TryGetValue("schoolCode", out object schoolCode)
|
|
|
)
|
|
|
{
|
|
|
List<ClassStudent> classroomStudents = await _cosmos.FindByDict<ClassStudent>(new Dictionary<string, object> { { "id", classroomCode }});
|
|
@@ -54,7 +54,7 @@ namespace TEAMModelOS.Controllers
|
|
|
{
|
|
|
if (!classroomStudents.Select(m=>m.code).Contains(x.studentId))
|
|
|
{
|
|
|
- newClassStudents.Add(new ClassStudent() { id = classroomCode, code = x.studentId });
|
|
|
+ newClassStudents.Add(new ClassStudent() { id = x.classroomCode, code = x.studentId });
|
|
|
}
|
|
|
var stu = new { x.id, x.name, x.code, x.seatNo, x.studentId, x.classroomCode };
|
|
|
stus.Add(stu);
|