1、问题
2020-11-28 12:07:20.397 INFO 16308 --- [io-13000-exec-8] c.y.a.s.dayProcess.DayProcessService : 对账结果:对账失败,原因:取款总笔数对不上 取款总金额对不上 转账总笔数对不上 转账总金额对不上
Hibernate: insert into app_verify_trans (create_by, create_date, last_update_by, last_update_date, object_version, host_box_amount, host_deposit_amount, host_deposit_num, host_transfer_amount, host_transfer_num, host_verify_date, host_verify_time, host_withdraw_amount, host_withdraw_num, plat_sn, term_box_amount, term_deposit_amount, term_deposit_num, term_num, term_transfer_amount, term_transfer_num, term_verify_date, term_verify_time, term_withdraw_amount, term_withdraw_num, tran_seq, verify_msg, verify_result) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2020-11-28 12:07:26.917 WARN 16308 --- [io-13000-exec-8] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 1406, SQLState: 22001
2020-11-28 12:07:26.917 ERROR 16308 --- [io-13000-exec-8] o.h.engine.jdbc.spi.SqlExceptionHelper : Data truncation: Data too long for column 'verify_msg' at row 1
2、原因
要存的字符长度超过30位。“对账结果:对账失败,原因:取款总笔数对不上 取款总金额对不上 转账总笔数对不上 转账总金额对不上”
数据库中表字段verify_msg只允许30位。
3、解决
修改为向verify_msg中存数字1,2,3,4,5,不再直接存内容。