Commit c05e0ef8 by zhouhaibao

[+]试驾服务

1 parent 59c7d6c1
......@@ -65,7 +65,7 @@ public class ApprovalService {
approvalRequest.setBizId(approvalBo.getBizId());
Approval approvalData = approvalMapper.selectByTypeAndId(approvalRequest);
Approval approval = new Approval(true);
if(approvalBo.getBizType()==2&&approvalData!=null){
if(approvalData!=null){
// 该业务已经存在审批
throw new AdminException(ResultEnum.APPROVAL_ALREADY_EXISTS);
}else{
......
......@@ -154,7 +154,13 @@
parameterType="cn.com.glsx.admin.modules.entity.Approval">
select * from t_approval
where
del_flag = 0 and status in (1,2)
del_flag = 0
<if test="approval.bizType==1">
and status in (1)
</if>
<if test="approval.bizType==2">
and status in (1,2)
</if>
and biz_type=#{approval.bizType}
and biz_id=#{approval.bizId}
</select>
......
......@@ -47,7 +47,7 @@ public class ApprovalTest {
@Test
public void addApproval(){
ApprovalBo approvalBo=new ApprovalBo(2,13L);
ApprovalBo approvalBo=new ApprovalBo(1,36L);
approvalService.saveApproval(approvalBo);
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!