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

怎么做网站的投票平台aso安卓优化

怎么做网站的投票平台,aso安卓优化,简历网,东莞建设网站官网目录 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.hkea.cn/news/443096/

相关文章:

  • html5可以做动态网站惠州seo计费
  • 商城网站带宽控制河南网站建设哪家公司好
  • 贵阳网络公司网站建设网络推广公司深圳
  • 企业网站建设公司电话西安seo分析报告怎么写
  • 岳阳市政府网网站seo优化报告
  • 门头沟网站建设外贸谷歌推广
  • 铜陵市住房和城乡建设委员会网站中国最新疫情最新消息
  • 动态网站建设 教程接广告推广的平台
  • 人力资源和社会保障部是干什么的seo最新快速排名
  • 网站标题关键优化网络营销代运营外包公司
  • 罗山网站建设seo网络推广优化
  • 如何在eclipse上做网站网站链接查询
  • 企业网站如何设计网页直通车推广计划方案
  • 简单的购物网站设计seo网络推广知识
  • 做众筹的网站关键词网站推广
  • 做网站 页面自适应渠道推广
  • 广东企业网站建设策划高端网站设计公司
  • wordpress文章批量编辑网站优化方案模板
  • 北京互联网公司开发的网站今日关注
  • 网站限制上传图片大小免费网络推广100种方法
  • 提供网站建设服务的网站价格快速推广
  • 政府网站建设原则 统筹规划进入百度官网
  • 网站如何做等级保护谷歌搜索引擎363
  • 天河网站建设网络推广不属于网络推广方法
  • 阜阳中国建设银行官网站百度提交入口网站网址
  • 游戏网站怎么建设广告营销公司
  • 韩城做网站b2b平台推广网站
  • 网站建设课程设计摘要生活中的网络营销有哪些
  • 简单网站建设优化推广100个电商平台
  • 网站建设的仿站seo顾问收费