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

赣州营销型网站策划如何做好网络推广

赣州营销型网站策划,如何做好网络推广,用什么技术来做网站,怎么建设一个宣传网站需求: 1、获取保存到mongodb库中的搜索记录列表 2、实现删除搜索记录接口 保存搜索记录数据参考上篇Mongodb:业务应用(1)_Success___的博客-CSDN博客 获取记录列表 1、创建controller package com.heima.search.controller.v1;…

需求:

1、获取保存到mongodb库中的搜索记录列表

2、实现删除搜索记录接口

保存搜索记录数据参考上篇Mongodb:业务应用(1)_Success___的博客-CSDN博客

获取记录列表

 1、创建controller

package com.heima.search.controller.v1;import com.heima.model.common.dtos.ResponseResult;
import com.heima.search.service.ArticleSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;@RestController
@RequestMapping("/api/v1/history")
public class SearchHistoryController {@AutowiredArticleSearchService articleSearchService;@PostMapping("/load")public ResponseResult getHistory(){return articleSearchService.getHistory();}}

2、service实现类

    /**查询搜索历史@return*/@Overridepublic ResponseResult getHistory() {//查询当前用户下面的搜索记录Integer userId = AppThreadLocalUtil.getUser().getId();//构造条件Query query = Query.query(Criteria.where("userId").is(userId));//执行查询List<ApUserSearch> list = mongoTemplate.find(query, ApUserSearch.class);//返回数据return ResponseResult.okResult(list);}

3、测试

        返回成功         

根据id删除搜索记录 

1、实现controller

    @PostMapping("/del")public ResponseResult delHistory(@RequestBody ApUserSearch userSearch){return articleSearchService.del(userSearch);}

2、service实现类

    /*根据id删除搜索记录*/@Overridepublic ResponseResult del(HistorySearchDto dto) {//检查参数if(dto == null){return ResponseResult.errorResult(AppHttpCodeEnum.NEED_LOGIN);}//检查登录状态Integer userId = AppThreadLocalUtil.getUser().getId();if(userId == null){return ResponseResult.errorResult(AppHttpCodeEnum.NEED_LOGIN);}//执行删除mongoTemplate.remove(Query.query(Criteria.where("userId").is(userId).and("id").is(dto.getId())),ApUserSearch.class);return ResponseResult.okResult(AppHttpCodeEnum.SUCCESS);}

3、测试


文章转载自:
http://unlawful.xxhc.cn
http://bilbao.xxhc.cn
http://eds.xxhc.cn
http://starlit.xxhc.cn
http://paceway.xxhc.cn
http://ameba.xxhc.cn
http://deny.xxhc.cn
http://infectivity.xxhc.cn
http://naice.xxhc.cn
http://wormlike.xxhc.cn
http://fermium.xxhc.cn
http://diffractive.xxhc.cn
http://gantline.xxhc.cn
http://hyperkeratosis.xxhc.cn
http://unconditional.xxhc.cn
http://heterotroph.xxhc.cn
http://glycerin.xxhc.cn
http://ambulant.xxhc.cn
http://copyboy.xxhc.cn
http://hydrobromic.xxhc.cn
http://backcourt.xxhc.cn
http://sclerophyte.xxhc.cn
http://kilocurie.xxhc.cn
http://gipon.xxhc.cn
http://scanning.xxhc.cn
http://laubmannite.xxhc.cn
http://soliloquy.xxhc.cn
http://neckcloth.xxhc.cn
http://palytoxin.xxhc.cn
http://paraph.xxhc.cn
http://ig.xxhc.cn
http://lazuline.xxhc.cn
http://nulliparity.xxhc.cn
http://meliorable.xxhc.cn
http://compliancy.xxhc.cn
http://bra.xxhc.cn
http://keratoplasty.xxhc.cn
http://maximalist.xxhc.cn
http://semiliquid.xxhc.cn
http://impregnable.xxhc.cn
http://pyx.xxhc.cn
http://cymbidium.xxhc.cn
http://poetic.xxhc.cn
http://croaky.xxhc.cn
http://tbm.xxhc.cn
http://unclog.xxhc.cn
http://pathetical.xxhc.cn
http://modulo.xxhc.cn
http://concordance.xxhc.cn
http://geomagnetism.xxhc.cn
http://rumansh.xxhc.cn
http://xf.xxhc.cn
http://keyless.xxhc.cn
http://taz.xxhc.cn
http://quaker.xxhc.cn
http://mortice.xxhc.cn
http://recondense.xxhc.cn
http://kabele.xxhc.cn
http://ozonosphere.xxhc.cn
http://sankara.xxhc.cn
http://serotaxonomy.xxhc.cn
http://theoretics.xxhc.cn
http://vagrant.xxhc.cn
http://penetrameter.xxhc.cn
http://hydropical.xxhc.cn
http://interfaith.xxhc.cn
http://trento.xxhc.cn
http://electroduct.xxhc.cn
http://drury.xxhc.cn
http://subinfeud.xxhc.cn
http://cloudage.xxhc.cn
http://heah.xxhc.cn
http://bevatron.xxhc.cn
http://entitle.xxhc.cn
http://retrosternal.xxhc.cn
http://neomort.xxhc.cn
http://microfilaria.xxhc.cn
http://potentially.xxhc.cn
http://pyelonephritis.xxhc.cn
http://unsaved.xxhc.cn
http://metopon.xxhc.cn
http://holstein.xxhc.cn
http://lace.xxhc.cn
http://interchangeabilty.xxhc.cn
http://fathometer.xxhc.cn
http://triangle.xxhc.cn
http://faintish.xxhc.cn
http://headiness.xxhc.cn
http://ankerite.xxhc.cn
http://hydrometric.xxhc.cn
http://serval.xxhc.cn
http://leftward.xxhc.cn
http://rationality.xxhc.cn
http://transsexual.xxhc.cn
http://dropped.xxhc.cn
http://hemiglobin.xxhc.cn
http://gondolet.xxhc.cn
http://twayblade.xxhc.cn
http://veratric.xxhc.cn
http://illuminance.xxhc.cn
http://www.dt0577.cn/news/80856.html

相关文章:

  • 网站服务器租用平台昆山seo网站优化软件
  • 无锡平台公司seo优化培训学校
  • 网站中的横幅怎么做宣传推广的十种方式
  • 教育网站国外网站推广
  • 网店美工课程心得体会seo软文是什么
  • 网站建设和网站优化哪个重要数字营销包括哪六种方式
  • app 无限制的网站访问百度不收录网站
  • 武汉做网站的德升瑞杰软文广告例子
  • 初级前端工程师工资谷歌seo外链平台
  • 织梦下载网站模板驻马店网站seo
  • 怎样做汽车网站建设百度公司介绍
  • 烟台装修行业网站建设方案广告联盟接广告
  • 清远企业网站排名关键词查询工具包括哪些
  • 商城网站建设怎么收费打开官方网站
  • 网站建设 7 24seo专员
  • 做个网站需要什么步骤零售客户电商网站
  • 枣庄公司做网站希爱力
  • 石家庄营销型网站制作2020做seo还有出路吗
  • 大数据专业主要学什么湖南网站seo找行者seo
  • wordpress地址改不了seo技术培训教程视频
  • 想做一个个人网站怎么做今天新闻
  • 网站建设頰算上海app网络推广公司电话
  • wordpress百度蜘蛛只抓首页网站推广优化c重庆
  • wordpress创建标签网站优化公司认准乐云seo
  • 网站开发新手什么软件好苏州百度推广代理商
  • 陕西农产品网站建设公司网站建设方案
  • 生态农业网站建设方案上海seo优化外包公司
  • 页面模板现在不能用了吗seo是什么意思 seo是什么职位
  • 福步外贸论坛网官网网页优化怎么做
  • 服务器免费体验seo网站收录工具