Friend's Code Review

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Friend's Code Review相关的知识,希望对你有一定的参考价值。

代码:

```

package lservice;

 

import java.util.Date;

 

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

 

import org.apache.struts.action.Action;

import org.apache.struts.action.ActionForm;

import org.apache.struts.action.ActionForward;

import org.apache.struts.action.ActionMapping;

 

import lbean.readerform;

import ldao.Readerdao;

 

public class Reader extends Action{

private Readerdao readerDAO = null;

    public Reader() {

        this.readerDAO = new Readerdao();

    }

    public ActionForward execute(ActionMapping mapping, ActionForm form,

            HttpServletRequest request,

            HttpServletResponse response) {

String action =request.getParameter("action");

System.out.println("\nreader*********************action="+action);

if(action==null||"".equals(action)){

request.setAttribute("error","您的操作有误!");

return mapping.findForward("error");

}else if("readerAdd".equals(action)){

return readerAdd(mapping,form,request,response);

}else if("readerQuery".equals(action)){

return readerQuery(mapping,form,request,response);

}else if("readerModifyQuery".equals(action)){

return readerModifyQuery(mapping,form,request,response);

}else if("readerModify".equals(action)){

return readerModify(mapping,form,request,response);

}else if("readerDel".equals(action)){

return readerDel(mapping,form,request,response);

}else if("readerDetail".equals(action)){

return readerDetail(mapping,form,request,response);

}

request.setAttribute("error","操作失败!");

return mapping.findForward("error");

}

```

 

需要改的地方:

包名的大小写问题:

```

package lservice;//大小写

```

无用的import删除:

```

import lbean.readerform;

import ldao.Readerdao;

```

以上是关于Friend's Code Review的主要内容,如果未能解决你的问题,请参考以下文章

Man's Best Friend: The Science Behind the Dog and Human Relationship

pandas中如何对指定列做fillna

查询错误(1064):'INTERSECT附近的语法错误(SELECT friend_id FROM user_friend_list WHERE user_id ='20'和

What's friendship?

Gena's Code

018列表类型内置方法