Spring【DAO模块】知识要点

 
 

前言

上一篇Spring博文主要讲解了如何使用Spring来实现AOP编程,本博文主要讲解Spring的DAO模块对JDBC的支持,以及Spring对事务的控制

对于JDBC而言,我们肯定不会陌生,我们在初学的时候肯定写过非常非常多的JDBC模板代码

回顾对模版代码优化过程

我们来回忆一下我们怎么对模板代码进行优化的!

        try {            String sql = "insert into t_dept(deptName) values('test');";            Connection con = null;            Statement stmt = null;            Class.forName("com.mysql.jdbc.Driver");            // 连接对象            con = DriverManager.getConnection("jdbc:mysql:///hib_demo", "root", "root");            // 执行命令对象            stmt =  con.createStatement();            // 执行            stmt.execute(sql);            // 关闭            stmt.close();            con.close();        } catch (Exception e) {            e.printStackTrace();        }
           String sql = "insert into t_dept(deptName) values('test');";
           Connection con = null;
           Statement stmt = null;
           Class.forName("com.mysql.jdbc.Driver");
           // 连接对象
           con = DriverManager.getConnection("jdbc:mysql:///hib_demo", "root", "root");
           // 执行命令对象
           stmt =  con.createStatement();
           // 执行
           stmt.execute(sql);

           // 关闭
           stmt.close();
           con.close();
       } catch (Exception e) {
           e.printStackTrace();
       }
    /*    * 连接数据库的driver,url,username,password通过配置文件来配置,可以增加灵活性    * 当我们需要切换数据库的时候,只需要在配置文件中改以上的信息即可    *    * */    private static String  driver = null;    private static String  url = null;    private static String  username = null;    private static String password = null;    static {        try {            //获取配置文件的读入流            InputStream inputStream = UtilsDemo.class.getClassLoader().getResourceAsStream("db.properties");            Properties properties = new Properties();            properties.load(inputStream);            //获取配置文件的信息            driver = properties.getProperty("driver");            url = properties.getProperty("url");            username = properties.getProperty("username");            password = properties.getProperty("password");            //加载驱动类            Class.forName(driver);        } catch (IOException e) {            e.printStackTrace();        } catch (ClassNotFoundException e) {            e.printStackTrace();        }    }    public static Connection getConnection() throws SQLException {        return DriverManager.getConnection(url,username,password);    }    public static void release(Connection connection, Statement statement, ResultSet resultSet) {        if (resultSet != null) {            try {                resultSet.close();            } catch (SQLException e) {                e.printStackTrace();            }        }        if (statement != null) {            try {                statement.close();            } catch (SQLException e) {                e.printStackTrace();            }        }        if (connection != null) {            try {                connection.close();            } catch (SQLException e) {                e.printStackTrace();            }        }    }

   private static String  driver = null;
   private static String  url = null;
   private static String  username = null;
   private static String password = null;

   static {
       try {

           //获取配置文件的读入流
           InputStream inputStream = UtilsDemo.class.getClassLoader().getResourceAsStream("db.properties");

           Properties properties = new Properties();
           properties.load(inputStream);

           //获取配置文件的信息
           driver = properties.getProperty("driver");
           url = properties.getProperty("url");
           username = properties.getProperty("username");
           password = properties.getProperty("password");

           //加载驱动类
           Class.forName(driver);


       } catch (IOException e) {
           e.printStackTrace();
       } catch (ClassNotFoundException e) {
           e.printStackTrace();
       }

   }

   public static Connection getConnection() throws SQLException {
       return DriverManager.getConnection(url,username,password);
   }
   public static void release(Connection connection, Statement statement, ResultSet resultSet) {

       if (resultSet != null) {
           try {
               resultSet.close();
           } catch (SQLException e) {
               e.printStackTrace();
           }
       }
       if (statement != null) {
           try {
               statement.close();
           } catch (SQLException e) {
               e.printStackTrace();
           }
       }
       if (connection != null) {
           try {
               connection.close();
           } catch (SQLException e) {
               e.printStackTrace();
           }
       }
   }

使用Spring的JDBC

上面已经回顾了一下以前我们的JDBC开发了,那么看看Spring对JDBC又是怎么优化的

首先,想要使用Spring的JDBC模块,就必须引入两个jar文件:

    public void save() {        try {            String sql = "insert into t_dept(deptName) values('test');";            Connection con = null;            Statement stmt = null;            Class.forName("com.mysql.jdbc.Driver");            // 连接对象            con = DriverManager.getConnection("jdbc:mysql:///hib_demo", "root", "root");            // 执行命令对象            stmt =  con.createStatement();            // 执行            stmt.execute(sql);            // 关闭            stmt.close();            con.close();        } catch (Exception e) {            e.printStackTrace();        }    }
       try {
           String sql = "insert into t_dept(deptName) values('test');";
           Connection con = null;
           Statement stmt = null;
           Class.forName("com.mysql.jdbc.Driver");
           // 连接对象
           con = DriverManager.getConnection("jdbc:mysql:///hib_demo", "root", "root");
           // 执行命令对象
           stmt =  con.createStatement();
           // 执行
           stmt.execute(sql);

           // 关闭
           stmt.close();
           con.close();
       } catch (Exception e) {
           e.printStackTrace();
       }
   }
    <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">        <property name="driverClass" value="com.mysql.jdbc.Driver"></property>        <property name="jdbcUrl" value="jdbc:mysql:///hib_demo"></property>        <property name="user" value="root"></property>        <property name="password" value="root"></property>        <property name="initialPoolSize" value="3"></property>        <property name="maxPoolSize" value="10"></property>        <property name="maxStatements" value="100"></property>        <property name="acquireIncrement" value="2"></property>    </bean>
       <property name="driverClass" value="com.mysql.jdbc.Driver"></property>
       <property name="jdbcUrl" value="jdbc:mysql:///hib_demo"></property>
       <property name="user" value="root"></property>
       <property name="password" value="root"></property>
       <property name="initialPoolSize" value="3"></property>
       <property name="maxPoolSize" value="10"></property>
       <property name="maxStatements" value="100"></property>
       <property name="acquireIncrement" value="2"></property>
   </bean>
    // IOC容器注入    private DataSource dataSource;    public void setDataSource(DataSource dataSource) {        this.dataSource = dataSource;    }    public void save() {        try {            String sql = "insert into t_dept(deptName) values('test');";            Connection con = null;            Statement stmt = null;            // 连接对象            con = dataSource.getConnection();            // 执行命令对象            stmt =  con.createStatement();            // 执行            stmt.execute(sql);            // 关闭            stmt.close();            con.close();        } catch (Exception e) {            e.printStackTrace();        }    }
   private DataSource dataSource;
   public void setDataSource(DataSource dataSource) {
       this.dataSource = dataSource;
   }


   public void save() {
       try {
           String sql = "insert into t_dept(deptName) values('test');";
           Connection con = null;
           Statement stmt = null;
           // 连接对象
           con = dataSource.getConnection();
           // 执行命令对象
           stmt =  con.createStatement();
           // 执行
           stmt.execute(sql);

           // 关闭
           stmt.close();
           con.close();
       } catch (Exception e) {
           e.printStackTrace();
       }
   }
<?xml version="1.0" encoding="UTF-8"?><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:c="http://www.springframework.org/schema/c"       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">    <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">        <property name="driverClass" value="com.mysql.jdbc.Driver"></property>        <property name="jdbcUrl" value="jdbc:mysql:///zhongfucheng"></property>        <property name="user" value="root"></property>        <property name="password" value="root"></property>        <property name="initialPoolSize" value="3"></property>        <property name="maxPoolSize" value="10"></property>        <property name="maxStatements" value="100"></property>        <property name="acquireIncrement" value="2"></property>    </bean>    <!--扫描注解-->    <context:component-scan base-package="bb"/>    <!-- 2. 创建JdbcTemplate对象 -->    <bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">        <property name="dataSource" ref="dataSource"></property>    </bean></beans>
<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:c="http://www.springframework.org/schema/c"
      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">


   <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
       <property name="driverClass" value="com.mysql.jdbc.Driver"></property>
       <property name="jdbcUrl" value="jdbc:mysql:///zhongfucheng"></property>
       <property name="user" value="root"></property>
       <property name="password" value="root"></property>
       <property name="initialPoolSize" value="3"></property>
       <property name="maxPoolSize" value="10"></property>
       <property name="maxStatements" value="100"></property>
       <property name="acquireIncrement" value="2"></property>
   </bean>

   <!--扫描注解-->
   <context:component-scan base-package="bb"/>

   <!-- 2. 创建JdbcTemplate对象 -->
   <bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
       <property name="dataSource" ref="dataSource"></property>
   </bean>

</beans>
package bb;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.jdbc.core.JdbcTemplate;import org.springframework.stereotype.Component;/** * Created by ozc on 2017/5/10. */@Componentpublic class UserDao implements IUser {    //使用Spring的自动装配    @Autowired    private JdbcTemplate template;    @Override    public void save() {        String sql = "insert into user(name,password) values('zhoggucheng','123')";        template.update(sql);    }}

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;

/**
* Created by ozc on 2017/5/10.
*/



@Component
public class UserDao implements IUser {

   //使用Spring的自动装配
   @Autowired
   private JdbcTemplate template;

   @Override
   public void save() {
       String sql = "insert into user(name,password) values('zhoggucheng','123')";
       template.update(sql);
   }

}
    @Test    public void test33() {        ApplicationContext ac = new ClassPathXmlApplicationContext("bb/bean.xml");        UserDao userDao = (UserDao) ac.getBean("userDao");        userDao.save();    }
   public void test33() {
       ApplicationContext ac = new ClassPathXmlApplicationContext("bb/bean.xml");

       UserDao userDao = (UserDao) ac.getBean("userDao");
       userDao.save();
   }
640?wx_fmt=png
这里写图片描述

JdbcTemplate查询

我们要是使用JdbcTemplate查询会发现有很多重载了query()方法

640?wx_fmt=png
这里写图片描述

一般地,如果我们使用queryForMap(),那么只能封装一行的数据,如果封装多行的数据、那么就会报错!并且,Spring是不知道我们想把一行数据封装成是什么样的,因此返回值是Map集合…我们得到Map集合的话还需要我们自己去转换成自己需要的类型。


我们一般使用下面这个方法:

640?wx_fmt=png
这里写图片描述

我们可以实现RowMapper,告诉Spriing我们将每行记录封装成怎么样的

    public void query(String id) {        String sql = "select * from USER where password=?";        List<User> query = template.query(sql, new RowMapper<User>() {            //将每行记录封装成User对象            @Override            public User mapRow(ResultSet resultSet, int i) throws SQLException {                User user = new User();                user.setName(resultSet.getString("name"));                user.setPassword(resultSet.getString("password"));                return user;            }        },id);        System.out.println(query);    }
       String sql = "select * from USER where password=?";

       List<User> query = template.query(sql, new RowMapper<User>() {


           //将每行记录封装成User对象
           @Override
           public User mapRow(ResultSet resultSet, int i) throws SQLException {
               User user = new User();
               user.setName(resultSet.getString("name"));
               user.setPassword(resultSet.getString("password"));

               return user;
           }

       },id);


       System.out.println(query);
   }
640?wx_fmt=png
这里写图片描述

当然了,一般我们都是将每行记录封装成一个JavaBean对象的,因此直接实现RowMapper,在使用的时候创建就好了

    class MyResult implements RowMapper<Dept>{        // 如何封装一行记录        @Override        public Dept mapRow(ResultSet rs, int index) throws SQLException {            Dept dept = new Dept();            dept.setDeptId(rs.getInt("deptId"));            dept.setDeptName(rs.getString("deptName"));            return dept;        }    }

       // 如何封装一行记录
       @Override
       public Dept mapRow(ResultSet rs, int index) throws SQLException {
           Dept dept = new Dept();
           dept.setDeptId(rs.getInt("deptId"));
           dept.setDeptName(rs.getString("deptName"));
           return dept;
       }

   }

事务控制概述

下面主要讲解Spring的事务控制,如何使用Spring来对程序进行事务控制….

一般地,我们事务控制都是在service层做的。。为什么是在service层而不是在dao层呢??有没有这样的疑问…

service层是业务逻辑层,service的方法一旦执行成功,那么说明该功能没有出错

一个service方法可能要调用dao层的多个方法…如果在dao层做事务控制的话,一个dao方法出错了,仅仅把事务回滚到当前dao的功能,这样是不合适的[因为我们的业务由多个dao方法组成]。如果没有出错,调用完dao方法就commit了事务,这也是不合适的[导致太多的commit操作]。

事务控制分为两种:

编程式事务控制

自己手动控制事务,就叫做编程式事务控制。

声明式事务控制

Spring提供对事务的控制管理就叫做声明式事务控制

Spring提供了对事务控制的实现。

Spring给我们提供了事务的管理器类,事务管理器类又分为两种,因为JDBC的事务和Hibernate的事务是不一样的


声明式事务控制

我们基于Spring的JDBC来做例子吧

引入相关jar包


搭建配置环境

public interface IUser {    void save();}interface IUser {
   void save();
}
@Repositorypublic class UserDao implements IUser {    //使用Spring的自动装配    @Autowired    private JdbcTemplate template;    @Override    public void save() {        String sql = "insert into user(name,password) values('zhong','222')";        template.update(sql);    }}
public class UserDao implements IUser {

   //使用Spring的自动装配
   @Autowired
   private JdbcTemplate template;

   @Override
   public void save() {
       String sql = "insert into user(name,password) values('zhong','222')";
       template.update(sql);
   }

}
@Servicepublic class UserService {    @Autowired    private UserDao userDao;    public void save() {        userDao.save();    }}
public class UserService {

   @Autowired
   private UserDao userDao;
   public void save() {

       userDao.save();
   }
}
<?xml version="1.0" encoding="UTF-8"?><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:c="http://www.springframework.org/schema/c"       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">    <!--数据连接池配置-->    <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">        <property name="driverClass" value="com.mysql.jdbc.Driver"></property>        <property name="jdbcUrl" value="jdbc:mysql:///zhongfucheng"></property>        <property name="user" value="root"></property>        <property name="password" value="root"></property>        <property name="initialPoolSize" value="3"></property>        <property name="maxPoolSize" value="10"></property>        <property name="maxStatements" value="100"></property>        <property name="acquireIncrement" value="2"></property>    </bean>    <!--扫描注解-->    <context:component-scan base-package="bb"/>    <!-- 2. 创建JdbcTemplate对象 -->    <bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">        <property name="dataSource" ref="dataSource"></property>    </bean></beans>
<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:c="http://www.springframework.org/schema/c"
      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">



   <!--数据连接池配置-->
   <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
       <property name="driverClass" value="com.mysql.jdbc.Driver"></property>
       <property name="jdbcUrl" value="jdbc:mysql:///zhongfucheng"></property>
       <property name="user" value="root"></property>
       <property name="password" value="root"></property>
       <property name="initialPoolSize" value="3"></property>
       <property name="maxPoolSize" value="10"></property>
       <property name="maxStatements" value="100"></property>
       <property name="acquireIncrement" value="2"></property>
   </bean>

   <!--扫描注解-->
   <context:component-scan base-package="bb"/>

   <!-- 2. 创建JdbcTemplate对象 -->
   <bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
       <property name="dataSource" ref="dataSource"></property>
   </bean>

</beans>

前面搭建环境的的时候,是没有任何的事务控制的。

也就是说,当我在service中调用两次userDao.save(),即时在中途中有异常抛出,还是可以在数据库插入一条记录的

@Servicepublic class UserService {    @Autowired    private UserDao userDao;    public void save() {        userDao.save();        int i = 1 / 0;        userDao.save();    }}
public class UserService {

   @Autowired
   private UserDao userDao;
   public void save() {

       userDao.save();

       int i = 1 / 0;
       userDao.save();
   }
}
public class Test2 {    @Test    public void test33() {        ApplicationContext ac = new ClassPathXmlApplicationContext("bb/bean.xml");        UserService userService = (UserService) ac.getBean("userService");        userService.save();    }}class Test2 {

   @Test
   public void test33() {
       ApplicationContext ac = new ClassPathXmlApplicationContext("bb/bean.xml");

       UserService userService = (UserService) ac.getBean("userService");
       userService.save();
   }
}
640?wx_fmt=png
这里写图片描述

XML方式实现声明式事务控制

首先,我们要配置事务的管理器类:因为JDBC和Hibernate的事务控制是不同的。

    <!--1.配置事务的管理器类:JDBC-->    <bean id="txManage" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">        <!--引用数据库连接池-->        <property name="dataSource" ref="dataSource"/>    </bean>
   <bean id="txManage" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">

       <!--引用数据库连接池-->
       <property name="dataSource" ref="dataSource"/>
   </bean>

再而,配置事务管理器类如何管理事务

    <!--2.配置如何管理事务-->    <tx:advice id="txAdvice" transaction-manager="txManage">        <!--配置事务的属性-->        <tx:attributes>            <!--所有的方法,并不是只读-->            <tx:method name="*" read-only="false"/>        </tx:attributes>    </tx:advice>
   <tx:advice id="txAdvice" transaction-manager="txManage">

       <!--配置事务的属性-->
       <tx:attributes>
           <!--所有的方法,并不是只读-->
           <tx:method name="*" read-only="false"/>
       </tx:attributes>
   </tx:advice>

最后,配置拦截哪些方法,

    <!--3.配置拦截哪些方法+事务的属性-->    <aop:config>        <aop:pointcut id="pt" expression="execution(* bb.UserService.*(..) )"/>        <aop:advisor advice-ref="txAdvice" pointcut-ref="pt"></aop:advisor>    </aop:config>
   <aop:config>
       <aop:pointcut id="pt" expression="execution(* bb.UserService.*(..) )"/>
       <aop:advisor advice-ref="txAdvice" pointcut-ref="pt"></aop:advisor>
   </aop:config>

配置完成之后,service中的方法都应该被Spring的声明式事务控制了。因此我们再次测试一下:

    @Test    public void test33() {        ApplicationContext ac = new ClassPathXmlApplicationContext("bb/bean.xml");        UserService userService = (UserService) ac.getBean("userService");        userService.save();    }
   public void test33() {
       ApplicationContext ac = new ClassPathXmlApplicationContext("bb/bean.xml");

       UserService userService = (UserService) ac.getBean("userService");
       userService.save();
   }
640?wx_fmt=png
这里写图片描述

使用注解的方法实现事务控制

当然了,有的人可能觉得到XML文件上配置太多东西了。Spring也提供了使用注解的方式来实现对事务控制

第一步和XML的是一样的,必须配置事务管理器类:

    <!--1.配置事务的管理器类:JDBC-->    <bean id="txManage" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">        <!--引用数据库连接池-->        <property name="dataSource" ref="dataSource"/>    </bean>
   <bean id="txManage" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">

       <!--引用数据库连接池-->
       <property name="dataSource" ref="dataSource"/>
   </bean>

第二步:开启以注解的方式来实现事务控制

    <!--开启以注解的方式实现事务控制-->    <tx:annotation-driven transaction-manager="txManage"/>
   <tx:annotation-driven transaction-manager="txManage"/>

最后,想要控制哪个方法事务,在其前面添加@Transactional这个注解就行了!如果想要控制整个类的事务,那么在类上面添加就行了。

    @Transactional    public void save() {        userDao.save();        int i = 1 / 0;        userDao.save();    }
   public void save() {

       userDao.save();

       int i = 1 / 0;
       userDao.save();
   }
640?wx_fmt=png
这里写图片描述

事务属性

其实我们在XML配置管理器类如何管理事务,就是在指定事务的属性!我们来看一下事务的属性有什么:

640?wx_fmt=png
这里写图片描述

对于事务的隔离级别,不清楚的朋友可参考我之前的博文:http://blog.csdn.net/hon_3y/article/details/53760782

事务传播行为:

看了上面的事务属性,没有接触过的其实就这么一个:propagation = Propagation.REQUIRED事务的传播行为。

事务传播行为的属性有以下这么多个,常用的就只有两个:

640?wx_fmt=png
这里写图片描述

当事务传播行为是Propagation.REQUIRED

    Class Log{            Propagation.REQUIRED              insertLog();      }REQUIRED  
           insertLog()
;  
   }
    Propagation.REQUIRED    Void  saveDept(){        insertLog();           saveDept();    }
       insertLog();  
       saveDept();
   }

saveDept()本身就存在着一个事务,当调用insertLog()的时候,insertLog()的事务会加入到saveDept()事务中

也就是说,saveDept()方法内始终是一个事务,如果在途中出现了异常,那么insertLog()的数据是会被回滚的【因为在同一事务内】

    Void  saveDept(){        insertLog();    // 加入当前事务        .. 异常, 会回滚        saveDept();    }
       insertLog();    // 加入当前事务
       .. 异常, 会回滚
       saveDept();
   }

当事务传播行为是Propagation.REQUIRED_NEW

    Class Log{            Propagation.REQUIRED              insertLog();      }REQUIRED  
           insertLog()
;  
   }
    Propagation.REQUIRED    Void  saveDept(){        insertLog();           saveDept();    }
       insertLog();  
       saveDept();
   }

当执行到saveDept()中的insertLog()方法时,insertLog()方法发现 saveDept()已经存在事务了,insertLog()会独自新开一个事务,直到事务关闭之后,再执行下面的方法

如果在中途中抛出了异常,insertLog()是不会回滚的,因为它的事务是自己的,已经提交了

    Void  saveDept(){        insertLog();    // 始终开启事务        .. 异常, 日志不会回滚        saveDept();    }
       insertLog();    // 始终开启事务
       .. 异常, 日志不会回滚
       saveDept();
   }

如果文章有错的地方欢迎指正,大家互相交流。习惯在微信看技术文章,想要获取更多的Java资源的同学,可以关注微信公众号:Java3y


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值