main
rong.liu 11 months ago
parent 97d5da6a85
commit 5d0bb9f5a7
  1. 6
      nakadai/src/main/java/com/huoran/nakadai/controller/AliRealNameAuthenticationController.java
  2. 1
      nakadai/src/main/java/com/huoran/nakadai/controller/EnterpriseCertificationController.java
  3. 32
      nakadai/src/main/java/com/huoran/nakadai/controller/PlatformTeamAccountController.java
  4. 2
      nakadai/src/main/java/com/huoran/nakadai/service/impl/EnterpriseCertificationServiceImpl.java

@ -7,8 +7,8 @@ import com.huoran.common.response.R;
import com.huoran.common.utils.TokenUtils; import com.huoran.common.utils.TokenUtils;
import com.huoran.nakadai.config.AliRealNameAuthenticationConfig; import com.huoran.nakadai.config.AliRealNameAuthenticationConfig;
import com.huoran.nakadai.entity.EnterpriseCertification; import com.huoran.nakadai.entity.EnterpriseCertification;
import com.huoran.nakadai.entity.UserInfo;
import com.huoran.nakadai.entity.UserAuthenticationInformation; import com.huoran.nakadai.entity.UserAuthenticationInformation;
import com.huoran.nakadai.entity.UserInfo;
import com.huoran.nakadai.entity.res.BusinessLicenseOCRResp; import com.huoran.nakadai.entity.res.BusinessLicenseOCRResp;
import com.huoran.nakadai.entity.res.CreditCodeResp; import com.huoran.nakadai.entity.res.CreditCodeResp;
import com.huoran.nakadai.entity.res.IdCardOCRResp; import com.huoran.nakadai.entity.res.IdCardOCRResp;
@ -208,6 +208,10 @@ public class AliRealNameAuthenticationController {
QueryWrapper<EnterpriseCertification> queryWrapper = new QueryWrapper<>(); QueryWrapper<EnterpriseCertification> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("open_id", enterpriseCertification.getOpenId()); queryWrapper.eq("open_id", enterpriseCertification.getOpenId());
EnterpriseCertification certification = enterpriseCertificationService.getOne(queryWrapper); EnterpriseCertification certification = enterpriseCertificationService.getOne(queryWrapper);
if (certification == null) {
//通过后台删除组织信息的
return R.error("您已没有组织信息,请联系管理人员!");
}
enterpriseCertification.setId(certification.getId()); enterpriseCertification.setId(certification.getId());
try { try {
HttpResponse response = HttpUtils.doGet(host, path, method, headers, querys); HttpResponse response = HttpUtils.doGet(host, path, method, headers, querys);

@ -186,6 +186,7 @@ public class EnterpriseCertificationController {
accountQueryWrapper1.eq("platform_id",enterpriseCertification.getPlatformSource()); accountQueryWrapper1.eq("platform_id",enterpriseCertification.getPlatformSource());
HrUserAccount userAccount = userAccountService.getOne(accountQueryWrapper1);*/ HrUserAccount userAccount = userAccountService.getOne(accountQueryWrapper1);*/
//删除团队表
UserAccount userAccount = service.queryAccountInformation(enterpriseCertification.getOpenId(), Integer.valueOf(enterpriseCertification.getPlatformSource())); UserAccount userAccount = service.queryAccountInformation(enterpriseCertification.getOpenId(), Integer.valueOf(enterpriseCertification.getPlatformSource()));
service.deleteAccountInformation(userAccount.getId()); service.deleteAccountInformation(userAccount.getId());

@ -10,6 +10,7 @@ import com.huoran.common.utils.TokenUtils;
import com.huoran.nakadai.entity.PlatformTeam; import com.huoran.nakadai.entity.PlatformTeam;
import com.huoran.nakadai.entity.PlatformTeamAccount; import com.huoran.nakadai.entity.PlatformTeamAccount;
import com.huoran.nakadai.entity.PlatformTeamClassification; import com.huoran.nakadai.entity.PlatformTeamClassification;
import com.huoran.nakadai.entity.SupplierClassificationConfig;
import com.huoran.nakadai.entity.req.*; import com.huoran.nakadai.entity.req.*;
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;
@ -154,9 +155,7 @@ public class PlatformTeamAccountController {
@GetMapping("/removeOrganization") @GetMapping("/removeOrganization")
@ApiOperation(value = "移除组织") @ApiOperation(value = "移除组织")
public R removeOrganization( public R removeOrganization(@ApiParam(name = "teamId", value = "团队id") @RequestParam Integer teamId, @ApiParam(name = "manageId", value = "组织id") @RequestParam Integer manageId) {
@ApiParam(name = "teamId", value = "团队id") @RequestParam Integer teamId,
@ApiParam(name = "manageId", value = "组织id") @RequestParam Integer manageId) {
PlatformTeamClassification teamClassification = platformTeamClassificationService.getById(teamId); PlatformTeamClassification teamClassification = platformTeamClassificationService.getById(teamId);
if (teamClassification.getIsTeam() == 1) { if (teamClassification.getIsTeam() == 1) {
throw new CustomException(ExceptionEnum.PARTNER_REMOVAL); throw new CustomException(ExceptionEnum.PARTNER_REMOVAL);
@ -189,9 +188,7 @@ public class PlatformTeamAccountController {
@ApiOperation(value = "用户列表更新账号状态,禁用整个账号禁止登录,不管是哪个端,哪个组织") @ApiOperation(value = "用户列表更新账号状态,禁用整个账号禁止登录,不管是哪个端,哪个组织")
@PostMapping("/updateAccountStatus") @PostMapping("/updateAccountStatus")
public R updateAccountStatus( public R updateAccountStatus(@RequestParam("openId") @ApiParam(value = "openId") String openId, @RequestParam("isEnable") @ApiParam(value = "是否禁用(1->启用,0->禁用)") Integer isEnable) {
@RequestParam("openId") @ApiParam(value = "openId") String openId,
@RequestParam("isEnable") @ApiParam(value = "是否禁用(1->启用,0->禁用)") Integer isEnable) {
//根据openId查询账号详情List //根据openId查询账号详情List
List<UserAccount> userAccountList = platformTeamClassificationService.selectAccountList(openId); List<UserAccount> userAccountList = platformTeamClassificationService.selectAccountList(openId);
for (UserAccount userAccount : userAccountList) { for (UserAccount userAccount : userAccountList) {
@ -257,14 +254,25 @@ public class PlatformTeamAccountController {
Integer accountId = platformTeamService.getAccountIdByTeamId(teamInfo.getId()); Integer accountId = platformTeamService.getAccountIdByTeamId(teamInfo.getId());
//删除原有分类重新新增分类配置信息
supplierClassificationConfigService.deleteByAccountId(accountId);
//设置分类配置信息中的accountId
teamInfo.getSupplierClassificationConfigs().forEach(config -> config.setAccountId(accountId));
QueryWrapper<SupplierClassificationConfig> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("account_id", accountId);
//删除供应商原有分类重新新增分类配置信息
List<SupplierClassificationConfig> classificationConfigs = supplierClassificationConfigService.list(queryWrapper);
if (!classificationConfigs.isEmpty()){
supplierClassificationConfigService.remove(queryWrapper);
}
if (teamInfo.getSupplierClassificationConfigs()!=null) {
for (SupplierClassificationConfig config : teamInfo.getSupplierClassificationConfigs()) {
//获取teamInfo.getSupplierClassificationConfigs()第一个账号id
config.setAccountId(accountId);
}
//新增分类配置信息 //新增分类配置信息
supplierClassificationConfigService.saveBatch(teamInfo.getSupplierClassificationConfigs()); supplierClassificationConfigService.saveBatch(teamInfo.getSupplierClassificationConfigs());
}
boolean update = platformTeamClassificationService.updateById(platformTeamClassification); boolean update = platformTeamClassificationService.updateById(platformTeamClassification);
@ -272,8 +280,6 @@ public class PlatformTeamAccountController {
} }
@ApiOperation(value = "查询团队信息") @ApiOperation(value = "查询团队信息")
@GetMapping("/queryTeamInfo") @GetMapping("/queryTeamInfo")
public R queryTeamInfo(@ApiParam(value = "团队id") @RequestParam("teamId") Integer teamId) { public R queryTeamInfo(@ApiParam(value = "团队id") @RequestParam("teamId") Integer teamId) {

@ -68,7 +68,7 @@ public class EnterpriseCertificationServiceImpl extends ServiceImpl<EnterpriseCe
@Override @Override
public boolean deleteAccountInformation(Integer accountId) { public boolean deleteAccountInformation(Integer accountId) {
return baseMapper.deleteTeamInformation(accountId) > 0; return baseMapper.updateAccountInformation(accountId) > 0;
} }
@Override @Override

Loading…
Cancel
Save