|
|
@@ -135,6 +135,28 @@ public class ProjectServiceImpl implements ProjectService {
|
|
|
}catch (Exception e){}
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void addMember(Integer projectId, Integer userId) throws ServiceException {
|
|
|
+// Integer userId = userMapper.selectIdByPhone(phone);
|
|
|
+ if(userId == null){
|
|
|
+ throw new ServiceException(HttpStatus.SC_INTERNAL_SERVER_ERROR, "该手机号不存在对应用户");
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ seecoderGitlabApi.addAuthorization(projectId, userId, AccessLevelForm.MASTER);
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new ServiceException(HttpStatus.SC_INTERNAL_SERVER_ERROR, "添加项目权限失败", e);
|
|
|
+ }
|
|
|
+ //ANA 日志需要打出加入的成员信息
|
|
|
+ try{
|
|
|
+ JSONObject object = new JSONObject();
|
|
|
+ object.put("project_id",projectId);
|
|
|
+ object.put("user_id",userId);
|
|
|
+
|
|
|
+ String data = JSONObject.toJSONString(object);
|
|
|
+ LogTrackingUtil.log(data, OpType.ADD_MEMBER);
|
|
|
+ }catch (Exception e){}
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public List<UserVO> getProjectMembers(Integer projectId) throws ServiceException {
|
|
|
List<Integer> userIds;
|