feat:密码数据处理,验签排除空字符串,导出接口
This commit is contained in:
@@ -31,6 +31,7 @@ public class CommonConstants {
|
||||
public static final int TEN_SECONDS = 10000;
|
||||
|
||||
public static final int ONE_SECONDS = 1000;
|
||||
public static final int TOW_SECONDS = 2000;
|
||||
|
||||
public static final int MAX_EXPORT_SIZE = 10000;
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.cool.store.enums;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/04/28/19:52
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
public enum DeclareGoodsTypeEnum {
|
||||
// 0-按1周/次报货 1-按月报货 2-自提 3-按2周/次投货 4-按3周/次投货”
|
||||
WEEK_ONCE("0", "按1周/次报货"),
|
||||
MONTH("1", "按月报货"),
|
||||
SELF_PICKUP("2", "自提"),
|
||||
TWO_WEEK_ONCE("3", "按2周/次投货"),
|
||||
THREE_WEEK_ONCE("4", "按3周/次投货");
|
||||
|
||||
private String code;
|
||||
private String name;
|
||||
|
||||
DeclareGoodsTypeEnum(String code, String name) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public static String getNameByCode(String code) {
|
||||
if (StringUtils.isBlank(code)){
|
||||
return null;
|
||||
}
|
||||
for (DeclareGoodsTypeEnum declareGoodsTypeEnum : DeclareGoodsTypeEnum.values()) {
|
||||
if (declareGoodsTypeEnum.getCode().equals(code)) {
|
||||
return declareGoodsTypeEnum.getName();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -255,6 +255,7 @@ public enum ErrorCodeEnum {
|
||||
GET_YLS_CODE_FAIL(151006,"系统无云流水编码!无法获取TOKEN!请先维护该编码",null),
|
||||
|
||||
BANK_EXIST(151007,"当前银行已存在,请直接选择!",null),
|
||||
EXPORT_LIMIT_1000(151008,"导出数据不能超过1000条,请增加筛选条件,减少导出数量",null),
|
||||
;
|
||||
|
||||
|
||||
|
||||
@@ -14,7 +14,10 @@ public enum FileTypeEnum {
|
||||
MY_FRANCHISEES("my_franchisees","我的加盟商"),
|
||||
TEAM_FRANCHISEES("team_franchisees","团队加盟商"),
|
||||
PREPARATION("preparation","进度管理"),
|
||||
BRANCH_SHOP_LIST("branchShopList","开店管理")
|
||||
BRANCH_SHOP_LIST("branchShopList","开店管理"),
|
||||
EXPORT_FINANCE("exportFinance","财务导出"),
|
||||
EXPORT_JOIN_SHOP("exportJoinShop","开店导出"),
|
||||
EXPORT_PROGRESS("exportProgress","进度导出"),
|
||||
;
|
||||
private String fileType;
|
||||
private String desc;
|
||||
|
||||
@@ -51,4 +51,16 @@ public enum OpenStatusEnum {
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
public static String getByCode(Integer code){
|
||||
if (code == null){
|
||||
return null;
|
||||
}
|
||||
for (OpenStatusEnum openStatusEnum : OpenStatusEnum.values()) {
|
||||
if(openStatusEnum.getCode().equals(code)){
|
||||
return openStatusEnum.getName();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.cool.store.enums;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/04/28/19:27
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
public enum StoreTypeEnum {
|
||||
//:0-无展示门店、1-餐厅店、2-普通门店
|
||||
NO_SHOW_STORE(0, "无展示门店"),
|
||||
RESTAURANT_STORE(1, "餐厅店"),
|
||||
ORDINARY_STORE(2, "普通门店");
|
||||
private Integer code;
|
||||
private String message;
|
||||
StoreTypeEnum(Integer code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
public static String getMessage(Integer code) {
|
||||
if (code == null){
|
||||
return null;
|
||||
}
|
||||
for (StoreTypeEnum c : StoreTypeEnum.values()) {
|
||||
if (c.getCode().equals(code)) {
|
||||
return c.message;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -194,6 +194,6 @@ public enum ShopSubStageStatusEnum {
|
||||
return stageStatusEnum;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return SHOP_SUB_STAGE_STATUS_00;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.utils;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.google.gson.JsonObject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import javax.crypto.Mac;
|
||||
@@ -47,7 +49,7 @@ public class SignatureUtils {
|
||||
|
||||
// 拼接排序后的参数
|
||||
sortedParams.forEach((key, value) ->{
|
||||
if (Objects.isNull(value)||(value instanceof Double &&((Double) value).intValue()==0)){
|
||||
if (Objects.isNull(value)|| (value instanceof String && StringUtil.isBlank(value.toString())) || (value instanceof Double &&((Double) value).intValue()==0)){
|
||||
log.info("0或者空值不参与签名");
|
||||
}else {
|
||||
if (value instanceof Double){
|
||||
|
||||
Reference in New Issue
Block a user