|
|
@ -6,6 +6,7 @@ import cn.hutool.core.util.RandomUtil; |
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.huoran.common.constant.SMSTemplate; |
|
|
|
import com.huoran.common.constant.SMSTemplate; |
|
|
@ -17,10 +18,7 @@ import com.huoran.common.utils.JwtUtils; |
|
|
|
import com.huoran.common.utils.MD5; |
|
|
|
import com.huoran.common.utils.MD5; |
|
|
|
import com.huoran.common.utils.TokenUtils; |
|
|
|
import com.huoran.common.utils.TokenUtils; |
|
|
|
import com.huoran.nakadai.entity.*; |
|
|
|
import com.huoran.nakadai.entity.*; |
|
|
|
import com.huoran.nakadai.entity.req.AccountRegisterReq; |
|
|
|
import com.huoran.nakadai.entity.req.*; |
|
|
|
import com.huoran.nakadai.entity.req.AppletCallbackReq; |
|
|
|
|
|
|
|
import com.huoran.nakadai.entity.req.InviteJoinInfo; |
|
|
|
|
|
|
|
import com.huoran.nakadai.entity.req.PlatformTeamAccountListReq; |
|
|
|
|
|
|
|
import com.huoran.nakadai.entity.res.PartnerAccountResp; |
|
|
|
import com.huoran.nakadai.entity.res.PartnerAccountResp; |
|
|
|
import com.huoran.nakadai.entity.res.PlatformTeamAccountResp; |
|
|
|
import com.huoran.nakadai.entity.res.PlatformTeamAccountResp; |
|
|
|
import com.huoran.nakadai.entity.res.TeamAccountResp; |
|
|
|
import com.huoran.nakadai.entity.res.TeamAccountResp; |
|
|
@ -137,6 +135,7 @@ public class PlatformTeamAccountServiceImpl extends ServiceImpl<PlatformTeamAcco |
|
|
|
public R kindergartenWeChatApplication(AppletCallbackReq appletCallbackReq) { |
|
|
|
public R kindergartenWeChatApplication(AppletCallbackReq appletCallbackReq) { |
|
|
|
Map<String, Object> data = new HashedMap<String, Object>(); |
|
|
|
Map<String, Object> data = new HashedMap<String, Object>(); |
|
|
|
UserAccount userAccount = baseMapper.selectAccountByOpenId(appletCallbackReq.getOpenId(), appletCallbackReq.getPlatformId()); |
|
|
|
UserAccount userAccount = baseMapper.selectAccountByOpenId(appletCallbackReq.getOpenId(), appletCallbackReq.getPlatformId()); |
|
|
|
|
|
|
|
//该平台已经注册
|
|
|
|
if (userAccount != null){ |
|
|
|
if (userAccount != null){ |
|
|
|
data.put("registerId", userAccount.getId()); |
|
|
|
data.put("registerId", userAccount.getId()); |
|
|
|
data.put("openId", appletCallbackReq.getOpenId()); |
|
|
|
data.put("openId", appletCallbackReq.getOpenId()); |
|
|
@ -283,12 +282,7 @@ public class PlatformTeamAccountServiceImpl extends ServiceImpl<PlatformTeamAcco |
|
|
|
public R getTeamsByPlatformId(String accountId, Integer platformId) { |
|
|
|
public R getTeamsByPlatformId(String accountId, Integer platformId) { |
|
|
|
List<TeamAccountResp> teamsByPlatformId = baseMapper.getTeamsByPlatformId(accountId,platformId); |
|
|
|
List<TeamAccountResp> teamsByPlatformId = baseMapper.getTeamsByPlatformId(accountId,platformId); |
|
|
|
teamsByPlatformId.forEach(teamAccountResp -> { |
|
|
|
teamsByPlatformId.forEach(teamAccountResp -> { |
|
|
|
PlatformTeamClassification platformTeamClassification; |
|
|
|
PlatformTeamClassification platformTeamClassification = platformTeamClassificationMapper.getParentInformationBasedOnChild(teamAccountResp.getClassificationId()); |
|
|
|
if (teamAccountResp.getIsTeam().equals("0")){ |
|
|
|
|
|
|
|
platformTeamClassification = platformTeamClassificationMapper.getParentInformationBasedOnChild(teamAccountResp.getClassificationId()); |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
platformTeamClassification = platformTeamClassificationMapper.selectById(teamAccountResp.getClassificationId()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
teamAccountResp.setPlatformTeamClassificationList(platformTeamClassification); |
|
|
|
teamAccountResp.setPlatformTeamClassificationList(platformTeamClassification); |
|
|
|
}); |
|
|
|
}); |
|
|
|
return R.ok().put("data", teamsByPlatformId); |
|
|
|
return R.ok().put("data", teamsByPlatformId); |
|
|
@ -412,4 +406,24 @@ public class PlatformTeamAccountServiceImpl extends ServiceImpl<PlatformTeamAcco |
|
|
|
} |
|
|
|
} |
|
|
|
throw new CustomException(ExceptionEnum.CODE_ERROR); |
|
|
|
throw new CustomException(ExceptionEnum.CODE_ERROR); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public R transferTeam(TransferTeamReq transferTeamReq) { |
|
|
|
|
|
|
|
Integer adminManageId = transferTeamReq.getAdminManageId(); |
|
|
|
|
|
|
|
Integer memberManageId = transferTeamReq.getMemberManageId(); |
|
|
|
|
|
|
|
Integer adminTeamId = transferTeamReq.getAdminTeamId(); |
|
|
|
|
|
|
|
Integer memberTeamId = transferTeamReq.getMemberTeamId(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//转移团队
|
|
|
|
|
|
|
|
platformTeamMapper.update(new PlatformTeam(),new UpdateWrapper<PlatformTeam>(). |
|
|
|
|
|
|
|
eq("manage_id",adminManageId).eq("classification_id",adminTeamId). |
|
|
|
|
|
|
|
set("classification_id",memberTeamId)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
platformTeamMapper.update(new PlatformTeam(),new UpdateWrapper<PlatformTeam>(). |
|
|
|
|
|
|
|
eq("manage_id",memberManageId).eq("classification_id",memberTeamId). |
|
|
|
|
|
|
|
set("classification_id",adminTeamId)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return R.ok(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|