改造平台建店接口
This commit is contained in:
@@ -52,6 +52,10 @@ import static com.cool.store.enums.point.ShopSubStageStatusEnum.*;
|
||||
@Service
|
||||
public class PlatformBuildServiceImpl implements PlatformBuildService {
|
||||
|
||||
@Resource
|
||||
private ApplyLicenseMapper applyLicenseMapper;
|
||||
@Resource
|
||||
private QualificationsInfoDAO qualificationsInfoDAO;
|
||||
@Autowired
|
||||
private BuildInformationDAO buildInformationDAO;
|
||||
@Autowired
|
||||
@@ -324,8 +328,34 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
||||
public PlatformBuildResponse get(Long shopId, Integer type) {
|
||||
PlatformBuildDO platformBuildDO = platformBuildDAO.selectOneByShopId(shopId, type);
|
||||
PlatformBuildResponse platformBuildResponse = new PlatformBuildResponse();
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||
PointInfoDO pointInfo = pointInfoDAO.getPointInfoById(shopInfo.getPointId());
|
||||
QualificationsInfoDO qualificationsInfoDO = qualificationsInfoDAO.getByLineId(shopInfo.getLineId());
|
||||
BuildInformationDO informationDO = buildInformationDAO.selectOneByShopId(shopId);
|
||||
LicenseTransactDO licenseTransactDO = applyLicenseMapper.selectByShopId(shopId);
|
||||
if (Objects.nonNull(qualificationsInfoDO)) {
|
||||
platformBuildResponse.setLegalName(qualificationsInfoDO.getLegalName());
|
||||
platformBuildResponse.setLegalIdCardFront(qualificationsInfoDO.getLegalIdCardFront());
|
||||
platformBuildResponse.setLegalIdCardBack(qualificationsInfoDO.getLegalIdCardBack());
|
||||
}
|
||||
if (Objects.nonNull(pointInfo)){
|
||||
platformBuildResponse.setShopProvinceCityDistrict(pointInfo.getProvince()+pointInfo.getCity()+pointInfo.getDistrict());
|
||||
platformBuildResponse.setShopAddress(pointInfo.getAddress());
|
||||
}
|
||||
platformBuildResponse.setShopCode(shopInfo.getShopCode());
|
||||
platformBuildResponse.setFranchiseBrand(FranchiseBrandEnum.getDescByCode(shopInfo.getFranchiseBrand()));
|
||||
platformBuildResponse.setShopName(shopInfo.getShopName());
|
||||
platformBuildResponse.setBusinessMobile(informationDO.getBusinessMobile());
|
||||
if (Objects.nonNull(licenseTransactDO)){
|
||||
platformBuildResponse.setCreditUrl(licenseTransactDO.getCreditUrl());
|
||||
//("二证合一标识;0否 1 是")
|
||||
if (licenseTransactDO.getTwoCertificatesOne().equals(1)){
|
||||
platformBuildResponse.setFoodBusinessLicenseUrl(licenseTransactDO.getCreditUrl());
|
||||
}else if (licenseTransactDO.getTwoCertificatesOne().equals(0)){
|
||||
platformBuildResponse.setFoodBusinessLicenseUrl(licenseTransactDO.getFoodBusinessLicenseUrl());
|
||||
}
|
||||
}
|
||||
if (Objects.isNull(platformBuildDO)) {
|
||||
BuildInformationDO informationDO = buildInformationDAO.selectOneByShopId(shopId);
|
||||
BeanUtils.copyProperties(informationDO, platformBuildResponse);
|
||||
return platformBuildResponse;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user