Commit 16b0670e by 陶光胜

Merge branch 'developer' of…

Merge branch 'developer' of http://115.159.76.241/base_platform_enterprise/gic-enterprise-base into developer
parents f5d80ca7 0331dd8c
package com.gic.enterprise.qo;
import java.io.Serializable;
/**
* 分页数据
* @ClassName: PageQO

* @Description: 

* @author guojuxing

* @date 2019/8/13 11:29 AM

*/
public class PageQO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 页码
*/
private Integer currentPage = 1;
/**
* 分页大小
*/
private Integer pageSize = 20;
public Integer getCurrentPage() {
return currentPage;
}
public void setCurrentPage(Integer currentPage) {
this.currentPage = currentPage;
}
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
}
package com.gic.enterprise.utils;
import java.util.Random;
/**
* 生成随机数工具类
* @ClassName: CreatePasswordAutoUtils

* @Description: 

* @author guojuxing

* @date 2019/8/9 4:39 PM

*/
public class CreateRandomUtils {
/**
* 随机生成字母、数字参合的密码
* @param length 生成多少位数的密码
* @return
*/
public static String getStringRandom(int length) {
String val = "";
Random random = new Random();
//length为几位密码
for (int i = 0; i < length; i++) {
String charOrNum = random.nextInt(2) % 2 == 0 ? "char" : "num";
//输出字母还是数字
if ("char".equalsIgnoreCase(charOrNum)) {
//输出是大写字母还是小写字母
int temp = random.nextInt(2) % 2 == 0 ? 65 : 97;
val += (char) (random.nextInt(26) + temp);
} else if ("num".equalsIgnoreCase(charOrNum)) {
val += String.valueOf(random.nextInt(10));
}
}
return val;
}
/**
* 随机生成0-9的数字
* @Title: generateNumberStr

* @Description:

 * @author guojuxing
* @param length
 生成多少位数
* @return java.lang.String


 */
public static String generateNumberStr(int length) {
String numberChar = "0123456789";
StringBuilder sb = new StringBuilder();
Random random = new Random();
for (int i = 0; i < length; i++) {
sb.append(numberChar.charAt(random.nextInt(numberChar.length())));
}
return sb.toString();
}
}
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4" />
\ No newline at end of file
<module version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment