• 大小: 14.89M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-06-19
  • 语言: 其他
  • 标签: 其他  

资源简介

FruitShopping.rar

资源截图

代码片段和文件信息

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;
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        303  2017-09-02 21:13  FruitShopping\.idea\artifacts\FruitShopping_war.xml

     文件       3028  2017-09-02 21:14  FruitShopping\.idea\artifacts\FruitShopping_war_exploded.xml

     文件       1289  2017-09-02 21:13  FruitShopping\.idea\compiler.xml

     文件         76  2017-04-27 15:44  FruitShopping\.idea\copyright\profiles_settings.xml

     文件        475  2017-08-31 20:41  FruitShopping\.idea\libraries\Maven__aopalliance_aopalliance_1_0.xml

     文件        555  2017-08-31 20:41  FruitShopping\.idea\libraries\Maven__commons_beanutils_commons_beanutils_1_7_0.xml

     文件        563  2017-08-31 20:41  FruitShopping\.idea\libraries\Maven__commons_collections_commons_collections_3_0.xml

     文件        566  2017-08-31 20:41  FruitShopping\.idea\libraries\Maven__commons_fileupload_commons_fileupload_1_3_2.xml

     文件        478  2017-08-31 20:41  FruitShopping\.idea\libraries\Maven__commons_io_commons_io_1_3_2.xml

     文件        486  2017-08-31 20:41  FruitShopping\.idea\libraries\Maven__commons_lang_commons_lang_2_6.xml

     文件        533  2017-08-31 20:41  FruitShopping\.idea\libraries\Maven__commons_logging_commons_logging_1_0_3.xml

     文件        454  2017-08-31 20:41  FruitShopping\.idea\libraries\Maven__com_alibaba_druid_1_0_18.xml

     文件        475  2017-08-31 20:41  FruitShopping\.idea\libraries\Maven__com_alibaba_fastjson_1_2_26.xml

     文件        539  2017-08-31 20:41  FruitShopping\.idea\libraries\Maven__javax_servlet_javax_servlet_api_3_0_1.xml

     文件        423  2017-08-31 20:41  FruitShopping\.idea\libraries\Maven__junit_junit_3_8_1.xml

     文件        430  2017-08-31 20:41  FruitShopping\.idea\libraries\Maven__log4j_log4j_1_2_17.xml

     文件        535  2017-08-31 20:41  FruitShopping\.idea\libraries\Maven__mysql_mysql_connector_java_5_1_38.xml

     文件        461  2017-08-31 20:41  FruitShopping\.idea\libraries\Maven__org_mybatis_mybatis_3_4_1.xml

     文件        510  2017-08-31 20:41  FruitShopping\.idea\libraries\Maven__org_mybatis_mybatis_spring_1_3_0.xml

     文件        570  2017-08-31 20:41  FruitShopping\.idea\libraries\Maven__org_springframework_spring_aop_4_2_5_RELEASE.xml

     文件        584  2017-08-31 20:41  FruitShopping\.idea\libraries\Maven__org_springframework_spring_beans_4_2_5_RELEASE.xml

     文件        598  2017-08-31 20:41  FruitShopping\.idea\libraries\Maven__org_springframework_spring_context_4_2_5_RELEASE.xml

     文件        577  2017-08-31 20:41  FruitShopping\.idea\libraries\Maven__org_springframework_spring_core_4_2_5_RELEASE.xml

     文件        619  2017-08-31 20:41  FruitShopping\.idea\libraries\Maven__org_springframework_spring_expression_4_2_5_RELEASE.xml

     文件        577  2017-08-31 20:41  FruitShopping\.idea\libraries\Maven__org_springframework_spring_jdbc_4_2_5_RELEASE.xml

     文件        563  2017-08-31 20:41  FruitShopping\.idea\libraries\Maven__org_springframework_spring_tx_4_2_5_RELEASE.xml

     文件        591  2017-08-31 20:41  FruitShopping\.idea\libraries\Maven__org_springframework_spring_webmvc_4_2_5_RELEASE.xml

     文件        570  2017-08-31 20:41  FruitShopping\.idea\libraries\Maven__org_springframework_spring_web_4_2_5_RELEASE.xml

     文件       3049  2017-05-31 13:33  FruitShopping\.idea\misc.xml

     文件        266  2017-09-02 21:13  FruitShopping\.idea\modules.xml

............此处省略1022个文件信息

评论

共有 条评论