|
|
@ -15,13 +15,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
import java.time.Instant;
|
|
|
|
import java.util.*;
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
|
|
|
|
import java.time.ZoneId;
|
|
|
|
|
|
|
|
import java.util.Calendar;
|
|
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import java.util.UUID;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* <p>
|
|
|
|
* <p>
|
|
|
@ -63,7 +57,12 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
|
|
|
|
MiniUserServiceImpl miniUserService;
|
|
|
|
MiniUserServiceImpl miniUserService;
|
|
|
|
|
|
|
|
|
|
|
|
public void customRegister(Custom custom,List<CustomSupport> customSupports){
|
|
|
|
public void customRegister(Custom custom,List<CustomSupport> customSupports){
|
|
|
|
String id = Uuid8Utils.generateShortUUID();
|
|
|
|
String id = String.format("%06d",new Random().nextInt(999999)+1);
|
|
|
|
|
|
|
|
Custom isHave = customMapper.selectById(id);
|
|
|
|
|
|
|
|
while(null!=isHave){
|
|
|
|
|
|
|
|
id = String.format("%06d",new Random().nextInt(999999)+1);
|
|
|
|
|
|
|
|
isHave = customMapper.selectById(id);
|
|
|
|
|
|
|
|
}
|
|
|
|
custom.setId(id);
|
|
|
|
custom.setId(id);
|
|
|
|
custom.setCreateDate( new Date());
|
|
|
|
custom.setCreateDate( new Date());
|
|
|
|
custom.setModifyDate( new Date());
|
|
|
|
custom.setModifyDate( new Date());
|
|
|
@ -71,8 +70,8 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
|
|
|
|
customMapper.insert(custom);
|
|
|
|
customMapper.insert(custom);
|
|
|
|
if(customSupports.size()>0){
|
|
|
|
if(customSupports.size()>0){
|
|
|
|
for(CustomSupport customSupport:customSupports){
|
|
|
|
for(CustomSupport customSupport:customSupports){
|
|
|
|
String supportid = UUID.randomUUID().toString();
|
|
|
|
String supportId = UUID.randomUUID().toString();
|
|
|
|
customSupport.setId(supportid);
|
|
|
|
customSupport.setId(supportId);
|
|
|
|
customSupport.setCreateDate( new Date());
|
|
|
|
customSupport.setCreateDate( new Date());
|
|
|
|
customSupport.setModifyDate( new Date());
|
|
|
|
customSupport.setModifyDate( new Date());
|
|
|
|
customSupport.setCustomId(id);
|
|
|
|
customSupport.setCustomId(id);
|
|
|
|