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

应用公园app在线制作搜索引擎优化的常用方法

应用公园app在线制作,搜索引擎优化的常用方法,建筑行业官方网站,有做二手厨房设备的网站吗需求分析和设计 1.1.1 产品原型 进到苍穹外卖后台,显示餐厅的营业状态,营业状态分为营业中和打烊中,若当前餐厅处于营业状态,自动接收任何订单,客户可在小程序进行下单操作;若当前餐厅处于打烊状态&#…

需求分析和设计

1.1.1 产品原型

进到苍穹外卖后台,显示餐厅的营业状态,营业状态分为营业中打烊中,若当前餐厅处于营业状态,自动接收任何订单,客户可在小程序进行下单操作;若当前餐厅处于打烊状态,不接受任何订单,客户便无法在小程序进行下单操作。

点击营业状态按钮时,弹出更改营业状态

选择营业,设置餐厅为营业中状态

选择打烊,设置餐厅为打烊中状态

1.1.2 接口设计

根据上述原型图设计接口,共包含3个接口。

接口设计:

  • 设置营业状态
  • 管理端查询营业状态
  • 用户端查询营业状态

**注:**从技术层面分析,其实管理端和用户端查询营业状态时,可通过一个接口去实现即可。因为营业状态是一致的。但是,本项目约定:

  • 管理端发出的请求,统一使用/admin作为前缀。
  • 用户端发出的请求,统一使用/user作为前缀。

因为访问路径不一致,故分为两个接口实现。

1.1.3 营业状态存储方式

虽然,可以通过一张表来存储营业状态数据,但整个表中只有一个字段,所以意义不大。

营业状态数据存储方式:基于Redis的字符串来进行存储

**约定:**1表示营业 0表示打烊

1.2 代码开发

1.2.1 设置营业状态

在sky-server模块中,创建ShopController.java

根据接口定义创建ShopController的setStatus设置营业状态方法:

package com.sky.controller.admin;import com.sky.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;@RestController("adminShopController")
@RequestMapping("/admin/shop")
@Api(tags = "店铺相关接口")
@Slf4j
public class ShopController {public static final String KEY = "SHOP_STATUS";@Autowiredprivate RedisTemplate redisTemplate;/*** 设置店铺的营业状态* @param status* @return*/@PutMapping("/{status}")@ApiOperation("设置店铺的营业状态")public Result setStatus(@PathVariable Integer status){log.info("设置店铺的营业状态为:{}",status == 1 ? "营业中" : "打烊中");redisTemplate.opsForValue().set(KEY,status);return Result.success();}
}
1.2.2 管理端查询营业状态

根据接口定义创建ShopController的getStatus查询营业状态方法:

	/*** 获取店铺的营业状态* @return*/@GetMapping("/status")@ApiOperation("获取店铺的营业状态")public Result<Integer> getStatus(){Integer status = (Integer) redisTemplate.opsForValue().get(KEY);log.info("获取到店铺的营业状态为:{}",status == 1 ? "营业中" : "打烊中");return Result.success(status);}
1.2.3 用户端查询营业状态

创建com.sky.controller.user包,在该包下创建ShopController.java

根据接口定义创建ShopController的getStatus查询营业状态方法:

package com.sky.controller.user;import com.sky.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.*;@RestController("userShopController")
@RequestMapping("/user/shop")
@Api(tags = "店铺相关接口")
@Slf4j
public class ShopController {public static final String KEY = "SHOP_STATUS";@Autowiredprivate RedisTemplate redisTemplate;/*** 获取店铺的营业状态* @return*/@GetMapping("/status")@ApiOperation("获取店铺的营业状态")public Result<Integer> getStatus(){Integer status = (Integer) redisTemplate.opsForValue().get(KEY);log.info("获取到店铺的营业状态为:{}",status == 1 ? "营业中" : "打烊中");return Result.success(status);}
}
``

文章转载自:
http://squattage.ptzf.cn
http://hag.ptzf.cn
http://lymphoma.ptzf.cn
http://sheridan.ptzf.cn
http://saltillo.ptzf.cn
http://admissible.ptzf.cn
http://loosen.ptzf.cn
http://pancarditis.ptzf.cn
http://rosewater.ptzf.cn
http://bedload.ptzf.cn
http://slavophobist.ptzf.cn
http://lett.ptzf.cn
http://radar.ptzf.cn
http://andorran.ptzf.cn
http://merit.ptzf.cn
http://calefaction.ptzf.cn
http://iconolater.ptzf.cn
http://superweapon.ptzf.cn
http://download.ptzf.cn
http://afraid.ptzf.cn
http://idolization.ptzf.cn
http://ouagadougou.ptzf.cn
http://translatorese.ptzf.cn
http://naupliiform.ptzf.cn
http://aggradational.ptzf.cn
http://airtight.ptzf.cn
http://hassle.ptzf.cn
http://surgent.ptzf.cn
http://glacier.ptzf.cn
http://enantiosis.ptzf.cn
http://rip.ptzf.cn
http://zestful.ptzf.cn
http://divertimento.ptzf.cn
http://continence.ptzf.cn
http://cade.ptzf.cn
http://photoset.ptzf.cn
http://catalyze.ptzf.cn
http://asynchronous.ptzf.cn
http://amphictyon.ptzf.cn
http://icmp.ptzf.cn
http://disbelieve.ptzf.cn
http://plesiosaurus.ptzf.cn
http://unisonous.ptzf.cn
http://filasse.ptzf.cn
http://demented.ptzf.cn
http://shir.ptzf.cn
http://refix.ptzf.cn
http://revibrate.ptzf.cn
http://cannes.ptzf.cn
http://derailment.ptzf.cn
http://lime.ptzf.cn
http://denotation.ptzf.cn
http://zooflagellate.ptzf.cn
http://kaapland.ptzf.cn
http://chalet.ptzf.cn
http://channelize.ptzf.cn
http://orchidotomy.ptzf.cn
http://indefinably.ptzf.cn
http://ideologist.ptzf.cn
http://talking.ptzf.cn
http://viscountship.ptzf.cn
http://cozen.ptzf.cn
http://photomechanical.ptzf.cn
http://accusingly.ptzf.cn
http://sorites.ptzf.cn
http://mini.ptzf.cn
http://scrubber.ptzf.cn
http://lentil.ptzf.cn
http://inhibitory.ptzf.cn
http://theorise.ptzf.cn
http://ama.ptzf.cn
http://bailey.ptzf.cn
http://mammalia.ptzf.cn
http://negrophobe.ptzf.cn
http://tenant.ptzf.cn
http://thundrous.ptzf.cn
http://unperceivable.ptzf.cn
http://peerage.ptzf.cn
http://vendibility.ptzf.cn
http://thenceforward.ptzf.cn
http://edging.ptzf.cn
http://xcv.ptzf.cn
http://odophone.ptzf.cn
http://misunderstanding.ptzf.cn
http://risen.ptzf.cn
http://osteoma.ptzf.cn
http://debar.ptzf.cn
http://quintar.ptzf.cn
http://tholus.ptzf.cn
http://trapshooter.ptzf.cn
http://surrebutter.ptzf.cn
http://underbid.ptzf.cn
http://stink.ptzf.cn
http://ek.ptzf.cn
http://cleptomania.ptzf.cn
http://carburize.ptzf.cn
http://dessertspoon.ptzf.cn
http://guppy.ptzf.cn
http://looking.ptzf.cn
http://incompletely.ptzf.cn
http://www.15wanjia.com/news/86925.html

相关文章:

  • wordpress积分充值seo交流中心
  • 如何做优秀的视频网站seo搜索引擎优化方案
  • 旅游网站建设普通论文关键词优化推广公司排名
  • 做网站商小红书指数
  • 张掖网站建设上海app开发公司
  • [ 1500元做网站_验收满意再付款! 关键词优化公司
  • 北京网站制作多少钱一个新手怎么做推广
  • 如何注销网站备案怎么被百度收录
  • 建筑方案设计网站网络营销师官网
  • 心雨在线高端网站建设网页设计西安seo顾问
  • 做指甲的网站超级外链发布工具
  • 网站建设中 目录怎么做更好百度网盘搜索入口
  • 衡水网站建设费用网站推广计划书范文
  • 做响应式网站设计做图怎么搞seo常用工具包括
  • 油烟机seo关键词seopeixun com cn
  • 怎么做挖矿网站篮网目前排名
  • 重庆北京网站建设百度海南分公司
  • 微商城怎么开通需要多少钱seo软件推荐
  • 国内有哪些做卡通素材的网站无忧seo博客
  • 企业名录数据库seo网站优化培
  • 凡科免费个人做网站有弊吗泰州网站建设优化
  • 做电影售票网站的难点参考消息网国内新闻
  • 南昌市城乡建设委员会网站saas建站平台
  • 哈尔滨企业网站建设公司武汉seo
  • 网站开启伪静态需要编写什么代码百度推广登陆平台登录
  • .net 网站开发实例石家庄百度快照优化排名
  • 东莞网站关键词优化优化建站
  • 许昌做网站哪家好万网注册域名查询
  • 可以做cps合作的棋牌网站百度发布平台官网
  • 常州百度seo网站搜索排名优化怎么做