package com.panzhihua.service_community.service.impl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.panzhihua.common.model.dtos.property.CommonPage;
|
import com.panzhihua.common.model.vos.R;
|
import com.panzhihua.service_community.entity.ComAreaTownCommunity;
|
import com.panzhihua.service_community.dao.ComAreaTownCommunityDao;
|
import com.panzhihua.service_community.service.ComAreaTownCommunityService;
|
import lombok.extern.slf4j.Slf4j;
|
import org.apache.commons.lang3.ArrayUtils;
|
import org.springframework.stereotype.Service;
|
|
import java.util.ArrayList;
|
import java.util.Arrays;
|
import java.util.Random;
|
import java.util.stream.Collectors;
|
|
/**
|
* (ComAreaTownCommunity)表服务实现类
|
* projectName 成都呐喊信息技术有限公司-智慧社区项目
|
* description: 相关功能
|
*
|
* @author zzj
|
* @since 2022-04-10 17:37:33
|
*/
|
@Slf4j
|
@Service
|
public class ComAreaTownCommunityServiceImpl extends ServiceImpl<ComAreaTownCommunityDao, ComAreaTownCommunity> implements ComAreaTownCommunityService {
|
|
@Override
|
public R pageList(CommonPage commonPage) {
|
return null;
|
}
|
|
private Integer[] A={6,7,8,9,10,11};
|
|
private Integer[] B={12,13,14,15,16,17,18,19,20,21,22};
|
|
private Integer[] C={23,24,25,26,27,28,29,30,31,32,33};
|
|
private Integer[] D={10,11,12,13,14};
|
|
public void test(){
|
Random random=new Random();
|
Integer a=random.nextInt(A.length);
|
Integer a_f=A[a];
|
Integer b=random.nextInt(B.length);
|
Integer b_f=B[b];
|
Integer[] B1=ArrayUtils.remove(B,b);
|
Integer c=random.nextInt(B1.length);
|
Integer c_f=B1[c];
|
Integer d=random.nextInt(C.length);
|
Integer d_f=C[d];
|
Integer[] c1=ArrayUtils.remove(C,d);
|
Integer e=random.nextInt(c1.length);
|
Integer e_f=c1[e];
|
Integer[] c2=ArrayUtils.remove(c1,e);
|
Integer f=random.nextInt(c2.length);
|
Integer f_f=c2[f];
|
Integer g=random.nextInt(D.length);
|
Integer g_f=D[g];
|
Integer[] fi={a_f,+b_f,c_f,d_f,+e_f,f_f};
|
Arrays.sort(fi);
|
Integer[] ffi=ArrayUtils.add(fi,g_f);
|
System.out.println(Arrays.toString(ffi));
|
}
|
|
public static void main(String[] args) {
|
System.out.println("今日开奖预测:");
|
for (int i=0;i<5;i++){
|
ComAreaTownCommunityServiceImpl communityService=new ComAreaTownCommunityServiceImpl();
|
communityService.test();
|
}
|
}
|
}
|