定期备份
This commit is contained in:
parent
eb512e3603
commit
a8ce0c44ba
|
@ -62,6 +62,33 @@ http://172.16.1.254:13010/Handler/app.ashx?action=viewapp&app_id=app1745481912
|
|||
参数 action:viewapp
|
||||
参数 app_id :软件、课程id
|
||||
|
||||
查询公司历程所有年份接口
|
||||
http://172.16.1.254:13010/Handler/Data.ashx?action=comhistoryyears
|
||||
参数 无
|
||||
|
||||
|
||||
查询某一年公司历程详情
|
||||
http://172.16.1.254:13010/Handler/Data.ashx?action=comhistorydetails&year_info=2024
|
||||
参数 year_info :年份数字
|
||||
|
||||
|
||||
修改用户密码
|
||||
http://172.16.1.254:13010/Handler/User.ashx?action=changepassword
|
||||
参数 user_id:用户id
|
||||
参数 old_password: 原密码
|
||||
参数 new_password:新密码
|
||||
|
||||
|
||||
|
||||
查询公司资质
|
||||
http://172.16.1.254:13010/Handler/Data.ashx?action=comzizhi
|
||||
参数 无
|
||||
|
||||
================================has notb=================================================================
|
||||
查询公司认证
|
||||
http://172.16.1.254:13010/Handler/Data.ashx?action=comrenzheng
|
||||
参数 无
|
||||
|
||||
|
||||
软件、课程查询收藏接口
|
||||
http://172.16.1.254:13010/Handler/app.ashx?action=appfavorquery&user_id=123
|
||||
|
@ -79,7 +106,19 @@ http://172.16.1.254:13010/Handler/app.ashx?action=appfavordel&app_id=app17454819
|
|||
|
||||
|
||||
|
||||
通常建议绿豆与大米的比例可以在1:2到1:3之间。例如,如果您使用了50克绿豆,则可以搭配100克至150克的大米。
|
||||
查询关于我们
|
||||
http://172.16.1.254:13010/Handler/Data.ashx?action=comabout
|
||||
参数 无
|
||||
|
||||
查询合作厂商
|
||||
http://172.16.1.254:13010/Handler/Data.ashx?action=firstcooper
|
||||
参数 无
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -18,6 +18,13 @@ namespace VRS.Handler
|
|||
|
||||
DataService.BLL.pro_app bll_app = new DataService.BLL.pro_app();
|
||||
|
||||
DataService.BLL.pro_first_cooper bll_first_cooper = new DataService.BLL.pro_first_cooper();
|
||||
DataService.BLL.pro_com_about bll_com_about= new DataService.BLL.pro_com_about();
|
||||
|
||||
DataService.BLL.pro_com_certif bll_com_certif = new DataService.BLL.pro_com_certif();
|
||||
|
||||
DataService.BLL.pro_com_history bll_com_history = new DataService.BLL.pro_com_history();
|
||||
|
||||
/// <summary>
|
||||
/// 终端类型
|
||||
/// </summary>
|
||||
|
@ -78,6 +85,36 @@ namespace VRS.Handler
|
|||
QuerySceneZy(context);
|
||||
break;
|
||||
|
||||
//查询公司历程年份
|
||||
case "comhistoryyears":
|
||||
QueryComHistoryYears(context);
|
||||
break;
|
||||
|
||||
//查询某一年公司历程详情
|
||||
case "comhistorydetails":
|
||||
QueryComHistoryDetails(context);
|
||||
break;
|
||||
|
||||
//公司认证
|
||||
case "comrenzheng":
|
||||
QueryComRenZheng(context);
|
||||
break;
|
||||
|
||||
//公司资质
|
||||
case "comzizhi":
|
||||
QueryComZizhi(context);
|
||||
break;
|
||||
|
||||
//关于我们
|
||||
case "comabout":
|
||||
QueryComAbout(context);
|
||||
break;
|
||||
//合作厂商
|
||||
case "firstcooper":
|
||||
QueryFirstCooper(context);
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
var result = GetResult(false, "方法名不存在:" + action);
|
||||
context.Response.Write(result);
|
||||
|
@ -238,11 +275,93 @@ namespace VRS.Handler
|
|||
context.Response.End();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询公司资质
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
public void QueryComZizhi(HttpContext context)
|
||||
{
|
||||
var list = bll_com_certif.GetModelList(" type='资质' ").OrderBy(s => s.id).ToList();
|
||||
var result = GetResult(true, list);
|
||||
context.Response.Write(result);
|
||||
context.Response.End();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询公司认证
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
public void QueryComRenZheng(HttpContext context)
|
||||
{
|
||||
var list = bll_com_certif.GetModelList("type='认证'").OrderBy(s => s.id).ToList();
|
||||
var result = GetResult(true, list);
|
||||
context.Response.Write(result);
|
||||
context.Response.End();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询合作厂商
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
public void QueryFirstCooper(HttpContext context)
|
||||
{
|
||||
var list = bll_first_cooper.GetModelList("").OrderBy(s => s.pos).ToList();
|
||||
var result = GetResult(true, list);
|
||||
context.Response.Write(result);
|
||||
context.Response.End();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询关于我们
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
public void QueryComAbout(HttpContext context)
|
||||
{
|
||||
var model = bll_com_about.GetModelList("").FirstOrDefault();
|
||||
if (null != model)
|
||||
{
|
||||
var result = GetResult(true, model, "");
|
||||
context.Response.Write(result);
|
||||
context.Response.End();
|
||||
}
|
||||
else
|
||||
{
|
||||
var result = GetResult(false, null, "记录不存在:" );
|
||||
context.Response.Write(result);
|
||||
context.Response.End();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询公司历程年份
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
public void QueryComHistoryYears(HttpContext context)
|
||||
{
|
||||
var list = bll_com_history.GetModelList("").Select(s => s.year_info).Distinct().OrderBy(s => s).ToList();
|
||||
var result = GetResult(true, list);
|
||||
context.Response.Write(result);
|
||||
context.Response.End();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询公司历程详情
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
public void QueryComHistoryDetails(HttpContext context)
|
||||
{
|
||||
string year_info = context.Request["year_info"];
|
||||
if (string.IsNullOrEmpty(year_info))
|
||||
{
|
||||
context.Response.Write(GetResult(false, "参数year_info 年份不能为空"));
|
||||
context.Response.End();
|
||||
}
|
||||
var list = bll_com_history.GetModelList(" year_info='"+ year_info + "' ").ToList();
|
||||
var result = GetResult(true, list);
|
||||
context.Response.Write(result);
|
||||
context.Response.End();
|
||||
}
|
||||
|
||||
public bool IsReusable
|
||||
{
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace VRS.Handler
|
|||
QueryVersion(context);
|
||||
break;
|
||||
|
||||
|
||||
|
||||
|
||||
//用户注册
|
||||
case "reg":
|
||||
|
@ -55,18 +55,16 @@ namespace VRS.Handler
|
|||
ExitUser(context);
|
||||
break;
|
||||
|
||||
|
||||
/*
|
||||
//查询省
|
||||
case "queryprovince":
|
||||
QueryProvince(context);
|
||||
//修改密码
|
||||
case "changepassword":
|
||||
ChangePassword(context);
|
||||
break;
|
||||
|
||||
//查询市
|
||||
case "querycity":
|
||||
QueryCity(context);
|
||||
//修改用户资料
|
||||
case "edituser":
|
||||
EditUser(context);
|
||||
break;
|
||||
*/
|
||||
|
||||
|
||||
//查询单位
|
||||
case "queryunit":
|
||||
|
@ -83,8 +81,6 @@ namespace VRS.Handler
|
|||
UpdateDsc(context);
|
||||
break;
|
||||
|
||||
|
||||
|
||||
default:
|
||||
var result = GetResult(false, "方法名不存在:" + action);
|
||||
context.Response.Write(result);
|
||||
|
@ -99,7 +95,7 @@ namespace VRS.Handler
|
|||
/// <param name="context"></param>
|
||||
public void QueryVersion(HttpContext context)
|
||||
{
|
||||
|
||||
|
||||
|
||||
var version = new
|
||||
{
|
||||
|
@ -124,9 +120,9 @@ namespace VRS.Handler
|
|||
string func_dsc = context.Request["func_dsc"];
|
||||
|
||||
var model = bll_app.GetModel(id);
|
||||
if (null== model)
|
||||
if (null == model)
|
||||
{
|
||||
var result = GetResult(false, null,"对象不存在");
|
||||
var result = GetResult(false, null, "对象不存在");
|
||||
context.Response.Write(result);
|
||||
context.Response.End();
|
||||
}
|
||||
|
@ -294,7 +290,7 @@ namespace VRS.Handler
|
|||
var userModel = bll.GetModelList(string.Format(" login_name = '{0}' and password= '{1}' ", login_name, pwd)).FirstOrDefault();
|
||||
if (null != userModel)
|
||||
{
|
||||
if (userModel.is_lock =="是")
|
||||
if (userModel.is_lock == "是")
|
||||
{
|
||||
var result = GetResult(false, null, "用户已禁用!");
|
||||
context.Response.Write(result);
|
||||
|
@ -317,7 +313,7 @@ namespace VRS.Handler
|
|||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
if (dic.ContainsKey(userModel.user_role))
|
||||
{
|
||||
userModel.user_role_dsc = dic[userModel.user_role];
|
||||
|
@ -399,6 +395,148 @@ namespace VRS.Handler
|
|||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 修改用户资料
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
public void EditUser(HttpContext context)
|
||||
{
|
||||
//用户id
|
||||
var user_id = context.Request.Params["user_id"];
|
||||
if (string.IsNullOrEmpty(user_id))
|
||||
{
|
||||
var ret = GetResult(false, "user_id参数不能为空");
|
||||
context.Response.Write(ret);
|
||||
context.Response.End();
|
||||
}
|
||||
var user = bll.GetModel(user_id);
|
||||
if (null == user)
|
||||
{
|
||||
var ret = GetResult(false, null, "用户不存在,user_id:" + user_id);
|
||||
context.Response.Write(ret);
|
||||
context.Response.End();
|
||||
}
|
||||
if (context.Request.Params.AllKeys.Contains("nick_name"))
|
||||
{
|
||||
string paramValue = context.Request.Params["nick_name"];
|
||||
user.nick_name = paramValue;
|
||||
}
|
||||
|
||||
if (context.Request.Params.AllKeys.Contains("real_name"))
|
||||
{
|
||||
string paramValue = context.Request.Params["real_name"];
|
||||
user.real_name = paramValue;
|
||||
|
||||
}
|
||||
if (context.Request.Params.AllKeys.Contains("sex"))
|
||||
{
|
||||
string paramValue = context.Request.Params["sex"];
|
||||
user.sex = paramValue;
|
||||
}
|
||||
|
||||
if (context.Request.Params.AllKeys.Contains("mobile"))
|
||||
{
|
||||
string paramValue = context.Request.Params["mobile"];
|
||||
user.mobile = paramValue;
|
||||
}
|
||||
|
||||
if (context.Request.Params.AllKeys.Contains("unit"))
|
||||
{
|
||||
string paramValue = context.Request.Params["unit"];
|
||||
user.unit = paramValue;
|
||||
}
|
||||
var flag = bll.Update(user);
|
||||
if (flag)
|
||||
{
|
||||
var result = GetResult(true, null,"");
|
||||
context.Response.Write(result);
|
||||
}
|
||||
else
|
||||
{
|
||||
var result = GetResult(false, null, "修改失败");
|
||||
context.Response.Write(result);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改密码
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
public void ChangePassword(HttpContext context)
|
||||
{
|
||||
//用户id
|
||||
var user_id = context.Request.Params["user_id"];
|
||||
if (string.IsNullOrEmpty(user_id))
|
||||
{
|
||||
var ret = GetResult(false, "user_id参数不能为空");
|
||||
context.Response.Write(ret);
|
||||
context.Response.End();
|
||||
}
|
||||
var user = bll.GetModel(user_id);
|
||||
if (null == user)
|
||||
{
|
||||
var ret = GetResult(false, null, "用户不存在,user_id:" + user_id);
|
||||
context.Response.Write(ret);
|
||||
context.Response.End();
|
||||
}
|
||||
|
||||
var old_password = context.Request.Params["old_password"];
|
||||
if (string.IsNullOrEmpty(old_password))
|
||||
{
|
||||
var ret = GetResult(false, null, "原密码不能为空");
|
||||
context.Response.Write(ret);
|
||||
context.Response.End();
|
||||
}
|
||||
var pass_word = BasePage.GetMD5(old_password);
|
||||
var list_exists = bll.GetModelList(string.Format(" user_id = '{0}' and password='{1}' ", user_id, pass_word));
|
||||
if (list_exists.Count <= 0)
|
||||
{
|
||||
var ret = GetResult(false, null, "原密码错误!");
|
||||
context.Response.Write(ret);
|
||||
context.Response.End();
|
||||
}
|
||||
|
||||
var new_password = context.Request.Params["new_password"];
|
||||
if (string.IsNullOrEmpty(new_password))
|
||||
{
|
||||
var ret = GetResult(false, null, "新密码不能为空!");
|
||||
context.Response.Write(ret);
|
||||
context.Response.End();
|
||||
}
|
||||
|
||||
/*
|
||||
var newpassword = new_password.Text.Trim();
|
||||
var confirm = confirm_password.Text.Trim();
|
||||
|
||||
if (string.IsNullOrEmpty(new_password.Text.Trim()))
|
||||
{
|
||||
RadAjaxManager1.Alert("");
|
||||
return;
|
||||
}
|
||||
|
||||
if (newpassword != confirm)
|
||||
{
|
||||
RadAjaxManager1.Alert("新密码与确认密码不一致!");
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
user.password = GetMD5(new_password);
|
||||
if (bll.Update(user))
|
||||
{
|
||||
log.write_log("修改密码成功。" + "账号:" + user.login_name + ",ID:" + user.user_id);
|
||||
var ret = GetResult(true, null, "");
|
||||
context.Response.Write(ret);
|
||||
context.Response.End();
|
||||
}
|
||||
else
|
||||
{
|
||||
var ret = GetResult(false, null, "修改密码失败!");
|
||||
context.Response.Write(ret);
|
||||
context.Response.End();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool IsReusable
|
||||
|
|
|
@ -27,6 +27,17 @@ namespace VRS
|
|||
|
||||
}
|
||||
|
||||
public string GetRequestParameter(string paramName)
|
||||
{
|
||||
#if NETCOREAPP
|
||||
// 传统ASP.NET Core 实现
|
||||
return Request.Query[paramName].ToString() ?? Request.Form[paramName].ToString();
|
||||
#else
|
||||
// 传统 ASP.NET 实现
|
||||
return Request.Params[paramName];
|
||||
#endif
|
||||
}
|
||||
|
||||
protected void btnLogin_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(txtUserId.Text.Trim()) || string.IsNullOrWhiteSpace(txtPassword.Text.Trim()))
|
||||
|
|
Loading…
Reference in New Issue