Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop into feature/pg
This commit is contained in:
commit
ee4f87d12d
@ -77,7 +77,7 @@ public enum ResultCode {
|
|||||||
MUST_HAVE_GOODS_SKU(11012, "规格必须要有一个!"),
|
MUST_HAVE_GOODS_SKU(11012, "规格必须要有一个!"),
|
||||||
GOODS_PARAMS_ERROR(11013, "商品参数错误,刷新后重试"),
|
GOODS_PARAMS_ERROR(11013, "商品参数错误,刷新后重试"),
|
||||||
PHYSICAL_GOODS_NEED_TEMP(11014, "实物商品需选择配送模板"),
|
PHYSICAL_GOODS_NEED_TEMP(11014, "实物商品需选择配送模板"),
|
||||||
VIRTUAL_GOODS_NOT_NEED_TEMP(11015, "实物商品需选择配送模板"),
|
VIRTUAL_GOODS_NOT_NEED_TEMP(11015, "虚拟商品无需选择配送模板"),
|
||||||
GOODS_NOT_EXIST_STORE(11017, "当前用户无权操作此商品"),
|
GOODS_NOT_EXIST_STORE(11017, "当前用户无权操作此商品"),
|
||||||
GOODS_TYPE_ERROR(11016, "需选择商品类型"),
|
GOODS_TYPE_ERROR(11016, "需选择商品类型"),
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package cn.lili.common.utils;
|
package cn.lili.common.utils;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
import java.util.concurrent.ThreadLocalRandom;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通用工具
|
* 通用工具
|
||||||
@ -9,6 +9,8 @@ import java.util.UUID;
|
|||||||
*/
|
*/
|
||||||
public class CommonUtil {
|
public class CommonUtil {
|
||||||
|
|
||||||
|
public static final String BASE_NUMBER = "0123456789";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 以UUID重命名
|
* 以UUID重命名
|
||||||
* @param fileName 文件名称
|
* @param fileName 文件名称
|
||||||
@ -24,12 +26,12 @@ public class CommonUtil {
|
|||||||
* 随机6位数生成
|
* 随机6位数生成
|
||||||
*/
|
*/
|
||||||
public static String getRandomNum() {
|
public static String getRandomNum() {
|
||||||
|
StringBuilder sb = new StringBuilder(6);
|
||||||
Random random = new Random();
|
for (int i = 0; i < 6; i++) {
|
||||||
int num = random.nextInt(999999);
|
int num = ThreadLocalRandom.current().nextInt(BASE_NUMBER.length());
|
||||||
//不足六位前面补0
|
sb.append(BASE_NUMBER.charAt(num));
|
||||||
String str = String.format("%06d", num);
|
}
|
||||||
return str;
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -83,6 +83,8 @@ public class StoreFlowServiceImpl extends ServiceImpl<StoreFlowMapper, StoreFlow
|
|||||||
StoreFlow storeFlow = new StoreFlow();
|
StoreFlow storeFlow = new StoreFlow();
|
||||||
BeanUtil.copyProperties(item, storeFlow);
|
BeanUtil.copyProperties(item, storeFlow);
|
||||||
|
|
||||||
|
//去掉orderitem的时间。
|
||||||
|
storeFlow.setCreateTime(null);
|
||||||
//入账
|
//入账
|
||||||
storeFlow.setId(SnowFlake.getIdStr());
|
storeFlow.setId(SnowFlake.getIdStr());
|
||||||
storeFlow.setFlowType(FlowTypeEnum.PAY.name());
|
storeFlow.setFlowType(FlowTypeEnum.PAY.name());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user