|
|
@ -23,19 +23,13 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
|
import com.epmet.commons.tools.constant.FieldConstant; |
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.enums.EnvEnum; |
|
|
|
import com.epmet.commons.tools.exception.ExceptionUtils; |
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
|
import com.epmet.commons.tools.utils.HttpClientManager; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
|
import com.epmet.dto.form.UserResiInfoListFormDTO; |
|
|
|
import com.epmet.dto.result.CustomerTokensResultDTO; |
|
|
|
import com.epmet.dto.result.UploadImgResultDTO; |
|
|
|
import com.epmet.dto.result.UserResiInfoResultDTO; |
|
|
|
import com.epmet.feign.EpmetUserOpenFeignClient; |
|
|
|
import com.epmet.feign.OssFeignClient; |
|
|
|
import com.epmet.modules.group.dao.ResiGroupCodeDao; |
|
|
|
import com.epmet.modules.group.entity.ResiGroupCodeEntity; |
|
|
@ -63,7 +57,9 @@ import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import java.io.UnsupportedEncodingException; |
|
|
|
import java.util.*; |
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.concurrent.ExecutorService; |
|
|
|
|
|
|
|
/** |
|
|
@ -277,6 +273,7 @@ public class ResiGroupCodeServiceImpl extends BaseServiceImpl<ResiGroupCodeDao, |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public GroupCodeBasicInfoResultDTO groupCodeBasicInfo(GroupCodeBasicInfoFormDTO formDTO) { |
|
|
|
String url = ""; |
|
|
|
//1.获取小组基本信息
|
|
|
|
GroupCodeBasicInfoResultDTO resultDTO = baseDao.selectGroupCodeBasicInfo(formDTO); |
|
|
|
if (null == resultDTO) { |
|
|
@ -286,13 +283,17 @@ public class ResiGroupCodeServiceImpl extends BaseServiceImpl<ResiGroupCodeDao, |
|
|
|
if (null == resultDTO.getGroupCodeUrl() || "".equals(resultDTO.getGroupCodeUrl())) { |
|
|
|
CreateGroupCodeFormDTO dto = ConvertUtils.sourceToTarget(formDTO, CreateGroupCodeFormDTO.class); |
|
|
|
dto.setType(GroupCodeConstant.CODE_TYPE_INVITE); |
|
|
|
String url = createGroupCode(dto, true); |
|
|
|
url = createGroupCode(dto, true); |
|
|
|
if (StringUtils.isBlank(url)) { |
|
|
|
logger.error(String.format("生成小组二维码失败,小组Id:%s", formDTO.getGroupId())); |
|
|
|
throw new RenException("获取小组码基本信息失败"); |
|
|
|
} |
|
|
|
resultDTO.setGroupCodeUrl(url); |
|
|
|
}else { |
|
|
|
url = resultDTO.getGroupCodeUrl(); |
|
|
|
} |
|
|
|
|
|
|
|
//2.图片的url只截取相对路径供前端使用
|
|
|
|
resultDTO.setGroupCodeUrl(url.replaceAll(GroupCodeConstant.PATTERN, GroupCodeConstant.STORAGE)); |
|
|
|
return resultDTO; |
|
|
|
} |
|
|
|
|
|
|
|