public void PushKYC_LV2_REJECT(long id)
        {
            var record = new VerifyRecordDAC().GetById(id);

            if (record == null)
            {
                return;
            }

            var regId = RedisHelper.StringGet($"FiiiPay:Notice:UserId:{record.AccountId}");

            var lang = RedisHelper.StringGet(REDIS_LANGUAGE_DBINDEX, $"FiiiPay:Language:{record.AccountId}") ?? "en";

            var titleKey    = "KYC_LV2_REJECTTitle";
            var subTitleKey = "KYC_LV2_REJECTSubTitle";

            if (!(_resourcePropertyNames.Contains(titleKey) && _resourcePropertyNames.Contains(subTitleKey)))
            {
                throw new Exception("没有找到资源");
            }
            var title    = ResourceHelper.FiiiPay.GetResource("KYC_LV2_REJECTTitle", new CultureInfo(lang));
            var subTitle = ResourceHelper.FiiiPay.GetResource("KYC_LV2_REJECTSubTitle", new CultureInfo(lang));

            string noticeId = "";

            MessagesComponent.AddMessage(record.AccountId, UserType.User, record.Id.ToString(), FiiiPayPushType.TYPE_USER_KYC_LV2_REJECT, titleKey, subTitleKey, null, title, subTitle, out noticeId);

            RegPush(FiiiPayPushType.TYPE_USER_KYC_LV2_REJECT, new List <string> {
                regId
            }, id, title, subTitle, Guid.NewGuid().ToString());
            LogHelper.Info($"--------{lang}------{title}----------{subTitle}");
        }
Exemple #2
0
        public GetNewsOM GetRecord(long id)
        {
            var model = new VerifyRecordDAC().GetById(id);

            if (model == null)
            {
                return(null);
            }

            string title;
            string body;

            switch (model.Type)
            {
            case VerifyRecordType.UserLv1Verified:
                title = Resources.ResourceManager.GetString("KYC_LV1_VERIFIEDTitle");
                body  = model.Body;
                if (string.IsNullOrWhiteSpace(model.Body))
                {
                    body = Resources.ResourceManager.GetString("User_KYC_LV1_DefaultBody");
                }
                break;

            case VerifyRecordType.UserLv1Reject:
                title = Resources.ResourceManager.GetString("KYC_LV1_REJECTTitle");
                body  = model.Body;
                break;

            case VerifyRecordType.UserLv2Verified:
                title = Resources.ResourceManager.GetString("KYC_LV2_VERIFIEDTitle");
                body  = model.Body;
                if (string.IsNullOrWhiteSpace(model.Body))
                {
                    body = Resources.ResourceManager.GetString("User_KYC_LV2_DefaultBody");
                }
                break;

            case VerifyRecordType.UserLv2Reject:
                title = Resources.ResourceManager.GetString("KYC_LV2_REJECTTitle");
                body  = model.Body;
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }

            return(new GetNewsOM
            {
                Title = title,
                Timestamp = model.CreateTime.ToUnixTime(),
                Content = body
            });
        }
        public void MerchantLv2Verified(long id)
        {
            var record = new VerifyRecordDAC().GetById(id);

            var    regId       = RedisHelper.StringGet($"{FiiiPOS_APP_Notice_MerchantId}:{record.AccountId}");
            var    lang        = RedisHelper.StringGet(REDIS_LANGUAGE_DBINDEX, $"{FiiiPOS_APP_Language_MerchantId}:{record.AccountId}") ?? "en";
            var    titleKey    = "MerchantLv2Verified";
            var    subTitleKey = "MerchantLv2VerifiedSubTitle";
            var    title       = ResourceHelper.FiiiPos.GetResource(titleKey, lang);
            var    subTitle    = ResourceHelper.FiiiPos.GetResource(subTitleKey, lang);
            string noticeId    = "";

            MessagesComponent.AddMessage(record.AccountId, UserType.Merchant, record.Id.ToString(), FiiiPayPushType.TYPE_Merchant_KYC_LV2_VERIFIED, titleKey, subTitleKey, null, title, subTitle, out noticeId);

            RegPush(FiiiPayPushType.TYPE_Merchant_KYC_LV2_VERIFIED, new List <string> {
                regId
            }, id, title, subTitle, Guid.NewGuid().ToString());
            LogHelper.Info($"--------{lang}------{title}----------{subTitle}");
        }