|
@@ -32,13 +32,11 @@ import com.qmth.teachcloud.common.enums.userPush.SpecialPrivilegeEnum;
|
|
|
import com.qmth.teachcloud.common.enums.userPush.SyncStatusEnum;
|
|
|
import com.qmth.teachcloud.common.mapper.SysUserMapper;
|
|
|
import com.qmth.teachcloud.common.service.*;
|
|
|
+import com.qmth.teachcloud.common.sync.StmmsUtils;
|
|
|
import com.qmth.teachcloud.common.util.Base64Util;
|
|
|
import com.qmth.teachcloud.common.util.ResultUtil;
|
|
|
import com.qmth.teachcloud.common.util.ServletUtil;
|
|
|
-import javassist.bytecode.stackmap.BasicBlock;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.redisson.api.ExpiredObjectListener;
|
|
|
-import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.dao.DuplicateKeyException;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -109,6 +107,9 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
|
@Resource
|
|
|
PushUserErrorService pushUserErrorService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ StmmsUtils stmmsUtils;
|
|
|
+
|
|
|
|
|
|
@Override
|
|
|
public IPage<UserDto> list(String loginName, String roleId, Boolean enable, String realName, Integer pageNumber, Integer pageSize) {
|
|
@@ -934,10 +935,10 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
|
|
|
|
@Transactional
|
|
|
@Override
|
|
|
- public boolean userPushService(List<UserPushParam> userPushParamList, SysUser requestUser) throws IllegalAccessException {
|
|
|
+ public boolean userPushService(List<UserPushParam> userPushParamList, SysUser requestUser) {
|
|
|
boolean result = true;
|
|
|
for (UserPushParam userPushParam : userPushParamList) {
|
|
|
- boolean syncResult = callApiOrgCenterService.basicSyncUser(userPushParam, requestUser.getSchoolId());
|
|
|
+ boolean syncResult = stmmsUtils.syncUser(userPushParam, requestUser.getSchoolId());
|
|
|
if (!syncResult) {
|
|
|
log.warn("-----------------------------用户同步推送失败----------------------------");
|
|
|
result = false;
|
|
@@ -1249,6 +1250,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
|
String code = dbUser.getCode();
|
|
|
Set<Long> roleIdList = new HashSet<>(sysRoleService.getUserRoles(userId));
|
|
|
PushBeforeRoleParam pushBeforeRoleParam = new PushBeforeRoleParam(null, BeforeJudgeEnum.FORBIDDEN_NECESSARY);
|
|
|
- return this.analyzeUserPushSpecialPrivilege(userId, schoolId, code, null, null, roleIdList, pushBeforeRoleParam, enable);
|
|
|
+ return this.analyzeUserPushSpecialPrivilege(userId, schoolId, code, dbUser.getRealName(), dbUser.getPassword(), roleIdList, pushBeforeRoleParam, enable);
|
|
|
}
|
|
|
}
|