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

小红书推广的优势北京优化网站公司

小红书推广的优势,北京优化网站公司,体育西网站开发价格,集团公司网页设计目录 上下架功能提供后台宠物列表实现 前台展示前台宠物列表和详情展示店铺展示 领养分析前台后端PetControllerPetServiceImpl 订单需求分析可能产生订单的模块订单模块额外功能 订单设计表设计流程设计 集成基础代码收购订单创建订单前端后端 上下架功能提供 后台宠物列表实…

目录

      • 上下架功能提供
        • 后台宠物列表实现
      • 前台展示
        • 前台宠物列表和详情展示
        • 店铺展示
      • 领养
        • 分析
        • 前台
        • 后端
          • PetController
          • PetServiceImpl
      • 订单
        • 需求分析
          • 可能产生订单的模块
          • 订单模块额外功能
        • 订单设计
          • 表设计
          • 流程设计
        • 集成基础代码
        • 收购订单
          • 创建订单
            • 前端
            • 后端

上下架功能提供

后台宠物列表实现

后端:拷贝product模块,替换大小写字母,调整字段名,时间显示格式等,
后台:拷贝资源中的pet.vue,配置路由,调整变量名,

前台展示

前台宠物列表和详情展示

前台拷贝product.html为pet.html,替换大小写字母,首页跳转过来,pet能跳转其他,
前台拷贝productDetail.html为petDetail.html,替换大小写字母,改预定须知为领养须知,
修改后端loadById查详情sql,前端取店名展示

    <resultMap id="petMap" type="Pet"><id property="id" column="id"></id><result property="name" column="name"></result><result property="resources" column="resources"></result><result property="saleprice" column="saleprice"></result><result property="costprice" column="costprice"></result><result property="offsaletime" column="offsaletime"></result><result property="onsaletime" column="onsaletime"></result><result property="state" column="state"></result><result property="createtime" column="createtime"></result><!--private PetDetail detail = new PetDetail();--><association property="detail" javaType="PetDetail"><id property="id" column="pdid"></id><result property="intro" column="intro"></result><result property="adoptNotice" column="adoptNotice"></result></association><association property="shop" javaType="Shop"><id property="id" column="sid"></id><result property="name" column="sname"></result></association></resultMap><select id="loadById" parameterType="long" resultMap="petMap">selectp.*,pd.id pdid,pd.intro,pd.adoptNotice,s.id sid,s.name snamefrom t_pet pLEFT JOIN t_pet_detail pd on p.id = pd.pet_idLEFT join t_shop s on p.shop_id = s.idwhere p.id = #{id}</select>
                <!--名称--><div class="tb-detail-hd"><h1>【{{pet.shop.name}}】 {{pet.name}}</h1></div>

店铺展示

petDetail页面的大包装右边展示店铺名称
通过:href="shopUrl"携带shopid跳往shop页面

<li class="qc last"><a :href="shopUrl" style="color: green">{{pet.shop.name}}</a></li>
shopUrl:"",
mounted(){let petId = parseUrlParams2Obj(location.href).petId;this.$http.get("/pet/"+petId).then(result=>{this.pet = result.data;if(this.pet.resources){this.resources = this.pet.resources.split(',');}this.shopUrl = "shop.html?shopId="+this.pet.shop.id;}).catch(result=>{console.log(result);alert("系统错误");})}

拷贝success页面为shop页面,替换引入路径,修改标题,引入vue和Axios,
写个div把body以内全包起来,发请求拿shop数据过来展示,

 <script type="text/javascript">new Vue({el:"#myShop",data:{shop:{}},methods:{getShop(){let shopId = parseUrlParams2Obj(location.href).shopId;this.$http.get("/shop/"+shopId).then(result=>{this.shop = result.data;$("#myTitle").html(this.shop.name);//自己去yyy}).catch(result=>{console.log(result);alert("系统错误");})}},mounted(){this.getShop();}})</script>

领养

分析

领养即购买,立即领养进入领养流程,购物车可通过加一个表实现(包含userid和宠物信息),

点击立即购买后流程:
传入宠物信息,修改为下架,绑定购买者userid,生成订单和支付(这两个放到后面)

前台

petDetail页面把立即购买包进div里,
立即购买超链接绑定事件,发请求到后端进入处理流程,(扩展:处理完后进入个人中心-我的领养 展示宠物表中userId是自己的)

<a id="LikBuy" title="点此按钮到下一步确认购买信息" href="javascript:;" @click="adopt">立即购买</a>
		adopt(){let petId = this.pet.id;let flag = window.confirm("你确认领养吗?")if(flag){this.$http.get("/pet/adopt/"+petId).then(result=>{result = result.data;if(result.success){alert("领养成功!");//本来应该跳转到个人中心,查案个人领养宠物信息//这里我们就跳转到首页location.href="index.html";}else{alert(result.message);}}).catch(result=>{alert("系统错误");})}//location.href="adoptOrder.html?petId="+this.pet.id;}

后端

PetController
    /*** 领养宠物*/@GetMapping("/adopt/{petId}")public AjaxResult adopt(@PathVariable("petId") Long petId, HttpServletRequest request){try {Logininfo loginIn = LoginContext.getLoginIn(request);petService.adopt(petId,loginIn.getId());return AjaxResult.me();} catch (Exception e) {e.printStackTrace();return AjaxResult.me().setMessage("领养失败!"+e.getMessage());}}
PetServiceImpl
    @Overridepublic void adopt(Long petId, Long loginInfoId) {//1.修改状态  下架Pet pet = petMapper.loadById(petId);pet.setState(0);pet.setOffsaletime(new Date());//2.绑定用户User user = userMapper.loadByloginInfoId(loginInfoId);pet.setUser(user);pet.setUser_id(user.getId());pet.setShop_id(pet.getShop().getId());//3.保存petMapper.update(pet);//@TODO 生成领养订单  + 支付System.out.println("领养成功!");}

订单

需求分析

可能产生订单的模块

1.宠物收购订单-店家给用户钱
垫付:用户立马就能获取到钱,员工定时报账。
余额支付:付款余额,用户可以提现。 平台相当于给了用户钱,店家用给平台钱。
银行转账:银行转账,店家财务依次给用户转账。
2.服务订单(多次消费)-用户给店家钱
3.领养订单(一次)-用户给店家钱
4.充值订单(一次)-用户充值平台,用户消费后,平台要给店铺打钱。
5.商品订单(多次)-用户给店家钱

特别说明一下:
大平台一般钱先到平台,用户确认后,平台才划账到店家。如果用户长时间不确认,自动确认。
我们小平台直接到店家,我们没有支付牌照。

每一类型的订单都要有独立的表来存

订单模块额外功能

1.系统报表、财务报表等
2.商家的账单下载(easyPOI的导入与导出)
3.系统对账服务(退款,支付异常等)
4.30分钟未支付取消订单(定时器)

订单设计

表设计

九张: 用户地址 订单地址 收购订单 领养订单 充值订单 商品订单 商品订单详情 服务订单 服务订单详情

我们需要关心的五张表:
t_user_address:用户地址,
t_order_address:订单地址,下单时的用户地址,绑定某个订单
t_order_pet_acquisition:收购订单,一次性,不需要存详情
t_order_adopt:领养订单,一次性,不需要存详情
t_order_product:服务订单,可多次消费,需要存详情
在这里插入图片描述

在这里插入图片描述

流程设计

用户付钱给商家,两个定时任务
在这里插入图片描述
商家付款给用户(收购订单)
在这里插入图片描述
工作人员上门,应该带一个手提电脑,处理完并下单。以后需要商家版App,可以在上面操作,不需要手提电脑。

集成基础代码

拷贝资源

收购订单

创建订单
前端

待处理消息处理窗口增加支付选项下拉框

后端

SearchMasterMsgController

    /*** 处理消息*/@PutMapping("/handle")public AjaxResult handle(@RequestBody Pet pet,HttpServletRequest request){try {Logininfo loginIn = LoginContext.getLoginIn(request);seachMasterMsgService.handle(pet,loginIn.getId());return AjaxResult.me();} catch (Exception e) {e.printStackTrace();return AjaxResult.me().setMessage("处理失败!"+e.getMessage());}}

SearchMasterMsgServiceImpl

	/*** 处理消息*/@Overridepublic void handle(Pet pet,Long loginInfoId) {//1.改状态  --已处理searchMasterMsgMapper.updateStateForProcessed(pet.getSearch_master_msg_id());//2.生成宠物基本信息petMapper.save(pet);//3.宠物详情PetDetail detail = pet.getDetail();if(detail != null){detail.setPet_id(pet.getId());petDetailMapper.save(detail);}//4.生成订单Employee employee = employeeMapper.loadByLoginInfoId(loginInfoId);SearchMasterMsg searchMasterMsg = searchMasterMsgMapper.loadById(pet.getSearch_master_msg_id());PetAcquisitionOrder order = pet2order(pet, searchMasterMsg, employee.getId());petAcquisitionOrderMapper.save(order);//5.生成支付@TODO}private PetAcquisitionOrder pet2order(Pet pet, SearchMasterMsg adopt,Long employeeId) {PetAcquisitionOrder order = new PetAcquisitionOrder();order.setDigest("[摘要]对"+pet.getName()+"收购订单!");order.setState(0);//待支付order.setPrice(pet.getCostprice());order.setAddress(adopt.getAddress());String orderSn = CodeGenerateUtils.generateOrderSn(adopt.getUser_id());order.setOrderSn(orderSn);order.setPet_id(pet.getId());order.setUser_id(adopt.getUser_id());order.setPaytype(0);order.setShop_id(pet.getShop_id());order.setEmp_id(employeeId);return order;}

文章转载自:
http://brigade.xnLj.cn
http://yhwh.xnLj.cn
http://vivaciously.xnLj.cn
http://hopping.xnLj.cn
http://notability.xnLj.cn
http://kneepad.xnLj.cn
http://intraday.xnLj.cn
http://truckdriver.xnLj.cn
http://quatercentenary.xnLj.cn
http://cantlet.xnLj.cn
http://shoeshine.xnLj.cn
http://granadilla.xnLj.cn
http://cultipacker.xnLj.cn
http://sexologist.xnLj.cn
http://quartermaster.xnLj.cn
http://iteration.xnLj.cn
http://brisk.xnLj.cn
http://continuous.xnLj.cn
http://tenderize.xnLj.cn
http://birdturd.xnLj.cn
http://volcanologist.xnLj.cn
http://piefort.xnLj.cn
http://meandering.xnLj.cn
http://imagism.xnLj.cn
http://insanitary.xnLj.cn
http://manavelins.xnLj.cn
http://triradiate.xnLj.cn
http://earthmover.xnLj.cn
http://roumanian.xnLj.cn
http://dropkick.xnLj.cn
http://paperhanging.xnLj.cn
http://whetter.xnLj.cn
http://inflective.xnLj.cn
http://zooful.xnLj.cn
http://sciaenid.xnLj.cn
http://winter.xnLj.cn
http://humanization.xnLj.cn
http://signatureless.xnLj.cn
http://congoese.xnLj.cn
http://alert.xnLj.cn
http://precedency.xnLj.cn
http://nucleometer.xnLj.cn
http://beheld.xnLj.cn
http://antibacchius.xnLj.cn
http://havre.xnLj.cn
http://cowshed.xnLj.cn
http://tsutsumu.xnLj.cn
http://confirm.xnLj.cn
http://jokari.xnLj.cn
http://fluidounce.xnLj.cn
http://defiantly.xnLj.cn
http://chicquest.xnLj.cn
http://homosphere.xnLj.cn
http://haft.xnLj.cn
http://discontinuous.xnLj.cn
http://banditti.xnLj.cn
http://hemp.xnLj.cn
http://chemisorb.xnLj.cn
http://retardatory.xnLj.cn
http://titrate.xnLj.cn
http://kowtow.xnLj.cn
http://hematocrit.xnLj.cn
http://rheumatoid.xnLj.cn
http://oneirology.xnLj.cn
http://calathiform.xnLj.cn
http://tappit.xnLj.cn
http://disuse.xnLj.cn
http://romans.xnLj.cn
http://puseyism.xnLj.cn
http://transmigration.xnLj.cn
http://educt.xnLj.cn
http://siff.xnLj.cn
http://styrolene.xnLj.cn
http://arride.xnLj.cn
http://bonanza.xnLj.cn
http://suzuribako.xnLj.cn
http://seabird.xnLj.cn
http://locution.xnLj.cn
http://dholl.xnLj.cn
http://restrict.xnLj.cn
http://guggenheim.xnLj.cn
http://kayf.xnLj.cn
http://aparejo.xnLj.cn
http://TRUE.xnLj.cn
http://loess.xnLj.cn
http://atraumatically.xnLj.cn
http://rhamnose.xnLj.cn
http://lifelong.xnLj.cn
http://carling.xnLj.cn
http://acardiac.xnLj.cn
http://jansenism.xnLj.cn
http://aspergillum.xnLj.cn
http://flagger.xnLj.cn
http://pyrrhonic.xnLj.cn
http://laciniate.xnLj.cn
http://skelter.xnLj.cn
http://geanticlinal.xnLj.cn
http://protostar.xnLj.cn
http://vapour.xnLj.cn
http://hyponasty.xnLj.cn
http://www.15wanjia.com/news/74859.html

相关文章:

  • 手机网站设计神器刷关键词排名seo软件
  • 商业空间设计主要有以下几点专业seo外包
  • 做视频网站空间要多大北京seo排名优化网站
  • 成都网站建设私单谷歌搜索引擎免费入口
  • 安徽安庆疫情最新消息优化游戏性能的软件
  • 小勐拉网站建设seo优化网络推广
  • 为什么做的网站要续费小程序怎么开发自己的小程序
  • 福田网站建设团队百度手机版网址
  • 安康做网站的公司电话关键词首页排名优化平台
  • 在网站让照片滚动怎么做近期国内新闻热点事件
  • 做网站价格多少百度热搜电视剧
  • 湖北建设企业网站价格seo课程心得体会
  • 镇江网站建设价位搜索引擎分类
  • wordpress做的网站效果6网络营销推广方法十种
  • 沂源网站建设重庆百度快照优化
  • 网题 做问卷的网站seo顾问服务咨询
  • 自己做聊天背景网站公司网站建站要多少钱
  • 提升网站的访问速度品牌营销策划公司哪家好
  • wordpress頂部公告插件百度关键词搜索引擎排名优化
  • 男女做a视频网站智能网站推广优化
  • 爱墙 网站怎么做网站优化要多少钱
  • 一级a做片性视频网站企业邮箱入口
  • 做网站成功网站seo排名优化
  • 深圳最新招聘整站快速排名优化
  • 做电子委托在那个网站成都最好的seo外包
  • 网站建设需求分析表怎么写免费网络推广
  • 有免费的服务器吗seo排名优化首页
  • 重庆城乡建设委员会的网站手机建站
  • 德阳建设公司网站免费seo技术教程
  • 网络上做假网站做物流推广计划书范文