|
@@ -49,7 +49,8 @@ namespace TEAMModelOS.Controllers
|
|
|
|
|
|
public async Task<IActionResult> ApplySchool(ApplySchool request)
|
|
|
{
|
|
|
- string msg = $"有新学校申请。\n" +
|
|
|
+ string devmsg = _option.Location.Contains("Test") || _option.Location.Contains("Dep") ? "(测试消息)" : "";
|
|
|
+ string msg = $"有新学校申请。{devmsg}\n" +
|
|
|
$"申请站点:{_option.Location}\n" +
|
|
|
$"申请学校:{request.name}\n" +
|
|
|
$"学制:{string.Join(",", request.period)}\n" +
|
|
@@ -62,7 +63,22 @@ namespace TEAMModelOS.Controllers
|
|
|
return Ok(new { msg });
|
|
|
|
|
|
}
|
|
|
+ [HttpPost("apply-service")]
|
|
|
|
|
|
+ public async Task<IActionResult> ApplyService(ApplySchool request)
|
|
|
+ {
|
|
|
+ string devmsg = _option.Location.Contains("Test") || _option.Location.Contains("Dep") ? "(测试消息)" : "";
|
|
|
+ string msg = $"有新的模组购买申请。{devmsg}\n" +
|
|
|
+ $"申请站点:{_option.Location}\n" +
|
|
|
+ $"所在国家\\地区:{request.area}\n" +
|
|
|
+ $"申请学校:{request.name}\n" +
|
|
|
+ $"申请人:{request.tmdname}({request.tmdid})\n" +
|
|
|
+ $"性别:{request.gender}" +
|
|
|
+ $"联系电话:{request.cellphone}\n" +
|
|
|
+ $"咨询内容:{request.content}";
|
|
|
+ await _dingDing.SendBotMsg(msg, GroupNames.AI智慧學校申請通知群);
|
|
|
+ return Ok(new { msg });
|
|
|
+ }
|
|
|
[HttpPost("random-code")]
|
|
|
[RequestSizeLimit(100_000_000)] //最大100m左右
|
|
|
public async Task<IActionResult> RandomCode(JsonElement request)
|
|
@@ -303,6 +319,10 @@ namespace TEAMModelOS.Controllers
|
|
|
/// </summary>
|
|
|
public string name { get; set; }
|
|
|
/// <summary>
|
|
|
+ /// 性别
|
|
|
+ /// </summary>
|
|
|
+ public string gender { get; set; }
|
|
|
+ /// <summary>
|
|
|
/// 站点
|
|
|
/// </summary>
|
|
|
public string site { get; set; }
|