xiaoyong931011
2023-03-02 a0e33f06495287496a2e81ef5675b4cf7a2dfe5c
src/main/java/cc/mrbird/febs/mall/controller/AdminSystemController.java
@@ -22,6 +22,8 @@
import org.springframework.web.bind.annotation.RestController;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@Slf4j
@@ -132,4 +134,29 @@
        dataDictionaryCustomMapper.updateById(dic);
        return new FebsResponse().success();
    }
//    public static void main(String[] args) {
//        List<Integer> lines = Arrays.asList(new Integer[]{1, 1, 0,  1, 1, 0, 0, 1, 0,  1, 1, 0, 1, 0, 1, 0});
//        //数字连续出现的计数
//        Integer symbol = 0;
//        //数字连续出现的次数限制
//        Integer times = 3;
//        //出现的数字
//        Integer symbolNum = 1;
//        //满足规则的次数
//        Integer timesOneSign = 0;
//        for(int i=0;i<lines.size();i++){
//            if(symbolNum == lines.get(i)){
//                symbol = symbol + 1;
//                if(symbol >= times){
//                    timesOneSign = timesOneSign + 1;
//                    symbol = 0;
//                }
//            }else{
//                symbol = 0;
//            }
//        }
//
//        System.out.println(timesOneSign);
//    }
}