当前位置: 首页 > news >正文

微信小程序毕业设计-微信食堂线上订餐系统项目开发实战(附源码+论文)

大家好!我是程序猿老A,感谢您阅读本文,欢迎一键三连哦。

💞当前专栏:微信小程序毕业设计

精彩专栏推荐👇🏻👇🏻👇🏻

🎀 Python毕业设计
🌎Java毕业设计

开发运行环境

①前端:微信小程序开发工具

② 后端:Java

  • 框架:ssm
  • JDK版本:JDK1.8
  • 服务器:tomcat7
  • 数据库:mysql 5.7
  • 数据库工具:Navicat12
  • 开发软件:eclipse/myeclipse/idea
  • Maven包:Maven3.3.9
  • 浏览器:谷歌浏览器

演示视频

原版高清演示视频-编号:197
https://pan.quark.cn/s/b2f44f423421

源码下载地址:

https://download.csdn.net/download/2301_76953549/89227626

论文目录

【如需全文请按文末获取联系】
在这里插入图片描述
在这里插入图片描述

一、项目简介

微信食堂线上订餐小程序可以实现商品管理,商品评价管理,商家管理,公告管理,商品订单管理,在线充值等功能。该系统采用了SSM框架,Mysql数据库,Java语言等技术实现管理员后台,采用微信开发者工具来对用户小程序端进行了开发。

二、系统设计

2.1软件功能模块设计

图4.1即为设计的管理员功能结构,管理员权限操作的功能包括对用户注册信息,对商家信息,商品信息,公告信息等进行管理。
在这里插入图片描述
图4.2即为设计的商家功能结构,商家权限操作的功能包括管理商品,管理并回复商品评价,管理商品订单,查看公告等。
在这里插入图片描述
图4.3即为设计的用户功能结构,用户权限操作的功能包括购买商品,查看商家资料,查看公告,查看商品评价,管理商品订单,进行账户充值等。
在这里插入图片描述

2.2数据库设计

(1)图4.4即为商品这个实体所拥有的属性值。
在这里插入图片描述
(2)图4.5即为商品订单这个实体所拥有的属性值。
在这里插入图片描述

(4)图4.7即为商家这个实体所拥有的属性值。
在这里插入图片描述
(5)图4.8即为上面介绍的实体中存在的联系。
在这里插入图片描述

三、系统项目部分截图

3.1管理员功能实现

商家管理
图5.2 即为编码实现的商家管理界面,管理员在商家管理界面中具备更改商家营业执照,商家星级类型以及商家联系方式等信息,以及删除,添加商家等权限。
在这里插入图片描述
用户管理
图5.3 即为编码实现的用户管理界面,管理员在用户管理界面为用户的账号进行密码重置,更改用户的基础信息,删除需要删除的用户资料等。
在这里插入图片描述

3.2商家功能实现

商品管理
图5.4 即为编码实现的商品管理界面,商家在商品管理界面中具备增加商品库存,减少商品库存,为商品进行下架,更改商品信息,添加商品等权限。
在这里插入图片描述
商品评价管理
图5.5 即为编码实现的商品评价管理界面,商家在商品评价管理界面中查看用户对订单商品的评价,商家需要回复评价信息。
在这里插入图片描述

3.3用户功能实现

商品信息
图5.7 即为编码实现的商品信息界面,用户在商品信息界面中购买商品,或点击加入购物车按钮把商品保存在购物车里面。
在这里插入图片描述
订单确认
图5.8 即为编码实现的订单确认界面,用户在订单确认界面中需要确认购买的商品以及收货的地址信息,在余额充足的情况下就可以成功支付订单。
在这里插入图片描述
我的商品订单
图5.9 即为编码实现的我的商品订单界面,用户在我的商品订单界面中可以取餐,可以退款,可以评价订单。
在这里插入图片描述

四、部分核心代码


package com.controller;import java.io.File;
import java.math.BigDecimal;
import java.net.URL;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.*;
import java.lang.reflect.InvocationTargetException;import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.*;
import com.entity.view.*;
import com.service.*;
import com.utils.PageUtils;
import com.utils.R;
import com.alibaba.fastjson.*;/*** 商品订单* 后端接口* @author* @email
*/
@RestController
@Controller
@RequestMapping("/caipinOrder")
public class CaipinOrderController {private static final Logger logger = LoggerFactory.getLogger(CaipinOrderController.class);@Autowiredprivate CaipinOrderService caipinOrderService;@Autowiredprivate TokenService tokenService;@Autowiredprivate DictionaryService dictionaryService;//级联表service@Autowiredprivate AddressService addressService;@Autowiredprivate CaipinService caipinService;@Autowiredprivate YonghuService yonghuService;
@Autowired
private CaipinCommentbackService caipinCommentbackService;
@Autowired
private CartService cartService;
@Autowired
private ShangjiaService shangjiaService;/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));String role = String.valueOf(request.getSession().getAttribute("role"));if(false)return R.error(511,"永不会进入");else if("用户".equals(role))params.put("yonghuId",request.getSession().getAttribute("userId"));else if("商家".equals(role))params.put("shangjiaId",request.getSession().getAttribute("userId"));if(params.get("orderBy")==null || params.get("orderBy")==""){params.put("orderBy","id");}PageUtils page = caipinOrderService.queryPage(params);//字典表数据转换List<CaipinOrderView> list =(List<CaipinOrderView>)page.getList();for(CaipinOrderView c:list){//修改对应字典表字段dictionaryService.dictionaryConvert(c, request);}return R.ok().put("data", page);}/*** 后端详情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id, HttpServletRequest request){logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);CaipinOrderEntity caipinOrder = caipinOrderService.selectById(id);if(caipinOrder !=null){//entity转viewCaipinOrderView view = new CaipinOrderView();BeanUtils.copyProperties( caipinOrder , view );//把实体数据重构到view中//级联表AddressEntity address = addressService.selectById(caipinOrder.getAddressId());if(address != null){BeanUtils.copyProperties( address , view ,new String[]{ "id", "createTime", "insertTime", "updateTime", "yonghuId"});//把级联的数据添加到view中,并排除id和创建时间字段view.setAddressId(address.getId());view.setAddressYonghuId(address.getYonghuId());}//级联表CaipinEntity caipin = caipinService.selectById(caipinOrder.getCaipinId());if(caipin != null){BeanUtils.copyProperties( caipin , view ,new String[]{ "id", "createTime", "insertTime", "updateTime"});//把级联的数据添加到view中,并排除id和创建时间字段view.setCaipinId(caipin.getId());}//级联表YonghuEntity yonghu = yonghuService.selectById(caipinOrder.getYonghuId());if(yonghu != null){BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createTime", "insertTime", "updateTime"});//把级联的数据添加到view中,并排除id和创建时间字段view.setYonghuId(yonghu.getId());}//修改对应字典表字段dictionaryService.dictionaryConvert(view, request);return R.ok().put("data", view);}else {return R.error(511,"查不到数据");}}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody CaipinOrderEntity caipinOrder, HttpServletRequest request){logger.debug("save方法:,,Controller:{},,caipinOrder:{}",this.getClass().getName(),caipinOrder.toString());String role = String.valueOf(request.getSession().getAttribute("role"));if(false)return R.error(511,"永远不会进入");else if("用户".equals(role))caipinOrder.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));caipinOrder.setInsertTime(new Date());caipinOrder.setCreateTime(new Date());caipinOrderService.insert(caipinOrder);return R.ok();}/*** 后端修改*/@RequestMapping("/update")public R update(@RequestBody CaipinOrderEntity caipinOrder, HttpServletRequest request){logger.debug("update方法:,,Controller:{},,caipinOrder:{}",this.getClass().getName(),caipinOrder.toString());String role = String.valueOf(request.getSession().getAttribute("role"));
//        if(false)
//            return R.error(511,"永远不会进入");
//        else if("用户".equals(role))
//            caipinOrder.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));//根据字段查询是否有相同数据Wrapper<CaipinOrderEntity> queryWrapper = new EntityWrapper<CaipinOrderEntity>().eq("id",0);logger.info("sql语句:"+queryWrapper.getSqlSegment());CaipinOrderEntity caipinOrderEntity = caipinOrderService.selectOne(queryWrapper);if(caipinOrderEntity==null){caipinOrderService.updateById(caipinOrder);//根据id更新return R.ok();}else {return R.error(511,"表中有相同数据");}}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Integer[] ids){logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());caipinOrderService.deleteBatchIds(Arrays.asList(ids));return R.ok();}/*** 批量上传*/@RequestMapping("/batchInsert")public R save( String fileName){logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName);try {List<CaipinOrderEntity> caipinOrderList = new ArrayList<>();//上传的东西Map<String, List<String>> seachFields= new HashMap<>();//要查询的字段Date date = new Date();int lastIndexOf = fileName.lastIndexOf(".");if(lastIndexOf == -1){return R.error(511,"该文件没有后缀");}else{String suffix = fileName.substring(lastIndexOf);if(!".xls".equals(suffix)){return R.error(511,"只支持后缀为xls的excel文件");}else{URL resource = this.getClass().getClassLoader().getResource("static/upload/" + fileName);//获取文件路径File file = new File(resource.getFile());if(!file.exists()){return R.error(511,"找不到上传文件,请联系管理员");}else{List<List<String>> dataList = PoiUtil.poiImport(file.getPath());//读取xls文件dataList.remove(0);//删除第一行,因为第一行是提示for(List<String> data:dataList){//循环CaipinOrderEntity caipinOrderEntity = new CaipinOrderEntity();
//                            caipinOrderEntity.setCaipinOrderUuidNumber(data.get(0));                    //订单号 要改的
//                            caipinOrderEntity.setAddressId(Integer.valueOf(data.get(0)));   //收货地址 要改的
//                            caipinOrderEntity.setCaipinId(Integer.valueOf(data.get(0)));   //商品 要改的
//                            caipinOrderEntity.setYonghuId(Integer.valueOf(data.get(0)));   //用户 要改的
//                            caipinOrderEntity.setBuyNumber(Integer.valueOf(data.get(0)));   //购买数量 要改的
//                            caipinOrderEntity.setCaipinOrderTruePrice(data.get(0));                    //实付价格 要改的
//                            caipinOrderEntity.setCaipinOrderTypes(Integer.valueOf(data.get(0)));   //订单类型 要改的
//                            caipinOrderEntity.setCaipinOrderPaymentTypes(Integer.valueOf(data.get(0)));   //支付类型 要改的
//                            caipinOrderEntity.setInsertTime(date);//时间
//                            caipinOrderEntity.setCreateTime(date);//时间caipinOrderList.add(caipinOrderEntity);//把要查询是否重复的字段放入map中//订单号if(seachFields.containsKey("caipinOrderUuidNumber")){List<String> caipinOrderUuidNumber = seachFields.get("caipinOrderUuidNumber");caipinOrderUuidNumber.add(data.get(0));//要改的}else{List<String> caipinOrderUuidNumber = new ArrayList<>();caipinOrderUuidNumber.add(data.get(0));//要改的seachFields.put("caipinOrderUuidNumber",caipinOrderUuidNumber);}}//查询是否重复//订单号List<CaipinOrderEntity> caipinOrderEntities_caipinOrderUuidNumber = caipinOrderService.selectList(new EntityWrapper<CaipinOrderEntity>().in("caipin_order_uuid_number", seachFields.get("caipinOrderUuidNumber")));if(caipinOrderEntities_caipinOrderUuidNumber.size() >0 ){ArrayList<String> repeatFields = new ArrayList<>();for(CaipinOrderEntity s:caipinOrderEntities_caipinOrderUuidNumber){repeatFields.add(s.getCaipinOrderUuidNumber());}return R.error(511,"数据库的该表中的 [订单号] 字段已经存在 存在数据为:"+repeatFields.toString());}caipinOrderService.insertBatch(caipinOrderList);return R.ok();}}}}catch (Exception e){return R.error(511,"批量插入数据异常,请联系管理员");}}/*** 前端列表*/@IgnoreAuth@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){logger.debug("list方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));// 没有指定排序字段就默认id倒序if(StringUtil.isEmpty(String.valueOf(params.get("orderBy")))){params.put("orderBy","id");}PageUtils page = caipinOrderService.queryPage(params);//字典表数据转换List<CaipinOrderView> list =(List<CaipinOrderView>)page.getList();for(CaipinOrderView c:list)dictionaryService.dictionaryConvert(c, request); //修改对应字典表字段return R.ok().put("data", page);}/*** 前端详情*/@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id, HttpServletRequest request){logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id);CaipinOrderEntity caipinOrder = caipinOrderService.selectById(id);if(caipinOrder !=null){//entity转viewCaipinOrderView view = new CaipinOrderView();BeanUtils.copyProperties( caipinOrder , view );//把实体数据重构到view中//级联表AddressEntity address = addressService.selectById(caipinOrder.getAddressId());if(address != null){BeanUtils.copyProperties( address , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段view.setAddressId(address.getId());}//级联表CaipinEntity caipin = caipinService.selectById(caipinOrder.getCaipinId());if(caipin != null){BeanUtils.copyProperties( caipin , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段view.setCaipinId(caipin.getId());}//级联表YonghuEntity yonghu = yonghuService.selectById(caipinOrder.getYonghuId());if(yonghu != null){BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段view.setYonghuId(yonghu.getId());}//修改对应字典表字段dictionaryService.dictionaryConvert(view, request);return R.ok().put("data", view);}else {return R.error(511,"查不到数据");}}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody CaipinOrderEntity caipinOrder, HttpServletRequest request){logger.debug("add方法:,,Controller:{},,caipinOrder:{}",this.getClass().getName(),caipinOrder.toString());String role = String.valueOf(request.getSession().getAttribute("role"));if("用户".equals(role)){CaipinEntity caipinEntity = caipinService.selectById(caipinOrder.getCaipinId());if(caipinEntity == null){return R.error(511,"查不到该物品");}// Double caipinNewMoney = caipinEntity.getCaipinNewMoney();if(false){}else if((caipinEntity.getCaipinKucunNumber() -caipinOrder.getBuyNumber())<0){return R.error(511,"购买数量不能大于库存数量");}else if(caipinEntity.getCaipinNewMoney() == null){return R.error(511,"物品价格不能为空");}//计算所获得积分Double buyJifen =0.0;Integer userId = (Integer) request.getSession().getAttribute("userId");YonghuEntity yonghuEntity = yonghuService.selectById(userId);if(yonghuEntity == null)return R.error(511,"用户不能为空");if(yonghuEntity.getNewMoney() == null)return R.error(511,"用户金额不能为空");double balance = yonghuEntity.getNewMoney() - caipinEntity.getCaipinNewMoney()*caipinOrder.getBuyNumber();//余额buyJifen = new BigDecimal(caipinEntity.getCaipinPrice()).multiply(new BigDecimal(caipinOrder.getBuyNumber())).doubleValue();//所获积分if(balance<0)return R.error(511,"余额不够支付");caipinOrder.setCaipinOrderTypes(3); //设置订单状态为已支付caipinOrder.setCaipinOrderTruePrice(caipinEntity.getCaipinNewMoney()*caipinOrder.getBuyNumber()); //设置实付价格caipinOrder.setYonghuId(userId); //设置订单支付人idcaipinOrder.setCaipinOrderPaymentTypes(1);caipinOrder.setInsertTime(new Date());caipinOrder.setCreateTime(new Date());caipinEntity.setCaipinKucunNumber( caipinEntity.getCaipinKucunNumber() -caipinOrder.getBuyNumber());caipinService.updateById(caipinEntity);caipinOrderService.insert(caipinOrder);//新增订单yonghuEntity.setYonghuSumJifen(yonghuEntity.getYonghuSumJifen() + buyJifen); //设置总积分yonghuEntity.setNewMoney(balance);//设置金额if(yonghuEntity.getYonghuSumJifen()  < 10000)yonghuEntity.setHuiyuandengjiTypes(1);else if(yonghuEntity.getYonghuSumJifen()  < 100000)yonghuEntity.setHuiyuandengjiTypes(2);else if(yonghuEntity.getYonghuSumJifen()  < 1000000)yonghuEntity.setHuiyuandengjiTypes(3);yonghuService.updateById(yonghuEntity);return R.ok();}else{return R.error(511,"您没有权限支付订单");}}/*** 添加订单*/@RequestMapping("/order")public R add(@RequestParam Map<String, Object> params, HttpServletRequest request){logger.debug("order方法:,,Controller:{},,params:{}",this.getClass().getName(),params.toString());String caipinOrderUuidNumber = String.valueOf(new Date().getTime());//获取当前登录用户的idInteger userId = (Integer) request.getSession().getAttribute("userId");Integer addressId = Integer.valueOf(String.valueOf(params.get("addressId")));Integer caipinOrderPaymentTypes = Integer.valueOf(String.valueOf(params.get("caipinOrderPaymentTypes")));//支付类型String data = String.valueOf(params.get("caipins"));JSONArray jsonArray = JSON.parseArray(data);List<Map> caipins = JSON.parseObject(jsonArray.toString(), List.class);//获取当前登录用户的个人信息YonghuEntity yonghuEntity = yonghuService.selectById(userId);//当前订单表List<CaipinOrderEntity> caipinOrderList = new ArrayList<>();//商家表ArrayList<ShangjiaEntity> shangjiaList = new ArrayList<>();//商品表List<CaipinEntity> caipinList = new ArrayList<>();//购物车idsList<Integer> cartIds = new ArrayList<>();BigDecimal zhekou = new BigDecimal(1.0);// 获取折扣Wrapper<DictionaryEntity> dictionary = new EntityWrapper<DictionaryEntity>().eq("dic_code", "huiyuandengji_types").eq("dic_name", "会员等级类型").eq("code_index", yonghuEntity.getHuiyuandengjiTypes());DictionaryEntity dictionaryEntity = dictionaryService.selectOne(dictionary);if(dictionaryEntity != null ){zhekou = BigDecimal.valueOf(Double.valueOf(dictionaryEntity.getBeizhu()));}//循环取出需要的数据for (Map<String, Object> map : caipins) {//取值Integer caipinId = Integer.valueOf(String.valueOf(map.get("caipinId")));//商品idInteger buyNumber = Integer.valueOf(String.valueOf(map.get("buyNumber")));//购买数量CaipinEntity caipinEntity = caipinService.selectById(caipinId);//购买的商品String id = String.valueOf(map.get("id"));if(StringUtil.isNotEmpty(id))cartIds.add(Integer.valueOf(id));//获取商家信息Integer shangjiaId = caipinEntity.getShangjiaId();ShangjiaEntity shangjiaEntity = shangjiaService.selectById(shangjiaId);//商家//判断商品的库存是否足够if(caipinEntity.getCaipinKucunNumber() < buyNumber){//商品库存不足直接返回return R.error(caipinEntity.getCaipinName()+"的库存不足");}else{//商品库存充足就减库存caipinEntity.setCaipinKucunNumber(caipinEntity.getCaipinKucunNumber() - buyNumber);}//订单信息表增加数据CaipinOrderEntity caipinOrderEntity = new CaipinOrderEntity<>();//赋值订单信息caipinOrderEntity.setCaipinOrderUuidNumber(caipinOrderUuidNumber);//订单号caipinOrderEntity.setAddressId(addressId);//收货地址caipinOrderEntity.setCaipinId(caipinId);//商品caipinOrderEntity.setYonghuId(userId);//用户caipinOrderEntity.setBuyNumber(buyNumber);//购买数量 ??????caipinOrderEntity.setCaipinOrderTypes(3);//订单类型caipinOrderEntity.setCaipinOrderPaymentTypes(caipinOrderPaymentTypes);//支付类型caipinOrderEntity.setInsertTime(new Date());//订单创建时间caipinOrderEntity.setCreateTime(new Date());//创建时间//判断是什么支付方式 1代表余额 2代表积分if(caipinOrderPaymentTypes == 1){//余额支付//计算金额Double money = new BigDecimal(caipinEntity.getCaipinNewMoney()).multiply(new BigDecimal(buyNumber)).multiply(zhekou).doubleValue();if(yonghuEntity.getNewMoney() - money <0 ){return R.error("余额不足,请充值!!!");}else{//计算所获得积分Double buyJifen =0.0;buyJifen = new BigDecimal(caipinEntity.getCaipinPrice()).multiply(new BigDecimal(buyNumber)).doubleValue();yonghuEntity.setYonghuSumJifen(yonghuEntity.getYonghuSumJifen() + buyJifen); //设置总积分yonghuEntity.setNewMoney(yonghuEntity.getNewMoney() - money); //设置金额if(yonghuEntity.getYonghuSumJifen()  < 10000)yonghuEntity.setHuiyuandengjiTypes(1);else if(yonghuEntity.getYonghuSumJifen()  < 100000)yonghuEntity.setHuiyuandengjiTypes(2);else if(yonghuEntity.getYonghuSumJifen()  < 1000000)yonghuEntity.setHuiyuandengjiTypes(3);caipinOrderEntity.setCaipinOrderTruePrice(money);//修改商家余额shangjiaEntity.setNewMoney(shangjiaEntity.getNewMoney()+money);}}caipinOrderList.add(caipinOrderEntity);shangjiaList.add(shangjiaEntity);caipinList.add(caipinEntity);}caipinOrderService.insertBatch(caipinOrderList);shangjiaService.updateBatchById(shangjiaList);caipinService.updateBatchById(caipinList);yonghuService.updateById(yonghuEntity);if(cartIds != null && cartIds.size()>0)cartService.deleteBatchIds(cartIds);return R.ok();}/*** 退款*/@RequestMapping("/refund")public R refund(Integer id, HttpServletRequest request){logger.debug("refund方法:,,Controller:{},,id:{}",this.getClass().getName(),id);String role = String.valueOf(request.getSession().getAttribute("role"));if("用户".equals(role)){CaipinOrderEntity caipinOrder = caipinOrderService.selectById(id);Integer buyNumber = caipinOrder.getBuyNumber();Integer caipinOrderPaymentTypes = caipinOrder.getCaipinOrderPaymentTypes();Integer caipinId = caipinOrder.getCaipinId();if(caipinId == null)return R.error(511,"查不到该物品");CaipinEntity caipinEntity = caipinService.selectById(caipinId);if(caipinEntity == null)return R.error(511,"查不到该物品");//获取商家信息Integer shangjiaId = caipinEntity.getShangjiaId();ShangjiaEntity shangjiaEntity = shangjiaService.selectById(shangjiaId);//商家Double caipinNewMoney = caipinEntity.getCaipinNewMoney();if(caipinNewMoney == null)return R.error(511,"物品价格不能为空");Integer userId = (Integer) request.getSession().getAttribute("userId");YonghuEntity yonghuEntity = yonghuService.selectById(userId);if(yonghuEntity == null)return R.error(511,"用户不能为空");if(yonghuEntity.getNewMoney() == null)return R.error(511,"用户金额不能为空");Double zhekou = 1.0;// 获取折扣Wrapper<DictionaryEntity> dictionary = new EntityWrapper<DictionaryEntity>().eq("dic_code", "huiyuandengji_types").eq("dic_name", "会员等级类型").eq("code_index", yonghuEntity.getHuiyuandengjiTypes());DictionaryEntity dictionaryEntity = dictionaryService.selectOne(dictionary);if(dictionaryEntity != null ){zhekou = Double.valueOf(dictionaryEntity.getBeizhu());}//判断是什么支付方式 1代表余额 2代表积分if(caipinOrderPaymentTypes == 1){//余额支付//计算金额Double money = caipinEntity.getCaipinNewMoney() * buyNumber  * zhekou;//计算所获得积分Double buyJifen = 0.0;buyJifen = new BigDecimal(caipinEntity.getCaipinPrice()).multiply(new BigDecimal(buyNumber)).doubleValue();yonghuEntity.setYonghuSumJifen(yonghuEntity.getYonghuSumJifen() - buyJifen); //设置总积分yonghuEntity.setNewMoney(yonghuEntity.getNewMoney() + money); //设置金额if(yonghuEntity.getYonghuSumJifen()  < 10000)yonghuEntity.setHuiyuandengjiTypes(1);else if(yonghuEntity.getYonghuSumJifen()  < 100000)yonghuEntity.setHuiyuandengjiTypes(2);else if(yonghuEntity.getYonghuSumJifen()  < 1000000)yonghuEntity.setHuiyuandengjiTypes(3);//修改商家余额shangjiaEntity.setNewMoney(shangjiaEntity.getNewMoney() - money);}caipinEntity.setCaipinKucunNumber(caipinEntity.getCaipinKucunNumber() + buyNumber);caipinOrder.setCaipinOrderTypes(2);//设置订单状态为退款caipinOrderService.updateById(caipinOrder);//根据id更新shangjiaService.updateById(shangjiaEntity);yonghuService.updateById(yonghuEntity);//更新用户信息caipinService.updateById(caipinEntity);//更新订单中物品的信息return R.ok();}else{return R.error(511,"您没有权限退款");}}/*** 发货*/@RequestMapping("/deliver")public R deliver(Integer id){logger.debug("refund:,,Controller:{},,ids:{}",this.getClass().getName(),id.toString());CaipinOrderEntity  caipinOrderEntity = new  CaipinOrderEntity();;caipinOrderEntity.setId(id);caipinOrderEntity.setCaipinOrderTypes(4);boolean b =  caipinOrderService.updateById( caipinOrderEntity);if(!b){return R.error("发货出错");}return R.ok();}/*** 收货*/@RequestMapping("/receiving")public R receiving(Integer id){logger.debug("refund:,,Controller:{},,ids:{}",this.getClass().getName(),id.toString());CaipinOrderEntity  caipinOrderEntity = new  CaipinOrderEntity();caipinOrderEntity.setId(id);caipinOrderEntity.setCaipinOrderTypes(5);boolean b =  caipinOrderService.updateById( caipinOrderEntity);if(!b){return R.error("收货出错");}return R.ok();}/*** 评价*/@RequestMapping("/commentback")public R commentback(Integer id, String commentbackText, Integer caipinCommentbackPingfenNumber, HttpServletRequest request){logger.debug("commentback方法:,,Controller:{},,id:{}",this.getClass().getName(),id);String role = String.valueOf(request.getSession().getAttribute("role"));if("用户".equals(role)){CaipinOrderEntity caipinOrder = caipinOrderService.selectById(id);if(caipinOrder == null)return R.error(511,"查不到该订单");if(caipinOrder.getCaipinOrderTypes() != 5)return R.error(511,"您不能评价");Integer caipinId = caipinOrder.getCaipinId();if(caipinId == null)return R.error(511,"查不到该物品");CaipinCommentbackEntity caipinCommentbackEntity = new CaipinCommentbackEntity();caipinCommentbackEntity.setId(id);caipinCommentbackEntity.setCaipinId(caipinId);caipinCommentbackEntity.setYonghuId((Integer) request.getSession().getAttribute("userId"));caipinCommentbackEntity.setCaipinCommentbackText(commentbackText);caipinCommentbackEntity.setReplyText(null);caipinCommentbackEntity.setInsertTime(new Date());caipinCommentbackEntity.setUpdateTime(null);caipinCommentbackEntity.setCreateTime(new Date());caipinCommentbackService.insert(caipinCommentbackEntity);caipinOrder.setCaipinOrderTypes(1);//设置订单状态为已评价caipinOrderService.updateById(caipinOrder);//根据id更新return R.ok();}else{return R.error(511,"您没有权限评价");}}}

五、获取源码或论文

如需对应的论文或源码,以及其他定制需求,也可以下方微❤联系。

相关文章:

微信小程序毕业设计-微信食堂线上订餐系统项目开发实战(附源码+论文)

大家好&#xff01;我是程序猿老A&#xff0c;感谢您阅读本文&#xff0c;欢迎一键三连哦。 &#x1f49e;当前专栏&#xff1a;微信小程序毕业设计 精彩专栏推荐&#x1f447;&#x1f3fb;&#x1f447;&#x1f3fb;&#x1f447;&#x1f3fb; &#x1f380; Python毕业设计…...

昂首资本实例使用价格行为策略,交易翻倍一点都不难

交易翻倍难吗&#xff1f;当Anzo Capital昂首资本使用价格行为策略进行交易时&#xff0c;发现一点都不难&#xff0c;以下是使用价格行为策略的实例分享&#xff1a; 1. 在初次交易信号出现时&#xff0c;推荐在1.00429价位入场&#xff0c;将止损设于1.04399&#xff0c;止盈…...

20240701 每日AI必读资讯

&#x1f3eb;AI真炼丹&#xff1a;整整14天&#xff0c;无需人类参与 - 英矽智能推出全球首个AI参与决策的生物学实验室&#xff0c;实现了14天内完成靶点发现和验证的全自动化闭环实验。 - 该实验室由PandaOmics平台驱动&#xff0c;集成多种预测模型和海量数据&#xff0…...

GPT-5 一年半后发布,对此你有何期待?

IT之家6月22日消息&#xff0c;在美国达特茅斯工程学院周四公布的采访中&#xff0c;OpenAI首席技术官米拉穆拉蒂被问及GPT-5是否会在明年发布&#xff0c;给出了肯定答案并表示将在一年半后发布。此外&#xff0c;穆拉蒂在采访中还把GPT-4到GPT-5的飞跃描述为高中生到博士生的…...

Redis学习——Redisson 分布式锁集成及其简单使用

文章目录 引言1. Redisson概述1.1 Redisson的基本概念1.2 Redisson的主要功能1.3 Redisson的优点 2. 开发环境3. Redisson的安装与配置3.1 添加依赖3.2 配置Redisson 4. 使用Redisson4.1 可重入锁4.1.1 可重入锁的概念4.1.2 可重入锁的实现原理4.1.3 简单使用锁的获取和释放 4.…...

08 - matlab m_map地学绘图工具基础函数 - 绘制线、图例、添加文字注释等函数

08 - matlab m_map地学绘图工具基础函数 - 绘制线、图例、添加文字注释等函数 0. 引言1. 关于m_line2. 关于m_quiver3. 关于m_text4. 关于m_plot5. 结语 0. 引言 本篇介绍下m_map中添加绘制基础线&#xff08;m_line、m_plot&#xff09;、绘制箭头&#xff08;m_quiver&#x…...

Luminar Neo 1.20.0 (macOS Universal) - 创新 AI 图像编辑器

Luminar Neo 1.20.0 (macOS Universal) - 创新 AI 图像编辑器 利用尖端的人工智能生成技术&#xff0c;轻松增强照片效果 请访问原文链接&#xff1a;https://sysin.org/blog/luminar-neo/&#xff0c;查看最新版。原创作品&#xff0c;转载请保留出处。 作者主页&#xff1…...

谈谈Flink消费kafka的偏移量

offset配置: flinkKafkaConsumer.setStartFromEarliest():从topic的最早offset位置开始处理数据&#xff0c;如果kafka中保存有消费者组的消费位置将被忽略。 flinkKafkaConsumer.setStartFromLatest():从topic的最新offset位置开始处理数据&#xff0c;如果kafka中保存有消费…...

MySQL 高级SQL高级语句(二)

一.CREATE VIEW 视图 可以被当作是虚拟表或存储查询。 视图跟表格的不同是&#xff0c;表格中有实际储存数据记录&#xff0c;而视图是建立在表格之上的一个架构&#xff0c;它本身并不实际储存数据记录。 临时表在用户退出或同数据库的连接断开后就自动消失了&#xff0c;而…...

MySQL之高可用性(四)

高可用性 故障转移和故障恢复 冗余是很好的技术&#xff0c;但实际上只有在遇到故障需要恢复时才会用到。(见鬼&#xff0c;这可以用备份来实现)。冗余一点儿也不会增加可用性或减少宕机。在故障转移的过程中&#xff0c;高可用性是建立在冗余的基础上。当有一个组件失效&…...

招聘智能管理系统设计

设计一个招聘智能管理系统&#xff0c;需要从多个维度考虑&#xff0c;包括但不限于用户界面、功能模块、数据安全、算法模型等。以下是一个基本的设计框架&#xff1a; 1. 系统架构&#xff1a; 前端&#xff1a;提供直观的用户界面&#xff0c;包括应聘者和招聘者的登录/注册…...

达梦数据库系列—15. 表的备份和还原

目录 1、表备份 2、表还原 1、表备份 表备份和表还原恢复&#xff0c;都必须在联机状态下进行。 与备份数据库与表空间不同&#xff0c;不需要备份归档日志&#xff0c;不存在增量备份之说。 CREATE TABLE TAB_FOR_RES_02(C1 INT);CREATE INDEX I_TAB_FOR_RES_02 ON TAB_F…...

无线领夹麦克风哪个品牌音质最好,直播用领夹麦克风还是声卡麦

随着社交媒体的兴起&#xff0c;直播和Vlog已经成为内容创作的新趋势&#xff0c;这些变化不仅改变了人们分享生活的方式&#xff0c;也带动了音频设备市场的增长。无线领夹麦克风&#xff0c;以其便携性和卓越的录音品质&#xff0c;迅速成为视频制作者的重要工具。它们在直播…...

《Windows API每日一练》6.2 客户区鼠标消息

第五章已经讲到&#xff0c;Windows只会把键盘消息发送到当前具有输入焦点的窗口。鼠标消息则不同&#xff1a;当鼠标经过窗口或在窗口内被单击&#xff0c;则即使该窗口是非活动窗口或不带输入焦点&#xff0c; 窗口过程还是会收到鼠标消息。Windows定义了 21种鼠标消息。不过…...

体验升级:扫描全能王智能高清滤镜2.0全面测评

&#x1f935;‍♂️ 个人主页&#xff1a;艾派森的个人主页 ✍&#x1f3fb;作者简介&#xff1a;Python学习者 &#x1f40b; 希望大家多多支持&#xff0c;我们一起进步&#xff01;&#x1f604; 如果文章对你有帮助的话&#xff0c; 欢迎评论 &#x1f4ac;点赞&#x1f4…...

【JVM系列】JVM调优

&#x1f49d;&#x1f49d;&#x1f49d;欢迎来到我的博客&#xff0c;很高兴能够在这里和您见面&#xff01;希望您在这里可以感受到一份轻松愉快的氛围&#xff0c;不仅可以获得有趣的内容和知识&#xff0c;也可以畅所欲言、分享您的想法和见解。 推荐:kwan 的首页,持续学…...

Linux基础 - Postfix 与 Dovecot 部署邮件系统

目录 零. 简介 一. 部署 二. 设置用户别名信箱 三. Linux 邮件客户端 零. 简介 Postfix 和 Dovecot 是在 Linux 系统中常用于部署邮件系统的两个重要组件。 Postfix 是一种邮件传输代理&#xff08;MTA&#xff09;&#xff0c;主要负责接收、转发和发送邮件。它具有高性能…...

Qt的安装

一、Qt安装 下载地址&#xff1a;https://download.qt.io/archive/qt/ opencv下载安装 下载地址&#xff1a;https://opencv.org/releases/ 陈年旧文&#xff0c;没有下文&#xff0c;以此纪念。。。。。...

ThreeJS-3D教学十二:ShaderMaterial

一、首先 Shader 是做什么的 Shader 可以自定义每个顶点、每个片元/像素如何显示&#xff0c;而控制顶点和片元显示是通过设置 vertexShader 顶点着色器和 fragmentShader 片元着色器&#xff0c;这两个着色器用在 ShaderMaterial 和 RawShaderMaterial 材质上。 我们先看一个例…...

计算机网络面试TCP篇之TCP三次握手与四次挥手

TCP 三次握手与四次挥手面试题 任 TCP 虐我千百遍&#xff0c;我仍待 TCP 如初恋。 巨巨巨巨长的提纲&#xff0c;发车&#xff01;发车&#xff01; PS&#xff1a;本次文章不涉及 TCP 流量控制、拥塞控制、可靠性传输等方面知识&#xff0c;这些知识在这篇&#xff1a; TCP …...

Python-数据分析组合可视化实例图【附完整源码】

数据分析组合可视化实例图 开篇&#xff1a;应女朋友的要求&#xff0c;于是写下了这篇详细的数据可视化代码及完整注释 一&#xff1a;柱状图、折线图横向组合网格布局 本段代码使用了pyecharts库来创建一个包含多个图表&#xff08;柱状图、折线图&#xff09;和网格布局的…...

【JavaEE】Spring Web MVC详解

一.基本概念. 1.什么是Spring Web MVC? 官方链接: https://docs.spring.io/spring-framework/reference/web/webmvc.html Spring Web MVC is the original web framework built on the Servlet API and has been included in the Spring Framework from the very beginning…...

docker安装rocketMq5x以上的版本

1.背景 安装RocketMQ 5.x以上的版本主要是因为新版本引入了许多性能优化、新功能以及对已有特性的增强&#xff0c;这些改进可以帮助提升消息队列系统的稳定性和效率。 1.性能提升&#xff1a;RocketMQ 5.x版本通常包括了对消息处理速度、吞吐量和延迟的优化&#xff0c;使得系…...

【Spring】DAO 和 Repository 的区别

DAO 和 Repository 的区别 1.概述2.DAO 模式2.1 User2.2 UserDao2.3 UserDaoImpl 3.Repository 模式3.1 UserRepository3.2 UserRepositoryImpl 4.具有多个 DAO 的 Repository 模式4.1 Tweet4.2 TweetDao 和 TweetDaoImpl4.3 增强 User 域4.4 UserRepositoryImpl 5.比较两种模式…...

高阶面试-秒杀系统的设计

场景 特价商品如茅台&#xff0c;在8月1日22点10分0秒开始秒杀 平台用户量&#xff1a;几千万&#xff0c;预计几十万用户感兴趣 需求 临时性的活动&#xff0c;不要太大技术改动 原则 商品不能超卖下单成功的订单不能丢失服务器和数据库不能崩溃尽量不让机器人抢走商品 …...

四十五、 证券基金业数据出境有无特别规范需要注意?

证券基金业数据合规除应遵守本《实务问答》前述的各项通用规定外&#xff0c;还应注意中国证券监督管理委员会等其他机构发布的相关规范。其中&#xff0c;与数据出境相关的主要包括《证券期货业数据分类分级指引》&#xff08;JR/T 0158—2018&#xff0c;2018年 9月 27日实施…...

02.Linux下安装FFmpeg

目录 一、下载FFmpeg的编译源码 二、编译源码 三、ffmpeg工具结构解析 1、bin目录 2、include库 3、lib库 四、注意事项 五、可能出现的一些问题 1、某些工具未安装/版本过久 2、缺少pkg-config工具 3、缺少ffmplay FFmpeg 是一个开源的跨平台音视频处理工具集&…...

华为RH2288H V2服务器,远程端口安装Linux操作系统

1、管理口 每台服务器的管理口不一样的&#xff0c;假如我的管理IP地址为&#xff1a;192.168.111.201 使用网线&#xff0c;将管理口和自己电脑连接起来&#xff0c;自己ip地址设置成和管理ip同一网段。 使用 ie 浏览器&#xff0c;如果是Edge&#xff0c;必须在Internet Exp…...

JS在线加密简述

JS在线加密&#xff0c;是指&#xff1a;在线进行JS代码混淆加密。通过混淆、压缩、加密等手段&#xff0c;使得JS源代码难以阅读和理解。从而可以有效防止代码被盗用或抄袭&#xff0c;保护开发者的知识产权和劳动成果。常用的JS在线加密网站有&#xff1a;JShaman、JS-Obfusc…...

理想汽车提出3DRealCar:首个大规模3D真实汽车数据集

理想提出3DRealCar&#xff0c;这是第一个大规模 3D 实车数据集&#xff0c;包含 2500 辆在真实场景中拍摄的汽车。我们希望 3DRealCar 可以成为促进汽车相关任务的宝贵资源。 理想汽车提出3DRealCar&#xff1a;首个大规模3D真实汽车数据集! 我们精心策划的高质量3DRealCar数…...

HTML5文旅文化旅游网站模板源码

文章目录 1.设计来源文旅宣传1.1 登录界面演示1.2 注册界面演示1.3 首页界面演示1.4 文旅之行界面演示1.5 文旅之行文章内容界面演示1.6 关于我们界面演示1.7 文旅博客界面演示1.8 文旅博客文章内容界面演示1.9 联系我们界面演示 2.效果和源码2.1 动态效果2.2 源代码2.3 源码目…...

山东大学多核并行2024年回忆版

2024.6.13回忆版 矩阵向量乘不可整除代码 集合通信与点对点通信的区别 块划分、循环划分、循环块划分&#xff08;14个向量&#xff0c;4个进程&#xff09; 按行访问还是按列访问快 SISD系统问题 循环依赖问题 问题&#xff1a;为什么不能对这个循环并行化&#xff0…...

CentOS 7 上搭建 JavaEE 环境

CentOS 7 上搭建 JavaEE 环境 安装 Java 环境 1&#xff09;检查系统中是否已安装 Java java -version如果未安装&#xff0c;将返回提示信息。 2&#xff09;安装 Java 8 sudo yum install java-1.8.0-openjdk3&#xff09;配置 Java 环境变量&#xff0c;编辑 /etc/prof…...

库与表管理的终极指南

数据库的库和表的管理 库的管理1.库的创建2.数据库的查看和使用3.数据库的修改4.数据库的删除 表的管理1.表的创建2.表的修改3.表的删除4.查看一个表 阅读指南&#xff1a; 本文章是数据库教程系列的一部分&#xff0c;专注于数据库的库和表管理。读者可以根据兴趣选择阅读相关…...

等级保护测评在测评中Linux系统怎么改

在等级保护测评中&#xff0c;针对Linux系统的整改主要是为了提高其安全性&#xff0c;使之符合等级保护的基本要求。 以下是一些常见的整改步骤和建议&#xff1a; 1. 身份鉴别&#xff1a; • 强化密码策略&#xff0c;例如设置复杂的密码规则、密码长度、密码复杂度、密码…...

Python项目开发实战:微信跳一跳辅助工具,案例教程编程实例课程详解

一、项目背景与意义 微信跳一跳是微信推出的一款小游戏,玩家需要控制一个小人从一个平台跳到另一个平台上,每成功跳过一个平台,分数就会增加。然而,随着游戏难度的增加,玩家需要更精准的控制和更快的反应速度,这往往让许多玩家感到力不从心。因此,开发一款微信跳一跳的辅…...

STM32 SWD烧写

最小电路 stm32f103x 内部已经集成了振荡电路&#xff0c;可以省略&#xff1b;rst引脚电路&#xff0c;可以省略&#xff0c;boot0,boot1不需要设置 正常烧录 -------------------------------------------------------------------STM32CubeProgrammer v2.9.0 …...

数据库系统概论(第5版教材)

第一章 绪论 1、数据(Data)是描述事物的符号记录&#xff1b; 2、数据库系统的构成&#xff1a;数据库 、数据库管理系统&#xff08;及其开发工具&#xff09; 、应用程序和数据库管理员&#xff1b; 3、数据库是长期存储在计算机内、有组织、可共享的大量数据的集合&…...

算法力扣刷题 二十六【459.重复的子字符串】

前言 字符串篇&#xff0c;继续。 记录 二十六【459.重复的子字符串】 一、题目阅读 给定一个非空的字符串 s &#xff0c;检查是否可以通过由它的一个子串重复多次构成。 示例 1: 输入: s "abab" 输出: true 解释: 可由子串 "ab" 重复两次构成。示例…...

【Linux】虚拟机安装openEuler 24.03 X86_64 教程

目录 一、概述 1.1 openEuler 覆盖全场景的创新平台 1.2 系统框架 1.3 平台框架 二、安装详细步骤 一、概述 1.1 openEuler 覆盖全场景的创新平台 openEuler 已支持 x86、Arm、SW64、RISC-V、LoongArch 多处理器架构&#xff0c;逐步扩展 PowerPC 等更多芯片架构支持&…...

分布式事务:理论与实践

分布式事务&#xff1a;理论与实践 在现代分布式系统中&#xff0c;分布式事务是一种确保跨多个独立系统的一致性和完整性的方法。本文将介绍分布式事务的基本概念、实现方式、在Java中的具体实现以及在实际应用中的案例。 分布式事务的基本概念 分布式事务涉及多个独立的数…...

5、双足机器人mpc动力学模型

为计算机器人的当前实际状态x,需要建立双足质心动力学模型。 速度模型由控制输入变量推导速度公式: x向速度νx :当前机器人x方向的前进速度,初始值由速度传感器实时测量得到。y向速度νy :机器人y方向的平移速度。z向速度νz :垂直方向的速度,对于双足机器人行走时为0:…...

虚拟机配置与windows之间文件夹共享samba服务:

虚拟机配置与windows之间文件夹共享samba服务: #输入安装命令&#xff1a; 第一步: 下载samba cd /etc/ sudo apt-get install samba第二步: 配置用户 sudo smbpasswd -a 虚拟机用户名第三步: 进入配置文件配置共享文件 sudo vim /etc/samba/smb.conf末尾输入以下内容: [s…...

探索音频创作的无限可能——Studio One 5 软件深度解析

Studio One 5 是一款功能强大且备受赞誉的音频制作软件&#xff0c;无论是专业音乐制作人还是业余爱好者&#xff0c;都能在其中找到满足自己需求的强大功能。 对于 Mac 和 Windows 用户来说&#xff0c;Studio One 5 提供了一个直观且友好的操作界面。其简洁明了的布局让用户…...

CSS Flex弹性布局

一、传统布局与flex布局 1、传统布局 2、flex布局 二、flex布局原理 1、布局原理 2、flex布局体验 三、flex布局父项常见属性 1、常见的父项属性 2、flex-direction设置主轴的方向 3、justify-content 设置主轴上的子元素排列方式 4、flex-wrap 设置子元素是否换行 …...

第十六章:基于开源大模型使用huggingface在deepspeed与accelerator下继承源码权重保存而实现resume与infer

文章目录 前言一、huggingface的_save_checkpoint函数不同阶段保存内容介绍1、_save_checkpoint函数2、save_model函数3、_save函数4、save_pretrained函数5、resume说明二、模型训练Resume相关内容重载1、Resume的一次性权重载入(deepspeed_load_checkpoint)2、Resume的optimi…...

ZooKeeper 入门:初学者指南

在分布式系统领域&#xff0c;协调和同步至关重要。Apache ZooKeeper 是一种分布式协调服务&#xff0c;是帮助管理和同步分布式环境中服务的基本组件。本指南旨在深入分析 ZooKeeper、其架构及其在现代分布式系统中的作用。我们还将探索一个示例来展示其实际影响。 ZooKeeper…...

【数据结构(邓俊辉)学习笔记】二叉搜索树04——AVL树

文章目录 1.重平衡1.1 AVL BBST1.2 平衡因子1.3 适度平衡1.4 接口1.5 失衡 复衡 2. 插入2.1 单旋2.2 双旋2.3 实现 3. 删除3.1 单旋3.2 双旋3.3 实现 4. &#xff08;3 4&#xff09;-重构4.1 "34"重构4.2 "34"实现4.3 rotateAt4.4 综合评价 1.重平衡 1…...

SpringMVC基础详解

文章目录 一、SpringMVC简介1、什么是MVC2、MVC架构模式与三层模型的区别3、什么是SpringMVC 二、HelloWorld程序1、pom文件2、springmvc.xml3、配置web.xml文件4、html文件5、执行Controller 三、RequestMapping注解1、value属性1.1、基础使用1.2、Ant风格&#xff08;模糊匹配…...

SQL SERVER 设置端口

要在SQL Server中设置端口&#xff0c;可以通过SQL Server Configuration Manager来完成。以下是详细的步骤&#xff1a; 1. 打开SQL Server Configuration Manager 在Windows中&#xff0c;按 Win R 键打开运行窗口。输入 SQLServerManager<version>.msc 并按回车。例…...

Continual Test-Time Domain Adaptation--论文笔记

论文笔记 资料 1.代码地址 https://github.com/qinenergy/cotta 2.论文地址 https://arxiv.org/abs/2203.13591 3.数据集地址 论文摘要的翻译 TTA的目的是在不使用任何源数据的情况下&#xff0c;将源预先训练的模型适应到目标域。现有的工作主要考虑目标域是静态的情况…...

python - 列表 / 元组 / 字符串

一.列表 由于pyhon的变量没有数据类型&#xff0c;所以python是没有数组的&#xff08;因为数组只能存放一种类型&#xff0c;要么全部存放整型&#xff0c;要么全部存放浮点型&#xff09;&#xff0c;只有列表list&#xff0c;所以整数&#xff0c;浮点数&#xff0c;字符串…...

重生之我要学后端01--后端语言选择和对应框架选择

编程语言 后端开发通常需要掌握至少一种编程语言。以下几种语言在后端开发中非常流行&#xff1a; Java&#xff1a;广泛用于企业级应用程序。Python&#xff1a;因其易学性和强大的库支持&#xff08;如Django和Flask&#xff09;而受欢迎。Node.js&#xff08;JavaScript&a…...

昇思25天学习打卡营第3天|张量Tensor

张量Tensor 概念创建张量&#xff08;4种方式&#xff09;张量的属性张量索引张量运算Tensor与NumPy转换 概念 张量&#xff08;Tensor&#xff09;是一种特殊的数据结构&#xff0c;与数组和矩阵非常相似。张量是MindSpore网络运算中的基本数据结构。 创建张量&#xff08;4…...

【FFmpeg】avio_open2函数

【FFmpeg】avio_open2函数 1.avio_open21.1 创建URLContext&#xff08;ffurl_open_whitelist&#xff09;1.1.1 创建URLContext&#xff08;ffurl_alloc&#xff09;1.1.1.1 查找合适的protocol&#xff08;url_find_protocol&#xff09;1.1.1.2 为查找到的URLProtocol创建UR…...

景区智能厕所系统让旅游更便捷、更舒适

在旅游业蓬勃发展的今天&#xff0c;游客对于旅游体验的要求越来越高&#xff0c;而景区的基础设施建设也在不断创新和完善。其中&#xff0c;景区智能厕所系统的出现&#xff0c;无疑为游客带来了更加便捷、舒适的旅游体验。 一、智能厕所系统首先体现在其精准的定位和引导功能…...

Fine-tuning和模型训练的关系

概述 Fine-tuning和模型训练不是完全相同的概念&#xff0c;但它们之间有密切的关系&#xff0c;都是机器学习和深度学习过程中的重要步骤。 模型训练是一个更广泛的概念&#xff0c;指的是使用数据去调整模型的内部参数&#xff0c;以使得模型能够从输入数据中学习并做出预测…...

Python装饰器的应用

Python 中的装饰器是一种语法糖&#xff0c;可以在运行时&#xff0c;动态的给函数或类添加功能。装饰器本质上是一个函数&#xff0c;使用 函数名就是可实现绑定给函数的第二个功能 。它的作用就是在不修改被装饰对象源代码和调用方式的前提下为被装饰对象添加额外的功能。 …...

LLama学习记录

学习前&#xff1a; 五大问题&#xff1a; 为什么SwiGLU激活函数能够提升模型性能&#xff1f;RoPE位置编码是什么&#xff1f;怎么用的&#xff1f;还有哪些位置编码方式&#xff1f;GQA&#xff08;Grouped-Query Attention, GQA&#xff09;分组查询注意力机制是什么&…...

这些趣味科学小故事,让孩子从小爱上数理化,快收藏!

在我们的日常生活中,无论是洗碗时看到的泡沫,还是在公园里看到的彩虹,背后都隐藏着无数的科学奥秘。这些现象虽然看似平常,却都深深扎根于数理化的基本原理中。生活中一些常见的问题,也能通过转化成数理化的问题来解决。那么在现实生活中,数理化是如何帮助我们解决问题的…...

嘉道理慈善基金会董事到访中国残联

5月22日下午,中国残联副理事长尤亮在京会见嘉道理慈善基金会董事彼得保罗一行。尤亮对彼得保罗一行到访中国残联表示欢迎。他介绍了近年来中国残疾人事业发展的新成就,并回顾了中国残联与嘉道理基金会自1997年以来的合作历程。他表示,在长期合作过程中,双方在残疾人教育、就…...

06_知识点总结(JS高级)

一、进程与线程 1. 进程(process)&#xff1a;程序的一次执行, 它占有一片独有的内存空间 2. 线程(thread)&#xff1a; 是进程内的一个独立执行单元&#xff0c;CPU的基本调度单元, 是程序执行的一个完整流程 3. 进程与线程 * 应用程序必须运行在某个进程的某个线程上 * 一个…...