1.代码如下:
import com.ruoyi.project.system.domain.SysDictData; import com.ruoyi.project.system.service.ISysDictDataService; SysDictData dict = new SysDictData(); //获取返回值中的sessionId if (response.contains("sessionId")){ String sessionId = response.substring(response.indexOf("sessionId")+12,response.indexOf("sessionId")+48); System.out.println("sessionId==>" +sessionId); dict.setDictValue(sessionId); dict.setDictCode(102L); dictService.updateDictData(dict); String publicKey = response.substring(response.indexOf("publicKey")+12,response.indexOf("publicKey")+142); System.out.println("publicKey==>" +publicKey); }
2.导入domin和service
3.定义对象及引用更新