Parcourir la source

添加Java-DB类

tianyun il y a 3 ans
Parent
commit
69e9abc93b

+ 310 - 0
book-dao/src/main/java/com/book/dao/polardb/entity/SunChannel.java

@@ -0,0 +1,310 @@
+package com.book.dao.polardb.entity;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Arrays;
+import lombok.Data;
+
+@Data
+public class SunChannel implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column sun_channel.channel_id
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    private String channelId;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column sun_channel.account_name
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    private String accountName;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column sun_channel.channel_name
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    private String channelName;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    public static SunChannel.Builder builder() {
+        return new SunChannel.Builder();
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    public static class Builder {
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table sun_channel
+         *
+         * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+         */
+        private SunChannel obj;
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table sun_channel
+         *
+         * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+         */
+        public Builder() {
+            this.obj = new SunChannel();
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column sun_channel.channel_id
+         *
+         * @param channelId the value for sun_channel.channel_id
+         *
+         * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+         */
+        public Builder channelId(String channelId) {
+            obj.setChannelId(channelId);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column sun_channel.account_name
+         *
+         * @param accountName the value for sun_channel.account_name
+         *
+         * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+         */
+        public Builder accountName(String accountName) {
+            obj.setAccountName(accountName);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column sun_channel.channel_name
+         *
+         * @param channelName the value for sun_channel.channel_name
+         *
+         * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+         */
+        public Builder channelName(String channelName) {
+            obj.setChannelName(channelName);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table sun_channel
+         *
+         * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+         */
+        public SunChannel build() {
+            return this.obj;
+        }
+    }
+
+    /**
+     * This enum was generated by MyBatis Generator.
+     * This enum corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    public enum Column {
+        channelId("channel_id", "channelId", "VARCHAR", false),
+        accountName("account_name", "accountName", "VARCHAR", false),
+        channelName("channel_name", "channelName", "VARCHAR", false);
+
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table sun_channel
+         *
+         * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+         */
+        private static final String BEGINNING_DELIMITER = "\"";
+
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table sun_channel
+         *
+         * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+         */
+        private static final String ENDING_DELIMITER = "\"";
+
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table sun_channel
+         *
+         * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+         */
+        private final String column;
+
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table sun_channel
+         *
+         * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+         */
+        private final boolean isColumnNameDelimited;
+
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table sun_channel
+         *
+         * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+         */
+        private final String javaProperty;
+
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table sun_channel
+         *
+         * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+         */
+        private final String jdbcType;
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table sun_channel
+         *
+         * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+         */
+        public String value() {
+            return this.column;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table sun_channel
+         *
+         * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+         */
+        public String getValue() {
+            return this.column;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table sun_channel
+         *
+         * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+         */
+        public String getJavaProperty() {
+            return this.javaProperty;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table sun_channel
+         *
+         * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+         */
+        public String getJdbcType() {
+            return this.jdbcType;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table sun_channel
+         *
+         * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+         */
+        Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
+            this.column = column;
+            this.javaProperty = javaProperty;
+            this.jdbcType = jdbcType;
+            this.isColumnNameDelimited = isColumnNameDelimited;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table sun_channel
+         *
+         * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+         */
+        public String desc() {
+            return this.getEscapedColumnName() + " DESC";
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table sun_channel
+         *
+         * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+         */
+        public String asc() {
+            return this.getEscapedColumnName() + " ASC";
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table sun_channel
+         *
+         * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+         */
+        public static Column[] excludes(Column ... excludes) {
+            ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
+            if (excludes != null && excludes.length > 0) {
+                columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
+            }
+            return columns.toArray(new Column[]{});
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table sun_channel
+         *
+         * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+         */
+        public static Column[] all() {
+            return Column.values();
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table sun_channel
+         *
+         * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+         */
+        public String getEscapedColumnName() {
+            if (this.isColumnNameDelimited) {
+                return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
+            } else {
+                return this.column;
+            }
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table sun_channel
+         *
+         * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+         */
+        public String getAliasedEscapedColumnName() {
+            return this.getEscapedColumnName();
+        }
+    }
+}

+ 164 - 0
book-dao/src/main/java/com/book/dao/polardb/mapper/SunChannelMapper.java

@@ -0,0 +1,164 @@
+package com.book.dao.polardb.mapper;
+
+import com.book.dao.polardb.entity.SunChannel;
+import com.book.dao.polardb.pojo.example.SunChannelExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+@Mapper
+@Repository
+public interface SunChannelMapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    long countByExample(SunChannelExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    int deleteByExample(SunChannelExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    int deleteByPrimaryKey(String channelId);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    int insert(SunChannel record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    int insertSelective(@Param("record") SunChannel record, @Param("selective") SunChannel.Column ... selective);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    SunChannel selectOneByExample(SunChannelExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    SunChannel selectOneByExampleSelective(@Param("example") SunChannelExample example, @Param("selective") SunChannel.Column ... selective);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    List<SunChannel> selectByExampleSelective(@Param("example") SunChannelExample example, @Param("selective") SunChannel.Column ... selective);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    List<SunChannel> selectByExample(SunChannelExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    SunChannel selectByPrimaryKeySelective(@Param("channelId") String channelId, @Param("selective") SunChannel.Column ... selective);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    SunChannel selectByPrimaryKey(String channelId);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    int updateByExampleSelective(@Param("record") SunChannel record, @Param("example") SunChannelExample example, @Param("selective") SunChannel.Column ... selective);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    int updateByExample(@Param("record") SunChannel record, @Param("example") SunChannelExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    int updateByPrimaryKeySelective(@Param("record") SunChannel record, @Param("selective") SunChannel.Column ... selective);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    int updateByPrimaryKey(SunChannel record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    int batchInsert(@Param("list") List<SunChannel> list);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    int batchInsertSelective(@Param("list") List<SunChannel> list, @Param("selective") SunChannel.Column ... selective);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    int upsert(SunChannel record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    int upsertSelective(@Param("record") SunChannel record, @Param("selective") SunChannel.Column ... selective);
+}

+ 861 - 0
book-dao/src/main/java/com/book/dao/polardb/pojo/example/SunChannelExample.java

@@ -0,0 +1,861 @@
+package com.book.dao.polardb.pojo.example;
+
+import com.book.dao.polardb.entity.SunChannel;
+import java.util.ArrayList;
+import java.util.List;
+
+public class SunChannelExample {
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    protected String orderByClause;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    protected boolean distinct;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    protected List<Criteria> oredCriteria;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    protected Integer offset;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    protected Integer rows;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    public SunChannelExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    public SunChannelExample orderBy(String orderByClause) {
+        this.setOrderByClause(orderByClause);
+        return this;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    public SunChannelExample orderBy(String ... orderByClauses) {
+        StringBuffer sb = new StringBuffer();
+        for (int i = 0; i < orderByClauses.length; i++) {
+            sb.append(orderByClauses[i]);
+            if (i < orderByClauses.length - 1) {
+                sb.append(" , ");
+            }
+        }
+        this.setOrderByClause(sb.toString());
+        return this;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria(this);
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+        rows = null;
+        offset = null;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    public void setOffset(Integer offset) {
+        this.offset = offset;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    public Integer getOffset() {
+        return this.offset;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    public void setRows(Integer rows) {
+        this.rows = rows;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    public Integer getRows() {
+        return this.rows;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    public SunChannelExample limit(Integer rows) {
+        this.rows = rows;
+        return this;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    public SunChannelExample limit(Integer offset, Integer rows) {
+        this.offset = offset;
+        this.rows = rows;
+        return this;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    public SunChannelExample page(Integer page, Integer pageSize) {
+        this.offset = page * pageSize;
+        this.rows = pageSize;
+        return this;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    public static Criteria newAndCreateCriteria() {
+        SunChannelExample example = new SunChannelExample();
+        return example.createCriteria();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    public SunChannelExample when(boolean condition, IExampleWhen then) {
+        if (condition) {
+            then.example(this);
+        }
+        return this;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    public SunChannelExample when(boolean condition, IExampleWhen then, IExampleWhen otherwise) {
+        if (condition) {
+            then.example(this);
+        } else {
+            otherwise.example(this);
+        }
+        return this;
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andChannelIdIsNull() {
+            addCriterion("channel_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelIdIsNotNull() {
+            addCriterion("channel_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelIdEqualTo(String value) {
+            addCriterion("channel_id =", value, "channelId");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelIdEqualToColumn(SunChannel.Column column) {
+            addCriterion(new StringBuilder("channel_id = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelIdNotEqualTo(String value) {
+            addCriterion("channel_id <>", value, "channelId");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelIdNotEqualToColumn(SunChannel.Column column) {
+            addCriterion(new StringBuilder("channel_id <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelIdGreaterThan(String value) {
+            addCriterion("channel_id >", value, "channelId");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelIdGreaterThanColumn(SunChannel.Column column) {
+            addCriterion(new StringBuilder("channel_id > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelIdGreaterThanOrEqualTo(String value) {
+            addCriterion("channel_id >=", value, "channelId");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelIdGreaterThanOrEqualToColumn(SunChannel.Column column) {
+            addCriterion(new StringBuilder("channel_id >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelIdLessThan(String value) {
+            addCriterion("channel_id <", value, "channelId");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelIdLessThanColumn(SunChannel.Column column) {
+            addCriterion(new StringBuilder("channel_id < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelIdLessThanOrEqualTo(String value) {
+            addCriterion("channel_id <=", value, "channelId");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelIdLessThanOrEqualToColumn(SunChannel.Column column) {
+            addCriterion(new StringBuilder("channel_id <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelIdLike(String value) {
+            addCriterion("channel_id like", value, "channelId");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelIdNotLike(String value) {
+            addCriterion("channel_id not like", value, "channelId");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelIdIn(List<String> values) {
+            addCriterion("channel_id in", values, "channelId");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelIdNotIn(List<String> values) {
+            addCriterion("channel_id not in", values, "channelId");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelIdBetween(String value1, String value2) {
+            addCriterion("channel_id between", value1, value2, "channelId");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelIdNotBetween(String value1, String value2) {
+            addCriterion("channel_id not between", value1, value2, "channelId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountNameIsNull() {
+            addCriterion("account_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountNameIsNotNull() {
+            addCriterion("account_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountNameEqualTo(String value) {
+            addCriterion("account_name =", value, "accountName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountNameEqualToColumn(SunChannel.Column column) {
+            addCriterion(new StringBuilder("account_name = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountNameNotEqualTo(String value) {
+            addCriterion("account_name <>", value, "accountName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountNameNotEqualToColumn(SunChannel.Column column) {
+            addCriterion(new StringBuilder("account_name <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountNameGreaterThan(String value) {
+            addCriterion("account_name >", value, "accountName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountNameGreaterThanColumn(SunChannel.Column column) {
+            addCriterion(new StringBuilder("account_name > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountNameGreaterThanOrEqualTo(String value) {
+            addCriterion("account_name >=", value, "accountName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountNameGreaterThanOrEqualToColumn(SunChannel.Column column) {
+            addCriterion(new StringBuilder("account_name >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountNameLessThan(String value) {
+            addCriterion("account_name <", value, "accountName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountNameLessThanColumn(SunChannel.Column column) {
+            addCriterion(new StringBuilder("account_name < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountNameLessThanOrEqualTo(String value) {
+            addCriterion("account_name <=", value, "accountName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountNameLessThanOrEqualToColumn(SunChannel.Column column) {
+            addCriterion(new StringBuilder("account_name <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountNameLike(String value) {
+            addCriterion("account_name like", value, "accountName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountNameNotLike(String value) {
+            addCriterion("account_name not like", value, "accountName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountNameIn(List<String> values) {
+            addCriterion("account_name in", values, "accountName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountNameNotIn(List<String> values) {
+            addCriterion("account_name not in", values, "accountName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountNameBetween(String value1, String value2) {
+            addCriterion("account_name between", value1, value2, "accountName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountNameNotBetween(String value1, String value2) {
+            addCriterion("account_name not between", value1, value2, "accountName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelNameIsNull() {
+            addCriterion("channel_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelNameIsNotNull() {
+            addCriterion("channel_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelNameEqualTo(String value) {
+            addCriterion("channel_name =", value, "channelName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelNameEqualToColumn(SunChannel.Column column) {
+            addCriterion(new StringBuilder("channel_name = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelNameNotEqualTo(String value) {
+            addCriterion("channel_name <>", value, "channelName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelNameNotEqualToColumn(SunChannel.Column column) {
+            addCriterion(new StringBuilder("channel_name <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelNameGreaterThan(String value) {
+            addCriterion("channel_name >", value, "channelName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelNameGreaterThanColumn(SunChannel.Column column) {
+            addCriterion(new StringBuilder("channel_name > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelNameGreaterThanOrEqualTo(String value) {
+            addCriterion("channel_name >=", value, "channelName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelNameGreaterThanOrEqualToColumn(SunChannel.Column column) {
+            addCriterion(new StringBuilder("channel_name >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelNameLessThan(String value) {
+            addCriterion("channel_name <", value, "channelName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelNameLessThanColumn(SunChannel.Column column) {
+            addCriterion(new StringBuilder("channel_name < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelNameLessThanOrEqualTo(String value) {
+            addCriterion("channel_name <=", value, "channelName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelNameLessThanOrEqualToColumn(SunChannel.Column column) {
+            addCriterion(new StringBuilder("channel_name <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelNameLike(String value) {
+            addCriterion("channel_name like", value, "channelName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelNameNotLike(String value) {
+            addCriterion("channel_name not like", value, "channelName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelNameIn(List<String> values) {
+            addCriterion("channel_name in", values, "channelName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelNameNotIn(List<String> values) {
+            addCriterion("channel_name not in", values, "channelName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelNameBetween(String value1, String value2) {
+            addCriterion("channel_name between", value1, value2, "channelName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelNameNotBetween(String value1, String value2) {
+            addCriterion("channel_name not between", value1, value2, "channelName");
+            return (Criteria) this;
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table sun_channel
+     *
+     * @mbg.generated do_not_delete_during_merge Wed Sep 29 19:29:34 CST 2021
+     */
+    public static class Criteria extends GeneratedCriteria {
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table sun_channel
+         *
+         * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+         */
+        private SunChannelExample example;
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table sun_channel
+         *
+         * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+         */
+        protected Criteria(SunChannelExample example) {
+            super();
+            this.example = example;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table sun_channel
+         *
+         * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+         */
+        public SunChannelExample example() {
+            return this.example;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table sun_channel
+         *
+         * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+         */
+        @Deprecated
+        public Criteria andIf(boolean ifAdd, ICriteriaAdd add) {
+            if (ifAdd) {
+                add.add(this);
+            }
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table sun_channel
+         *
+         * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+         */
+        public Criteria when(boolean condition, ICriteriaWhen then) {
+            if (condition) {
+                then.criteria(this);
+            }
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table sun_channel
+         *
+         * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+         */
+        public Criteria when(boolean condition, ICriteriaWhen then, ICriteriaWhen otherwise) {
+            if (condition) {
+                then.criteria(this);
+            } else {
+                otherwise.criteria(this);
+            }
+            return this;
+        }
+
+        @Deprecated
+        public interface ICriteriaAdd {
+            /**
+             * This method was generated by MyBatis Generator.
+             * This method corresponds to the database table sun_channel
+             *
+             * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+             */
+            Criteria add(Criteria add);
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table sun_channel
+     *
+     * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+     */
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+
+    public interface ICriteriaWhen {
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table sun_channel
+         *
+         * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+         */
+        void criteria(Criteria criteria);
+    }
+
+    public interface IExampleWhen {
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table sun_channel
+         *
+         * @mbg.generated Wed Sep 29 19:29:34 CST 2021
+         */
+        void example(com.book.dao.polardb.pojo.example.SunChannelExample example);
+    }
+}

+ 532 - 0
book-dao/src/main/resources/mapper/polar/SunChannelMapper.xml

@@ -0,0 +1,532 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.book.dao.polardb.mapper.SunChannelMapper">
+  <resultMap id="BaseResultMap" type="com.book.dao.polardb.entity.SunChannel">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 29 19:29:34 CST 2021.
+    -->
+    <id column="channel_id" jdbcType="VARCHAR" property="channelId" />
+    <result column="account_name" jdbcType="VARCHAR" property="accountName" />
+    <result column="channel_name" jdbcType="VARCHAR" property="channelName" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 29 19:29:34 CST 2021.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 29 19:29:34 CST 2021.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 29 19:29:34 CST 2021.
+    -->
+    channel_id, account_name, channel_name
+  </sql>
+  <select id="selectByExample" parameterType="com.book.dao.polardb.pojo.example.SunChannelExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 29 19:29:34 CST 2021.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from sun_channel
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    <if test="rows != null">
+      <if test="offset != null">
+        limit ${offset}, ${rows}
+      </if>
+      <if test="offset == null">
+        limit ${rows}
+      </if>
+    </if>
+  </select>
+  <select id="selectByExampleSelective" parameterType="map" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 29 19:29:34 CST 2021.
+    -->
+    select
+    <if test="example != null and example.distinct">
+      distinct
+    </if>
+    <choose>
+      <when test="selective != null and selective.length > 0">
+        <foreach collection="selective" item="column" separator=",">
+          ${column.aliasedEscapedColumnName}
+        </foreach>
+      </when>
+      <otherwise>
+        <include refid="Base_Column_List" />
+      </otherwise>
+    </choose>
+    from sun_channel
+    <if test="example != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+    <if test="example != null and example.orderByClause != null">
+      order by ${example.orderByClause}
+    </if>
+    <if test="example != null and example.rows != null">
+      <if test="example.offset != null">
+        limit ${example.offset}, ${example.rows}
+      </if>
+      <if test="example.offset == null">
+        limit ${example.rows}
+      </if>
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 29 19:29:34 CST 2021.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from sun_channel
+    where channel_id = #{channelId,jdbcType=VARCHAR}
+  </select>
+  <select id="selectByPrimaryKeySelective" parameterType="map" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 29 19:29:34 CST 2021.
+    -->
+    select
+    <choose>
+      <when test="selective != null and selective.length > 0">
+        <foreach collection="selective" item="column" separator=",">
+          ${column.aliasedEscapedColumnName}
+        </foreach>
+      </when>
+      <otherwise>
+        <include refid="Base_Column_List" />
+      </otherwise>
+    </choose>
+    from sun_channel
+    where channel_id = #{channelId,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 29 19:29:34 CST 2021.
+    -->
+    delete from sun_channel
+    where channel_id = #{channelId,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.book.dao.polardb.pojo.example.SunChannelExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 29 19:29:34 CST 2021.
+    -->
+    delete from sun_channel
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.book.dao.polardb.entity.SunChannel">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 29 19:29:34 CST 2021.
+    -->
+    insert into sun_channel (channel_id, account_name, channel_name
+      )
+    values (#{channelId,jdbcType=VARCHAR}, #{accountName,jdbcType=VARCHAR}, #{channelName,jdbcType=VARCHAR}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 29 19:29:34 CST 2021.
+    -->
+    insert into sun_channel
+    <choose>
+      <when test="selective != null and selective.length > 0">
+        <foreach close=")" collection="selective" item="column" open="(" separator=",">
+          ${column.escapedColumnName}
+        </foreach>
+      </when>
+      <otherwise>
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+          <if test="record.channelId != null">
+            channel_id,
+          </if>
+          <if test="record.accountName != null">
+            account_name,
+          </if>
+          <if test="record.channelName != null">
+            channel_name,
+          </if>
+        </trim>
+        <trim prefix="(" suffix=")" suffixOverrides="," />
+      </otherwise>
+    </choose>
+    values
+    <choose>
+      <when test="selective != null and selective.length > 0">
+        <foreach close=")" collection="selective" item="column" open="(" separator=",">
+          #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
+        </foreach>
+      </when>
+      <otherwise>
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+          <if test="record.channelId != null">
+            #{record.channelId,jdbcType=VARCHAR},
+          </if>
+          <if test="record.accountName != null">
+            #{record.accountName,jdbcType=VARCHAR},
+          </if>
+          <if test="record.channelName != null">
+            #{record.channelName,jdbcType=VARCHAR},
+          </if>
+        </trim>
+      </otherwise>
+    </choose>
+  </insert>
+  <select id="countByExample" parameterType="com.book.dao.polardb.pojo.example.SunChannelExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 29 19:29:34 CST 2021.
+    -->
+    select count(*) from sun_channel
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 29 19:29:34 CST 2021.
+    -->
+    update sun_channel
+    SET
+    <choose>
+      <when test="selective != null and selective.length > 0">
+        <foreach collection="selective" item="column" separator=",">
+          ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
+        </foreach>
+      </when>
+      <otherwise>
+        <trim suffixOverrides=",">
+          <if test="record.channelId != null">
+            channel_id = #{record.channelId,jdbcType=VARCHAR},
+          </if>
+          <if test="record.accountName != null">
+            account_name = #{record.accountName,jdbcType=VARCHAR},
+          </if>
+          <if test="record.channelName != null">
+            channel_name = #{record.channelName,jdbcType=VARCHAR},
+          </if>
+        </trim>
+      </otherwise>
+    </choose>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 29 19:29:34 CST 2021.
+    -->
+    update sun_channel
+    set channel_id = #{record.channelId,jdbcType=VARCHAR},
+      account_name = #{record.accountName,jdbcType=VARCHAR},
+      channel_name = #{record.channelName,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 29 19:29:34 CST 2021.
+    -->
+    update sun_channel
+    SET
+    <choose>
+      <when test="selective != null and selective.length > 0">
+        <foreach collection="selective" item="column" separator=",">
+          ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
+        </foreach>
+      </when>
+      <otherwise>
+        <trim suffixOverrides=",">
+          <if test="record.accountName != null">
+            account_name = #{record.accountName,jdbcType=VARCHAR},
+          </if>
+          <if test="record.channelName != null">
+            channel_name = #{record.channelName,jdbcType=VARCHAR},
+          </if>
+        </trim>
+      </otherwise>
+    </choose>
+    where channel_id = #{record.channelId,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.book.dao.polardb.entity.SunChannel">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 29 19:29:34 CST 2021.
+    -->
+    update sun_channel
+    set account_name = #{accountName,jdbcType=VARCHAR},
+      channel_name = #{channelName,jdbcType=VARCHAR}
+    where channel_id = #{channelId,jdbcType=VARCHAR}
+  </update>
+  <select id="selectOneByExample" parameterType="com.book.dao.polardb.pojo.example.SunChannelExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 29 19:29:34 CST 2021.
+    -->
+    select
+    <include refid="Base_Column_List" />
+    from sun_channel
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    limit 1
+  </select>
+  <select id="selectOneByExampleSelective" parameterType="map" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 29 19:29:34 CST 2021.
+    -->
+    select
+    <choose>
+      <when test="selective != null and selective.length > 0">
+        <foreach collection="selective" item="column" separator=",">
+          ${column.aliasedEscapedColumnName}
+        </foreach>
+      </when>
+      <otherwise>
+        <include refid="Base_Column_List" />
+      </otherwise>
+    </choose>
+    from sun_channel
+    <if test="example != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+    <if test="example != null and example.orderByClause != null">
+      order by ${example.orderByClause}
+    </if>
+    limit 1
+  </select>
+  <insert id="batchInsert" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 29 19:29:34 CST 2021.
+    -->
+    insert into sun_channel
+    (channel_id, account_name, channel_name)
+    values
+    <foreach collection="list" item="item" separator=",">
+      (#{item.channelId,jdbcType=VARCHAR}, #{item.accountName,jdbcType=VARCHAR}, #{item.channelName,jdbcType=VARCHAR}
+        )
+    </foreach>
+  </insert>
+  <insert id="batchInsertSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 29 19:29:34 CST 2021.
+    -->
+    insert into sun_channel (
+    <foreach collection="selective" item="column" separator=",">
+      ${column.escapedColumnName}
+    </foreach>
+    )
+    values
+    <foreach collection="list" item="item" separator=",">
+      (
+      <foreach collection="selective" item="column" separator=",">
+        <if test="'channel_id'.toString() == column.value">
+          #{item.channelId,jdbcType=VARCHAR}
+        </if>
+        <if test="'account_name'.toString() == column.value">
+          #{item.accountName,jdbcType=VARCHAR}
+        </if>
+        <if test="'channel_name'.toString() == column.value">
+          #{item.channelName,jdbcType=VARCHAR}
+        </if>
+      </foreach>
+      )
+    </foreach>
+  </insert>
+  <insert id="upsertSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 29 19:29:34 CST 2021.
+    -->
+    insert into sun_channel
+    <choose>
+      <when test="selective != null and selective.length > 0">
+        <foreach close=")" collection="selective" item="column" open="(" separator=",">
+          ${column.escapedColumnName}
+        </foreach>
+      </when>
+      <otherwise>
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+          <if test="record.channelId != null">
+            channel_id,
+          </if>
+          <if test="record.accountName != null">
+            account_name,
+          </if>
+          <if test="record.channelName != null">
+            channel_name,
+          </if>
+        </trim>
+        <trim prefix="(" suffix=")" suffixOverrides="," />
+      </otherwise>
+    </choose>
+    values
+    <choose>
+      <when test="selective != null and selective.length > 0">
+        <foreach close=")" collection="selective" item="column" open="(" separator=",">
+          #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
+        </foreach>
+      </when>
+      <otherwise>
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+          <if test="record.channelId != null">
+            #{record.channelId,jdbcType=VARCHAR},
+          </if>
+          <if test="record.accountName != null">
+            #{record.accountName,jdbcType=VARCHAR},
+          </if>
+          <if test="record.channelName != null">
+            #{record.channelName,jdbcType=VARCHAR},
+          </if>
+        </trim>
+      </otherwise>
+    </choose>
+    on duplicate key update 
+    <choose>
+      <when test="selective != null and selective.length > 0">
+        <foreach collection="selective" item="column" separator=",">
+          ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
+        </foreach>
+      </when>
+      <otherwise>
+        <trim suffixOverrides=",">
+          <if test="record.channelId != null">
+            channel_id = #{record.channelId,jdbcType=VARCHAR},
+          </if>
+          <if test="record.accountName != null">
+            account_name = #{record.accountName,jdbcType=VARCHAR},
+          </if>
+          <if test="record.channelName != null">
+            channel_name = #{record.channelName,jdbcType=VARCHAR},
+          </if>
+        </trim>
+      </otherwise>
+    </choose>
+  </insert>
+  <insert id="upsert" parameterType="com.book.dao.polardb.entity.SunChannel">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Sep 29 19:29:34 CST 2021.
+    -->
+    insert into sun_channel
+    (channel_id, account_name, channel_name)
+    values
+    (#{channelId,jdbcType=VARCHAR}, #{accountName,jdbcType=VARCHAR}, #{channelName,jdbcType=VARCHAR}
+      )
+    on duplicate key update 
+    channel_id = #{channelId,jdbcType=VARCHAR}, 
+    account_name = #{accountName,jdbcType=VARCHAR}, 
+    channel_name = #{channelName,jdbcType=VARCHAR}
+  </insert>
+</mapper>

+ 15 - 14
book-dao/src/main/resources/polar-mybatis-generator.xml

@@ -119,20 +119,21 @@
                              targetProject="src/main/java" type="XMLMAPPER"/>
 
         <!--指定数据表名,可以使用_和%通配符,可以配置generatedKey,会返回insert之后的id-->
-<!--        <table tableName="book"></table>-->
-<!--        <table tableName="manage_block"></table>-->
-<!--        <table tableName="manage_block_resource"></table>-->
-<!--        <table tableName="book_category"></table>-->
-<!--        <table tableName="user"></table>-->
-<!--        <table tableName="search_keyword"></table>-->
-<!--        <table tableName="return_recommand"></table>-->
-<!--        <table tableName="bookshelf_recommand"></table>-->
-<!--        <table tableName="smart_recommand"></table>-->
-<!--        <table tableName="ad_user_group_extend"></table>-->
-<!--        <table tableName="ad_user_group_extend"/>-->
-                <table tableName="sun_user_collect"/>
-                <table tableName="sun_order"/>
-                <table tableName="sun_order_collect"/>
+        <!--        <table tableName="book"></table>-->
+        <!--        <table tableName="manage_block"></table>-->
+        <!--        <table tableName="manage_block_resource"></table>-->
+        <!--        <table tableName="book_category"></table>-->
+        <!--        <table tableName="user"></table>-->
+        <!--        <table tableName="search_keyword"></table>-->
+        <!--        <table tableName="return_recommand"></table>-->
+        <!--        <table tableName="bookshelf_recommand"></table>-->
+        <!--        <table tableName="smart_recommand"></table>-->
+        <!--        <table tableName="ad_user_group_extend"></table>-->
+        <!--        <table tableName="ad_user_group_extend"/>-->
+        <!--        <table tableName="sun_user_collect"/>-->
+        <!--        <table tableName="sun_order"/>-->
+        <!--        <table tableName="sun_order_collect"/>-->
+        <table tableName="sun_channel"></table>
     </context>
 
 </generatorConfiguration>