今天是2019年的第一天。
在项目中遇到了关于mysql中对json字段进行处理的问题,顺便进行了学习。
项目demo:
--需要处理的json 字段
json:
{
"6A90F6607C06084FE053201E12AC9004": {
"sign": "1",
"prodPzwh": "J20170028",
"prodZczh": "H20170193",
"pzwhAttach": [{
"attachUrl": "reviseAttach/ciNXiCZ3P51537345506305.edc",
"attachName": "ciNXiCZ3P51537345506305.edc",
"attachSize": 354214,
"attachType": "application/octet-stream",
"oAttachName": "1.1吉泰瑞40 - 注册证批件 - 国药准字J20170028.edc"
}],
"zczhAttach": [{
"attachUrl": "reviseAttach/8nRMXikTEY1537345509939.edc",
"attachName": "8nRMXikTEY1537345509939.edc",
"attachSize": 354214,
"attachType": "application/octet-stream",
"oAttachName": "1.1吉泰瑞40 - 注册证批件 - 国药准字J20170028.edc"
}],
"auditResult": {
"auditOption": "",
"auditStatus": ""
},
"auditResults": [],
"prodPlaceCode": "F",
"pzwhValidityEnd": "2022-02-20",
"zczhValidityEnd": "2022-02-20",
"pzwhValidityStart": "2017-04-24",
"zczhValidityStart": "2017-04-01",
"pzwhValidityStart,pzwhValidityEnd": "",
"zczhValidityStart,zczhValidityEnd": ""
},
"6A90F6607C07084FE053201E12AC9004": {
"sign": "1",
"attachJsons": [{
"attachUrl": "reviseAttach/nxtFEhyh6D1537345528512.edc",
"attachName": "nxtFEhyh6D1537345528512.edc",
"attachSize": 863593,
"attachType": "application/octet-stream",
"oAttachName": "6.吉泰瑞40mg-说明书包装20170424.edc"
}],
"auditResult": {
"auditOption": "",
"auditStatus": ""
},
"auditResults": []
},
"6A90F6607C0A084FE053201E12AC9004": {
"sign": "1",
"auditResult": {
"auditOption": "",
"auditStatus": ""
},
"auditResults": [],
"prodSpeAttach": [{
"attachUrl": "reviseAttach/EXnzcyt7nF1537345551645.edc",
"attachName": "EXnzcyt7nF1537345551645.edc",
"attachSize": 240180,
"attachType": "application/octet-stream",
"oAttachName": "外包装.