猿问

我是个女生就会点JAVA基础的东西 再回点js和MVC 能找到工作吗

@SuppressWarnings("unused")

public class DMBService {

IDao dao=new DaoImpl();

public List<?> querydmb() throws Exception {

System.out.println("查询列表--->M--->模型层DMBService.java");

return dao.executeQueryForList("select * from dmb");

}

public void add(String dmnr, String lbbh, String bzmc, String remark) throws Exception {

String sql="insert into dmb "+

"   (dmbid, dmlbbh, dmnr, bz, bz_mc) "+

" values "+

"   (?, ?, ?, ?, ?)";

int[] types={12,12,12,12,12};

Object[] values={UUID.randomUUID().toString(),dmnr,lbbh,bzmc,remark};

System.out.println(dmnr+"-"+lbbh+"-"+bzmc+"-"+remark);

dao.executeUpdate(sql, types, values);

}

public Map<String, Object> queryById(String id) throws Exception {

return dao.executeQueryForMap("select * from dmb where dmbid='"+id+"'");

}

public void edit(String id, String dmnr, String lbbh, String bzmc,String remark) throws Exception {

String sql  ="update dmb "+

"     set  "+

"   dmlbbh = ?, "+

"     dmnr = ?, "+

"       bz = ?, "+

"     bz_mc = ? "+

" where dmbid = ?";

int[] types  = new int[5];

types[0]=Types.VARCHAR;

types[1]=Types.VARCHAR;

types[2]=Types.VARCHAR;

types[3]=Types.VARCHAR;

types[4]=Types.VARCHAR;

Object[] values = new Object[5];

values[0]=dmnr;

values[1]=lbbh;

values[2]=bzmc;

values[3]=remark;

values[4]=id;

dao.executeUpdate(sql, types, values);

}

public void del(String[] ids) throws Exception {

for (int i = 0; i < ids.length; i++) {

dao.executeUpdate("delete from dmb where dmbid= '"+ids[i]+"'");

}

}


慕侠2969979
浏览 1445回答 1
1回答

Tobey_滔

容易!!!女生做程序员都容易......呵呵!!开玩笑....如果按实际的话...你目前还是有待提升.....
随时随地看视频慕课网APP

相关分类

Java
我要回答