正在回答 回答被采纳积分+1
9回答
96年的nash
2019-06-01 16:12:14
package com.imooc.oa.biz.impl; import com.imooc.oa.biz.ClaimVoucherBiz; import com.imooc.oa.dao.ClaimVoucherDao; import com.imooc.oa.dao.ClaimVoucherItemDao; import com.imooc.oa.dao.DealRecordDao; import com.imooc.oa.entity.ClaimVoucher; import com.imooc.oa.entity.ClaimVoucherItem; import com.imooc.oa.entity.DealRecord; import com.imooc.oa.global.Contant; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.Date; import java.util.List; @Service("claimVoucherBiz") public class ClaimVoucherBizImpl implements ClaimVoucherBiz { //注入持久化操作对象 @Autowired private ClaimVoucherDao claimVoucherDao; @Autowired private ClaimVoucherItemDao claimVoucherItemDao; @Autowired private DealRecordDao dealRecordDao; /** * 保存方法 * PS:被封装成一个事务,故具有原子性 * @param claimVoucher * @param items */ public void save(ClaimVoucher claimVoucher, List<ClaimVoucherItem> items) { //设置三个属性 //1、设置创建时间 claimVoucher.setCreateTime(new Date()); //2、设置待处理人 新创建的报销单的创建者一定创建者本人 claimVoucher.setNextDealSn(claimVoucher.getCreateSn()); //3、状态 claimVoucher.setStatus(Contant.CLAIMVOUCHER_CREATED); //调用持久化操作对象的insert方法,将其保存到数据库中去 claimVoucherDao.insert(claimVoucher); //后面插入item时,item需要这个id for(ClaimVoucherItem item:items){ //缺少报销单编号 item.setClaimVoucherId(claimVoucher.getId()); claimVoucherItemDao.insert(item); } } /** * 获取报销单对象 * @param id * @return */ public ClaimVoucher get(int id) { return claimVoucherDao.select(id); } /** * 获取报销单对应的条目 * @param cvid * @return */ public List<ClaimVoucherItem> getItems(int cvid) { return claimVoucherItemDao.selectByClaimVoucher(cvid); } /** * 获取处理记录 * @param cvid * @return */ public List<DealRecord> getRecords(int cvid) { return dealRecordDao.selectByClaimVoucher(cvid); } /** * 获取个人报销单 * @param sn 员工编号 * @return */ public List<ClaimVoucher> getForSelf(String sn) { return claimVoucherDao.selectByCreateSn(sn); } public List<ClaimVoucher> getForDeal(String sn) { System.out.println("进入了ClaimVoucherBizImpl"); System.out.println("sn="+sn); return claimVoucherDao.selectByNextDealSn(sn); } }
package com.imooc.oa.biz; import com.imooc.oa.entity.ClaimVoucher; import com.imooc.oa.entity.ClaimVoucherItem; import com.imooc.oa.entity.DealRecord; import java.util.List; public interface ClaimVoucherBiz { /** *保存报销单的方法 * @param claimVoucher 报销单的基本信息 * @param items 报销单的条目集合 */ void save(ClaimVoucher claimVoucher, List<ClaimVoucherItem> items); /** * 详情界面 * @param id 报销单编号 * @return */ ClaimVoucher get(int id); /** * 获得报销单条目 * @param cvid 报销单的编号 * @return */ List<ClaimVoucherItem> getItems(int cvid); /** * 审核记录 * @param cvid 报销单编号 * @return */ List<DealRecord> getRecords(int cvid); /** * 获取个人报销单 * @param sn 员工编号 * @return */ List<ClaimVoucher> getForSelf(String sn); /** * 获取待处理报销单 * @param sn 员工编号 * @return */ List<ClaimVoucher> getForDeal(String sn); }
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd"> <!--声明式事务 为什么要把声明式事务配置在业务层? 就是在持久化操作对象、业务处理对象、请求处理对象,这几种对象的某些方法封装成一个事务。(事务的四大特征) 持久化操作对象:一个持久化操作(添加一个报销单记录、删除一个员工信息) web层:一次request,用户向服务器发送的一次请求,一次请求可能向你返回若干个业务功能,例如门户网站 业务层:熟知的一个个功能,例如登录功能,添加员工功能,创建报销单功能。业务层的一个个方法就是体现这一个个功能 如果把Dao层封装成一个个事务,就太细了。如果把web层的请求封装成一个个事务,就太粗了 只有把业务层的方法封装成一个个事务 ,才是最合理的。 因为业务层的一个个功能,要么成功,要么失败,符合事务四大特征的原子性 所以声明式事务封装到业务层--> <!--关联SpringDao--> <import resource="spring_dao.xml"></import> <!--自动扫描--> <context:component-scan base-package="com.imooc.oa.biz"></context:component-scan> <!--自动代理--> <aop:aspectj-autoproxy></aop:aspectj-autoproxy> <!--配置声明式事务--> <!--1、声明事务管理器--> <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <!--关联数据源--> <property name="dataSource" ref="dataSource"></property> </bean> <!--2、声明通知--> <tx:advice id="txAdvice" transaction-manager="transactionManager"> <!--通过属性的方式指定哪些方法我们要做怎样的处理--> <tx:attributes> <tx:method name="get*" read-only="true"/> <tx:method name="find*" read-only="true"/> <tx:method name="search*" read-only="true"/> <!--下面的方法,必须强制开启事务--> <tx:method name="*" propagation="REQUIRED"></tx:method> </tx:attributes> </tx:advice> <!--3、把通知和切入点关联起来--> <aop:config> <!--声明切入点--> <aop:pointcut id="txpc" expression="execution(* com.imooc.oa.biz.*.*(..))"/> <!--连接--> <aop:advisor advice-ref="txAdvice" pointcut-ref="txpc"></aop:advisor> </aop:config> </beans>
package com.imooc.oa.dao; import com.imooc.oa.entity.ClaimVoucher; import com.imooc.oa.entity.Employee; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; import java.util.List; /** * 报销单接口 */ @Repository("claimVoucherDao") public interface ClaimVoucherDao { void insert(ClaimVoucher claimVoucher); void update(ClaimVoucher claimVoucher); void delete(int id); ClaimVoucher select(int id); /** * 查询某个创造者的所有报销单 */ List<ClaimVoucher> selectByCreateSn(String csn); /** * 查询某个处理者能够处理的报销单 * @param ndsn * @return */ List<ClaimVoucher> selectByNextDealSn(String ndsn); }
package com.imooc.oa.dao; import com.imooc.oa.entity.ClaimVoucherItem; import com.imooc.oa.entity.Department; import org.springframework.stereotype.Repository; import java.util.List; @Repository("claimVoucherItemDao") public interface ClaimVoucherItemDao { void insert(ClaimVoucherItem claimVoucherItem); void update(ClaimVoucherItem claimVoucherItem); void delete(int id); /** * 查询某个报销单:根据报销单编号 进行报销单的查询 * @param cvid * @return */ List<ClaimVoucherItem> selectByClaimVoucher(int cvid); }
96年的nash
2019-06-01 09:22:00
01-Jun-2019 09:16:58.834 涓ラ噸 [http-nio-8080-exec-6] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [SpringMVC] in context with path [] threw exception [org.springframework.expression.spel.SpelEvaluationException: EL1007E:(pos 0): Field or property 'claimVoucher' cannot be found on null] with root cause org.springframework.expression.spel.SpelEvaluationException: EL1007E:(pos 0): Field or property 'claimVoucher' cannot be found on null at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:213) at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:85) at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:78) at org.springframework.expression.spel.ast.CompoundExpression.getValueRef(CompoundExpression.java:48) at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:84) at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:114) at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:105) at org.springframework.web.servlet.tags.EvalTag.doEndTag(EvalTag.java:123) at org.apache.jsp.WEB_002dINF.pages.claim_005fvoucher_005fdetail_jsp._jspx_meth_spring_005feval_005f0(claim_005fvoucher_005fdetail_jsp.java:245) at org.apache.jsp.WEB_002dINF.pages.claim_005fvoucher_005fdetail_jsp._jspService(claim_005fvoucher_005fdetail_jsp.java:160) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:476) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330) at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:728) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:470) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:395) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:316) at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:209) at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:267) at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1225) at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1012) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:876) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852) at javax.servlet.http.HttpServlet.service(HttpServlet.java:635) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837) at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at com.imooc.oa.global.EncodingFilter.doFilter(EncodingFilter.java:28) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748)
96年的nash
2019-06-01 09:18:27
org.springframework.expression.spel.SpelEvaluationException: EL1007E:(pos 0): Field or property 'claimVoucher' cannot be found on null at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:213) at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:85) at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:78) at org.springframework.expression.spel.ast.CompoundExpression.getValueRef(CompoundExpression.java:48) at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:84) at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:114) at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:105) at org.springframework.web.servlet.tags.EvalTag.doEndTag(EvalTag.java:123) at org.apache.jsp.WEB_002dINF.pages.claim_005fvoucher_005fdetail_jsp._jspx_meth_spring_005feval_005f0(claim_005fvoucher_005fdetail_jsp.java:245) at org.apache.jsp.WEB_002dINF.pages.claim_005fvoucher_005fdetail_jsp._jspService(claim_005fvoucher_005fdetail_jsp.java:160) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:476) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330) at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:728) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:470) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:395) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:316) at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:209) at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:267) at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1225) at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1012) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:876) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852) at javax.servlet.http.HttpServlet.service(HttpServlet.java:635) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837) at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at com.imooc.oa.global.EncodingFilter.doFilter(EncodingFilter.java:28) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748)
96年的nash
2019-05-31 13:08:34
<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.4//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.imooc.oa.dao.ClaimVoucherDao"> <resultMap id="claimVoucher" type="ClaimVoucher"> <id property="id" column="id" javaType="int"/> <result property="cause" column="cause" javaType="String"/> <result property="createSn" column="create_sn" javaType="String"/> <result property="createTime" column="create_time" javaType="java.util.Date"/> <result property="nextDealSn" column="next_deal_sn" javaType="String"/> <result property="totalAmount" column="total_amount" javaType="Double"/> <result property="status" column="status" javaType="String"/> <association property="creater" column="create_sn" javaType="Employee"> <result property="name" column="cname" javaType="String"/> <result property="post" column="cpost" javaType="String"/> </association> <association property="dealer" column="next_deal_sn" javaType="Employee"> <result property="name" column="dname" javaType="String"/> <result property="post" column="dpost" javaType="String"/> </association> </resultMap> <!--向claim_voucher中插入一条记录,还需要向item中插入一条附属信息 问题:插入时是没办法知道插入时的主键是哪个的 ,故需要得到这个主键--> <!--userGenerateKeys打开主键生成的功能 keyProperty:哪一个属性用来保存自动生成的主键--> <insert id="insert" useGeneratedKeys="true" keyProperty="id" parameterType="ClaimVoucher"> insert into claim_voucher(cause,create_sn,create_time,next_deal_sn,total_amount,status) values(#{cause},#{createSn},#{createTime},#{nextDealSn},#{totalAmount},#{status}) </insert> <update id="update" parameterType="ClaimVoucher"> update claim_voucher set cause=#{cause},next_deal_sn=#{nextDealSn},total_amount=#{totalAmount},status=#{status} where id=#{id} </update> <delete id="delete" parameterType="Integer"> delete from claim_voucher where id=#{id} </delete> <!--查询功能,resultMap,需要关联两个数据表 --> <select id="select" resultMap="claimVoucher" parameterType="Integer"> select cv.*,ce.name cname,ce.post cpost,d.name dname,d.post dpost from claim_voucher cv left join employee ce on ce.sn=cv.create_sn left join employee d on d.sn = cv.next_deal_sn where cv.id=#{id} </select> <select id="selectByCreateSn" resultMap="claimVoucher" parameterType="String"> select cv.*,ce.name cname,ce.post cpost,d.name dname,d.post dpost from claim_voucher cv left join employee ce on ce.sn=cv.create_sn left join employee d on d.sn = cv.next_deal_sn where cv.create_sn=#{csn} order by cv.create_time desc </select> <select id="selectByNextDealSn" resultMap="claimVoucher" parameterType="String"> select cv.*,ce.name cname,ce.post cpost,d.name dname,d.post dpost from claim_voucher cv left join employee ce on ce.sn=cv.create_sn left join employee d on d.sn = cv.next_deal_sn where cv.next_deal_sn=#{ndsn} order by cv.create_time desc </select> </mapper>
<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.4//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.imooc.oa.dao.ClaimVoucherItemDao"> <resultMap id="claim_voucher_item" type="ClaimVoucherItem"> <id property="id" column="id" javaType="Integer"/> <result property="claimVoucherId" column="claim_voucher_id" javaType="Integer"/> <result property="item" column="item" javaType="String"/> <result property="amount" column="amount" javaType="Double"/> <result property="comment" column="comment" javaType="String"/> </resultMap> <insert id="insert" parameterType="ClaimVoucherItem"> insert into claim_voucher_item(claim_voucher_id,item,amount,comment) values(#{claimVoucherId},#{item},#{amount},#{comment}) </insert> <update id="update" parameterType="ClaimVoucherItem"> update claim_voucher_item set claim_voucher_id=#{claimVoucherId},item=#{item},amount=#{amount},comment=#{comment} where id=#{id} </update> <delete id="delete" parameterType="Integer"> delete from claim_voucher_item where id=#{id} </delete> <select id="selectByClaimVoucher" resultMap="claim_voucher_item"> select * from claim_voucher_item where claim_voucher_id=#{cvid} order by id; </select> </mapper>
4. SSM到Spring Boot入门与综合实战
- 参与学习 人
- 提交作业 323 份
- 解答问题 8263 个
本阶段将带你学习主流框架SSM,以及SpringBoot ,打通成为Java工程师的最后一公里!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星