コード例 #1
0
        /// <summary>
        /// 添加订单详情
        /// </summary>
        /// <param name="o"></param>
        /// <returns></returns>
        public int AddOrderDesc(OrderDesc o)
        {
            o.OrderDescStartTime = DateTime.Now.ToString();
            string sql = $"insert into OrderDesc values('{o.OrderDescName}','{o.OrderDescPhone}','{o.OrderDescPosstion}','{o.OrderDescStartTime}',{o.OrderDescMoney},{o.OrderInfoIdOut},'{o.OrderDescRemark}')";

            return(DapperHelper.Cud(sql));
        }
コード例 #2
0
        /// <summary>
        /// 修改订单状态
        /// </summary>
        /// <param name="OrderId"></param>
        /// <param name="State"></param>
        /// <returns></returns>
        public int UpdateOrderInfoBuy(int OrderId, int State)
        {
            State++;
            string sql = $"update OrderInfo set OrderInfoState ={State} where OrderInfoId = {OrderId}";

            return(DapperHelper.Cud(sql));
        }
コード例 #3
0
        /// <summary>
        /// 用户获取优惠券
        /// </summary>
        /// <param name="d"></param>
        /// <returns></returns>
        public int AddDidAndUser(DisCountAndUser d)
        {
            d.StartTime = DateTime.Now;
            d.EndTime   = d.StartTime.AddDays(3);
            string sql = $"insert into DisCountAndUser values({d.UserIdOut},{d.DisCountId},'{d.StartTime}','{d.EndTime}')";

            return(DapperHelper.Cud(sql));
        }
コード例 #4
0
        /// <summary>
        /// 删除收藏
        /// </summary>
        /// <param name=""></param>
        /// <returns></returns>
        public int UpdateGoodsClect(int ClectId)
        {
            string sql = $"delete from GoodsAddInfo where GoodsAddInfoId ={ClectId}";

            return(DapperHelper.Cud(sql));
        }
コード例 #5
0
        /// <summary>
        /// 添加评价表
        /// </summary>
        /// <param name="RUG"></param>
        /// <returns></returns>
        public int AddRemarkInfo(RemarkInfoAndUserInfoAndGoodsInfo RUG)
        {
            string sql = $"insert into RemarkInfo values('{RUG.RemarkInfoDesc}','{RUG.UserInfoIdOut}','{RUG.GoodsLookIdOut}','{DateTime.Now}','{RUG.RemarkImg}','{RUG.RemarkStare}')";

            return(DapperHelper.Cud(sql));
        }
コード例 #6
0
        /// <summary>
        /// 商家收钱
        /// </summary>
        /// <param name="Money"></param>
        /// <param name="UserId"></param>
        /// <returns></returns>
        public int ReMoneyShopUser(int Money, int UserId)
        {
            string sql = $"update UserInfo set UserInfoMoney =UserInfoMoney + {Money} where UserInfoId ={UserId}";

            return(DapperHelper.Cud(sql));
        }
コード例 #7
0
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="UserInfoPass"></param>
        /// <param name="UserInfoId"></param>
        /// <returns></returns>
        public int Update(string UserInfoPass, string UserInfoId)
        {
            string sql = $"update UserInfo set UserInfoPass='******' where  UserInfoId='{UserInfoId}'";

            return(DapperHelper.Cud(sql));
        }
コード例 #8
0
        /// <summary>
        /// 添加品牌
        /// </summary>
        /// <param name="c"></param>
        /// <returns></returns>
        public int AddClothesBrand(ClothesBrand c)
        {
            string sql = $"insert into ClothesBrand values('{c.ClothesBrandName}')";

            return(DapperHelper.Cud(sql));
        }
コード例 #9
0
        /// <summary>
        /// 修改数量减一
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public int UpdateAndBack(int id)
        {
            string sql = $"update GoodsCarInfo set GoodsNumber=GoodsNumber-1 where GoodsCarInfo.GoodsCarInfoId={id}";

            return(DapperHelper.Cud(sql));
        }
コード例 #10
0
        /// <summary>
        /// 删除收货地址
        /// </summary>
        /// <param name="addressInfoId"></param>
        /// <returns></returns>
        public int DeleteAddressInfo(int addressInfoId)
        {
            string sql = $"delete from AddressInfo where AddressInfoId={addressInfoId}";

            return(DapperHelper.Cud(sql));
        }
コード例 #11
0
        /// <summary>
        /// 设置默认
        /// </summary>
        /// <param name="addressInfoId"></param>
        /// <returns></returns>
        public int ModifyDefaultAddressInfo(int addressInfoId)
        {
            string sql = $"update AddressInfo set AddressInfoState=1 where AddressInfoId = {addressInfoId}";

            return(DapperHelper.Cud(sql));
        }
コード例 #12
0
        /// <summary>
        /// 全为不默认
        /// </summary>
        /// <param name="stateid"></param>
        /// <returns></returns>
        public int ModifyStateAddressInfo(int userInfoId)
        {
            string sql = $"update AddressInfo set AddressInfoState=0 where UserInfoIdOut = {userInfoId}";

            return(DapperHelper.Cud(sql));
        }
コード例 #13
0
        /// <summary>
        /// 修改收货地址
        /// </summary>
        /// <param name="addressInfo"></param>
        /// <returns></returns>
        public int ModifyAddressInfo(AddressInfo addressInfo)
        {
            string sql = $"update AddressInfo set AddressInfoPeople='{addressInfo.AddressInfoPeople}',AddressInfoPhone='{addressInfo.AddressInfoPhone}',PosstionInfoPIdOut={addressInfo.PosstionInfoPIdOut},PosstionInfoCIdOut={addressInfo.PosstionInfoCIdOut},PosstionInfoDIdOut={addressInfo.PosstionInfoDIdOut},AddressInfoName='{addressInfo.AddressInfoName}',AddressInfoState={addressInfo.AddressInfoState} where AddressInfoId = {addressInfo.AddressInfoId}";

            return(DapperHelper.Cud(sql));
        }
コード例 #14
0
        /// <summary>
        /// 添加收货地址
        /// </summary>
        /// <param name="addressInfo"></param>
        /// <returns></returns>
        public int AddAddressInfo(AddressInfo addressInfo)
        {
            string sql = $"insert into AddressInfo values('{addressInfo.AddressInfoPeople}','{addressInfo.AddressInfoPhone}',{addressInfo.UserInfoIdOut},{addressInfo.PosstionInfoPIdOut},{addressInfo.PosstionInfoCIdOut},{addressInfo.PosstionInfoDIdOut},'{addressInfo.AddressInfoName}',{addressInfo.AddressInfoState})";

            return(DapperHelper.Cud(sql));
        }
コード例 #15
0
        /// <summary>
        /// 删除过期优惠券
        /// </summary>
        /// <param name="DisAndUserId"></param>
        /// <returns></returns>
        public int DeleteDisCount(int DisAndUserId)
        {
            string sql = $"delete from DisCountAndUser where DisCountAndUserId = {DisAndUserId}";

            return(DapperHelper.Cud(sql));
        }
コード例 #16
0
        /// <summary>
        /// 添加收藏
        /// </summary>
        /// <param name="g"></param>
        /// <returns></returns>
        public int AddGoodsClect(GoodsAddInfo g)
        {
            string sql = $"insert into GoodsAddInfo values({g.GoodsInfoIdOut},{g.UserInfoIdOut})";

            return(DapperHelper.Cud(sql));
        }
コード例 #17
0
        /// <summary>
        /// 批量  单删购物车数据
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        public int DeleteCars(string ids)
        {
            string sql = $"delete from GoodsCarInfo where GoodsCarInfoId in ({ids})";

            return(DapperHelper.Cud(sql));
        }
コード例 #18
0
        /// <summary>
        /// 添加商品
        /// </summary>
        /// <param name="g"></param>
        /// <returns></returns>
        public int GoodsAdd(GoodsInfo g)
        {
            string sql = $"insert into GoodsInfo values('{g.GoodsInfoName}','{g.GoodsInfoImage}','{g.GoodsInfoPrice}','{g.GoodsInfoCount}','{g.GoodsInfoState}','{g.GoodsInfoPlace}','{g.GoodsInfoColor}','{g.GoodsInfoSize}','{g.ShopIdOut}','{g.GoodsTypes}','{g.GoodsInfoDesc}')";

            return(DapperHelper.Cud(sql));
        }
コード例 #19
0
        /// <summary>
        /// 商品添加购物车
        /// </summary>
        /// <returns></returns>
        public int AddGoodsCarInfos(GoodsCarInfo goodsCar)
        {
            string sql = $"insert into GoodsCarInfo values({goodsCar.GoodsLookIdOut},{goodsCar.UserInfoIdOut},{goodsCar.GoodsNumber})";

            return(DapperHelper.Cud(sql));
        }
コード例 #20
0
        /// <summary>
        /// 注册
        /// </summary>
        /// <param name="u"></param>
        /// <returns></returns>
        public int GetZhu(UserInfo user)
        {
            string sql = $"insert into UserInfo values('{user.UserInfoName}','{user.UserInfoPass}','{user.UserInfoSex}','{user.UserInfoLetter}','{user.UserInfoTake}','{user.UserInfoPhone}','{user.UserInfoEmil}','{user.UserInfoHead}',{user.UserInfoMoney})";

            return(DapperHelper.Cud(sql));
        }
コード例 #21
0
        public int Update(string pass, int userid)
        {
            string sql = $"update  UserInfo set UserInfoPass='******' where UserInfoId={userid}";

            return(DapperHelper.Cud(sql));
        }
コード例 #22
0
        /// <summary>
        /// 把已经推送的轮播修改为下架
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        public int UpdateActibityInfosByIds(string ids)
        {
            string sql = $"update ActibityInfo set ActibityInfoState=0 where ActibityInfoId in({ids})";

            return(DapperHelper.Cud(sql));
        }