From 1af395ecb948a9d0af14aa72d7fc8025e849e6bc Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期四, 22 一月 2026 19:20:32 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
server/dmmall_service/src/main/java/com/doumee/core/utils/Constants.java | 131 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 130 insertions(+), 1 deletions(-)
diff --git a/server/dmmall_service/src/main/java/com/doumee/core/utils/Constants.java b/server/dmmall_service/src/main/java/com/doumee/core/utils/Constants.java
index d7b26b3..711f9bf 100644
--- a/server/dmmall_service/src/main/java/com/doumee/core/utils/Constants.java
+++ b/server/dmmall_service/src/main/java/com/doumee/core/utils/Constants.java
@@ -1,15 +1,22 @@
package com.doumee.core.utils;
+import cn.binarywang.wx.miniapp.bean.WxMaCodeLineColor;
+import com.doumee.core.wx.WxMiniConfig;
import com.doumee.dao.business.model.Areas;
import io.swagger.annotations.ApiModelProperty;
+import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang3.StringUtils;
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
import java.math.BigDecimal;
import java.net.URLDecoder;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+@Slf4j
public class Constants {
public static final String[] ALL_SPELL_LIST_FIRST = new String[]{"A", "B", "C", "D", "E", "F", "G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"};
@@ -77,6 +84,11 @@
public static final String CASH_EXCHANGE_INTEGRAL_RATA = "CASH_EXCHANGE_INTEGRAL_RATA";//鐜伴噾-绉垎鍏戞崲姣斾緥锛�1鍏冨彲寰楀埌XXX绉垎锛�
+ public static final String MAIL_CONFIG = "MAIL_CONFIG";
+ public static final String FIRST_WEIGHT = "FIRST_WEIGHT";
+ public static final String CONTINUE_WEIGHT = "CONTINUE_WEIGHT";
+ public static final String FIRST_FEE = "FIRST_FEE";
+ public static final String CONTINUE_FEE = "CONTINUE_FEE";
public static final String INITIAL_ROLE = "INITIAL_ROLE";
@@ -132,6 +144,18 @@
public static final String COFFEE_ARTICLE_BACKGROUND = "COFFEE_ARTICLE_BACKGROUND";
public static final String TRANSFER_FILE = "TRANSFER_FILE";
+
+ public static final String INVITE_RULE = "INVITE_RULE";
+
+ public static final String INVITE_IMG = "INVITE_IMG";
+
+ public static final String SHARES_FILE = "SHARES_FILE";
+
+ public static final String INVITE_IMG_URL = "INVITE_IMG_URL";
+
+
+
+
public interface RedisKeys {
@@ -873,7 +897,7 @@
SHOP_ORDER(21,"娑堣垂杩旂Н鍒�","浼氬憳${param}浜ゆ槗鎴愬姛锛岃幏寰�${param1}绉垎",0,0),//${param}鏄电О-鎵嬫満鍙�
- SHOP_ORDER_CANCEL(22,"閫�鍗曟墸闄�","浜ゆ槗閫�娆鹃��鍥烇紝娑堣��100绉垎",0,0),
+ SHOP_ORDER_CANCEL(22,"璁㈠崟鍙栨秷閫�鍥�","璁㈠崟鍙栨秷閫�鍥烇紝閫�鍥�${param}绉垎",0,0),
SHOP_SYSTEM_RECHARGE(23,"绉垎鍙戞斁","骞冲彴濂栧姳锛岃幏寰�${param}绉垎",0,0),
SHOP_SYSTEM_DEDUCT(24,"绉垎鎵i櫎","骞冲彴鎵e噺锛屾秷鑰�${param}绉垎",0,0),
@@ -966,6 +990,61 @@
}
+
+ public enum WxNotice {
+
+ GOODSORDER_SEND(0,"鎮ㄨ喘涔扮殑鍟嗗搧銆恵param}銆戝凡鍙戣揣","/","02BlSaqsSje7IjsWy0K7HdH7ArpOsEHD14OQU2Mk2Cs"),
+ GOODSORDER_WRITEOFF(1,"鎮ㄨ喘涔扮殑鍟嗗搧銆恵param}銆戝凡鏍搁攢","/","A_-0NgHwX5a6Dlst64rqcDtcz_fGILwl3HTpN1rf7GE"),
+ GOODSORDER_REFUND(2,"鎮ㄨ喘涔扮殑鍟嗗搧銆恵param}銆戝凡閫�娆撅紝閫�娆鹃噾棰濄�愶骏{param2}銆�","/","yGwMHrXM3Qd55hdSeaKY9dLb-kfgE2Vs-8iK9kQaveI");
+
+ WxNotice(int i, String s, String s1,String s2) {
+ this.type = i;
+ this.noticeInfo = s;
+ this.jumpUrl = s1;
+ this.tempId = s2;
+ }
+
+
+ private int type;
+ private String noticeInfo; //閫氱煡淇℃伅
+ private String jumpUrl;//璺宠浆璺緞
+ private String tempId;//璺宠浆璺緞
+
+
+ public int getType() {
+ return type;
+ }
+
+ public void setType(int type) {
+ this.type = type;
+ }
+
+ public String getNoticeInfo() {
+ return noticeInfo;
+ }
+
+ public void setNoticeInfo(String noticeInfo) {
+ this.noticeInfo = noticeInfo;
+ }
+
+ public String getJumpUrl() {
+ return jumpUrl;
+ }
+
+ public void setJumpUrl(String jumpUrl) {
+ this.jumpUrl = jumpUrl;
+ }
+ public String getTempId() {
+ return tempId;
+ }
+ public void setTempId(String tempId) {
+ this.tempId = tempId;
+ }
+
+
+ }
+
+
/**
@@ -1176,6 +1255,8 @@
public enum UserActionType {
CHANGE_SHOP(0, "缁忛攢鍟嗘洿鎹�","鐢便��${param1}銆戜簬銆�${param2}銆戯紝杩涜銆愮粡閿�鍟嗘洿鎹€��" ),
+ CHANGE_SALETYPE(1, "缁忛攢鍟嗘洿鎹㈤攢鍞ā寮�","鐢便��${param1}銆戜簬銆�${param2}銆戯紝杩涜銆愰攢鍞ā寮忓彉鏇淬��" ),
+ CHANGE_ORDER_KD(2, "璁㈠崟蹇�掓洿鎹�","${param1}" ),
;
// 鎴愬憳鍙橀噺
@@ -1222,4 +1303,52 @@
this.info = info;
}
}
+
+
+ public static InputStream generateWxMiniImgStream(String scene, String page, boolean isUsePage) {
+ //鐢熸垚鍥剧墖涓婁紶OSS
+ Map<String,Object> body = new HashMap<>();
+ // 鍦烘櫙鐮侊紝涓庡墠绔害瀹氾紝鏈�缁堟槸闇�瑕佸墠绔В鏋�
+ body.put("scene", scene);
+ // 姝e紡鐗堜负 "release"锛屼綋楠岀増涓� "trial"锛屽紑鍙戠増涓� "develop"銆傞粯璁ゆ槸姝e紡鐗堛��
+ String env_version = "release";
+ body.put("env_version", env_version);
+ if(isUsePage){
+ body.put("page", page);
+ }
+ //body.put("page", "pages/index/index");
+ // 閫忔槑锛屾牴鎹綘鐨勫満鏅嚜琛岃缃産ody鍙傛暟
+ body.put("is_hyaline", true);
+ try {
+ WxMaCodeLineColor codeLineColor = new WxMaCodeLineColor("0","0","0");
+ byte[] bytes = WxMiniConfig.wxMaService.getQrcodeService().createWxaCodeUnlimitBytes
+ (scene,null,false,env_version,300,false,codeLineColor,false);
+ if (bytes !=null) {
+ InputStream inputStream = new ByteArrayInputStream(bytes);
+ /* ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int len = -1;
+ while ((len = inputStream.read(buffer)) != -1) {
+ baos.write(buffer, 0, len);
+ }
+ System.out.println("data:mediatype;base64," + Base64.getEncoder().encodeToString(baos.toByteArray()));*/
+ log.error("鐢熸垚灏忕▼搴忕爜鎴愬姛:============"+inputStream.available());
+ return inputStream;
+ }else{
+ log.error("鐢熸垚灏忕▼搴忕爜澶辫触:============");
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ log.error("鐢熸垚灏忕▼搴忕爜澶辫触:============"+e.getMessage());
+ }
+ return null;
+ }
+
+
+ public static Integer getInviteCode(String inviteStr){
+ if(StringUtils.isNotBlank(inviteStr)&&inviteStr.startsWith("m_")){
+ return Integer.valueOf(inviteStr.replace("m_",""));
+ }
+ return null;
+ }
}
--
Gitblit v1.9.3