public CorporationModel GetCorpInfoByCorpId(string corpId) { CorporationEntity corporationEntity = _dal.GetContactInfoByExpression(n => n.CorpId.ToUpper() == corpId.ToUpper()); return(Mapper.Map <CorporationEntity, CorporationModel>(corporationEntity)); }
public void GetSendAppMessage(List <SendAppMessageModel> sendAppMessageModels) { foreach (var item in sendAppMessageModels) { CustomerInfoEntity customerInfoEntity = _customerInfoDal.GetCustomerByExpression(x => x.Cid == item.Cid); CorporationEntity corporationEntity = _corporationDal.GetContactInfoByExpression(x => x.CorpId == customerInfoEntity.CorpID); OperatorEntity operatorEntity = base.Context.Set <OperatorEntity>().Where(n => n.Oid.ToUpper() == corporationEntity.ResponsibleOid).FirstOrDefault(); item.Email = operatorEntity?.Email; item.SendContent = corporationEntity.CorpName + " 公司已生成订单 " + item.OrderId + ",请差旅顾问及时处理!"; } }
public AppOpinionDomainModel AddOpinion(AppOpinionModel appOpinionModel) { _appOpinionDal.Insert <AppOpinionEntity>(new AppOpinionEntity() { AppOpinion = appOpinionModel.AppOpinion, AppType = appOpinionModel.AppType, CreateCid = appOpinionModel.CreateCid, CreateTime = DateTime.Now }); CustomerInfoEntity customerInfoEntity = _customerInfoDal.GetCustomerByExpression(x => x.Cid == appOpinionModel.CreateCid); CorporationEntity corporationEntity = _corporationDal.GetContactInfoByExpression(x => x.CorpId == customerInfoEntity.CorpID); AppOpinionDomainModel appOpinionDomainModel = new AppOpinionDomainModel { AppOpinion = appOpinionModel.AppOpinion, CustomerName = customerInfoEntity.RealName, ContactName = corporationEntity.CorpName }; return(appOpinionDomainModel); }