|
@@ -12,6 +12,7 @@ import io.swagger.annotations.ApiImplicitParam;
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
@@ -30,6 +31,10 @@ import com.yonge.cooleshow.biz.dal.service.UnbindAuthUserService;
|
|
|
import com.yonge.cooleshow.biz.dal.wrapper.UnbindAuthUserWrapper;
|
|
|
import com.yonge.cooleshow.biz.dal.entity.UnbindAuthUser;
|
|
|
|
|
|
+import java.util.Collections;
|
|
|
+import java.util.List;
|
|
|
+import java.util.stream.Collectors;
|
|
|
+
|
|
|
@Slf4j
|
|
|
@Validated
|
|
|
@RestController
|
|
@@ -57,6 +62,11 @@ public class UnbindAuthUserController {
|
|
|
if (unbindAuthUser.getUserId() == null) {
|
|
|
throw new BizException("用户ID不能为空");
|
|
|
}
|
|
|
+
|
|
|
+ List<UnbindAuthUser> list = unbindAuthUserService.list();
|
|
|
+ if (!CollectionUtils.isEmpty(list)) {
|
|
|
+ unbindAuthUser.setId(list.get(0).getId());
|
|
|
+ }
|
|
|
// 新增数据
|
|
|
unbindAuthUserService.save(unbindAuthUser);
|
|
|
|