|
|
|
|
@ -36,6 +36,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
|
|
import jakarta.validation.Valid; |
|
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
|
import org.simpleframework.xml.core.Validate; |
|
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
import org.springframework.util.Assert; |
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
@ -60,6 +61,9 @@ public class MailController {
|
|
|
|
|
|
|
|
|
|
private final MailBlameService mailBlameService; |
|
|
|
|
|
|
|
|
|
@Value("${spring.profiles.active}") |
|
|
|
|
private String active; |
|
|
|
|
|
|
|
|
|
@Operation(summary = "查看信件详情") |
|
|
|
|
@Log(title="查看信件详情") |
|
|
|
|
@NotPower |
|
|
|
|
@ -73,7 +77,7 @@ public class MailController {
|
|
|
|
|
@SaCheckPermission("mail:add") |
|
|
|
|
@PostMapping("add") |
|
|
|
|
public AjaxResult<Boolean> add(@RequestBody @Valid MailOuter mail) { |
|
|
|
|
if ("厅长信箱".equals(mail.getSource())) { |
|
|
|
|
if ("厅长信箱".equals(mail.getSource()) && "prod".equals(active)) { |
|
|
|
|
throw new RuntimeException("厅长信箱不支持自建信件"); |
|
|
|
|
} |
|
|
|
|
return AjaxResult.success(mailService.save(mail)); |
|
|
|
|
|