fix 随机数新增bug
This commit is contained in:
+5
-4
@@ -37,14 +37,15 @@ public class PayRandomCodeService extends ServiceImpl<PayRandomCodeMapper, PayRa
|
||||
if (integer > 0){
|
||||
throw new JeroBootException("已经有相同嘉宾类型");
|
||||
}
|
||||
|
||||
String randomCodeId = randomCode.getRandomCodeId();
|
||||
List<PayRandomCodeLink> randomCodeLinkList = randomCode.getRandomCodeLinkList();
|
||||
//保存数量
|
||||
randomCode.setRandomCodeCount(randomCodeLinkList.size());
|
||||
randomCodeMapper.insert(randomCode);
|
||||
//关联randomCodeId
|
||||
String randomCodeId = randomCode.getRandomCodeId();
|
||||
for (PayRandomCodeLink randomCodeLink : randomCodeLinkList) {
|
||||
randomCodeLink.setRandomCodeId(randomCodeId);
|
||||
}
|
||||
randomCode.setRandomCodeCount(randomCodeLinkList.size());
|
||||
randomCodeMapper.insert(randomCode);
|
||||
randomCodeLinkMapper.insertList(randomCodeLinkList);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user