• 大小: 26.9MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-06-27
  • 语言: Java
  • 标签: 水果销售  java  mysql  

资源简介

水果销售网站是利用了信息技术,结合了电子商务模式来实现水果的买卖操作,网站是基于Java开发,并利用了MySQL数据库来实现对数据的存储。本网站从客户需求出发,设计了前台用户和管理员,前台用户可以搜索水果,并在注册和登录后可以进行下单购买,同时也设计了购物车的购买形式,购买后可以查看自己的订单。管理员包含了对水果的种类、水果相关信息进行发布
包含数据库

资源截图

代码片段和文件信息

package com.fruit.Controller;

import com.alibaba.fastjson.JSONobject;
import com.fruit.Model.Address;
import com.fruit.Model.AddressExample;
import com.fruit.Service.AddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

/**
 * Created by Admin on 2017/5/3.
 */
@Controller
@RequestMapping(“/address“)
public class AddressManager {
    @Autowired
    AddressService addressService;

   //更新默认地址
    @RequestMapping(value = “/memberDefaultAddress“method = RequestMethod.POST)
    @ResponseBody
    public JSONobject memberDefaultAddress(@RequestBody Address address HttpServletRequest httpServletRequest)
    {
        JSONobject jsonobject=new JSONobject();
        HttpSession session=httpServletRequest.getSession();
        String memberid=(String) session.getAttribute(“username“);

        AddressExample addressExample=new AddressExample();
        AddressExample.Criteria criteria=addressExample.createCriteria();
        criteria.andMemberidEqualTo(memberid);
        criteria.andStatusEqualTo(“默认地址“);

        try{
           int n= addressService.updateByExampleSelective(addressaddressExample);
            if(n==0){
                address.setMemberid(memberid);
                address.setStatus(“默认地址“);
                addressService.insertSelective(address);
            }
        }catch (Exception e){

        }
        jsonobject.put(“success“true);
        return  jsonobject;
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2020-02-13 15:46  FruitShopping\
     目录           0  2020-02-13 15:38  FruitShopping\.idea\
     文件        1046  2020-02-12 15:01  FruitShopping\.idea\$CACHE_FILE$
     目录           0  2020-02-12 15:04  FruitShopping\.idea\artifacts\
     文件         479  2020-02-12 15:04  FruitShopping\.idea\artifacts\FruitShopping_war.xml
     文件        3239  2020-02-12 15:04  FruitShopping\.idea\artifacts\FruitShopping_war_exploded.xml
     文件         651  2020-02-12 15:04  FruitShopping\.idea\compiler.xml
     目录           0  2020-02-12 15:04  FruitShopping\.idea\libraries\
     文件         514  2020-02-12 15:04  FruitShopping\.idea\libraries\Maven__aopalliance_aopalliance_1_0.xml
     文件         594  2020-02-12 15:04  FruitShopping\.idea\libraries\Maven__commons_beanutils_commons_beanutils_1_7_0.xml
     文件         602  2020-02-12 15:04  FruitShopping\.idea\libraries\Maven__commons_collections_commons_collections_3_0.xml
     文件         605  2020-02-12 15:04  FruitShopping\.idea\libraries\Maven__commons_fileupload_commons_fileupload_1_3_2.xml
     文件         517  2020-02-12 15:04  FruitShopping\.idea\libraries\Maven__commons_io_commons_io_1_3_2.xml
     文件         525  2020-02-12 15:04  FruitShopping\.idea\libraries\Maven__commons_lang_commons_lang_2_6.xml
     文件         572  2020-02-12 15:04  FruitShopping\.idea\libraries\Maven__commons_logging_commons_logging_1_0_3.xml
     文件         493  2020-02-12 15:04  FruitShopping\.idea\libraries\Maven__com_alibaba_druid_1_0_18.xml
     文件         514  2020-02-12 15:04  FruitShopping\.idea\libraries\Maven__com_alibaba_fastjson_1_2_26.xml
     文件         578  2020-02-12 15:04  FruitShopping\.idea\libraries\Maven__javax_servlet_javax_servlet_api_3_0_1.xml
     文件         462  2020-02-12 15:04  FruitShopping\.idea\libraries\Maven__junit_junit_3_8_1.xml
     文件         469  2020-02-12 15:04  FruitShopping\.idea\libraries\Maven__log4j_log4j_1_2_17.xml
     文件         574  2020-02-12 15:04  FruitShopping\.idea\libraries\Maven__mysql_mysql_connector_java_5_1_38.xml
     文件         500  2020-02-12 15:04  FruitShopping\.idea\libraries\Maven__org_mybatis_mybatis_3_4_1.xml
     文件         549  2020-02-12 15:04  FruitShopping\.idea\libraries\Maven__org_mybatis_mybatis_spring_1_3_0.xml
     文件         609  2020-02-12 15:04  FruitShopping\.idea\libraries\Maven__org_springframework_spring_aop_4_2_5_RELEASE.xml
     文件         623  2020-02-12 15:04  FruitShopping\.idea\libraries\Maven__org_springframework_spring_beans_4_2_5_RELEASE.xml
     文件         637  2020-02-12 15:04  FruitShopping\.idea\libraries\Maven__org_springframework_spring_context_4_2_5_RELEASE.xml
     文件         616  2020-02-12 15:04  FruitShopping\.idea\libraries\Maven__org_springframework_spring_core_4_2_5_RELEASE.xml
     文件         658  2020-02-12 15:04  FruitShopping\.idea\libraries\Maven__org_springframework_spring_expression_4_2_5_RELEASE.xml
     文件         616  2020-02-12 15:04  FruitShopping\.idea\libraries\Maven__org_springframework_spring_jdbc_4_2_5_RELEASE.xml
     文件         602  2020-02-12 15:04  FruitShopping\.idea\libraries\Maven__org_springframework_spring_tx_4_2_5_RELEASE.xml
     文件         630  2020-02-12 15:04  FruitShopping\.idea\libraries\Maven__org_springframework_spring_webmvc_4_2_5_RELEASE.xml
............此处省略871个文件信息

评论

共有 条评论