企业开发错误归纳一:
1.Column ‘delete_flag’ in where clause is ambiguous; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException
解决原因:查询出来有多个’delete_flag’,条件后面应该指定是哪张表的字段。
分支机构模糊查询,count值可能返回不对,源基因:用的是 CONCAT而不是concat_ws。
2.Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column ‘contact_phone’ at row 1
原因:数据库的字段的长度太小
3.上海市青浦区华隆路1288号4幢1层101室
Caused by: java.net.URISyntaxException: Illegal character in query at index 109: http://restapi.amap.com/v3/geocode/geo?key=6fcdd6ce6cf92965550490e24f84fc73&&s=rsv3&city=35&address=上海市青浦区华隆路 1288 号 4 幢 1 层 101 室
错误原因:地址中存在空格。
Alt+7 查看类中所有方法。
E10ADC3949BA59ABBE56E057F20F883E
4.jpa入门
https://www.cnblogs.com/zjfjava/p/8456771.html jpa
数据库:
在指定列后面加入列
ALTER TABLE bd_enterprise_endpoint
ADD COLUMN filing_status
int(11) DEFAULT NULL COMMENT ‘备案状态,1为有效、0为无效’ AFTER lat_business
;
ALTER TABLE bd_enterprise_endpoint
ADD COLUMN remark
varchar(255) DEFAULT NULL COMMENT ‘备注’ AFTER filing_status
;
删除数据库指定列
alter table bd_enterprise_endpoint drop column filing_status ;