PHP 500错误排查

【总部端-产品中心】新增美容品,总部复审,操作同意时,接口报错

接口:hmd/api/audit/approve

参数:{"id":"6542","remark":"","is_review":"1","product_info":{"id":"","item_code":"","category":"F010301","product_name":"申请新增美容品非敏感药","pinyin_abbr":"SQXZMRPFMGY","english_name":"","common_name":"申请新增美容品非敏感药","obj_type":2285,"store_unit":"933003","sell_price":"100","sell_price_range":[],"is_discount":"1","disabled":0,"remark":"申请新增美容品非敏感药","relation_product":[],"relation_assay":[],"product_code":"","category_id":"F010301","category_name":"美容>剃毛>剃毛","specific_conversion":0,"obj_type_name":"美容","is_discount_name":"是","store_unit_name":"次/只","dosing_way":0,"dosing_way_id":0,"dosing_way_name":"","dosing_unit":0,"dosing_unit_id":0,"dosing_unit_name":"","drug_attr":0,"drug_attr_id":0,"drug_attr_name":"","use_frequency":0,"use_frequency_id":0,"use_frequency_name":"","ref_price":"0.00","disabled_name":"是","labor_code":"","non_sensitive":"","non_sensitive_name":"否","rel_assay":[],"supplier_name":"","supplier_code":"","struct_name":"华北区","struct_id":"3","ingredient_name":"","product_type":"2100"}}

返回:{"code":10001,"message":"\u65b0\u589e\u4ea7\u54c1\u5931\u8d25","data":""}

日志排查 

 failded with state code HY000 HY000 1366 Incorrect integer value: '' for column 'non_sensitive' at row 1

解决:报错大概意思就是字段类型不匹配,SQL无法执行

原因:原来该字段数据库 是整形,但是赋值是空字符串,导致入库失败,字段类型复制错误,存库只允许整型,不允许字符串或其他

扫描二维码关注公众号,回复: 14968617 查看本文章

修改默认值后解决问题

猜你喜欢

转载自blog.csdn.net/qq_33665793/article/details/127850835
今日推荐