|
|
|
@@ -20,8 +20,10 @@ import com.cool.store.response.ResponseResult;
|
|
|
|
import com.cool.store.service.CoolStoreStartFlowService;
|
|
|
|
import com.cool.store.service.CoolStoreStartFlowService;
|
|
|
|
import com.cool.store.service.PreparationService;
|
|
|
|
import com.cool.store.service.PreparationService;
|
|
|
|
import com.cool.store.service.SignFranchiseService;
|
|
|
|
import com.cool.store.service.SignFranchiseService;
|
|
|
|
|
|
|
|
import com.cool.store.utils.GeoMapUtil;
|
|
|
|
import com.cool.store.utils.RedisUtilPool;
|
|
|
|
import com.cool.store.utils.RedisUtilPool;
|
|
|
|
import com.cool.store.utils.poi.DateUtils;
|
|
|
|
import com.cool.store.utils.poi.DateUtils;
|
|
|
|
|
|
|
|
import com.cool.store.utils.poi.StringUtils;
|
|
|
|
import com.cool.store.utils.poi.constant.Constants;
|
|
|
|
import com.cool.store.utils.poi.constant.Constants;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
@@ -87,6 +89,9 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
QualificationsInfoDAO qualificationsInfoDAO;
|
|
|
|
QualificationsInfoDAO qualificationsInfoDAO;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
RegionMapper regionMapper;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public Boolean auditResult(AuditResultRequest request) {
|
|
|
|
public Boolean auditResult(AuditResultRequest request) {
|
|
|
|
@@ -163,6 +168,9 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//店铺信息
|
|
|
|
//店铺信息
|
|
|
|
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
|
|
|
|
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
|
|
|
|
|
|
|
|
shopInfoDO.setRegionId(request.getRegionId());
|
|
|
|
|
|
|
|
shopInfoDO.setShopName(request.getShopName());
|
|
|
|
|
|
|
|
shopInfoDO.setDetailAddress(request.getDetailAddress());
|
|
|
|
shopInfoMapper.updateByPrimaryKeySelective(shopInfoDO);
|
|
|
|
shopInfoMapper.updateByPrimaryKeySelective(shopInfoDO);
|
|
|
|
//更新状态为加盟商
|
|
|
|
//更新状态为加盟商
|
|
|
|
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
|
|
|
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
|
|
|
@@ -226,14 +234,17 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|
|
|
FranchiseFeeDO franchiseFeeDO = franchiseFeeMapper.selectOne(FranchiseFeeDO.builder().shopId(shopId).build());
|
|
|
|
FranchiseFeeDO franchiseFeeDO = franchiseFeeMapper.selectOne(FranchiseFeeDO.builder().shopId(shopId).build());
|
|
|
|
//线索id
|
|
|
|
//线索id
|
|
|
|
Long lineId = shopInfoDO.getLineId();
|
|
|
|
Long lineId = shopInfoDO.getLineId();
|
|
|
|
//签约信息
|
|
|
|
|
|
|
|
SigningBaseInfoDO signingBaseInfoDO = intentAgreementMapper.selectByPartnerIdOrLineId(null, lineId);
|
|
|
|
|
|
|
|
//缴款信息
|
|
|
|
//缴款信息
|
|
|
|
LinePayDO linePayDO = linePayMapper.getByLineIdAndPayTypeAndShopId(lineId, 1, shopId);
|
|
|
|
LinePayDO linePayDO = linePayMapper.getByLineIdAndPayTypeAndShopId(lineId, 1, shopId);
|
|
|
|
//铺位信息
|
|
|
|
//铺位信息
|
|
|
|
PointInfoDO pointInfoDO = pointInfoMapper.getDataByShopIdAndLineId(lineId, shopId);
|
|
|
|
PointInfoDO pointInfoDO = pointInfoMapper.getDataByShopIdAndLineId(lineId, shopId);
|
|
|
|
//证照办理
|
|
|
|
//证照办理
|
|
|
|
LicenseTransactDO licenseTransactDO = applyLicenseMapper.selectByShopId(shopId);
|
|
|
|
LicenseTransactDO licenseTransactDO = applyLicenseMapper.selectByShopId(shopId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RegionDO regionInfo = regionMapper.getByRegionId(lineInfoDO.getRegionId());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
addSignFranchiseResponse.setDetailAddress(shopInfoDO.getDetailAddress());
|
|
|
|
if (Objects.nonNull(signFranchiseDO)) {
|
|
|
|
if (Objects.nonNull(signFranchiseDO)) {
|
|
|
|
addSignFranchiseResponse.setId(signFranchiseDO.getId());
|
|
|
|
addSignFranchiseResponse.setId(signFranchiseDO.getId());
|
|
|
|
addSignFranchiseResponse.setShopId(signFranchiseDO.getShopId());
|
|
|
|
addSignFranchiseResponse.setShopId(signFranchiseDO.getShopId());
|
|
|
|
@@ -255,8 +266,17 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|
|
|
}
|
|
|
|
}
|
|
|
|
addSignFranchiseResponse.setStoreName(shopInfoDO.getShopName());
|
|
|
|
addSignFranchiseResponse.setStoreName(shopInfoDO.getShopName());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (Objects.nonNull(regionInfo)){
|
|
|
|
|
|
|
|
addSignFranchiseResponse.setRegionId(lineInfoDO.getRegionId());
|
|
|
|
|
|
|
|
addSignFranchiseResponse.setRegionName(regionInfo.getName());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (Objects.nonNull(pointInfoDO)) {
|
|
|
|
if (Objects.nonNull(pointInfoDO)) {
|
|
|
|
addSignFranchiseResponse.setStoreAddress(pointInfoDO.getAddress());
|
|
|
|
addSignFranchiseResponse.setStoreAddress(pointInfoDO.getAddress());
|
|
|
|
|
|
|
|
if (StringUtils.isNoneBlank(pointInfoDO.getLatitude(), pointInfoDO.getLongitude())){
|
|
|
|
|
|
|
|
GeoMapUtil.AddressInfo addressInfo = GeoMapUtil.reverseGeoCoding(pointInfoDO.getLatitude(), pointInfoDO.getLongitude());
|
|
|
|
|
|
|
|
addSignFranchiseResponse.setStoreProvinceCity(String.format("%s%s%s", addressInfo.getProvince(), addressInfo.getCity(), addressInfo.getDistrict()));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (Objects.nonNull(linePayDO)) {
|
|
|
|
if (Objects.nonNull(linePayDO)) {
|
|
|
|
addSignFranchiseResponse.setPayName(linePayDO.getPayUserName());
|
|
|
|
addSignFranchiseResponse.setPayName(linePayDO.getPayUserName());
|
|
|
|
|