예제 #1
0
        public ActionResult CustomerInforQuery()
        {
            int    UserId = TQuery.GetInt("UserId");
            string Mobile = TQuery.GetSafeString("Mobile");
            respCustomerInforQueryModel result = new respCustomerInforQueryModel();

            if (UserId == 0)
            {
                if (!string.IsNullOrEmpty(Mobile))
                {
                    result = YeepayDepository.CustomerInforQuery(Mobile, (int)Logic.Platform.系统);
                }
                else
                {
                    result.backState = -100;
                    result.message   = "";
                }
            }
            else
            {
                result = YeepayDepository.CustomerInforQuery(UserId, (int)Logic.Platform.系统);
            }

            return(View(result));
        }
예제 #2
0
        // GET: Upload
        public string UpImg()
        {
            int cid    = 1;
            int UserId = TQuery.GetInt("UserId");

            try
            {
                if (Request.Files.Count == 0)
                {
                    return("");
                }
                var files = Request.Files[0];


                byte[] content = new byte[files.InputStream.Length];
                files.InputStream.Read(content, 0, Convert.ToInt32(files.InputStream.Length));


                string base64 = Convert.ToBase64String(content.ToArray());;

                byte[] bmpBytes = Convert.FromBase64String(base64);
                //base64 = "/9j/4AAQSkZJRgABAQEAYABgAAD/4QA6RXhpZgAATU0AKgAAAAgAA1EQAAEAAAABAQAAAFERAAQAAAABAAAAAFESAAQAAAABAAAAAAAAAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAZACMDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDuKKWkr6A+JCilpKBiYoo4ooAfSU6kpAJS4opT0oGhtFLRQB//2Q==";

                string  url  = Constant.StaticHost + "Upload/UpImg";
                JObject data = new JObject();
                data["cid"]    = cid;
                data["UserId"] = UserId;
                data["dic"]    = "banner";
                data["base64"] = base64;
                string json  = string.Empty;
                int    state = HttpHelper.HttpPostJson(url, data.ToString(), System.Text.Encoding.UTF8, out json);
                if (state == 200)
                {
                    reqApiModel <JObject> model = JsonConvert.DeserializeObject <reqApiModel <JObject> >(json);
                    UserImage             img   = new UserImage();
                    img.UserId   = UserId;
                    img.Url      = model.Data["Url"].ToString();
                    img.PlatForm = (int)ITOrm.Utility.Const.Logic.Platform.系统;
                    int ImgId = userImageDao.Insert(img);
                    model.Data["ImgId"] = ImgId;
                    return(ApiReturnStr.getApiData(model.backState, model.message, model.Data));
                }
                return(ApiReturnStr.getApiData(-100, $"上传失败:httpStatus:{state},message:{json}"));
            }
            catch (Exception ex)
            {
                return(ApiReturnStr.getError(-100, "上传图片失败,请稍后再试。err:" + ex.Message));
            }
        }
예제 #3
0
        public ActionResult PaymentjournalGet()
        {
            respMasgetModel <respPaymentjournalGetModel> result = new respMasgetModel <respPaymentjournalGetModel>();

            result.ret = -100;

            int requestId   = TQuery.GetInt("requestId");
            int ChannelType = TQuery.GetInt("ChannelType");

            if (requestId == 0)
            {
                return(View(result));
            }
            result = MasgetDepository.PaymentjournalGet(requestId, 1, (Logic.ChannelType)ChannelType);
            return(View(result));
        }
예제 #4
0
        public ActionResult TreatyQuery()
        {
            respMasgetModel <respTreatyQueryModel> result = new respMasgetModel <respTreatyQueryModel>();

            result.ret = -100;

            string BankCard    = TQuery.GetString("BankCard");
            int    ChannelType = TQuery.GetInt("ChannelType");

            if (string.IsNullOrEmpty(BankCard))
            {
                return(View(result));
            }
            result = MasgetDepository.TreatyQuery(1, (Logic.ChannelType)ChannelType, BankCard);
            return(View(result));
        }
예제 #5
0
        public ActionResult CustomerBalanceQuery()
        {
            int UserId      = TQuery.GetInt("UserId");
            int BalanceType = TQuery.GetInt("BalanceType");
            respCustomerBalanceQueryModel result = new respCustomerBalanceQueryModel();

            if (UserId == 0)
            {
                result.backState = -100;
                result.message   = "";
            }
            else
            {
                result = YeepayDepository.CustomerBalanceQuery(UserId, (int)Logic.Platform.系统, BalanceType);
            }
            return(View(result));
        }
예제 #6
0
        public ActionResult LendTargetFeeQuery()
        {
            int     UserId = TQuery.GetInt("UserId");
            decimal Amount = TQuery.GetDecimal("Amount", 0m);
            respLendTargetFeeQueryModel result = new respLendTargetFeeQueryModel();

            if (UserId == 0 || Amount == 0m)
            {
                result.backState = -100;
                result.message   = "";
            }
            else
            {
                result = YeepayDepository.LendTargetFeeQuery(UserId, (int)Logic.Platform.系统, Amount);
            }
            return(View(result));
        }
예제 #7
0
        public ActionResult SubcompanyGet()
        {
            respMasgetModel <respSubcompanyGetModel> result = new respMasgetModel <respSubcompanyGetModel>();

            result.ret = -100;

            int UserId      = TQuery.GetInt("UserId");
            int ChannelType = TQuery.GetInt("ChannelType");

            if (UserId == 0)
            {
                return(View(result));
            }

            result = MasgetDepository.SubcompanyGet(UserId, 1, (Logic.ChannelType)ChannelType);
            return(View(result));
        }
예제 #8
0
        public ActionResult PayDebitQuery()
        {
            int OrderId = TQuery.GetInt("OrderId");

            respPayDebitQueryModel result = new respPayDebitQueryModel();

            if (OrderId == 0)
            {
                result.backState = -100;
                result.respMsg   = "";
            }
            else
            {
                result = TengDepository.PayDebitQuery(OrderId, (int)Logic.Platform.系统);
            }
            return(View(result));
        }
예제 #9
0
        public ActionResult QueryFeeSetApi()
        {
            int UserId      = TQuery.GetInt("UserId");
            int ProductType = TQuery.GetInt("ProductType");
            respQueryFeeSetApiModel result = new respQueryFeeSetApiModel();

            if (UserId == 0 || ProductType == 0)
            {
                result.backState = -100;
                result.message   = "";
            }
            else
            {
                result = YeepayDepository.QueryFeeSetApi(UserId, 1, ProductType);
            }

            return(View(result));
        }