兴安访客小程序对接部分迁移
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
package com.dcsoft.common.core.enums;
|
||||
|
||||
/**
|
||||
* 审批状态集合
|
||||
*/
|
||||
public enum ExamineEnum {
|
||||
|
||||
ALL("3", "全部","#607D8B"),
|
||||
IN_REVIEW("2", "审核中","#2d82fb"),
|
||||
PASSED("0", "已通过","#17b26a"),
|
||||
REJECTED("1", "已驳回","#ff1100"),
|
||||
;
|
||||
|
||||
ExamineEnum(String code, String name, String color) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public static String getByCode(String code) {
|
||||
for (ExamineEnum examine : ExamineEnum.values()) {
|
||||
if (examine.code.equals(code)) {
|
||||
return examine.name;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getColorByCode(String code) {
|
||||
for (ExamineEnum examine : ExamineEnum.values()) {
|
||||
if (examine.code.equals(code)) {
|
||||
return examine.color;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private String code;
|
||||
private String name;
|
||||
private String color;
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.dcsoft.common.core.enums;
|
||||
|
||||
public enum MatterEnum {
|
||||
|
||||
VISIT_WORK("1", "走访办事"),
|
||||
BID("2", "参加投标"),
|
||||
MEETING("3", "会议交流"),
|
||||
OTHER("4", "其他"),
|
||||
INTERVIEW("9", "面试预约"),
|
||||
;
|
||||
|
||||
MatterEnum(String code, String name) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public static String getByCode(String code) {
|
||||
for (MatterEnum matter : MatterEnum.values()) {
|
||||
if (matter.code.equals(code)) {
|
||||
return matter.name;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private String code;
|
||||
private String name;
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.dcsoft.common.core.utils;
|
||||
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
|
||||
/**
|
||||
* 短信工具类
|
||||
*
|
||||
*/
|
||||
public class SmsUtils {
|
||||
|
||||
/**
|
||||
* 生成六位随机纯数字短信验证码
|
||||
* @return
|
||||
*/
|
||||
public static String generateSmsCode() {
|
||||
// 生成一个6位数的随机整数作为短信验证码
|
||||
int smsCode = RandomUtil.randomInt(100000, 999999);
|
||||
// 将验证码转换为字符串
|
||||
return String.valueOf(smsCode);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user