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

网站开发维护合同样板jsp做的求职招聘网站百度云

网站开发维护合同样板,jsp做的求职招聘网站百度云,网页设计与制作就业前景,深圳图派做的网站后台加什么在Internet高速发展的今天#xff0c;我们生活的各个领域都涉及到计算机的应用#xff0c;其中包括网上书城管理系统的网络应用#xff0c;在国外网上书城管理系统已经是很普遍的方式#xff0c;不过国内的书城管理系统可能还处于起步阶段。网上书城管理系统具有网上书城信…在Internet高速发展的今天我们生活的各个领域都涉及到计算机的应用其中包括网上书城管理系统的网络应用在国外网上书城管理系统已经是很普遍的方式不过国内的书城管理系统可能还处于起步阶段。网上书城管理系统具有网上书城信息管理功能的选择。网上书城管理系统采用java技术基于springboot框架mysql数据库进行开发实现了首页、个人中心、用户管理、图书类型管理、图书分类管理、图书信息管理、我的收藏管理、系统管理、订单管理等内容进行管理本系统具有良好的兼容性和适应性为用户提供更多的网上书城信息也提供了良好的平台从而提高系统的核心竞争力。 本文首先介绍了设计的背景与研究目的其次介绍系统相关技术重点叙述了系统功能分析以及详细设计最后总结了系统的开发心得。 关键词java技术网上书城管理系统mysql 基于springboot网上书城交易平台源码和论文332 演示视频 基于springboot网上书城交易平台源码和论文 Abstract In the rapid development of the Internet today, all areas of our life are involved in the application of computers, including the network application of online book city management system, online book city management system in foreign countries has been a very common way, but the domestic book city management system may still be in its infancy. Online book city management system has the choice of online book city information management function. Online book city management system using Java technology, based on springboot framework, mysql database development, to achieve the home page, personal center, user management, book type management, book classification management, book information management, my collection management, system management, order management and other content management. The system has good compatibility and adaptability, to provide users with more online book city information, but also provides a good platform, so as to improve the core competitiveness of the system. This paper first introduces the design background and research purpose, then introduces the system related technology, focuses on the system function analysis and detailed design, and finally summarizes the development experience of the system. Key words: Java technology; Online book city management system; mysql 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(/yonghu) public class YonghuController {private static final Logger logger LoggerFactory.getLogger(YonghuController.class);private static final String TABLE_NAME yonghu;Autowiredprivate YonghuService yonghuService;Autowiredprivate TokenService tokenService;Autowiredprivate DictionaryService dictionaryService;//字典Autowiredprivate GonggaoService gonggaoService;//公告Autowiredprivate JixiaoService jixiaoService;//绩效Autowiredprivate PeixunService peixunService;//培训Autowiredprivate RenshidiaodongService renshidiaodongService;//人事调动Autowiredprivate SingleSeachService singleSeachService;//单页数据Autowiredprivate XinziService xinziService;//薪资Autowiredprivate YuangongService yuangongService;//员工Autowiredprivate YuangongKaoqinService yuangongKaoqinService;//员工考勤Autowiredprivate YuangongKaoqinListService yuangongKaoqinListService;//员工考勤详情Autowiredprivate YuangongqingjiaService yuangongqingjiaService;//员工请假Autowiredprivate ZhaopinService zhaopinService;//招聘Autowiredprivate UsersService usersService;//管理员/*** 后端列表*/RequestMapping(/page)public R page(RequestParam MapString, 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(yuangongId,request.getSession().getAttribute(userId));CommonUtil.checkMap(params);PageUtils page yonghuService.queryPage(params);//字典表数据转换ListYonghuView list (ListYonghuView)page.getList();for(YonghuView 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);YonghuEntity yonghu yonghuService.selectById(id);if(yonghu !null){//entity转viewYonghuView view new YonghuView();BeanUtils.copyProperties( yonghu , view );//把实体数据重构到view中//修改对应字典表字段dictionaryService.dictionaryConvert(view, request);return R.ok().put(data, view);}else {return R.error(511,查不到数据);}}/*** 后端保存*/RequestMapping(/save)public R save(RequestBody YonghuEntity yonghu, HttpServletRequest request){logger.debug(save方法:,,Controller:{},,yonghu:{},this.getClass().getName(),yonghu.toString());String role String.valueOf(request.getSession().getAttribute(role));if(false)return R.error(511,永远不会进入);WrapperYonghuEntity queryWrapper new EntityWrapperYonghuEntity().eq(username, yonghu.getUsername()).or().eq(yonghu_phone, yonghu.getYonghuPhone()).or().eq(yonghu_id_number, yonghu.getYonghuIdNumber());logger.info(sql语句:queryWrapper.getSqlSegment());YonghuEntity yonghuEntity yonghuService.selectOne(queryWrapper);if(yonghuEntitynull){yonghu.setCreateTime(new Date());yonghu.setPassword(123456);yonghuService.insert(yonghu);return R.ok();}else {return R.error(511,账户或者用户手机号或者用户身份证号已经被使用);}}/*** 后端修改*/RequestMapping(/update)public R update(RequestBody YonghuEntity yonghu, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {logger.debug(update方法:,,Controller:{},,yonghu:{},this.getClass().getName(),yonghu.toString());YonghuEntity oldYonghuEntity yonghuService.selectById(yonghu.getId());//查询原先数据String role String.valueOf(request.getSession().getAttribute(role)); // if(false) // return R.error(511,永远不会进入);if(.equals(yonghu.getYonghuPhoto()) || null.equals(yonghu.getYonghuPhoto())){yonghu.setYonghuPhoto(null);}yonghuService.updateById(yonghu);//根据id更新return R.ok();}/*** 删除*/RequestMapping(/delete)public R delete(RequestBody Integer[] ids, HttpServletRequest request){logger.debug(delete:,,Controller:{},,ids:{},this.getClass().getName(),ids.toString());ListYonghuEntity oldYonghuList yonghuService.selectBatchIds(Arrays.asList(ids));//要删除的数据yonghuService.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);//.eq(time, new SimpleDateFormat(yyyy-MM-dd).format(new Date()))try {ListYonghuEntity yonghuList new ArrayList();//上传的东西MapString, ListString 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{ListListString dataList PoiUtil.poiImport(file.getPath());//读取xls文件dataList.remove(0);//删除第一行因为第一行是提示for(ListString data:dataList){//循环YonghuEntity yonghuEntity new YonghuEntity(); // yonghuEntity.setUsername(data.get(0)); //账户 要改的 // yonghuEntity.setPassword(123456);//密码 // yonghuEntity.setYonghuName(data.get(0)); //用户姓名 要改的 // yonghuEntity.setYonghuPhone(data.get(0)); //用户手机号 要改的 // yonghuEntity.setYonghuIdNumber(data.get(0)); //用户身份证号 要改的 // yonghuEntity.setYonghuPhoto();//详情和图片 // yonghuEntity.setSexTypes(Integer.valueOf(data.get(0))); //性别 要改的 // yonghuEntity.setYonghuEmail(data.get(0)); //用户邮箱 要改的 // yonghuEntity.setJinyongTypes(Integer.valueOf(data.get(0))); //账户状态 要改的 // yonghuEntity.setCreateTime(date);//时间yonghuList.add(yonghuEntity);//把要查询是否重复的字段放入map中//账户if(seachFields.containsKey(username)){ListString username seachFields.get(username);username.add(data.get(0));//要改的}else{ListString username new ArrayList();username.add(data.get(0));//要改的seachFields.put(username,username);}//用户手机号if(seachFields.containsKey(yonghuPhone)){ListString yonghuPhone seachFields.get(yonghuPhone);yonghuPhone.add(data.get(0));//要改的}else{ListString yonghuPhone new ArrayList();yonghuPhone.add(data.get(0));//要改的seachFields.put(yonghuPhone,yonghuPhone);}//用户身份证号if(seachFields.containsKey(yonghuIdNumber)){ListString yonghuIdNumber seachFields.get(yonghuIdNumber);yonghuIdNumber.add(data.get(0));//要改的}else{ListString yonghuIdNumber new ArrayList();yonghuIdNumber.add(data.get(0));//要改的seachFields.put(yonghuIdNumber,yonghuIdNumber);}}//查询是否重复//账户ListYonghuEntity yonghuEntities_username yonghuService.selectList(new EntityWrapperYonghuEntity().in(username, seachFields.get(username)));if(yonghuEntities_username.size() 0 ){ArrayListString repeatFields new ArrayList();for(YonghuEntity s:yonghuEntities_username){repeatFields.add(s.getUsername());}return R.error(511,数据库的该表中的 [账户] 字段已经存在 存在数据为:repeatFields.toString());}//用户手机号ListYonghuEntity yonghuEntities_yonghuPhone yonghuService.selectList(new EntityWrapperYonghuEntity().in(yonghu_phone, seachFields.get(yonghuPhone)));if(yonghuEntities_yonghuPhone.size() 0 ){ArrayListString repeatFields new ArrayList();for(YonghuEntity s:yonghuEntities_yonghuPhone){repeatFields.add(s.getYonghuPhone());}return R.error(511,数据库的该表中的 [用户手机号] 字段已经存在 存在数据为:repeatFields.toString());}//用户身份证号ListYonghuEntity yonghuEntities_yonghuIdNumber yonghuService.selectList(new EntityWrapperYonghuEntity().in(yonghu_id_number, seachFields.get(yonghuIdNumber)));if(yonghuEntities_yonghuIdNumber.size() 0 ){ArrayListString repeatFields new ArrayList();for(YonghuEntity s:yonghuEntities_yonghuIdNumber){repeatFields.add(s.getYonghuIdNumber());}return R.error(511,数据库的该表中的 [用户身份证号] 字段已经存在 存在数据为:repeatFields.toString());}yonghuService.insertBatch(yonghuList);return R.ok();}}}}catch (Exception e){e.printStackTrace();return R.error(511,批量插入数据异常请联系管理员);}}/*** 登录*/IgnoreAuthRequestMapping(value /login)public R login(String username, String password, String captcha, HttpServletRequest request) {YonghuEntity yonghu yonghuService.selectOne(new EntityWrapperYonghuEntity().eq(username, username));if(yonghunull || !yonghu.getPassword().equals(password))return R.error(账号或密码不正确);else if(yonghu.getJinyongTypes() ! 1)return R.error(账户已被禁用);String token tokenService.generateToken(yonghu.getId(),username, yonghu, 用户);R r R.ok();r.put(token, token);r.put(role,用户);r.put(username,yonghu.getYonghuName());r.put(tableName,yonghu);r.put(userId,yonghu.getId());return r;}/*** 注册*/IgnoreAuthPostMapping(value /register)public R register(RequestBody YonghuEntity yonghu, HttpServletRequest request) { // ValidatorUtils.validateEntity(user);WrapperYonghuEntity queryWrapper new EntityWrapperYonghuEntity().eq(username, yonghu.getUsername()).or().eq(yonghu_phone, yonghu.getYonghuPhone()).or().eq(yonghu_id_number, yonghu.getYonghuIdNumber());YonghuEntity yonghuEntity yonghuService.selectOne(queryWrapper);if(yonghuEntity ! null)return R.error(账户或者用户手机号或者用户身份证号已经被使用);yonghu.setJinyongTypes(1);//启用yonghu.setCreateTime(new Date());yonghuService.insert(yonghu);return R.ok();}/*** 重置密码*/GetMapping(value /resetPassword)public R resetPassword(Integer id, HttpServletRequest request) {YonghuEntity yonghu yonghuService.selectById(id);yonghu.setPassword(123456);yonghuService.updateById(yonghu);return R.ok();}/*** 修改密码*/GetMapping(value /updatePassword)public R updatePassword(String oldPassword, String newPassword, HttpServletRequest request) {YonghuEntity yonghu yonghuService.selectById((Integer)request.getSession().getAttribute(userId));if(newPassword null){return R.error(新密码不能为空) ;}if(!oldPassword.equals(yonghu.getPassword())){return R.error(原密码输入错误);}if(newPassword.equals(yonghu.getPassword())){return R.error(新密码不能和原密码一致) ;}yonghu.setPassword(newPassword);yonghuService.updateById(yonghu);return R.ok();}/*** 忘记密码*/IgnoreAuthRequestMapping(value /resetPass)public R resetPass(String username, HttpServletRequest request) {YonghuEntity yonghu yonghuService.selectOne(new EntityWrapperYonghuEntity().eq(username, username));if(yonghu!null){yonghu.setPassword(123456);yonghuService.updateById(yonghu);return R.ok();}else{return R.error(账号不存在);}}/*** 获取用户的session用户信息*/RequestMapping(/session)public R getCurrYonghu(HttpServletRequest request){Integer id (Integer)request.getSession().getAttribute(userId);YonghuEntity yonghu yonghuService.selectById(id);if(yonghu !null){//entity转viewYonghuView view new YonghuView();BeanUtils.copyProperties( yonghu , view );//把实体数据重构到view中//修改对应字典表字段dictionaryService.dictionaryConvert(view, request);return R.ok().put(data, view);}else {return R.error(511,查不到数据);}}/*** 退出*/GetMapping(value logout)public R logout(HttpServletRequest request) {request.getSession().invalidate();return R.ok(退出成功);}/*** 前端列表*/IgnoreAuthRequestMapping(/list)public R list(RequestParam MapString, Object params, HttpServletRequest request){logger.debug(list方法:,,Controller:{},,params:{},this.getClass().getName(),JSONObject.toJSONString(params));CommonUtil.checkMap(params);PageUtils page yonghuService.queryPage(params);//字典表数据转换ListYonghuView list (ListYonghuView)page.getList();for(YonghuView c:list)dictionaryService.dictionaryConvert(c, request); //修改对应字典表字段return R.ok().put(data, page);}/*** 前端详情*/RequestMapping(/detail/{id})public R detail(PathVariable(id) Integer id, HttpServletRequest request){logger.debug(detail方法:,,Controller:{},,id:{},this.getClass().getName(),id);YonghuEntity yonghu yonghuService.selectById(id);if(yonghu !null){//entity转viewYonghuView view new YonghuView();BeanUtils.copyProperties( yonghu , view );//把实体数据重构到view中//修改对应字典表字段dictionaryService.dictionaryConvert(view, request);return R.ok().put(data, view);}else {return R.error(511,查不到数据);}}/*** 前端保存*/RequestMapping(/add)public R add(RequestBody YonghuEntity yonghu, HttpServletRequest request){logger.debug(add方法:,,Controller:{},,yonghu:{},this.getClass().getName(),yonghu.toString());WrapperYonghuEntity queryWrapper new EntityWrapperYonghuEntity().eq(username, yonghu.getUsername()).or().eq(yonghu_phone, yonghu.getYonghuPhone()).or().eq(yonghu_id_number, yonghu.getYonghuIdNumber()) // .notIn(yonghu_types, new Integer[]{102});logger.info(sql语句:queryWrapper.getSqlSegment());YonghuEntity yonghuEntity yonghuService.selectOne(queryWrapper);if(yonghuEntitynull){yonghu.setCreateTime(new Date());yonghu.setPassword(123456);yonghuService.insert(yonghu);return R.ok();}else {return R.error(511,账户或者用户手机号或者用户身份证号已经被使用);}}} package com.controller;import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.Calendar; import java.util.Map; import java.util.HashMap; import java.util.Iterator; import java.util.Date; import java.util.List; import javax.servlet.http.HttpServletRequest;import com.utils.ValidatorUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.format.annotation.DateTimeFormat; 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.baomidou.mybatisplus.mapper.EntityWrapper; import com.baomidou.mybatisplus.mapper.Wrapper; import com.annotation.IgnoreAuth; import com.entity.OrdersEntity; import com.service.OrdersService;import com.entity.TushuxinxiEntity; import com.entity.view.TushuxinxiView;import com.service.TushuxinxiService; import com.service.TokenService; import com.utils.PageUtils; import com.utils.R; import com.utils.MD5Util; import com.utils.MPUtil; import com.utils.CommonUtil; import java.io.IOException;/*** 图书信息* 后端接口* author * email * date 2022-01-18 10:58:17*/ RestController RequestMapping(/tushuxinxi) public class TushuxinxiController {Autowiredprivate TushuxinxiService tushuxinxiService;Autowiredprivate OrdersService ordersService;/*** 后端列表*/RequestMapping(/page)public R page(RequestParam MapString, Object params,TushuxinxiEntity tushuxinxi,HttpServletRequest request){EntityWrapperTushuxinxiEntity ew new EntityWrapperTushuxinxiEntity();PageUtils page tushuxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, tushuxinxi), params), params));return R.ok().put(data, page);}/*** 前端列表*/IgnoreAuthRequestMapping(/list)public R list(RequestParam MapString, Object params,TushuxinxiEntity tushuxinxi, HttpServletRequest request){EntityWrapperTushuxinxiEntity ew new EntityWrapperTushuxinxiEntity();PageUtils page tushuxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, tushuxinxi), params), params));return R.ok().put(data, page);}/*** 列表*/RequestMapping(/lists)public R list( TushuxinxiEntity tushuxinxi){EntityWrapperTushuxinxiEntity ew new EntityWrapperTushuxinxiEntity();ew.allEq(MPUtil.allEQMapPre( tushuxinxi, tushuxinxi)); return R.ok().put(data, tushuxinxiService.selectListView(ew));}/*** 查询*/RequestMapping(/query)public R query(TushuxinxiEntity tushuxinxi){EntityWrapper TushuxinxiEntity ew new EntityWrapper TushuxinxiEntity();ew.allEq(MPUtil.allEQMapPre( tushuxinxi, tushuxinxi)); TushuxinxiView tushuxinxiView tushuxinxiService.selectView(ew);return R.ok(查询图书信息成功).put(data, tushuxinxiView);}/*** 后端详情*/RequestMapping(/info/{id})public R info(PathVariable(id) Long id){TushuxinxiEntity tushuxinxi tushuxinxiService.selectById(id);tushuxinxi.setClicknum(tushuxinxi.getClicknum()1);tushuxinxi.setClicktime(new Date());tushuxinxiService.updateById(tushuxinxi);return R.ok().put(data, tushuxinxi);}/*** 前端详情*/IgnoreAuthRequestMapping(/detail/{id})public R detail(PathVariable(id) Long id){TushuxinxiEntity tushuxinxi tushuxinxiService.selectById(id);tushuxinxi.setClicknum(tushuxinxi.getClicknum()1);tushuxinxi.setClicktime(new Date());tushuxinxiService.updateById(tushuxinxi);return R.ok().put(data, tushuxinxi);}/*** 后端保存*/RequestMapping(/save)public R save(RequestBody TushuxinxiEntity tushuxinxi, HttpServletRequest request){tushuxinxi.setId(new Date().getTime()new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(tushuxinxi);tushuxinxiService.insert(tushuxinxi);return R.ok();}/*** 前端保存*/RequestMapping(/add)public R add(RequestBody TushuxinxiEntity tushuxinxi, HttpServletRequest request){tushuxinxi.setId(new Date().getTime()new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(tushuxinxi);tushuxinxiService.insert(tushuxinxi);return R.ok();}/*** 修改*/RequestMapping(/update)public R update(RequestBody TushuxinxiEntity tushuxinxi, HttpServletRequest request){//ValidatorUtils.validateEntity(tushuxinxi);tushuxinxiService.updateById(tushuxinxi);//全部更新return R.ok();}/*** 删除*/RequestMapping(/delete)public R delete(RequestBody Long[] ids){tushuxinxiService.deleteBatchIds(Arrays.asList(ids));return R.ok();}/*** 提醒接口*/RequestMapping(/remind/{columnName}/{type})public R remindCount(PathVariable(columnName) String columnName, HttpServletRequest request, PathVariable(type) String type,RequestParam MapString, Object map) {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));}}WrapperTushuxinxiEntity wrapper new EntityWrapperTushuxinxiEntity();if(map.get(remindstart)!null) {wrapper.ge(columnName, map.get(remindstart));}if(map.get(remindend)!null) {wrapper.le(columnName, map.get(remindend));}int count tushuxinxiService.selectCount(wrapper);return R.ok().put(count, count);}/*** 前端智能排序*/IgnoreAuthRequestMapping(/autoSort)public R autoSort(RequestParam MapString, Object params,TushuxinxiEntity tushuxinxi, HttpServletRequest request,String pre){EntityWrapperTushuxinxiEntity ew new EntityWrapperTushuxinxiEntity();MapString, Object newMap new HashMapString, Object();MapString, Object param new HashMapString, Object();IteratorMap.EntryString, Object it param.entrySet().iterator();while (it.hasNext()) {Map.EntryString, Object entry it.next();String key entry.getKey();String newKey entry.getKey();if (pre.endsWith(.)) {newMap.put(pre newKey, entry.getValue());} else if (StringUtils.isEmpty(pre)) {newMap.put(newKey, entry.getValue());} else {newMap.put(pre . newKey, entry.getValue());}}params.put(sort, clicknum);params.put(order, desc);PageUtils page tushuxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, tushuxinxi), params), params));return R.ok().put(data, page);}/*** 协同算法按用户购买推荐*/RequestMapping(/autoSort2)public R autoSort2(RequestParam MapString, Object params,TushuxinxiEntity tushuxinxi, HttpServletRequest request){String userId request.getSession().getAttribute(userId).toString();String goodtypeColumn tushufenlei;ListOrdersEntity orders ordersService.selectList(new EntityWrapperOrdersEntity().eq(userid, userId).eq(tablename, tushuxinxi).orderBy(addtime, false));ListString goodtypes new ArrayListString();Integer limit params.get(limit)null?10:Integer.parseInt(params.get(limit).toString());ListTushuxinxiEntity tushuxinxiList new ArrayListTushuxinxiEntity();//去重ListOrdersEntity ordersDist new ArrayListOrdersEntity();for(OrdersEntity o1 : orders) {boolean addFlag true;for(OrdersEntity o2 : ordersDist) {if(o1.getGoodid()o2.getGoodid()) {addFlag false;break;}}if(addFlag) ordersDist.add(o1);}if(ordersDist!null ordersDist.size()0) {for(OrdersEntity o : ordersDist) {tushuxinxiList.addAll(tushuxinxiService.selectList(new EntityWrapperTushuxinxiEntity().eq(goodtypeColumn, o.getGoodtype())));}}EntityWrapperTushuxinxiEntity ew new EntityWrapperTushuxinxiEntity();params.put(sort, id);params.put(order, desc);PageUtils page tushuxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, tushuxinxi), params), params));ListTushuxinxiEntity pageList (ListTushuxinxiEntity)page.getList();if(tushuxinxiList.size()limit) {int toAddNum (limit-tushuxinxiList.size())pageList.size()?(limit-tushuxinxiList.size()):pageList.size();for(TushuxinxiEntity o1 : pageList) {boolean addFlag true;for(TushuxinxiEntity o2 : tushuxinxiList) {if(o1.getId().intValue()o2.getId().intValue()) {addFlag false;break;}}if(addFlag) {tushuxinxiList.add(o1);if(--toAddNum0) break;} }}page.setList(tushuxinxiList);return R.ok().put(data, page);}/*** 按值统计*/RequestMapping(/value/{xColumnName}/{yColumnName})public R value(PathVariable(yColumnName) String yColumnName, PathVariable(xColumnName) String xColumnName,HttpServletRequest request) {MapString, Object params new HashMapString, Object();params.put(xColumn, xColumnName);params.put(yColumn, yColumnName);EntityWrapperTushuxinxiEntity ew new EntityWrapperTushuxinxiEntity();ListMapString, Object result tushuxinxiService.selectValue(params, ew);SimpleDateFormat sdf new SimpleDateFormat(yyyy-MM-dd);for(MapString, Object m : result) {for(String k : m.keySet()) {if(m.get(k) instanceof Date) {m.put(k, sdf.format((Date)m.get(k)));}}}return R.ok().put(data, result);}/*** 按值统计时间统计类型*/RequestMapping(/value/{xColumnName}/{yColumnName}/{timeStatType})public R valueDay(PathVariable(yColumnName) String yColumnName, PathVariable(xColumnName) String xColumnName, PathVariable(timeStatType) String timeStatType,HttpServletRequest request) {MapString, Object params new HashMapString, Object();params.put(xColumn, xColumnName);params.put(yColumn, yColumnName);params.put(timeStatType, timeStatType);EntityWrapperTushuxinxiEntity ew new EntityWrapperTushuxinxiEntity();ListMapString, Object result tushuxinxiService.selectTimeStatValue(params, ew);SimpleDateFormat sdf new SimpleDateFormat(yyyy-MM-dd);for(MapString, Object m : result) {for(String k : m.keySet()) {if(m.get(k) instanceof Date) {m.put(k, sdf.format((Date)m.get(k)));}}}return R.ok().put(data, result);}/*** 分组统计*/RequestMapping(/group/{columnName})public R group(PathVariable(columnName) String columnName,HttpServletRequest request) {MapString, Object params new HashMapString, Object();params.put(column, columnName);EntityWrapperTushuxinxiEntity ew new EntityWrapperTushuxinxiEntity();ListMapString, Object result tushuxinxiService.selectGroup(params, ew);SimpleDateFormat sdf new SimpleDateFormat(yyyy-MM-dd);for(MapString, Object m : result) {for(String k : m.keySet()) {if(m.get(k) instanceof Date) {m.put(k, sdf.format((Date)m.get(k)));}}}return R.ok().put(data, result);}}
http://www.pierceye.com/news/488476/

相关文章:

  • 如何免费做一个网站攻略常州网站推广软件
  • 手机网站建站 服务器网站名称收录
  • 网站根 html网站建设 永灿 竞争
  • 网站建设费合同天津网站建设公司
  • 自己怎么做优惠卷网站购物网站建设需求模板下载
  • 上海智能网站建设公司可以做网站头像的图片
  • 怎样给网站做备案网站建设前端工程师岗位职责
  • 福州网站外包网站搭建设计合同
  • 有没有做专利导航运营的网站网站制作代理
  • 即墨网站建设地址邢台织梦模板建站
  • 贵阳网站建设运营网站的扁平化设计理念
  • 商务网站建设与维护(专21春)网站建设入门书籍
  • 免费室内设计素材网站wordpress 前台不显示内容
  • 企业应该找什么样的网站建设公司jz做网站
  • 钦州住房和城乡建设局网站软考考试科目有哪些
  • 查公司的网站有哪些wordpress连接数据库出错
  • 找别人做网站需要什么信息湛江制作公司网站
  • 最简单的静态网站wordpress网络公司主题
  • 做外贸要做什么网站企业服务平台app下载
  • .net做网站开发吗企业网站维护合同
  • 有哪些做网站公司网站做关键词库的作用
  • 安全狗网站白名单指什么申请制作网站
  • 如何做高端网站建设香水推广软文
  • 移动网站建设优势优化设计电子课本下载
  • 做外贸英语要什么网站免费做app网站建设
  • 网站统计系统 怎么做遵义公共资源交易中心官网
  • 做外贸的有哪些网站廊坊网站建设公司哪个好
  • 深圳宝安网站建设学习网html5网页代码大全
  • 网站建设介绍会发言稿wordpress 工具栏
  • 重庆网站推广计划2017主流网站风格