校园外卖系统带万字文档在线外卖管理系统java项目java课程设计java毕业设计

文章目录

  • 校园外卖系统
    • 一、项目演示
    • 二、项目介绍
    • 三、万字项目文档
    • 四、部分功能截图
    • 五、部分代码展示
    • 六、底部获取项目源码带万字文档(9.9¥带走)

校园外卖系统

一、项目演示

校园外卖服务系统

二、项目介绍

语言:java 数据库:MySQL

技术栈:SpringBoot、Mybatis、Vue、Html

系统角色:用户、管理员

用户:注册、登录、首页、公告信息、外卖菜品、购物车、个人中心、外卖收藏、外卖订单、订单评价、修改密码

管理员:个人中心、公告类型管理、会员等级类型管理、外卖类型管理、公告信息管理、外卖评价管理、外卖收藏管理、外卖订单管理、用户管理、轮播图管理

三、万字项目文档

在这里插入图片描述
在这里插入图片描述

四、部分功能截图

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

五、部分代码展示


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("/address")
public class AddressController {private static final Logger logger = LoggerFactory.getLogger(AddressController.class);@Autowiredprivate AddressService addressService;@Autowiredprivate TokenService tokenService;@Autowiredprivate DictionaryService dictionaryService;//级联表service@Autowiredprivate YonghuService yonghuService;/*** 后端列表*/@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"));if(params.get("orderBy")==null || params.get("orderBy")==""){params.put("orderBy","id");}PageUtils page = addressService.queryPage(params);//字典表数据转换List<AddressView> list =(List<AddressView>)page.getList();for(AddressView 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);AddressEntity address = addressService.selectById(id);if(address !=null){//entity转viewAddressView view = new AddressView();BeanUtils.copyProperties( address , view );//把实体数据重构到view中//级联表YonghuEntity yonghu = yonghuService.selectById(address.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 AddressEntity address, HttpServletRequest request){logger.debug("save方法:,,Controller:{},,address:{}",this.getClass().getName(),address.toString());String role = String.valueOf(request.getSession().getAttribute("role"));if(false)return R.error(511,"永远不会进入");else if("用户".equals(role))address.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));Wrapper<AddressEntity> queryWrapper = new EntityWrapper<AddressEntity>().eq("yonghu_id", address.getYonghuId()).eq("address_name", address.getAddressName()).eq("address_phone", address.getAddressPhone()).eq("address_dizhi", address.getAddressDizhi()).eq("isdefault_types", address.getIsdefaultTypes());logger.info("sql语句:"+queryWrapper.getSqlSegment());AddressEntity addressEntity = addressService.selectOne(queryWrapper);if(addressEntity==null){address.setInsertTime(new Date());address.setCreateTime(new Date());Integer isdefaultTypes = address.getIsdefaultTypes();if(isdefaultTypes == 2 ){//如果当前的是默认地址,把当前用户的其他改为不是默认地址List<AddressEntity> addressEntitys = addressService.selectList(new EntityWrapper<AddressEntity>().eq("isdefault_types",2));if(addressEntitys != null && addressEntitys.size()>0){for(AddressEntity a:addressEntitys)a.setIsdefaultTypes(1);addressService.updateBatchById(addressEntitys);}}addressService.insert(address);return R.ok();}else {return R.error(511,"表中有相同数据");}}/*** 后端修改*/@RequestMapping("/update")public R update(@RequestBody AddressEntity address, HttpServletRequest request){logger.debug("update方法:,,Controller:{},,address:{}",this.getClass().getName(),address.toString());String role = String.valueOf(request.getSession().getAttribute("role"));
//        if(false)
//            return R.error(511,"永远不会进入");
//        else if("用户".equals(role))
//            address.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));//根据字段查询是否有相同数据Wrapper<AddressEntity> queryWrapper = new EntityWrapper<AddressEntity>().notIn("id",address.getId()).andNew().eq("yonghu_id", address.getYonghuId()).eq("address_name", address.getAddressName()).eq("address_phone", address.getAddressPhone()).eq("address_dizhi", address.getAddressDizhi()).eq("isdefault_types", address.getIsdefaultTypes());logger.info("sql语句:"+queryWrapper.getSqlSegment());AddressEntity addressEntity = addressService.selectOne(queryWrapper);address.setUpdateTime(new Date());if(addressEntity==null){Integer isdefaultTypes = address.getIsdefaultTypes();if(isdefaultTypes == 2 ){//如果当前的是默认地址,把当前用户的其他改为不是默认地址List<AddressEntity> addressEntitys = addressService.selectList(new EntityWrapper<AddressEntity>().eq("isdefault_types",2));if(addressEntitys != null && addressEntitys.size()>0){for(AddressEntity a:addressEntitys)a.setIsdefaultTypes(1);addressService.updateBatchById(addressEntitys);}}addressService.updateById(address);//根据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());addressService.deleteBatchIds(Arrays.asList(ids));return R.ok();}/*** 批量上传*/@RequestMapping("/batchInsert")public R save( String fileName, HttpServletRequest request){logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName);Integer yonghuId = Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId")));SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");try {List<AddressEntity> addressList = 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){//循环AddressEntity addressEntity = new AddressEntity();
//                            addressEntity.setYonghuId(Integer.valueOf(data.get(0)));   //创建用户 要改的
//                            addressEntity.setAddressName(data.get(0));                    //收货人 要改的
//                            addressEntity.setAddressPhone(data.get(0));                    //电话 要改的
//                            addressEntity.setAddressDizhi(data.get(0));                    //地址 要改的
//                            addressEntity.setIsdefaultTypes(Integer.valueOf(data.get(0)));   //是否默认地址 要改的
//                            addressEntity.setInsertTime(date);//时间
//                            addressEntity.setUpdateTime(sdf.parse(data.get(0)));          //修改时间 要改的
//                            addressEntity.setCreateTime(date);//时间addressList.add(addressEntity);//把要查询是否重复的字段放入map中//电话if(seachFields.containsKey("addressPhone")){List<String> addressPhone = seachFields.get("addressPhone");addressPhone.add(data.get(0));//要改的}else{List<String> addressPhone = new ArrayList<>();addressPhone.add(data.get(0));//要改的seachFields.put("addressPhone",addressPhone);}}//查询是否重复//电话List<AddressEntity> addressEntities_addressPhone = addressService.selectList(new EntityWrapper<AddressEntity>().in("address_phone", seachFields.get("addressPhone")));if(addressEntities_addressPhone.size() >0 ){ArrayList<String> repeatFields = new ArrayList<>();for(AddressEntity s:addressEntities_addressPhone){repeatFields.add(s.getAddressPhone());}return R.error(511,"数据库的该表中的 [电话] 字段已经存在 存在数据为:"+repeatFields.toString());}addressService.insertBatch(addressList);return R.ok();}}}}catch (Exception e){e.printStackTrace();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 = addressService.queryPage(params);//字典表数据转换List<AddressView> list =(List<AddressView>)page.getList();for(AddressView 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);AddressEntity address = addressService.selectById(id);if(address !=null){//entity转viewAddressView view = new AddressView();BeanUtils.copyProperties( address , view );//把实体数据重构到view中//级联表YonghuEntity yonghu = yonghuService.selectById(address.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 AddressEntity address, HttpServletRequest request){logger.debug("add方法:,,Controller:{},,address:{}",this.getClass().getName(),address.toString());Wrapper<AddressEntity> queryWrapper = new EntityWrapper<AddressEntity>().eq("yonghu_id", address.getYonghuId()).eq("address_name", address.getAddressName()).eq("address_phone", address.getAddressPhone()).eq("address_dizhi", address.getAddressDizhi()).eq("isdefault_types", address.getIsdefaultTypes());logger.info("sql语句:"+queryWrapper.getSqlSegment());AddressEntity addressEntity = addressService.selectOne(queryWrapper);if(addressEntity==null){address.setInsertTime(new Date());address.setCreateTime(new Date());Integer isdefaultTypes = address.getIsdefaultTypes();if(isdefaultTypes == 2 ){//如果当前的是默认地址,把当前用户的其他改为不是默认地址List<AddressEntity> addressEntitys = addressService.selectList(new EntityWrapper<AddressEntity>().eq("isdefault_types",2));if(addressEntitys != null && addressEntitys.size()>0){for(AddressEntity a:addressEntitys)a.setIsdefaultTypes(1);addressService.updateBatchById(addressEntitys);}}addressService.insert(address);return R.ok();}else {return R.error(511,"表中有相同数据");}}}
package com.controller;import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.*;import javax.servlet.http.HttpServletRequest;import com.alibaba.fastjson.JSON;
import com.utils.StringUtil;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ResourceUtils;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;import com.annotation.IgnoreAuth;
import com.baidu.aip.face.AipFace;
import com.baidu.aip.face.MatchRequest;
import com.baidu.aip.util.Base64Util;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.ConfigEntity;
import com.service.CommonService;
import com.service.ConfigService;
import com.utils.BaiduUtil;
import com.utils.FileUtil;
import com.utils.R;/*** 通用接口*/
@RestController
public class CommonController{private static final Logger logger = LoggerFactory.getLogger(CommonController.class);@Autowiredprivate CommonService commonService;@Autowiredprivate ConfigService configService;private static AipFace client = null;private static String BAIDU_DITU_AK = null;@RequestMapping("/location")public R location(String lng,String lat) {if(BAIDU_DITU_AK==null) {BAIDU_DITU_AK = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "baidu_ditu_ak")).getValue();if(BAIDU_DITU_AK==null) {return R.error("请在配置管理中正确配置baidu_ditu_ak");}}Map<String, String> map = BaiduUtil.getCityByLonLat(BAIDU_DITU_AK, lng, lat);return R.ok().put("data", map);}/*** 人脸比对* * @param face1 人脸1* @param face2 人脸2* @return*/@RequestMapping("/matchFace")public R matchFace(String face1, String face2, HttpServletRequest request) {if(client==null) {/*String AppID = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "AppID")).getValue();*/String APIKey = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "APIKey")).getValue();String SecretKey = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "SecretKey")).getValue();String token = BaiduUtil.getAuth(APIKey, SecretKey);if(token==null) {return R.error("请在配置管理中正确配置APIKey和SecretKey");}client = new AipFace(null, APIKey, SecretKey);client.setConnectionTimeoutInMillis(2000);client.setSocketTimeoutInMillis(60000);}JSONObject res = null;try {File file1 = new File(request.getSession().getServletContext().getRealPath("/upload")+"/"+face1);File file2 = new File(request.getSession().getServletContext().getRealPath("/upload")+"/"+face2);String img1 = Base64Util.encode(FileUtil.FileToByte(file1));String img2 = Base64Util.encode(FileUtil.FileToByte(file2));MatchRequest req1 = new MatchRequest(img1, "BASE64");MatchRequest req2 = new MatchRequest(img2, "BASE64");ArrayList<MatchRequest> requests = new ArrayList<MatchRequest>();requests.add(req1);requests.add(req2);res = client.match(requests);System.out.println(res.get("result"));} catch (FileNotFoundException e) {e.printStackTrace();return R.error("文件不存在");} catch (IOException e) {e.printStackTrace();} return R.ok().put("data", com.alibaba.fastjson.JSONObject.parse(res.get("result").toString()));}/*** 获取table表中的column列表(联动接口)* @return*/@RequestMapping("/option/{tableName}/{columnName}")@IgnoreAuthpublic R getOption(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName,String level,String parent) {Map<String, Object> params = new HashMap<String, Object>();params.put("table", tableName);params.put("column", columnName);if(StringUtils.isNotBlank(level)) {params.put("level", level);}if(StringUtils.isNotBlank(parent)) {params.put("parent", parent);}List<String> data = commonService.getOption(params);return R.ok().put("data", data);}/*** 根据table中的column获取单条记录* @return*/@RequestMapping("/follow/{tableName}/{columnName}")@IgnoreAuthpublic R getFollowByOption(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName, @RequestParam String columnValue) {Map<String, Object> params = new HashMap<String, Object>();params.put("table", tableName);params.put("column", columnName);params.put("columnValue", columnValue);Map<String, Object> result = commonService.getFollowByOption(params);return R.ok().put("data", result);}/*** 修改table表的sfsh状态* @param map* @return*/@RequestMapping("/sh/{tableName}")public R sh(@PathVariable("tableName") String tableName, @RequestBody Map<String, Object> map) {map.put("table", tableName);commonService.sh(map);return R.ok();}/*** 获取需要提醒的记录数* @param tableName* @param columnName* @param type 1:数字 2:日期* @param map* @return*/@RequestMapping("/remind/{tableName}/{columnName}/{type}")@IgnoreAuthpublic R remindCount(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName, @PathVariable("type") String type,@RequestParam Map<String, Object> map) {map.put("table", tableName);map.put("column", columnName);map.put("type", type);if(type.equals("2")) {SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");Calendar c = Calendar.getInstance();Date remindStartDate = null;Date remindEndDate = null;if(map.get("remindstart")!=null) {Integer remindStart = Integer.parseInt(map.get("remindstart").toString());c.setTime(new Date()); c.add(Calendar.DAY_OF_MONTH,remindStart);remindStartDate = c.getTime();map.put("remindstart", sdf.format(remindStartDate));}if(map.get("remindend")!=null) {Integer remindEnd = Integer.parseInt(map.get("remindend").toString());c.setTime(new Date());c.add(Calendar.DAY_OF_MONTH,remindEnd);remindEndDate = c.getTime();map.put("remindend", sdf.format(remindEndDate));}}int count = commonService.remindCount(map);return R.ok().put("count", count);}/*** 圖表统计*/@IgnoreAuth@RequestMapping("/group/{tableName}")public R group1(@PathVariable("tableName") String tableName, @RequestParam Map<String,Object> params) {params.put("table1", tableName);List<Map<String, Object>> result = commonService.chartBoth(params);return R.ok().put("data", result);}/*** 单列求和*/@RequestMapping("/cal/{tableName}/{columnName}")@IgnoreAuthpublic R cal(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName) {Map<String, Object> params = new HashMap<String, Object>();params.put("table", tableName);params.put("column", columnName);Map<String, Object> result = commonService.selectCal(params);return R.ok().put("data", result);}/*** 分组统计*/@RequestMapping("/group/{tableName}/{columnName}")@IgnoreAuthpublic R group(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName) {Map<String, Object> params = new HashMap<String, Object>();params.put("table", tableName);params.put("column", columnName);List<Map<String, Object>> result = commonService.selectGroup(params);return R.ok().put("data", result);}/*** (按值统计)*/@RequestMapping("/value/{tableName}/{xColumnName}/{yColumnName}")@IgnoreAuthpublic R value(@PathVariable("tableName") String tableName, @PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName) {Map<String, Object> params = new HashMap<String, Object>();params.put("table", tableName);params.put("xColumn", xColumnName);params.put("yColumn", yColumnName);List<Map<String, Object>> result = commonService.selectValue(params);return R.ok().put("data", result);}/*** 下面为新加的****//*** 查询字典表的分组求和* tableName  		表名* groupColumn  		分组字段* sumCloum			统计字段* @return*/@RequestMapping("/newSelectGroupSum")public R newSelectGroupSum(@RequestParam Map<String,Object> params) {logger.debug("newSelectGroupSum:,,Controller:{},,params:{}",this.getClass().getName(),params);List<Map<String, Object>> result = commonService.newSelectGroupSum(params);return R.ok().put("data", result);}/**tableName 查询表condition1 条件1condition1Value 条件1值average 计算平均评分取值有值 Number(res.data.value.toFixed(1))无值 if(res.data){}* */@IgnoreAuth@RequestMapping("/queryScore")public R queryScore(@RequestParam Map<String, Object> params) {logger.debug("queryScore:,,Controller:{},,params:{}",this.getClass().getName(),params);Map<String, Object> queryScore = commonService.queryScore(params);return R.ok().put("data", queryScore);}/*** 查询字典表的分组统计总条数*  tableName  		表名*	groupColumn  	分组字段* @return*/@RequestMapping("/newSelectGroupCount")public R newSelectGroupCount(@RequestParam Map<String,Object> params) {logger.debug("newSelectGroupCount:,,Controller:{},,params:{}",this.getClass().getName(),params);List<Map<String, Object>> result = commonService.newSelectGroupCount(params);return R.ok().put("data", result);}/*** 当前表的日期分组求和* tableName  		表名* groupColumn  		分组字段* sumCloum			统计字段* dateFormatType	日期格式化类型   1:年 2:月 3:日* @return*/@RequestMapping("/newSelectDateGroupSum")public R newSelectDateGroupSum(@RequestParam Map<String,Object> params) {logger.debug("newSelectDateGroupSum:,,Controller:{},,params:{}",this.getClass().getName(),params);String dateFormatType = String.valueOf(params.get("dateFormatType"));if("1".equals(dateFormatType)){params.put("dateFormat", "%Y");}else if("2".equals(dateFormatType)){params.put("dateFormat", "%Y-%m");}else if("3".equals(dateFormatType)){params.put("dateFormat", "%Y-%m-%d");}else{R.error("日期格式化不正确");}List<Map<String, Object>> result = commonService.newSelectDateGroupSum(params);return R.ok().put("data", result);}/**** 查询字典表的分组统计总条数* tableName  		表名* groupColumn  		分组字段* dateFormatType	日期格式化类型   1:年 2:月 3:日* @return*/@RequestMapping("/newSelectDateGroupCount")public R newSelectDateGroupCount(@RequestParam Map<String,Object> params) {logger.debug("newSelectDateGroupCount:,,Controller:{},,params:{}",this.getClass().getName(),params);String dateFormatType = String.valueOf(params.get("dateFormatType"));if("1".equals(dateFormatType)){params.put("dateFormat", "%Y");}else if("2".equals(dateFormatType)){params.put("dateFormat", "%Y-%m");}else if("3".equals(dateFormatType)){params.put("dateFormat", "%Y-%m-%d");}else{R.error("日期格式化类型不正确");}List<Map<String, Object>> result = commonService.newSelectDateGroupCount(params);return R.ok().put("data", result);}
/*** 饼状图* -- 饼状图  查询当前表-- 				查询字典表【月】-- 				 统计   -- 查询某个月的每个类型的订单销售数量-- 				 求和   -- 查询某个月的每个类型的订单销售额-- 				查询某个字符串【月】-- 				 统计   -- 查询某个月的每个员工的订单销售数量-- 				 求和   -- 查询某个月的每个员工的订单销售额-- 				查询时间【年】-- 				 统计 	-- 查询每个月的订单销售数量-- 				 求和 	-- 查询每个月的订单销售额-- 饼状图  查询级联表-- 				查询字典表-- 				 统计  	-- 查询某个月的每个类型的订单销售数量-- 				 求和   -- 查询某个月的每个类型的订单销售额-- 				查询某个字符串-- 				 统计   -- 查询某个月的每个员工的订单销售数量-- 				 求和   -- 查询某个月的每个员工的订单销售额-- 				查询时间-- 				 统计 	-- 统计每个月的订单销售数量-- 				 求和 	-- 查询每个月的订单销售额*//*** 柱状图-- 柱状图  查询当前表--             某个【年,月】-- 			 当前表 2 级联表 1-- 						统计--   						【日期,字符串,下拉框】-- 						求和--   						【日期,字符串,下拉框】-- 柱状图  查询级联表-- 					某个【年,月】-- 						统计--   						【日期,字符串,下拉框】-- 						求和--   						【日期,字符串,下拉框】*//*** 柱状图求和*/@RequestMapping("/barSum")public R barSum(@RequestParam Map<String,Object> params) {logger.debug("barSum方法:,,Controller:{},,params:{}",this.getClass().getName(), com.alibaba.fastjson.JSONObject.toJSONString(params));Boolean isJoinTableFlag =  false;//是否有级联表相关String one =  "";//第一优先String two =  "";//第二优先//处理thisTable和joinTable 处理内容是把json字符串转为Map并把带有,的切割为数组//当前表Map<String,Object> thisTable = JSON.parseObject(String.valueOf(params.get("thisTable")),Map.class);params.put("thisTable",thisTable);//级联表String joinTableString = String.valueOf(params.get("joinTable"));if(StringUtil.isNotEmpty(joinTableString)) {Map<String, Object> joinTable = JSON.parseObject(joinTableString, Map.class);params.put("joinTable", joinTable);isJoinTableFlag = true;}if(StringUtil.isNotEmpty(String.valueOf(thisTable.get("date")))){//当前表日期thisTable.put("date",String.valueOf(thisTable.get("date")).split(","));one = "thisDate0";}if(isJoinTableFlag){//级联表日期Map<String, Object> joinTable = (Map<String, Object>) params.get("joinTable");if(StringUtil.isNotEmpty(String.valueOf(joinTable.get("date")))){joinTable.put("date",String.valueOf(joinTable.get("date")).split(","));if(StringUtil.isEmpty(one)){one ="joinDate0";}else{if(StringUtil.isEmpty(two)){two ="joinDate0";}}}}if(StringUtil.isNotEmpty(String.valueOf(thisTable.get("string")))){//当前表字符串thisTable.put("string",String.valueOf(thisTable.get("string")).split(","));if(StringUtil.isEmpty(one)){one ="thisString0";}else{if(StringUtil.isEmpty(two)){two ="thisString0";}}}if(isJoinTableFlag){//级联表字符串Map<String, Object> joinTable = (Map<String, Object>) params.get("joinTable");if(StringUtil.isNotEmpty(String.valueOf(joinTable.get("string")))){joinTable.put("string",String.valueOf(joinTable.get("string")).split(","));if(StringUtil.isEmpty(one)){one ="joinString0";}else{if(StringUtil.isEmpty(two)){two ="joinString0";}}}}if(StringUtil.isNotEmpty(String.valueOf(thisTable.get("types")))){//当前表类型thisTable.put("types",String.valueOf(thisTable.get("types")).split(","));if(StringUtil.isEmpty(one)){one ="thisTypes0";}else{if(StringUtil.isEmpty(two)){two ="thisTypes0";}}}if(isJoinTableFlag){//级联表类型Map<String, Object> joinTable = (Map<String, Object>) params.get("joinTable");if(StringUtil.isNotEmpty(String.valueOf(joinTable.get("types")))){joinTable.put("types",String.valueOf(joinTable.get("types")).split(","));if(StringUtil.isEmpty(one)){one ="joinTypes0";}else{if(StringUtil.isEmpty(two)){two ="joinTypes0";}}}}List<Map<String, Object>> result = commonService.barSum(params);List<String> xAxis = new ArrayList<>();//报表x轴List<List<String>> yAxis = new ArrayList<>();//y轴List<String> legend = new ArrayList<>();//标题if(StringUtil.isEmpty(two)){//不包含第二列List<String> yAxis0 = new ArrayList<>();yAxis.add(yAxis0);legend.add("数值");for(Map<String, Object> map :result){String oneValue = String.valueOf(map.get(one));String value = String.valueOf(map.get("value"));xAxis.add(oneValue);yAxis0.add(value);}}else{//包含第二列Map<String, HashMap<String, String>> dataMap = new LinkedHashMap<>();if(StringUtil.isNotEmpty(two)){for(Map<String, Object> map :result){String oneValue = String.valueOf(map.get(one));String twoValue = String.valueOf(map.get(two));String value = String.valueOf(map.get("value"));if(!legend.contains(twoValue)){legend.add(twoValue);//添加完成后 就是最全的第二列的类型}if(dataMap.containsKey(oneValue)){dataMap.get(oneValue).put(twoValue,value);}else{HashMap<String, String> oneData = new HashMap<>();oneData.put(twoValue,value);dataMap.put(oneValue,oneData);}}}for(int i =0; i<legend.size(); i++){yAxis.add(new ArrayList<String>());}Set<String> keys = dataMap.keySet();for(String key:keys){xAxis.add(key);HashMap<String, String> map = dataMap.get(key);for(int i =0; i<legend.size(); i++){List<String> data = yAxis.get(i);if(StringUtil.isNotEmpty(map.get(legend.get(i)))){data.add(map.get(legend.get(i)));}else{data.add("0");}}}System.out.println();}Map<String, Object> resultMap = new HashMap<>();resultMap.put("xAxis",xAxis);resultMap.put("yAxis",yAxis);resultMap.put("legend",legend);return R.ok().put("data", resultMap);}/*** 柱状图统计*/@RequestMapping("/barCount")public R barCount(@RequestParam Map<String,Object> params) {logger.debug("barCount方法:,,Controller:{},,params:{}",this.getClass().getName(), com.alibaba.fastjson.JSONObject.toJSONString(params));Boolean isJoinTableFlag =  false;//是否有级联表相关String one =  "";//第一优先String two =  "";//第二优先//处理thisTable和joinTable 处理内容是把json字符串转为Map并把带有,的切割为数组//当前表Map<String,Object> thisTable = JSON.parseObject(String.valueOf(params.get("thisTable")),Map.class);params.put("thisTable",thisTable);//级联表String joinTableString = String.valueOf(params.get("joinTable"));if(StringUtil.isNotEmpty(joinTableString)) {Map<String, Object> joinTable = JSON.parseObject(joinTableString, Map.class);params.put("joinTable", joinTable);isJoinTableFlag = true;}if(StringUtil.isNotEmpty(String.valueOf(thisTable.get("date")))){//当前表日期thisTable.put("date",String.valueOf(thisTable.get("date")).split(","));one = "thisDate0";}if(isJoinTableFlag){//级联表日期Map<String, Object> joinTable = (Map<String, Object>) params.get("joinTable");if(StringUtil.isNotEmpty(String.valueOf(joinTable.get("date")))){joinTable.put("date",String.valueOf(joinTable.get("date")).split(","));if(StringUtil.isEmpty(one)){one ="joinDate0";}else{if(StringUtil.isEmpty(two)){two ="joinDate0";}}}}if(StringUtil.isNotEmpty(String.valueOf(thisTable.get("string")))){//当前表字符串thisTable.put("string",String.valueOf(thisTable.get("string")).split(","));if(StringUtil.isEmpty(one)){one ="thisString0";}else{if(StringUtil.isEmpty(two)){two ="thisString0";}}}if(isJoinTableFlag){//级联表字符串Map<String, Object> joinTable = (Map<String, Object>) params.get("joinTable");if(StringUtil.isNotEmpty(String.valueOf(joinTable.get("string")))){joinTable.put("string",String.valueOf(joinTable.get("string")).split(","));if(StringUtil.isEmpty(one)){one ="joinString0";}else{if(StringUtil.isEmpty(two)){two ="joinString0";}}}}if(StringUtil.isNotEmpty(String.valueOf(thisTable.get("types")))){//当前表类型thisTable.put("types",String.valueOf(thisTable.get("types")).split(","));if(StringUtil.isEmpty(one)){one ="thisTypes0";}else{if(StringUtil.isEmpty(two)){two ="thisTypes0";}}}if(isJoinTableFlag){//级联表类型Map<String, Object> joinTable = (Map<String, Object>) params.get("joinTable");if(StringUtil.isNotEmpty(String.valueOf(joinTable.get("types")))){joinTable.put("types",String.valueOf(joinTable.get("types")).split(","));if(StringUtil.isEmpty(one)){one ="joinTypes0";}else{if(StringUtil.isEmpty(two)){two ="joinTypes0";}}}}List<Map<String, Object>> result = commonService.barCount(params);List<String> xAxis = new ArrayList<>();//报表x轴List<List<String>> yAxis = new ArrayList<>();//y轴List<String> legend = new ArrayList<>();//标题if(StringUtil.isEmpty(two)){//不包含第二列List<String> yAxis0 = new ArrayList<>();yAxis.add(yAxis0);legend.add("数值");for(Map<String, Object> map :result){String oneValue = String.valueOf(map.get(one));String value = String.valueOf(map.get("value"));xAxis.add(oneValue);yAxis0.add(value);}}else{//包含第二列Map<String, HashMap<String, String>> dataMap = new LinkedHashMap<>();if(StringUtil.isNotEmpty(two)){for(Map<String, Object> map :result){String oneValue = String.valueOf(map.get(one));String twoValue = String.valueOf(map.get(two));String value = String.valueOf(map.get("value"));if(!legend.contains(twoValue)){legend.add(twoValue);//添加完成后 就是最全的第二列的类型}if(dataMap.containsKey(oneValue)){dataMap.get(oneValue).put(twoValue,value);}else{HashMap<String, String> oneData = new HashMap<>();oneData.put(twoValue,value);dataMap.put(oneValue,oneData);}}}for(int i =0; i<legend.size(); i++){yAxis.add(new ArrayList<String>());}Set<String> keys = dataMap.keySet();for(String key:keys){xAxis.add(key);HashMap<String, String> map = dataMap.get(key);for(int i =0; i<legend.size(); i++){List<String> data = yAxis.get(i);if(StringUtil.isNotEmpty(map.get(legend.get(i)))){data.add(map.get(legend.get(i)));}else{data.add("0");}}}System.out.println();}Map<String, Object> resultMap = new HashMap<>();resultMap.put("xAxis",xAxis);resultMap.put("yAxis",yAxis);resultMap.put("legend",legend);return R.ok().put("data", resultMap);}
}

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("/dictionary")
public class DictionaryController {private static final Logger logger = LoggerFactory.getLogger(DictionaryController.class);@Autowiredprivate DictionaryService dictionaryService;@Autowiredprivate TokenService tokenService;//级联表service@Autowiredprivate YonghuService yonghuService;/*** 后端列表*/@RequestMapping("/page")@IgnoreAuthpublic R page(@RequestParam Map<String, Object> params, HttpServletRequest request){logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));if(params.get("orderBy")==null || params.get("orderBy")==""){params.put("orderBy","id");}PageUtils page = dictionaryService.queryPage(params);//字典表数据转换List<DictionaryView> list =(List<DictionaryView>)page.getList();for(DictionaryView 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);DictionaryEntity dictionary = dictionaryService.selectById(id);if(dictionary !=null){//entity转viewDictionaryView view = new DictionaryView();BeanUtils.copyProperties( dictionary , view );//把实体数据重构到view中//修改对应字典表字段dictionaryService.dictionaryConvert(view, request);return R.ok().put("data", view);}else {return R.error(511,"查不到数据");}}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody DictionaryEntity dictionary, HttpServletRequest request){logger.debug("save方法:,,Controller:{},,dictionary:{}",this.getClass().getName(),dictionary.toString());String role = String.valueOf(request.getSession().getAttribute("role"));if(false)return R.error(511,"永远不会进入");Wrapper<DictionaryEntity> queryWrapper = new EntityWrapper<DictionaryEntity>().eq("dic_code", dictionary.getDicCode()).eq("index_name", dictionary.getIndexName());if(dictionary.getDicCode().contains("_erji_types")){queryWrapper.eq("super_id",dictionary.getSuperId());}logger.info("sql语句:"+queryWrapper.getSqlSegment());DictionaryEntity dictionaryEntity = dictionaryService.selectOne(queryWrapper);if(dictionaryEntity==null){dictionary.setCreateTime(new Date());dictionaryService.insert(dictionary);//字典表新增数据,把数据再重新查出,放入监听器中List<DictionaryEntity> dictionaryEntities = dictionaryService.selectList(new EntityWrapper<DictionaryEntity>());ServletContext servletContext = request.getServletContext();Map<String, Map<Integer,String>> map = new HashMap<>();for(DictionaryEntity d :dictionaryEntities){Map<Integer, String> m = map.get(d.getDicCode());if(m ==null || m.isEmpty()){m = new HashMap<>();}m.put(d.getCodeIndex(),d.getIndexName());map.put(d.getDicCode(),m);}servletContext.setAttribute("dictionaryMap",map);return R.ok();}else {return R.error(511,"表中有相同数据");}}/*** 后端修改*/@RequestMapping("/update")public R update(@RequestBody DictionaryEntity dictionary, HttpServletRequest request){logger.debug("update方法:,,Controller:{},,dictionary:{}",this.getClass().getName(),dictionary.toString());String role = String.valueOf(request.getSession().getAttribute("role"));
//        if(false)
//            return R.error(511,"永远不会进入");//根据字段查询是否有相同数据Wrapper<DictionaryEntity> queryWrapper = new EntityWrapper<DictionaryEntity>().notIn("id",dictionary.getId()).eq("dic_code", dictionary.getDicCode()).eq("index_name", dictionary.getIndexName());if(dictionary.getDicCode().contains("_erji_types")){queryWrapper.eq("super_id",dictionary.getSuperId());}logger.info("sql语句:"+queryWrapper.getSqlSegment());DictionaryEntity dictionaryEntity = dictionaryService.selectOne(queryWrapper);if(dictionaryEntity==null){dictionaryService.updateById(dictionary);//根据id更新//如果字典表修改数据的话,把数据再重新查出,放入监听器中List<DictionaryEntity> dictionaryEntities = dictionaryService.selectList(new EntityWrapper<DictionaryEntity>());ServletContext servletContext = request.getServletContext();Map<String, Map<Integer,String>> map = new HashMap<>();for(DictionaryEntity d :dictionaryEntities){Map<Integer, String> m = map.get(d.getDicCode());if(m ==null || m.isEmpty()){m = new HashMap<>();}m.put(d.getCodeIndex(),d.getIndexName());map.put(d.getDicCode(),m);}servletContext.setAttribute("dictionaryMap",map);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());dictionaryService.deleteBatchIds(Arrays.asList(ids));return R.ok();}/*** 最大值*/@RequestMapping("/maxCodeIndex")public R maxCodeIndex(@RequestBody DictionaryEntity dictionary){logger.debug("maxCodeIndex:,,Controller:{},,dictionary:{}",this.getClass().getName(),dictionary.toString());List<String> descs = new ArrayList<>();descs.add("code_index");Wrapper<DictionaryEntity> queryWrapper = new EntityWrapper<DictionaryEntity>().eq("dic_code", dictionary.getDicCode()).orderDesc(descs);logger.info("sql语句:"+queryWrapper.getSqlSegment());List<DictionaryEntity> dictionaryEntityList = dictionaryService.selectList(queryWrapper);if(dictionaryEntityList != null ){return R.ok().put("maxCodeIndex",dictionaryEntityList.get(0).getCodeIndex()+1);}else{return R.ok().put("maxCodeIndex",1);}}/*** 批量上传*/@RequestMapping("/batchInsert")public R save( String fileName, HttpServletRequest request){logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName);Integer yonghuId = Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId")));SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");try {List<DictionaryEntity> dictionaryList = 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){//循环DictionaryEntity dictionaryEntity = new DictionaryEntity();
//                            dictionaryEntity.setDicCode(data.get(0));                    //字段 要改的
//                            dictionaryEntity.setDicName(data.get(0));                    //字段名 要改的
//                            dictionaryEntity.setCodeIndex(Integer.valueOf(data.get(0)));   //编码 要改的
//                            dictionaryEntity.setIndexName(data.get(0));                    //编码名字 要改的
//                            dictionaryEntity.setSuperId(Integer.valueOf(data.get(0)));   //父字段id 要改的
//                            dictionaryEntity.setBeizhu(data.get(0));                    //备注 要改的
//                            dictionaryEntity.setCreateTime(date);//时间dictionaryList.add(dictionaryEntity);//把要查询是否重复的字段放入map中}//查询是否重复dictionaryService.insertBatch(dictionaryList);return R.ok();}}}}catch (Exception e){e.printStackTrace();return R.error(511,"批量插入数据异常,请联系管理员");}}}

六、底部获取项目源码带万字文档(9.9¥带走)

有问题,或者需要协助调试运行项目的也可以

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

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

相关文章

【fastadmin 开发实战】select 级联选择

先看实现的效果 1、表单页面实现级联选择 2、级联选项后台可以编辑添加 前端代码&#xff08;编辑窗口&#xff09;&#xff1a; <div class"form-group"><label class"control-label col-xs-12 col-sm-2">{:__(渠道归属)}:</label><…

力扣 双指针基础

class Solution {public void moveZeroes(int[] nums) {int l 0;//慢指针但先走for (int r 0; r < nums.length; r) {//快指针&#xff0c;遍历次数if (nums[r] 0) continue;//l比r先到&#xff0c;在此处定住l&#xff0c;r继续移动int t nums[l];nums[l] nums[r];num…

防火墙基础实验配置

一&#xff0c;实验拓扑 二&#xff0c;实验需求&#xff1a; 1.DMZ区内的服务器&#xff0c;办公区仅能在办公时间内&#xff08;9&#xff1a;00 - 18&#xff1a;00&#xff09;可以访问&#xff0c;生产区的设备全天可以访问 2.生产区不允许访问互联网&#xff0c;办公区…

外贸展示型网站设计

清洁能源风能设备wordpress外贸公司模板 风能设备wordpress外贸公司模板&#xff0c;做新能源网通设备的公司网站模板。 https://www.jianzhanpress.com/?p3606 钢材wordpress外贸公司模板 金属钢材wordpress外贸公司模板&#xff0c;做金属成品贸易公司的企业网站模板。 …

金九银十招聘季, 自动化测试面试题分享

马上进入金九银十&#xff0c;很多小伙伴有被动跳槽的打算&#xff0c;所以更新一些相关的自动化面试题&#xff0c;希望能帮到大家。 一 怎么设计接口测试用例&#xff1f; 通常&#xff0c;设计接口测试用例需要考虑以下几个方面&#xff1a; ① 是否满足前提条件 有些接…

从零开始搭建互联网医院系统:技术与案例解析

随着信息技术的飞速发展和人们对医疗服务需求的增加&#xff0c;互联网医院逐渐成为医疗服务的重要模式。本文将详细介绍从零开始搭建互联网医院系统的关键技术和具体案例&#xff0c;帮助读者理解如何构建一个高效、可靠的互联网医院系统。 一、互联网医院系统的核心技术 1…

60秒带你了解冒泡排序

排序似乎有很多种排序&#xff0c;选择、插入、快速、归并、基数排序等等&#xff0c;今天实现一种最简单的排序方式&#xff1a;冒泡排序&#xff08;Bubble Sort&#xff09;。 int[] arr {9,1,6,3,8,4}; ↓&#xff08;如何通过算法实现这个过程&#xff1f;&#xff09; …

NodeJS小饰品销售管理系统-计算机毕业设计源码21597

摘 要 在当今的数字化时代&#xff0c;电子商务已经成为了商业领域中不可或缺的一部分。随着消费者对于购物体验的要求越来越高&#xff0c;一个高效、便捷、用户友好的小饰品销售管理系统显得尤为重要。 本系统旨在利用 JavaScript 技术&#xff0c;设计并实现一个功能强大的小…

conda篇----在已有conda环境的基础上升级python包

conda篇----在已有conda环境的基础上升级python包 原先的python版本 第一步&#xff1a; conda update --all(py11) [xxxaivrs01 xxx]$ conda update --all Collecting package metadata (current_repodata.json): done Solving environment: done> WARNING: A newer vers…

【读点论文】ASAM: Boosting Segment Anything Model with Adversarial Tuning,对抗学习提升性能

ASAM: Boosting Segment Anything Model with Adversarial Tuning Abstract 在不断发展的计算机视觉领域&#xff0c;基础模型已成为关键工具&#xff0c;对各种任务表现出卓越的适应性。其中&#xff0c;Meta AI 的 Segment Anything Model (SAM) 在图像分割方面表现突出。然…

首批!蚂蚁数科通过中国信通院面向大模型的可信执行环境产品专项测试

2024年6月17日&#xff0c;在中国信息通信研究院&#xff08;以下简称“信通院”&#xff09;组织的首批“面向大模型的增强型可信执行环境基础能力专项测试”中&#xff0c;蚂蚁数科摩斯顺利完成全部测试内容&#xff0c;成为首批完成此项测试的组织。 标准及测试介绍 《面向…

全局唯一id

问题引出&#xff1a; 由于数据库的自增的id很有规律&#xff0c;会让人猜到后续id 由于一个单表存储的数量有限&#xff0c;那么就会用多个表存储&#xff0c;每个表的id都是自增&#xff0c;这样导致id不唯一的情况。 引进新的方法&#xff1a; 具体解决方法&#xff1a;使用…

MySQL--函数、约束、多表查询

函数 函数指一段可以直接被另一段程序调用的程序或代码 字符串函数、数值函数、日期函数、流程函数 字符串函数 数值函数 日期函数 datediff&#xff08;date1,date2&#xff09;&#xff1a;date1-date2 流程函数 约束 概念&#xff1a;约束是作用于表中字段上的规则&…

ECCV:A Discriminative Feature Learning Approach for Deep Face Recognition

1 Abstract 卷积神经网络&#xff08;CNNs&#xff09;已广泛应用于计算机视觉领域&#xff0c;显著提高了计算机视觉领域的技术水平。在大多数可用的cnn中&#xff0c;使用软tmax损失函数作为监督信号来训练深度模型。为了增强深度学习特征的识别能力&#xff0c;本文提出了一…

AI自动生成PPT怎么用?5种提升演示效果的方法

随着#7月份我的同事一个个消失了#的话题热议&#xff0c;职场中的效率与变革再次成为焦点。 在忙碌的工作节奏中&#xff0c;AI自动生成PPT的软件悄然兴起&#xff0c;成为不少职场人的新宠。它们不仅简化了繁琐的PPT制作流程&#xff0c;更以高效、专业的姿态&#xff0c;助力…

包成功安装tiny-cuda-nn,记录安装过程中的问题解决,附带pytorch3d安装【踩坑指南】

tiny-cuda-nn安装过程中的问题解决&#xff0c;附带pytorch3d安装【踩坑指南】 前言tiny-cuda-nn第一种下载方法&#xff1a;命令行安装tiny-cuda-nn第二种下载方法&#xff1a;本地编译 pytorch3d安装 前言 official repo: https://github.com/NVlabs/tiny-cuda-nn 该包可以显…

Java 中的阻塞 IO 和非阻塞 IO

Java 中的阻塞 IO 和非阻塞 IO 1、阻塞 IO&#xff08;Blocking IO&#xff09;2、非阻塞 IO&#xff08;Non-blocking IO&#xff09;3、区别与应用场景4、总结 &#x1f496;The Begin&#x1f496;点点关注&#xff0c;收藏不迷路&#x1f496; IO&#xff08;输入输出&…

基于Booth乘法和Wallace树的乘法器优化思想

基于Booth乘法和Wallace树的快速乘法器 为了理解Booth乘法和Wallace数如何让乘法器变得更快&#xff1a; 先考虑不优化的8位乘法器实现&#xff0c;即8个16位数字累积共进行7次加法运算&#xff0c;可以认为一次16位加法用到16个全加器&#xff0c;则共需要112个全加器件&…

【Linux操作系统-测试】第三节.Linux 系统、网络信息、用户权限命令总结

文章目录 前言一、Linux 系统相关信息命令 1.1 df 命令--查看磁盘剩余 1.2 ps 命令--查看进程 1.3 top 命令--显示进程运行状态 1.4 kill 命令说明 -- 杀死进程二、Linux 网络信息命令 2.1 ping 命令--检查网络是否连通 2.1 ifconfig--显示网络设…

(总结)编译ORB_SLAM2遇到的错误

目录 第一个错误error: ‘CV_BGR2GRAY’ was not declared in this scope 第二个错误error: ‘CV_GRAY2BGR’ was not declared in this scope 第三个错误是没有那个文件或目录 26 | #include 第四个错误是‘CV_LOAD_IMAGE_UNCHANGED’ was not declared in this scope 第…