3.7 Modify user interface
**Request address:** - `/ivci/api/user/updateUserInfo ` **Request mode:** - POST,GET **Parameter Description** |Parameter name|Type|Description|Remark| |:---- |:---|:----- |----- | |content |String |Requested encrypted data |Mandatory | |merchantId |String |Request customer ID of the users | Mandatory | **Remark** Content is decrypted into json format via RSA ``` { "userName":"testuser", "antiFake":"4bbab6ff0d8042548cc6f2df9f3655fa", "timestamp":"20160518165030", "serverIP":"127.0.0.1", "updateUser":{ "userId":123, "userAccount":"jasion_test", "userName":"jasion", "userDeptId":1, "userPwd":"123456", "gmtZone":"utc+0800000", "userPhone":"18888888888", "userMail":"jasion@gmail.com", "userRoleId":0 } } ``` **Content Parameter description** |Parameter name|Type|Description|Remark| |:---- |:---|:----- |----- | |userName | String | User name| Mandatory| |antiFake | String |Anti-fake random string| Mandatory| |timestamp | String| Request timestamp, accurate to second| Mandatory| |serverIP | String | IP Server IP |Mandatory| |updateUser | json | Modify user information | Mandatory| |updateUser.userAccount | String | Modify user account | Optional| |updateUser.userName| String| Modify user name | Optional| |updateUser.userDeptId | int| Modify user affiliated department | Optional| |updateUser.privilegeIds| String | Modify user's data permissions (it means modify sub-department ID of the user's department)| Optional| |updateUser.userPwd | String| Modify user’s password | Optional| |updateUser.gmtZone | String |Modify the user time zone, time zone selection value, refer to Appendix 2 | Optional| |updateUser.userPhone | String | Modify user’s mobilephone number | Optional| |updateUser.userMail| String | Modify user’s email | Optional| |updateUser.userRoleId | Int| You need call query role interface before modifying the user role (getUserPrisRoleList)| Optional| |updateUser.userId | Int |Modify user ID | Mandatory| **Use examples:** 1. Backend ```java //Reading privateKeyStr String privateKey=........... //Get digital signature SimpleDateFormat formatter = new SimpleDateFormat ("yyyyMMddHHmmss"); String timestamp=formatter.format(new Date()); String signStr=RSAUtils.sign(timestamp.getBytes(), privateKey); String ip=request.getRemoteAddr(); //encrypted with private key String ext=",\"updateUser\":{.............}";//Assemble user information String dataStr="{\"userName\":\"testuser\",\"antiFake\":\""+signStr+"\",\"timestamp\":\""+timestamp+"\",\"serverIP\":\""+ip+"\" "+ext+" }"; String content=RSAUtils.encryptByPrivateKey(dataStr, privateKey); ``` 2. Front end The backend return the encrypted content to the front end, and then send the requestcalling. http://xxxxx/ivci/api/user/updateUserInfo?merchantId=100000&content=content **Return data** All return data should be in json format ```json {"code":0,"msg":" Operate failed","data":{}} ``` **Return parameter** |Parameter |Type|Description|Remark| |:---- |:---|:----- |----- | |code | String | Operate result code(success=0,failure=1),refer to Appendix 1 | Return| |msg |String|Operate return information(Operate succeed,return null;operate failed,return prompt information) | | |data | json |Operate the return data (If it succeed, the result will be returned. For querying the data that has been returned successfully, if query it in batch, data will be returned. If query is single, json object will be received. For deleting, updating or other operations,return null, which means no data is returned. | |