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

武汉网站制作与建设免费seo软件推荐

武汉网站制作与建设,免费seo软件推荐,福田做商城网站建设哪家公司靠谱,做一建真题的网站目录 1:交友项目【通用设置】 1.1:查询通用设置 1.1.1:接口地址 1.1.2:流程分析 1.1.3:代码实现 1.2:设置陌生人问题 1.2.1:接口地址 1.2.2:流程分析 1.2.3:代码…

目录

1:交友项目【通用设置】

1.1:查询通用设置

1.1.1:接口地址

1.1.2:流程分析

1.1.3:代码实现

1.2:设置陌生人问题

1.2.1:接口地址

1.2.2:流程分析

1.2.3:代码实现

1.3:通知设置

1.3.1:接口地址

1.3.2:流程分析

1.3.3:代码实现


1:交友项目【通用设置】

1.1:查询通用设置

 

 

 

1.1.1:接口地址

接口地址:http://192.168.136.160:3000/project/19/interface/api/268

 

1.1.2:流程分析

根据定义的文档接口,请求头需要接收,token信息,响应ResponseEntity<SettingVo>,创建SettingVo进行封装数据,

根据需求需要查询tb_question和tb_settings表中的信息,进行汇总到Vo中。

1.1.3:代码实现

 与前端交互的app-server模块

controller层实现

/*** @Author 爱吃豆的土豆、* @Date 2023/4/4 11:29*/
@RequestMapping("/users")
@RestController
public class UserController {@Resourceprivate UserService userService;@GetMapping("/settings")public ResponseEntity findUsersettings(){SettingsVo usersettings = userService.findUsersettings(UserHolder.getUserId());usersettings.setPhone(UserHolder.getMobile());return ResponseEntity.ok(usersettings);}
}

service层实现

   public SettingsVo findUsersettings(Long userId) {return userApi.findUsersettings(userId);}

统一封装接口的模块

SettingsVo findUsersettings(Long userId);

提供者模块(提供相关接口的实现)

@Overridepublic SettingsVo findUsersettings(Long userId) {Settings setting = setMapper.findSetting(userId);SettingsVo settingsVo = new SettingsVo();Long numberLong = new Long(userId);Integer id = numberLong.intValue();settingsVo.setId(id);if (setting.getGonggaoNotification() == 1){settingsVo.setGonggaoNotification(true);}else {settingsVo.setGonggaoNotification(false);}if (setting.getLikeNotification() == 1){settingsVo.setLikeNotification(true);}else {settingsVo.setLikeNotification(false);}if (setting.getPinglunNotification() == 1){settingsVo.setPinglunNotification(true);}else {settingsVo.setPinglunNotification(false);}Question question = questionMapper.findQuestion(userId);settingsVo.setStrangerQuestion(question.getTxt());return settingsVo;}

1.2:设置陌生人问题

1.2.1:接口地址

接口地址:http://192.168.136.160:3000/project/19/interf

 

1.2.3:代码实现

 与前端交互的app-server模块

 

controller层实现

    @PostMapping("/questions")public ResponseEntity editquestion(@RequestBody Map content){userService.editquestion(String.valueOf(content.get("content")), UserHolder.getUserId());return ResponseEntity.ok(null);}

service层实现

    public void editquestion(String content, Long id) {userApi.editquestion(content,id);}

统一封装接口的模块

 

  void editquestion(String content, Long id);

提供者模块(提供相关接口的实现)

    @Overridepublic void editquestion(String content, Long id) {//查询对应的数据Question question = questionMapper.findQuestion(id);//重新设置question.setTxt(content);questionMapper.updateById(question);}

1.3:通知设置

1.3.1:接口地址

通知管理:对通知进行保存或者更新的操作

http://192.168.136.160:3000/project/19/interface/api/280

 

 

1.3.2:流程分析

 

1.3.3:代码实现

 与前端交互的app-server模块

controller层实现

    @PostMapping("/notifications/setting")public ResponseEntity editsetting(@RequestBody SettingsVo settingsVo){userService.editsetting(settingsVo,UserHolder.getUserId());return ResponseEntity.ok(null);}

service层实现

    public void editsetting(SettingsVo settingsVo, Long userId) {userApi.editsetting(settingsVo,userId);}

统一封装接口的模块

 void editsetting(SettingsVo settingsVo, Long userId);

提供者模块(提供相关接口的实现)

@Overridepublic void editsetting(SettingsVo settingsVo, Long userId) {Settings settings = setMapper.findSetting(userId);if (settingsVo.getGonggaoNotification()){settings.setGonggaoNotification(1);}else {settings.setGonggaoNotification(0);}if (settingsVo.getLikeNotification()){settings.setLikeNotification(1);}else {settings.setLikeNotification(0);}if (settingsVo.getPinglunNotification()){settings.setPinglunNotification(1);}else {settings.setPinglunNotification(0);}setMapper.updateById(settings);}

http://www.15wanjia.com/news/49510.html

相关文章:

  • 温州市城建设计院网站湖南专业seo推广
  • 创建网站的ip地址怎么获得seo工作怎么样
  • 恩施网站建设上海网站建设制作
  • 自己做网站自己做SEOseo网络推广教程
  • 郑州郑州网站建设河南做网站公司女教师网课入侵录屏冫
  • 网站建设与运营的预算方案常见网络营销推广方法
  • 博物馆布展设计公司谷歌seo服务
  • 政府建设网站推广公司产品
  • 网站对于一个企业的优势互联网运营自学课程
  • 加州网络公司排名济南seo怎么优化
  • 给别人做网站用做假酒验证合肥百度seo代理
  • 上海新闻官网seo优化方案
  • 山东省水利建设市场信用信息平台网站网站建设方案外包
  • 基金网站开发seo自动推广软件
  • 招聘网站如何做SEO国际新闻最新消息2022
  • 做网站 数据库14个seo小技巧
  • 大型网站服务器价格市场调研表模板
  • 旅游网站模板psd关键词搜索网站
  • 阿里做外贸的网站百度关键词排名联系方式
  • 开发流程和步骤北京seo营销公司
  • 涿州网站制作网络推广和网站推广
  • 农业畜牧网站开发seo网站优化方案书
  • 网站排名查询工具有哪些推广普通话心得体会
  • 网站欣赏与创建网页广告宣传费用一般多少
  • 关于做面包的网站游戏推广员怎么做
  • 网站建设技术服务清单销售管理系统
  • 龙岩资讯seo专业课程
  • 做360手机网站快速排名软件阿里指数查询官网入口
  • 建立微信商城网站培训班报名
  • 抖音网站开发网络营销推广合作