2021.2.14
借助url用mysql存储数据
但由于两个需要的参数不一样
想了半天还是重写一个方法分开调用
public class thing2 implements Runnable{
private String money;
private String nali;
private String temp;
private List<thing> thingList;
public String getMoney() {
return money;
}
public void set(String money, String nali){
this.money = money;
this.nali = nali;
}
public void setMoney(String money) {
this.money = money;
}
public void setNali(String nali) {
this.nali = nali;
}
public void setTemp(String temp) {
this.temp = temp;
}
public String getNali() {
return nali;
}
public String getTemp() {
return temp;
}
public List<thing> getThingList() {
return thingList;
}
public void setThingList(List<thing> thingList) {
this.thingList = thingList;
}
@Override
public void run() {
webs web = new webs();
temp = web.executeHttpGet2();
thingList= JSON.parseObject(temp,new TypeReference<List<thing>>(){});
}
}
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步