package jj.tech.paolu.repository.mybatis.dao;

import static jj.tech.paolu.repository.mybatis.dao.support.Idc9998AdminInfoDynamicSqlSupport.*;
import static org.mybatis.dynamic.sql.SqlBuilder.isEqualTo;

import jakarta.annotation.Generated;
import java.util.Collection;
import java.util.List;
import java.util.Optional;
import jj.tech.paolu.repository.mybatis.entity.Idc9998AdminInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.type.JdbcType;
import org.mybatis.dynamic.sql.BasicColumn;
import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter;
import org.mybatis.dynamic.sql.select.CountDSLCompleter;
import org.mybatis.dynamic.sql.select.SelectDSLCompleter;
import org.mybatis.dynamic.sql.select.render.SelectStatementProvider;
import org.mybatis.dynamic.sql.update.UpdateDSL;
import org.mybatis.dynamic.sql.update.UpdateDSLCompleter;
import org.mybatis.dynamic.sql.update.UpdateModel;
import org.mybatis.dynamic.sql.util.SqlProviderAdapter;
import org.mybatis.dynamic.sql.util.mybatis3.CommonCountMapper;
import org.mybatis.dynamic.sql.util.mybatis3.CommonDeleteMapper;
import org.mybatis.dynamic.sql.util.mybatis3.CommonInsertMapper;
import org.mybatis.dynamic.sql.util.mybatis3.CommonUpdateMapper;
import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils;

@Mapper
public interface Idc9998AdminInfoMapper extends CommonCountMapper, CommonDeleteMapper, CommonInsertMapper<Idc9998AdminInfo>, CommonUpdateMapper {
    @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2024-09-27T03:01:29.6651851+08:00", comments="Source Table: yx..idc9998_admin_info")
    BasicColumn[] selectList = BasicColumn.columnList(id, status, manager_name, member_name, user_name, user_password, domain, is_default, is_online, login_info, g_24, g_29, g_30, g_31, g_35, g_37);

    @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2024-09-27T03:01:29.6551804+08:00", comments="Source Table: yx..idc9998_admin_info")
    @SelectProvider(type=SqlProviderAdapter.class, method="select")
    @Results(id="Idc9998AdminInfoResult", value = {
        @Result(column="id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
        @Result(column="manager_name", property="manager_name", jdbcType=JdbcType.VARCHAR),
        @Result(column="member_name", property="member_name", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_name", property="user_name", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_password", property="user_password", jdbcType=JdbcType.VARCHAR),
        @Result(column="domain", property="domain", jdbcType=JdbcType.VARCHAR),
        @Result(column="is_default", property="is_default", jdbcType=JdbcType.INTEGER),
        @Result(column="is_online", property="is_online", jdbcType=JdbcType.INTEGER),
        @Result(column="login_info", property="login_info", jdbcType=JdbcType.VARCHAR),
        @Result(column="g_24", property="g_24", jdbcType=JdbcType.INTEGER),
        @Result(column="g_29", property="g_29", jdbcType=JdbcType.INTEGER),
        @Result(column="g_30", property="g_30", jdbcType=JdbcType.INTEGER),
        @Result(column="g_31", property="g_31", jdbcType=JdbcType.INTEGER),
        @Result(column="g_35", property="g_35", jdbcType=JdbcType.INTEGER),
        @Result(column="g_37", property="g_37", jdbcType=JdbcType.INTEGER)
    })
    List<Idc9998AdminInfo> selectMany(SelectStatementProvider selectStatement);

    @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2024-09-27T03:01:29.658183+08:00", comments="Source Table: yx..idc9998_admin_info")
    @SelectProvider(type=SqlProviderAdapter.class, method="select")
    @ResultMap("Idc9998AdminInfoResult")
    Optional<Idc9998AdminInfo> selectOne(SelectStatementProvider selectStatement);

    @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2024-09-27T03:01:29.658183+08:00", comments="Source Table: yx..idc9998_admin_info")
    default long count(CountDSLCompleter completer) {
        return MyBatis3Utils.countFrom(this::count, idc9998AdminInfo, completer);
    }

    @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2024-09-27T03:01:29.6591831+08:00", comments="Source Table: yx..idc9998_admin_info")
    default int delete(DeleteDSLCompleter completer) {
        return MyBatis3Utils.deleteFrom(this::delete, idc9998AdminInfo, completer);
    }

    @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2024-09-27T03:01:29.6591831+08:00", comments="Source Table: yx..idc9998_admin_info")
    default int deleteByPrimaryKey(String id_) {
        return delete(c -> 
            c.where(id, isEqualTo(id_))
        );
    }

    @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2024-09-27T03:01:29.6601834+08:00", comments="Source Table: yx..idc9998_admin_info")
    default int insert(Idc9998AdminInfo row) {
        return MyBatis3Utils.insert(this::insert, row, idc9998AdminInfo, c ->
            c.map(id).toProperty("id")
            .map(status).toProperty("status")
            .map(manager_name).toProperty("manager_name")
            .map(member_name).toProperty("member_name")
            .map(user_name).toProperty("user_name")
            .map(user_password).toProperty("user_password")
            .map(domain).toProperty("domain")
            .map(is_default).toProperty("is_default")
            .map(is_online).toProperty("is_online")
            .map(login_info).toProperty("login_info")
            .map(g_24).toProperty("g_24")
            .map(g_29).toProperty("g_29")
            .map(g_30).toProperty("g_30")
            .map(g_31).toProperty("g_31")
            .map(g_35).toProperty("g_35")
            .map(g_37).toProperty("g_37")
        );
    }

    @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2024-09-27T03:01:29.6631839+08:00", comments="Source Table: yx..idc9998_admin_info")
    default int insertMultiple(Collection<Idc9998AdminInfo> records) {
        return MyBatis3Utils.insertMultiple(this::insertMultiple, records, idc9998AdminInfo, c ->
            c.map(id).toProperty("id")
            .map(status).toProperty("status")
            .map(manager_name).toProperty("manager_name")
            .map(member_name).toProperty("member_name")
            .map(user_name).toProperty("user_name")
            .map(user_password).toProperty("user_password")
            .map(domain).toProperty("domain")
            .map(is_default).toProperty("is_default")
            .map(is_online).toProperty("is_online")
            .map(login_info).toProperty("login_info")
            .map(g_24).toProperty("g_24")
            .map(g_29).toProperty("g_29")
            .map(g_30).toProperty("g_30")
            .map(g_31).toProperty("g_31")
            .map(g_35).toProperty("g_35")
            .map(g_37).toProperty("g_37")
        );
    }

    @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2024-09-27T03:01:29.6641841+08:00", comments="Source Table: yx..idc9998_admin_info")
    default int insertSelective(Idc9998AdminInfo row) {
        return MyBatis3Utils.insert(this::insert, row, idc9998AdminInfo, c ->
            c.map(id).toPropertyWhenPresent("id", row::getId)
            .map(status).toPropertyWhenPresent("status", row::getStatus)
            .map(manager_name).toPropertyWhenPresent("manager_name", row::getManager_name)
            .map(member_name).toPropertyWhenPresent("member_name", row::getMember_name)
            .map(user_name).toPropertyWhenPresent("user_name", row::getUser_name)
            .map(user_password).toPropertyWhenPresent("user_password", row::getUser_password)
            .map(domain).toPropertyWhenPresent("domain", row::getDomain)
            .map(is_default).toPropertyWhenPresent("is_default", row::getIs_default)
            .map(is_online).toPropertyWhenPresent("is_online", row::getIs_online)
            .map(login_info).toPropertyWhenPresent("login_info", row::getLogin_info)
            .map(g_24).toPropertyWhenPresent("g_24", row::getG_24)
            .map(g_29).toPropertyWhenPresent("g_29", row::getG_29)
            .map(g_30).toPropertyWhenPresent("g_30", row::getG_30)
            .map(g_31).toPropertyWhenPresent("g_31", row::getG_31)
            .map(g_35).toPropertyWhenPresent("g_35", row::getG_35)
            .map(g_37).toPropertyWhenPresent("g_37", row::getG_37)
        );
    }

    @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2024-09-27T03:01:29.6661857+08:00", comments="Source Table: yx..idc9998_admin_info")
    default Optional<Idc9998AdminInfo> selectOne(SelectDSLCompleter completer) {
        return MyBatis3Utils.selectOne(this::selectOne, selectList, idc9998AdminInfo, completer);
    }

    @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2024-09-27T03:01:29.6661857+08:00", comments="Source Table: yx..idc9998_admin_info")
    default List<Idc9998AdminInfo> select(SelectDSLCompleter completer) {
        return MyBatis3Utils.selectList(this::selectMany, selectList, idc9998AdminInfo, completer);
    }

    @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2024-09-27T03:01:29.6671844+08:00", comments="Source Table: yx..idc9998_admin_info")
    default List<Idc9998AdminInfo> selectDistinct(SelectDSLCompleter completer) {
        return MyBatis3Utils.selectDistinct(this::selectMany, selectList, idc9998AdminInfo, completer);
    }

    @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2024-09-27T03:01:29.6671844+08:00", comments="Source Table: yx..idc9998_admin_info")
    default Optional<Idc9998AdminInfo> selectByPrimaryKey(String id_) {
        return selectOne(c ->
            c.where(id, isEqualTo(id_))
        );
    }

    @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2024-09-27T03:01:29.6681829+08:00", comments="Source Table: yx..idc9998_admin_info")
    default int update(UpdateDSLCompleter completer) {
        return MyBatis3Utils.update(this::update, idc9998AdminInfo, completer);
    }

    @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2024-09-27T03:01:29.6681829+08:00", comments="Source Table: yx..idc9998_admin_info")
    static UpdateDSL<UpdateModel> updateAllColumns(Idc9998AdminInfo row, UpdateDSL<UpdateModel> dsl) {
        return dsl.set(id).equalTo(row::getId)
                .set(status).equalTo(row::getStatus)
                .set(manager_name).equalTo(row::getManager_name)
                .set(member_name).equalTo(row::getMember_name)
                .set(user_name).equalTo(row::getUser_name)
                .set(user_password).equalTo(row::getUser_password)
                .set(domain).equalTo(row::getDomain)
                .set(is_default).equalTo(row::getIs_default)
                .set(is_online).equalTo(row::getIs_online)
                .set(login_info).equalTo(row::getLogin_info)
                .set(g_24).equalTo(row::getG_24)
                .set(g_29).equalTo(row::getG_29)
                .set(g_30).equalTo(row::getG_30)
                .set(g_31).equalTo(row::getG_31)
                .set(g_35).equalTo(row::getG_35)
                .set(g_37).equalTo(row::getG_37);
    }

    @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2024-09-27T03:01:29.6691836+08:00", comments="Source Table: yx..idc9998_admin_info")
    static UpdateDSL<UpdateModel> updateSelectiveColumns(Idc9998AdminInfo row, UpdateDSL<UpdateModel> dsl) {
        return dsl.set(id).equalToWhenPresent(row::getId)
                .set(status).equalToWhenPresent(row::getStatus)
                .set(manager_name).equalToWhenPresent(row::getManager_name)
                .set(member_name).equalToWhenPresent(row::getMember_name)
                .set(user_name).equalToWhenPresent(row::getUser_name)
                .set(user_password).equalToWhenPresent(row::getUser_password)
                .set(domain).equalToWhenPresent(row::getDomain)
                .set(is_default).equalToWhenPresent(row::getIs_default)
                .set(is_online).equalToWhenPresent(row::getIs_online)
                .set(login_info).equalToWhenPresent(row::getLogin_info)
                .set(g_24).equalToWhenPresent(row::getG_24)
                .set(g_29).equalToWhenPresent(row::getG_29)
                .set(g_30).equalToWhenPresent(row::getG_30)
                .set(g_31).equalToWhenPresent(row::getG_31)
                .set(g_35).equalToWhenPresent(row::getG_35)
                .set(g_37).equalToWhenPresent(row::getG_37);
    }

    @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2024-09-27T03:01:29.6701847+08:00", comments="Source Table: yx..idc9998_admin_info")
    default int updateByPrimaryKey(Idc9998AdminInfo row) {
        return update(c ->
            c.set(status).equalTo(row::getStatus)
            .set(manager_name).equalTo(row::getManager_name)
            .set(member_name).equalTo(row::getMember_name)
            .set(user_name).equalTo(row::getUser_name)
            .set(user_password).equalTo(row::getUser_password)
            .set(domain).equalTo(row::getDomain)
            .set(is_default).equalTo(row::getIs_default)
            .set(is_online).equalTo(row::getIs_online)
            .set(login_info).equalTo(row::getLogin_info)
            .set(g_24).equalTo(row::getG_24)
            .set(g_29).equalTo(row::getG_29)
            .set(g_30).equalTo(row::getG_30)
            .set(g_31).equalTo(row::getG_31)
            .set(g_35).equalTo(row::getG_35)
            .set(g_37).equalTo(row::getG_37)
            .where(id, isEqualTo(row::getId))
        );
    }

    @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2024-09-27T03:01:29.6701847+08:00", comments="Source Table: yx..idc9998_admin_info")
    default int updateByPrimaryKeySelective(Idc9998AdminInfo row) {
        return update(c ->
            c.set(status).equalToWhenPresent(row::getStatus)
            .set(manager_name).equalToWhenPresent(row::getManager_name)
            .set(member_name).equalToWhenPresent(row::getMember_name)
            .set(user_name).equalToWhenPresent(row::getUser_name)
            .set(user_password).equalToWhenPresent(row::getUser_password)
            .set(domain).equalToWhenPresent(row::getDomain)
            .set(is_default).equalToWhenPresent(row::getIs_default)
            .set(is_online).equalToWhenPresent(row::getIs_online)
            .set(login_info).equalToWhenPresent(row::getLogin_info)
            .set(g_24).equalToWhenPresent(row::getG_24)
            .set(g_29).equalToWhenPresent(row::getG_29)
            .set(g_30).equalToWhenPresent(row::getG_30)
            .set(g_31).equalToWhenPresent(row::getG_31)
            .set(g_35).equalToWhenPresent(row::getG_35)
            .set(g_37).equalToWhenPresent(row::getG_37)
            .where(id, isEqualTo(row::getId))
        );
    }
}