鸣 BY Blog

Thinking will not overcome fear but action will.

springboot数据源配置

单数据源、多数据源区别

1.单数据源配置 配置信息datasource:url:XXX server: port: 8808 servlet: context-path: / spring: application: name: xcbdepot datasource: url: jdbc:mysql://xx.xxx.xxx:3306/xxx?a...

MySQL问题

update 字段自动累加

修改时字段自动累加 set @num=0; update equipment_market_goods_catagory SET sort_no = (@num := @num + 1);

MySQL问题

统计相同ID数据

统计相同ID数据 select id, user_id from user_profile group by user_id having count(user_id) >1;

MySQL问题

根据拼音首字母排序

SQL语句根据拼音首字母排序 SELECT ship_num FROM xcb_ship_ll_newest ORDER BY CONVERT( ship_num USING gbk ) COLLATE gbk_chinese_ci ASC;

MySQL问题

锁表解决方法

MySql事务- Lock wait timeout exceeded; try restarting transaction问题解决 1.查看数据库当前的进程 show processlist; 2.查看当前的事务 #当前运行的所有事务 SELECT * FROM information_schema.INNODB_TRX; #当前出现的锁 SELECT * FROM inform...

MySQL问题

AB表数据转移

将A表信息同步至B表中,字段对应,B表为空,插入操作 insert into xcb_ship_info(id,user_id,ship_num,cargo_capacity,ais_number,mmsi_number,contact_person,contact_phone,shipsur_pic,ship_license_pic,port_license_pic,coas_licens...

List操作

将List中的实体类按照某个字段进行分组并存放至Map中

/** * @author dongm * @Description: 将List中的实体类按照某个字段进行分组并存放至Map中 * @date:2019/12/24 * @param: [goodsTransitList] */ public Map<String, List<BackGoodsTransitDto>> getCatagory(List&l...

MySQL问题

统计每天销售数量

SELECT count(1), SUM(mb.pay_money) AS payMoney, substr(mb.create_time, 1, 10) FROM market_bill mb WHERE mb.market_id = 378379036843991041 AND ( mb.bill_state = mb.bill_state = 20 OR mb.bill_...

MySQL问题

查询存在A表但不存在B表的数据

SQL查询存在A表但不存在B表的数据 A表 id name age 1 xxx 15 2 yyy 18 3 zzz 20 B表 ...

Xcode命令行工具管理

如何切换Xcode命令行工具

安装 xcode-select --install Xcode版本切换 显示当前使用的xocde版本 $ xcode-select --print-path 选择Xcode中的默认版本 $ sudo xcode-select -switch /Applications/Xcode.app