兴安访客小程序对接部分迁移

This commit is contained in:
zc
2025-06-05 17:04:25 +08:00
parent b3657fb024
commit 5761742c5a
39 changed files with 1480 additions and 125 deletions

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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);
}
}

View File

@@ -166,4 +166,16 @@ public class TokenService
{
return ACCESS_TOKEN + token;
}
public void redisSet(String key, String value) {
redisService.setCacheObject(key, value, 60 * 5L, TimeUnit.SECONDS);
}
public String redisGet(String key) {
return redisService.getCacheObject(key);
}
public void redisDel(String key) {
redisService.deleteObject(key);
}
}

View File

@@ -86,4 +86,9 @@ public class SmsProperties {
* 兴安访客审核不通过
*/
private String template10;
/**
* 登录注册6位验证码
*/
private String template11;
}