|
|
@@ -180,15 +180,15 @@ public class SmartGradeController implements SmartGradeControllerAPI {
|
|
|
|
|
|
JSONObject jsonobject = new JSONObject();
|
|
|
jsonobject.put("appid", appId);
|
|
|
- jsonobject.put("timestamp", timestamp);
|
|
|
- jsonobject.put("schoolno", schoolno);
|
|
|
String str = "{\"grade_no\":\"" + gradeNo + "\"}";
|
|
|
String aesStr = URLEncoder.encode(AesTestOne.encrypt(str, controlConfig.getAppSecret()), "UTF-8");
|
|
|
jsonobject.put("data", aesStr);
|
|
|
+ jsonobject.put("timestamp", timestamp);
|
|
|
+ jsonobject.put("schoolno", schoolno);
|
|
|
|
|
|
|
|
|
//appid=ymdd36ed157ac423e2&carNo=赣U123659&parkKey=wdcmq9rc&rand=9.94995525689689966&reserveEndTime=2023-12-22 20:12:10&reserveTime=2023-12-21 18:12:10&version=v1.0&50596cd243dc4547b4c05f01f8ea02a4
|
|
|
- String md5Str = "appid=" + appId + "×tamp=" + timestamp + "&schoolno=" + schoolno + "&data={\"grade_no\":\"" + gradeNo + "\"}" + "&key=" + appSecret;
|
|
|
+ String md5Str = "appid=" + appId + "&data={\"grade_no\":\"" + gradeNo + "\"}" + "&schoolno=" + schoolno + "×tamp=" + timestamp + "&key=" + appSecret;
|
|
|
String sign = CommonUtil.MD5(md5Str);
|
|
|
//sign签名
|
|
|
jsonobject.put("sign", sign);
|
|
|
@@ -196,11 +196,13 @@ public class SmartGradeController implements SmartGradeControllerAPI {
|
|
|
//返回的结果中 code为1表示成功
|
|
|
String result = RequestUtils.httpPost(url, jsonobject.toJSONString());
|
|
|
|
|
|
- if (result.contains("删除成功")) {
|
|
|
+ if (result.contains("删除年级成功")) {
|
|
|
int delete = smartGradeService.deleteGradeById(id);
|
|
|
- if(delete <= 0){
|
|
|
+ if (delete <= 0) {
|
|
|
return CommonResult.fail("删除失败");
|
|
|
}
|
|
|
+ } else {
|
|
|
+ return CommonResult.fail("百胜删除失败:" + result);
|
|
|
}
|
|
|
//endregion
|
|
|
|