Commit 4094c1ba by zhiheng.zhang

取餐码代码抽取

parent 99245caf
......@@ -71,6 +71,7 @@ import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.time.FastDateFormat;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;
import java.awt.geom.Point2D;
......@@ -78,7 +79,9 @@ import java.math.BigDecimal;
import java.security.NoSuchAlgorithmException;
import java.security.spec.InvalidKeySpecException;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.function.Function;
import java.util.stream.Collectors;
......@@ -87,6 +90,11 @@ import static cn.freemud.constant.OrderRefundConstant.ALLOW_REFUND;
@Component
public class OrderAdapter {
public final static String TAKECODEKEY = "takecode";
public static final String REDIS_KEY_SEP = ":";
public static final String numberChar = "0123456789";
public static final String numberCharWithoutZero = "12345";
private static FastDateFormat yyyyMMddHHmmss = FastDateFormat.getInstance("yyyy-MM-dd HH:mm:ss", Locale.CHINA);
private static String SPMCHID = "1237482502";
......@@ -123,6 +131,9 @@ public class OrderAdapter {
private static Gson gson = new Gson();
@Autowired
private RedisTemplate redisTemplate;
/**
* @param createOrderVo
* @param shoppingCartGoodsDto
......
......@@ -28,6 +28,7 @@ import org.apache.commons.lang.ObjectUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.jaxb.OrderAdapter;
import org.springframework.stereotype.Service;
import java.util.Map;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment