酒水商城|基于Springboot实现酒水商城系统

news2024/10/7 4:22:55

作者主页:编程千纸鹤

作者简介:Java、前端、Pythone开发多年,做过高程,项目经理,架构师

主要内容:Java项目开发、毕业设计开发、面试技术整理、最新技术分享

收藏点赞不迷路  关注作者有好处

项目编号:BS-SC-036

一,项目简介

系统整体介绍:

本系统主要基于Springboot框架开发实现,实现了一个以茶叶为主题的商城系统。在本商城系统中,可以实现在线购买酒水,在线支付,管理个人订单,管理个人收货地址,确认收货等功能。用户浏览商城的茶叶产品后可以将茶叶商品添加到购物车中,然后下单支付购买。用户登陆后可以在个人中心中管理自己的购物车信息、订单信息、收货地址信息等。同样在商城前端页面中提供了全文搜索功能,用户可以根据酒水的相关功效或禁忌来查询符合自己要的酒水商品。

系统同样提供了强大的后台管理系统,在后台管理模块中可以实现能前台注册用户的管理操作,可以管理所有用户的订单信息,根据订单支付情况进行发货等操作。同样可以管理产品的分类,可以管理商品的信息,以图文的形式来添加商品信息。为了更好了了解商品的销售情况,在后台使用echart实现了商品销售的图形报表和订单的统计报表功能。

      系统使用了SpringSecurity框架来管理系统的用户登陆和权限认证操作,以保证系统的安全性。本系统功能完整,页面简洁大方,运行无误,适合做毕业设计使用。

      相似性推荐:根据用户的浏览商品的相似性做协同过滤运算,从而给用户进行商品的推荐。

      浏览记录查询:用户的浏览和搜索记录后台会进行记录,在用户进行搜索时会根据搜索关键词的总量进行排行,从而实现推荐的效果

 

二,环境介绍

语言环境:Java:  jdk1.8

数据库:Mysql: mysql5.7

应用服务器:Tomcat:  tomcat8.5.31

开发工具:IDEA或eclipse

后台开发技术:springboot+springmvc+mybatis+ Springsecurity

前台开发技术:jsp+jquery+ajax+bootstrap

三,系统展示

系统首页

分类展示

商品详情

全文检索:记录用户检索历史记录并可以根据历史记录来进行快速搜索

根据品牌进行搜索

相似性推荐:根据用户的浏览商品的相似性做协同过滤运算,从而给用户进行商品的推荐

用户注册

用户登陆

登陆后可以进行商品购买

下单后可个人中心可以查看我的订单,并可以取消订单

个人中心管理个人收货地址

后台管理员登陆

用户管理

轮播图管理

商品分类动态维护

商品品牌管理

商品管理

订单管理

图形统计报表

四,核心代码展示

package com.yw.eshop.controller.front;

import com.yw.eshop.domain.Carousel;
import com.yw.eshop.domain.Product;
import com.yw.eshop.domain.ProductType;
import com.yw.eshop.domain.SearchHistory;
import com.yw.eshop.service.CarouselService;
import com.yw.eshop.service.ProductService;
import com.yw.eshop.service.ProductTypeService;
import com.yw.eshop.service.SearchHistoryService;
import com.yw.eshop.service.CarouselService;
import com.yw.eshop.service.ProductService;
import com.yw.eshop.service.ProductTypeService;
import com.yw.eshop.service.SearchHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * 前端首页控制接口
 */
@Controller
@RequestMapping("/front")
public class FrontIndexController {

    @Autowired//轮播图
    private CarouselService carouselService ;
    @Autowired//商品类型
    private ProductTypeService productTypeService ;
    @Autowired//商品
    private ProductService productService ;
    @Autowired
    private SearchHistoryService searchHistoryService;
    @RequestMapping("/index")
    public String index(Model model){
        //轮播图
        List<Carousel> carousels = carouselService.queryCarouselAll();
        model.addAttribute("allcarouselFigures",carousels);
        //分类
        List<ProductType> productTypes = productTypeService.queryProductTypeAll();
        model.addAttribute("allProductTypes",productTypes);
        //新品
        List<Product> newProducts = productService.queryNewProduct(6);
        model.addAttribute("newProducts", newProducts);
        //查询热搜词
        List<SearchHistory> searchHistorys = searchHistoryService.querySearchHistoryPages(10);
        model.addAttribute("searchHistorys",searchHistorys);
        //排行榜
        List<Product> rankings = productService.queryProductRankings();
        model.addAttribute("rankings", rankings);
        //白酒
        ProductType productType = new ProductType();
        productType.setProductTypeName("白酒");
        Product product = new Product();
        product.setProductType(productType);
        List<Product> list = productService.queryProductsByType(product, 5);
        model.addAttribute("list", list);
        //红酒
        productType.setProductTypeName("红酒");
        product.setProductType(productType);
        product.getProductType().setProductTypeName("红酒");
        List<Product> list2 = productService.queryProductsByType(product, 12);
        model.addAttribute("list2", list2);
        //洋酒
        productType.setProductTypeName("洋酒");
        product.setProductType(productType);
        List<Product> list3 = productService.queryProductsByType(product, 5);
        model.addAttribute("list3", list3);
        //养生酒
        productType.setProductTypeName("养生酒");
        product.setProductType(productType);
        List<Product> list4 = productService.queryProductsByType(product, 12);
        model.addAttribute("list4", list4);
        return "front/index/index";
    }
}

package com.yw.eshop.controller.front;

import com.yw.eshop.domain.User;
import com.yw.eshop.service.UserService;
import com.yw.eshop.utils.EncryptionUtils;

import com.yw.eshop.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;

/**
 * 前端用户登陆退出
 */
@Controller
@RequestMapping("/front/login")
public class FrontLoginController {
    @Autowired
    private UserService userService;
    @RequestMapping("/loginPage")
    public String loginPage(){
        return "front/login";
    }
    @RequestMapping("/login")
    @ResponseBody
    public String login(String username, String password, String code, String autoLogin,
                        HttpServletRequest request, HttpSession session, HttpServletResponse response){
        String code1 = (String) session.getAttribute("code");
        if(StringUtils.isEmpty(code)||!code.equalsIgnoreCase(code1)){
            return "验证码错误";
        }
        if(!StringUtils.isEmpty(username)){
            User user = userService.queryUserByName(username, 1);
            if(user==null){
                return "用户名不存在";
            }else {
                String psw1 = user.getPassword();
                if(psw1.equals(EncryptionUtils.encryptMD5(password))){
                    System.out.println("登录成功");
                    session.setAttribute("user",user);
                    if(!StringUtils.isEmpty(autoLogin)&&autoLogin.equals("1")){
                        Cookie username_cookie = new Cookie("username", username);
                        username_cookie.setMaxAge(3600*24*7);
                        username_cookie.setPath(request.getContextPath());
                        response.addCookie(username_cookie);
                    }else {
                        Cookie username_cookie = new Cookie("username", username);
                        username_cookie.setMaxAge(0);
                        username_cookie.setPath(request.getContextPath());
                        response.addCookie(username_cookie);
                    }
                    return "登录成功";
                }else {
                    return "密码错误";
                }
            }
        }else {
            return "用户名为空";
        }
    }
    @RequestMapping("/logout")
    public void logout(HttpSession session,HttpServletRequest request,HttpServletResponse response) throws IOException {
        session.removeAttribute("user");
        Cookie[] cookies = request.getCookies();
        if(cookies!=null){
            for (Cookie cookie : cookies) {
                if ("username".equals(cookie.getName())) {
                    cookie.setMaxAge(0);
                    cookie.setPath(request.getContextPath());
                    response.addCookie(cookie);
                }
            }
        }
        response.sendRedirect(request.getContextPath()+"/front/login/loginPage");

    }
}

package com.yw.eshop.controller.front;

import com.yw.eshop.domain.Order;
import com.yw.eshop.domain.OrderProduct;
import com.yw.eshop.domain.User;
import com.yw.eshop.service.OrderProductService;
import com.yw.eshop.service.OrderService;
import com.yw.eshop.service.OrderProductService;
import com.yw.eshop.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * 前台订单控制器
 */
@Controller
@RequestMapping("front/order")
public class FrontOrderController {
    @Autowired
    private OrderService orderService;
    @Autowired
    private OrderProductService orderProductService;

    /**
     * 前台个人中心订单查询
     * @param session
     * @param model
     * @return
     */
    @RequestMapping("index")
    private String index(HttpSession session, Model model){
        try {
            User user = (User) session.getAttribute("user");
            if (user == null) {
                return "redirect:/front/login/loginPage";
            } else {
                List<Order> list = orderService.queryAllOrder(user.getId());
                for (Order order : list) {
                    List<OrderProduct> orderProducts = orderProductService.queryOrderProByOrderId(order.getId());
                    order.setList(orderProducts);
                }
                model.addAttribute("list", list);
                return "front/order/order";
            }
        }catch (Exception e){
            e.printStackTrace();
            model.addAttribute("errMessage","服务器繁忙"+e.getMessage());
            return "500";
        }
    }

    /**
     *  前台用户取消订单:条件是未发货状态
     * @param id
     * @param model
     * @return
     */
    @RequestMapping("/delete")
    @ResponseBody
    public String delete(String id, Model model){
        model.addAttribute("id", id);
        try {
            int i = orderService.delete(id);
            if (i==0){
                model.addAttribute("errMessage","服务器繁忙操作失败");
                return "500";
            }
        }catch (Exception e){
            model.addAttribute("errMessage",e.getMessage());
            return "500";
        }

        //return "forward:/front/order/index";
        model.addAttribute("url", "/front/order/index");
        return "success";
    }

    /**
     *  前台用户确认收货:条件是己发货状态
     * @param id
     * @param model
     * @return
     */
    @RequestMapping("/update")
    @ResponseBody
    public String update(String id,Integer status, Model model){
        model.addAttribute("id", id);
        try {
            int i = orderService.updateStatus(id,status);
            if (i==0){
                model.addAttribute("errMessage","服务器繁忙操作失败");
                return "500";
            }
        }catch (Exception e){
            model.addAttribute("errMessage",e.getMessage());
            return "500";
        }

        //return "forward:/front/order/index";
        model.addAttribute("url", "/front/order/index");
        return "success";
    }
}
package com.yw.eshop.controller.front;

import com.alibaba.fastjson.JSON;
import com.yw.eshop.domain.*;
import com.yw.eshop.service.*;
import com.yw.eshop.domain.*;
import com.yw.eshop.utils.UUIDUtils;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yw.eshop.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 购物车处理控制品接口
 */
@Controller
@RequestMapping("front/shop_cart")
public class ShopCartController {
    @Autowired
    private ReceiveAddressService receiveAddressService;
    @Autowired
    private ShopCartProductService shopCartProductService;
    @Autowired
    private ShopCartService shopCartService;
    @Autowired
    private OrderService orderService;
    @Autowired
    private OrderProductService orderProductService;

    @RequestMapping("/shopCart")
    public String index(HttpSession session, Model model){
        try{
            User user =(User) session.getAttribute("user");
            if (user ==null){
                return "redirect:/front/login/loginPage";
            }else {
                ShopCart shopCart=shopCartService.queryShopCartByUserID(user.getId());
                List<ReceiveAddress> receiveAddresses=receiveAddressService.queryAddressByUserID(user.getId());
                model.addAttribute("address",receiveAddresses);
                List<ShopCartProduct> list=shopCartProductService.queryCartProductAll(shopCart.getId());
                model.addAttribute("list",list);
            }
            return "front/shop_cart/shop_cart";

        }catch (Exception e){
            e.printStackTrace();
            model.addAttribute("errMessage","服务器繁忙"+e.getMessage());
            return "500";
        }

    }
    @RequestMapping("addProductToCart")
    @ResponseBody
    public String addProductToCart(HttpSession session, String product_id,Integer product_num) throws JsonProcessingException {
        Map map =new HashMap();
        try{
            User user =(User) session.getAttribute("user");
            if (user ==null){
                map.put("message","请登录后再操作");
                map.put("url","/front/login/loginPage");
            }else {
                ShopCart shopCart=shopCartService.queryShopCartByUserID(user.getId());
                ShopCartProduct shopCartProduct=new ShopCartProduct();
                Product product=new Product();
                product.setId(product_id);
                shopCartProduct.setProduct(product);
                shopCartProduct.setShopCart(shopCart);
                shopCartProduct.setProductNum(product_num);
                shopCartProductService.addShop(shopCartProduct);
                map.put("result",true);
            }
        }catch (Exception e){
            e.printStackTrace();
            map.put("message","添加失败"+e.getMessage());
        }
        ObjectMapper objectMapper = new ObjectMapper();
        String val = objectMapper.writeValueAsString(map);
        return val;
    }
    @RequestMapping("/deleteProduct")
    @ResponseBody
    public String delete(String id) throws JsonProcessingException {
        Map map =new HashMap();
        try {
            int i = shopCartProductService.deleteById(id);
            if (i==0){
                map.put("message","删除失败");
            }else {
                map.put("message","删除成功");
                map.put("result",true);
            }
        }catch (Exception e){
            e.printStackTrace();;
            map.put("message","删除失败:"+e.getMessage());
        }
        ObjectMapper objectMapper = new ObjectMapper();
        String val = objectMapper.writeValueAsString(map);
        System.out.println(val);
        return val;
    }
    @RequestMapping("/batchDel")
    @ResponseBody
    public String batchDel(String[] ids) throws JsonProcessingException {
        Map map =new HashMap();
        try {
            shopCartProductService.deleteAll(ids);
            map.put("message","删除成功");
            map.put("result",true);
        }catch (Exception e){
            e.printStackTrace();;
            map.put("message","删除失败:"+e.getMessage());
        }
        ObjectMapper objectMapper = new ObjectMapper();
        String val = objectMapper.writeValueAsString(map);
        System.out.println(val);
        return val;
    }
    @RequestMapping("compute")
    @ResponseBody
    public String compute(String products,String address_id,HttpSession session) throws JsonProcessingException {
        Map map =new HashMap();
        User user =(User) session.getAttribute("user");
        try {
            if (user ==null){
                map.put("message","请登录后再操作");
                map.put("url","/front/login/loginPage");
            }else {
                List<ProIdAndNum> proIdAndNums= JSON.parseArray(products,ProIdAndNum.class);
                Order order=new Order();
                String OrderProId=UUIDUtils.getId();
                order.setId(OrderProId);
                order.setCreateTime(new Date());
                order.setUserId(user.getId());
                ReceiveAddress receiveAddress = new ReceiveAddress();
                receiveAddress.setId(address_id);
                order.setReceiveAddress(receiveAddress);
                orderService.addOrderOne(order);
                ShopCart shopCart=shopCartService.queryShopCartByUserID(user.getId());
                for (ProIdAndNum proIdAndNum : proIdAndNums) {
                    OrderProduct orderProduct=new OrderProduct();
                    orderProduct.setId(UUIDUtils.getId());
                    orderProduct.setOrder(order);
                    Product product=new Product();
                    product.setId(proIdAndNum.getId());
                    orderProduct.setProduct(product);
                    orderProduct.setProductNum(proIdAndNum.getNum());
                    orderProductService.addOrdProOne(orderProduct);
                    shopCartProductService.deleteShopCartBy(shopCart.getId(),proIdAndNum.getId());
                }
                map.put("message","结算成功");
                map.put("result",true);
            }
        }catch (Exception e){
            map.put("message","服务器繁忙:"+e.getMessage());
        }
        ObjectMapper objectMapper = new ObjectMapper();
        String val = objectMapper.writeValueAsString(map);
        System.out.println(val);
        return val;
    }

}

五,项目总结

在目前电商为王的中国社会上,种类繁多的电子商务网站如雨后春笋般纷纷建立,百花齐鸣的发展态势可以在很大程度上,十分有效的解决原来时代的信息资源闭塞和地域上的限制[1]。网上交易代替了很多传统的线下消费,这种势头发展的越来越火热,而这一却都是伴随着用户的购买能力的提高,和IT信息化产业的发展以及新型互联网技术的应用[2]。

互联网以及移动互联网的普及应用,也使得消费者的消费路径更加快捷短暂,足不出户可一缆天下,一机在手可买遍全球。所以消费者基本上已经被新的消费模式所吸引,也具备了网络消费的应用水平。而对于广大的电商平台来讲,大而全的电商有之,小而美的电商也有自己的存活空间[3]。而最近这些年比较流行的垂直电商平台的崛起和应用,也让我们的用户可以直接找到自己所喜欢酒水的平台,进行点对点的消费,这就是我们进行酒水电商研究的一个基础背景[6]。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/20056.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

【Java八股文总结】之集合

文章目录Java集合一、集合概述1、List、Set、Queue、Map的区别&#xff1f;2、Collections和Collection的区别&#xff1f;3、集合和数组的区别二、List1、ArrayList和LinkedList的区别&#xff1f;2、ArrayList和Vector的区别3、Vector、ArrayList和LinkedList的区别4、ArrayL…

Echarts:简单词云图实现

Echarts是一个开源的可视化图表库&#xff0c;支持丰富的图表&#xff0c;官网中还有大量示例可以选择使用、参考。 其中比较好玩、有趣的是词云&#xff0c;词云就是用关键词组成的一朵云&#xff0c;更广泛的定义是&#xff0c;由关键词组成的任意一种图案均称为词云。因此&…

[附源码]java毕业设计社区空巢老人关爱服务平台

项目运行 环境配置&#xff1a; Jdk1.8 Tomcat7.0 Mysql HBuilderX&#xff08;Webstorm也行&#xff09; Eclispe&#xff08;IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持&#xff09;。 项目技术&#xff1a; SSM mybatis Maven Vue 等等组成&#xff0c;B/S模式 M…

【服务器】无法进行ssh连接的问题逐一排查以及解决方法

一、检查服务器网络 先检查是否是网络的问题。按快捷键WinR&#xff0c;在弹出的对话框中输入cmd。 点击确定运行。在cmd窗口输入ping一下服务器的ip地址。 如果出现请求超时&#xff0c;解决办法如下&#xff1a; 在服务器端输入ifconfig命令&#xff0c;查看要连接的网络的…

[计算机毕业设计]知识图谱的检索式对话系统

前言 &#x1f4c5;大四是整个大学期间最忙碌的时光,一边要忙着准备考研,考公,考教资或者实习为毕业后面临的就业升学做准备,一边要为毕业设计耗费大量精力。近几年各个学校要求的毕设项目越来越难,有不少课题是研究生级别难度的,对本科同学来说是充满挑战。为帮助大家顺利通过…

NX二次开发-调内部函数SEL_set_type_filter_index_by_label设置类型过滤器例子剖析怎么查找内部函数调用内部函数

NX二次开发-调内部函数SEL_set_type_filter_index_by_label设置类型过滤器例子剖析怎么查找内部函数调用内部函数 前言 给那些不会调内部函数的人,一个学习方法,大概知道怎么找内部接口,怎么调用内部函数的。 复杂的东西我也不会,等我研究出来了,在更新到博客上。 版本…

业务级灾备架构设计

同城多中心架构 同城双中心基本架构 关键特征&#xff1a; 相同城市&#xff0c;相距50km以上光纤互联机房间网络延时<2ms 同城双中心架构本质 同城双中心可以当做一个逻辑机房可以应对机房级别的灾难 同城双中心应用技巧-多光纤通路 同一集群&#xff0c;部署在同城两个…

异常~~~

异常 异常体系 编译时异常和运行时异常的区别 Java中的异常被分为两大类&#xff1a;编译时异常和运行时异常&#xff0c;也别成为受检异常和非受检异常 所有的RuntimeException类及其子类被称为运行时异常&#xff0c;其他的异常都是编译时异常 编译时异常&#xff1a;必须…

怎么在bios里设置光驱启动 bios设置光驱启动图文教程

大部分主板都是在开机以后按DEL键进入BIOS设置。 第一部分&#xff1a;学会各种bios主板的光驱启动设置&#xff0c;稍带把软驱关闭掉。 图1&#xff1a; 图2&#xff1a;光驱启动设置 。 图3&#xff1a;回车后要保存退出 。 图4&#xff1a;提示用户&#xff0c;必须选择“…

机器学习:BP神经网络

神经网络人工神经网络的结构特点人工神经网络单层神经网络双层神经网络多层神经网络BP神经网络通过TensorFlow实现BP神经网络单层感知网络是最初的神经网络&#xff0c;具有模型清晰、结构简单、计算量小等优点&#xff0c;但是它无法处理非线性问题。BP神经网络具有任意复杂的…

性能工具之前端分析工Chrome Developer Tools性能标签

文章目录一、前言二、第一部分三、第二部分四、第三部分五、第四部分六、小结一、前言 之前本博曾经写过几篇和前端性能分析相关的文章&#xff0c;如下&#xff1a; 常见性能工具一览性能工具之常见压力工具是否能模拟前端&#xff1f;性能工具之前端分析工Chrome Developer…

【Pytorch with fastai】第 19 章 :从零开始的 fastai 学习者

&#x1f50e;大家好&#xff0c;我是Sonhhxg_柒&#xff0c;希望你看完之后&#xff0c;能对你有所帮助&#xff0c;不足请指正&#xff01;共同学习交流&#x1f50e; &#x1f4dd;个人主页&#xff0d;Sonhhxg_柒的博客_CSDN博客 &#x1f4c3; &#x1f381;欢迎各位→点赞…

AutoDWG 文件属性编辑修改控件/Attribute Modifier-X

AutoDWG 文件属性编辑修改控件组件/AttributeX 控件组件 属性控件组件是开发者无需AutoCAD就可以直接在dwg文件中提取或修改属性值的组件。 主要特征&#xff1a; 从 dwg 文件中提取属性值。 直接在dwg文件中添加或修改属性值。 支持 R9 到 2016 版本的 DWG 和 DXF。 独立于 A…

如何学习Python技术?自学Python需要多久?

前言 Python要学习的时间取决于学习方式&#xff1a;自学至少需要学8个月;报班的话&#xff0c;可能需要4个月左右的时间。如果想具体了解Python要学多久&#xff0c;那不妨接着往下看吧! &#xff08;文末送读者福利&#xff09; 这个问题分为两种情况&#xff0c;分为自学和…

机械设计基础总复习

《机械设计基础》 一、简答题 1. 机构与机器的特征有何不同&#xff1f; 机器的特征&#xff1a;&#xff08;1&#xff09;人为机件的组合&#xff1b;&#xff08;2&#xff09;有确定的运动&#xff1b;&#xff08;3&#xff09;能够进行能量转换或代替人的劳动。 机构…

攻防世界Encode

Encode 题目描述&#xff1a;套娃&#xff1f; 题目环境&#xff1a;https://download.csdn.net/download/m0_59188912/87094879 打开timu.txt文件&#xff0c;猜测是rot13加密。 Rot13在线解码网址&#xff1a;https://www.jisuan.mobi/puzzm6z1B1HH6yXW.html 解密得到&#x…

跟艾文学编程《Python基础》(1)Python 基础入门

作者&#xff1a; 艾文&#xff0c;计算机硕士学位&#xff0c;企业内训讲师和金牌面试官&#xff0c;现就职BAT一线大厂公司资深算法专家。 邮箱&#xff1a; 1121025745qq.com 博客&#xff1a;https://wenjie.blog.csdn.net/ 内容&#xff1a;跟艾文学编程《Python基础入门》…

专题18:Django之Form,ModelForm

原始思路实现添加用户功能的缺点&#xff1a; 1&#xff09;用户提交的数据没有校验 2&#xff09;如果用户输入的数据有错误&#xff0c;没有错误提示 3&#xff09;前端页面上的每一个字段都需要我们重新写一次 4&#xff09;关联的数据需要手动取获取并循环展示在页面 1…

【Effective_Objective-C_1熟悉Objective_C】

文章目录说在前面的熟悉ObjectiveCfirst了解Objective-C的起源1.消息结构和函数调用运行期组件内存管理Objective-C的起源要点总结Second 在类的头文件尽量少饮入其他文件尽量延后引入头文件或者单独开辟一个文件向前声明在类的头文件尽量少饮入其他文件要点总结THIRD-多用字面…

梯度下降法的理解

1 梯度下降法 本文所有的数学定义概念非官方所给&#xff0c;皆来自于个人理解融合 1.1 梯度的定义 个人理解就是能够使函数值增大最快的方向 需要明确的一点&#xff0c;这里说的方向都是自变量变化的方向 1.2 梯度下降法 梯度下降法本质上是用来求解目标函数最小值的一种…