|
@@ -8,7 +8,6 @@ import com.izouma.nineth.repo.UserDetailRepo;
|
|
|
import com.izouma.nineth.service.ContentAuditService;
|
|
import com.izouma.nineth.service.ContentAuditService;
|
|
|
import com.izouma.nineth.service.UserDetailService;
|
|
import com.izouma.nineth.service.UserDetailService;
|
|
|
import com.izouma.nineth.utils.ObjUtils;
|
|
import com.izouma.nineth.utils.ObjUtils;
|
|
|
-import com.izouma.nineth.utils.SecurityUtils;
|
|
|
|
|
import com.izouma.nineth.utils.excel.ExcelUtils;
|
|
import com.izouma.nineth.utils.excel.ExcelUtils;
|
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.AllArgsConstructor;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -18,7 +17,6 @@ import org.springframework.web.bind.annotation.*;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
-import java.util.Objects;
|
|
|
|
|
|
|
|
|
|
@RestController
|
|
@RestController
|
|
|
@RequestMapping("/userDetail")
|
|
@RequestMapping("/userDetail")
|
|
@@ -31,10 +29,7 @@ public class UserDetailController extends BaseController {
|
|
|
//@PreAuthorize("hasRole('ADMIN')")
|
|
//@PreAuthorize("hasRole('ADMIN')")
|
|
|
@PostMapping("/save")
|
|
@PostMapping("/save")
|
|
|
public UserDetail save(@RequestBody UserDetail record) {
|
|
public UserDetail save(@RequestBody UserDetail record) {
|
|
|
- Long currentUserId = SecurityUtils.getAuthenticatedUser().getId();
|
|
|
|
|
- if (!Objects.equals(currentUserId, record.getUserId())) {
|
|
|
|
|
- throw new BusinessException("当前修改用户与登录用户不一致");
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
if (StringUtils.isNotBlank(record.getAutograph())) {
|
|
if (StringUtils.isNotBlank(record.getAutograph())) {
|
|
|
if (!contentAuditService.auditText(record.getAutograph())) {
|
|
if (!contentAuditService.auditText(record.getAutograph())) {
|
|
|
throw new BusinessException("简介包含非法内容");
|
|
throw new BusinessException("简介包含非法内容");
|