类 GroupCapacityMapperByMysql

    • 构造器详细资料

      • GroupCapacityMapperByMysql

        public GroupCapacityMapperByMysql()
    • 方法详细资料

      • getTableName

        public java.lang.String getTableName()
        从接口复制的说明: Mapper
        Get the name of table.
        指定者:
        getTableName 在接口中 Mapper
        返回:
        The name of table.
      • getDataSource

        public java.lang.String getDataSource()
        从接口复制的说明: Mapper
        Get the datasource name.
        指定者:
        getDataSource 在接口中 Mapper
        返回:
        The name of datasource.
      • insertIntoSelect

        public java.lang.String insertIntoSelect()
        从接口复制的说明: GroupCapacityMapper
        INSERT INTO SELECT statement. Used to insert query results into a table.

        Example: INSERT INTO group_capacity (group_id, quota,`usage`, `max_size`, max_aggr_count, max_aggr_size,gmt_create, gmt_modified) SELECT ?, ?, count(*), ?, ?, ?, ?, ? FROM config_info;

        指定者:
        insertIntoSelect 在接口中 GroupCapacityMapper
        返回:
        sql.
      • insertIntoSelectByWhere

        public java.lang.String insertIntoSelectByWhere()
        从接口复制的说明: GroupCapacityMapper
        INSERT INTO SELECT statement. Used to insert query results into a table.

        Where condition: group_id=? AND tenant_id = ''

        Example: INSERT INTO group_capacity (group_id, quota,`usage`, `max_size`, max_aggr_count, max_aggr_size,gmt_create, gmt_modified) SELECT ?, ?, count(*), ?, ?, ?, ?, ? FROM config_info where group_id=? AND tenant_id = '';

        指定者:
        insertIntoSelectByWhere 在接口中 GroupCapacityMapper
        返回:
        sql.
      • incrementUsageByWhereQuotaEqualZero

        public java.lang.String incrementUsageByWhereQuotaEqualZero()
        从接口复制的说明: GroupCapacityMapper
        used to increment usage field.

        Where condition: group_id = ? AND usage < ? AND quota = 0;

        Example: UPDATE group_capacity SET `usage` = `usage` + 1, gmt_modified = ? WHERE group_id = ? AND `usage` < ? AND quota = 0;

        指定者:
        incrementUsageByWhereQuotaEqualZero 在接口中 GroupCapacityMapper
        返回:
      • incrementUsageByWhereQuotaNotEqualZero

        public java.lang.String incrementUsageByWhereQuotaNotEqualZero()
        从接口复制的说明: GroupCapacityMapper
        used to increment usage field.

        Where condition: group_id = ? AND usage < quota AND quota != 0

        Example: UPDATE group_capacity SET `usage` = `usage` + 1, gmt_modified = ? WHERE group_id = ? AND `usage` < quota AND quota != 0;

        指定者:
        incrementUsageByWhereQuotaNotEqualZero 在接口中 GroupCapacityMapper
        返回:
      • incrementUsageByWhere

        public java.lang.String incrementUsageByWhere()
        从接口复制的说明: GroupCapacityMapper
        used to increment usage field.

        Where condition: group_id = ?

        Example: UPDATE group_capacity SET `usage` = `usage` + 1, gmt_modified = ? WHERE group_id = ?;

        指定者:
        incrementUsageByWhere 在接口中 GroupCapacityMapper
        返回:
      • decrementUsageByWhere

        public java.lang.String decrementUsageByWhere()
        从接口复制的说明: GroupCapacityMapper
        used to decrement usage field.

        Where condition: group_id = ? AND `usage` > 0

        Example: UPDATE group_capacity SET `usage` = `usage` - 1, gmt_modified = ? WHERE group_id = ? AND `usage` > 0;

        指定者:
        decrementUsageByWhere 在接口中 GroupCapacityMapper
        返回:
      • updateUsage

        public java.lang.String updateUsage()
        从接口复制的说明: GroupCapacityMapper
        used to update usage field.

        Example: UPDATE group_capacity SET `usage` = (SELECT count(*) FROM config_info), gmt_modified = ? WHERE group_id = ?;

        指定者:
        updateUsage 在接口中 GroupCapacityMapper
        返回:
      • updateUsageByWhere

        public java.lang.String updateUsageByWhere()
        从接口复制的说明: GroupCapacityMapper
        used to update usage field.

        Where condition: group_id=? AND tenant_id = ''

        Example: UPDATE group_capacity SET `usage` = (SELECT count(*) FROM config_info WHERE group_id=? AND tenant_id = ''), gmt_modified = ? WHERE group_id= ?;

        指定者:
        updateUsageByWhere 在接口中 GroupCapacityMapper
        返回: