|
|
@@ -26,7 +26,7 @@ public class MetaZoumaLightController extends BaseController {
|
|
|
@PostMapping("/save")
|
|
|
public MetaZoumaLight save(@RequestBody MetaZoumaLight record) {
|
|
|
if (record.isPublish()) {
|
|
|
- MetaZoumaLight metaZoumaLight = metaZoumaLightRepo.findByPublish(true);
|
|
|
+ MetaZoumaLight metaZoumaLight = metaZoumaLightRepo.findByPublish(true,false);
|
|
|
if (Objects.nonNull(metaZoumaLight) && !Objects.equals(metaZoumaLight.getId(), record.getId())){
|
|
|
throw new BusinessException("仅允许发布一条!");
|
|
|
}
|