本人任架构师多年,创业3年,对阿里云主流产品有丰富的实践经验,有上云的朋友可以私信我交流,阿里云三月新老客户优惠幅度大,有需要的朋友购买可返点最好15%。https://www.aliyun.com/sale-season/2020/procurement-new-members?userCode=4k4rr1wrhttps://www.aliyun.com/minisite/goods?user
分类:
其他好文 时间:
2020-03-04 22:36:36
阅读次数:
75
MySQL的编码方式中,常用的有gb2312<gbk<utf8。 MySQL的编码方式的查看,常用三个参数:character_set_client, character_set_connection ,character_set_result. 查询goods表的列的编码情况: show full ...
分类:
数据库 时间:
2020-03-02 22:19:04
阅读次数:
95
自然排序:实现Comparable接口,自定义重写compareTo方法 //编写商品类,实现Comparable接口 package compare; import static org.hamcrest.CoreMatchers.instanceOf; public class Goods im ...
分类:
编程语言 时间:
2020-03-01 10:35:52
阅读次数:
123
# 导入模块 import pymongo # 连接MongoDB数据库 conn = pymongo.MongoClient('localhost', 27017) # 建库 db = conn.goods # 建集合 table = db.snacks # 数据操作: 插入数据 table.in ...
分类:
编程语言 时间:
2020-02-26 14:20:34
阅读次数:
72
//常用操作: // 1.查看数据库 show dbs // 2.创建并使用数据库 use tst // 3.查看当前工作的数据库 db // 4.创建集合并插入一条数据 db.goods.insert({"name":"辣条", "price":0.5}) // 5.查看所有表 show tabl ...
分类:
数据库 时间:
2020-02-26 14:11:51
阅读次数:
76
在秒杀业务中,会出现当只剩一个库存时,但有多个人仍然秒杀成功,且都减库存成功,因此,在减库存,更新数据库的时候,需要在sql语句上进行判断,是否库存大于0. @Update("update miaosha_goods set stock_count = stock_count - 1 where g ...
分类:
编程语言 时间:
2020-02-22 00:16:50
阅读次数:
89
1.单表的:update user set name = (select name from user where id in (select id from user where name='小苏')); update goods set name = REPLACE(name ,' ','') ...
分类:
数据库 时间:
2020-01-24 23:47:39
阅读次数:
179
php mysql decimal 多余的0 解决方案 select id,(0+cast(price as decimal(10,2))) as price,title from goods where id=1 2 就是最多的保留小数位数 ...
分类:
数据库 时间:
2020-01-20 13:01:59
阅读次数:
117
检测 sed '/2019-12-16 00:00:00/,/2019-12-16 17:20:00/p' /store/logs/goods-freight-py/taobao/2019-12-16/freight.log | grep " 耗时:" 总请求: sed '/2019-11-27 0 ...
分类:
其他好文 时间:
2020-01-19 19:09:32
阅读次数:
85
做项目的时候,遇到的大坑!所以在此记录一下。 大概的sql如下: select * from `goods` g LEFT JOIN `goods_rel` grl on g.id = grl.case_id LEFT JOIN `user` ur on grl.user_id = ur.id wh ...
分类:
数据库 时间:
2020-01-17 20:48:43
阅读次数:
149