|
|
@@ -93,8 +93,12 @@ public class BizWxAppletClinicController extends BaseController{
|
|
|
BizAiAgentParamVO paramVO= clinicRoomService.touchMemoryId(source);
|
|
|
// 使用AES对paramVO的JSON进行加密,秘钥为clinicId
|
|
|
String jsonParamVO = JsonUtils.toJsonString(paramVO);
|
|
|
- String key = StrUtil.padAfter(source.getClinicId(), 16, '0');
|
|
|
-
|
|
|
+ String key = source.getClinicId();
|
|
|
+ if (key.length() < 16) {
|
|
|
+ key = StrUtil.padAfter(key, 16, '0');
|
|
|
+ }else {
|
|
|
+ key = key.substring(0, 16);
|
|
|
+ }
|
|
|
AES aes = new AES(key.getBytes());
|
|
|
return CommonResult.success(aes.encryptHex(jsonParamVO));
|
|
|
}
|