コード例 #1
0
        public async Task <ResponseViewModel <CommodityListView> > AcquireRechargeCommodity([FromBody] RequestViewModel obj)
        {
            ResponseViewModel <CommodityListView> response = null;
            CommodityListView result = new CommodityListView();

            obj = JsonHelper.DeserializeJsonToObject <RequestViewModel>(Content(User.Identity.Name).Content);
            var sysCode = SysCode.Ok;
            var type    = 0;

            if (await _routine.JudgeVersionAuditStatusAsync(obj.Client.Version))//app是否在审核期
            {
                type = 1;
            }
            result.CommodityList = await _recharge.GetRechargeCommodityAsync(type);

            response = new ResponseViewModel <CommodityListView>(sysCode, result.CommodityList.Count > 0 ? result : null, obj.Encrypt, _sys, obj.Secret);
            return(response);
        }