平台建店list

This commit is contained in:
shuo.wang
2024-10-11 09:42:49 +08:00
parent f619cea9d3
commit 90149fb6dd
13 changed files with 333 additions and 15 deletions

View File

@@ -10,6 +10,8 @@ import com.cool.store.exception.ServiceException;
import com.cool.store.mapper.ShopInfoMapper; import com.cool.store.mapper.ShopInfoMapper;
import com.cool.store.request.PlanListRequest; import com.cool.store.request.PlanListRequest;
import com.cool.store.request.PreparationRequest; import com.cool.store.request.PreparationRequest;
import com.cool.store.request.platformBuildListRequest;
import com.cool.store.response.PlatformBuildListResponse;
import com.cool.store.vo.shop.StageShopCountVO; import com.cool.store.vo.shop.StageShopCountVO;
import com.github.pagehelper.Page; import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
@@ -158,4 +160,10 @@ public class ShopInfoDAO {
return shopInfoMapper.selectByStoreNum(storeNum); return shopInfoMapper.selectByStoreNum(storeNum);
} }
public List<PlatformBuildListResponse> platformBuildList(List<Long> regionIds, platformBuildListRequest request){
if(CollectionUtils.isEmpty(regionIds)){
return new ArrayList<>();
}
return shopInfoMapper.platformBuildList(regionIds, request);
}
} }

View File

@@ -1,6 +1,7 @@
package com.cool.store.dao; package com.cool.store.dao;
import com.cool.store.constants.CommonConstants; import com.cool.store.constants.CommonConstants;
import com.cool.store.dto.PlatformBuildStageDTO;
import com.cool.store.dto.Preparation.ScheduleDTO; import com.cool.store.dto.Preparation.ScheduleDTO;
import com.cool.store.entity.ShopStageInfoDO; import com.cool.store.entity.ShopStageInfoDO;
import com.cool.store.enums.point.ShopStageEnum; import com.cool.store.enums.point.ShopStageEnum;
@@ -206,6 +207,12 @@ public class ShopStageInfoDAO {
} }
return shopStageInfoMapper.getScheduleList(shopIdList); return shopStageInfoMapper.getScheduleList(shopIdList);
} }
public List<ScheduleDTO> getPlatformBuildList(List<Long> shopIdList){
if (CollectionUtils.isEmpty(shopIdList)){
return Collections.emptyList();
}
return shopStageInfoMapper.getPlatformBuildList(shopIdList);
}
public List<ShopStageInfoDO> getShopContractActualCompletionTime(List<Long> shopIdList){ public List<ShopStageInfoDO> getShopContractActualCompletionTime(List<Long> shopIdList){
if (CollectionUtils.isEmpty(shopIdList)){ if (CollectionUtils.isEmpty(shopIdList)){
@@ -288,4 +295,10 @@ public class ShopStageInfoDAO {
public ShopStageInfoDO getByShopIdAndSubStage(Long shopId, Integer shopSubStage) { public ShopStageInfoDO getByShopIdAndSubStage(Long shopId, Integer shopSubStage) {
return shopStageInfoMapper.getByShopIdAndSubStage(shopId,shopSubStage); return shopStageInfoMapper.getByShopIdAndSubStage(shopId,shopSubStage);
} }
public List<PlatformBuildStageDTO> getPlatformBuildStage(List<Long> shopIds) {
if (CollectionUtils.isEmpty(shopIds)){
return new ArrayList<>();
}
return shopStageInfoMapper.getPlatformBuildStage(shopIds);
}
} }

View File

@@ -7,6 +7,8 @@ import com.cool.store.entity.PointInfoDO;
import com.cool.store.entity.ShopInfoDO; import com.cool.store.entity.ShopInfoDO;
import com.cool.store.request.PlanListRequest; import com.cool.store.request.PlanListRequest;
import com.cool.store.request.PreparationRequest; import com.cool.store.request.PreparationRequest;
import com.cool.store.request.platformBuildListRequest;
import com.cool.store.response.PlatformBuildListResponse;
import com.cool.store.vo.shop.StageShopCountVO; import com.cool.store.vo.shop.StageShopCountVO;
import com.github.pagehelper.Page; import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@@ -88,5 +90,5 @@ public interface ShopInfoMapper extends Mapper<ShopInfoDO> {
*/ */
List<ShopInfoDO> selectShopListByRegionId(@Param("regionIds") List<Long> regionIds,@Param("shopSubStage") Integer shopSubStage,@Param("subStageStatus")List<Integer> subStageStatus,@Param("keyWord")String keyWord); List<ShopInfoDO> selectShopListByRegionId(@Param("regionIds") List<Long> regionIds,@Param("shopSubStage") Integer shopSubStage,@Param("subStageStatus")List<Integer> subStageStatus,@Param("keyWord")String keyWord);
List<PlatformBuildListResponse> platformBuildList(@Param("list") List<Long> regionIds,@Param("request") platformBuildListRequest request);
} }

View File

@@ -1,5 +1,6 @@
package com.cool.store.mapper; package com.cool.store.mapper;
import com.cool.store.dto.PlatformBuildStageDTO;
import com.cool.store.dto.Preparation.ScheduleDTO; import com.cool.store.dto.Preparation.ScheduleDTO;
import com.cool.store.entity.ShopStageInfoDO; import com.cool.store.entity.ShopStageInfoDO;
import com.cool.store.enums.point.ShopSubStageEnum; import com.cool.store.enums.point.ShopSubStageEnum;
@@ -109,6 +110,7 @@ public interface ShopStageInfoMapper extends Mapper<ShopStageInfoDO> {
List<ShopStageInfoDO> getShopIdListByStageStatus(@Param("shopSubStageStatus") Integer shopSubStageStatus); List<ShopStageInfoDO> getShopIdListByStageStatus(@Param("shopSubStageStatus") Integer shopSubStageStatus);
List<ScheduleDTO> getScheduleList(@Param("shopIds") List<Long> shopIds); List<ScheduleDTO> getScheduleList(@Param("shopIds") List<Long> shopIds);
List<ScheduleDTO> getPlatformBuildList(@Param("shopIds") List<Long> shopIds);
List<ShopStageInfoDO> getShopContractActualCompletionTime(@Param("shopIds") List<Long> shopIds); List<ShopStageInfoDO> getShopContractActualCompletionTime(@Param("shopIds") List<Long> shopIds);
@@ -154,4 +156,6 @@ public interface ShopStageInfoMapper extends Mapper<ShopStageInfoDO> {
*/ */
ShopStageInfoDO getByShopIdAndSubStage(@Param("shopId") Long shopId, ShopStageInfoDO getByShopIdAndSubStage(@Param("shopId") Long shopId,
@Param("shopSubStage") Integer shopSubStage); @Param("shopSubStage") Integer shopSubStage);
List<PlatformBuildStageDTO> getPlatformBuildStage( @Param("shopIds") List<Long> shopIds);
} }

View File

@@ -174,7 +174,37 @@
and xsi.shop_name Like concat("%",#{keyWord},"%") or xsi.store_num Like concat("%",#{keyWord},"%") and xsi.shop_name Like concat("%",#{keyWord},"%") or xsi.store_num Like concat("%",#{keyWord},"%")
</if> </if>
</select> </select>
<select id="platformBuildList" resultType="com.cool.store.response.PlatformBuildListResponse">
select
xsi.id as shopId,
xsi.shop_name as shopName,
xsi.shop_code as shopCode,
xsi.region_id as regionId,
xli.mobile as mobile,
xli.username as partnerName
from xfsg_shop_info xsi
left join xfsg_line_info xli on xsi.line_id = xli.id
where
xsi.region_id in
<foreach collection="list" open="(" separator="," close=")" index="index" item="item">
#{item}
</foreach>
<if test="request.shopKeyword != null and request.shopKeyword != ''">
and (xsi.shop_name like concat("%",#{request.shopKeyword},"%") or xsi.shop_code like
concat("%",#{request.shopKeyword},"%"))
</if>
<if test="request.partnerKeyword != null and request.partnerKeyword != ''">
and (xli.mobile like concat("%",#{request.partnerKeyword},"%") or xli.username like
concat("%",#{request.partnerKeyword},"%"))
</if>
<if test="request.regionIds != null and request.regionIds.size()>0">
and xsi.region_id in
<foreach collection="request.regionIds" open="(" separator="," close=")" index="index" item="item">
#{item}
</foreach>
</if>
order by xsi.create_time
</select>
</mapper> </mapper>

View File

@@ -312,4 +312,30 @@
WHERE shop_id = #{shopId} WHERE shop_id = #{shopId}
AND shop_sub_stage = #{shopSubStage} AND shop_sub_stage = #{shopSubStage}
</select> </select>
<select id="getPlatformBuildList" resultType="com.cool.store.dto.Preparation.ScheduleDTO">
select
shop_id as shopId,
count(1) as totalColumn,
sum(if(is_terminated = 1, 1, 0)) as completionColumn
from xfsg_shop_stage_info where shop_stage = 3
<if test="shopIds != null and shopIds.size() > 0">
and shop_id in
<foreach collection="shopIds" item="shopId" index="index" open="(" separator="," close=")">
#{shopId}
</foreach>
</if>
group by shop_id
</select>
<select id="getPlatformBuildStage" resultType="com.cool.store.dto.PlatformBuildStageDTO">
select shop_id as shopId,
shop_sub_stage as shopSubStage,
shop_sub_stage_status as shopSubStageStatus
from xfsg_shop_stage_info
where shop_stage = 3
and shop_id in
<foreach collection="shopIds" item="shopId" index="index" open="(" separator="," close=")">
#{shopId}
</foreach>
</select>
</mapper> </mapper>

View File

@@ -0,0 +1,19 @@
package com.cool.store.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author: WangShuo
* @Date: 2024/10/10/下午9:17
* @Version 1.0
* @注释:
*/
@Data
public class PlatformBuildStageDTO {
private Long shopId;
private Integer shopSubStage;
private Integer shopSubStageStatus;
}

View File

@@ -0,0 +1,29 @@
package com.cool.store.request;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @Author: WangShuo
* @Date: 2024/10/10/下午8:51
* @Version 1.0
* @注释:
*/
@Data
public class platformBuildListRequest {
@ApiModelProperty(value = "门店名称/编号")
private String shopKeyword;
@ApiModelProperty(value = "加盟商姓名/手机号")
private String partnerKeyword;
@ApiModelProperty(value = "所属区域id")
private List<Long> regionIds;
@ApiModelProperty(value = "操作人id", hidden = true)
private String operateUserId;
private Integer pageSize;
private Integer pageNum;
}

View File

@@ -0,0 +1,37 @@
package com.cool.store.response;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author: WangShuo
* @Date: 2024/10/10/下午8:20
* @Version 1.0
* @注释:
*/
@Data
public class PlatformBuildListResponse {
private Long shopId;
@ApiModelProperty("门店名称")
private String shopName;
@ApiModelProperty("门店编号")
private String shopCode;
@ApiModelProperty("加盟商姓名")
private String partnerName;
@ApiModelProperty("手机号码")
private String mobile;
@ApiModelProperty(value = "所属区域id",hidden = true)
private Long regionId;
@ApiModelProperty("所属区域")
private String regionName;
@ApiModelProperty("抖音")
private Integer DYStageStatus;
@ApiModelProperty("美团外卖")
private Integer MTStageStatus;
@ApiModelProperty("饿了么")
private Integer ELMEStageStatus;
@ApiModelProperty("美团团购")
private Integer MTBuyStageStatus;
@ApiModelProperty("快手")
private Integer KSStageStatus;
}

View File

@@ -0,0 +1,45 @@
package com.cool.store.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.time.temporal.ChronoUnit;
import java.util.Date;
/**
* @Author: WangShuo
* @Date: 2024/10/10/下午8:29
* @Version 1.0
* @注释:
*/
@Data
public class PlatformBuildInfoVO {
@ApiModelProperty("加盟商名称")
private String username;
@ApiModelProperty("加盟手机号")
private String mobile;
private Integer joinStatus;
private Long shopId;
@ApiModelProperty("门店名称")
private String shopName;
@ApiModelProperty("门店编码")
private String shopCode;
@ApiModelProperty("总项数")
private Integer totalColumn;
@ApiModelProperty("完成项")
private Integer completionColumn;
@ApiModelProperty("所属区域")
private String regionName;
@ApiModelProperty("招商经理名称")
private String investmentManagerName;
}

View File

@@ -3,21 +3,27 @@ package com.cool.store.service;
import com.cool.store.request.PlatformBuildAuditRequest; import com.cool.store.request.PlatformBuildAuditRequest;
import com.cool.store.request.PlatformBuildRequest; import com.cool.store.request.PlatformBuildRequest;
import com.cool.store.request.platformBuildListRequest;
import com.cool.store.response.PlatformBuildListResponse;
import com.cool.store.response.PlatformBuildResponse; import com.cool.store.response.PlatformBuildResponse;
import com.cool.store.vo.PartnerUserInfoVO; import com.cool.store.vo.PartnerUserInfoVO;
import com.cool.store.vo.PlatformBuildInfoVO;
import com.cool.store.vo.Preparation.PreparationScheduleDetailVO;
import java.util.List;
/** /**
* @author EDY * @author EDY
* @description 针对表【xfsg_platform_build(平台建店表)】的数据库操作Service * @description 针对表【xfsg_platform_build(平台建店表)】的数据库操作Service
* @createDate 2024-10-09 14:54:40 * @createDate 2024-10-09 14:54:40
*/ */
public interface PlatformBuildService { public interface PlatformBuildService {
String juridicalIdCard(Long shopId); String juridicalIdCard(Long shopId);
Integer submitOrUpdate(PlatformBuildRequest request, PartnerUserInfoVO partnerUserInfoVO); Integer submitOrUpdate(PlatformBuildRequest request, PartnerUserInfoVO partnerUserInfoVO);
PlatformBuildResponse get(Long shopId,Integer type); PlatformBuildResponse get(Long shopId, Integer type);
//第一层审批 //第一层审批
Integer firstAudit(PlatformBuildAuditRequest request); Integer firstAudit(PlatformBuildAuditRequest request);
@@ -25,5 +31,8 @@ public interface PlatformBuildService {
//第二层审批 美团外卖&饿了么 //第二层审批 美团外卖&饿了么
Integer secondAudit(PlatformBuildAuditRequest request); Integer secondAudit(PlatformBuildAuditRequest request);
PlatformBuildInfoVO getPlatformBuildInfo(Long shopId);
List<PlatformBuildListResponse> platformBuildList(platformBuildListRequest request);
} }

View File

@@ -3,6 +3,8 @@ package com.cool.store.service.impl;
import com.cool.store.constants.CommonConstants; import com.cool.store.constants.CommonConstants;
import com.cool.store.dao.*; import com.cool.store.dao.*;
import com.cool.store.dto.PlatformBuildStageDTO;
import com.cool.store.dto.Preparation.ScheduleDTO;
import com.cool.store.entity.*; import com.cool.store.entity.*;
import com.cool.store.enums.*; import com.cool.store.enums.*;
import com.cool.store.enums.point.ShopSubStageEnum; import com.cool.store.enums.point.ShopSubStageEnum;
@@ -11,13 +13,21 @@ import com.cool.store.exception.ServiceException;
import com.cool.store.mapper.ApplyLicenseMapper; import com.cool.store.mapper.ApplyLicenseMapper;
import com.cool.store.request.PlatformBuildAuditRequest; import com.cool.store.request.PlatformBuildAuditRequest;
import com.cool.store.request.PlatformBuildRequest; import com.cool.store.request.PlatformBuildRequest;
import com.cool.store.request.platformBuildListRequest;
import com.cool.store.response.PlatformBuildListResponse;
import com.cool.store.response.PlatformBuildResponse; import com.cool.store.response.PlatformBuildResponse;
import com.cool.store.service.OperationLogService; import com.cool.store.service.OperationLogService;
import com.cool.store.service.PlatformBuildService; import com.cool.store.service.PlatformBuildService;
import com.cool.store.mapper.PlatformBuildMapper; import com.cool.store.mapper.PlatformBuildMapper;
import com.cool.store.service.RegionService;
import com.cool.store.service.UserAuthMappingService; import com.cool.store.service.UserAuthMappingService;
import com.cool.store.utils.poi.DateUtils;
import com.cool.store.utils.poi.StringUtils; import com.cool.store.utils.poi.StringUtils;
import com.cool.store.vo.PartnerUserInfoVO; import com.cool.store.vo.PartnerUserInfoVO;
import com.cool.store.vo.PlatformBuildInfoVO;
import com.cool.store.vo.Preparation.PreparationScheduleDetailVO;
import com.github.pagehelper.PageHelper;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
@@ -26,10 +36,8 @@ import org.springframework.transaction.annotation.Transactional;
import springfox.documentation.swagger2.mappers.LicenseMapper; import springfox.documentation.swagger2.mappers.LicenseMapper;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList; import java.util.*;
import java.util.Date; import java.util.stream.Collectors;
import java.util.List;
import java.util.Objects;
import static com.cool.store.enums.point.ShopSubStageStatusEnum.*; import static com.cool.store.enums.point.ShopSubStageStatusEnum.*;
@@ -57,6 +65,12 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
private ShopAuditInfoDAO shopAuditInfoDAO; private ShopAuditInfoDAO shopAuditInfoDAO;
@Autowired @Autowired
private OperationLogDAO operationLogDAO; private OperationLogDAO operationLogDAO;
@Autowired
private LineInfoDAO lineInfoDAO;
@Autowired
private RegionService regionService;
@Autowired
private EnterpriseUserDAO enterpriseUserDAO;
@Override @Override
public String juridicalIdCard(Long shopId) { public String juridicalIdCard(Long shopId) {
@@ -168,6 +182,75 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
operationUserList, OperationTypeEnum.OPERATION_TYPE_1, null, OperationStatusEnum.NOT_PROCESSED); operationUserList, OperationTypeEnum.OPERATION_TYPE_1, null, OperationStatusEnum.NOT_PROCESSED);
} }
@Override
public PlatformBuildInfoVO getPlatformBuildInfo(Long shopId) {
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
if (shopInfo == null) {
throw new ServiceException(ErrorCodeEnum.SHOP_ID_IS_NULL);
}
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(shopInfo.getLineId());
List<ScheduleDTO> shopContractActualCompletionTime = shopStageInfoDAO.getPlatformBuildList(Collections.singletonList(shopId));
PlatformBuildInfoVO platformBuildInfoVO = new PlatformBuildInfoVO();
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(Collections.singletonList(shopInfo.getRegionId()));
String investmentManager = enterpriseUserDAO.getUserName(lineInfo.getInvestmentManager());
platformBuildInfoVO.setShopId(shopId);
platformBuildInfoVO.setUsername(lineInfo.getUsername());
platformBuildInfoVO.setMobile(lineInfo.getMobile());
platformBuildInfoVO.setJoinStatus(lineInfo.getJoinStatus());
platformBuildInfoVO.setShopName(shopInfo.getShopName());
platformBuildInfoVO.setShopCode(shopInfo.getShopCode());
platformBuildInfoVO.setRegionName(regionNameMap.get(shopInfo.getRegionId()));
if (CollectionUtils.isNotEmpty(shopContractActualCompletionTime)) {
ScheduleDTO scheduleDTO = shopContractActualCompletionTime.get(CommonConstants.ZERO);
platformBuildInfoVO.setCompletionColumn(scheduleDTO.getCompletionColumn());
platformBuildInfoVO.setTotalColumn(scheduleDTO.getTotalColumn());
}
platformBuildInfoVO.setInvestmentManagerName(investmentManager);
return platformBuildInfoVO;
}
@Override
public List<PlatformBuildListResponse> platformBuildList(platformBuildListRequest request) {
String userId = request.getOperateUserId();
List<String> regionIds = userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(userId);
if (CollectionUtils.isEmpty(regionIds)) {
return Collections.emptyList();
}
List<Long> regionIdList = new ArrayList<>();
for (String regionId : regionIds) {
regionIdList.add(Long.parseLong(regionId));
}
PageHelper.startPage(request.getPageNum(), request.getPageSize());
List<PlatformBuildListResponse> responses = shopInfoDAO.platformBuildList(regionIdList, request);
List<Long> shopIds = responses.stream().map(PlatformBuildListResponse::getShopId).collect(Collectors.toList());
List<Long> regionIds1 = responses.stream().map(PlatformBuildListResponse::getRegionId).collect(Collectors.toList());
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIds1);
List<PlatformBuildStageDTO> shopStageInfos = shopStageInfoDAO.getPlatformBuildStage(shopIds);
Map<Long, List<PlatformBuildStageDTO>> shopStageInfoMap = shopStageInfos.stream().collect(Collectors.groupingBy(PlatformBuildStageDTO::getShopId));
for (PlatformBuildListResponse dto :responses){
String regionName = regionNameMap.get(dto.getRegionId());
dto.setRegionName(regionName);
List<PlatformBuildStageDTO> list = shopStageInfoMap.get(dto.getShopId());
if (CollectionUtils.isNotEmpty(list)) {
for (PlatformBuildStageDTO stageDTO : list) {
if (stageDTO.getShopSubStage().equals(ShopSubStageEnum.SHOP_STAGE_18.getShopSubStage())) {
dto.setDYStageStatus(stageDTO.getShopSubStageStatus());
}else if (stageDTO.getShopSubStage().equals(ShopSubStageEnum.SHOP_STAGE_19.getShopSubStage())) {
dto.setMTStageStatus(stageDTO.getShopSubStageStatus());
}else if (stageDTO.getShopSubStage().equals(ShopSubStageEnum.SHOP_STAGE_20.getShopSubStage())) {
dto.setMTBuyStageStatus(stageDTO.getShopSubStageStatus());
}else if (stageDTO.getShopSubStage().equals(ShopSubStageEnum.SHOP_STAGE_21.getShopSubStage())) {
dto.setELMEStageStatus(stageDTO.getShopSubStageStatus());
}else if (stageDTO.getShopSubStage().equals(ShopSubStageEnum.SHOP_STAGE_22.getShopSubStage())) {
dto.setKSStageStatus(stageDTO.getShopSubStageStatus());
}
}
}
}
return responses;
}
@Override @Override
public PlatformBuildResponse get(Long shopId, Integer type) { public PlatformBuildResponse get(Long shopId, Integer type) {
PlatformBuildDO platformBuildDO = platformBuildDAO.selectOneByShopId(shopId, type); PlatformBuildDO platformBuildDO = platformBuildDAO.selectOneByShopId(shopId, type);
@@ -231,7 +314,7 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
doThing(platformBuildDO, request, shopAuditInfoDO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_211, SHOP_SUB_STAGE_STATUS_213, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_214); doThing(platformBuildDO, request, shopAuditInfoDO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_211, SHOP_SUB_STAGE_STATUS_213, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_214);
if (request.getResultType().equals(AuditResultTypeEnum.PASS.getCode())) { if (request.getResultType().equals(AuditResultTypeEnum.PASS.getCode())) {
operationLogService.addOperationLog(shopId, SHOP_SUB_STAGE_STATUS_213, request.getOperateUserId(), operationLogService.addOperationLog(shopId, SHOP_SUB_STAGE_STATUS_213, request.getOperateUserId(),
userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.E_L_ME_HEADQUARTERS_BUILD_CUSTOMER,regionId), OperationTypeEnum.OPERATION_TYPE_1, null, OperationStatusEnum.NOT_PROCESSED); userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.E_L_ME_HEADQUARTERS_BUILD_CUSTOMER, regionId), OperationTypeEnum.OPERATION_TYPE_1, null, OperationStatusEnum.NOT_PROCESSED);
} }
return CommonConstants.ONE; return CommonConstants.ONE;
} }
@@ -242,10 +325,10 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE); throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
} }
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.MEI_TUAN_WAI_MAI); ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.MEI_TUAN_WAI_MAI);
doThing(platformBuildDO, request, shopAuditInfoDO, shopId, SHOP_SUB_STAGE_STATUS_191, SHOP_SUB_STAGE_STATUS_193, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_194); doThing(platformBuildDO, request, shopAuditInfoDO, shopId, SHOP_SUB_STAGE_STATUS_191, SHOP_SUB_STAGE_STATUS_193, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_194);
if (request.getResultType().equals(AuditResultTypeEnum.PASS.getCode())) { if (request.getResultType().equals(AuditResultTypeEnum.PASS.getCode())) {
operationLogService.addOperationLog(shopId, SHOP_SUB_STAGE_STATUS_193, request.getOperateUserId(), operationLogService.addOperationLog(shopId, SHOP_SUB_STAGE_STATUS_193, request.getOperateUserId(),
userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.MEI_TUAN_HEADQUARTERS_BUILD_CUSTOMER,regionId), OperationTypeEnum.OPERATION_TYPE_1, null, OperationStatusEnum.NOT_PROCESSED); userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.MEI_TUAN_HEADQUARTERS_BUILD_CUSTOMER, regionId), OperationTypeEnum.OPERATION_TYPE_1, null, OperationStatusEnum.NOT_PROCESSED);
} }
return CommonConstants.ONE; return CommonConstants.ONE;
} }

View File

@@ -5,11 +5,14 @@ import com.cool.store.context.PartnerUserHolder;
import com.cool.store.enums.PlatformBuildEnum; import com.cool.store.enums.PlatformBuildEnum;
import com.cool.store.enums.point.ShopSubStageStatusEnum; import com.cool.store.enums.point.ShopSubStageStatusEnum;
import com.cool.store.request.PlatformBuildAuditRequest; import com.cool.store.request.PlatformBuildAuditRequest;
import com.cool.store.request.platformBuildListRequest;
import com.cool.store.response.AuditInfoResponse; import com.cool.store.response.AuditInfoResponse;
import com.cool.store.response.PlatformBuildListResponse;
import com.cool.store.response.PlatformBuildResponse; import com.cool.store.response.PlatformBuildResponse;
import com.cool.store.response.ResponseResult; import com.cool.store.response.ResponseResult;
import com.cool.store.service.OperationLogService; import com.cool.store.service.OperationLogService;
import com.cool.store.service.PlatformBuildService; import com.cool.store.service.PlatformBuildService;
import com.cool.store.vo.PlatformBuildInfoVO;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
@@ -35,12 +38,22 @@ public class PCPlatformBuildController {
@Resource @Resource
private PlatformBuildService platformBuildService; private PlatformBuildService platformBuildService;
@ApiOperation("平台建店列表")
@GetMapping("/platformBuildList")
public ResponseResult<List<PlatformBuildListResponse> > platformBuildList(@RequestBody platformBuildListRequest request) {
request.setOperateUserId(CurrentUserHolder.getUserId());
return ResponseResult.success(platformBuildService.platformBuildList(request));
}
@ApiOperation("根据type获取平台建店详情:1-抖音2-快手3-美团团购4-饿了么5-美团外卖") @ApiOperation("根据type获取平台建店详情:1-抖音2-快手3-美团团购4-饿了么5-美团外卖")
@GetMapping("/get") @GetMapping("/get")
public ResponseResult<PlatformBuildResponse> get(@RequestParam("shopId") Long shopId,@RequestParam("type") Integer type) { public ResponseResult<PlatformBuildResponse> get(@RequestParam("shopId") Long shopId,@RequestParam("type") Integer type) {
return ResponseResult.success(platformBuildService.get(shopId, PlatformBuildEnum.DOU_YIN.getCode())); return ResponseResult.success(platformBuildService.get(shopId, PlatformBuildEnum.DOU_YIN.getCode()));
} }
@ApiOperation("获取平台建店左侧小窗详情")
@GetMapping("/getPlatformBuildInfo")
public ResponseResult<PlatformBuildInfoVO> getPlatformBuildInfo(@RequestParam("shopId") Long shopId) {
return ResponseResult.success(platformBuildService.getPlatformBuildInfo(shopId));
}
@ApiOperation("一级审批") @ApiOperation("一级审批")
@PostMapping("/firstAudit") @PostMapping("/firstAudit")
public ResponseResult<Integer> firstAudit(@RequestBody @Validated PlatformBuildAuditRequest request) { public ResponseResult<Integer> firstAudit(@RequestBody @Validated PlatformBuildAuditRequest request) {