|
|
|
@ -115,20 +115,8 @@ public class CreatorServiceImpl implements CreatorService { |
|
|
|
@Override |
|
|
|
public int updateCreator(Creator dto) { |
|
|
|
if(StringUtils.isNotBlank(dto.getPhone())){ |
|
|
|
//检查手机号是否存在
|
|
|
|
boolean b1 = checkPhone(Sm4Util.sm4Encryption(dto.getPhone())); |
|
|
|
if(b1){ |
|
|
|
throw new ServiceException("当前手机号已绑定艺术家,请重新编辑!", TiktokConstant.BINDED_PHONE); |
|
|
|
} |
|
|
|
dto.setPhone(Sm4Util.sm4Encryption(dto.getPhone())); |
|
|
|
} |
|
|
|
if(StringUtils.isNotBlank(dto.getScanCode())){ |
|
|
|
//检查搜索码是否重复
|
|
|
|
boolean b = this.checkScanCode(dto.getScanCode()); |
|
|
|
if(b){ |
|
|
|
throw new ServiceException("搜索码重复,请重新编辑!",TiktokConstant.SCAN_CODE_REPEAT); |
|
|
|
} |
|
|
|
} |
|
|
|
dto.setUpdateTime(new Date()); |
|
|
|
return creatorMapper.updateById(dto); |
|
|
|
} |
|
|
|
@ -225,4 +213,14 @@ public class CreatorServiceImpl implements CreatorService { |
|
|
|
log.setStatus("0"); |
|
|
|
return verifyLogMapper.insert(log); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public int reVerify(Long id) { |
|
|
|
LambdaUpdateWrapper<Creator> wrapper = new LambdaUpdateWrapper<>(); |
|
|
|
wrapper.eq(Creator::getId, id); |
|
|
|
Creator creator = new Creator(); |
|
|
|
creator.setStatus("0"); |
|
|
|
return creatorMapper.update(creator,wrapper); |
|
|
|
} |
|
|
|
} |
|
|
|
|