Merge branch 'master' into cc_20250826_notice

# Conflicts:
#	coolstore-partner-common/src/main/java/com/cool/store/enums/ErrorCodeEnum.java
This commit is contained in:
苏竹红
2025-09-09 09:46:06 +08:00
31 changed files with 574 additions and 201 deletions

View File

@@ -23,6 +23,13 @@ public interface FranchiseFeeService {
*/
FranchiseFeeResponse getDetail(Long shopId);
/**
* 跳过 Stage
* @param shopId
* @return
*/
Boolean stageSkip(Long shopId);
Boolean auditFranchiseFee(AuditFranchiseFeeRequest request, LoginUserInfo user);
ApiResponse<Boolean> changePaymentStatus(FranchiseFeeCallBackRequest request);

View File

@@ -201,6 +201,16 @@ public class BuildInformationServiceImpl implements BuildInformationService {
try {
acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.TEN_SECONDS);
if (Boolean.TRUE.equals(acquired)) {
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
// if (JoinModeEnum.FLAGSHIP_STORE.getCode()!=shopInfoDO.getJoinMode()){
// //校验结算人非空
// if (StringUtils.isAnyBlank(request.getSettlerName(),request.getSettlerIdCardFront(),
// request.getSettlerInHandFrontPicture(),request.getSettlerBankBackPhotoUrl(),
// request.getSettlerBankNumber(),request.getSettlerBankMobile(),request.getSettlerBankName())) {
// throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
// }
// }
BuildInformationDO informationDO = buildInformationDAO.selectOneByShopId(request.getShopId());
BuildInformationDO buildInformationDO = request.toDO();
OrderSysInfoDO orderSysInfoDO = getOrderSysInfoDO(request);
@@ -210,7 +220,6 @@ public class BuildInformationServiceImpl implements BuildInformationService {
} else {
orderSysInfoDAO.insertSelective(orderSysInfoDO);
}
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfoDO.getLineId());
QualificationsInfoDO qualificationsInfoDO = qualificationsInfoDAO.getByLineId(lineInfoDO.getId());
if (request.getJuridicalIsSamePartner()) {
@@ -219,7 +228,7 @@ public class BuildInformationServiceImpl implements BuildInformationService {
buildInformationDO.setJuridicalIdCardFront(qualificationsInfoDO.getFrontOfIdCard());
buildInformationDO.setJuridicalIdCardReverse(qualificationsInfoDO.getBackOfIdCard());
}
if (request.getSettlerIsSamePartner()) {
if (request.getSettlerIsSamePartner()!=null&&request.getSettlerIsSamePartner()) {
buildInformationDO.setSettlerIdCardNo(qualificationsInfoDO.getIdCardNo());
buildInformationDO.setSettlerName(lineInfoDO.getUsername());
buildInformationDO.setSettlerIdCardFront(qualificationsInfoDO.getFrontOfIdCard());

View File

@@ -7,6 +7,7 @@ import com.cool.store.dao.PointInfoDAO;
import com.cool.store.dao.ShopStageInfoDAO;
import com.cool.store.entity.*;
import com.cool.store.enums.*;
import com.cool.store.enums.point.PayBusinessTypeEnum;
import com.cool.store.enums.point.ShopSubStageEnum;
import com.cool.store.enums.point.ShopSubStageStatusEnum;
import com.cool.store.exception.ServiceException;
@@ -138,6 +139,24 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
return resp;
}
@Override
public Boolean stageSkip(Long shopId) {
//校验是否是自营店FLAGSHIP_STORE
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(shopId);
if (shopInfoDO==null){
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
}
if (JoinModeEnum.FLAGSHIP_STORE.getCode()!=shopInfoDO.getJoinMode()){
throw new ServiceException(ErrorCodeEnum.NOT_FLAGSHIP_STORE);
}
ShopStageInfoDO shopStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_7);
if (!shopStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_70.getShopSubStageStatus())){
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
}
shopStageInfoDAO.batchUpdateShopStageStatus(shopId,Arrays.asList(SHOP_SUB_STAGE_STATUS_73,SHOP_SUB_STAGE_STATUS_80));
return Boolean.TRUE;
}
@Override
public Boolean auditFranchiseFee(AuditFranchiseFeeRequest request, LoginUserInfo user) {
ShopStageInfoDO shopStageInfo = shopStageInfoDAO.getShopSubStageInfo(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_7);
@@ -215,10 +234,21 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
franchiseFeeDO.setXgjCollectionStatus(request.getPaymentStatus());
franchiseFeeDO.setXgjRemainderPayableAmount(request.getRemainingFee());
franchiseFeeDO.setXgjFeesPaid(request.getPaidFees());
if (request.getPayableFee().compareTo(request.getPaidFees())==-1){
franchiseFeeDO.setXgjRemainderPayableAmount(new BigDecimal("0"));
franchiseFeeDO.setXgjCollectionStatus(XGJCollectionStatusEnum.COMPLETED.getCode());
//如果多缴费 都缴部分退款或者其他用处 这里缴费费用还是填写所需缴的费用
franchiseFeeDO.setXgjFeesPaid(request.getPaidFees().add(request.getRemainingFee()));
LinePayDO lastPay = linePayMapper.getLastPay(franchiseFeeDO.getShopId());
lastPay.setRemark(lastPay.getRemark()+"系统监测到您多缴费"+request.getPaidFees().subtract(request.getPayableFee())+"元 请申请退款或留做他用!");
linePayMapper.updateByPrimaryKeySelective(lastPay);
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(),Arrays.asList(SHOP_SUB_STAGE_STATUS_73,SHOP_SUB_STAGE_STATUS_80));
}
franchiseFeeMapper.updateByPrimaryKeySelective(franchiseFeeDO);
if (XGJCollectionStatusEnum.COMPLETED.getCode().equals(request.getPaymentStatus())){
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(),Arrays.asList(SHOP_SUB_STAGE_STATUS_73,SHOP_SUB_STAGE_STATUS_80));
}
return ApiResponse.success(Boolean.TRUE);
}
}

View File

@@ -171,21 +171,21 @@ public class LinePayServiceImpl implements LinePayService {
if (request.getId()!=null){
payIdMap.remove(request.getId());
}
//判断缴费金额不能大于未缴费金额
BigDecimal total = payIdMap.values().stream()
.map(LinePayDO::getAmount)
.reduce(BigDecimal.ZERO, BigDecimal::add);
//应缴金额
BigDecimal amountDue = new BigDecimal(franchiseFeeDO.getYearFranchiseFee())
.add(new BigDecimal(franchiseFeeDO.getLoanMargin()))
.add(new BigDecimal(franchiseFeeDO.getFirstYearFee()))
.add(new BigDecimal(franchiseFeeDO.getFirstYearManageFee()))
.add(new BigDecimal(franchiseFeeDO.getPerformanceBond()));
//未缴费金额
BigDecimal amountUnpaid = amountDue.subtract(total);
if( request.getAmount().compareTo(amountUnpaid) > 0 ){
throw new ServiceException(ErrorCodeEnum.PAY_AMOUNT_ERROR);
}
// //判断缴费金额不能大于未缴费金额
// BigDecimal total = payIdMap.values().stream()
// .map(LinePayDO::getAmount)
// .reduce(BigDecimal.ZERO, BigDecimal::add);
// //应缴金额
// BigDecimal amountDue = new BigDecimal(franchiseFeeDO.getYearFranchiseFee())
// .add(new BigDecimal(franchiseFeeDO.getLoanMargin()))
// .add(new BigDecimal(franchiseFeeDO.getFirstYearFee()))
// .add(new BigDecimal(franchiseFeeDO.getFirstYearManageFee()))
// .add(new BigDecimal(franchiseFeeDO.getPerformanceBond()));
// //未缴费金额
// BigDecimal amountUnpaid = amountDue.subtract(total);
// if( request.getAmount().compareTo(amountUnpaid) > 0 ){
// throw new ServiceException(ErrorCodeEnum.PAY_AMOUNT_ERROR);
// }
Set<String> payUserList = list.stream().map(LinePayDO::getPayUserName).collect(Collectors.toSet());
if (!payUserList.contains(request.getPayUserName()) && payUserList.size() >= 2) {
throw new ServiceException(ErrorCodeEnum.PAY_USER_NAME_ERROR);
@@ -321,6 +321,7 @@ public class LinePayServiceImpl implements LinePayService {
return ApiResponse.error(ErrorCodeEnum.RECEIPT_NOT_EXIST);
}
linePayDO.setXgjClaimStatus(request.getClaimStatus());
linePayDO.setUpdateTime(new Date());
linePayDAO.updateLinePay(linePayDO);
return ApiResponse.success(Boolean.TRUE);
}

View File

@@ -437,7 +437,16 @@ public class ShopServiceImpl implements ShopService {
if(StringUtils.isNotEmpty(request.getShopCode())&&this.checkShopCodeRepeat(request.getShopCode(), request.getShopId())){
throw new ServiceException(ErrorCodeEnum.SHOP_CODE_EXIST);
}
//新增校验 缴费阶段之后 不能修改加盟模式
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_7);
//缴费阶段之后 加盟模式不能切换为直营店 直营店也不能切换为其他店
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
if (shopSubStageInfo.getShopSubStageStatus()>ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_70.getShopSubStageStatus()){
if (request.getJoinMode()!=shopInfo.getJoinMode()&&
(request.getShopId()!=JoinModeEnum.FLAGSHIP_STORE.getCode()||shopInfo.getJoinMode()!=JoinModeEnum.FLAGSHIP_STORE.getCode())){
throw new ServiceException(ErrorCodeEnum.NOT_FLAGSHIP_STORE_NOT_EXIST);
}
}
shopInfo.setUpdateUserId(userId);
shopInfo.setUpdateTime(new Date());
if (StringUtils.isNotEmpty(request.getShopCode())){

View File

@@ -553,12 +553,14 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
addSignFranchiseResponse.setPartnershipSignatoryFirstWhichStore(signFranchiseDO.getPartnershipSignatoryFirstWhichStore());
} else {
BigDecimal total = new BigDecimal(franchiseFeeDO.getYearFranchiseFee())
.add(new BigDecimal(franchiseFeeDO.getLoanMargin()))
.add(new BigDecimal(franchiseFeeDO.getFirstYearFee()))
.add(new BigDecimal(franchiseFeeDO.getFirstYearManageFee()))
.add(new BigDecimal(franchiseFeeDO.getPerformanceBond()));
addSignFranchiseResponse.setContractAmount(total.toString());
if (Objects.nonNull(franchiseFeeDO)) {
BigDecimal total = new BigDecimal(franchiseFeeDO.getYearFranchiseFee())
.add(new BigDecimal(franchiseFeeDO.getLoanMargin()))
.add(new BigDecimal(franchiseFeeDO.getFirstYearFee()))
.add(new BigDecimal(franchiseFeeDO.getFirstYearManageFee()))
.add(new BigDecimal(franchiseFeeDO.getPerformanceBond()));
addSignFranchiseResponse.setContractAmount(total.toString());
}
addSignFranchiseResponse.setMobile(lineInfoDO.getMobile());
}
addSignFranchiseResponse.setStoreName(shopInfoDO.getShopName());

View File

@@ -343,11 +343,6 @@ public class StoreServiceImpl implements StoreService {
public static List<StoreDTO> processStores(List<StoreDO> stores) {
ObjectMapper objectMapper = new ObjectMapper();
// 创建配置映射key -> 枚举项
Map<String, ExtendFieldTypeEnum> configMap = ExtendFieldTypeEnum.configMap();
// 处理每个门店
return stores.stream().map(store -> {
StoreDTO dto = new StoreDTO();
@@ -356,65 +351,18 @@ public class StoreServiceImpl implements StoreService {
dto.setStoreAddress(store.getStoreAddress());
dto.setStoreAvatar(store.getAvatar());
dto.setTelephone(store.getTelephone());
try {
// 解析门店的扩展字段
Map<String, String> extendFields = objectMapper.readValue(
store.getExtendField(),
new TypeReference<Map<String, String>>() {}
);
// 匹配并设置DTO字段
for (Map.Entry<String, String> entry : extendFields.entrySet()) {
ExtendFieldTypeEnum fieldEnum = configMap.get(entry.getKey());
if (fieldEnum != null) {
switch (fieldEnum) {
case TEST_STORE_MANAGER_MOBILE:
case ONLINE_STORE_MANAGER_MOBILE:
dto.setManagerPhone(entry.getValue());
break;
case TEST_SIGNATORY_NAME_1:
case ONLINE_SIGNATORY_NAME_1:
dto.setSigner1Name(entry.getValue());
break;
case TEST_SIGNATORY_MOBILE_1:
case ONLINE_SIGNATORY_MOBILE_1:
dto.setSigner1Phone(entry.getValue());
break;
case TEST_SIGNATORY_NAME_2:
case ONLINE_SIGNATORY_NAME_2:
dto.setSigner2Name(entry.getValue());
break;
case TEST_SIGNATORY_MOBILE_2:
case ONLINE_SIGNATORY_MOBILE_2:
dto.setSigner2Phone(entry.getValue());
break;
case TEST_ORDER_NAME:
case ONLINE_ORDER_NAME:
dto.setOrderMiniProgramName(entry.getValue());
break;
case TEST_JOIN_MODE:
case ONLINE_JOIN_MODE:
dto.setJoinMode(entry.getValue());
break;
case TEST_STORE_TYPE:
case ONLINE_STORE_TYPE:
dto.setStoreType(entry.getValue());
break;
case TEST_BRAND:
case ONLINE_BRAND:
dto.setBrand(entry.getValue());
break;
}
}
}
} catch (Exception e) {
// 处理JSON解析异常
log.error("解析门店扩展字段失败: {} " + store.getStoreNum());
e.printStackTrace();
}
dto.setMonthlyRent(store.getMonthlyRent());
dto.setMonthlyPersonnelSalary(store.getMonthlyPersonnelSalary());
dto.setMonthlyOtherExpenses(store.getMonthlyOtherExpenses());
dto.setUnifiedManagement(store.getUnifiedManagement());
dto.setStoreType(StoreTypeEnum.getMessage(store.getStoreType()));
dto.setJoinMode(JoinModeEnum.getByCode(store.getJoinModel()));
dto.setBrand(FranchiseBrandEnum.getDescByCode(store.getJoinBrand()));
dto.setOrderMiniProgramName(store.getMiniProgramOrderStoreName());
dto.setLongitude(store.getLongitude());
dto.setLatitude(store.getLatitude());
return dto;
}).collect(Collectors.toList());
}
}

View File

@@ -5,10 +5,12 @@ import com.cool.store.context.CurrentUserHolder;
import com.cool.store.dao.*;
import com.cool.store.entity.*;
import com.cool.store.enums.*;
import com.cool.store.enums.point.PaymentMethodEnum;
import com.cool.store.exception.ServiceException;
import com.cool.store.mapper.FranchiseFeeMapper;
import com.cool.store.mapper.SignFranchiseMapper;
import com.cool.store.mq.producer.SimpleMessageService;
import com.cool.store.request.StoreMasterDTO;
import com.cool.store.request.StoreRequestBody;
import com.cool.store.service.OperationLogService;
import com.cool.store.service.SyncMainSysServer;
@@ -20,6 +22,7 @@ import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.util.HashMap;
@@ -72,76 +75,138 @@ public class SyncMainSysServerImpl implements SyncMainSysServer {
private String eid;
@Resource
private StoreDao storeDao;
@Resource
SignFranchiseDAO signFranchiseDAO;
@Resource
PointDetailInfoDAO pointDetailDAO;
@Resource
QualificationsInfoDAO qualificationsInfoDAO;
@Override
@Async
public void syncStore(Long shopId) {
StoreRequestBody requestBody = new StoreRequestBody();
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
StoreDO storeDO = storeDao.getByStoreNum(shopInfo.getShopCode());
if (Objects.nonNull(storeDO)) {
throw new ServiceException(ErrorCodeEnum.STORE_IS_EXIST);
}
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfo.getLineId());
PointInfoDO pointInfoDO = pointInfoDAO.getPointInfoById(shopInfo.getPointId());
BuildInformationDO buildInformationDO = buildInformationDAO.selectOneByShopId(shopId);
SignFranchiseDO signFranchiseDO = signFranchiseMapper.selectByShopId(shopId);
requestBody.setStore_name(shopInfo.getShopName());
requestBody.setStore_num(shopInfo.getShopCode());
requestBody.setProvince(shopInfo.getProvince());
requestBody.setCity(shopInfo.getCity());
requestBody.setCounty(shopInfo.getDistrict());
requestBody.setLocation_address(shopInfo.getDetailAddress());
requestBody.setStore_address(shopInfo.getDetailAddress());
if (shopInfo.getManagerRegionId() == null) {
BigRegionDO byRegionId = bigRegionDAO.getByRegionId(shopInfo.getRegionId());
if (byRegionId != null) {
requestBody.setStore_area(byRegionId.getStoreManageRegionId() == null
? shopInfo.getRegionId().toString() : byRegionId.getStoreManageRegionId().toString());
} else {
requestBody.setStore_area(shopInfo.getRegionId().toString());
}
} else {
requestBody.setStore_area(shopInfo.getManagerRegionId().toString());
}
//未开业
requestBody.setStore_status("not_open");
if (pointInfoDO != null) {
requestBody.setStore_acreage(pointInfoDO.getPointArea());
requestBody.setLongitude_latitude(pointInfoDO.getLongitude() + "," + pointInfoDO.getLatitude());
}
requestBody.setTelephone(buildInformationDO.getBusinessMobile());
if (StringUtils.isNotBlank(buildInformationDO.getBusinessHours())) {
try {
String[] times = buildInformationDO.getBusinessHours().split("~");
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH:mm");
LocalTime startTime = LocalTime.parse(times[0], formatter);
LocalTime endTime = LocalTime.parse(times[1], formatter);
String startMillis = String.valueOf(startTime.toSecondOfDay() * 1000L);
String endMillis = String.valueOf(endTime.toSecondOfDay() * 1000L);
requestBody.setBusiness_hours(startMillis + "," + endMillis);
} catch (Exception e) {
log.info("时间转换异常:{},shopId:{},time:{}", e.getMessage(), shopId.toString(), buildInformationDO.getBusinessHours());
}
}
Map<String, ExtendFieldTypeEnum> configMapByActive = ExtendFieldTypeEnum.getConfigMapByActive(active);
Map<String, String> extendField = new HashMap<>();
extendField.put(configMapByActive.get(ONLINE_STORE_MANAGER_MOBILE.getMsg()).getKey(), "");
extendField.put(configMapByActive.get(ONLINE_SIGNATORY_NAME_1.getMsg()).getKey(), signFranchiseDO.getPartnershipSignatoryFirst());
extendField.put(configMapByActive.get(ONLINE_SIGNATORY_MOBILE_1.getMsg()).getKey(), lineInfoDO.getMobile());
extendField.put(configMapByActive.get(ONLINE_SIGNATORY_NAME_2.getMsg()).getKey(), signFranchiseDO.getPartnershipSignatorySecond());
extendField.put(configMapByActive.get(ONLINE_SIGNATORY_MOBILE_2.getMsg()).getKey(), signFranchiseDO.getPartnershipSignatorySecondMobile());
extendField.put(configMapByActive.get(ONLINE_ORDER_NAME.getMsg()).getKey(), buildInformationDO.getCShopName());
extendField.put(configMapByActive.get(ONLINE_JOIN_MODE.getMsg()).getKey(), JoinModeEnum.getByCode(shopInfo.getJoinMode()));
extendField.put(configMapByActive.get(ONLINE_STORE_TYPE.getMsg()).getKey(), StoreTypeEnum.getMessage(shopInfo.getStoreType()));
extendField.put(configMapByActive.get(ONLINE_BRAND.getMsg()).getKey(), FranchiseBrandEnum.getDescByCode(shopInfo.getFranchiseBrand()));
requestBody.setExtend_field(JSONObject.toJSONString(extendField));
requestBody.setEid(eid);
requestBody.setPartnerName(lineInfoDO.getUsername());
requestBody.setPartnerMobile(lineInfoDO.getMobile());
requestBody.setPartnerRoleId(UserRoleEnum.FRANCHISEES.getCode());
simpleMessageService.send(JSONObject.toJSONString(requestBody), RocketMqTagEnum.ZXJP_CREATE_STORE);
log.info("开始同步门店 syncStore:{}", shopId);
addStore(shopId);
}
/**
* 添加门店
* @param shopId
*/
public void addStore(Long shopId) {
try {
StoreMasterDTO storeMasterDTO = new StoreMasterDTO();
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
if (shopInfo == null){
log.info("门店不存在:{}", shopId);
return;
}
storeMasterDTO.setEnterpriseId(eid);
storeMasterDTO.setStoreStatus("not_open");
storeMasterDTO.setStoreName(shopInfo.getShopName());
storeMasterDTO.setStoreNum(shopInfo.getShopCode());
storeMasterDTO.setJoinBrand(StringUtils.isNotEmpty(shopInfo.getFranchiseBrand())?Integer.valueOf(shopInfo.getFranchiseBrand()):null);
storeMasterDTO.setJoinModel(shopInfo.getJoinMode());
storeMasterDTO.setStoreType(shopInfo.getStoreType());
SignFranchiseDO signFranchiseDO = signFranchiseDAO.selectByShopId(shopId);
storeMasterDTO.setManageModel(signFranchiseDO.getBusinessModel());
storeMasterDTO.setSignType(signFranchiseDO.getSignType());
storeMasterDTO.setProtectiveDistance(signFranchiseDO.getProtectiveDistance());
storeMasterDTO.setUnifiedManagement(signFranchiseDO.getUnifiedManagement());
BigRegionDO region = bigRegionDAO.getByRegionId(shopInfo.getRegionId());
storeMasterDTO.setBloc(region.getGroupName());
storeMasterDTO.setBranch(region.getRegionId());
storeMasterDTO.setRegionId(shopInfo.getManagerRegionId());
storeMasterDTO.setJoinSupervision(shopInfo.getInvestmentManager());
BuildInformationDO buildInformationDO = buildInformationDAO.selectOneByShopId(shopId);
if (buildInformationDO != null){
storeMasterDTO.setMiniProgramOrderStoreName(buildInformationDO.getCShopName());
if (StringUtils.isNotBlank(buildInformationDO.getBusinessHours())) {
try {
String[] times = buildInformationDO.getBusinessHours().split("~");
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH:mm");
LocalTime startTime = LocalTime.parse(times[0], formatter);
LocalTime endTime = LocalTime.parse(times[1], formatter);
String startMillis = String.valueOf(startTime.toSecondOfDay() * 1000L);
String endMillis = String.valueOf(endTime.toSecondOfDay() * 1000L);
storeMasterDTO.setBusinessHours(startMillis + "," + endMillis);
} catch (Exception e) {
log.info("时间转换异常:{},shopId:{},time:{}", e.getMessage(), shopId.toString(), buildInformationDO.getBusinessHours());
}
}
StoreMasterDTO.SettlerInfo settlerInfo = new StoreMasterDTO.SettlerInfo();
settlerInfo.setSettlerName(buildInformationDO.getSettlerName());
settlerInfo.setSettlerIdCardNo(buildInformationDO.getSettlerIdCardNo());
settlerInfo.setSettlerIdCardFront(buildInformationDO.getSettlerIdCardFront());
settlerInfo.setSettlerIdCardReverse(buildInformationDO.getSettlerIdCardReverse());
settlerInfo.setSettlerInHandFrontPicture(buildInformationDO.getSettlerInHandFrontPicture());
settlerInfo.setSettlerInHandBackPicture(buildInformationDO.getSettlerInHandBackPicture());
settlerInfo.setSettlerBankName(buildInformationDO.getSettlerBankName());
settlerInfo.setSettlerBankBranchName(buildInformationDO.getSettlerBankName());
settlerInfo.setSettlerBankNumber(buildInformationDO.getSettlerBankNumber());
settlerInfo.setSettlerBankMobile(buildInformationDO.getSettlerBankMobile());
settlerInfo.setSettlerBankPhotoUrl(buildInformationDO.getSettlerBankPhotoUrl());
settlerInfo.setSettlerBankBackPhotoUrl(buildInformationDO.getSettlerBankBackPhotoUrl());
storeMasterDTO.setSettlerInfo(settlerInfo);
}
if (shopInfo.getPointId()!=null){
PointInfoDO info = pointInfoDAO.getPointInfoById(shopInfo.getPointId());
PointDetailInfoDO pointDetail = pointDetailDAO.getPointDetailInfoByPointId(shopInfo.getPointId());
if (info != null){
storeMasterDTO.setArea(info.getProvince()+info.getCity()+info.getDistrict());
storeMasterDTO.setTown(info.getTownship());
storeMasterDTO.setStoreAddress(info.getAddress());
storeMasterDTO.setLocationAddress(info.getAddress());
storeMasterDTO.setPointCode(info.getPointCode());
storeMasterDTO.setLongitude(info.getLongitude());
storeMasterDTO.setLatitude(info.getLatitude());
try {
if (StringUtils.isNotEmpty(pointDetail.getMonthRent())&&pointDetail.getPaymentMethod()!=null){
//获取支付方式
PaymentMethodEnum paymentMethodEnum = PaymentMethodEnum.getByCode(pointDetail.getPaymentMethod());
BigDecimal monthlyRent = new BigDecimal(pointDetail.getMonthRent()).divide(new BigDecimal(paymentMethodEnum.getTotalMonth()));
storeMasterDTO.setMonthlyRent(monthlyRent);
}
} catch (Exception e) {
log.info("月租转换异常:{},shopId:{},time:{}", e.getMessage(), shopId.toString(), pointDetail.getMonthRent());
}
}
}
OrderSysInfoDO orderSysInfoDO = orderSysInfoDAO.selectByShopId(shopId);
if (orderSysInfoDO != null){
storeMasterDTO.setAddresseeName(orderSysInfoDO.getAddresseeName());
storeMasterDTO.setAddresseeMobile(orderSysInfoDO.getAddresseeMobile());
storeMasterDTO.setAddresseeArea(orderSysInfoDO.getAddresseeProvince()+orderSysInfoDO.getAddresseeCity()+orderSysInfoDO.getAddresseeDistrict());
storeMasterDTO.setAddresseeAddress(orderSysInfoDO.getAddresseeAddress());
storeMasterDTO.setDeclareGoodsLogisticsWarehouse(orderSysInfoDO.getDeclareGoodsLogisticsWarehouse());
storeMasterDTO.setDeclareGoodsType(Integer.valueOf(orderSysInfoDO.getDeclareGoodsType()));
storeMasterDTO.setDeclareGoodsDate(orderSysInfoDO.getDeclareGoodsDate());
}
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfo.getLineId());
StoreMasterDTO.SignerInfo signerInfo = new StoreMasterDTO.SignerInfo();
if (lineInfoDO != null){
signerInfo.setSigner1Name(lineInfoDO.getUsername());
signerInfo.setSigner1Mobile(lineInfoDO.getMobile());
signerInfo.setPartnerRoleId(UserRoleEnum.FRANCHISEES.getCode());
}
QualificationsInfoDO infoDO = qualificationsInfoDAO.getByLineId(shopInfo.getLineId());
if (infoDO != null){
signerInfo.setSigner1IdCard(infoDO.getIdCardNo());
signerInfo.setSigner1IdCardPhoto(infoDO.getFrontOfIdCard());
signerInfo.setSigner1IdCardPhotoBack(infoDO.getBackOfIdCard());
}
storeMasterDTO.setSignerInfo(signerInfo);
simpleMessageService.send(JSONObject.toJSONString(storeMasterDTO), RocketMqTagEnum.ZXJP_CREATE_STORE);
} catch (Exception e) {
log.info("asdStore_error:{},shopId:{}", e.getMessage(), shopId.toString());
}
}
}

View File

@@ -479,7 +479,7 @@ public class UserAuthMappingServiceImpl implements UserAuthMappingService {
@Override
public PageInfo<UserDTO> getAllUser(String keyword, Integer pageNum, Integer pageSize) {
PageHelper.startPage(pageNum, pageSize);
List<UserDTO> allUser = enterpriseUserDAO.getAllUser(eid, keyword);
List<UserDTO> allUser = enterpriseUserDAO.getAllUser(eid, keyword,Arrays.asList(UserRoleEnum.SUPERVISION.getCode(), UserRoleEnum.QW_SUPERVISION.getCode()));
return new PageInfo<>(allUser);
}