郑永安
2023-06-19 f65443d8abeaedc9d102324565e8368e7c9d90c8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package com.gk.firework.Domain.Utils;
 
import com.gk.firework.Domain.Enterprise;
 
public class DivideFlagUtil {
 
    private static  final int ENTERPRISE_TABLE = 20;
 
 
    public static int enterpriseDivideFlagGenerate(int size) {
 
        if (++size % ENTERPRISE_TABLE == 0)
            return ENTERPRISE_TABLE;
        return size % ENTERPRISE_TABLE;
    }
 
    public static void main(String[] args) {
        int i = enterpriseDivideFlagGenerate(20);
    }
}