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