其实审核功能是一个更新的功能,更新审核状态就好了,做法也很简单.

1.前端代码

<el-popover  placement="top"  width="160"  v-model="scope.row.visible1">
    <p style="margin-left: 35px;">审核是否通过?</p>
    <div style="text-align: right; margin: 0;margin-top: 10px;">
      <el-button type="success" size="mini" @click="checkPass(scope.$index, scope.row)">是</el-button>
      <el-button type="primary" size="mini" @click="checkNoPass(scope.$index, scope.row)" style="margin-right: 18%;">否</el-button>
    </div>
    <el-button slot="reference" type="primary"  size="mini" >审核</el-button>
</el-popover>

2.后台代码

public RetKit check(ZddUserWithdraw entitySearch)throws Exception{
	RetKit retKit = new RetKit();
	customFile.info("审核:");
	//ZddUserWithdraw entitySearch = new ZddUserWithdraw();
    entitySearch.setWithdrawId(entitySearch.getWithdrawId());
	//更新审核状态
	Integer result = zddUserWithdrawService.updateById(entitySearch);

	//查询结果
	if( result > 0 ){
        retKit.set("success",true);
    	retKit.set("data",result);
    }else {
        retKit.set("success",false);
    }
    return retKit;
}

3.mapper文件

<update id="updateById" parameterType="com.user.entity.ZddUserWithdraw" >
    update zdd_withdraw
    <set >
      <if test="userId != null" >
        user_id = #{userId,jdbcType=VARCHAR},
      </if>
      <if test="userPhone != null" >
        user_phone = #{userPhone,jdbcType=VARCHAR},
      </if>
      <if test="withdrawStatus != null" >
        withdraw_status = #{withdrawStatus,jdbcType=VARCHAR},
      </if>
      <if test="withdrawCheckStatus != null" >
        withdraw_check_status = #{withdrawCheckStatus,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null" >
        create_time = #{createTime,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null" >
        update_time = #{updateTime,jdbcType=VARCHAR},
      </if>
    </set>
    where withdraw_id = #{withdrawId,jdbcType=VARCHAR}
  </update>

 

1这就是审核的大致过程了.

 

关注微信公众号可领取实战、面试学习视频和简历模板等资源

Logo

前往低代码交流专区

更多推荐