Java实现删除某条信息并返回当前页操作
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;"><span style="color: black;">我就废话不多说了,<span style="color: black;">大众</span>还是直接看代码吧</span></span></strong></p><span style="color: black;">//执行的是删除信息的操作</span>
<span style="color: black;">String</span> a=request.getParameter(<span style="color: black;">"name"</span>);
a = URLEncoder.encode(a, <span style="color: black;">"ISO-8859-1"</span>);
<span style="color: black;">String</span> name = URLDecoder.decode(a, <span style="color: black;">"UTF-8"</span>);
<span style="color: black;">String</span> num=request.getParameter(<span style="color: black;">"num"</span>);
System.out.println(<span style="color: black;">"name:"</span>+name+<span style="color: black;">"num:"</span>+num);
<span style="color: black;">String</span> sql=<span style="color: black;">"delete from person_info where name=? and num=?"</span>;<span style="color: black;">String</span> sz[]={name,num};
JdbcUtils.update(sql, sz);
<span style="color: black;">//刷新操作\</span>
<span style="color: black;">String</span> sqls=<span style="color: black;">"select * from person_info"</span>;
ResultSet rs=JdbcUtils.select(sqls, <span style="color: black;">null</span>);
ArrayList<Person_info> list=<span style="color: black;">new</span> ArrayList<Person_info>();
<span style="color: black;">try</span> {
<span style="color: black;">while</span>(rs.next()){
Person_info pi=<span style="color: black;">new</span> Person_info(rs.getString(<span style="color: black;">1</span>), rs.getString(<span style="color: black;">2</span>), rs.getString(<span style="color: black;">3</span>), rs.getString(<span style="color: black;">4</span>), rs.getString(<span style="color: black;">5</span>), rs.getString(<span style="color: black;">6</span>));
list.add(pi);
}
request.setAttribute(<span style="color: black;">"list"</span>, list);
request.getRequestDispatcher(<span style="color: black;">"Personnel_definition.jsp"</span>).forward(request, response);
} <span style="color: black;">catch</span> (SQLException e) {
<span style="color: black;">// TODO Auto-generated catch block</span>e.printStackTrace();
}
}<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/9ed85b9bbc1b4d79bcdb3963e25a15fa~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1723889691&x-signature=ksz%2FUrAMo3OOmKZmzRYV8Ksoyqo%3D" style="width: 50%; margin-bottom: 20px;"></div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">image.png</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;"><span style="color: black;">弥补</span>知识:关于分页时怎么实现当本页面最后一条记录被删除时,自动向上一个页面<span style="color: black;">转</span>的实现(java实现)</span></span></p>
<h1 style="color: black; text-align: left; margin-bottom: 10px;">问题详解</h1>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">在做批量删除时,<span style="color: black;">发掘</span>若批量删除整页时,会自动跳到<span style="color: black;">第1</span>页首页,而不是返回删除当前页的上一页,不符合<span style="color: black;">制品</span><span style="color: black;">需求</span>且使界面交互<span style="color: black;">欠好</span>,给用户带来糟糕体验。</span></span></p>
<h1 style="color: black; text-align: left; margin-bottom: 10px;">思路详解</h1>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">在controller层传参时要<span style="color: black;">思虑</span>到不仅要传入<span style="color: black;">必须</span>删除的id集合,<span style="color: black;">同期</span>传入pageSize,pageNum以及总条数集合的<span style="color: black;">查找</span><span style="color: black;">要求</span>(如:本示例会传入groupId(分组id)),在删除成功后初始化当前页,先<span style="color: black;">按照</span><span style="color: black;">查找</span><span style="color: black;">要求</span><span style="color: black;">查找</span>出总条数数量,在pageSize不等于null或为0的<span style="color: black;">状况</span>下。算出余数[(pageSize*pageNum-count)%pageSize ].若余数为0,则当前页等于pageNum-1;若余数不为0,则当前页=pageNum.将结果当前页传给前台<span style="color: black;">就可</span>。</span></span></p>
<h1 style="color: black; text-align: left; margin-bottom: 10px;">后台代码实现</h1>
<h1 style="color: black; text-align: left; margin-bottom: 10px;">controller层#</h1><span style="color: black;">@Api</span>(description = <span style="color: black;">"分组下的学生"</span>,value = <span style="color: black;">"分组下的学生"</span>)
<span style="color: black;">@RestController</span>
<span style="color: black;">@RequestMapping</span>(<span style="color: black;">"studentGroup"</span>)
public class StudentGroupController {
<span style="color: black;">@Autowired</span>private RestStudentGroupService restStudentGroupService;<span style="color: black;">@RequestMapping</span>(value = <span style="color: black;">"deleteGroupStudent"</span>,method = RequestMethod.POST)
<span style="color: black;">@ApiOperation</span>(value = <span style="color: black;">"删除分组中的学生"</span>,notes = <span style="color: black;">"删除分组中的学生"</span>)
public ResponseObj deleteGroupStudent(<span style="color: black;">@RequestParam</span>(value = <span style="color: black;">"groupId"</span>,required = true)Long groupId,
<span style="color: black;">@RequestParam</span>(value = <span style="color: black;">"ids"</span>,required = true)String ids,
<span style="color: black;">@RequestParam</span>(value =<span style="color: black;">"pageSize"</span>,required = false)Integer pagesize,
<span style="color: black;">@RequestParam</span>(value = <span style="color: black;">"pageNum"</span>,required = false)Integer pageNum){
<span style="color: black;">return</span> <span style="color: black;">restStudentGroupService</span><span style="color: black;">.deleteGroupStudent</span>(groupId,ids,pagesize,pageNum);
}
}
<h1 style="color: black; text-align: left; margin-bottom: 10px;">service层#</h1><span style="color: black;">@FeignClient</span>(value = ServiceName.VALUE)
public interface RestStudentGroupService {<span style="color: black;">@RequestMapping</span>(value = <span style="color: black;">"/school/cloud/student/deleteGroupStudent"</span>,method = RequestMethod.POST)
public ResponseObj deleteGroupStudent(<span style="color: black;">@RequestParam</span>(value = <span style="color: black;">"groupId"</span>)Long groupId,
<span style="color: black;">@RequestParam</span>(value = <span style="color: black;">"ids"</span>)String ids,
<span style="color: black;">@RequestParam</span>(value = <span style="color: black;">"pageSize"</span>)Integer pagesize,
<span style="color: black;">@RequestParam</span>(value = <span style="color: black;">"pageNum"</span>)Integer pageNum);
}<h1 style="color: black; text-align: left; margin-bottom: 10px;">serviceImpl层#</h1><span style="color: black;">@Service</span>
<span style="color: black;">public</span> <span style="color: black;"><span style="color: black;">class</span> <span style="color: black;">RestStudentGroupServiceImpl</span> <span style="color: black;">implements</span> <span style="color: black;">RestStudentGroupService</span> </span>{
<span style="color: black;">@Autowired</span>
<span style="color: black;">private</span>DubboStudentGroupService dubboStudentGroupService ;<span style="color: black;">@Override</span>
<span style="color: black;">public</span> ResponseObj deleteGroupStudent(<span style="color: black;">Long</span> groupId,String ids,Integer pageSize,Integer pageNum) {
List<<span style="color: black;">Long</span>> idList = TextUtils.split(ids);
<span style="color: black;">if</span>(groupId == <span style="color: black;">null</span> || idList== <span style="color: black;">null</span> || idList.size() == <span style="color: black;">0</span>){
ResponseObj responseObj = ResponseObj.ERROR(<span style="color: black;">"参数错误"</span>);
responseObj.setSuccess(<span style="color: black;">true</span>);
<span style="color: black;">return</span> responseObj;
}
ServiceResult<<span style="color: black;">Long</span>> serviceResult = dubboStudentGroupService .deleteCorpGroup(idList, groupId);<span style="color: black;">if</span>(!serviceResult.getSuccess()){
<span style="color: black;">throw</span> new RuntimeException(<span style="color: black;">"分组下学生<span style="color: black;">查找</span>失败"</span>);
}
<span style="color: black;">//应前端<span style="color: black;">需求</span>加此dto,封装传给前台的当前页属性</span>CurrenPageDto currenPageDto=new CurrenPageDto();<span style="color: black;">//初始化当前页</span>
Integer currentPage = <span style="color: black;">1</span>;
<span style="color: black;">//查出该分组id下的学生数量</span>
ServiceResult<<span style="color: black;">Long</span>> itemCountLongs = dubboStudentGroupService.getTotalCount(groupId);
<span style="color: black;">Long</span>itemCountLong= itemCountLongs.getResult();
Integer itemCount = itemCountLong!=<span style="color: black;">null</span> ? itemCountLong.intValue() : <span style="color: black;">0</span>;
<span style="color: black;">//"<span style="color: black;">查找</span>到学生数量:{},pageSize:{}", itemCount,pageSize;</span>
<span style="color: black;">if</span>(pageSize != <span style="color: black;">null</span> && pageSize != <span style="color: black;">0</span>){
<span style="color: black;">//算出余数</span>
Integer temp = (pageNum*pageSize-itemCount)%pageSize;
<span style="color: black;">if</span>(temp == <span style="color: black;">0</span>){
<span style="color: black;">//余数为0的话就pageNum-1</span>currentPage = (pageNum -<span style="color: black;">1</span>) == <span style="color: black;">0</span> ? <span style="color: black;">1</span> : (pageNum -<span style="color: black;">1</span>) ;
}<span style="color: black;">else</span> {
<span style="color: black;">//余数不为0则等于pageNum</span>currentPage = pageNum;
}
currenPageDto.setPresentPage(currentPage);
}
ResponseObj responseObj = ResponseObj.SUCCESS();
responseObj.setData(currenPageDto);<span style="color: black;">return</span> responseObj;
}
}
<h1 style="color: black; text-align: left; margin-bottom: 10px;">dubbo接口的service层#</h1>①:<span style="color: black;">//删除分组下的学生</span>ServiceResult<<span style="color: black;">Long</span>> deleteCorpGroup(List<<span style="color: black;">Long</span>> idList,<span style="color: black;">Long</span> groupId);
②:<span style="color: black;">//<span style="color: black;">按照</span><span style="color: black;">要求</span><span style="color: black;">查找</span>对应的条目总数</span>
ServiceResult<<span style="color: black;">Long</span>> getTotalCount(<span style="color: black;">Long</span> groupId);
<h1 style="color: black; text-align: left; margin-bottom: 10px;">dubbo接口的serviceImpl层#</h1><span style="color: black;">`①:`</span><span style="color: black;">`//删除分组下的学生`</span>
<span style="color: black;">`@Override`</span>
<span style="color: black;">`public`</span> <span style="color: black;">`ServiceResult<Long> deleteCorpGroup(List<Long> idList, Long groupId) {`</span>
<span style="color: black;">`ServiceResult<Long> result =`</span> <span style="color: black;">`new`</span> <span style="color: black;">`ServiceResult<>();`</span>
<span style="color: black;">`try`</span> <span style="color: black;">`{`</span>
<span style="color: black;">`studentGroupDao.deleteCorpGroup(idList, groupId);`</span>
<span style="color: black;">`}`</span> <span style="color: black;">`catch`</span> <span style="color: black;">`(Exception e) {`</span>
<span style="color: black;">`log.error(`</span><span style="color: black;">`"调用{}<span style="color: black;">办法</span> <span style="color: black;">反常</span>"`</span><span style="color: black;">`,`</span> <span style="color: black;">`""`</span><span style="color: black;">`);`</span>
<span style="color: black;">`log.error(`</span><span style="color: black;">`"<span style="color: black;">办法</span><span style="color: black;">运用</span>参数:"`</span><span style="color: black;">`, idList, groupId);`</span>
<span style="color: black;">`log.error(`</span><span style="color: black;">`"<span style="color: black;">反常</span>信息:{}"`</span><span style="color: black;">`, e);`</span>
<span style="color: black;">`result.setErrMessage(`</span><span style="color: black;">`"调用deleteCorpGroup<span style="color: black;">办法</span><span style="color: black;">反常</span>,<span style="color: black;">反常</span>信息:"`</span> <span style="color: black;">`+ e.getMessage());`</span>
<span style="color: black;">`}`</span>
<span style="color: black;">`return`</span> <span style="color: black;">`result;`</span>
<span style="color: black;">`}`</span>
<span style="color: black;">`②:`</span><span style="color: black;">`//<span style="color: black;">按照</span><span style="color: black;">要求</span><span style="color: black;">查找</span>对应的条目总数`</span>
<span style="color: black;">`@Override`</span>
<span style="color: black;">`public`</span> <span style="color: black;">`ServiceResult<Long> getTotalCount(Long groupId) {`</span>
<span style="color: black;">`ServiceResult<Long> result =`</span> <span style="color: black;">`new`</span> <span style="color: black;">`ServiceResult<>();`</span>
<span style="color: black;">`try`</span> <span style="color: black;">`{`</span>
<span style="color: black;">`long`</span> <span style="color: black;">`count = studentGroupDao.getFindCorpGroupDirectoryCount(groupId);`</span>
<span style="color: black;">`result.setResult(count);`</span>
<span style="color: black;">`}`</span> <span style="color: black;">`catch`</span> <span style="color: black;">`(Exception e) {`</span>
<span style="color: black;">`log.error(`</span><span style="color: black;">`"调用{}<span style="color: black;">办法</span> <span style="color: black;">反常</span>"`</span><span style="color: black;">`,`</span> <span style="color: black;">`""`</span><span style="color: black;">`);`</span>
<span style="color: black;">`log.error(`</span><span style="color: black;">`"<span style="color: black;">办法</span><span style="color: black;">运用</span>参数:"`</span><span style="color: black;">`, groupId);`</span>
<span style="color: black;">`log.error(`</span><span style="color: black;">`"<span style="color: black;">反常</span>信息:{}"`</span><span style="color: black;">`, e);`</span>
<span style="color: black;">`result.setErrMessage(`</span><span style="color: black;">`"调用getTotalCount<span style="color: black;">办法</span><span style="color: black;">反常</span>,<span style="color: black;">反常</span>信息:"`</span> <span style="color: black;">`+ e.getMessage());`</span>
<span style="color: black;">`}`</span>
<span style="color: black;">`return`</span> <span style="color: black;">`result;`</span>
<span style="color: black;">`}`</span>|
[](<span style="color: black;">javascript:; "全选"</span>)[](<span style="color: black;">javascript:; "复制java代码"</span>)
<span style="color: black;"><span style="color: black;"><<span style="color: black;">textarea</span> <span style="color: black;">style</span>=<span style="color: black;">"margin: 0px; padding: 0px; outline: none; font: 16px / 24px tahoma, arial, 宋体;"</span>></span></span><span style="color: black;"><span style="color: black;"></<span style="color: black;">textarea</span>></span></span>
<span style="color: black;">#dubbo接口的dao层#</span>
<span style="color: black;">`①:`</span><span style="color: black;">`//删除分组下的学生`</span>
<span style="color: black;">`Long deleteCorpGroup(`</span><span style="color: black;">`@Param`</span><span style="color: black;">`(value =`</span> <span style="color: black;">`"idList"`</span><span style="color: black;">`) List<Long> idList,`</span><span style="color: black;">`@Param`</span><span style="color: black;">`(value =`</span> <span style="color: black;">`"groupId"`</span><span style="color: black;">`) Long groupId);`</span>
<span style="color: black;">`②:`</span><span style="color: black;">`//<span style="color: black;">按照</span><span style="color: black;">要求</span><span style="color: black;">查找</span>对应的条目总数`</span>
<span style="color: black;">`Long getFindCorpGroupDirectoryCount(`</span><span style="color: black;">`@Param`</span><span style="color: black;">`(value =`</span> <span style="color: black;">`"groupId"`</span><span style="color: black;">`) Long groupId);`</span>
|
<h1 style="color: black; text-align: left; margin-bottom: 10px;">dubbo接口的sql#</h1>①:<span style="color: black;">//删除分组下的学生</span><delete id=<span style="color: black;">"deleteCorpGroup"</span>>
delete <span style="color: black;">from</span> student_group <span style="color: black;">where</span> group_id = <span style="color: black;">#{groupId} and id in</span>
<<span style="color: black;">foreach</span> collection=<span style="color: black;">"idList"</span> index=<span style="color: black;">"index"</span> separator=<span style="color: black;">","</span> item=<span style="color: black;">"id"</span>open=<span style="color: black;">"("</span> close=<span style="color: black;">")"</span>>
<span style="color: black;">#{id}</span>
</<span style="color: black;">foreach</span>>
</delete>
②:<span style="color: black;">//<span style="color: black;">按照</span><span style="color: black;">要求</span><span style="color: black;">查找</span>对应的条目总数</span>
<<span style="color: black;">select</span> id=<span style="color: black;">"getFindCorpGroupDirectoryCount"</span> resultType=<span style="color: black;">"long"</span>>
<span style="color: black;">SELECT <span style="color: black;">COUNT</span>(<span style="color: black;"><span style="color: black;">1</span></span>)
FROM student_group<span style="color: black;">where</span> group_id</span> = <span style="color: black;">#{groupId}</span>
</<span style="color: black;">select</span>>
<h1 style="color: black; text-align: left; margin-bottom: 10px;">Entity类(学生分组类)#(get,set函数省略)</h1>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">|</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">public</span></span><span style="color: black;"><span style="color: black;">class</span></span><span style="color: black;"><span style="color: black;">StudentGroup</span></span><span style="color: black;"><span style="color: black;">implements</span></span><span style="color: black;"><span style="color: black;">java.io.Serializable {</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">/**</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">*</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">*/</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">private</span></span><span style="color: black;"><span style="color: black;">static</span></span><span style="color: black;"><span style="color: black;">final</span></span><span style="color: black;"><span style="color: black;">long</span></span><span style="color: black;"><span style="color: black;">serialVersionUID = 1L;</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">/**</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">* @描述:</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">* @字段:id BIGINT(19)</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">*/</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">private</span></span><span style="color: black;"><span style="color: black;">Long StudentGroupId;</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">/**</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">* @描述:</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">* @字段:group_id BIGINT(19)</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">*/</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">private</span></span><span style="color: black;"><span style="color: black;">Long groupId;</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">/**</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">* @描述:</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">* @字段:id BIGINT(19)</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">* 此id为学生表id</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">*/</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">private</span></span><span style="color: black;"><span style="color: black;">Long id;</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">/**</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">* @描述:创建时间</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">* @字段:create_time DATETIME(19)</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">*/</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">private</span></span><span style="color: black;"><span style="color: black;">java.util.Date createTime;</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">* @描述:创建人用户名</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">* @字段:create_user_name VARCHAR(``30``)</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">*/</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">private</span></span><span style="color: black;"><span style="color: black;">String createUserName;</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">/**</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">* @描述:创建人用户ID</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">* @字段:create_user_id BIGINT(19)</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">*/</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">private</span></span><span style="color: black;"><span style="color: black;">Long createUserId;</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">/**</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">* @描述:更新时间</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">* @字段:update_time DATETIME(19)</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">*/</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">private</span></span><span style="color: black;"><span style="color: black;">java.util.Date updateTime;</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">* @描述:更新人用户名</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">* @字段:update_user_name VARCHAR(``30``)</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">*/</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">private</span></span><span style="color: black;"><span style="color: black;">String updateUserName;</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">/**</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">* @描述:更新人用户ID</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">* @字段:update_user_id BIGINT(19)</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">*/</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">private</span></span><span style="color: black;"><span style="color: black;">Long updateUserId;</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">}</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">|</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">[](javascript:; "全选")[](javascript:; "复制java代码")</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;"><textarea style="margin: 0px; padding: 0px; outline: none; font: 16px / 24px tahoma, arial, 宋体;"></textarea></span></span></p>#Entity类(学生类)#(<span style="color: black;">get</span>,<span style="color: black;">set</span>函数省略)
<span style="color: black;">``</span><span style="color: black;">`c
`</span><span style="color: black;">public</span><span style="color: black;">` `</span>clas<span style="color: black;">` `</span>Student<span style="color: black;">` `</span><span style="color: black;">implements</span><span style="color: black;">` `</span>java.io.Serializable {<span style="color: black;">`
`</span><span style="color: black;">/**`
`*`
`*/</span><span style="color: black;">`
`</span><span style="color: black;">private</span><span style="color: black;">` `</span><span style="color: black;">static</span><span style="color: black;">` `</span>final<span style="color: black;">` `</span>long<span style="color: black;">` `</span>serialVersionUID = <span style="color: black;">1</span>L;<span style="color: black;">`
`</span><span style="color: black;">private</span><span style="color: black;">` `</span>Long id;<span style="color: black;">`
`</span><span style="color: black;">private</span><span style="color: black;">` `</span><span style="color: black;">String</span> name ;<span style="color: black;">`
`</span><span style="color: black;">private</span><span style="color: black;">` `</span>Integer age;<span style="color: black;">`
</span>
你的话语如春风拂面,让我心生暖意。 我完全同意你的看法,期待我们能深入探讨这个问题。 你的见解真是独到,让我受益匪浅。 太棒了、厉害、为你打call、点赞、非常精彩等。 你的见解真是独到,让我受益匪浅。 交流如星光璀璨,点亮思想夜空。
页:
[1]