一 表结构

1 | -- 类目 |
二 VM
MyPassword centos7 +VirtualBox导入
三 日志
1 | (SpringRunner.class) |
1 | //使用 slf4J 简化方法 |
1 | # application.yml. 不常用 |
logback-spring.xml
1 |
|
#第4章 买家端类目
买家端类目模块的开发,按照dao->service->api的顺序开发。贯穿单元测试。
1 |
|
@DynamicUpdate 动态的更新时间
Springboot-jpa Table ‘sell.hibernate_sequence’ doesn’t exist
1 | @GeneratedValue(strategy = GenerationType.IDENTITY) |
1 | spring: |
1 | 1 mysql地址 写VM虚拟机里面的。密码也要是Linux的 |
1 |
|

生成serviceTest的方法
Bug





第五章 买家商品
1 | package com.imooc.demo.controller; |

前端接口

查询ip地址的ip地址

更改nginx.conf配置成本地ip地址

设置域名


第六章 买家订单
DTO



异常处理
1
2
3
4
5
6
7
8
9
10
11
12
public enum ResultEnum {
PRODUCT_NOT_EXIST(10, "商品不存在"),
;
private Integer code;
private String message;
ResultEnum(Integer code, String message) {
this.code = code;
this.message = message;
}
}1
2
3
4
5
6
7
8public class SellException extends RuntimeException {
private Integer code;
public SellException(ResultEnum resultEnum) {
super(resultEnum.getMessage());
this.code = resultEnum.getCode();
}
}
Navigate 操作数据库要保存 手动保存
mysql AUTO_INCREMENT 设置主键自增
detail_idint(32) NOT NULL AUTO_INCREMENT,注意在navicat中表已经建立了 就无法使用
主键自增 Bug
1
The database returned no natively generated identity value; nested exception is org.hibernate.HibernateException: The database returned no natively generated identity value


1 |
|
1 |
|
1 |
|
1 | //减库存 |
1 | public class OrderServiceImplTest { |
查询订单
1 |
|
1 |
|
1 | //取消订单 |
1 | //加库存 |
1 |
|
1 |
|
GSON
1 | JSON作为一个轻量级的数据格式比xml效率要高,XML需要很多的标签,这无疑占据了网络流量。 |
1 | 从上面的两种格式可以看出对象格式和数组对象格式唯一的不同则是在对象格式的基础上加上了[],再来看具体的结构,可以看出都是以键值对的形式出现的,中间以英文状态下的逗号(,)分隔。 |
1 | public class BuyerOrderController { |
1 |
|
1 | //查询订单列表 |
1 | ("/detail") |
1 | //查询订单详情 |
第七章 微信
1 手工 方式(JSAPI)支付

https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=4_4
natapp



该网址 http://ywy9n8.natappfree.cc 就是可以全球访问的网址,可以发给您的小伙伴试试 :)


1 | <dependency> |





y1047629166@163.com. yhp836143 —–微信公众号小程序
操作步骤
https://blog.51cto.com/zero01/2117892. 五角星大佬博客
第三方 SDK
前端项目位置 centos7.3

Vim index.JS



Charles sde你用。使用。手机代理

手机 连接WI-FI。 查看ip ran hou ping 一下。设置代理 手动ifconfig


–