格式化了 common 类
This commit is contained in:
parent
8314d2d202
commit
24c131802c
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.suisung.mall</groupId>
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package com.suisung.mall.common.api;
|
||||
|
||||
import com.suisung.mall.common.utils.I18nUtil;
|
||||
import io.swagger.models.auth.In;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.HashMap;
|
||||
@ -423,6 +422,29 @@ public class StateCode {
|
||||
public static final Map DELIVERY_TIME_HOUR = new HashMap();
|
||||
|
||||
public static final Map DELIVERY_TIME_MINUTE = new HashMap();
|
||||
public static final int SUBSCRIBE = 1; // 已订阅讲师
|
||||
public static final int NOT_SUBSCRIBE = 0; // 未订阅讲师
|
||||
public static final String CLASSES_HAS_NOT_STARTED = "未开始"; // 未开始
|
||||
public static final String CLASSES_HAS_OVER = "已结束"; // 已结束
|
||||
public static final String CLASSES_HAS_START = "已开始"; // 已开始
|
||||
public static final String WX_MP_ACCESSTOKEN = "wx_token:mp_token"; // 公众号Access_Token
|
||||
public static final String WX_XCX_ACCESSTOKEN = "wx_token:xcx_token"; // 小程序Access_Token
|
||||
public static final BigDecimal commissionInit = new BigDecimal("0.00");
|
||||
// 打票机相关常量定义
|
||||
// 打票机模版分类:1-下单打印模版;2-退货打印模版;
|
||||
public static final int PRINTER_TEMP_CATE_ORDER = 1;
|
||||
// 打票机模版分类:1-下单打印模版;2-退货打印模版;
|
||||
public static final int PRINTER_TEMP_CATE_REFUND = 2;
|
||||
// 顺丰同城订单状态:1-订单创建;2-订单取消;10-配送员接单/配送员改派;12-配送员到店;15-配送员配送中(已取货);17-配送员妥投完单;22-配送员撤单;31-取消中;91-骑士上报异常;
|
||||
public static final int SF_ORDER_STATUS_CREATED = 1;
|
||||
public static final int SF_ORDER_STATUS_CANCELED = 2;
|
||||
public static final int SF_ORDER_STATUS_RECEIVING = 10;
|
||||
public static final int SF_ORDER_STATUS_ARRIVED = 12;
|
||||
public static final int SF_ORDER_STATUS_RECEIVED = 15;
|
||||
public static final int SF_ORDER_STATUS_FINISH = 17;
|
||||
public static final int SF_ORDER_STATUS_WITHDRAW = 22;
|
||||
public static final int SF_ORDER_STATUS_EXCEPTION = 91;
|
||||
public static final int SF_ORDER_STATUS_CANCELING = 31;
|
||||
|
||||
static {
|
||||
DELIVERY_TIME_NOT_TIMER.put(1, I18nUtil._("不限时段"));
|
||||
@ -502,33 +524,4 @@ public class StateCode {
|
||||
public static boolean ifOther(Integer source_type) {
|
||||
return source_type != null && SOURCE_TYPE_OTHER == source_type;
|
||||
}
|
||||
|
||||
public static final int SUBSCRIBE = 1; // 已订阅讲师
|
||||
public static final int NOT_SUBSCRIBE = 0; // 未订阅讲师
|
||||
|
||||
public static final String CLASSES_HAS_NOT_STARTED = "未开始"; // 未开始
|
||||
public static final String CLASSES_HAS_OVER = "已结束"; // 已结束
|
||||
public static final String CLASSES_HAS_START = "已开始"; // 已开始
|
||||
|
||||
public static final String WX_MP_ACCESSTOKEN = "wx_token:mp_token"; // 公众号Access_Token
|
||||
public static final String WX_XCX_ACCESSTOKEN = "wx_token:xcx_token"; // 小程序Access_Token
|
||||
|
||||
public static final BigDecimal commissionInit = new BigDecimal("0.00");
|
||||
|
||||
// 打票机相关常量定义
|
||||
// 打票机模版分类:1-下单打印模版;2-退货打印模版;
|
||||
public static final int PRINTER_TEMP_CATE_ORDER = 1;
|
||||
// 打票机模版分类:1-下单打印模版;2-退货打印模版;
|
||||
public static final int PRINTER_TEMP_CATE_REFUND = 2;
|
||||
|
||||
// 顺丰同城订单状态:1-订单创建;2-订单取消;10-配送员接单/配送员改派;12-配送员到店;15-配送员配送中(已取货);17-配送员妥投完单;22-配送员撤单;31-取消中;91-骑士上报异常;
|
||||
public static final int SF_ORDER_STATUS_CREATED = 1;
|
||||
public static final int SF_ORDER_STATUS_CANCELED = 2;
|
||||
public static final int SF_ORDER_STATUS_RECEIVING = 10;
|
||||
public static final int SF_ORDER_STATUS_ARRIVED = 12;
|
||||
public static final int SF_ORDER_STATUS_RECEIVED = 15;
|
||||
public static final int SF_ORDER_STATUS_FINISH = 17;
|
||||
public static final int SF_ORDER_STATUS_WITHDRAW = 22;
|
||||
public static final int SF_ORDER_STATUS_EXCEPTION = 91;
|
||||
public static final int SF_ORDER_STATUS_CANCELING = 31;
|
||||
}
|
||||
|
||||
@ -5,7 +5,6 @@ import com.suisung.mall.common.modules.order.ShopOrderReturn;
|
||||
import com.suisung.mall.common.modules.pay.*;
|
||||
import com.suisung.mall.common.modules.product.ShopProductIndex;
|
||||
import com.suisung.mall.common.pojo.output.TimelineOutput;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@ -171,6 +170,7 @@ public interface PayService {
|
||||
|
||||
/**
|
||||
* 更改交易订单的订单状态和付款状态
|
||||
*
|
||||
* @param orderId
|
||||
* @param orderStateId 空值或0将不更新
|
||||
* @param tradeIsPaid 空值或0将不更新
|
||||
|
||||
@ -13,7 +13,6 @@ import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
|
||||
@ -34,6 +34,41 @@ import java.util.Date;
|
||||
public class ShopStorePrinterLog implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ApiModelProperty(value = "日志自增ID")
|
||||
@TableId(value = "log_id", type = IdType.INPUT)
|
||||
private Long log_id;
|
||||
@ApiModelProperty(value = "打印分类")
|
||||
private Integer category;
|
||||
@ApiModelProperty(value = "门店ID")
|
||||
private Integer store_id;
|
||||
@ApiModelProperty(value = "订单ID")
|
||||
private String order_id;
|
||||
@ApiModelProperty(value = "打印模版ID")
|
||||
private Long template_id;
|
||||
@ApiModelProperty(value = "模版字符串")
|
||||
private String template_value;
|
||||
@ApiModelProperty(value = "模版渲染数据值")
|
||||
private String template_data;
|
||||
@ApiModelProperty(value = "最终打印的内容")
|
||||
private String print_content;
|
||||
@ApiModelProperty(value = "飞鹅返回到打印编号")
|
||||
private String feie_print_no;
|
||||
@ApiModelProperty(value = "打印机编号")
|
||||
private String printer_sn;
|
||||
@ApiModelProperty(value = "状态:1-有效;2-无效;")
|
||||
private Integer status;
|
||||
@ApiModelProperty(value = "新增用户ID")
|
||||
private Integer created_by;
|
||||
@ApiModelProperty(value = "更新用户ID")
|
||||
private Integer updated_by;
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@ApiModelProperty(value = "新增时间")
|
||||
private Date created_at;
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private Date updated_at;
|
||||
|
||||
public ShopStorePrinterLog(Integer category, Integer storeId, String orderId, Long templateId, String templateValue, String templateData, String printContent, String feiePrintNo, String printerSn) {
|
||||
this.category = category;
|
||||
@ -46,54 +81,4 @@ public class ShopStorePrinterLog implements Serializable {
|
||||
this.feie_print_no = feiePrintNo;
|
||||
this.printer_sn = printerSn;
|
||||
}
|
||||
|
||||
@ApiModelProperty(value = "日志自增ID")
|
||||
@TableId(value = "log_id", type = IdType.INPUT)
|
||||
private Long log_id;
|
||||
|
||||
@ApiModelProperty(value = "打印分类")
|
||||
private Integer category;
|
||||
|
||||
@ApiModelProperty(value = "门店ID")
|
||||
private Integer store_id;
|
||||
|
||||
@ApiModelProperty(value = "订单ID")
|
||||
private String order_id;
|
||||
|
||||
@ApiModelProperty(value = "打印模版ID")
|
||||
private Long template_id;
|
||||
|
||||
@ApiModelProperty(value = "模版字符串")
|
||||
private String template_value;
|
||||
|
||||
@ApiModelProperty(value = "模版渲染数据值")
|
||||
private String template_data;
|
||||
|
||||
@ApiModelProperty(value = "最终打印的内容")
|
||||
private String print_content;
|
||||
|
||||
@ApiModelProperty(value = "飞鹅返回到打印编号")
|
||||
private String feie_print_no;
|
||||
|
||||
@ApiModelProperty(value = "打印机编号")
|
||||
private String printer_sn;
|
||||
|
||||
@ApiModelProperty(value = "状态:1-有效;2-无效;")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "新增用户ID")
|
||||
private Integer created_by;
|
||||
|
||||
@ApiModelProperty(value = "更新用户ID")
|
||||
private Integer updated_by;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@ApiModelProperty(value = "新增时间")
|
||||
private Date created_at;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private Date updated_at;
|
||||
}
|
||||
|
||||
@ -15,13 +15,11 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.models.auth.In;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
|
||||
@ -23,8 +23,8 @@ public enum ErrorTypeEnum {
|
||||
|
||||
ERR_ORDER_SERVICE("订单处理异常", 6001);
|
||||
|
||||
private static final List<Map<String, Object>> errorTypes = new ArrayList<>();
|
||||
private final String label;
|
||||
|
||||
private final int value;
|
||||
|
||||
ErrorTypeEnum(String label, int value) {
|
||||
@ -32,8 +32,6 @@ public enum ErrorTypeEnum {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
private static final List<Map<String, Object>> errorTypes = new ArrayList<>();
|
||||
|
||||
public static List<Map<String, Object>> getAllValues() {
|
||||
if (CollUtil.isNotEmpty(errorTypes)) {
|
||||
return errorTypes;
|
||||
|
||||
@ -6,7 +6,6 @@ import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 飞鹅云打印机接口响应结果
|
||||
|
||||
@ -25,15 +25,14 @@ import java.io.Serializable;
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class SFExpressApiRes implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "错误码")
|
||||
private Integer error_code;
|
||||
@ApiModelProperty(value = "错误信息")
|
||||
private String error_msg;
|
||||
@ApiModelProperty(value = "错误数据")
|
||||
public Object error_data;
|
||||
@ApiModelProperty(value = "响应结果")
|
||||
private Object result;
|
||||
@ApiModelProperty(value = "错误数据")
|
||||
public Object error_data;
|
||||
|
||||
public SFExpressApiRes fail(Integer errorCode, String errorMsg) {
|
||||
return new SFExpressApiRes(errorCode, errorMsg, null, null);
|
||||
|
||||
@ -26,13 +26,12 @@ import java.util.Date;
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class SFExpressFeedRes implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "顺丰订单状态")
|
||||
public Integer order_status;
|
||||
@ApiModelProperty(value = "顺丰订单号")
|
||||
private String sf_order_id;
|
||||
@ApiModelProperty(value = "商家订单号")
|
||||
private String shop_order_id;
|
||||
@ApiModelProperty(value = "顺丰订单状态")
|
||||
public Integer order_status;
|
||||
@ApiModelProperty(value = "操作记录日志")
|
||||
private String operator;
|
||||
@ApiModelProperty(value = "操作员")
|
||||
|
||||
@ -24,6 +24,28 @@ import java.util.List;
|
||||
@ApiModel(value = "订单商品打印对象", description = "订单商品打印对象")
|
||||
public class ShopStoreOrderProductPrintVO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ApiModelProperty(value = "商品名")
|
||||
private String item_name;
|
||||
@ApiModelProperty(value = "数量")
|
||||
private Integer order_item_quantity;
|
||||
@ApiModelProperty(value = "金额")
|
||||
private BigDecimal order_item_amount;
|
||||
@ApiModelProperty(value = "显示的商品名")
|
||||
private String s_name;
|
||||
@ApiModelProperty(value = "显示的数量")
|
||||
private String s_quantity;
|
||||
@ApiModelProperty(value = "显示的金额")
|
||||
private String s_amount;
|
||||
@ApiModelProperty(value = "显示的商品条码")
|
||||
private String product_sn;
|
||||
@ApiModelProperty(value = "商品名称分段")
|
||||
private List<String> s_name_segs;
|
||||
@ApiModelProperty(value = "标题额定字节长度")
|
||||
private Integer title_blen;
|
||||
@ApiModelProperty(value = "数量额定字节长度")
|
||||
private Integer quantity_blen;
|
||||
@ApiModelProperty(value = "金额额定字节长度")
|
||||
private Integer amount_blen;
|
||||
|
||||
public ShopStoreOrderProductPrintVO(String itemName, Integer orderItemQuantity, BigDecimal orderItemAmount, String productSn) {
|
||||
new ShopStoreOrderProductPrintVO(itemName, orderItemQuantity, orderItemAmount, productSn, 18, 6, 8);
|
||||
@ -65,46 +87,13 @@ public class ShopStoreOrderProductPrintVO implements Serializable {
|
||||
|
||||
/**
|
||||
* 重构实体类,处理标题,数量,价格适应长度
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public ShopStoreOrderProductPrintVO rebuild() {
|
||||
return new ShopStoreOrderProductPrintVO(this.item_name, this.order_item_quantity, this.order_item_amount, this.product_sn, 18, 6, 8);
|
||||
}
|
||||
|
||||
@ApiModelProperty(value = "商品名")
|
||||
private String item_name;
|
||||
|
||||
@ApiModelProperty(value = "数量")
|
||||
private Integer order_item_quantity;
|
||||
|
||||
@ApiModelProperty(value = "金额")
|
||||
private BigDecimal order_item_amount;
|
||||
|
||||
@ApiModelProperty(value = "显示的商品名")
|
||||
private String s_name;
|
||||
|
||||
@ApiModelProperty(value = "显示的数量")
|
||||
private String s_quantity;
|
||||
|
||||
@ApiModelProperty(value = "显示的金额")
|
||||
private String s_amount;
|
||||
|
||||
@ApiModelProperty(value = "显示的商品条码")
|
||||
private String product_sn;
|
||||
|
||||
@ApiModelProperty(value = "商品名称分段")
|
||||
private List<String> s_name_segs;
|
||||
|
||||
@ApiModelProperty(value = "标题额定字节长度")
|
||||
private Integer title_blen;
|
||||
|
||||
@ApiModelProperty(value = "数量额定字节长度")
|
||||
private Integer quantity_blen;
|
||||
|
||||
@ApiModelProperty(value = "金额额定字节长度")
|
||||
private Integer amount_blen;
|
||||
|
||||
|
||||
/**
|
||||
* 判断字符串是否包含英文?
|
||||
*
|
||||
|
||||
@ -1,9 +1,5 @@
|
||||
package com.suisung.mall.common.pojo.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
@ -14,12 +14,10 @@ import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class MessageServiceImpl implements MessageService {
|
||||
private static final String kerPre = "_msg_|";
|
||||
@Autowired
|
||||
private RedisService redisService;
|
||||
|
||||
private static final String kerPre = "_msg_|";
|
||||
|
||||
|
||||
/**
|
||||
* @param k 队列原始值
|
||||
* @access public
|
||||
|
||||
@ -18,6 +18,32 @@ import org.springframework.web.method.support.ModelAndViewContainer;
|
||||
public class AuthInterceptor implements HandlerMethodArgumentResolver, ApplicationContextAware {
|
||||
private static ApplicationContext applicationContext;
|
||||
|
||||
public static ApplicationContext getApplicationContext() {
|
||||
return applicationContext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
|
||||
if (AuthInterceptor.applicationContext == null) {
|
||||
AuthInterceptor.applicationContext = applicationContext;
|
||||
}
|
||||
}
|
||||
|
||||
//通过name获取 Bean.
|
||||
public static Object getBean(String name) {
|
||||
return getApplicationContext().getBean(name);
|
||||
}
|
||||
|
||||
//通过class获取Bean.
|
||||
public static <T> T getBean(Class<T> clazz) {
|
||||
return getApplicationContext().getBean(clazz);
|
||||
}
|
||||
|
||||
//通过name,以及Clazz返回指定的Bean
|
||||
public static <T> T getBean(String name, Class<T> clazz) {
|
||||
return getApplicationContext().getBean(name, clazz);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsParameter(MethodParameter parameter) {
|
||||
if (parameter.hasParameterAnnotation(Auth.class)) {
|
||||
@ -60,30 +86,4 @@ public class AuthInterceptor implements HandlerMethodArgumentResolver, Applicati
|
||||
return user;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
|
||||
if (AuthInterceptor.applicationContext == null) {
|
||||
AuthInterceptor.applicationContext = applicationContext;
|
||||
}
|
||||
}
|
||||
|
||||
public static ApplicationContext getApplicationContext() {
|
||||
return applicationContext;
|
||||
}
|
||||
|
||||
//通过name获取 Bean.
|
||||
public static Object getBean(String name) {
|
||||
return getApplicationContext().getBean(name);
|
||||
}
|
||||
|
||||
//通过class获取Bean.
|
||||
public static <T> T getBean(Class<T> clazz) {
|
||||
return getApplicationContext().getBean(clazz);
|
||||
}
|
||||
|
||||
//通过name,以及Clazz返回指定的Bean
|
||||
public static <T> T getBean(String name, Class<T> clazz) {
|
||||
return getApplicationContext().getBean(name, clazz);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -14,6 +14,7 @@ public class AesEncryptUtil {
|
||||
private static final String KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx2";
|
||||
//参数分别代表 算法名称/加密模式/数据填充方式
|
||||
private static final String ALGORITHMSTR = "AES/ECB/PKCS5Padding";
|
||||
|
||||
/* 加密
|
||||
* @param content 加密的字符串
|
||||
* @param encryptKey key值*/
|
||||
@ -26,6 +27,7 @@ public class AesEncryptUtil {
|
||||
// 采用base64算法进行转码,避免出现中文乱码
|
||||
return Base64.encodeBase64String(b);
|
||||
}
|
||||
|
||||
/* 解密
|
||||
* @param encryptStr 解密的字符串
|
||||
* @param decryptKey 解密的key值*/
|
||||
@ -43,6 +45,7 @@ public class AesEncryptUtil {
|
||||
public static String encrypt(String content) throws Exception {
|
||||
return encrypt(content, KEY);
|
||||
}
|
||||
|
||||
public static String decrypt(String encryptStr) throws Exception {
|
||||
return decrypt(encryptStr, KEY);
|
||||
}
|
||||
|
||||
@ -22,11 +22,11 @@ import java.util.List;
|
||||
**/
|
||||
|
||||
public class CSVUtils {
|
||||
private static Logger logger = LoggerFactory.getLogger(CSVUtils.class);
|
||||
//行尾分隔符定义
|
||||
private final static String NEW_LINE_SEPARATOR = "\n";
|
||||
//上传文件的存储位置
|
||||
private final static String PATH = new ApplicationHome().getDir().getPath() + "/";
|
||||
private static Logger logger = LoggerFactory.getLogger(CSVUtils.class);
|
||||
|
||||
/**
|
||||
* @return File
|
||||
|
||||
@ -133,6 +133,7 @@ public class CommonUtil {
|
||||
|
||||
/**
|
||||
* Double 四舍五入,不保留小数点
|
||||
*
|
||||
* @param d
|
||||
* @return
|
||||
*/
|
||||
@ -142,6 +143,7 @@ public class CommonUtil {
|
||||
|
||||
/**
|
||||
* Decimal 四舍五入,不保留小数点
|
||||
*
|
||||
* @param d
|
||||
* @return
|
||||
*/
|
||||
@ -152,6 +154,7 @@ public class CommonUtil {
|
||||
|
||||
/**
|
||||
* 根据上一个订单状态和当前状态,获取订单状态变化备注
|
||||
*
|
||||
* @param order_state_pre_id
|
||||
* @param order_state_id
|
||||
* @return
|
||||
|
||||
@ -14,6 +14,7 @@ public class CompressionUtils {
|
||||
|
||||
/**
|
||||
* 压缩
|
||||
*
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@ -32,6 +33,7 @@ public class CompressionUtils {
|
||||
|
||||
/**
|
||||
* 解压缩
|
||||
*
|
||||
* @param compressedData
|
||||
* @return
|
||||
*/
|
||||
|
||||
@ -12,16 +12,10 @@ import javax.annotation.PostConstruct;
|
||||
@Component
|
||||
@Slf4j
|
||||
public class ContextUtil {
|
||||
private static UserInfoService staticUserInfoService;
|
||||
@Autowired
|
||||
private UserInfoService userInfoService;
|
||||
|
||||
private static UserInfoService staticUserInfoService;
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
ContextUtil.staticUserInfoService = userInfoService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前登录用户
|
||||
*
|
||||
@ -37,7 +31,6 @@ public class ContextUtil {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取当前登录用户
|
||||
*
|
||||
@ -77,4 +70,9 @@ public class ContextUtil {
|
||||
|
||||
return loginUser.getId();
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
ContextUtil.staticUserInfoService = userInfoService;
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,24 +23,13 @@ public class CookieUtils {
|
||||
|
||||
|
||||
private static HttpServletResponse response;
|
||||
|
||||
private static HttpServletRequest request;
|
||||
private static Logger logger = LoggerFactory.getLogger(CookieUtils.class);
|
||||
@Autowired
|
||||
private HttpServletResponse response2;
|
||||
|
||||
private static HttpServletRequest request;
|
||||
|
||||
@Autowired
|
||||
private HttpServletRequest request2;
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(CookieUtils.class);
|
||||
|
||||
@PostConstruct
|
||||
public void beforeInit() {
|
||||
request = request2;
|
||||
response = response2;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据Cookie名称得到Cookie对象,不存在该对象则返回Null
|
||||
*
|
||||
@ -151,14 +140,7 @@ public class CookieUtils {
|
||||
}
|
||||
return cookieMap;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* 功能描述:
|
||||
* @param: IM新增cookie操作方法
|
||||
* @return:
|
||||
* @auther: 陈旺
|
||||
* @date: 2022/4/24 9:51
|
||||
*/
|
||||
|
||||
/**
|
||||
* 设置 Cookie(生成时间为1天)
|
||||
*
|
||||
@ -168,6 +150,14 @@ public class CookieUtils {
|
||||
public static void setCookieIm(String name, String value) {
|
||||
setCookieIm(name, value, COOKIE_ONE_DAY);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* 功能描述:
|
||||
* @param: IM新增cookie操作方法
|
||||
* @return:
|
||||
* @auther: 陈旺
|
||||
* @date: 2022/4/24 9:51
|
||||
*/
|
||||
|
||||
/**
|
||||
* IM新增设置 Cookie
|
||||
@ -198,4 +188,10 @@ public class CookieUtils {
|
||||
}
|
||||
response.addCookie(cookie);
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void beforeInit() {
|
||||
request = request2;
|
||||
response = response2;
|
||||
}
|
||||
}
|
||||
@ -14,20 +14,46 @@ import java.util.stream.Collectors;
|
||||
/**
|
||||
* 多线程方法调用工具类
|
||||
* Author: Lwg
|
||||
*
|
||||
* @desc: 不建议使用这个工具类,一般情况下性能优化不应该涉及到这里,如果有特俗场景遇到性能问题,例如sql in,或接口传输,网关传输数据等需要执行大量数据请求时,可将数据拆分处理
|
||||
*/
|
||||
public class ExecutorUtil {
|
||||
|
||||
/**
|
||||
* 拆分数据到指定大小的集合中
|
||||
*
|
||||
* @param parentList 数据集合
|
||||
* @param splitSize 拆分集合大小
|
||||
* @return
|
||||
*/
|
||||
private static List<List<String>> splitList(List<String> parentList, int splitSize) {
|
||||
List<List<String>> dividedList = new ArrayList<>();
|
||||
|
||||
int batchSize = parentList.size() / splitSize;
|
||||
int remainder = parentList.size() % splitSize;
|
||||
|
||||
int index = 0;
|
||||
for (int i = 0; i < splitSize; i++) {
|
||||
int size = batchSize + (i < remainder ? 1 : 0);
|
||||
List<String> sublist = parentList.subList(index, index + size);
|
||||
dividedList.add(sublist);
|
||||
index += size;
|
||||
}
|
||||
|
||||
return dividedList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 本方法为财务获取报表数据使用
|
||||
* for东华项目,后续其他业务可做小量改造使用
|
||||
* 多线程查询:当集合数据过大对集合进行执行数量拆分并使用多线程批量执行,执行完成后将结果返回
|
||||
*
|
||||
* @param parentList 数据集合
|
||||
* @param splitSize 拆分集合大小
|
||||
* @param applyFun 执行函数
|
||||
* @param executor 线程池对象
|
||||
* @return
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
public <T> Object getSaleReport(List<String> parentList, int splitSize, Function<byte[], Object> applyFun, ThreadPoolExecutor executor) {
|
||||
@ -71,27 +97,4 @@ public class ExecutorUtil {
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 拆分数据到指定大小的集合中
|
||||
* @param parentList 数据集合
|
||||
* @param splitSize 拆分集合大小
|
||||
* @return
|
||||
*/
|
||||
private static List<List<String>> splitList(List<String> parentList, int splitSize) {
|
||||
List<List<String>> dividedList = new ArrayList<>();
|
||||
|
||||
int batchSize = parentList.size() / splitSize;
|
||||
int remainder = parentList.size() % splitSize;
|
||||
|
||||
int index = 0;
|
||||
for (int i = 0; i < splitSize; i++) {
|
||||
int size = batchSize + (i < remainder ? 1 : 0);
|
||||
List<String> sublist = parentList.subList(index, index + size);
|
||||
dividedList.add(sublist);
|
||||
index += size;
|
||||
}
|
||||
|
||||
return dividedList;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -18,16 +18,10 @@ import java.util.Locale;
|
||||
@Component
|
||||
@Slf4j
|
||||
public class I18nUtil {
|
||||
private static MessageSource staticMessageSource;
|
||||
@Resource
|
||||
private MessageSource messageSource;
|
||||
|
||||
private static MessageSource staticMessageSource;
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
I18nUtil.staticMessageSource = messageSource;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过code 返回对应的提示信息
|
||||
*
|
||||
@ -77,4 +71,9 @@ public class I18nUtil {
|
||||
|
||||
return content;
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
I18nUtil.staticMessageSource = messageSource;
|
||||
}
|
||||
}
|
||||
@ -27,33 +27,6 @@ public class IdUtil {
|
||||
private long lastTimestamp = -1L;
|
||||
|
||||
/**
|
||||
* 雪花算法生成分布式唯一ID
|
||||
* @return
|
||||
*/
|
||||
public synchronized long generateId() {
|
||||
long timestamp = System.currentTimeMillis();
|
||||
if (timestamp < lastTimestamp) {
|
||||
throw new ApiException(I18nUtil._("获取系统时间段错误, 当前系统时间:" + timestamp));
|
||||
}
|
||||
|
||||
if (timestamp == lastTimestamp) {
|
||||
sequence = (sequence + 1) & SEQUENCE_MASK;
|
||||
if (sequence == 0) {
|
||||
timestamp = tilNextMillis(lastTimestamp);
|
||||
}
|
||||
} else {
|
||||
sequence = 0L;
|
||||
}
|
||||
|
||||
lastTimestamp = timestamp;
|
||||
return ((timestamp - EPOCH) << TIMESTAMP_LEFT_SHIFT) |
|
||||
(dataCenterId << DATA_CENTER_ID_SHIFT) |
|
||||
(workerId << WORKER_ID_SHIFT) |
|
||||
sequence;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param workerId 工作机器ID
|
||||
* @param dataCenterId 数据中心ID
|
||||
*/
|
||||
@ -68,20 +41,6 @@ public class IdUtil {
|
||||
this.dataCenterId = dataCenterId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 等待直到下一个毫秒,以确保在同一毫秒内生成的雪花算法ID不发生冲突。
|
||||
*
|
||||
* @param lastTimestamp 上一个生成ID的时间戳
|
||||
* @return 下一个合适的时间戳
|
||||
*/
|
||||
private long tilNextMillis(long lastTimestamp) {
|
||||
long timestamp = System.currentTimeMillis();
|
||||
while (timestamp <= lastTimestamp) {
|
||||
timestamp = System.currentTimeMillis();
|
||||
}
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
/**
|
||||
* 自定义生成n位uuid
|
||||
*
|
||||
@ -116,4 +75,45 @@ public class IdUtil {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 雪花算法生成分布式唯一ID
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public synchronized long generateId() {
|
||||
long timestamp = System.currentTimeMillis();
|
||||
if (timestamp < lastTimestamp) {
|
||||
throw new ApiException(I18nUtil._("获取系统时间段错误, 当前系统时间:" + timestamp));
|
||||
}
|
||||
|
||||
if (timestamp == lastTimestamp) {
|
||||
sequence = (sequence + 1) & SEQUENCE_MASK;
|
||||
if (sequence == 0) {
|
||||
timestamp = tilNextMillis(lastTimestamp);
|
||||
}
|
||||
} else {
|
||||
sequence = 0L;
|
||||
}
|
||||
|
||||
lastTimestamp = timestamp;
|
||||
return ((timestamp - EPOCH) << TIMESTAMP_LEFT_SHIFT) |
|
||||
(dataCenterId << DATA_CENTER_ID_SHIFT) |
|
||||
(workerId << WORKER_ID_SHIFT) |
|
||||
sequence;
|
||||
}
|
||||
|
||||
/**
|
||||
* 等待直到下一个毫秒,以确保在同一毫秒内生成的雪花算法ID不发生冲突。
|
||||
*
|
||||
* @param lastTimestamp 上一个生成ID的时间戳
|
||||
* @return 下一个合适的时间戳
|
||||
*/
|
||||
private long tilNextMillis(long lastTimestamp) {
|
||||
long timestamp = System.currentTimeMillis();
|
||||
while (timestamp <= lastTimestamp) {
|
||||
timestamp = System.currentTimeMillis();
|
||||
}
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -23,6 +23,35 @@ public class JChardetFacadeUtil {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
interface ICodepageDetector extends Serializable, Comparable {
|
||||
Reader open(URL var1) throws IOException;
|
||||
|
||||
Charset detectCodepage(URL var1) throws IOException;
|
||||
|
||||
Charset detectCodepage(InputStream var1, int var2) throws IOException;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public interface nsICharsetDetectionObserver {
|
||||
void Notify(String var1);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public interface nsICharsetDetector {
|
||||
void Init(nsICharsetDetectionObserver var1);
|
||||
|
||||
boolean DoIt(byte[] var1, int var2, boolean var3);
|
||||
|
||||
void Done();
|
||||
}
|
||||
|
||||
/**
|
||||
* 下面代码来自: https://github.com/r91987/cpdetector
|
||||
*/
|
||||
@ -146,17 +175,6 @@ public class JChardetFacadeUtil {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
interface ICodepageDetector extends Serializable, Comparable {
|
||||
Reader open(URL var1) throws IOException;
|
||||
|
||||
Charset detectCodepage(URL var1) throws IOException;
|
||||
|
||||
Charset detectCodepage(InputStream var1, int var2) throws IOException;
|
||||
}
|
||||
|
||||
/**
|
||||
* 以下代码开始是由Mozilla组织提供的JChardet, 它可以检测大多数文件的编码
|
||||
* http://jchardet.sourceforge.net/
|
||||
@ -433,24 +451,6 @@ public class JChardetFacadeUtil {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public interface nsICharsetDetectionObserver {
|
||||
void Notify(String var1);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public interface nsICharsetDetector {
|
||||
void Init(nsICharsetDetectionObserver var1);
|
||||
|
||||
boolean DoIt(byte[] var1, int var2, boolean var3);
|
||||
|
||||
void Done();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ -466,6 +466,10 @@ public class JChardetFacadeUtil {
|
||||
nsVerifier() {
|
||||
}
|
||||
|
||||
public static byte getNextState(nsVerifier var0, byte var1, byte var2) {
|
||||
return (byte) (255 & var0.states()[(var2 * var0.stFactor() + (var0.cclass()[(var1 & 255) >> 3] >> ((var1 & 7) << 2) & 15) & 255) >> 3] >> ((var2 * var0.stFactor() + (var0.cclass()[(var1 & 255) >> 3] >> ((var1 & 7) << 2) & 15) & 255 & 7) << 2) & 15);
|
||||
}
|
||||
|
||||
public abstract String charset();
|
||||
|
||||
public abstract int stFactor();
|
||||
@ -475,23 +479,19 @@ public class JChardetFacadeUtil {
|
||||
public abstract int[] states();
|
||||
|
||||
public abstract boolean isUCS2();
|
||||
|
||||
public static byte getNextState(nsVerifier var0, byte var1, byte var2) {
|
||||
return (byte) (255 & var0.states()[(var2 * var0.stFactor() + (var0.cclass()[(var1 & 255) >> 3] >> ((var1 & 7) << 2) & 15) & 255) >> 3] >> ((var2 * var0.stFactor() + (var0.cclass()[(var1 & 255) >> 3] >> ((var1 & 7) << 2) & 15) & 255 & 7) << 2) & 15);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static class nsEUCSampler {
|
||||
int mTotal = 0;
|
||||
int mThreshold = 200;
|
||||
int mState = 0;
|
||||
public int[] mFirstByteCnt = new int[94];
|
||||
public int[] mSecondByteCnt = new int[94];
|
||||
public float[] mFirstByteFreq = new float[94];
|
||||
public float[] mSecondByteFreq = new float[94];
|
||||
int mTotal = 0;
|
||||
int mThreshold = 200;
|
||||
int mState = 0;
|
||||
|
||||
public nsEUCSampler() {
|
||||
this.Reset();
|
||||
@ -588,6 +588,9 @@ public class JChardetFacadeUtil {
|
||||
*
|
||||
*/
|
||||
public static abstract class nsEUCStatistics {
|
||||
public nsEUCStatistics() {
|
||||
}
|
||||
|
||||
public abstract float[] mFirstByteFreq();
|
||||
|
||||
public abstract float mFirstByteStdDev();
|
||||
@ -603,9 +606,6 @@ public class JChardetFacadeUtil {
|
||||
public abstract float mSecondByteMean();
|
||||
|
||||
public abstract float mSecondByteWeight();
|
||||
|
||||
public nsEUCStatistics() {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -621,6 +621,17 @@ public class JChardetFacadeUtil {
|
||||
static float mSecondByteMean;
|
||||
static float mSecondByteWeight;
|
||||
|
||||
public EUCJPStatistics() {
|
||||
mFirstByteFreq = new float[]{0.364808F, 0.0F, 0.0F, 0.145325F, 0.304891F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.001835F, 0.010771F, 0.006462F, 0.001157F, 0.002114F, 0.003231F, 0.001356F, 0.00742F, 0.004189F, 0.003231F, 0.003032F, 0.03319F, 0.006303F, 0.006064F, 0.009973F, 0.002354F, 0.00367F, 0.009135F, 0.001675F, 0.002792F, 0.002194F, 0.01472F, 0.011928F, 8.78E-4F, 0.013124F, 0.001077F, 0.009295F, 0.003471F, 0.002872F, 0.002433F, 9.57E-4F, 0.001636F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 8.0E-5F, 2.79E-4F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 8.0E-5F, 0.0F};
|
||||
mFirstByteStdDev = 0.050407F;
|
||||
mFirstByteMean = 0.010638F;
|
||||
mFirstByteWeight = 0.640871F;
|
||||
mSecondByteFreq = new float[]{0.002473F, 0.039134F, 0.152745F, 0.009694F, 3.59E-4F, 0.02218F, 7.58E-4F, 0.004308F, 1.6E-4F, 0.002513F, 0.003072F, 0.001316F, 0.00383F, 0.001037F, 0.00359F, 9.57E-4F, 1.6E-4F, 2.39E-4F, 0.006462F, 0.001596F, 0.031554F, 0.001316F, 0.002194F, 0.016555F, 0.003271F, 6.78E-4F, 5.98E-4F, 0.206438F, 7.18E-4F, 0.001077F, 0.00371F, 0.001356F, 0.001356F, 4.39E-4F, 0.004388F, 0.005704F, 8.78E-4F, 0.010172F, 0.007061F, 0.01468F, 6.38E-4F, 0.02573F, 0.002792F, 7.18E-4F, 0.001795F, 0.091551F, 7.58E-4F, 0.003909F, 5.58E-4F, 0.031195F, 0.007061F, 0.001316F, 0.022579F, 0.006981F, 0.00726F, 0.001117F, 2.39E-4F, 0.012127F, 8.78E-4F, 0.00379F, 0.001077F, 7.58E-4F, 0.002114F, 0.002234F, 6.78E-4F, 0.002992F, 0.003311F, 0.023416F, 0.001237F, 0.002753F, 0.005146F, 0.002194F, 0.007021F, 0.008497F, 0.013763F, 0.011768F, 0.006303F, 0.001915F, 6.38E-4F, 0.008776F, 9.18E-4F, 0.003431F, 0.057603F, 4.39E-4F, 4.39E-4F, 7.58E-4F, 0.002872F, 0.001675F, 0.01105F, 0.0F, 2.79E-4F, 0.012127F, 7.18E-4F, 0.00738F};
|
||||
mSecondByteStdDev = 0.028247F;
|
||||
mSecondByteMean = 0.010638F;
|
||||
mSecondByteWeight = 0.359129F;
|
||||
}
|
||||
|
||||
public float[] mFirstByteFreq() {
|
||||
return mFirstByteFreq;
|
||||
}
|
||||
@ -652,17 +663,6 @@ public class JChardetFacadeUtil {
|
||||
public float mSecondByteWeight() {
|
||||
return mSecondByteWeight;
|
||||
}
|
||||
|
||||
public EUCJPStatistics() {
|
||||
mFirstByteFreq = new float[]{0.364808F, 0.0F, 0.0F, 0.145325F, 0.304891F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.001835F, 0.010771F, 0.006462F, 0.001157F, 0.002114F, 0.003231F, 0.001356F, 0.00742F, 0.004189F, 0.003231F, 0.003032F, 0.03319F, 0.006303F, 0.006064F, 0.009973F, 0.002354F, 0.00367F, 0.009135F, 0.001675F, 0.002792F, 0.002194F, 0.01472F, 0.011928F, 8.78E-4F, 0.013124F, 0.001077F, 0.009295F, 0.003471F, 0.002872F, 0.002433F, 9.57E-4F, 0.001636F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 8.0E-5F, 2.79E-4F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 8.0E-5F, 0.0F};
|
||||
mFirstByteStdDev = 0.050407F;
|
||||
mFirstByteMean = 0.010638F;
|
||||
mFirstByteWeight = 0.640871F;
|
||||
mSecondByteFreq = new float[]{0.002473F, 0.039134F, 0.152745F, 0.009694F, 3.59E-4F, 0.02218F, 7.58E-4F, 0.004308F, 1.6E-4F, 0.002513F, 0.003072F, 0.001316F, 0.00383F, 0.001037F, 0.00359F, 9.57E-4F, 1.6E-4F, 2.39E-4F, 0.006462F, 0.001596F, 0.031554F, 0.001316F, 0.002194F, 0.016555F, 0.003271F, 6.78E-4F, 5.98E-4F, 0.206438F, 7.18E-4F, 0.001077F, 0.00371F, 0.001356F, 0.001356F, 4.39E-4F, 0.004388F, 0.005704F, 8.78E-4F, 0.010172F, 0.007061F, 0.01468F, 6.38E-4F, 0.02573F, 0.002792F, 7.18E-4F, 0.001795F, 0.091551F, 7.58E-4F, 0.003909F, 5.58E-4F, 0.031195F, 0.007061F, 0.001316F, 0.022579F, 0.006981F, 0.00726F, 0.001117F, 2.39E-4F, 0.012127F, 8.78E-4F, 0.00379F, 0.001077F, 7.58E-4F, 0.002114F, 0.002234F, 6.78E-4F, 0.002992F, 0.003311F, 0.023416F, 0.001237F, 0.002753F, 0.005146F, 0.002194F, 0.007021F, 0.008497F, 0.013763F, 0.011768F, 0.006303F, 0.001915F, 6.38E-4F, 0.008776F, 9.18E-4F, 0.003431F, 0.057603F, 4.39E-4F, 4.39E-4F, 7.58E-4F, 0.002872F, 0.001675F, 0.01105F, 0.0F, 2.79E-4F, 0.012127F, 7.18E-4F, 0.00738F};
|
||||
mSecondByteStdDev = 0.028247F;
|
||||
mSecondByteMean = 0.010638F;
|
||||
mSecondByteWeight = 0.359129F;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -674,22 +674,6 @@ public class JChardetFacadeUtil {
|
||||
static int stFactor;
|
||||
static String charset;
|
||||
|
||||
public int[] cclass() {
|
||||
return cclass;
|
||||
}
|
||||
|
||||
public int[] states() {
|
||||
return states;
|
||||
}
|
||||
|
||||
public int stFactor() {
|
||||
return stFactor;
|
||||
}
|
||||
|
||||
public String charset() {
|
||||
return charset;
|
||||
}
|
||||
|
||||
public nsEUCJPVerifier() {
|
||||
cclass = new int[32];
|
||||
cclass[0] = 1145324612;
|
||||
@ -734,6 +718,22 @@ public class JChardetFacadeUtil {
|
||||
stFactor = 6;
|
||||
}
|
||||
|
||||
public int[] cclass() {
|
||||
return cclass;
|
||||
}
|
||||
|
||||
public int[] states() {
|
||||
return states;
|
||||
}
|
||||
|
||||
public int stFactor() {
|
||||
return stFactor;
|
||||
}
|
||||
|
||||
public String charset() {
|
||||
return charset;
|
||||
}
|
||||
|
||||
public boolean isUCS2() {
|
||||
return false;
|
||||
}
|
||||
@ -752,6 +752,17 @@ public class JChardetFacadeUtil {
|
||||
static float mSecondByteMean;
|
||||
static float mSecondByteWeight;
|
||||
|
||||
public EUCKRStatistics() {
|
||||
mFirstByteFreq = new float[]{0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 4.12E-4F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.057502F, 0.033182F, 0.002267F, 0.016076F, 0.014633F, 0.032976F, 0.004122F, 0.011336F, 0.058533F, 0.024526F, 0.025969F, 0.054411F, 0.01958F, 0.063273F, 0.113974F, 0.029885F, 0.150041F, 0.059151F, 0.002679F, 0.009893F, 0.014839F, 0.026381F, 0.015045F, 0.069456F, 0.08986F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F};
|
||||
mFirstByteStdDev = 0.025593F;
|
||||
mFirstByteMean = 0.010638F;
|
||||
mFirstByteWeight = 0.647437F;
|
||||
mSecondByteFreq = new float[]{0.016694F, 0.0F, 0.012778F, 0.030091F, 0.002679F, 0.006595F, 0.001855F, 8.24E-4F, 0.005977F, 0.00474F, 0.003092F, 8.24E-4F, 0.01958F, 0.037304F, 0.008244F, 0.014633F, 0.001031F, 0.0F, 0.003298F, 0.002061F, 0.006183F, 0.005977F, 8.24E-4F, 0.021847F, 0.014839F, 0.052968F, 0.017312F, 0.007626F, 4.12E-4F, 8.24E-4F, 0.011129F, 0.0F, 4.12E-4F, 0.001649F, 0.005977F, 0.065746F, 0.020198F, 0.021434F, 0.014633F, 0.004122F, 0.001649F, 8.24E-4F, 8.24E-4F, 0.051937F, 0.01958F, 0.023289F, 0.026381F, 0.040396F, 0.009068F, 0.001443F, 0.00371F, 0.00742F, 0.001443F, 0.01319F, 0.002885F, 4.12E-4F, 0.003298F, 0.025969F, 4.12E-4F, 4.12E-4F, 0.006183F, 0.003298F, 0.066983F, 0.002679F, 0.002267F, 0.011129F, 4.12E-4F, 0.010099F, 0.015251F, 0.007626F, 0.043899F, 0.00371F, 0.002679F, 0.001443F, 0.010923F, 0.002885F, 0.009068F, 0.019992F, 4.12E-4F, 0.00845F, 0.005153F, 0.0F, 0.010099F, 0.0F, 0.001649F, 0.01216F, 0.011542F, 0.006595F, 0.001855F, 0.010923F, 4.12E-4F, 0.023702F, 0.00371F, 0.001855F};
|
||||
mSecondByteStdDev = 0.013937F;
|
||||
mSecondByteMean = 0.010638F;
|
||||
mSecondByteWeight = 0.352563F;
|
||||
}
|
||||
|
||||
public float[] mFirstByteFreq() {
|
||||
return mFirstByteFreq;
|
||||
}
|
||||
@ -783,17 +794,6 @@ public class JChardetFacadeUtil {
|
||||
public float mSecondByteWeight() {
|
||||
return mSecondByteWeight;
|
||||
}
|
||||
|
||||
public EUCKRStatistics() {
|
||||
mFirstByteFreq = new float[]{0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 4.12E-4F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.057502F, 0.033182F, 0.002267F, 0.016076F, 0.014633F, 0.032976F, 0.004122F, 0.011336F, 0.058533F, 0.024526F, 0.025969F, 0.054411F, 0.01958F, 0.063273F, 0.113974F, 0.029885F, 0.150041F, 0.059151F, 0.002679F, 0.009893F, 0.014839F, 0.026381F, 0.015045F, 0.069456F, 0.08986F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F};
|
||||
mFirstByteStdDev = 0.025593F;
|
||||
mFirstByteMean = 0.010638F;
|
||||
mFirstByteWeight = 0.647437F;
|
||||
mSecondByteFreq = new float[]{0.016694F, 0.0F, 0.012778F, 0.030091F, 0.002679F, 0.006595F, 0.001855F, 8.24E-4F, 0.005977F, 0.00474F, 0.003092F, 8.24E-4F, 0.01958F, 0.037304F, 0.008244F, 0.014633F, 0.001031F, 0.0F, 0.003298F, 0.002061F, 0.006183F, 0.005977F, 8.24E-4F, 0.021847F, 0.014839F, 0.052968F, 0.017312F, 0.007626F, 4.12E-4F, 8.24E-4F, 0.011129F, 0.0F, 4.12E-4F, 0.001649F, 0.005977F, 0.065746F, 0.020198F, 0.021434F, 0.014633F, 0.004122F, 0.001649F, 8.24E-4F, 8.24E-4F, 0.051937F, 0.01958F, 0.023289F, 0.026381F, 0.040396F, 0.009068F, 0.001443F, 0.00371F, 0.00742F, 0.001443F, 0.01319F, 0.002885F, 4.12E-4F, 0.003298F, 0.025969F, 4.12E-4F, 4.12E-4F, 0.006183F, 0.003298F, 0.066983F, 0.002679F, 0.002267F, 0.011129F, 4.12E-4F, 0.010099F, 0.015251F, 0.007626F, 0.043899F, 0.00371F, 0.002679F, 0.001443F, 0.010923F, 0.002885F, 0.009068F, 0.019992F, 4.12E-4F, 0.00845F, 0.005153F, 0.0F, 0.010099F, 0.0F, 0.001649F, 0.01216F, 0.011542F, 0.006595F, 0.001855F, 0.010923F, 4.12E-4F, 0.023702F, 0.00371F, 0.001855F};
|
||||
mSecondByteStdDev = 0.013937F;
|
||||
mSecondByteMean = 0.010638F;
|
||||
mSecondByteWeight = 0.352563F;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -805,22 +805,6 @@ public class JChardetFacadeUtil {
|
||||
static int stFactor;
|
||||
static String charset;
|
||||
|
||||
public int[] cclass() {
|
||||
return cclass;
|
||||
}
|
||||
|
||||
public int[] states() {
|
||||
return states;
|
||||
}
|
||||
|
||||
public int stFactor() {
|
||||
return stFactor;
|
||||
}
|
||||
|
||||
public String charset() {
|
||||
return charset;
|
||||
}
|
||||
|
||||
public nsEUCKRVerifier() {
|
||||
cclass = new int[32];
|
||||
cclass[0] = 286331153;
|
||||
@ -862,6 +846,22 @@ public class JChardetFacadeUtil {
|
||||
stFactor = 4;
|
||||
}
|
||||
|
||||
public int[] cclass() {
|
||||
return cclass;
|
||||
}
|
||||
|
||||
public int[] states() {
|
||||
return states;
|
||||
}
|
||||
|
||||
public int stFactor() {
|
||||
return stFactor;
|
||||
}
|
||||
|
||||
public String charset() {
|
||||
return charset;
|
||||
}
|
||||
|
||||
public boolean isUCS2() {
|
||||
return false;
|
||||
}
|
||||
@ -880,6 +880,17 @@ public class JChardetFacadeUtil {
|
||||
static float mSecondByteMean;
|
||||
static float mSecondByteWeight;
|
||||
|
||||
public EUCTWStatistics() {
|
||||
mFirstByteFreq = new float[]{0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.119286F, 0.052233F, 0.044126F, 0.052494F, 0.045906F, 0.019038F, 0.032465F, 0.026252F, 0.025502F, 0.015963F, 0.052493F, 0.019256F, 0.015137F, 0.031782F, 0.01737F, 0.018494F, 0.015575F, 0.016621F, 0.007444F, 0.011642F, 0.013916F, 0.019159F, 0.016445F, 0.007851F, 0.011079F, 0.022842F, 0.015513F, 0.010033F, 0.00995F, 0.010347F, 0.013103F, 0.015371F, 0.012502F, 0.007436F, 0.018253F, 0.014134F, 0.008907F, 0.005411F, 0.00957F, 0.013598F, 0.006092F, 0.007409F, 0.008432F, 0.005816F, 0.009349F, 0.005472F, 0.00717F, 0.00742F, 0.003681F, 0.007523F, 0.00461F, 0.006154F, 0.003348F, 0.005074F, 0.005922F, 0.005254F, 0.004682F, 0.002093F, 0.0F};
|
||||
mFirstByteStdDev = 0.016681F;
|
||||
mFirstByteMean = 0.010638F;
|
||||
mFirstByteWeight = 0.715599F;
|
||||
mSecondByteFreq = new float[]{0.028933F, 0.011371F, 0.011053F, 0.007232F, 0.010192F, 0.004093F, 0.015043F, 0.011752F, 0.022387F, 0.00841F, 0.012448F, 0.007473F, 0.003594F, 0.007139F, 0.018912F, 0.006083F, 0.003302F, 0.010215F, 0.008791F, 0.024236F, 0.014107F, 0.014108F, 0.010303F, 0.009728F, 0.007877F, 0.009719F, 0.007952F, 0.021028F, 0.005764F, 0.009341F, 0.006591F, 0.012517F, 0.005921F, 0.008982F, 0.008771F, 0.012802F, 0.005926F, 0.008342F, 0.003086F, 0.006843F, 0.007576F, 0.004734F, 0.016404F, 0.008803F, 0.008071F, 0.005349F, 0.008566F, 0.01084F, 0.015401F, 0.031904F, 0.00867F, 0.011479F, 0.010936F, 0.007617F, 0.008995F, 0.008114F, 0.008658F, 0.005934F, 0.010452F, 0.009142F, 0.004519F, 0.008339F, 0.007476F, 0.007027F, 0.006025F, 0.021804F, 0.024248F, 0.015895F, 0.003768F, 0.010171F, 0.010007F, 0.010178F, 0.008316F, 0.006832F, 0.006364F, 0.009141F, 0.009148F, 0.012081F, 0.011914F, 0.004464F, 0.014257F, 0.006907F, 0.011292F, 0.018622F, 0.008149F, 0.004636F, 0.006612F, 0.013478F, 0.012614F, 0.005186F, 0.048285F, 0.006816F, 0.006743F, 0.008671F};
|
||||
mSecondByteStdDev = 0.00663F;
|
||||
mSecondByteMean = 0.010638F;
|
||||
mSecondByteWeight = 0.284401F;
|
||||
}
|
||||
|
||||
public float[] mFirstByteFreq() {
|
||||
return mFirstByteFreq;
|
||||
}
|
||||
@ -911,17 +922,6 @@ public class JChardetFacadeUtil {
|
||||
public float mSecondByteWeight() {
|
||||
return mSecondByteWeight;
|
||||
}
|
||||
|
||||
public EUCTWStatistics() {
|
||||
mFirstByteFreq = new float[]{0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.119286F, 0.052233F, 0.044126F, 0.052494F, 0.045906F, 0.019038F, 0.032465F, 0.026252F, 0.025502F, 0.015963F, 0.052493F, 0.019256F, 0.015137F, 0.031782F, 0.01737F, 0.018494F, 0.015575F, 0.016621F, 0.007444F, 0.011642F, 0.013916F, 0.019159F, 0.016445F, 0.007851F, 0.011079F, 0.022842F, 0.015513F, 0.010033F, 0.00995F, 0.010347F, 0.013103F, 0.015371F, 0.012502F, 0.007436F, 0.018253F, 0.014134F, 0.008907F, 0.005411F, 0.00957F, 0.013598F, 0.006092F, 0.007409F, 0.008432F, 0.005816F, 0.009349F, 0.005472F, 0.00717F, 0.00742F, 0.003681F, 0.007523F, 0.00461F, 0.006154F, 0.003348F, 0.005074F, 0.005922F, 0.005254F, 0.004682F, 0.002093F, 0.0F};
|
||||
mFirstByteStdDev = 0.016681F;
|
||||
mFirstByteMean = 0.010638F;
|
||||
mFirstByteWeight = 0.715599F;
|
||||
mSecondByteFreq = new float[]{0.028933F, 0.011371F, 0.011053F, 0.007232F, 0.010192F, 0.004093F, 0.015043F, 0.011752F, 0.022387F, 0.00841F, 0.012448F, 0.007473F, 0.003594F, 0.007139F, 0.018912F, 0.006083F, 0.003302F, 0.010215F, 0.008791F, 0.024236F, 0.014107F, 0.014108F, 0.010303F, 0.009728F, 0.007877F, 0.009719F, 0.007952F, 0.021028F, 0.005764F, 0.009341F, 0.006591F, 0.012517F, 0.005921F, 0.008982F, 0.008771F, 0.012802F, 0.005926F, 0.008342F, 0.003086F, 0.006843F, 0.007576F, 0.004734F, 0.016404F, 0.008803F, 0.008071F, 0.005349F, 0.008566F, 0.01084F, 0.015401F, 0.031904F, 0.00867F, 0.011479F, 0.010936F, 0.007617F, 0.008995F, 0.008114F, 0.008658F, 0.005934F, 0.010452F, 0.009142F, 0.004519F, 0.008339F, 0.007476F, 0.007027F, 0.006025F, 0.021804F, 0.024248F, 0.015895F, 0.003768F, 0.010171F, 0.010007F, 0.010178F, 0.008316F, 0.006832F, 0.006364F, 0.009141F, 0.009148F, 0.012081F, 0.011914F, 0.004464F, 0.014257F, 0.006907F, 0.011292F, 0.018622F, 0.008149F, 0.004636F, 0.006612F, 0.013478F, 0.012614F, 0.005186F, 0.048285F, 0.006816F, 0.006743F, 0.008671F};
|
||||
mSecondByteStdDev = 0.00663F;
|
||||
mSecondByteMean = 0.010638F;
|
||||
mSecondByteWeight = 0.284401F;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -933,22 +933,6 @@ public class JChardetFacadeUtil {
|
||||
static int stFactor;
|
||||
static String charset;
|
||||
|
||||
public int[] cclass() {
|
||||
return cclass;
|
||||
}
|
||||
|
||||
public int[] states() {
|
||||
return states;
|
||||
}
|
||||
|
||||
public int stFactor() {
|
||||
return stFactor;
|
||||
}
|
||||
|
||||
public String charset() {
|
||||
return charset;
|
||||
}
|
||||
|
||||
public nsEUCTWVerifier() {
|
||||
cclass = new int[32];
|
||||
cclass[0] = 572662306;
|
||||
@ -994,6 +978,22 @@ public class JChardetFacadeUtil {
|
||||
stFactor = 7;
|
||||
}
|
||||
|
||||
public int[] cclass() {
|
||||
return cclass;
|
||||
}
|
||||
|
||||
public int[] states() {
|
||||
return states;
|
||||
}
|
||||
|
||||
public int stFactor() {
|
||||
return stFactor;
|
||||
}
|
||||
|
||||
public String charset() {
|
||||
return charset;
|
||||
}
|
||||
|
||||
public boolean isUCS2() {
|
||||
return false;
|
||||
}
|
||||
@ -1012,6 +1012,17 @@ public class JChardetFacadeUtil {
|
||||
static float mSecondByteMean;
|
||||
static float mSecondByteWeight;
|
||||
|
||||
public Big5Statistics() {
|
||||
mFirstByteFreq = new float[]{0.0F, 0.0F, 0.0F, 0.114427F, 0.061058F, 0.075598F, 0.048386F, 0.063966F, 0.027094F, 0.095787F, 0.029525F, 0.031331F, 0.036915F, 0.021805F, 0.019349F, 0.037496F, 0.018068F, 0.01276F, 0.030053F, 0.017339F, 0.016731F, 0.019501F, 0.01124F, 0.032973F, 0.016658F, 0.015872F, 0.021458F, 0.012378F, 0.017003F, 0.020802F, 0.012454F, 0.009239F, 0.012829F, 0.007922F, 0.010079F, 0.009815F, 0.010104F, 0.0F, 0.0F, 0.0F, 5.3E-5F, 3.5E-5F, 1.05E-4F, 3.1E-5F, 8.8E-5F, 2.7E-5F, 2.7E-5F, 2.6E-5F, 3.5E-5F, 2.4E-5F, 3.4E-5F, 3.75E-4F, 2.5E-5F, 2.8E-5F, 2.0E-5F, 2.4E-5F, 2.8E-5F, 3.1E-5F, 5.9E-5F, 4.0E-5F, 3.0E-5F, 7.9E-5F, 3.7E-5F, 4.0E-5F, 2.3E-5F, 3.0E-5F, 2.7E-5F, 6.4E-5F, 2.0E-5F, 2.7E-5F, 2.5E-5F, 7.4E-5F, 1.9E-5F, 2.3E-5F, 2.1E-5F, 1.8E-5F, 1.7E-5F, 3.5E-5F, 2.1E-5F, 1.9E-5F, 2.5E-5F, 1.7E-5F, 3.7E-5F, 1.8E-5F, 1.8E-5F, 1.9E-5F, 2.2E-5F, 3.3E-5F, 3.2E-5F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F};
|
||||
mFirstByteStdDev = 0.020606F;
|
||||
mFirstByteMean = 0.010638F;
|
||||
mFirstByteWeight = 0.675261F;
|
||||
mSecondByteFreq = new float[]{0.020256F, 0.003293F, 0.045811F, 0.01665F, 0.007066F, 0.004146F, 0.009229F, 0.007333F, 0.003296F, 0.005239F, 0.008282F, 0.003791F, 0.006116F, 0.003536F, 0.004024F, 0.016654F, 0.009334F, 0.005429F, 0.033392F, 0.006121F, 0.008983F, 0.002801F, 0.004221F, 0.010357F, 0.014695F, 0.077937F, 0.006314F, 0.00402F, 0.007331F, 0.00715F, 0.005341F, 0.009195F, 0.00535F, 0.005698F, 0.004472F, 0.007242F, 0.004039F, 0.011154F, 0.016184F, 0.004741F, 0.012814F, 0.007679F, 0.008045F, 0.016631F, 0.009451F, 0.016487F, 0.007287F, 0.012688F, 0.017421F, 0.013205F, 0.03148F, 0.003404F, 0.009149F, 0.008921F, 0.007514F, 0.008683F, 0.008203F, 0.031403F, 0.011733F, 0.015617F, 0.015306F, 0.004004F, 0.010899F, 0.009961F, 0.008388F, 0.01092F, 0.003925F, 0.008585F, 0.009108F, 0.015546F, 0.004659F, 0.006934F, 0.007023F, 0.020252F, 0.005387F, 0.024704F, 0.006963F, 0.002625F, 0.009512F, 0.002971F, 0.008233F, 0.01F, 0.011973F, 0.010553F, 0.005945F, 0.006349F, 0.009401F, 0.008577F, 0.008186F, 0.008159F, 0.005033F, 0.008714F, 0.010614F, 0.006554F};
|
||||
mSecondByteStdDev = 0.009909F;
|
||||
mSecondByteMean = 0.010638F;
|
||||
mSecondByteWeight = 0.324739F;
|
||||
}
|
||||
|
||||
public float[] mFirstByteFreq() {
|
||||
return mFirstByteFreq;
|
||||
}
|
||||
@ -1043,17 +1054,6 @@ public class JChardetFacadeUtil {
|
||||
public float mSecondByteWeight() {
|
||||
return mSecondByteWeight;
|
||||
}
|
||||
|
||||
public Big5Statistics() {
|
||||
mFirstByteFreq = new float[]{0.0F, 0.0F, 0.0F, 0.114427F, 0.061058F, 0.075598F, 0.048386F, 0.063966F, 0.027094F, 0.095787F, 0.029525F, 0.031331F, 0.036915F, 0.021805F, 0.019349F, 0.037496F, 0.018068F, 0.01276F, 0.030053F, 0.017339F, 0.016731F, 0.019501F, 0.01124F, 0.032973F, 0.016658F, 0.015872F, 0.021458F, 0.012378F, 0.017003F, 0.020802F, 0.012454F, 0.009239F, 0.012829F, 0.007922F, 0.010079F, 0.009815F, 0.010104F, 0.0F, 0.0F, 0.0F, 5.3E-5F, 3.5E-5F, 1.05E-4F, 3.1E-5F, 8.8E-5F, 2.7E-5F, 2.7E-5F, 2.6E-5F, 3.5E-5F, 2.4E-5F, 3.4E-5F, 3.75E-4F, 2.5E-5F, 2.8E-5F, 2.0E-5F, 2.4E-5F, 2.8E-5F, 3.1E-5F, 5.9E-5F, 4.0E-5F, 3.0E-5F, 7.9E-5F, 3.7E-5F, 4.0E-5F, 2.3E-5F, 3.0E-5F, 2.7E-5F, 6.4E-5F, 2.0E-5F, 2.7E-5F, 2.5E-5F, 7.4E-5F, 1.9E-5F, 2.3E-5F, 2.1E-5F, 1.8E-5F, 1.7E-5F, 3.5E-5F, 2.1E-5F, 1.9E-5F, 2.5E-5F, 1.7E-5F, 3.7E-5F, 1.8E-5F, 1.8E-5F, 1.9E-5F, 2.2E-5F, 3.3E-5F, 3.2E-5F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F};
|
||||
mFirstByteStdDev = 0.020606F;
|
||||
mFirstByteMean = 0.010638F;
|
||||
mFirstByteWeight = 0.675261F;
|
||||
mSecondByteFreq = new float[]{0.020256F, 0.003293F, 0.045811F, 0.01665F, 0.007066F, 0.004146F, 0.009229F, 0.007333F, 0.003296F, 0.005239F, 0.008282F, 0.003791F, 0.006116F, 0.003536F, 0.004024F, 0.016654F, 0.009334F, 0.005429F, 0.033392F, 0.006121F, 0.008983F, 0.002801F, 0.004221F, 0.010357F, 0.014695F, 0.077937F, 0.006314F, 0.00402F, 0.007331F, 0.00715F, 0.005341F, 0.009195F, 0.00535F, 0.005698F, 0.004472F, 0.007242F, 0.004039F, 0.011154F, 0.016184F, 0.004741F, 0.012814F, 0.007679F, 0.008045F, 0.016631F, 0.009451F, 0.016487F, 0.007287F, 0.012688F, 0.017421F, 0.013205F, 0.03148F, 0.003404F, 0.009149F, 0.008921F, 0.007514F, 0.008683F, 0.008203F, 0.031403F, 0.011733F, 0.015617F, 0.015306F, 0.004004F, 0.010899F, 0.009961F, 0.008388F, 0.01092F, 0.003925F, 0.008585F, 0.009108F, 0.015546F, 0.004659F, 0.006934F, 0.007023F, 0.020252F, 0.005387F, 0.024704F, 0.006963F, 0.002625F, 0.009512F, 0.002971F, 0.008233F, 0.01F, 0.011973F, 0.010553F, 0.005945F, 0.006349F, 0.009401F, 0.008577F, 0.008186F, 0.008159F, 0.005033F, 0.008714F, 0.010614F, 0.006554F};
|
||||
mSecondByteStdDev = 0.009909F;
|
||||
mSecondByteMean = 0.010638F;
|
||||
mSecondByteWeight = 0.324739F;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1065,22 +1065,6 @@ public class JChardetFacadeUtil {
|
||||
static int stFactor;
|
||||
static String charset;
|
||||
|
||||
public int[] cclass() {
|
||||
return cclass;
|
||||
}
|
||||
|
||||
public int[] states() {
|
||||
return states;
|
||||
}
|
||||
|
||||
public int stFactor() {
|
||||
return stFactor;
|
||||
}
|
||||
|
||||
public String charset() {
|
||||
return charset;
|
||||
}
|
||||
|
||||
public nsBIG5Verifier() {
|
||||
cclass = new int[32];
|
||||
cclass[0] = 286331153;
|
||||
@ -1123,6 +1107,22 @@ public class JChardetFacadeUtil {
|
||||
stFactor = 5;
|
||||
}
|
||||
|
||||
public int[] cclass() {
|
||||
return cclass;
|
||||
}
|
||||
|
||||
public int[] states() {
|
||||
return states;
|
||||
}
|
||||
|
||||
public int stFactor() {
|
||||
return stFactor;
|
||||
}
|
||||
|
||||
public String charset() {
|
||||
return charset;
|
||||
}
|
||||
|
||||
public boolean isUCS2() {
|
||||
return false;
|
||||
}
|
||||
@ -1141,6 +1141,17 @@ public class JChardetFacadeUtil {
|
||||
static float mSecondByteMean;
|
||||
static float mSecondByteWeight;
|
||||
|
||||
public GB2312Statistics() {
|
||||
mFirstByteFreq = new float[]{0.011628F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.011628F, 0.012403F, 0.009302F, 0.003876F, 0.017829F, 0.037209F, 0.008527F, 0.010078F, 0.01938F, 0.054264F, 0.010078F, 0.041085F, 0.02093F, 0.018605F, 0.010078F, 0.013178F, 0.016279F, 0.006202F, 0.009302F, 0.017054F, 0.011628F, 0.008527F, 0.004651F, 0.006202F, 0.017829F, 0.024806F, 0.020155F, 0.013953F, 0.032558F, 0.035659F, 0.068217F, 0.010853F, 0.036434F, 0.117054F, 0.027907F, 0.100775F, 0.010078F, 0.017829F, 0.062016F, 0.012403F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.00155F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F};
|
||||
mFirstByteStdDev = 0.020081F;
|
||||
mFirstByteMean = 0.010638F;
|
||||
mFirstByteWeight = 0.586533F;
|
||||
mSecondByteFreq = new float[]{0.006202F, 0.031008F, 0.005426F, 0.003101F, 0.00155F, 0.003101F, 0.082171F, 0.014729F, 0.006977F, 0.00155F, 0.013953F, 0.0F, 0.013953F, 0.010078F, 0.008527F, 0.006977F, 0.004651F, 0.003101F, 0.003101F, 0.003101F, 0.008527F, 0.003101F, 0.005426F, 0.005426F, 0.005426F, 0.003101F, 0.00155F, 0.006202F, 0.014729F, 0.010853F, 0.0F, 0.011628F, 0.0F, 0.031783F, 0.013953F, 0.030233F, 0.039535F, 0.008527F, 0.015504F, 0.0F, 0.003101F, 0.008527F, 0.016279F, 0.005426F, 0.00155F, 0.013953F, 0.013953F, 0.044961F, 0.003101F, 0.004651F, 0.006977F, 0.00155F, 0.005426F, 0.012403F, 0.00155F, 0.015504F, 0.0F, 0.006202F, 0.00155F, 0.0F, 0.007752F, 0.006977F, 0.00155F, 0.009302F, 0.011628F, 0.004651F, 0.010853F, 0.012403F, 0.017829F, 0.005426F, 0.024806F, 0.0F, 0.006202F, 0.0F, 0.082171F, 0.015504F, 0.004651F, 0.0F, 0.006977F, 0.004651F, 0.0F, 0.008527F, 0.012403F, 0.004651F, 0.003876F, 0.003101F, 0.022481F, 0.024031F, 0.00155F, 0.047287F, 0.009302F, 0.00155F, 0.005426F, 0.017054F};
|
||||
mSecondByteStdDev = 0.014156F;
|
||||
mSecondByteMean = 0.010638F;
|
||||
mSecondByteWeight = 0.413467F;
|
||||
}
|
||||
|
||||
public float[] mFirstByteFreq() {
|
||||
return mFirstByteFreq;
|
||||
}
|
||||
@ -1172,17 +1183,6 @@ public class JChardetFacadeUtil {
|
||||
public float mSecondByteWeight() {
|
||||
return mSecondByteWeight;
|
||||
}
|
||||
|
||||
public GB2312Statistics() {
|
||||
mFirstByteFreq = new float[]{0.011628F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.011628F, 0.012403F, 0.009302F, 0.003876F, 0.017829F, 0.037209F, 0.008527F, 0.010078F, 0.01938F, 0.054264F, 0.010078F, 0.041085F, 0.02093F, 0.018605F, 0.010078F, 0.013178F, 0.016279F, 0.006202F, 0.009302F, 0.017054F, 0.011628F, 0.008527F, 0.004651F, 0.006202F, 0.017829F, 0.024806F, 0.020155F, 0.013953F, 0.032558F, 0.035659F, 0.068217F, 0.010853F, 0.036434F, 0.117054F, 0.027907F, 0.100775F, 0.010078F, 0.017829F, 0.062016F, 0.012403F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.00155F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F};
|
||||
mFirstByteStdDev = 0.020081F;
|
||||
mFirstByteMean = 0.010638F;
|
||||
mFirstByteWeight = 0.586533F;
|
||||
mSecondByteFreq = new float[]{0.006202F, 0.031008F, 0.005426F, 0.003101F, 0.00155F, 0.003101F, 0.082171F, 0.014729F, 0.006977F, 0.00155F, 0.013953F, 0.0F, 0.013953F, 0.010078F, 0.008527F, 0.006977F, 0.004651F, 0.003101F, 0.003101F, 0.003101F, 0.008527F, 0.003101F, 0.005426F, 0.005426F, 0.005426F, 0.003101F, 0.00155F, 0.006202F, 0.014729F, 0.010853F, 0.0F, 0.011628F, 0.0F, 0.031783F, 0.013953F, 0.030233F, 0.039535F, 0.008527F, 0.015504F, 0.0F, 0.003101F, 0.008527F, 0.016279F, 0.005426F, 0.00155F, 0.013953F, 0.013953F, 0.044961F, 0.003101F, 0.004651F, 0.006977F, 0.00155F, 0.005426F, 0.012403F, 0.00155F, 0.015504F, 0.0F, 0.006202F, 0.00155F, 0.0F, 0.007752F, 0.006977F, 0.00155F, 0.009302F, 0.011628F, 0.004651F, 0.010853F, 0.012403F, 0.017829F, 0.005426F, 0.024806F, 0.0F, 0.006202F, 0.0F, 0.082171F, 0.015504F, 0.004651F, 0.0F, 0.006977F, 0.004651F, 0.0F, 0.008527F, 0.012403F, 0.004651F, 0.003876F, 0.003101F, 0.022481F, 0.024031F, 0.00155F, 0.047287F, 0.009302F, 0.00155F, 0.005426F, 0.017054F};
|
||||
mSecondByteStdDev = 0.014156F;
|
||||
mSecondByteMean = 0.010638F;
|
||||
mSecondByteWeight = 0.413467F;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1194,22 +1194,6 @@ public class JChardetFacadeUtil {
|
||||
static int stFactor;
|
||||
static String charset;
|
||||
|
||||
public int[] cclass() {
|
||||
return cclass;
|
||||
}
|
||||
|
||||
public int[] states() {
|
||||
return states;
|
||||
}
|
||||
|
||||
public int stFactor() {
|
||||
return stFactor;
|
||||
}
|
||||
|
||||
public String charset() {
|
||||
return charset;
|
||||
}
|
||||
|
||||
public nsGB2312Verifier() {
|
||||
cclass = new int[32];
|
||||
cclass[0] = 286331153;
|
||||
@ -1251,20 +1235,6 @@ public class JChardetFacadeUtil {
|
||||
stFactor = 4;
|
||||
}
|
||||
|
||||
public boolean isUCS2() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static class nsGB18030Verifier extends nsVerifier {
|
||||
static int[] cclass;
|
||||
static int[] states;
|
||||
static int stFactor;
|
||||
static String charset;
|
||||
|
||||
public int[] cclass() {
|
||||
return cclass;
|
||||
}
|
||||
@ -1281,6 +1251,20 @@ public class JChardetFacadeUtil {
|
||||
return charset;
|
||||
}
|
||||
|
||||
public boolean isUCS2() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static class nsGB18030Verifier extends nsVerifier {
|
||||
static int[] cclass;
|
||||
static int[] states;
|
||||
static int stFactor;
|
||||
static String charset;
|
||||
|
||||
public nsGB18030Verifier() {
|
||||
cclass = new int[32];
|
||||
cclass[0] = 286331153;
|
||||
@ -1326,20 +1310,6 @@ public class JChardetFacadeUtil {
|
||||
stFactor = 7;
|
||||
}
|
||||
|
||||
public boolean isUCS2() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static class nsISO2022CNVerifier extends nsVerifier {
|
||||
static int[] cclass;
|
||||
static int[] states;
|
||||
static int stFactor;
|
||||
static String charset;
|
||||
|
||||
public int[] cclass() {
|
||||
return cclass;
|
||||
}
|
||||
@ -1356,6 +1326,20 @@ public class JChardetFacadeUtil {
|
||||
return charset;
|
||||
}
|
||||
|
||||
public boolean isUCS2() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static class nsISO2022CNVerifier extends nsVerifier {
|
||||
static int[] cclass;
|
||||
static int[] states;
|
||||
static int stFactor;
|
||||
static String charset;
|
||||
|
||||
public nsISO2022CNVerifier() {
|
||||
cclass = new int[32];
|
||||
cclass[0] = 2;
|
||||
@ -1403,20 +1387,6 @@ public class JChardetFacadeUtil {
|
||||
stFactor = 9;
|
||||
}
|
||||
|
||||
public boolean isUCS2() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static class nsISO2022JPVerifier extends nsVerifier {
|
||||
static int[] cclass;
|
||||
static int[] states;
|
||||
static int stFactor;
|
||||
static String charset;
|
||||
|
||||
public int[] cclass() {
|
||||
return cclass;
|
||||
}
|
||||
@ -1433,6 +1403,20 @@ public class JChardetFacadeUtil {
|
||||
return charset;
|
||||
}
|
||||
|
||||
public boolean isUCS2() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static class nsISO2022JPVerifier extends nsVerifier {
|
||||
static int[] cclass;
|
||||
static int[] states;
|
||||
static int stFactor;
|
||||
static String charset;
|
||||
|
||||
public nsISO2022JPVerifier() {
|
||||
cclass = new int[32];
|
||||
cclass[0] = 2;
|
||||
@ -1478,20 +1462,6 @@ public class JChardetFacadeUtil {
|
||||
stFactor = 8;
|
||||
}
|
||||
|
||||
public boolean isUCS2() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static class nsISO2022KRVerifier extends nsVerifier {
|
||||
static int[] cclass;
|
||||
static int[] states;
|
||||
static int stFactor;
|
||||
static String charset;
|
||||
|
||||
public int[] cclass() {
|
||||
return cclass;
|
||||
}
|
||||
@ -1508,6 +1478,20 @@ public class JChardetFacadeUtil {
|
||||
return charset;
|
||||
}
|
||||
|
||||
public boolean isUCS2() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static class nsISO2022KRVerifier extends nsVerifier {
|
||||
static int[] cclass;
|
||||
static int[] states;
|
||||
static int stFactor;
|
||||
static String charset;
|
||||
|
||||
public nsISO2022KRVerifier() {
|
||||
cclass = new int[32];
|
||||
cclass[0] = 2;
|
||||
@ -1552,20 +1536,6 @@ public class JChardetFacadeUtil {
|
||||
stFactor = 6;
|
||||
}
|
||||
|
||||
public boolean isUCS2() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static class nsUCS2BEVerifier extends nsVerifier {
|
||||
static int[] cclass;
|
||||
static int[] states;
|
||||
static int stFactor;
|
||||
static String charset;
|
||||
|
||||
public int[] cclass() {
|
||||
return cclass;
|
||||
}
|
||||
@ -1582,6 +1552,20 @@ public class JChardetFacadeUtil {
|
||||
return charset;
|
||||
}
|
||||
|
||||
public boolean isUCS2() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static class nsUCS2BEVerifier extends nsVerifier {
|
||||
static int[] cclass;
|
||||
static int[] states;
|
||||
static int stFactor;
|
||||
static String charset;
|
||||
|
||||
public nsUCS2BEVerifier() {
|
||||
cclass = new int[32];
|
||||
cclass[0] = 0;
|
||||
@ -1628,20 +1612,6 @@ public class JChardetFacadeUtil {
|
||||
stFactor = 6;
|
||||
}
|
||||
|
||||
public boolean isUCS2() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static class nsUCS2LEVerifier extends nsVerifier {
|
||||
static int[] cclass;
|
||||
static int[] states;
|
||||
static int stFactor;
|
||||
static String charset;
|
||||
|
||||
public int[] cclass() {
|
||||
return cclass;
|
||||
}
|
||||
@ -1658,6 +1628,20 @@ public class JChardetFacadeUtil {
|
||||
return charset;
|
||||
}
|
||||
|
||||
public boolean isUCS2() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static class nsUCS2LEVerifier extends nsVerifier {
|
||||
static int[] cclass;
|
||||
static int[] states;
|
||||
static int stFactor;
|
||||
static String charset;
|
||||
|
||||
public nsUCS2LEVerifier() {
|
||||
cclass = new int[32];
|
||||
cclass[0] = 0;
|
||||
@ -1704,20 +1688,6 @@ public class JChardetFacadeUtil {
|
||||
stFactor = 6;
|
||||
}
|
||||
|
||||
public boolean isUCS2() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static class nsCP1252Verifier extends nsVerifier {
|
||||
static int[] cclass;
|
||||
static int[] states;
|
||||
static int stFactor;
|
||||
static String charset;
|
||||
|
||||
public int[] cclass() {
|
||||
return cclass;
|
||||
}
|
||||
@ -1734,6 +1704,20 @@ public class JChardetFacadeUtil {
|
||||
return charset;
|
||||
}
|
||||
|
||||
public boolean isUCS2() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static class nsCP1252Verifier extends nsVerifier {
|
||||
static int[] cclass;
|
||||
static int[] states;
|
||||
static int stFactor;
|
||||
static String charset;
|
||||
|
||||
public nsCP1252Verifier() {
|
||||
cclass = new int[32];
|
||||
cclass[0] = 572662305;
|
||||
@ -1776,20 +1760,6 @@ public class JChardetFacadeUtil {
|
||||
stFactor = 3;
|
||||
}
|
||||
|
||||
public boolean isUCS2() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static class nsHZVerifier extends nsVerifier {
|
||||
static int[] cclass;
|
||||
static int[] states;
|
||||
static int stFactor;
|
||||
static String charset;
|
||||
|
||||
public int[] cclass() {
|
||||
return cclass;
|
||||
}
|
||||
@ -1806,6 +1776,20 @@ public class JChardetFacadeUtil {
|
||||
return charset;
|
||||
}
|
||||
|
||||
public boolean isUCS2() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static class nsHZVerifier extends nsVerifier {
|
||||
static int[] cclass;
|
||||
static int[] states;
|
||||
static int stFactor;
|
||||
static String charset;
|
||||
|
||||
public nsHZVerifier() {
|
||||
cclass = new int[32];
|
||||
cclass[0] = 1;
|
||||
@ -1851,20 +1835,6 @@ public class JChardetFacadeUtil {
|
||||
stFactor = 6;
|
||||
}
|
||||
|
||||
public boolean isUCS2() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static class nsSJISVerifier extends nsVerifier {
|
||||
static int[] cclass;
|
||||
static int[] states;
|
||||
static int stFactor;
|
||||
static String charset;
|
||||
|
||||
public int[] cclass() {
|
||||
return cclass;
|
||||
}
|
||||
@ -1881,6 +1851,20 @@ public class JChardetFacadeUtil {
|
||||
return charset;
|
||||
}
|
||||
|
||||
public boolean isUCS2() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static class nsSJISVerifier extends nsVerifier {
|
||||
static int[] cclass;
|
||||
static int[] states;
|
||||
static int stFactor;
|
||||
static String charset;
|
||||
|
||||
public nsSJISVerifier() {
|
||||
cclass = new int[32];
|
||||
cclass[0] = 286331152;
|
||||
@ -1923,20 +1907,6 @@ public class JChardetFacadeUtil {
|
||||
stFactor = 6;
|
||||
}
|
||||
|
||||
public boolean isUCS2() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static class nsUTF8Verifier extends nsVerifier {
|
||||
static int[] cclass;
|
||||
static int[] states;
|
||||
static int stFactor;
|
||||
static String charset;
|
||||
|
||||
public int[] cclass() {
|
||||
return cclass;
|
||||
}
|
||||
@ -1953,6 +1923,20 @@ public class JChardetFacadeUtil {
|
||||
return charset;
|
||||
}
|
||||
|
||||
public boolean isUCS2() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static class nsUTF8Verifier extends nsVerifier {
|
||||
static int[] cclass;
|
||||
static int[] states;
|
||||
static int stFactor;
|
||||
static String charset;
|
||||
|
||||
public nsUTF8Verifier() {
|
||||
cclass = new int[32];
|
||||
cclass[0] = 286331153;
|
||||
@ -2018,6 +2002,22 @@ public class JChardetFacadeUtil {
|
||||
stFactor = 16;
|
||||
}
|
||||
|
||||
public int[] cclass() {
|
||||
return cclass;
|
||||
}
|
||||
|
||||
public int[] states() {
|
||||
return states;
|
||||
}
|
||||
|
||||
public int stFactor() {
|
||||
return stFactor;
|
||||
}
|
||||
|
||||
public String charset() {
|
||||
return charset;
|
||||
}
|
||||
|
||||
public boolean isUCS2() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -82,9 +82,10 @@ public class JsonUtil {
|
||||
|
||||
/**
|
||||
* 寻找节点下某特定值并替换
|
||||
*
|
||||
* @return void
|
||||
* @author xuzimu
|
||||
* @date 2022/4/6
|
||||
* @return void
|
||||
*/
|
||||
public static void flush(JSONObject jsonObject, String containsValue, StringBuilder sb, List<String> sbList) {
|
||||
for (String key : jsonObject.keySet()) {
|
||||
|
||||
@ -6,6 +6,7 @@ public class RegexUtil {
|
||||
|
||||
/**
|
||||
* 判断给定的字符串是否符合时间格式 HH:mm。
|
||||
*
|
||||
* @param timeStr 给定的时间字符串,格式为 HH:mm。
|
||||
* @return 如果给定的字符串符合时间格式,则返回 true;否则返回 false。
|
||||
*/
|
||||
@ -16,6 +17,7 @@ public class RegexUtil {
|
||||
|
||||
/**
|
||||
* 判断给出的时间是否在当前时间范围内
|
||||
*
|
||||
* @param start
|
||||
* @param end
|
||||
* @return
|
||||
@ -27,6 +29,7 @@ public class RegexUtil {
|
||||
|
||||
/**
|
||||
* 判断给出的时间是否不在当前时间范围内
|
||||
*
|
||||
* @param start
|
||||
* @param end
|
||||
* @return
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package com.suisung.mall.common.utils;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -24,10 +23,6 @@ import java.util.regex.Pattern;
|
||||
*/
|
||||
public final class StringUtils extends org.apache.commons.lang3.StringUtils {
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println(removeProvinceCityDistrict("广西壮族自治区贵港市桂平市西山镇新安街粤桂花城1102号"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 随机字符串
|
||||
*/
|
||||
@ -37,6 +32,10 @@ public final class StringUtils extends org.apache.commons.lang3.StringUtils {
|
||||
private static final Random RANDOM = new Random();
|
||||
private static final Logger logger = LoggerFactory.getLogger(StringUtils.class);
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println(removeProvinceCityDistrict("广西壮族自治区贵港市桂平市西山镇新安街粤桂花城1102号"));
|
||||
}
|
||||
|
||||
public static String encode(String str) {
|
||||
String encode = null;
|
||||
try {
|
||||
@ -226,6 +225,7 @@ public final class StringUtils extends org.apache.commons.lang3.StringUtils {
|
||||
|
||||
/**
|
||||
* 全地址去除省市区,保留详细地址
|
||||
*
|
||||
* @param fullAddress 比如:广西壮族自治区贵港市桂平市西山镇新安街粤桂花城1102号 -> 西山镇新安街粤桂花城1102号
|
||||
* @return
|
||||
*/
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
package com.suisung.mall.common.utils;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
|
||||
@ -12,8 +12,6 @@ import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class VideoUtil {
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(VideoUtil.class);
|
||||
|
||||
public static List<String> videoAllowFiles = new ArrayList<String>() {{
|
||||
add("flv");
|
||||
add("swf");
|
||||
@ -33,6 +31,7 @@ public class VideoUtil {
|
||||
add("wav");
|
||||
add("mid");
|
||||
}};
|
||||
private static Logger logger = LoggerFactory.getLogger(VideoUtil.class);
|
||||
|
||||
/**
|
||||
* 得到语音或视频文件时长,单位秒 并格式化
|
||||
|
||||
@ -22,16 +22,14 @@ import java.util.Map;
|
||||
@Component
|
||||
public class WxHttpUtil implements ApplicationContextAware {
|
||||
|
||||
private static ApplicationContext applicationContext;
|
||||
|
||||
private static AccountService accountService;
|
||||
|
||||
private static final int MAX_RETRIES = 3; // 最大重试次数
|
||||
|
||||
private static final int RETRY_DELAY_MS = 1000; // 重试延迟毫秒数
|
||||
private static ApplicationContext applicationContext;
|
||||
private static AccountService accountService;
|
||||
|
||||
/**
|
||||
* 封装统一请求,获取token失败后触发重试机制
|
||||
*
|
||||
* @param methodType 请求方式 (ENUM):GET; POST;
|
||||
* @param wxType 微信类型 (ENUM):MP-公众号; XCX-小程序;
|
||||
* @param token 微信 AccessToken
|
||||
@ -91,17 +89,8 @@ public class WxHttpUtil implements ApplicationContextAware {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 定义请求方式
|
||||
*/
|
||||
public enum MethodType {
|
||||
GET,
|
||||
POST,
|
||||
}
|
||||
|
||||
public enum WxType {
|
||||
MP,
|
||||
XCX,
|
||||
public static ApplicationContext getApplicationContext() {
|
||||
return applicationContext;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -111,10 +100,6 @@ public class WxHttpUtil implements ApplicationContextAware {
|
||||
}
|
||||
}
|
||||
|
||||
public static ApplicationContext getApplicationContext() {
|
||||
return applicationContext;
|
||||
}
|
||||
|
||||
//通过name获取 Bean.
|
||||
public static Object getBean(String name) {
|
||||
return getApplicationContext().getBean(name);
|
||||
@ -130,4 +115,17 @@ public class WxHttpUtil implements ApplicationContextAware {
|
||||
return getApplicationContext().getBean(name, clazz);
|
||||
}
|
||||
|
||||
/**
|
||||
* 定义请求方式
|
||||
*/
|
||||
public enum MethodType {
|
||||
GET,
|
||||
POST,
|
||||
}
|
||||
|
||||
public enum WxType {
|
||||
MP,
|
||||
XCX,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -25,14 +25,6 @@ public class MCipherDecode {
|
||||
encryptKey = key.substring(0, 8);
|
||||
}
|
||||
|
||||
public String getEncryptKey() {
|
||||
return encryptKey;
|
||||
}
|
||||
|
||||
public void setEncryptKey(String encryptKey) {
|
||||
this.encryptKey = encryptKey.substring(0, 8);
|
||||
}
|
||||
|
||||
private static byte[] getSrcBytes(byte[] srcBytes, byte[] wrapKey) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, ShortBufferException, IllegalBlockSizeException, BadPaddingException, NoSuchProviderException, InvalidAlgorithmParameterException {
|
||||
SecretKeySpec key = new SecretKeySpec(wrapKey, "DES");
|
||||
|
||||
@ -46,7 +38,6 @@ public class MCipherDecode {
|
||||
return cipherText;
|
||||
}
|
||||
|
||||
|
||||
public static byte[] DecodeBase64String(String base64Src) throws IOException {
|
||||
Base64.Decoder de = Base64.getDecoder();
|
||||
byte[] base64Result = de.decode(base64Src);
|
||||
@ -54,15 +45,6 @@ public class MCipherDecode {
|
||||
|
||||
}
|
||||
|
||||
public String getDecodeString(String urlString) throws IOException, InvalidKeyException, NoSuchAlgorithmException, NoSuchPaddingException, ShortBufferException, IllegalBlockSizeException, BadPaddingException, NoSuchProviderException, InvalidAlgorithmParameterException {
|
||||
String tempString = URLDecoder.decode(urlString, "iso-8859-1");
|
||||
String basedString = tempString.replaceAll(",", "+");
|
||||
byte[] tempBytes = DecodeBase64String(basedString);
|
||||
byte[] tempSrcBytes = getSrcBytes(tempBytes, encryptKey.getBytes("iso-8859-1"));
|
||||
return new String(tempSrcBytes, "iso-8859-1");
|
||||
|
||||
}
|
||||
|
||||
public static void main(String[] agrs) {
|
||||
String key = "f6528d5c335b7092fc9ec1b3020111";
|
||||
String str = "梅九六|6214662020019275";
|
||||
@ -80,5 +62,22 @@ public class MCipherDecode {
|
||||
|
||||
}
|
||||
|
||||
public String getEncryptKey() {
|
||||
return encryptKey;
|
||||
}
|
||||
|
||||
public void setEncryptKey(String encryptKey) {
|
||||
this.encryptKey = encryptKey.substring(0, 8);
|
||||
}
|
||||
|
||||
public String getDecodeString(String urlString) throws IOException, InvalidKeyException, NoSuchAlgorithmException, NoSuchPaddingException, ShortBufferException, IllegalBlockSizeException, BadPaddingException, NoSuchProviderException, InvalidAlgorithmParameterException {
|
||||
String tempString = URLDecoder.decode(urlString, "iso-8859-1");
|
||||
String basedString = tempString.replaceAll(",", "+");
|
||||
byte[] tempBytes = DecodeBase64String(basedString);
|
||||
byte[] tempSrcBytes = getSrcBytes(tempBytes, encryptKey.getBytes("iso-8859-1"));
|
||||
return new String(tempSrcBytes, "iso-8859-1");
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -25,7 +25,6 @@ import java.util.regex.Pattern;
|
||||
public class ExcelUtil {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param response
|
||||
* @param classInst 类实例
|
||||
* @param reportName 文件名称
|
||||
|
||||
@ -21,6 +21,7 @@ public class ExportFactory {
|
||||
|
||||
/**
|
||||
* 获取实例类
|
||||
*
|
||||
* @param classKey
|
||||
* @return
|
||||
*/
|
||||
|
||||
@ -35,13 +35,11 @@ import java.util.Map;
|
||||
@Order(0)
|
||||
public class ControllerLogAspect {
|
||||
|
||||
private final static int max_str_length = 1000;
|
||||
/**
|
||||
* 日志对象
|
||||
*/
|
||||
private final Logger logger = LoggerFactory.getLogger("LOG_STASH_RECORD");
|
||||
|
||||
private final static int max_str_length = 1000;
|
||||
|
||||
@Autowired
|
||||
private MessageService messageService;
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ public class PhoneNumberUtilsTest {
|
||||
* PhoneNumberUtils.getPhoneModelWithCountry(String)
|
||||
* 手机号信息提取方法测试
|
||||
* 输出参考 {@link PhoneModel}
|
||||
*
|
||||
* <p>
|
||||
* input: +8617865933672
|
||||
* output: PhoneModel(countryName=中国, provinceName=null, cityName=null, carrier=null, countryCode=86, nationalNumber=17865933672)
|
||||
*/
|
||||
@ -25,7 +25,7 @@ public class PhoneNumberUtilsTest {
|
||||
/**
|
||||
* PhoneNumberUtils.isValidNumber(String)
|
||||
* 手机号合法检测方法测试
|
||||
*
|
||||
* <p>
|
||||
* input: +8617865933672
|
||||
* output: true
|
||||
*/
|
||||
|
||||
@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -42,7 +43,7 @@ public class ShopOrderLogisticsController {
|
||||
long num = invoicingStockBillService.count(new QueryWrapper<InvoicingStockBill>().eq("order_id", orderLogistics.getOrder_id()));
|
||||
|
||||
if (num <= 0) {
|
||||
List<String> orderIds = Arrays.asList(orderLogistics.getOrder_id());
|
||||
List<String> orderIds = Collections.singletonList(orderLogistics.getOrder_id());
|
||||
boolean b = shopOrderBaseService.reviewToState(orderIds, null, StateCode.ORDER_STATE_SHIPPED, orderLogistics);
|
||||
|
||||
if (b) {
|
||||
|
||||
@ -22,7 +22,7 @@ import java.io.OutputStream;
|
||||
@RequestMapping("/mobile/shop/qrcode")
|
||||
public class QrcodeController extends BaseControllerImpl {
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(QrcodeController.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(QrcodeController.class);
|
||||
|
||||
@ApiOperation(value = "根据提货码获取二维码", notes = "根据提货码获取二维码")
|
||||
@RequestMapping(value = "/getQrcode", method = RequestMethod.GET)
|
||||
|
||||
@ -17,14 +17,14 @@ import java.util.ArrayList;
|
||||
*/
|
||||
public class PurchaseInvoiceTempListener extends AnalysisEventListener<PurchaseInvoiceTemp> {
|
||||
|
||||
private ArrayList<ShopPurchaseInvoice> list = new ArrayList<>();
|
||||
|
||||
public static ShopPurchaseInvoiceService shopPurchaseInvoiceService;
|
||||
|
||||
static {
|
||||
initDictionary();
|
||||
}
|
||||
|
||||
private final ArrayList<ShopPurchaseInvoice> list = new ArrayList<>();
|
||||
|
||||
static void initDictionary() {
|
||||
shopPurchaseInvoiceService = SpringUtil.getBean(ShopPurchaseInvoiceService.class);
|
||||
}
|
||||
|
||||
@ -5,11 +5,9 @@ import com.rabbitmq.client.Channel;
|
||||
import com.suisung.mall.common.api.StateCode;
|
||||
import com.suisung.mall.common.constant.MqConstant;
|
||||
import com.suisung.mall.common.modules.order.ShopOrderInfo;
|
||||
import com.suisung.mall.shop.message.service.MqMessageService;
|
||||
import com.suisung.mall.shop.order.service.ShopOrderBaseService;
|
||||
import com.suisung.mall.shop.order.service.ShopOrderInfoService;
|
||||
import com.suisung.mall.shop.sfexpress.service.SFExpressApiService;
|
||||
import com.suisung.mall.shop.store.service.ShopStorePrinterService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -52,6 +52,7 @@ public interface ShopOrderBaseMapper extends BaseMapper<ShopOrderBase> {
|
||||
|
||||
/**
|
||||
* 获取已付款订单的打印信息(用于渲染打票机模版)
|
||||
*
|
||||
* @param orderId
|
||||
* @param payState
|
||||
* @return
|
||||
|
||||
@ -29,6 +29,7 @@ public interface ShopOrderItemMapper extends BaseMapper<ShopOrderItem> {
|
||||
|
||||
/**
|
||||
* 根据订单Id 获取订单子项的打印信息
|
||||
*
|
||||
* @param orderId
|
||||
* @return
|
||||
*/
|
||||
|
||||
@ -523,6 +523,7 @@ public interface ShopOrderBaseService extends IBaseService<ShopOrderBase> {
|
||||
|
||||
/**
|
||||
* 根据订单Id,生成顺丰同城的订单实体实例
|
||||
*
|
||||
* @param devId
|
||||
* @param orderId
|
||||
* @param orderPickupNum
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package com.suisung.mall.shop.order.service;
|
||||
|
||||
import com.suisung.mall.common.modules.order.ShopOrderDeliveryAddress;
|
||||
import com.suisung.mall.common.modules.store.ShopStoreBase;
|
||||
import com.suisung.mall.common.pojo.dto.StandardAddressDTO;
|
||||
import com.suisung.mall.core.web.service.IBaseService;
|
||||
import org.springframework.data.util.Pair;
|
||||
@ -17,6 +16,7 @@ import org.springframework.data.util.Pair;
|
||||
public interface ShopOrderDeliveryAddressService extends IBaseService<ShopOrderDeliveryAddress> {
|
||||
/**
|
||||
* 根据订单ID获取订单发货地址
|
||||
*
|
||||
* @param orderId
|
||||
* @return
|
||||
*/
|
||||
@ -24,6 +24,7 @@ public interface ShopOrderDeliveryAddressService extends IBaseService<ShopOrderD
|
||||
|
||||
/**
|
||||
* 检测地址是否有效,返回规范全地址
|
||||
*
|
||||
* @param shopOrderDeliveryAddress
|
||||
* @return
|
||||
*/
|
||||
|
||||
@ -26,6 +26,7 @@ public interface ShopOrderInfoService extends IBaseService<ShopOrderInfo> {
|
||||
|
||||
/**
|
||||
* 获取店铺今日的取货单
|
||||
*
|
||||
* @param storeId
|
||||
* @return
|
||||
*/
|
||||
@ -34,6 +35,7 @@ public interface ShopOrderInfoService extends IBaseService<ShopOrderInfo> {
|
||||
|
||||
/**
|
||||
* 更改商家订单的状态,出库状态,发货状态,并写入订单状态更改日志
|
||||
*
|
||||
* @param orderId
|
||||
* @param orderStatus 约定0值不更改
|
||||
* @param orderIsOutStatus 出库状态,约定0值不更改
|
||||
@ -44,6 +46,7 @@ public interface ShopOrderInfoService extends IBaseService<ShopOrderInfo> {
|
||||
|
||||
/**
|
||||
* 已支付的订单,生成取单号,打票机并打印订单
|
||||
*
|
||||
* @param storeId
|
||||
* @param orderId
|
||||
* @return 取货单号
|
||||
|
||||
@ -26,6 +26,7 @@ public interface ShopOrderItemService extends IBaseService<ShopOrderItem> {
|
||||
|
||||
/**
|
||||
* 根据订单Id 获取订单子项的打印信息
|
||||
*
|
||||
* @param orderId
|
||||
* @return
|
||||
*/
|
||||
|
||||
@ -120,7 +120,7 @@ public interface ShopOrderReturnService extends IBaseService<ShopOrderReturn> {
|
||||
* @param shopProductIndex
|
||||
* @return
|
||||
*/
|
||||
public boolean ifDenyReturn(ShopOrderInfo shopOrderInfo, ShopOrderItem shopOrderItem, ShopProductIndex shopProductIndex);
|
||||
boolean ifDenyReturn(ShopOrderInfo shopOrderInfo, ShopOrderItem shopOrderItem, ShopProductIndex shopProductIndex);
|
||||
|
||||
/**
|
||||
* 是否允许退货
|
||||
@ -128,7 +128,7 @@ public interface ShopOrderReturnService extends IBaseService<ShopOrderReturn> {
|
||||
* @param order_item_id
|
||||
* @return
|
||||
*/
|
||||
public boolean ifDenyReturn(Long order_item_id);
|
||||
boolean ifDenyReturn(Long order_item_id);
|
||||
|
||||
/**
|
||||
* 添加退款退货-整单退货
|
||||
|
||||
@ -7711,6 +7711,7 @@ public class ShopOrderBaseServiceImpl extends BaseServiceImpl<ShopOrderBaseMappe
|
||||
|
||||
/**
|
||||
* 根据条件获取用户的订单列表
|
||||
*
|
||||
* @param params
|
||||
* @param page
|
||||
* @param rows
|
||||
|
||||
@ -29,10 +29,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
/**
|
||||
@ -86,7 +83,7 @@ public class ShopOrderChainCodeServiceImpl extends BaseServiceImpl<ShopOrderChai
|
||||
throw new ApiException(I18nUtil._("提货已被冻结!"));
|
||||
} else {
|
||||
if (ObjectUtil.equal(order_chain_code, chain_code)) {
|
||||
shopOrderBaseService.reviewPickUp(Arrays.asList(order_id), null, StateCode.ORDER_STATE_SHIPPED, null);
|
||||
shopOrderBaseService.reviewPickUp(Collections.singletonList(order_id), null, StateCode.ORDER_STATE_SHIPPED, null);
|
||||
// 根据订单编号获取商品id
|
||||
QueryWrapper<ShopOrderItem> itemQueryWrapper = new QueryWrapper<>();
|
||||
itemQueryWrapper.in("order_id", order_id);
|
||||
|
||||
@ -8,7 +8,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.suisung.mall.common.api.StateCode;
|
||||
import com.suisung.mall.common.constant.CommonConstant;
|
||||
import com.suisung.mall.common.exception.ApiException;
|
||||
import com.suisung.mall.common.feignService.AccountService;
|
||||
import com.suisung.mall.common.feignService.PayService;
|
||||
import com.suisung.mall.common.feignService.SnsService;
|
||||
@ -17,7 +16,6 @@ import com.suisung.mall.common.modules.order.ShopOrderBase;
|
||||
import com.suisung.mall.common.modules.order.ShopOrderInfo;
|
||||
import com.suisung.mall.common.modules.order.ShopOrderInvoice;
|
||||
import com.suisung.mall.common.modules.order.ShopOrderStateLog;
|
||||
import com.suisung.mall.common.modules.pay.PayConsumeTrade;
|
||||
import com.suisung.mall.common.modules.pay.PayPlantformResource;
|
||||
import com.suisung.mall.common.modules.plantform.ShopPlantformFeedback;
|
||||
import com.suisung.mall.common.modules.product.ShopProductComment;
|
||||
@ -35,7 +33,6 @@ import com.suisung.mall.shop.product.service.ShopProductBaseService;
|
||||
import com.suisung.mall.shop.product.service.ShopProductCommentService;
|
||||
import com.suisung.mall.shop.store.service.ShopStoreBaseService;
|
||||
import com.suisung.mall.shop.store.service.ShopStorePrinterService;
|
||||
import com.sun.jna.platform.win32.WinDef;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -48,7 +45,6 @@ import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
|
||||
import static com.suisung.mall.common.utils.ContextUtil.getCurrentUser;
|
||||
@ -119,7 +115,7 @@ public class ShopOrderInfoServiceImpl extends BaseServiceImpl<ShopOrderInfoMappe
|
||||
@Autowired
|
||||
private ThreadPoolExecutor executor;
|
||||
|
||||
private Logger logger = LoggerFactory.getLogger(ShopOrderInfoServiceImpl.class);
|
||||
private final Logger logger = LoggerFactory.getLogger(ShopOrderInfoServiceImpl.class);
|
||||
|
||||
@Override
|
||||
public Map dashboard() {
|
||||
@ -309,6 +305,7 @@ public class ShopOrderInfoServiceImpl extends BaseServiceImpl<ShopOrderInfoMappe
|
||||
|
||||
/**
|
||||
* 已支付的订单,生成取单号,打票机并打印订单
|
||||
*
|
||||
* @param storeId
|
||||
* @param orderId
|
||||
* @return 取货单号
|
||||
@ -500,7 +497,7 @@ public class ShopOrderInfoServiceImpl extends BaseServiceImpl<ShopOrderInfoMappe
|
||||
order.put("total_num", total_num);
|
||||
// 今日订单完成数
|
||||
|
||||
long day_fin_num = shopOrderBaseService.getOrderNum(Arrays.asList(StateCode.ORDER_STATE_FINISH), store_id, chain_id, 0, null, null, null, null, null);
|
||||
long day_fin_num = shopOrderBaseService.getOrderNum(Collections.singletonList(StateCode.ORDER_STATE_FINISH), store_id, chain_id, 0, null, null, null, null, null);
|
||||
order.put("day_fin_num", day_fin_num);
|
||||
|
||||
// 评论订单数
|
||||
@ -576,7 +573,7 @@ public class ShopOrderInfoServiceImpl extends BaseServiceImpl<ShopOrderInfoMappe
|
||||
data.put("return", return_orders);
|
||||
|
||||
long return_total_num = shopOrderReturnService.getReturnNum(null, store_id, subsite_id);
|
||||
long return_fin_num = shopOrderReturnService.getReturnNum(Arrays.asList(StateCode.RETURN_PROCESS_FINISH), store_id, subsite_id);
|
||||
long return_fin_num = shopOrderReturnService.getReturnNum(Collections.singletonList(StateCode.RETURN_PROCESS_FINISH), store_id, subsite_id);
|
||||
long review_num = shopOrderReturnService.getReturnNum(Arrays.asList(StateCode.RETURN_PROCESS_SUBMIT
|
||||
, StateCode.RETURN_PROCESS_CHECK), store_id, subsite_id);
|
||||
long un_fin_num = shopOrderReturnService.getReturnNum(Arrays.asList(StateCode.RETURN_PROCESS_RECEIVED,
|
||||
|
||||
@ -9,7 +9,6 @@ import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fasterxml.jackson.datatype.jsr310.DecimalUtils;
|
||||
import com.suisung.mall.common.api.StateCode;
|
||||
import com.suisung.mall.common.domain.UserDto;
|
||||
import com.suisung.mall.common.modules.activity.ShopActivityGroupbookingHistory;
|
||||
@ -29,7 +28,6 @@ import com.suisung.mall.shop.order.service.ShopOrderItemService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@ -278,10 +278,6 @@ public class ShopOrderLogisticsServiceImpl extends BaseServiceImpl<ShopOrderLogi
|
||||
.eq("logistics_enable", 1);
|
||||
long order_logistics_num = count(logisticsQueryWrapper);
|
||||
|
||||
if (stock_bill_id_rows.size() != order_logistics_num) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return stock_bill_id_rows.size() == order_logistics_num;
|
||||
}
|
||||
}
|
||||
|
||||
@ -82,90 +82,6 @@ import static com.suisung.mall.common.utils.ContextUtil.getCurrentUser;
|
||||
@Service
|
||||
public class ShopOrderReturnServiceImpl extends BaseServiceImpl<ShopOrderReturnMapper, ShopOrderReturn> implements ShopOrderReturnService {
|
||||
|
||||
@Autowired
|
||||
private ShopOrderReturnMapper shopOrderReturnMapper;
|
||||
|
||||
@Autowired
|
||||
private ShopOrderReturnItemService orderReturnItemService;
|
||||
|
||||
@Autowired
|
||||
private ShopStoreBaseService shopStoreBaseService;
|
||||
|
||||
@Autowired
|
||||
private ShopOrderItemService shopOrderItemService;
|
||||
|
||||
@Autowired
|
||||
private ShopProductBaseService shopProductBaseService;
|
||||
|
||||
@Autowired
|
||||
private ShopProductItemService shopProductItemService;
|
||||
|
||||
@Autowired
|
||||
private ShopBaseProductUnitService baseProductUnitService;
|
||||
|
||||
@Autowired
|
||||
private ShopOrderReturnReasonService orderReturnReasonService;
|
||||
|
||||
@Autowired
|
||||
private ShopOrderInfoService shopOrderInfoService;
|
||||
|
||||
@Autowired
|
||||
private ShopBaseStateCodeService shopBaseStateCodeService;
|
||||
|
||||
@Autowired
|
||||
private AccountService accountService;
|
||||
|
||||
@Autowired
|
||||
private ShopOrderBaseService shopOrderBaseService;
|
||||
|
||||
@Autowired
|
||||
private ShopOrderDeliveryAddressService orderDeliveryAddressService;
|
||||
|
||||
@Autowired
|
||||
private ShopProductInfoService shopProductInfoService;
|
||||
|
||||
@Autowired
|
||||
private ShopBaseStateCodeService stateCodeService;
|
||||
|
||||
@Autowired
|
||||
private ShopNumberSeqService shopNumberSeqService;
|
||||
|
||||
@Autowired
|
||||
private ShopOrderDataService shopOrderDataService;
|
||||
|
||||
@Autowired
|
||||
private ShopStoreConfigService shopStoreConfigService;
|
||||
|
||||
@Autowired
|
||||
private PayService payService;
|
||||
|
||||
@Autowired
|
||||
private ShopStoreShippingAddressService shopStoreShippingAddressService;
|
||||
|
||||
@Autowired
|
||||
private ShopDistributionUserOrderService shopDistributionUserOrderService;
|
||||
|
||||
@Autowired
|
||||
private ShopDistributionUserCommissionService shopDistributionUserCommissionService;
|
||||
|
||||
@Autowired
|
||||
private ShopDistributionUserOrderItemService shopDistributionUserOrderItemService;
|
||||
|
||||
@Autowired
|
||||
private ShopOrderReturnService shopOrderReturnService;
|
||||
|
||||
@Autowired
|
||||
private ShopProductIndexService shopProductIndexService;
|
||||
|
||||
@Autowired
|
||||
private AccountBaseConfigService accountBaseConfigService;
|
||||
|
||||
@Autowired
|
||||
private ShopOrderLogisticsService shopOrderLogisticsService;
|
||||
|
||||
@Autowired
|
||||
private MessageService messageService;
|
||||
|
||||
public static final Map<String, String> order_is_shipped_row = new HashMap<>();
|
||||
public static final Map<String, String> return_state_id_row = new HashMap<>();
|
||||
public static final Map<String, String> return_channel_flag_row = new HashMap<>();
|
||||
@ -173,6 +89,7 @@ public class ShopOrderReturnServiceImpl extends BaseServiceImpl<ShopOrderReturnM
|
||||
public static final Map<String, String> return_type = new HashMap<>();
|
||||
public static final Map<String, String> return_item_state_id = new HashMap<>();
|
||||
public static final Map<String, String> pay_channel_id_row = new HashMap<>();
|
||||
private static final Logger logger = LoggerFactory.getLogger(ShopOrderReturnServiceImpl.class);
|
||||
|
||||
static {
|
||||
order_is_shipped_row.put("3030", I18nUtil._("未发货"));
|
||||
@ -210,7 +127,62 @@ public class ShopOrderReturnServiceImpl extends BaseServiceImpl<ShopOrderReturnM
|
||||
pay_channel_id_row.put("1413", I18nUtil._("线下付款"));
|
||||
}
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(ShopOrderReturnServiceImpl.class);
|
||||
@Autowired
|
||||
private ShopOrderReturnMapper shopOrderReturnMapper;
|
||||
@Autowired
|
||||
private ShopOrderReturnItemService orderReturnItemService;
|
||||
@Autowired
|
||||
private ShopStoreBaseService shopStoreBaseService;
|
||||
@Autowired
|
||||
private ShopOrderItemService shopOrderItemService;
|
||||
@Autowired
|
||||
private ShopProductBaseService shopProductBaseService;
|
||||
@Autowired
|
||||
private ShopProductItemService shopProductItemService;
|
||||
@Autowired
|
||||
private ShopBaseProductUnitService baseProductUnitService;
|
||||
@Autowired
|
||||
private ShopOrderReturnReasonService orderReturnReasonService;
|
||||
@Autowired
|
||||
private ShopOrderInfoService shopOrderInfoService;
|
||||
@Autowired
|
||||
private ShopBaseStateCodeService shopBaseStateCodeService;
|
||||
@Autowired
|
||||
private AccountService accountService;
|
||||
@Autowired
|
||||
private ShopOrderBaseService shopOrderBaseService;
|
||||
@Autowired
|
||||
private ShopOrderDeliveryAddressService orderDeliveryAddressService;
|
||||
@Autowired
|
||||
private ShopProductInfoService shopProductInfoService;
|
||||
@Autowired
|
||||
private ShopBaseStateCodeService stateCodeService;
|
||||
@Autowired
|
||||
private ShopNumberSeqService shopNumberSeqService;
|
||||
@Autowired
|
||||
private ShopOrderDataService shopOrderDataService;
|
||||
@Autowired
|
||||
private ShopStoreConfigService shopStoreConfigService;
|
||||
@Autowired
|
||||
private PayService payService;
|
||||
@Autowired
|
||||
private ShopStoreShippingAddressService shopStoreShippingAddressService;
|
||||
@Autowired
|
||||
private ShopDistributionUserOrderService shopDistributionUserOrderService;
|
||||
@Autowired
|
||||
private ShopDistributionUserCommissionService shopDistributionUserCommissionService;
|
||||
@Autowired
|
||||
private ShopDistributionUserOrderItemService shopDistributionUserOrderItemService;
|
||||
@Autowired
|
||||
private ShopOrderReturnService shopOrderReturnService;
|
||||
@Autowired
|
||||
private ShopProductIndexService shopProductIndexService;
|
||||
@Autowired
|
||||
private AccountBaseConfigService accountBaseConfigService;
|
||||
@Autowired
|
||||
private ShopOrderLogisticsService shopOrderLogisticsService;
|
||||
@Autowired
|
||||
private MessageService messageService;
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> statisticState() {
|
||||
@ -315,7 +287,7 @@ public class ShopOrderReturnServiceImpl extends BaseServiceImpl<ShopOrderReturnM
|
||||
public CommonResult returnItem() {
|
||||
|
||||
String order_id = ObjectUtil.defaultIfNull(getParameter("order_id"), "");
|
||||
Long order_item_id = Convert.toLong(getParameter("order_item_id"), 0l);
|
||||
Long order_item_id = Convert.toLong(getParameter("order_item_id"), 0L);
|
||||
|
||||
UserDto user = getCurrentUser();
|
||||
if (user == null) {
|
||||
@ -375,12 +347,12 @@ public class ShopOrderReturnServiceImpl extends BaseServiceImpl<ShopOrderReturnM
|
||||
}
|
||||
|
||||
|
||||
Long stime = getParameter("stime", 0l);
|
||||
Long stime = getParameter("stime", 0L);
|
||||
if (CheckUtil.isNotEmpty(stime)) {
|
||||
queryWrapper.ge("return_add_time", new Date(stime));
|
||||
}
|
||||
|
||||
Long etime = getParameter("etime", 0l);
|
||||
Long etime = getParameter("etime", 0L);
|
||||
if (CheckUtil.isNotEmpty(etime)) {
|
||||
queryWrapper.le("return_add_time", new Date(etime));
|
||||
}
|
||||
@ -884,7 +856,7 @@ public class ShopOrderReturnServiceImpl extends BaseServiceImpl<ShopOrderReturnM
|
||||
@GlobalTransactional
|
||||
public CommonResult doForceRefund(String return_id, Integer return_flag) {
|
||||
|
||||
List<String> return_ids = Arrays.asList(return_id);
|
||||
List<String> return_ids = Collections.singletonList(return_id);
|
||||
ShopOrderReturn shopOrderReturn = get(return_id);
|
||||
UserDto user = getCurrentUser();
|
||||
Integer store_id = Convert.toInt(user.getStore_id());
|
||||
@ -903,7 +875,7 @@ public class ShopOrderReturnServiceImpl extends BaseServiceImpl<ShopOrderReturnM
|
||||
}
|
||||
|
||||
// 订单审核
|
||||
review(return_ids, Arrays.asList(shopOrderReturn), StateCode.RETURN_PROCESS_CHECK, null);
|
||||
review(return_ids, Collections.singletonList(shopOrderReturn), StateCode.RETURN_PROCESS_CHECK, null);
|
||||
} else {
|
||||
throw new ApiException(ResultCode.FORBIDDEN);
|
||||
}
|
||||
|
||||
@ -8,19 +8,14 @@
|
||||
|
||||
package com.suisung.mall.shop.sfexpress.controller.api;
|
||||
|
||||
import com.suisung.mall.common.api.CommonResult;
|
||||
import com.suisung.mall.common.pojo.res.SFExpressApiRes;
|
||||
import com.suisung.mall.common.utils.SseEmitterUtil;
|
||||
import com.suisung.mall.shop.sfexpress.service.SFExpressApiService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Date;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
@Api(tags = "顺丰同城Api端")
|
||||
|
||||
@ -15,10 +15,8 @@ import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.suisung.mall.common.api.CommonResult;
|
||||
import com.suisung.mall.common.api.StateCode;
|
||||
import com.suisung.mall.common.constant.SFExpressConstant;
|
||||
import com.suisung.mall.common.domain.UserDto;
|
||||
import com.suisung.mall.common.exception.ApiException;
|
||||
import com.suisung.mall.common.modules.store.ShopStoreSfOrder;
|
||||
import com.suisung.mall.common.pojo.req.*;
|
||||
@ -46,8 +44,6 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.suisung.mall.common.utils.ContextUtil.getCurrentUser;
|
||||
|
||||
@Service
|
||||
public class SFExpressApiServiceImpl implements SFExpressApiService {
|
||||
|
||||
|
||||
@ -1,10 +1,8 @@
|
||||
package com.suisung.mall.shop.store.controller.admin;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.suisung.mall.common.api.CommonResult;
|
||||
import com.suisung.mall.common.modules.store.ShopStorePrinter;
|
||||
import com.suisung.mall.common.utils.PositionUtil;
|
||||
import com.suisung.mall.common.utils.SseEmitterUtil;
|
||||
import com.suisung.mall.shop.store.service.ShopStoreEmployeeService;
|
||||
import com.suisung.mall.shop.store.service.ShopStorePrinterService;
|
||||
@ -15,15 +13,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Api(tags = "门店打票机打印业务")
|
||||
@RestController
|
||||
|
||||
@ -4,7 +4,10 @@ import com.suisung.mall.common.api.CommonResult;
|
||||
import com.suisung.mall.shop.store.service.ShopStoreSameCityTransportBaseService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
|
||||
@ -21,6 +21,7 @@ public interface ShopStoreEmployeeMapper extends BaseMapper<ShopStoreEmployee> {
|
||||
|
||||
/**
|
||||
* 根据店铺id和角色权限组id获取多条 userId
|
||||
*
|
||||
* @param storeId
|
||||
* @param groupId
|
||||
* @return
|
||||
|
||||
@ -20,6 +20,7 @@ public interface ShopStoreEmployeeRightsGroupService extends IBaseService<ShopSt
|
||||
|
||||
/**
|
||||
* 根据店铺id和角色权限组名称获取一条记录
|
||||
*
|
||||
* @param storeId
|
||||
* @param groupName
|
||||
* @return
|
||||
|
||||
@ -31,6 +31,7 @@ public interface ShopStoreEmployeeService extends IBaseService<ShopStoreEmployee
|
||||
|
||||
/**
|
||||
* 根据店铺id和角色权限组名称,获取多条 userId
|
||||
*
|
||||
* @param storeId
|
||||
* @param rightsGroupName
|
||||
* @return
|
||||
|
||||
@ -24,6 +24,7 @@ public interface ShopStoreInfoService extends IBaseService<ShopStoreInfo> {
|
||||
|
||||
/**
|
||||
* 获取店长的手机号码
|
||||
*
|
||||
* @param storeId
|
||||
* @return
|
||||
*/
|
||||
|
||||
@ -35,12 +35,14 @@ public interface ShopStoreSameCityTransportBaseService {
|
||||
|
||||
/**
|
||||
* 店铺主营商品类型
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
CommonResult storeBusinessTypeList();
|
||||
|
||||
/**
|
||||
* 下单前检测同城订单配送是否符合要求
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
|
||||
@ -16,6 +16,7 @@ public interface ShopStoreSfOrderService extends IBaseService<ShopStoreSfOrder>
|
||||
|
||||
/**
|
||||
* 根据商家订单Id 获取一条记录
|
||||
*
|
||||
* @param shopOrderId
|
||||
* @return
|
||||
*/
|
||||
@ -48,6 +49,7 @@ public interface ShopStoreSfOrderService extends IBaseService<ShopStoreSfOrder>
|
||||
|
||||
/**
|
||||
* 检查顺丰同城开发者id下,某个订单是否已经存在
|
||||
*
|
||||
* @param devId
|
||||
* @param shopOrderId 商城订单号
|
||||
* @return
|
||||
|
||||
@ -40,6 +40,7 @@ public class ShopStoreEmployeeRightsGroupServiceImpl extends BaseServiceImpl<Sho
|
||||
|
||||
/**
|
||||
* 根据店铺id和角色权限组名称获取一条记录
|
||||
*
|
||||
* @param storeId
|
||||
* @param rightsGroupName
|
||||
* @return
|
||||
|
||||
@ -23,7 +23,6 @@ import com.suisung.mall.shop.store.mapper.ShopStoreEmployeeMapper;
|
||||
import com.suisung.mall.shop.store.service.ShopStoreEmployeeRightsGroupService;
|
||||
import com.suisung.mall.shop.store.service.ShopStoreEmployeeService;
|
||||
import io.seata.spring.annotation.GlobalTransactional;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
@ -9,12 +9,10 @@
|
||||
package com.suisung.mall.shop.store.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.comparator.FieldComparator;
|
||||
import cn.hutool.core.comparator.FieldsComparator;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.suisung.mall.common.api.CommonResult;
|
||||
import com.suisung.mall.common.api.ResultCode;
|
||||
@ -31,9 +29,7 @@ import com.suisung.mall.common.pojo.dto.ShopStoreSameCityTransportBaseDTO;
|
||||
import com.suisung.mall.common.utils.CommonUtil;
|
||||
import com.suisung.mall.common.utils.I18nUtil;
|
||||
import com.suisung.mall.common.utils.PositionUtil;
|
||||
import com.suisung.mall.common.utils.StringUtils;
|
||||
import com.suisung.mall.core.web.service.impl.BaseServiceImpl;
|
||||
import com.suisung.mall.shop.chain.controller.admin.ShopChainUserController;
|
||||
import com.suisung.mall.shop.store.mapper.ShopStoreSameCityTransportBaseMapper;
|
||||
import com.suisung.mall.shop.store.service.ShopStoreBaseService;
|
||||
import com.suisung.mall.shop.store.service.ShopStoreSameCityTransportBaseService;
|
||||
@ -48,7 +44,6 @@ import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@ -419,7 +414,7 @@ public class ShopStoreSameCityTransportBaseServiceImpl extends BaseServiceImpl<S
|
||||
}
|
||||
// 实际配送距离,单位米
|
||||
Integer distance = distanceD.intValue();
|
||||
logger.debug(storeName + "下单时,店铺与收货地址两地,经纬度:{},{}|{},{} 距离:{} 米", storeLng, storeLat, orderLongitude, orderLatitude, distance);
|
||||
logger.debug(storeName + "下单时,店铺与收货地址经纬度是{},{},{},{} 距离为{}米。", storeLng, storeLat, orderLongitude, orderLatitude, distance);
|
||||
|
||||
// ### 基础配送费计算
|
||||
BigDecimal deliveryBaseFee = transportBase.getDelivery_base_fee();
|
||||
@ -457,7 +452,7 @@ public class ShopStoreSameCityTransportBaseServiceImpl extends BaseServiceImpl<S
|
||||
deliveryBaseFee = deliveryBaseFee.add(transportBase.getWeight_increase_fee().multiply(times));
|
||||
}
|
||||
|
||||
logger.debug(storeName + "下单时,店铺与收货地址超出基础距离和重量:额外增加 {} 元运费。", deliveryBaseFee);
|
||||
logger.debug(storeName + "下单时,因超出基础距离或重量,所以额外增加{}元运费。", deliveryBaseFee);
|
||||
// #### 基础配送费计算完毕
|
||||
|
||||
|
||||
@ -480,7 +475,7 @@ public class ShopStoreSameCityTransportBaseServiceImpl extends BaseServiceImpl<S
|
||||
for (ShopStoreSameCityTransport transport : transportList) {
|
||||
DeliveryFeeResultDTO deliveryFeeResultDTO = new DeliveryFeeResultDTO();
|
||||
deliveryFeeResultDTO.setId(transport.getTransport_id());
|
||||
logger.debug(storeName + "下单时,店铺与收货地址的距离是{}米,最大配送范围是{}米以内", distance, transport.getMax_delivery_radius());
|
||||
logger.debug(storeName + "下单时,配送范围为{}米内,店铺与收货地址距离是{}米。", distance, transport.getMax_delivery_radius());
|
||||
|
||||
// 判断订单距离在不在配送范围内?
|
||||
if (transport.getMax_delivery_radius() < distance) {
|
||||
@ -557,8 +552,8 @@ public class ShopStoreSameCityTransportBaseServiceImpl extends BaseServiceImpl<S
|
||||
|
||||
}
|
||||
|
||||
logger.debug(storeName + "下单时,根据商家运费设置规则减免{}元运费", reduceDeliveryFee);
|
||||
logger.debug(storeName + "下单时,不符合规则的:\n {}\n符合规则的:{}", JSONUtil.toJsonStr(noPassed), JSONUtil.toJsonStr(passed));
|
||||
// logger.debug(storeName + "下单时,根据商家运费设置规则减免{}元运费", reduceDeliveryFee);
|
||||
// logger.debug(storeName + "下单时,不符合规则的:\n {}\n符合规则的:{}", JSONUtil.toJsonStr(noPassed), JSONUtil.toJsonStr(passed));
|
||||
|
||||
if (passed.size() == 0 && noPassed.size() > 0) {
|
||||
// 没有一个满足起送距离和起送金额的规则订单
|
||||
|
||||
@ -18,7 +18,6 @@ import com.suisung.mall.shop.store.service.ShopStoreSfOrderService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user