|
|
@ -1,14 +1,18 @@ |
|
|
|
package com.huoran.nakadai.controller; |
|
|
|
package com.huoran.nakadai.controller; |
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
|
|
|
|
import com.huoran.common.entity.OrganizationInfo; |
|
|
|
import com.huoran.common.entity.UserAccount; |
|
|
|
import com.huoran.common.entity.UserAccount; |
|
|
|
|
|
|
|
import com.huoran.common.entity.UserAuthenticationInformation; |
|
|
|
import com.huoran.common.response.R; |
|
|
|
import com.huoran.common.response.R; |
|
|
|
import com.huoran.common.utils.TokenUtils; |
|
|
|
import com.huoran.common.utils.TokenUtils; |
|
|
|
import com.huoran.common.entity.EnterpriseCertification; |
|
|
|
import com.huoran.common.entity.EnterpriseCertification; |
|
|
|
import com.huoran.nakadai.entity.req.EnterpriseCertificationLIstReq; |
|
|
|
import com.huoran.nakadai.entity.req.EnterpriseCertificationLIstReq; |
|
|
|
import com.huoran.nakadai.entity.vo.WxMssVo; |
|
|
|
import com.huoran.nakadai.entity.vo.WxMssVo; |
|
|
|
|
|
|
|
import com.huoran.nakadai.mapper.PlatformTeamAccountMapper; |
|
|
|
import com.huoran.nakadai.service.EnterpriseCertificationService; |
|
|
|
import com.huoran.nakadai.service.EnterpriseCertificationService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.huoran.nakadai.service.UserAuthenticationInformationService; |
|
|
|
import com.huoran.nakadai.utils.WeChatUtil; |
|
|
|
import com.huoran.nakadai.utils.WeChatUtil; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
@ -20,6 +24,7 @@ import org.springframework.web.bind.annotation.*; |
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
import java.io.IOException; |
|
|
|
import java.io.IOException; |
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
@ -42,6 +47,12 @@ public class EnterpriseCertificationController { |
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
public EnterpriseCertificationService service; |
|
|
|
public EnterpriseCertificationService service; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
|
|
public UserAuthenticationInformationService userAuthenticationInformationService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
|
|
public PlatformTeamAccountMapper platformTeamAccountMapper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 由前台申请认证后才有后台认证记录,认证状态有 待审核、已通过、未驳回三种状态,没有未提交这种状态 |
|
|
|
* 由前台申请认证后才有后台认证记录,认证状态有 待审核、已通过、未驳回三种状态,没有未提交这种状态 |
|
|
@ -203,7 +214,31 @@ public class EnterpriseCertificationController { |
|
|
|
service.deleteUserInformation(userAccount.getUserId()); |
|
|
|
service.deleteUserInformation(userAccount.getUserId()); |
|
|
|
|
|
|
|
|
|
|
|
//删除团队信息表
|
|
|
|
//删除团队信息表
|
|
|
|
service.deleteTeamInformation(userAccount.getId()); |
|
|
|
// service.deleteTeamInformation(userAccount.getId());
|
|
|
|
|
|
|
|
//删除平台全部认证信息
|
|
|
|
|
|
|
|
QueryWrapper<UserAuthenticationInformation> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
|
|
|
queryWrapper.eq("open_id", enterpriseCertification.getOpenId()); |
|
|
|
|
|
|
|
userAuthenticationInformationService.remove(queryWrapper); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QueryWrapper<EnterpriseCertification> queryWrapper1 = new QueryWrapper<>(); |
|
|
|
|
|
|
|
queryWrapper1.eq("open_id", enterpriseCertification.getOpenId()); |
|
|
|
|
|
|
|
service.remove(queryWrapper1); |
|
|
|
|
|
|
|
//删除组织信息,及组织下的用户信息
|
|
|
|
|
|
|
|
List<OrganizationInfo> organizationInfoList = platformTeamAccountMapper.selectOrganizationInfo(enterpriseCertification.getOpenId()); |
|
|
|
|
|
|
|
if (organizationInfoList != null && organizationInfoList.size() > 0) { |
|
|
|
|
|
|
|
for (OrganizationInfo organizationInfo : organizationInfoList) { |
|
|
|
|
|
|
|
//如果是团队负责人,则删除自身团队及成员团队信息
|
|
|
|
|
|
|
|
if (organizationInfo.getIsTeam() == 1) { |
|
|
|
|
|
|
|
ArrayList<Integer> getTeamIds = platformTeamAccountMapper.selectTeamIdByClassificationId(organizationInfo.getTeamId().toString()); |
|
|
|
|
|
|
|
for (Integer teamId : getTeamIds) { |
|
|
|
|
|
|
|
platformTeamAccountMapper.deleteTeam(teamId); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
//删除团队信息
|
|
|
|
|
|
|
|
platformTeamAccountMapper.deleteOrganization(organizationInfo.getAccountId()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
boolean delState = service.removeByIds(ids); |
|
|
|
boolean delState = service.removeByIds(ids); |
|
|
|