chord
chord copied to clipboard
账户绑定对应的图书馆改为路径形式
账户绑定对应的图书馆以路径的形式存储在一个字段里,不要搞成多个字段,尤其是项目间接口配合时,同类的参数要做成一个参数,或者打成一个包。
想到路径有三截组成:图书馆id/分馆代码/帐户名(或读者证条码)
目前帐户信息里图书馆 与 分馆代码 是分成两个字段存储的,如下:
public class WxUserItem
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public string id { get; private set; }
// 微信id
public string weixinId { get; set; }
// 图书馆代码
public string libId { get; set; }
// 图书馆名称
public string libName { get; set; }
//实际分馆代码,读者与工作人员都有该字段
public string libraryCode { get; set; }
public bool IsdpAdmin
{
get
{
if (this.libName == WeiXinConst.C_Dp2003LibName)
return true;
else
return false;
}
}
// 20170509
//绑定时选择的分馆代码,与自己的实际分馆代码 不同,比如绑定时选择的空(总馆),但实际是方洲小学。
public string bindLibraryCode { get; set; }
// 读者证条码号
public string readerBarcode { get; set; }
// 读者姓名
public string readerName { get; set; }
//单位
public string department { get; set; } //部门,二维码下方显示 // 2016-6-16 新增
// 读者记录xml
public string xml { get; set; }
// 读者记录路径
public string recPath { get; set; }
// 读者参考id
public string refID { get; set; }
public string createTime { get; set; }
public string updateTime { get; set; }
// 是否活动状态
public int isActive = 0;
//账户类型:0表示读者 1表示工作人员 // 2016-6-16 新增
public int type = 0;
//当type=2时,表示工作人员账户名称,其它时候为空// 2016-6-16 新增
public string userName { get; set; }
public int isActiveWorker= 0; //是否为当前激活工作人员账户,注意该字段对读者账户无意义(均为0),暂时未用到
// 2016-8-26 jane 新增
public int state { get; set; } //状态:0失效 1有效 2恢复时的临时状态
public string remark { get; set; } // 会存一下绑定方式等
// 权限
public string rights { get; set; }
// 公众号id 2016-11-14
public string appId { get; set; }
//tracing 2016-11-21 type=1工作人员时有意义 默认为空或者off
public string tracing { get; set; }
public bool IsMask
{
get
{
if (tracing == null)
tracing = "";
if (this.tracing.IndexOf("-mask") != -1) // -mask 指不做马赛克处理
return false;
else
return true;
}
}
// 20170213 jane
// 本用户在dp系统有权限的馆藏地,是xml格式
/*
<item canborrow="no" itemBarcodeNullable="yes">保存本库</item>
<item canborrow="no" itemBarcodeNullable="yes">阅览室</item>
<item canborrow="yes" itemBarcodeNullable="yes">流通库</item>
<library code="方洲小学">
<item canborrow="yes" itemBarcodeNullable="yes">图书总库</item>
</library>
<library code="星洲小学">
<item canborrow="yes" itemBarcodeNullable="yes">阅览室</item>
</library>
*/
public string location { get; set; }
// 20170213 在微信中选择的馆藏地,是以逗号分隔的两级路径,如:/流通库,方洲小学/图书总库
public string selLocation { get; set; }
// 借还时是否校验条码
public int verifyBarcode { get; set; }
// 借还时语音方案
public int audioType { get; set; }
// 从setting表移来的字段
public int showPhoto { get; set; }
public int showCover { get; set; }
public string bookSubject { get; set; } // 20170509加
}